46 protected static bool s_bUnconsciousVONPermitted =
true;
47 protected static bool s_bIsInit;
67 protected ref array<ref SCR_VONEntry> m_aEntries = {};
70 protected ref ScriptInvokerBase<OnEntriesChanged>
m_OnEntriesChanged =
new ScriptInvokerBase<OnEntriesChanged>();
72 protected ref ScriptInvokerBase<OnVONActiveToggled>
m_OnVONActiveToggled =
new ScriptInvokerBase<OnVONActiveToggled>();
152 int count = m_aEntries.Count();
153 for (
int i = 0; i < count; i++)
155 entries.Insert(m_aEntries[i]);
165 return m_aEntries.Count();
232 m_aEntries.Insert(entry);
266 if (vonRadial && vonRadial.IsOpened())
270 m_aEntries.RemoveItem(entry);
481 if (!activeRadioEntry)
486 BaseRadioComponent radio = activeRadioEntry.
GetTransceiver().GetRadio();
487 array<SCR_VONEntry> entries = {};
493 if (radioEntry && radioEntry.
GetTransceiver().GetRadio() == radio)
494 entries.Insert(entry);
499 if (!entries.IsEmpty())
501 int nextEntryID = (entries.Find(
m_ActiveEntry) + 1) % entries.Count();
502 newEntry = entries[nextEntryID];
545 if (entry.GetVONMethod() ==
ECommMethod.SQUAD_RADIO)
615 if (entry.GetVONMethod() ==
ECommMethod.SQUAD_RADIO)
643 if (!m_aEntries.IsIndexValid(channelId))
750 UpdateUnconsciousVONPermitted();
754 if (s_bUnconsciousVONPermitted)
776 static void UpdateUnconsciousVONPermitted()
784 s_bUnconsciousVONPermitted = healthSettings.IsUnconsciousVONPermitted();
803 if (s_bIsInit ||
System.IsConsoleApp())
809 UpdateUnconsciousVONPermitted();
824 if (playerController)
893 DbgUI.Begin(
"VON debug");
894 const string dbg =
"VONcomp: %1 | entries: %2";
895 DbgUI.Text(
string.Format( dbg,
m_VONComp, m_aEntries.Count() ) );
896 const string dbg2 =
"Direct mode: %1 | LRR mode: %2";
898 const string dbg3 =
"Activ: %1";
900 const string dbg4 =
"LRRad: %1";
902 const string dbg5 =
"Saved: %1";
905 const string line =
"freq: %2 | active: %3 | class: %4 | type: %1 ";
996 super.OnDelete(owner);
ArmaReforgerScripted GetGame()
SCR_BaseGameMode GetGameMode()
InputManager m_InputManager
void RemoveEntry(notnull SCR_DownloadManagerEntry entry)
Widget AddEntry(ResourceName entryPath, SCR_WorkshopItemActionDownload action)
Add new widget in category based based on category type.
void SCR_FactionManager(IEntitySource src, IEntity parent)
SCR_HintSequenceComponentClass m_bIsActive
void OnPlayerDeleted(int playerId, IEntity player)
void SetVONComponent(SCR_VoNComponent VONComp)
int GetVONEntries(inout array< ref SCR_VONEntry > entries)
SCR_VONEntry m_SavedEntry
void SetVONProximity(bool activate)
ref SCR_VONEntry m_DirectSpeechEntry
ScriptInvokerBase< OnVONActiveToggled > GetOnVONActiveToggledInvoker()
void ConnectToHandleUpdateVONControllersSystem()
ref SCR_VONMenu m_VONMenu
bool IsUsingLRR()
Using long range radio.
void SetVONProximityToggle(bool activate)
int GetVONEntryCount()
Get number of entries.
void ActivateVON(EVONTransmitType transmitType)
string m_sLocalEncryptionKey
ref ScriptInvokerBase< OnEntriesChanged > m_OnEntriesChanged
void SetActiveChannel(int channelId)
SCR_VONEntry GetActiveEntry()
void SetVONBroadcast(bool activate, EVONTransmitType transmitType=EVONTransmitType.CHANNEL)
void DisconnectFromHandleUpdateVONControllersSystem()
void OnPauseMenuClosed()
PauseMenuUI Event.
const string ACTION_DIRECT_TOGGLE
ref ScriptInvokerBase< OnEntriesChanged > m_OnEntriesActiveChanged
ScriptInvokerBase< OnEntriesChanged > GetOnEntriesChangedInvoker()
SCR_VONEntry m_LongRangeEntry
EVONTransmitType m_eVONType
void DeactivateVON(EVONTransmitType transmitType=EVONTransmitType.NONE)
Current VON deactivation.
bool SetVONDisabled(bool state)
ECharacterLifeState m_eLifeState
void SetVONLongRange(bool longRange, bool restorePrevious=true)
SCR_VoNComponent m_VONComp
ref SCR_VONAutoTune m_VONAutoTune
void RpcAsk_SetActiveChannel(int channelId)
EVONTransmitType
Type of a players current VON transmission.
void SetEntryActive(SCR_VONEntry entry, bool setFromMenu=false)
SCR_VONControllerClass VON_MENU_OPENING_CONTEXT
Scripted VON input and control, attached to SCR_PlayerController.
SCR_VONAutoTune GetAutoTune()
EVONTransmitType SelectFirstUnmutedEntry()
ScriptInvokerBase< OnEntriesChanged > GetOnEntriesActiveChangedInvoker()
void ActionVONTransceiverCycle(float value, EActionTrigger reason=EActionTrigger.UP)
void OnPauseMenuOpened()
PauseMenuUI Event.
const string ACTION_CHANNEL
SCR_VonDisplay m_VONDisplay
bool m_bIsEditorRadioAdded
void SetDisplay(SCR_VonDisplay display)
bool m_bIsLongRangeToggled
SCR_VONEntry GetEntryByTransmitType(EVONTransmitType type)
const string ACTION_LONG_RANGE_TOGGLE
bool IsLRRAvailable()
Long range raido entry is available.
void ActionVONProximityToggle(float value, EActionTrigger reason=EActionTrigger.UP)
void ActionVONBroadcast(float value, EActionTrigger reason=EActionTrigger.UP)
const float TOGGLE_OFF_DELAY
void ActionVONProximity(float value, EActionTrigger reason=EActionTrigger.UP)
void SetActiveTransmit(notnull SCR_VONEntry entry)
Set transmission method depending on entry type when starting VON transmit.
void ActionVONLongRangeToggle(float value, EActionTrigger reason=EActionTrigger.UP)
SCR_VonDisplay GetDisplay()
void Cleanup()
Cleanup component.
bool AssignVONComponent()
Assign VON comp by fetching it from controlled entity.
bool IsVONDisabled()
Is VON disabled.
ref ScriptInvokerBase< OnVONActiveToggled > m_OnVONActiveToggled
SCR_VONEntry m_ActiveEntry
const string ACTION_TRANSCEIVER_CYCLE
string m_sActiveHoldAction
const string ACTION_DIRECT
void Rpc(func method, void p0=NULL, void p1=NULL, void p2=NULL, void p3=NULL, void p4=NULL, void p5=NULL, void p6=NULL, void p7=NULL)
void Register(SCR_VONController component)
void Unregister(SCR_VONController component)
proto external Managed FindComponent(typename typeName)
proto external BaseWorld GetWorld()
ScriptInvokerBase< SCR_BaseGameMode_PlayerIdAndEntity > GetOnPlayerDeleted()
SCR_GameModeHealthSettings GetGameModeHealthSettings()
ref OnLifeStateChangedInvoker m_OnLifeStateChanged
static bool IsAdmin(int playerID)
ref OnControlledEntityChangedPlayerControllerInvoker m_OnControlledEntityChanged
Voice over network entry data class, used for management of communication methods.
void SetActive(bool state)
Activate entry.
VONEntry class for radio entries.
BaseTransceiver GetTransceiver()
Associated transceiver.
SCR_GadgetComponent GetGadget()
Gadget component associated with this entry.
bool IsLongRange()
Is long range backpack radio type.
int GetEntryFrequency()
Local frequency getter since atm the transceiver getter is delayed (network?) and not sufficient for ...
proto external GenericEntity GetOwner()
Get owner entity.
void EOnDeactivate(IEntity owner)
proto external VoNComponent GetVONComponent()
Get active VON component for transmit.
@ NONE
When Shape is created and not initialized yet.
SCR_FieldOfViewSettings Attribute
proto external PlayerController GetPlayerController()
void OnControlledEntityChanged(IEntity from, IEntity to)
Runs every time the controlled entity has been changed.
proto external int GetPlayerId()
void RplRpc(RplChannel channel, RplRcver rcver, RplCondition condition=RplCondition.None, string customConditionName="")
RplChannel
Communication channel. Reliable is guaranteed to be delivered. Unreliable not.