5 private bool m_bEnabled;
33 void SetRadios(
IEntity entity, SCR_EVONAutoTuneFrequency tuneSpecificFrequency = SCR_EVONAutoTuneFrequency.NONE)
38 #ifdef VON_AUTO_TUNE_DEBUG
62 BaseRadioComponent foundRadio;
65 if (identity.m_sFactionKey != faction.GetFactionKey())
72 foreach (SCR_VONAutoTuneRoleConfig role : identity.m_aRoles)
77 SetChannels(faction, foundRadio, role, groupId, tuneSpecificFrequency);
83 protected void SetChannels(notnull
SCR_Faction faction, notnull BaseRadioComponent radio, notnull SCR_VONAutoTuneRoleConfig roleConfig,
int groupId, SCR_EVONAutoTuneFrequency tuneSpecificFrequency = SCR_EVONAutoTuneFrequency.NONE)
85 int transceiversCount = radio.TransceiversCount();
89 if (channel.m_iChannel >= transceiversCount)
93 if (tuneSpecificFrequency != SCR_EVONAutoTuneFrequency.NONE && channel.m_eAutoTuneFrequency != tuneSpecificFrequency)
97 int frequency =
GetFrequency(faction, groupId, channel.m_eAutoTuneFrequency);
100 transceiver.SetFrequency(frequency);
102 #ifdef VON_AUTO_TUNE_DEBUG
103 Print(
"VONAutoTune Set channel:"+channel.m_iChannel+
" frequency:"+frequency+
" freqType:"+
SCR_Enum.GetEnumName(SCR_EVONAutoTuneFrequency, channel.m_eAutoTuneFrequency),
LogLevel.DEBUG);
112 if (autoTuneFrequencyType == SCR_EVONAutoTuneFrequency.SQUAD)
115 if (autoTuneFrequencyType == SCR_EVONAutoTuneFrequency.PLATOON)
118 if (autoTuneFrequencyType == SCR_EVONAutoTuneFrequency.OBJECTIVE_PLATOON)
121 if (autoTuneFrequencyType == SCR_EVONAutoTuneFrequency.COMMANDER)
130 return faction.GetFactionRadioFrequency();
165 return group.GetRadioFrequency();
173 protected BaseRadioComponent
FindFirstRadio(SCR_VONController vonController, ERadioType radioType,
string encryptionKey)
175 array<ref SCR_VONEntry> entries = {};
176 vonController.GetVONEntries(entries);
179 BaseRadioComponent baseRadio;
187 if (baseRadio.GetEncryptionKey() != encryptionKey)
190 SCR_RadioComponent radioComponent = SCR_RadioComponent.Cast(baseRadio.GetOwner().FindComponent(SCR_RadioComponent));
194 if (radioComponent.GetRadioType() == radioType)
238 void Init(notnull
IEntity owner, notnull SCR_VONController vonController)
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
SCR_EGroupRole
Group roles.
void SCR_GroupTaskManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void SCR_Task(IEntitySource src, IEntity parent)
SCR_EVONAutoTuneRole
Player role for auto tune setting.
bool IsPlayerLeader(int playerID)
static Faction GetEntityFaction(notnull IEntity entity)
bool IsPlayerCommander(int playerId)
static int GetLocalPlayerId()
Returns either a valid ID of local player or 0.
ref SCR_VONAutoTuneConfig m_VONAutoTuneConfig
int GetCommanderFrequency(notnull Faction faction)
void Init(notnull IEntity owner, notnull SCR_VONController vonController)
SCR_TaskSystem m_TaskSystem
RplComponent m_RplComponent
SCR_GroupTaskManagerComponent m_GroupTaskManagerComponent
seconds
void SetChannels(notnull SCR_Faction faction, notnull BaseRadioComponent radio, notnull SCR_VONAutoTuneRoleConfig roleConfig, int groupId, SCR_EVONAutoTuneFrequency tuneSpecificFrequency=SCR_EVONAutoTuneFrequency.NONE)
SCR_PlayerController m_PlayerController
SCR_PlayerControllerGroupComponent m_PlayerGroupComponent
void Deinit()
Deinit VON Auto tune.
SCR_GroupsManagerComponent m_GroupsManagerComponent
SCR_VONController m_VONController
void SetRadios(IEntity entity, SCR_EVONAutoTuneFrequency tuneSpecificFrequency=SCR_EVONAutoTuneFrequency.NONE)
void OnControlledEntityChanged(IEntity from, IEntity to)
int GetObjectiveOrPlatoonFrequency(notnull SCR_Faction faction, int groupId)
void Update(float timeSlice)
BaseRadioComponent FindFirstRadio(SCR_VONController vonController, ERadioType radioType, string encryptionKey)
Find first equipped radio by type and encryptionKey.
int GetFrequency(notnull SCR_Faction faction, int groupId, SCR_EVONAutoTuneFrequency autoTuneFrequencyType)
int GetPlatoonFrequency(notnull SCR_Faction faction)
Voice over network entry data class, used for management of communication methods.
VONEntry class for radio entries.
BaseTransceiver GetTransceiver()
Associated transceiver.
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
SCR_FieldOfViewSettings Attribute