diff --git a/addons/api/fnc_addRackToVehicle.sqf b/addons/api/fnc_addRackToVehicle.sqf index f343c6333..ee7105bf0 100644 --- a/addons/api/fnc_addRackToVehicle.sqf +++ b/addons/api/fnc_addRackToVehicle.sqf @@ -121,7 +121,7 @@ private _selectPlayer = { } forEach ([] call CBA_fnc_players); if (isNull _player) then { - WARNING_1("No unit found for condition %1, defaulting to first player",_condition); + WARNING_1("No unit found for condition %1 - defaulting to first player",_condition); _player = ([] call CBA_fnc_players) select 0; }; }; diff --git a/addons/api/fnc_basicMissionSetup.sqf b/addons/api/fnc_basicMissionSetup.sqf index ba4d3ac7e..1baed9ed2 100644 --- a/addons/api/fnc_basicMissionSetup.sqf +++ b/addons/api/fnc_basicMissionSetup.sqf @@ -26,7 +26,7 @@ params [ // Run once if (!isNil QGVAR(basicMissionSetup) && {GVAR(basicMissionSetup)}) exitWith {}; -TRACE_1("enter", _this); +TRACE_1("enter",_this); // Basic setup private _setupRadios = _logic getVariable ["RadioSetup", false]; @@ -102,7 +102,7 @@ private _addRadios = { }; - TRACE_1("Adding Radios", _cleanRadioList); + TRACE_1("Adding Radios",_cleanRadioList); if ((backpack _player == "") && {(["ACRE_PRC77", "ACRE_PRC117F"] arrayIntersect _cleanRadioList) isNotEqualTo []}) then { _player addBackpack "B_AssaultPack_khk"; diff --git a/addons/api/fnc_getBaseRadio.sqf b/addons/api/fnc_getBaseRadio.sqf index ea8985236..670805701 100644 --- a/addons/api/fnc_getBaseRadio.sqf +++ b/addons/api/fnc_getBaseRadio.sqf @@ -19,7 +19,7 @@ params [ ["_radioId", "", [""]] ]; -TRACE_1("", _radioId); +TRACE_1("",_radioId); if ( ([_radioId] call FUNC(isBaseRadio)) ) exitWith { _radioId }; diff --git a/addons/api/fnc_getPresetChannelData.sqf b/addons/api/fnc_getPresetChannelData.sqf index b17484aaf..2ba2e8665 100644 --- a/addons/api/fnc_getPresetChannelData.sqf +++ b/addons/api/fnc_getPresetChannelData.sqf @@ -44,8 +44,8 @@ if (_channelReference isEqualType []) then { private _presetData = [_radioClass, _presetName] call EFUNC(sys_data,getPresetData); if (isNil "_presetData") exitWith { nil }; -private _channels = HASH_GET(_presetData, "channels"); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); +private _channels = HASH_GET(_presetData,"channels"); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); if (isNil "_channel") exitWith { nil }; _channel diff --git a/addons/api/fnc_getPresetChannelField.sqf b/addons/api/fnc_getPresetChannelField.sqf index 03b4c66ac..5f15bc5dd 100644 --- a/addons/api/fnc_getPresetChannelField.sqf +++ b/addons/api/fnc_getPresetChannelField.sqf @@ -48,13 +48,13 @@ _channelNumber = _channelNumber - 1; private _presetData = [_radioClass, _presetName] call EFUNC(sys_data,getPresetData); if (isNil "_presetData") exitWith { nil }; -private _channels = HASH_GET(_presetData, "channels"); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); +private _channels = HASH_GET(_presetData,"channels"); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); private _fieldName = [_radioClass, _fieldName] call FUNC(mapChannelFieldName); -if (!HASH_HASKEY(_channel, _fieldName)) exitWith { nil }; -private _value = HASH_GET(_channel, _fieldName); +if (!HASH_HASKEY(_channel,_fieldName)) exitWith { nil }; +private _value = HASH_GET(_channel,_fieldName); if (isNil "_value") exitWith { nil }; _value diff --git a/addons/api/fnc_initVehicleRacks.sqf b/addons/api/fnc_initVehicleRacks.sqf index 5faf7ed3f..da16f3420 100644 --- a/addons/api/fnc_initVehicleRacks.sqf +++ b/addons/api/fnc_initVehicleRacks.sqf @@ -49,7 +49,7 @@ if (_condition isEqualTo {} && {_vehiclePresetName isNotEqualTo ""}) then { private _index = _players findIf {[_x] call _condition}; if (_index == -1) then { - WARNING_1("No unit found for condition %1, defaulting to first player",_condition); + WARNING_1("No unit found for condition %1 - defaulting to first player",_condition); _index = 0; }; _player = _players select _index; diff --git a/addons/api/fnc_isKindOf.sqf b/addons/api/fnc_isKindOf.sqf index e3a4ddcb7..5636728ae 100644 --- a/addons/api/fnc_isKindOf.sqf +++ b/addons/api/fnc_isKindOf.sqf @@ -29,11 +29,11 @@ if (_parent == "") then { private _isAcre = getNumber (configFile >> "CfgAcreComponents" >> _parent >> "isAcre"); // diag_log text format["_radioId: %1 isAcre: %2", _parent, _isAcre]; -TRACE_2("", _parent, _isAcre); +TRACE_2("",_parent,_isAcre); if (_isAcre == 0) exitWith { false }; -TRACE_2("", _parent, _radioType); +TRACE_2("",_parent,_radioType); if (_parent == _radioType) exitWith { true @@ -49,7 +49,7 @@ if (_parent == _radioType) exitWith { while { _parent != "" } do { if (_parent == _radioType) exitWith { - TRACE_2("", _parent, _radioType); + TRACE_2("",_parent,_radioType); true }; _parent = configName (inheritsFrom ( configFile >> "CfgAcreComponents" >> _parent)); diff --git a/addons/api/fnc_mapChannelFieldName.sqf b/addons/api/fnc_mapChannelFieldName.sqf index ed956d2b5..395b5c1a5 100644 --- a/addons/api/fnc_mapChannelFieldName.sqf +++ b/addons/api/fnc_mapChannelFieldName.sqf @@ -21,9 +21,9 @@ params [ ["_fieldName", "", [""]] ]; -TRACE_1("CALLING", ""); +TRACE_1("CALLING",""); private _baseRadio = [_radioId] call FUNC(getBaseRadio); -TRACE_1("", _baseRadio); +TRACE_1("",_baseRadio); switch _baseRadio do { case "ACRE_PRC148": { if (_fieldName == "description" || _fieldName == "name") then { diff --git a/addons/api/fnc_nameChannels.sqf b/addons/api/fnc_nameChannels.sqf index 85984748e..99c6df929 100644 --- a/addons/api/fnc_nameChannels.sqf +++ b/addons/api/fnc_nameChannels.sqf @@ -20,7 +20,7 @@ FUNC(_channelNamesForPresets) = { params ["_channelNames", "_presetNames"]; - TRACE_1("enter", _this); + TRACE_1("enter",_this); if (_presetNames isNotEqualTo []) then { { if (_x != "") then { @@ -52,7 +52,7 @@ private _channelNamesNoSides = { _presetNames pushBack [_x, _presetName]; } forEach ((call FUNC(getAllRadios)) select 0); - TRACE_1("Configuring radio for presets", _presetNames); + TRACE_1("Configuring radio for presets",_presetNames); [_this, _presetNames] call FUNC(_channelNamesForPresets); }; @@ -64,7 +64,7 @@ private _channelNamesForPresetGroup = { _presetNames pushBack [_x, _presetName]; } forEach ((call FUNC(getAllRadios)) select 0); - TRACE_1("Configuring radio for presets", _presetNames); + TRACE_1("Configuring radio for presets",_presetNames); [_channelNames, _presetNames] call FUNC(_channelNamesForPresets); }; @@ -73,7 +73,7 @@ params ["_logic", "_units", "_activated"]; if (!_activated) exitWith {}; -TRACE_1("enter", _this); +TRACE_1("enter",_this); private _sideNumber = _logic getVariable ["SideSelect", false]; private _channelNames = [ @@ -93,7 +93,7 @@ private _setupSides = false; { if (_x isKindOf QGVAR(basicMissionSetup)) exitWith { _setupSides = _x getVariable ["RadioSetup", false]; - TRACE_1("Dedicated basic mission module, checking sides configuration", _setupSides); + TRACE_1("Dedicated basic mission module - checking sides configuration",_setupSides); }; } forEach (allMissionObjects "logic"); diff --git a/addons/api/fnc_setPresetChannelField.sqf b/addons/api/fnc_setPresetChannelField.sqf index 07a35eb66..da3417c08 100644 --- a/addons/api/fnc_setPresetChannelField.sqf +++ b/addons/api/fnc_setPresetChannelField.sqf @@ -54,7 +54,7 @@ TRACE_1("",_channelNumber); //_channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _presetData = [_radioClass, _presetName] call EFUNC(sys_data,getPresetData); if (isNil "_presetData") exitWith {false}; -TRACE_1("", _presetData); +TRACE_1("",_presetData); private _channels = HASH_GET(_presetData,"channels"); TRACE_1("",_channels); diff --git a/addons/api/fnc_tests.sqf b/addons/api/fnc_tests.sqf index 1868589be..77cf094d5 100644 --- a/addons/api/fnc_tests.sqf +++ b/addons/api/fnc_tests.sqf @@ -21,8 +21,8 @@ private ["_test"]; #define ASSERT_BOOL(val1,val2) (val1 isEqualTo val2) #define ASSERT_STRING(val1,val2) (val1 == val2) #define ASSERT_TYPE(val1,val2) (val2 isEqualType val1) -#define PASS(fncName) PUSH(GVAR(testResults), [ARR_2(QUOTE(fncName),true)]) -#define FAIL(fncName) PUSH(GVAR(testResults), [ARR_2(QUOTE(fncName),false)]) +#define PASS(fncName) PUSH(GVAR(testResults),[ARR_2(QUOTE(fncName),true)]) +#define FAIL(fncName) PUSH(GVAR(testResults),[ARR_2(QUOTE(fncName),false)]) /* diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 7d153bdbf..069f0ab25 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -100,13 +100,13 @@ SQF equivalent of extensions/src/ACRE2Shared/Types.h #define DEFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2) #define GET_STATE(id) ([GVAR(currentRadioId), "getState", id] call EFUNC(sys_data,dataEvent)) -#define SET_STATE(id, val) ([GVAR(currentRadioId), "setState", [id, val]] call EFUNC(sys_data,dataEvent)) -#define SET_STATE_CRIT(id, val) ([GVAR(currentRadioId), "setStateCritical", [id, val]] call EFUNC(sys_data,dataEvent)) -#define GET_STATE_DEF(id, default) ([id, default] call FUNC(getDefaultState)) +#define SET_STATE(id, val) ([GVAR(currentRadioId),"setState",[id,val]] call EFUNC(sys_data,dataEvent)) +#define SET_STATE_CRIT(id, val) ([GVAR(currentRadioId), "setStateCritical",[id,val]] call EFUNC(sys_data,dataEvent)) +#define GET_STATE_DEF(id, default) ([id,default] call FUNC(getDefaultState)) -#define SCRATCH_SET(radioId, key, val) ([radioId, key, val] call EFUNC(sys_data,setScratchData)) -#define SCRATCH_GET(radioId, key) ([radioId, key] call EFUNC(sys_data,getScratchData)) -#define SCRATCH_GET_DEF(radioId, key, defaultVal) ([radioId, key, defaultVal] call EFUNC(sys_data,getScratchData)) +#define SCRATCH_SET(radioId, key, val) ([radioId,key,val] call EFUNC(sys_data,setScratchData)) +#define SCRATCH_GET(radioId, key) ([radioId,key] call EFUNC(sys_data,getScratchData)) +#define SCRATCH_GET_DEF(radioId, key, defaultVal) ([radioId,key,defaultVal] call EFUNC(sys_data,getScratchData)) #define GET_TS3ID(object) (object call { private _ret = (_this getVariable [QGVAR(ts3id), -1]); if (_ret == -1) then { WARNING_1("%1 has no TS3 ID",_this); }; _ret }) @@ -116,16 +116,16 @@ SQF equivalent of extensions/src/ACRE2Shared/Types.h #define HASH_CREATE (call EFUNC(main,fastHashCreate)) #define HASH_DELETE(hash) (ACRE_FAST_HASH_TO_DELETE pushBack hash) #define HASH_HASKEY(hash, key) (!(isNil {hash getVariable key})) -#define HASH_SET(hash, key, val) (hash setVariable [key, val]) +#define HASH_SET(hash, key, val) (hash setVariable [key,val]) #define HASH_GET(hash, key) (hash getVariable key) -#define HASH_REM(hash, key) (hash setVariable [key, nil]) +#define HASH_REM(hash, key) (hash setVariable [key,nil]) #define HASH_COPY(hash) (hash call EFUNC(main,fastHashCopy)) #define HASH_KEYS(hash) (hash call EFUNC(main,fastHashKeys)) #define HASHLIST_CREATELIST(keys) [] #define HASHLIST_CREATEHASH(hashList) HASH_CREATE #define HASHLIST_SELECT(hashList, index) (hashList select index) -#define HASHLIST_SET(hashList, index, value) (hashList set[index, value]) +#define HASHLIST_SET(hashList, index, value) (hashList set[index,value]) #define HASHLIST_PUSH(hashList, value) (hashList pushBack value) #define BASECLASS(radioId) ([radioId] call EFUNC(sys_radio,getRadioBaseClassname)) diff --git a/addons/sys_attenuate/fnc_getAttenuationTurnedOut.sqf b/addons/sys_attenuate/fnc_getAttenuationTurnedOut.sqf index abd6fc68f..9f4c75563 100644 --- a/addons/sys_attenuate/fnc_getAttenuationTurnedOut.sqf +++ b/addons/sys_attenuate/fnc_getAttenuationTurnedOut.sqf @@ -22,7 +22,7 @@ private _attenuationTurnedOut = 0; private _effectType = [_unit] call FUNC(getAttenuationEffectType); if (_effectType isEqualTo "") exitWith {_attenuationTurnedOut}; -private _cachedAttenuation = HASH_GET(GVAR(attenuationTurnedOutCache), _effectType); +private _cachedAttenuation = HASH_GET(GVAR(attenuationTurnedOutCache),_effectType); if (!isNil "_cachedAttenuation") exitWith {_cachedAttenuation}; private _attenuationsEffectsCfg = configFile >> "CfgSoundEffects" >> "AttenuationsEffects"; @@ -34,6 +34,6 @@ if (isNumber (_attenuationCfg)) then { _attenuationTurnedOut = getNumber (_attenuationsEffectsCfg >> "acreDefaultAttenuationTurnedOut"); }; -HASH_SET(GVAR(attenuationTurnedOutCache), _effectType, _attenuationTurnedOut); +HASH_SET(GVAR(attenuationTurnedOutCache),_effectType,_attenuationTurnedOut); _attenuationTurnedOut diff --git a/addons/sys_attenuate/fnc_getVehicleAttenuation.sqf b/addons/sys_attenuate/fnc_getVehicleAttenuation.sqf index 1ab1b7c0f..b6f094113 100644 --- a/addons/sys_attenuate/fnc_getVehicleAttenuation.sqf +++ b/addons/sys_attenuate/fnc_getVehicleAttenuation.sqf @@ -22,7 +22,7 @@ private _attenuation = 0; private _effectType = [_unit] call FUNC(getAttenuationEffectType); if (_effectType isEqualTo "") exitWith {_attenuation}; -private _cachedAttenuation = HASH_GET(GVAR(attenuationCache), _effectType); +private _cachedAttenuation = HASH_GET(GVAR(attenuationCache),_effectType); if (!isNil "_cachedAttenuation") exitWith {_cachedAttenuation}; private _attenuationsEffectsCfg = configFile >> "CfgSoundEffects" >> "AttenuationsEffects"; @@ -34,6 +34,6 @@ if (isNumber (_attenuationCfg)) then { _attenuation = getNumber (_attenuationsEffectsCfg >> "acreDefaultAttenuation"); }; -HASH_SET(GVAR(attenuationCache), _effectType, _attenuation); +HASH_SET(GVAR(attenuationCache),_effectType,_attenuation); _attenuation diff --git a/addons/sys_bf888s/functions/fnc_onChannelKnobPress.sqf b/addons/sys_bf888s/functions/fnc_onChannelKnobPress.sqf index 8bc5a7bef..ffc874404 100644 --- a/addons/sys_bf888s/functions/fnc_onChannelKnobPress.sqf +++ b/addons/sys_bf888s/functions/fnc_onChannelKnobPress.sqf @@ -35,7 +35,7 @@ if (_knob == 0) then { _newChannel = ((_currentChannel + _currentDirection) max 0) min 15; }; -TRACE_2("Channel", _newChannel, _currentChannel); +TRACE_2("Channel",_newChannel,_currentChannel); if (_newChannel != _currentChannel) then { ["setCurrentChannel", _newChannel] call GUI_DATA_EVENT; diff --git a/addons/sys_bf888s/functions/fnc_preset_information.sqf b/addons/sys_bf888s/functions/fnc_preset_information.sqf index fca4a3509..d0c1cf9ab 100644 --- a/addons/sys_bf888s/functions/fnc_preset_information.sqf +++ b/addons/sys_bf888s/functions/fnc_preset_information.sqf @@ -35,9 +35,9 @@ for "_i" from 0 to 15 do { HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); - HASH_SET(_channel,"CTCSSTx", 69.3); - HASH_SET(_channel,"CTCSSRx", 69.3); + HASH_SET(_channel,"channelMode","BASIC"); + HASH_SET(_channel,"CTCSSTx",69.3); + HASH_SET(_channel,"CTCSSRx",69.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"TEK",""); @@ -63,9 +63,9 @@ for "_i" from 16 to 31 do { HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); - HASH_SET(_channel,"CTCSSTx", 69.3); - HASH_SET(_channel,"CTCSSRx", 69.3); + HASH_SET(_channel,"channelMode","BASIC"); + HASH_SET(_channel,"CTCSSTx",69.3); + HASH_SET(_channel,"CTCSSRx",69.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"TEK",""); @@ -91,9 +91,9 @@ for "_i" from 32 to 47 do { HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); - HASH_SET(_channel,"CTCSSTx", 69.3); - HASH_SET(_channel,"CTCSSRx", 69.3); + HASH_SET(_channel,"channelMode","BASIC"); + HASH_SET(_channel,"CTCSSTx",69.3); + HASH_SET(_channel,"CTCSSRx",69.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"TEK",""); @@ -118,9 +118,9 @@ for "_i" from 48 to 63 do { HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); - HASH_SET(_channel,"CTCSSTx", 69.3); - HASH_SET(_channel,"CTCSSRx", 69.3); + HASH_SET(_channel,"channelMode","BASIC"); + HASH_SET(_channel,"CTCSSTx",69.3); + HASH_SET(_channel,"CTCSSRx",69.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"TEK",""); diff --git a/addons/sys_bf888s/functions/fnc_render.sqf b/addons/sys_bf888s/functions/fnc_render.sqf index 244c743da..b132282e8 100644 --- a/addons/sys_bf888s/functions/fnc_render.sqf +++ b/addons/sys_bf888s/functions/fnc_render.sqf @@ -28,7 +28,7 @@ private _currentChannel = _currentAbsChannel; private _currentVolume = GET_STATE("volume"); //from 0 to 1 private _currentVolumeKnobState = round (_currentVolume * 5); -{_x ctrlEnable false;} forEach [RADIO_CTRL(201), RADIO_CTRL(202)]; +{_x ctrlEnable false;} forEach [RADIO_CTRL(201),RADIO_CTRL(202)]; private _currentViewFrame = 0; _currentViewFrame = 0; @@ -40,11 +40,11 @@ _currentViewFrame = 0; RADIO_CTRL(106) ctrlSetText format ["\idi\acre\addons\sys_bf888s\Data\knobs\channel\bf888s_ui_pre_%1.paa", _currentChannel + 1]; RADIO_CTRL(107) ctrlSetText format ["\idi\acre\addons\sys_bf888s\Data\knobs\volume\bf888s_ui_vol_%1.paa", _currentVolumeKnobState]; -RADIO_CTRL(201) ctrlSetTooltip format ["%1: %2", LELSTRING(sys_radio,ui_CurrentChannel), _currentChannel + 1]; -RADIO_CTRL(202) ctrlSetTooltip format ["%1: %2%3", LELSTRING(sys_radio,ui_CurrentVolume), round (_currentVolume * 100), "%"]; +RADIO_CTRL(201) ctrlSetTooltip format ["%1: %2",LELSTRING(sys_radio,ui_CurrentChannel), _currentChannel + 1]; +RADIO_CTRL(202) ctrlSetTooltip format ["%1: %2%3", LELSTRING(sys_radio,ui_CurrentVolume),round (_currentVolume * 100), "%"]; RADIO_CTRL(99999) ctrlSetText QPATHTOF(Data\static\bf888s_ui_backplate.paa); -{_x ctrlEnable true;} forEach [RADIO_CTRL(201), RADIO_CTRL(202)]; +{_x ctrlEnable true;} forEach [RADIO_CTRL(201),RADIO_CTRL(202)]; -TRACE_3("rendering", _currentChannel, _currentVolume, EGVAR(sys_radio,currentRadioDialog)); +TRACE_3("rendering",_currentChannel,_currentVolume,EGVAR(sys_radio,currentRadioDialog)); true diff --git a/addons/sys_bf888s/radio/fnc_getChannelData.sqf b/addons/sys_bf888s/radio/fnc_getChannelData.sqf index 697957823..8c5e00c29 100644 --- a/addons/sys_bf888s/radio/fnc_getChannelData.sqf +++ b/addons/sys_bf888s/radio/fnc_getChannelData.sqf @@ -19,10 +19,10 @@ * Public: No */ -TRACE_1("888S getChannelData", _this); +TRACE_1("888S getChannelData",_this); params ["_radioId", "", "_eventData", "_radioData"]; -private _cachedChannels = SCRATCH_GET_DEF(_radioId, "cachedFullChannels", []); +private _cachedChannels = SCRATCH_GET_DEF(_radioId,"cachedFullChannels",[]); private _return = nil; if (_eventData < (count _cachedChannels)) then { _return = _cachedChannels select _eventData; diff --git a/addons/sys_bf888s/radio/fnc_getChannelDataInternal.sqf b/addons/sys_bf888s/radio/fnc_getChannelDataInternal.sqf index 9e64ba7ef..76916c33e 100644 --- a/addons/sys_bf888s/radio/fnc_getChannelDataInternal.sqf +++ b/addons/sys_bf888s/radio/fnc_getChannelDataInternal.sqf @@ -18,23 +18,23 @@ params ["_channelNumber", "_radioData"]; -private _channels = HASH_GET(_radioData, "channels"); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); +private _channels = HASH_GET(_radioData,"channels"); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); private _return = HASH_CREATE; -HASH_SET(_return, "mode", "singleChannel"); -HASH_SET(_return, "frequencyTX", HASH_GET(_channel, "frequencyTX")); -HASH_SET(_return, "frequencyRX", HASH_GET(_channel, "frequencyRX")); -HASH_SET(_return, "power", HASH_GET(_channel, "power")); -HASH_SET(_return, "CTCSSTx", HASH_GET(_channel, "CTCSSTx")); -HASH_SET(_return, "CTCSSRx", HASH_GET(_channel, "CTCSSRx")); -HASH_SET(_return, "modulation", HASH_GET(_channel, "modulation")); -HASH_SET(_return, "encryption", HASH_GET(_channel, "encryption")); -HASH_SET(_return, "TEK", HASH_GET(_channel, "tek")); -HASH_SET(_return, "trafficRate", HASH_GET(_channel, "trafficRate")); -HASH_SET(_return, "syncLength", HASH_GET(_channel, "phase")); +HASH_SET(_return,"mode","singleChannel"); +HASH_SET(_return,"frequencyTX",HASH_GET(_channel,"frequencyTX")); +HASH_SET(_return,"frequencyRX",HASH_GET(_channel,"frequencyRX")); +HASH_SET(_return,"power",HASH_GET(_channel,"power")); +HASH_SET(_return,"CTCSSTx",HASH_GET(_channel,"CTCSSTx")); +HASH_SET(_return,"CTCSSRx",HASH_GET(_channel,"CTCSSRx")); +HASH_SET(_return,"modulation",HASH_GET(_channel,"modulation")); +HASH_SET(_return,"encryption",HASH_GET(_channel,"encryption")); +HASH_SET(_return,"TEK",HASH_GET(_channel,"tek")); +HASH_SET(_return,"trafficRate",HASH_GET(_channel,"trafficRate")); +HASH_SET(_return,"syncLength",HASH_GET(_channel,"phase")); -TRACE_2("THINGS: ",_return, _channel); +TRACE_2("THINGS: ",_return,_channel); _return diff --git a/addons/sys_bf888s/radio/fnc_getCurrentChannelData.sqf b/addons/sys_bf888s/radio/fnc_getCurrentChannelData.sqf index 4eea3c960..767e2c1b7 100644 --- a/addons/sys_bf888s/radio/fnc_getCurrentChannelData.sqf +++ b/addons/sys_bf888s/radio/fnc_getCurrentChannelData.sqf @@ -25,7 +25,7 @@ private _channelNumber = HASH_GET(_radioData,"currentChannel"); if (isNil "_channelNumber") then { _channelNumber = 0; }; -private _cachedChannels = SCRATCH_GET_DEF(_radioId, "cachedFullChannels", []); +private _cachedChannels = SCRATCH_GET_DEF(_radioId,"cachedFullChannels",[]); private _return = nil; if (_channelNumber < (count _cachedChannels)) then { _return = _cachedChannels select _channelNumber; @@ -36,6 +36,6 @@ if (isNil "_return") then { // _iend = diag_tickTime; // diag_log text format["i: %1", _iend-_istart]; _cachedChannels set[_channelNumber, _return]; - SCRATCH_SET(_radioId, "cachedFullChannels", _cachedChannels); + SCRATCH_SET(_radioId,"cachedFullChannels",_cachedChannels); }; _return diff --git a/addons/sys_bf888s/radio/fnc_getOnOffState.sqf b/addons/sys_bf888s/radio/fnc_getOnOffState.sqf index b3b8ee763..38941f189 100644 --- a/addons/sys_bf888s/radio/fnc_getOnOffState.sqf +++ b/addons/sys_bf888s/radio/fnc_getOnOffState.sqf @@ -21,4 +21,4 @@ params ["", "", "", "_radioData", ""]; -HASH_GET(_radioData, "radioOn") +HASH_GET(_radioData,"radioOn") diff --git a/addons/sys_bf888s/radio/fnc_getState.sqf b/addons/sys_bf888s/radio/fnc_getState.sqf index 4e22cd0da..0add11c2e 100644 --- a/addons/sys_bf888s/radio/fnc_getState.sqf +++ b/addons/sys_bf888s/radio/fnc_getState.sqf @@ -22,4 +22,4 @@ params ["", "", "_eventData", "_radioData", ""]; -HASH_GET(_radioData, _eventData) +HASH_GET(_radioData,_eventData) diff --git a/addons/sys_bf888s/radio/fnc_getStates.sqf b/addons/sys_bf888s/radio/fnc_getStates.sqf index eb0b06ad2..beca6baf6 100644 --- a/addons/sys_bf888s/radio/fnc_getStates.sqf +++ b/addons/sys_bf888s/radio/fnc_getStates.sqf @@ -19,4 +19,4 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); diff --git a/addons/sys_bf888s/radio/fnc_handleEndTransmission.sqf b/addons/sys_bf888s/radio/fnc_handleEndTransmission.sqf index 88d1e6334..a3b7f9402 100644 --- a/addons/sys_bf888s/radio/fnc_handleEndTransmission.sqf +++ b/addons/sys_bf888s/radio/fnc_handleEndTransmission.sqf @@ -27,15 +27,15 @@ private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); _currentTransmissions = _currentTransmissions - [_txId]; if (_currentTransmissions isEqualTo []) then { - private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown) then { if (!isNil "_beeped" && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); }; true diff --git a/addons/sys_bf888s/radio/fnc_handleMultipleTransmissions.sqf b/addons/sys_bf888s/radio/fnc_handleMultipleTransmissions.sqf index 5c52cdc61..7120843c4 100644 --- a/addons/sys_bf888s/radio/fnc_handleMultipleTransmissions.sqf +++ b/addons/sys_bf888s/radio/fnc_handleMultipleTransmissions.sqf @@ -39,31 +39,31 @@ params ["_radioId","","_radios"]; if !([_radioId] call EFUNC(sys_radio,canUnitReceive)) exitWith { [] }; -if (SCRATCH_GET_DEF(_radioId, "PTTDown", false) && {!EGVAR(sys_core,fullDuplex)}) exitWith { [] }; -private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); +if (SCRATCH_GET_DEF(_radioId,"PTTDown",false) && {!EGVAR(sys_core,fullDuplex)}) exitWith { [] }; +private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); private _found = false; private _transmissionsChanged = false; -private _lastSignalTime = SCRATCH_GET_DEF(_radioId, "lastSignalTime", diag_tickTime-2); +private _lastSignalTime = SCRATCH_GET_DEF(_radioId,"lastSignalTime",diag_tickTime-2); if (diag_tickTime - _lastSignalTime > 1) then { - SCRATCH_SET(_radioId, "currentTransmissions", []); + SCRATCH_SET(_radioId,"currentTransmissions",[]); }; -SCRATCH_SET(_radioId, "lastSignalTime", diag_tickTime); +SCRATCH_SET(_radioId,"lastSignalTime",diag_tickTime); -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); if (isNil "_currentTransmissions") then { _currentTransmissions = []; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _transmissions = []; private _sortedRadios = []; private _okRadios = []; -private _lastSortTime = SCRATCH_GET_DEF(_radioId, "lastSortTime", diag_tickTime-4); -private _radioCache = SCRATCH_GET_DEF(_radioId, "currentTransmissionRadioCache", []); +private _lastSortTime = SCRATCH_GET_DEF(_radioId,"lastSortTime",diag_tickTime-4); +private _radioCache = SCRATCH_GET_DEF(_radioId,"currentTransmissionRadioCache",[]); // Restort every 3 seconds no matter what. if (diag_tickTime - _lastSortTime > 3) then { @@ -101,16 +101,16 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent"]; if (_signalData isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; - PUSH(_sorted, [ARR_2(_signalPercent, _forEachIndex)]); - PUSH(_transmissions, _txId); + PUSH(_sorted,[ARR_2(_signalPercent,_forEachIndex)]); + PUSH(_transmissions,_txId); } forEach _radios; _sorted sort false; // descending order { - PUSH(_sortedRadios, (_radios select (_x select 1))); + PUSH(_sortedRadios,(_radios select (_x select 1))); } forEach _sorted; } else { - PUSH(_transmissions, ((_radios select 0) select 1)); + PUSH(_transmissions,((_radios select 0) select 1)); if (((_radios select 0) select 2) isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; _sortedRadios = _radios; }; @@ -118,58 +118,58 @@ if (_transmissionsChanged) then { private _dif = _transmissions - _currentTransmissions; if !(_dif isEqualTo []) then { _currentTransmissions = _transmissions; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _radioRxData = [_radioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); // diag_log text format["%1 NON-CACHED", diag_tickTime]; - if (HASH_GET(_radioRxData, "mode") == "singleChannel") then { + if (HASH_GET(_radioRxData,"mode") == "singleChannel") then { private _hearableTransmissions = []; private _junkTransmissions = []; private _digital = false; { private _txId = _x select 1; private _radioTxData = [_txId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); - if (HASH_GET(_radioRxData, "modulation") == HASH_GET(_radioTxData, "modulation")) then { + if (HASH_GET(_radioRxData,"modulation") == HASH_GET(_radioTxData,"modulation")) then { //diag_log text "MOD OK"; - if (HASH_GET(_radioRxData, "encryption") == 1 && {HASH_GET(_radioTxData, "encryption") == 1}) then { + if (HASH_GET(_radioRxData,"encryption") == 1 && {HASH_GET(_radioTxData,"encryption") == 1}) then { //diag_log text "ENCRYPTED"; - if (HASH_GET(_radioRxData, "TEK") == HASH_GET(_radioTxData, "TEK") && - {HASH_GET(_radioRxData, "trafficRate") == HASH_GET(_radioTxData, "trafficRate")} + if (HASH_GET(_radioRxData,"TEK") == HASH_GET(_radioTxData,"TEK") && + {HASH_GET(_radioRxData,"trafficRate") == HASH_GET(_radioTxData,"trafficRate")} ) then { //diag_log text "DIGITAL CRYPTO!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); _digital = true; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "encryption") == 0 && {HASH_GET(_radioTxData, "encryption") == 0}) then { + if (HASH_GET(_radioRxData,"encryption") == 0 && {HASH_GET(_radioTxData,"encryption") == 0}) then { //diag_log text "PT!"; - if (HASH_GET(_radioRxData, "modulation") == "FM" || {HASH_GET(_radioRxData, "modulation") == "NB"}) then { + if (HASH_GET(_radioRxData,"modulation") == "FM" || {HASH_GET(_radioRxData,"modulation") == "NB"}) then { //diag_log text "ITS FM BABY!"; - if (HASH_GET(_radioRxData, "CTCSSRx") == HASH_GET(_radioTxData, "CTCSSTx") || {HASH_GET(_radioRxData, "CTCSSRx") == 0}) then { + if (HASH_GET(_radioRxData,"CTCSSRx") == HASH_GET(_radioTxData,"CTCSSTx") || {HASH_GET(_radioRxData,"CTCSSRx") == 0}) then { //diag_log text "THE TONES MATCH!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData, "CTCSSRx"), HASH_GET(_radioTxData, "CTCSSTx")]; - PUSH(_junkTransmissions, _x); + //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData,"CTCSSRx"),HASH_GET(_radioTxData,"CTCSSTx")]; + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "modulation") == "AM") then { + if (HASH_GET(_radioRxData,"modulation") == "AM") then { //diag_log text "AM TALK JUNKIE!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } forEach _sortedRadios; @@ -214,45 +214,45 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent","_signalDbM"]; private _channelNum = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _channels = [_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent); - private _channel = HASHLIST_SELECT(_channels, _channelNum); - private _squelch = (-116 - 7) + HASH_GET(_channel, "squelch"); + private _channel = HASHLIST_SELECT(_channels,_channelNum); + private _squelch = (-116 - 7) + HASH_GET(_channel,"squelch"); // diag_log text format["squelch: %1 signal: %2", _squelch, _signalDbM]; if (_signalDbM < _squelch) then { _okRadios = []; - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown) then { if (!isNil "_beeped" && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); } else { if (isNil "_beeped" || {!_beeped}) then { //diag_log "BEEP!"; - SCRATCH_SET(_radioId, "hasBeeped", true); + SCRATCH_SET(_radioId,"hasBeeped",true); private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOn", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; } else { - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown) then { if (!isNil "_beeped" && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); }; // Cache it - SCRATCH_SET(_radioId, "currentTransmissionRadioCache", _okRadios); + SCRATCH_SET(_radioId,"currentTransmissionRadioCache",_okRadios); //Force a recalculation if data is not ready if (_areAllRadiosInitialized) then { - SCRATCH_SET(_radioId, "lastSortTime", diag_tickTime); + SCRATCH_SET(_radioId,"lastSortTime",diag_tickTime); } else { - SCRATCH_SET(_radioId, "lastSortTime", -4); + SCRATCH_SET(_radioId,"lastSortTime",-4); }; } else { _okRadios = _radioCache; diff --git a/addons/sys_bf888s/radio/fnc_handlePTTDown.sqf b/addons/sys_bf888s/radio/fnc_handlePTTDown.sqf index 3895f3247..d89e1210e 100644 --- a/addons/sys_bf888s/radio/fnc_handlePTTDown.sqf +++ b/addons/sys_bf888s/radio/fnc_handlePTTDown.sqf @@ -26,5 +26,5 @@ if (!([_radioId] call EFUNC(sys_radio,canUnitTransmit))) exitWith {false}; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericBeep", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", true); +SCRATCH_SET(_radioId,"PTTDown",true); true diff --git a/addons/sys_bf888s/radio/fnc_handlePTTUp.sqf b/addons/sys_bf888s/radio/fnc_handlePTTUp.sqf index d1ef8264a..5e19eb6ac 100644 --- a/addons/sys_bf888s/radio/fnc_handlePTTUp.sqf +++ b/addons/sys_bf888s/radio/fnc_handlePTTUp.sqf @@ -24,5 +24,5 @@ params ["_radioId", "", "", "", ""]; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", false); +SCRATCH_SET(_radioId,"PTTDown",false); true diff --git a/addons/sys_bf888s/radio/fnc_initializeRadio.sqf b/addons/sys_bf888s/radio/fnc_initializeRadio.sqf index 14020c0d3..a22a54022 100644 --- a/addons/sys_bf888s/radio/fnc_initializeRadio.sqf +++ b/addons/sys_bf888s/radio/fnc_initializeRadio.sqf @@ -20,7 +20,7 @@ * Public: No */ -TRACE_1("INITIALIZING RADIO 888S", _this); +TRACE_1("INITIALIZING RADIO 888S",_this); params ["_radioId", "_event", "_eventData", "_radioData", ""]; @@ -29,7 +29,7 @@ private _presetData = [_baseName, _preset] call EFUNC(sys_data,getPresetData); private _channels = HASH_GET(_presetData,"channels"); private _currentChannels = HASH_GET(_radioData,"channels"); -SCRATCH_SET(_radioId, "currentTransmissions", []); +SCRATCH_SET(_radioId,"currentTransmissions",[]); if (isNil "_currentChannels") then { _currentChannels = []; @@ -38,8 +38,8 @@ if (isNil "_currentChannels") then { for "_i" from 0 to (count _channels)-1 do { private _channelData = HASH_COPY(_channels select _i); - TRACE_1("Setting BF-888S Init Channel Data", _channelData); - PUSH(_currentChannels, _channelData); + TRACE_1("Setting BF-888S Init Channel Data",_channelData); + PUSH(_currentChannels,_channelData); }; HASH_SET(_radioData,"volume",EGVAR(sys_core,defaultRadioVolume)); diff --git a/addons/sys_bf888s/radio/fnc_openGui.sqf b/addons/sys_bf888s/radio/fnc_openGui.sqf index 86f9277e7..d4af1e57b 100644 --- a/addons/sys_bf888s/radio/fnc_openGui.sqf +++ b/addons/sys_bf888s/radio/fnc_openGui.sqf @@ -21,7 +21,7 @@ * Public: No */ -TRACE_1("OPENING GUI", _this); +TRACE_1("OPENING GUI",_this); params ["_radioId", "", "", "", ""]; // Prevent radio from being opened if it is externally used or it is not accessible diff --git a/addons/sys_bf888s/radio/fnc_setChannelData.sqf b/addons/sys_bf888s/radio/fnc_setChannelData.sqf index dcc23de45..c6cc28538 100644 --- a/addons/sys_bf888s/radio/fnc_setChannelData.sqf +++ b/addons/sys_bf888s/radio/fnc_setChannelData.sqf @@ -19,4 +19,4 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); diff --git a/addons/sys_bf888s/radio/fnc_setCurrentChannel.sqf b/addons/sys_bf888s/radio/fnc_setCurrentChannel.sqf index c43917f46..5e5a0f541 100644 --- a/addons/sys_bf888s/radio/fnc_setCurrentChannel.sqf +++ b/addons/sys_bf888s/radio/fnc_setCurrentChannel.sqf @@ -19,7 +19,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["_radioId", "", "_eventData", "_radioData", ""]; private _channelsCount = count ([_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent)) - 1; diff --git a/addons/sys_bf888s/radio/fnc_setState.sqf b/addons/sys_bf888s/radio/fnc_setState.sqf index a1a094747..572042605 100644 --- a/addons/sys_bf888s/radio/fnc_setState.sqf +++ b/addons/sys_bf888s/radio/fnc_setState.sqf @@ -22,4 +22,4 @@ params ["", "", "_eventData", "_radioData", ""]; -HASH_SET(_radioData, _eventData select 0, _eventData select 1); +HASH_SET(_radioData,_eventData select 0,_eventData select 1); diff --git a/addons/sys_bf888s/radio/fnc_setVolume.sqf b/addons/sys_bf888s/radio/fnc_setVolume.sqf index 3de9473dc..8e0344127 100644 --- a/addons/sys_bf888s/radio/fnc_setVolume.sqf +++ b/addons/sys_bf888s/radio/fnc_setVolume.sqf @@ -19,7 +19,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["", "", "_eventData", "_radioData", ""]; diff --git a/addons/sys_components/fnc_attachComplexComponent.sqf b/addons/sys_components/fnc_attachComplexComponent.sqf index 24ca44779..6c580a94f 100644 --- a/addons/sys_components/fnc_attachComplexComponent.sqf +++ b/addons/sys_components/fnc_attachComplexComponent.sqf @@ -53,10 +53,10 @@ if (isNil {_childConnectorType}) exitWith { if (_parentConnectorType == _childConnectorType) then { private _exit = false; - private _parentComponentData = HASH_GET(EGVAR(sys_data,radioData), _parentComponentId); + private _parentComponentData = HASH_GET(EGVAR(sys_data,radioData),_parentComponentId); if (!isNil "_parentComponentData") then { - private _parentConnectorData = HASH_GET(_parentComponentData, "acre_radioConnectionData"); + private _parentConnectorData = HASH_GET(_parentComponentData,"acre_radioConnectionData"); if (!isNil "_parentConnectorData") then { if (count _parentConnectorData > _parentConnector) then { private _test = _parentConnectorData select _parentConnector; @@ -72,7 +72,7 @@ if (_parentConnectorType == _childConnectorType) then { private _childComponentData = HASH_GET(EGVAR(sys_data,radioData),_childComponentId); if (!isNil "_childComponentData") then { - private _childConnectorData = HASH_GET(_childComponentData, "acre_radioConnectionData"); + private _childConnectorData = HASH_GET(_childComponentData,"acre_radioConnectionData"); if (!isNil "_childConnectorData") then { if (count _childConnectorData > _childConnector) then { private _test = _childConnectorData select _childConnector; diff --git a/addons/sys_components/fnc_attachComponentHandler.sqf b/addons/sys_components/fnc_attachComponentHandler.sqf index 4316d084e..19bff1a41 100644 --- a/addons/sys_components/fnc_attachComponentHandler.sqf +++ b/addons/sys_components/fnc_attachComponentHandler.sqf @@ -26,10 +26,10 @@ _data params ["_componentId", "_childConnector", "_parentConnector", "_attribute //_parentConnector - this is the connector on the device being connected -private _connectorData = HASH_GET(_radioData, "acre_radioConnectionData"); +private _connectorData = HASH_GET(_radioData,"acre_radioConnectionData"); if (isNil "_connectorData") then { _connectorData = []; - HASH_SET(_radioData, "acre_radioConnectionData", _connectorData); + HASH_SET(_radioData,"acre_radioConnectionData",_connectorData); }; _connectorData set[_childConnector, [_componentId, _parentConnector, _attributes]]; diff --git a/addons/sys_components/fnc_attachSimpleComponent.sqf b/addons/sys_components/fnc_attachSimpleComponent.sqf index f63330e04..a6fbde49e 100644 --- a/addons/sys_components/fnc_attachSimpleComponent.sqf +++ b/addons/sys_components/fnc_attachSimpleComponent.sqf @@ -35,10 +35,10 @@ private _parentConnectorType = ((getArray(_parentComponentClass >> "connectors") private _childConnectorType = getNumber (_childComponentClass >> "connector"); if (_parentConnectorType == _childConnectorType) then { private _exit = false; - private _parentComponentData = HASH_GET(EGVAR(sys_data,radioData), _parentComponentId); + private _parentComponentData = HASH_GET(EGVAR(sys_data,radioData),_parentComponentId); if (!isNil "_parentComponentData") then { - private _parentConnectorData = HASH_GET(_parentComponentData, "acre_radioConnectionData"); + private _parentConnectorData = HASH_GET(_parentComponentData,"acre_radioConnectionData"); if (!isNil "_parentConnectorData") then { if (count _parentConnectorData > _parentConnector) then { private _test = _parentConnectorData select _parentConnector; diff --git a/addons/sys_components/fnc_connectorConnected.sqf b/addons/sys_components/fnc_connectorConnected.sqf index d70cb5d60..a82562edf 100644 --- a/addons/sys_components/fnc_connectorConnected.sqf +++ b/addons/sys_components/fnc_connectorConnected.sqf @@ -18,9 +18,9 @@ params ["_componentId", "_connector"]; -private _componentData = HASH_GET(EGVAR(sys_data,radioData), _componentId); // Get Radio Data +private _componentData = HASH_GET(EGVAR(sys_data,radioData),_componentId); // Get Radio Data if (isNil "_componentData") exitWith {false}; -_componentData = HASH_GET(_componentData, "acre_radioConnectionData"); // Get Connection Data +_componentData = HASH_GET(_componentData,"acre_radioConnectionData"); // Get Connection Data if (isNil "_componentData") exitWith {false}; private _return = false; diff --git a/addons/sys_components/fnc_detachComponent.sqf b/addons/sys_components/fnc_detachComponent.sqf index 27eea8021..554490944 100644 --- a/addons/sys_components/fnc_detachComponent.sqf +++ b/addons/sys_components/fnc_detachComponent.sqf @@ -26,7 +26,7 @@ private _parentComponentClass = configFile >> "CfgAcreComponents" >> _baseClass; private _parentComponentData = HASH_GET(EGVAR(sys_data,radioData),_parentComponentId); if (!isNil "_parentComponentData") then { - private _parentConnectorData = HASH_GET(_parentComponentData, "acre_radioConnectionData"); + private _parentConnectorData = HASH_GET(_parentComponentData,"acre_radioConnectionData"); if (!isNil "_parentConnectorData") then { if ((count _parentConnectorData) > _parentConnector) then { private _parentConnectedComponentData = _parentConnectorData select _parentConnector; diff --git a/addons/sys_components/fnc_detachComponentHandler.sqf b/addons/sys_components/fnc_detachComponentHandler.sqf index 9e87e7782..bd00e163e 100644 --- a/addons/sys_components/fnc_detachComponentHandler.sqf +++ b/addons/sys_components/fnc_detachComponentHandler.sqf @@ -29,10 +29,10 @@ missionNamespace setVariable [_radioId + "_best_ant", ""]; private _childConnector = _data select 0; // this is the connector on this event's device -private _connectorData = HASH_GET(_radioData, "acre_radioConnectionData"); +private _connectorData = HASH_GET(_radioData,"acre_radioConnectionData"); if (isNil "_connectorData") then { _connectorData = []; - HASH_SET(_radioData, "acre_radioConnectionData", _connectorData); + HASH_SET(_radioData,"acre_radioConnectionData",_connectorData); }; _connectorData set[_childConnector, nil]; diff --git a/addons/sys_components/fnc_findAntenna.sqf b/addons/sys_components/fnc_findAntenna.sqf index f002087cc..03dc2bf1b 100644 --- a/addons/sys_components/fnc_findAntenna.sqf +++ b/addons/sys_components/fnc_findAntenna.sqf @@ -21,11 +21,11 @@ private _foundAntennas = []; private _searchedComponents = []; private _searchFunction = { params ["_componentParentId"]; - PUSH(_searchedComponents, _componentParentId); + PUSH(_searchedComponents,_componentParentId); private _componentData = HASH_GET(EGVAR(sys_data,radioData),_componentParentId); if (!isNil "_componentData") then { - private _connectorData = HASH_GET(_componentData, "acre_radioConnectionData"); + private _connectorData = HASH_GET(_componentData,"acre_radioConnectionData"); if (!isNil "_connectorData") then { { private _connector = _x; @@ -79,7 +79,7 @@ private _searchFunction = { }; private _antennaPos2 = _antennaPos vectorAdd (_antennaDirUp vectorMultiply (getNumber (_componentClass >> "height"))); private _foundAntenna = [_connectedComponent, _componentObject, _antennaPos2, _antennaDir]; - PUSH(_foundAntennas, _foundAntenna); + PUSH(_foundAntennas,_foundAntenna); }; } else { if !(_connectedComponent in _searchedComponents) then { diff --git a/addons/sys_components/fnc_getAllAvailableConnectors.sqf b/addons/sys_components/fnc_getAllAvailableConnectors.sqf index 565ec426f..820cf8e86 100644 --- a/addons/sys_components/fnc_getAllAvailableConnectors.sqf +++ b/addons/sys_components/fnc_getAllAvailableConnectors.sqf @@ -20,7 +20,7 @@ params ["_componentId"]; private _componentData = HASH_GET(EGVAR(sys_data,radioData),_componentId); private _return = nil; if (!isNil "_componentData") then { - private _connectorData = HASH_GET(_componentData, "acre_radioConnectionData"); + private _connectorData = HASH_GET(_componentData,"acre_radioConnectionData"); if (!isNil "_connectorData") then { _return = []; private _componentClass = configFile >> "CfgAcreComponents" >> BASE_CLASS_CONFIG(_componentId); diff --git a/addons/sys_components/fnc_getAllConnectedComponents.sqf b/addons/sys_components/fnc_getAllConnectedComponents.sqf index a6b8e23c2..095ece255 100644 --- a/addons/sys_components/fnc_getAllConnectedComponents.sqf +++ b/addons/sys_components/fnc_getAllConnectedComponents.sqf @@ -20,7 +20,7 @@ params["_componentId"]; private _parentComponentData = HASH_GET(EGVAR(sys_data,radioData),_componentId); private _return = nil; if (!isNil "_parentComponentData") then { - private _parentConnectorData = HASH_GET(_parentComponentData, "acre_radioConnectionData"); + private _parentConnectorData = HASH_GET(_parentComponentData,"acre_radioConnectionData"); if (!isNil "_parentConnectorData") then { _return = []; { diff --git a/addons/sys_components/fnc_getAllConnectors.sqf b/addons/sys_components/fnc_getAllConnectors.sqf index f05066514..b104567bd 100644 --- a/addons/sys_components/fnc_getAllConnectors.sqf +++ b/addons/sys_components/fnc_getAllConnectors.sqf @@ -20,7 +20,7 @@ params["_componentId"]; private _componentData = HASH_GET(EGVAR(sys_data,radioData),_componentId); private _return = nil; if (!isNil "_componentData") then { - private _connectorData = HASH_GET(_componentData, "acre_radioConnectionData"); + private _connectorData = HASH_GET(_componentData,"acre_radioConnectionData"); if(!isNil "_connectorData") then { _return = []; private _componentClass = configFile >> "CfgAcreComponents" >> BASE_CLASS_CONFIG(_componentId); diff --git a/addons/sys_components/fnc_getComponentTree.sqf b/addons/sys_components/fnc_getComponentTree.sqf index 2fc4eb473..f8f085e9c 100644 --- a/addons/sys_components/fnc_getComponentTree.sqf +++ b/addons/sys_components/fnc_getComponentTree.sqf @@ -22,10 +22,10 @@ private _searchFunction = { private _returnTree = []; params ["_componentParentId"]; _searchedComponents pushBack _componentParentId; - private _componentData = HASH_GET(EGVAR(sys_data,radioData), _componentParentId); + private _componentData = HASH_GET(EGVAR(sys_data,radioData),_componentParentId); if (!isNil "_componentData") then { - private _connectorData = HASH_GET(_componentData, "acre_radioConnectionData"); + private _connectorData = HASH_GET(_componentData,"acre_radioConnectionData"); if (!isNil "_connectorData") then { { private _connector = _x; diff --git a/addons/sys_components/fnc_getConnectorSpecification.sqf b/addons/sys_components/fnc_getConnectorSpecification.sqf index 2efd8ad84..7fce21a71 100644 --- a/addons/sys_components/fnc_getConnectorSpecification.sqf +++ b/addons/sys_components/fnc_getConnectorSpecification.sqf @@ -20,7 +20,7 @@ params ["_componentId"]; private _componentData = HASH_GET(EGVAR(sys_data,radioData),_componentId); private _return = nil; if(!isNil "_componentData") then { - private _connectorData = HASH_GET(_componentData, "acre_radioConnectionData"); + private _connectorData = HASH_GET(_componentData,"acre_radioConnectionData"); if(!isNil "_connectorData") then { private _componentClass = configFile >> "CfgAcreComponents" >> BASE_CLASS_CONFIG(_componentId); private _connectors = getArray(_componentClass >> "connectors"); diff --git a/addons/sys_components/fnc_initializeComponent.sqf b/addons/sys_components/fnc_initializeComponent.sqf index 91b55e78e..04c5837d7 100644 --- a/addons/sys_components/fnc_initializeComponent.sqf +++ b/addons/sys_components/fnc_initializeComponent.sqf @@ -24,10 +24,10 @@ params ["_radioId", "", "", "_radioData", "", ""]; private _parentComponentClass = configFile >> "CfgAcreComponents" >> BASE_CLASS_CONFIG(_radioId); -private _connectorData = HASH_GET(_radioData, "acre_radioConnectionData"); +private _connectorData = HASH_GET(_radioData,"acre_radioConnectionData"); if (isNil "_connectorData") then { _connectorData = []; - HASH_SET(_radioData, "acre_radioConnectionData", _connectorData); + HASH_SET(_radioData,"acre_radioConnectionData",_connectorData); }; { // diag_log text format["x: %1", _x]; diff --git a/addons/sys_components/fnc_sendComponentMessage.sqf b/addons/sys_components/fnc_sendComponentMessage.sqf index 14f5bda2a..f13a02467 100644 --- a/addons/sys_components/fnc_sendComponentMessage.sqf +++ b/addons/sys_components/fnc_sendComponentMessage.sqf @@ -23,7 +23,7 @@ private _return = false; private _parentComponentData = HASH_GET(EGVAR(sys_data,radioData),_parentComponentId); if (!isNil "_parentComponentData") then { - private _parentConnectorData = HASH_GET(_parentComponentData, "acre_radioConnectionData"); + private _parentConnectorData = HASH_GET(_parentComponentData,"acre_radioConnectionData"); if (!isNil "_parentConnectorData") then { if ((count _parentConnectorData) > _parentConnector) then { private _parentConnectedComponentData = _parentConnectorData select _parentConnector; @@ -31,7 +31,7 @@ if (!isNil "_parentComponentData") then { private _childComponentId = _parentConnectedComponentData select 0; private _childComponentData = HASH_GET(EGVAR(sys_data,radioData),_childComponentId); if (!isNil "_childComponentData") then { - private _childConnectorData = HASH_GET(_parentComponentData, "acre_radioConnectionData"); + private _childConnectorData = HASH_GET(_parentComponentData,"acre_radioConnectionData"); private _childConnector = -1; { if ((_x select 0) == _parentComponentId && {(_x select 1) == _parentConnector}) exitWith { diff --git a/addons/sys_core/fnc_coreInitPFH.sqf b/addons/sys_core/fnc_coreInitPFH.sqf index 81020dbab..327d29c0e 100644 --- a/addons/sys_core/fnc_coreInitPFH.sqf +++ b/addons/sys_core/fnc_coreInitPFH.sqf @@ -21,7 +21,7 @@ acre_player = player; if (!ACRE_MAP_LOADED || {!ACRE_DATA_SYNCED} || {GVAR(ts3id) == -1}) exitWith {}; -TRACE_1("GOT TS3 ID", GVAR(ts3id)); +TRACE_1("GOT TS3 ID",GVAR(ts3id)); [] call FUNC(utilityFunction); // OK [] call FUNC(muting); @@ -39,5 +39,5 @@ GVAR(speakingHandle) = [DFUNC(speaking), 0.06, []] call CBA_fnc_addPerFrameHandl EGVAR(sys_gui,volumeLevel) = 0.5; ACRE_CORE_INIT = true; -TRACE_1("ACRE CORE INIT", ACRE_CORE_INIT); +TRACE_1("ACRE CORE INIT",ACRE_CORE_INIT); [_this select 1] call CBA_fnc_removePerFrameHandler; diff --git a/addons/sys_core/fnc_getDescriptiveName.sqf b/addons/sys_core/fnc_getDescriptiveName.sqf index 419676c1a..69d8dc0de 100644 --- a/addons/sys_core/fnc_getDescriptiveName.sqf +++ b/addons/sys_core/fnc_getDescriptiveName.sqf @@ -43,7 +43,7 @@ private _maxChannels = [_radioId, "getState", "channels"] call EFUNC(sys_data,da private _text = if (isNil "_maxChannels") then { // Display frequency for single-channel radios (e.g. AN/PRC-77) private _txData = [_radioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); - private _currentFreq = HASH_GET(_txData, "frequencyTX"); + private _currentFreq = HASH_GET(_txData,"frequencyTX"); format ["%1 %2 MHz", _name, _currentFreq]; } else { format [LELSTRING(ace_interact,channelShort), _name, _radioId call EFUNC(api,getRadioChannel)] diff --git a/addons/sys_core/fnc_handleGetClientID.sqf b/addons/sys_core/fnc_handleGetClientID.sqf index 4b0d84f17..37acc55c9 100644 --- a/addons/sys_core/fnc_handleGetClientID.sqf +++ b/addons/sys_core/fnc_handleGetClientID.sqf @@ -21,7 +21,7 @@ params ["_newTs3Id","_netId"]; _newTs3Id = parseNumber _newTs3Id; private _playerObject = objectFromNetId _netId; -TRACE_1("got client ID", _this); +TRACE_1("got client ID",_this); if (_playerObject == acre_player) then { private _resendSpectator = false; if (_newTs3Id != GVAR(ts3id)) then { diff --git a/addons/sys_core/fnc_handleMultiPttKeyPress.sqf b/addons/sys_core/fnc_handleMultiPttKeyPress.sqf index 61604a317..96106d3f6 100644 --- a/addons/sys_core/fnc_handleMultiPttKeyPress.sqf +++ b/addons/sys_core/fnc_handleMultiPttKeyPress.sqf @@ -15,7 +15,7 @@ * Public: No */ -TRACE_1("got ptt press", _this); +TRACE_1("got ptt press",_this); if (ACRE_IS_SPECTATOR) exitWith { true }; diff --git a/addons/sys_core/fnc_localStartSpeaking.sqf b/addons/sys_core/fnc_localStartSpeaking.sqf index 1db10fb6b..0c628b0bb 100644 --- a/addons/sys_core/fnc_localStartSpeaking.sqf +++ b/addons/sys_core/fnc_localStartSpeaking.sqf @@ -18,7 +18,7 @@ * Public: No */ -TRACE_1("LOCAL START SPEAKING ENTER", _this); +TRACE_1("LOCAL START SPEAKING ENTER",_this); params ["", "", "_speakingType", ["_radioId", ""]]; if (!(_speakingType isEqualType 0)) then { _speakingType = parseNumber _speakingType; }; diff --git a/addons/sys_core/fnc_localStopSpeaking.sqf b/addons/sys_core/fnc_localStopSpeaking.sqf index 1c52f82bf..c01d68854 100644 --- a/addons/sys_core/fnc_localStopSpeaking.sqf +++ b/addons/sys_core/fnc_localStopSpeaking.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("LOCAL STOP SPEAKING ENTER", _this); +TRACE_1("LOCAL STOP SPEAKING ENTER",_this); ["acre_stoppedSpeaking", [acre_player, ACRE_LOCAL_BROADCASTING]] call CBA_fnc_localEvent; // [unit, on radio] ACRE_LOCAL_SPEAKING = false; diff --git a/addons/sys_core/fnc_monitorAiPFH.sqf b/addons/sys_core/fnc_monitorAiPFH.sqf index e2353e488..da3917b58 100644 --- a/addons/sys_core/fnc_monitorAiPFH.sqf +++ b/addons/sys_core/fnc_monitorAiPFH.sqf @@ -52,13 +52,13 @@ private _startTime = diag_tickTime; // 1.3 is standing in for the value of selectableCurveScale private _chance = _occlusion * (_multiplier / _distance); - TRACE_4("", _curUnit, _distance, _occlusion, _chance); + TRACE_4("",_curUnit,_distance,_occlusion,_chance); if ((random 1) < _chance) then { - TRACE_2("REVEAL!", _curUnit, acre_player); + TRACE_2("REVEAL!",_curUnit,acre_player); // 15 second block before revealing again. private _lastRevealed = _curUnit getVariable [QGVAR(lastRevealed), -15]; if (_lastRevealed + 15 < time) then { - TRACE_2("Calling reveal event", _curUnit, _hasRevealed); + TRACE_2("Calling reveal event",_curUnit,_hasRevealed); _curUnit setVariable [QGVAR(lastRevealed), time, false]; [QGVAR(onRevealUnit), [acre_player, _curUnit, ACRE_REVEAL_AMOUNT], _curUnit] call CALLSTACK(CBA_fnc_targetEvent); }; diff --git a/addons/sys_core/fnc_onRevealUnit.sqf b/addons/sys_core/fnc_onRevealUnit.sqf index 0a85853dc..eef637c3d 100644 --- a/addons/sys_core/fnc_onRevealUnit.sqf +++ b/addons/sys_core/fnc_onRevealUnit.sqf @@ -19,7 +19,7 @@ params ["_player", "_unit", "_revealAmount"]; -TRACE_1("onRevealUnit", _this); +TRACE_1("onRevealUnit",_this); if (!local _unit) exitWith {false}; diff --git a/addons/sys_core/fnc_processDirectSpeaker.sqf b/addons/sys_core/fnc_processDirectSpeaker.sqf index 0454c24f5..4276228b5 100644 --- a/addons/sys_core/fnc_processDirectSpeaker.sqf +++ b/addons/sys_core/fnc_processDirectSpeaker.sqf @@ -92,5 +92,5 @@ if (GVAR(isDeaf) || {_unit getVariable [QGVAR(isDisabled), false]} || {_underwat private _canUnderstand = [_unit] call FUNC(canUnderstand); private _params = [_speakingType, _id, !_canUnderstand, (_directVolume * GVAR(globalVolume))^3, _emitterPos, _emitterDir]; -TRACE_1("SPEAKING UPDATE", _params); +TRACE_1("SPEAKING UPDATE",_params); _params diff --git a/addons/sys_core/fnc_processRadioSpeaker.sqf b/addons/sys_core/fnc_processRadioSpeaker.sqf index 81884d1d2..e891d988a 100644 --- a/addons/sys_core/fnc_processRadioSpeaker.sqf +++ b/addons/sys_core/fnc_processRadioSpeaker.sqf @@ -49,14 +49,14 @@ if (!GVAR(speaking_cache_valid)) then { _okRadios = (_okRadios select 0) select 1; private _transmittingRadioData = [_radioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); - private _mode = HASH_GET(_transmittingRadioData, "mode"); + private _mode = HASH_GET(_transmittingRadioData,"mode"); _functionName = getText(configFile >> "CfgAcreRadioModes" >> _mode >> "speaking"); - HASH_SET(GVAR(coreCache), "okRadios"+_radioId, _okRadios); - HASH_SET(GVAR(coreCache), "modefunction"+_radioId, _functionName); + HASH_SET(GVAR(coreCache),"okRadios"+_radioId,_okRadios); + HASH_SET(GVAR(coreCache),"modefunction"+_radioId,_functionName); } else { - _okRadios = HASH_GET(GVAR(coreCache), "okRadios"+_radioId); - _functionName = HASH_GET(GVAR(coreCache), "modefunction"+_radioId); + _okRadios = HASH_GET(GVAR(coreCache),"okRadios"+_radioId); + _functionName = HASH_GET(GVAR(coreCache),"modefunction"+_radioId); }; @@ -71,7 +71,7 @@ if (_okRadios isNotEqualTo []) then { #ifdef ENABLE_PERFORMANCE_COUNTERS BEGIN_COUNTER(signal_mode_function); #endif - private _returnData = [_unit, _radioid, acre_player, _x] call CALLSTACK_NAMED((missionNamespace getVariable _functionName), _functionName); + private _returnData = [_unit, _radioid, acre_player, _x] call CALLSTACK_NAMED((missionNamespace getVariable _functionName),_functionName); // DATA STRUCTURE: _returnData = [txRadioId, rxRadioId, signalQuality, distortionModel] #ifdef ENABLE_PERFORMANCE_COUNTERS END_COUNTER(signal_mode_function); diff --git a/addons/sys_core/fnc_remoteStartSpeaking.sqf b/addons/sys_core/fnc_remoteStartSpeaking.sqf index 53c746628..9deb0bd5c 100644 --- a/addons/sys_core/fnc_remoteStartSpeaking.sqf +++ b/addons/sys_core/fnc_remoteStartSpeaking.sqf @@ -32,7 +32,7 @@ CREATE_COUNTER(radio_loop_single_radio); CREATE_COUNTER(hearableRadios); // PREP(processRadioSpeaker); -TRACE_1("START SPEAKING ENTER", _this); +TRACE_1("START SPEAKING ENTER",_this); params ["_speakingId","_languageId","_netId","_speakingType",["_radioId",","]]; if (!(_speakingId isEqualType 0)) then { _speakingId = parseNumber _speakingId; }; @@ -79,13 +79,13 @@ private _result = false; }; if (isNull _unit) exitWith { - WARNING_4("START SPEAKING: acre_player [%1] could not find a player with ID: %2 %3, Speaking Type: %4",acre_player,_speakingId,_netId,_speakingType); + WARNING_4("START SPEAKING: acre_player [%1] could not find a player with ID: %2 %3 - Speaking Type: %4",acre_player,_speakingId,_netId,_speakingType); false }; _unit setVariable [QGVAR(ts3id), _speakingId]; _unit setVariable [QGVAR(languageId), _languageId]; - TRACE_1("unit pos", getPosASL _unit); + TRACE_1("unit pos",getPosASL _unit); private _isMuted = IS_MUTED(_unit); _unit setRandomLip true; @@ -103,7 +103,7 @@ private _result = false; GVAR(speakers) pushBack _unit; private _val = [_netId, _speakingId]; - HASH_SET(GVAR(keyedRadioIds), _radioId, _val); + HASH_SET(GVAR(keyedRadioIds),_radioId,_val); _unit setVariable [QGVAR(currentSpeakingRadio), _radioId]; private _speakerRadio = []; private _nearRadios = [ACRE_LISTENER_POS, NEAR_RADIO_RANGE] call EFUNC(sys_radio,nearRadios); @@ -152,10 +152,10 @@ private _result = false; }; TRACE_1("REMOVING FROM RADIO MICS LIST",GVAR(keyedMicRadios)); REM(GVAR(keyedMicRadios),_unit); - HASH_REM(GVAR(keyedRadioIds), _radioId); + HASH_REM(GVAR(keyedRadioIds),_radioId); }; } else { - TRACE_3("MUTED:", _unit, _isMuted, _netId); + TRACE_3("MUTED:",_unit,_isMuted,_netId); }; diff --git a/addons/sys_core/fnc_remoteStopSpeaking.sqf b/addons/sys_core/fnc_remoteStopSpeaking.sqf index d68efe1c6..abe1f2a5a 100644 --- a/addons/sys_core/fnc_remoteStopSpeaking.sqf +++ b/addons/sys_core/fnc_remoteStopSpeaking.sqf @@ -55,7 +55,7 @@ _speakingId = parseNumber _speakingId; if (_unit != acre_player && {ACRE_SIGNAL_DEBUGGING > 0}) then { private _signalTrace = missionNamespace getVariable [_radioId + "_signal_trace", []]; private _signalStartTime = missionNamespace getVariable [_radioId + "_signal_startTime", diag_tickTime]; - INFO_5("ACRE TX from %1 (on radio %2, distance at end: %3 m), duration %4s: %5",name _unit,_radioId,_unit distance acre_player,diag_tickTime-_signalStartTime,_signalTrace); + INFO_5("ACRE TX from %1 (on radio: %2 distance at end: %3 m) duration %4s: %5",name _unit,_radioId,_unit distance acre_player,diag_tickTime-_signalStartTime,_signalTrace); }; missionNamespace setVariable [_radioId + "_signal_trace", []]; private _okRadios = [[_radioId], ([] call EFUNC(sys_data,getPlayerRadioList)) + GVAR(nearRadios), false] call EFUNC(sys_modes,checkAvailability); @@ -67,8 +67,8 @@ _speakingId = parseNumber _speakingId; } forEach _okRadios; }; }; - if (HASH_HASKEY(GVAR(keyedRadioIds), _radioId)) then { - HASH_REM(GVAR(keyedRadioIds), _radioId); + if (HASH_HASKEY(GVAR(keyedRadioIds),_radioId)) then { + HASH_REM(GVAR(keyedRadioIds),_radioId); }; }; // } else { @@ -86,12 +86,12 @@ _speakingId = parseNumber _speakingId; if (_speakingId in ACRE_SPECTATORS_LIST) then { _found = true; - REM(GVAR(spectatorSpeakers), _speakingId); + REM(GVAR(spectatorSpeakers),_speakingId); }; if (_speakingId in GVAR(godSpeakers)) then { _found = true; - REM(GVAR(godSpeakers), _speakingId); + REM(GVAR(godSpeakers),_speakingId); }; if (!_found) then { diff --git a/addons/sys_core/fnc_speaking.sqf b/addons/sys_core/fnc_speaking.sqf index ec8aa2a25..0ff1d831d 100644 --- a/addons/sys_core/fnc_speaking.sqf +++ b/addons/sys_core/fnc_speaking.sqf @@ -43,9 +43,9 @@ if (GVAR(keyedMicRadios) isNotEqualTo []) then { _playerRadios = [] call EFUNC(sys_data,getPlayerRadioList); _playerRadios = _playerRadios - GVAR(nearRadios); _playerRadios append GVAR(nearRadios); - HASH_SET(GVAR(coreCache), "playerRadios", _playerRadios); + HASH_SET(GVAR(coreCache),"playerRadios",_playerRadios); } else { - _playerRadios = HASH_GET(GVAR(coreCache), "playerRadios"); + _playerRadios = HASH_GET(GVAR(coreCache),"playerRadios"); }; // GVAR(lastRadioTime) = time + ((0.25*(count _playerRadios)) min 1); private _signalHint = ""; @@ -53,7 +53,7 @@ if (GVAR(keyedMicRadios) isNotEqualTo []) then { { private _unit = _x; if (!IS_MUTED(_unit)) then { - TRACE_1("Calling processRadioSpeaker", _unit); + TRACE_1("Calling processRadioSpeaker",_unit); private _returnedRadios = [_unit, _playerRadios] call FUNC(processRadioSpeaker); { @@ -114,13 +114,13 @@ if (GVAR(keyedMicRadios) isNotEqualTo []) then { if (_on == 0) then { _volumeModifier = 0; }; - HASH_SET(GVAR(coreCache), "volume" + _recRadio, _radioVolume); - HASH_SET(GVAR(coreCache), "volumeModifier" + _recRadio, _volumeModifier); - HASH_SET(GVAR(coreCache), "on" + _recRadio, _on); + HASH_SET(GVAR(coreCache),"volume" + _recRadio,_radioVolume); + HASH_SET(GVAR(coreCache),"volumeModifier" + _recRadio,_volumeModifier); + HASH_SET(GVAR(coreCache),"on" + _recRadio,_on); } else { - _radioVolume = HASH_GET(GVAR(coreCache), "volume" + _recRadio); - _volumeModifier = HASH_GET(GVAR(coreCache), "volumeModifier" + _recRadio); - _on = HASH_GET(GVAR(coreCache), "on" + _recRadio); + _radioVolume = HASH_GET(GVAR(coreCache),"volume" + _recRadio); + _volumeModifier = HASH_GET(GVAR(coreCache),"volumeModifier" + _recRadio); + _on = HASH_GET(GVAR(coreCache),"on" + _recRadio); }; if (_on == 1) then { #ifdef ENABLE_PERFORMANCE_COUNTERS @@ -132,9 +132,9 @@ if (GVAR(keyedMicRadios) isNotEqualTo []) then { if (GVAR(fullDuplex) || {(toLower _recRadio) in ACRE_SPECTATOR_RADIOS}) then { _hearableRadios = _sourceRadios; }; - // HASH_SET(GVAR(coreCache), _recRadio + "hmt_cache", _hearableRadios); + // HASH_SET(GVAR(coreCache),_recRadio + "hmt_cache",_hearableRadios); // } else { - // _hearableRadios = HASH_GET(GVAR(coreCache), _recRadio + "hmt_cache"); + // _hearableRadios = HASH_GET(GVAR(coreCache),_recRadio + "hmt_cache"); // }; #ifdef ENABLE_PERFORMANCE_COUNTERS END_COUNTER(handleMultipleTransmissions); @@ -163,10 +163,10 @@ if (GVAR(keyedMicRadios) isNotEqualTo []) then { _on = [_x select 1, "getOnOffState"] call EFUNC(sys_data,dataEvent); if (_on == 1) then { _x params ["_unit", "", "_signalData", "_params"]; - if (!HASH_HASKEY(_compiledParams, netId _unit)) then { - HASH_SET(_compiledParams, netId _unit, []); + if (!HASH_HASKEY(_compiledParams,netId _unit)) then { + HASH_SET(_compiledParams,netId _unit,[]); }; - private _speakingRadios = HASH_GET(_compiledParams, netId _unit); + private _speakingRadios = HASH_GET(_compiledParams,netId _unit); if (_params select 3) then { // speaker / loudspeaker // Possible sound fix: Always double the distance of the radio for hearing purposes // on external speaker to make it 'distant' like a speaker. @@ -217,7 +217,7 @@ if (GVAR(keyedMicRadios) isNotEqualTo []) then { private _unit = objectFromNetId _x; if (!isNull _unit) then { _sentMicRadios pushBack _unit; - private _params = HASH_GET(_compiledParams, _x); + private _params = HASH_GET(_compiledParams,_x); private _canUnderstand = [_unit] call FUNC(canUnderstand); private _paramArray = ["r", GET_TS3ID(_unit), !_canUnderstand, count _params]; _paramArray append (flatten _params); @@ -241,7 +241,7 @@ if (GVAR(keyedMicRadios) isNotEqualTo []) then { if (!isNull _unit) then { if (!IS_MUTED(_unit) && {_unit != acre_player}) then { if (_unit call FUNC(inRange)) then { - TRACE_1("Calling processDirectSpeaker", _unit); + TRACE_1("Calling processDirectSpeaker",_unit); private _params = [_unit] call FUNC(processDirectSpeaker); ["updateSpeakingData", _params] call EFUNC(sys_rpc,callRemoteProcedure); } else { diff --git a/addons/sys_core/fnc_toggleHeadset.sqf b/addons/sys_core/fnc_toggleHeadset.sqf index 8fef800e1..498f50fec 100644 --- a/addons/sys_core/fnc_toggleHeadset.sqf +++ b/addons/sys_core/fnc_toggleHeadset.sqf @@ -15,7 +15,7 @@ * Public: No */ -TRACE_1("enter", _this); +TRACE_1("enter",_this); if (!ACRE_IS_SPECTATOR) then { if (GVAR(lowered)) then { GVAR(lowered) = false; diff --git a/addons/sys_data/XEH_preInit.sqf b/addons/sys_data/XEH_preInit.sqf index 754be4b01..c6615cc00 100644 --- a/addons/sys_data/XEH_preInit.sqf +++ b/addons/sys_data/XEH_preInit.sqf @@ -41,7 +41,7 @@ DFUNC(_hashSerialize) = { private _hash = _this; private _vals = []; private _keys = (allVariables _hash) select { - private _val = HASH_GET(_hash, _x); + private _val = HASH_GET(_hash,_x); if (!isNil "_val") then { if (IS_ARRAY(_val)) then { _val = _val call FUNC(_arraySerialize); diff --git a/addons/sys_data/fnc__processQueue.sqf b/addons/sys_data/fnc__processQueue.sqf index 89ef076ad..8bf72cc9e 100644 --- a/addons/sys_data/fnc__processQueue.sqf +++ b/addons/sys_data/fnc__processQueue.sqf @@ -23,19 +23,19 @@ if (ACRE_DATA_SYNCED && {GVAR(eventQueue) isNotEqualTo []}) then { if ((_x select 4) <= diag_tickTime) then { private _data = (_x select 3) call FUNC(serialize); if ((_x select 5) != "CfgAcreDataInterface") then { - PUSH(_sendEvents, [ARR_5(_x select 0,_x select 1,_x select 2,_data,_x select 5)]); + PUSH(_sendEvents,[ARR_5(_x select 0,_x select 1,_x select 2,_data,_x select 5)]); } else { - PUSH(_sendEvents, [ARR_4(_x select 0,_x select 1,_x select 2,_data)]); + PUSH(_sendEvents,[ARR_4(_x select 0,_x select 1,_x select 2,_data)]); }; } else { - PUSH(_newQueue, _x); + PUSH(_newQueue,_x); }; } forEach GVAR(eventQueue); - TRACE_1("SEND EVENT COUNT", (count _sendEvents)); + TRACE_1("SEND EVENT COUNT",(count _sendEvents)); if (_sendEvents isNotEqualTo []) then { private _id = [] call FUNC(createEventMsgId); - PUSH(GVAR(pendingNetworkEvents), _id); - TRACE_2("SENDING NETWORK EVENT", _id, _sendEvents); + PUSH(GVAR(pendingNetworkEvents),_id); + TRACE_2("SENDING NETWORK EVENT",_id,_sendEvents); [_id, _sendEvents] call FUNC(sendDataEvent); }; GVAR(eventQueue) = _newQueue; diff --git a/addons/sys_data/fnc_addHighPriorityId.sqf b/addons/sys_data/fnc_addHighPriorityId.sqf index cd990d077..e1fc64c80 100644 --- a/addons/sys_data/fnc_addHighPriorityId.sqf +++ b/addons/sys_data/fnc_addHighPriorityId.sqf @@ -30,5 +30,5 @@ for "_i" from 0 to (count GVAR(forceHighPriorityIds))-1 do { }; if (!_found) then { - PUSH(GVAR(forceHighPriorityIds), _id); + PUSH(GVAR(forceHighPriorityIds),_id); }; diff --git a/addons/sys_data/fnc_clientHandleJipData.sqf b/addons/sys_data/fnc_clientHandleJipData.sqf index b7a3299d2..e1bb2bab9 100644 --- a/addons/sys_data/fnc_clientHandleJipData.sqf +++ b/addons/sys_data/fnc_clientHandleJipData.sqf @@ -29,7 +29,7 @@ if (ACRE_DEBUG_DATA_SYNC > 0) then { GVAR(radioData) = (_data select 0) call FUNC(deserialize); EGVAR(sys_server,objectIdRelationTable) = (_data select 1) call FUNC(deserialize); ACRE_DATA_SYNCED = true; -INFO_2("Data Processing. %1 pending events, %2 pending data updates.", count GVAR(pendingSyncEvents), count EGVAR(sys_server,pendingIdRelationUpdates)); +INFO_2("Data Processing. %1 pending events - %2 pending data updates.",count GVAR(pendingSyncEvents),count EGVAR(sys_server,pendingIdRelationUpdates)); { _x call FUNC(onDataChangeEvent); } forEach GVAR(pendingSyncEvents); diff --git a/addons/sys_data/fnc_dataEvent.sqf b/addons/sys_data/fnc_dataEvent.sqf index 59998c089..7a895128a 100644 --- a/addons/sys_data/fnc_dataEvent.sqf +++ b/addons/sys_data/fnc_dataEvent.sqf @@ -51,7 +51,7 @@ private _return = _params call FUNC(acreEvent); // if (_cachedIndex != -1) then { // _return = (_cache select 1) set[_cachedIndex, _return]; // } else { - // _cachedIndex = PUSH((_cache select 0), _event); + // _cachedIndex = PUSH((_cache select 0),_event); // (_cache select 1) set[_cachedIndex, _return]; // }; // }; diff --git a/addons/sys_data/fnc_getRadioState.sqf b/addons/sys_data/fnc_getRadioState.sqf index 2d4c13e3a..bd68ba57a 100644 --- a/addons/sys_data/fnc_getRadioState.sqf +++ b/addons/sys_data/fnc_getRadioState.sqf @@ -28,7 +28,7 @@ if (isNil QEGVAR(sys_server,obelisk)) exitWith { // if we dont own it, we push a CBA event requesting they push latest state, then we get the latest oblix data via the reply event TRACE_1("_radio",_radio); private _state = EGVAR(sys_server,obelisk) getVariable _radio; -TRACE_2("", _radio, _state); +TRACE_2("",_radio,_state); _stateCopy = nil; if (!isNil "_state") then { if (IS_ARRAY(_state)) then { diff --git a/addons/sys_data/fnc_getScratchData.sqf b/addons/sys_data/fnc_getScratchData.sqf index 8c038265e..1714ad124 100644 --- a/addons/sys_data/fnc_getScratchData.sqf +++ b/addons/sys_data/fnc_getScratchData.sqf @@ -18,17 +18,17 @@ params ["_radioId", "_id", ["_default", nil]]; -if (!HASH_HASKEY(GVAR(radioScratchData), _radioId)) exitWith { - HASH_SET(GVAR(radioScratchData), _radioId, HASH_CREATE); - private _data = HASH_GET(GVAR(radioScratchData), _radioId); - HASH_SET(_data, _id, _default); +if (!HASH_HASKEY(GVAR(radioScratchData),_radioId)) exitWith { + HASH_SET(GVAR(radioScratchData),_radioId,HASH_CREATE); + private _data = HASH_GET(GVAR(radioScratchData),_radioId); + HASH_SET(_data,_id,_default); _default }; -private _data = HASH_GET(GVAR(radioScratchData), _radioId); -if (!HASH_HASKEY(_data, _id)) exitWith { - HASH_SET(_data, _id, _default); +private _data = HASH_GET(GVAR(radioScratchData),_radioId); +if (!HASH_HASKEY(_data,_id)) exitWith { + HASH_SET(_data,_id,_default); _default }; -HASH_GET(_data, _id) +HASH_GET(_data,_id) diff --git a/addons/sys_data/fnc_handleSetChannel.sqf b/addons/sys_data/fnc_handleSetChannel.sqf index 9fdafd035..5a635cb7d 100644 --- a/addons/sys_data/fnc_handleSetChannel.sqf +++ b/addons/sys_data/fnc_handleSetChannel.sqf @@ -22,10 +22,10 @@ if (hasInterface) then { if (_remote) then { private _fnc = { params ["_radioId", "_previousOkRadios"]; - if (HASH_HASKEY(EGVAR(sys_core,keyedRadioIds), _radioId)) then { - private _vals = HASH_GET(EGVAR(sys_core,keyedRadioIds), _radioId); + if (HASH_HASKEY(EGVAR(sys_core,keyedRadioIds),_radioId)) then { + private _vals = HASH_GET(EGVAR(sys_core,keyedRadioIds),_radioId); _vals params ["_netId", "_speakingId"]; - HASH_REM(EGVAR(sys_core,keyedRadioIds), _radioId); + HASH_REM(EGVAR(sys_core,keyedRadioIds),_radioId); private _unit = (objectFromNetId _netId); private _languageID = _unit getVariable [QUOTE(EGVAR(core,languageId)),0]; [str _speakingId, _languageID, _netId, "1", _radioId] call EFUNC(sys_core,remoteStartSpeaking); @@ -49,7 +49,7 @@ if (hasInterface) then { private _fnc = { params ["_radioId", "_keyedRadios"]; { - private _vals = HASH_GET(EGVAR(sys_core,keyedRadioIds), _x); + private _vals = HASH_GET(EGVAR(sys_core,keyedRadioIds),_x); _vals params ["_netId", "_speakingId"]; private _unit = objectFromNetId _netId; REM(EGVAR(sys_core,keyedMicRadios),_unit); diff --git a/addons/sys_data/fnc_handleSetData.sqf b/addons/sys_data/fnc_handleSetData.sqf index 9ec9b09bf..3301ddb73 100644 --- a/addons/sys_data/fnc_handleSetData.sqf +++ b/addons/sys_data/fnc_handleSetData.sqf @@ -22,7 +22,7 @@ EGVAR(sys_core,speaking_cache_valid) = false; //missionNamespace setVariable [_radioId+"dataCache", nil]; if (_remote) exitWith { true }; -TRACE_1("SET DATA EVENT ENTER", _this); +TRACE_1("SET DATA EVENT ENTER",_this); private _radioBaseClass = BASE_CLASS_CONFIG(_radioId); @@ -46,8 +46,8 @@ if (isDedicated) exitWith { private _serializedData = _data call FUNC(serialize); private _sendEvents = [[objNull, _radioId, _event, _serializedData, _eventKind]]; private _id = [] call FUNC(createEventMsgId); - PUSH(GVAR(pendingNetworkEvents), _id); - TRACE_2("SENDING dedicated NETWORK EVENT ", _id, _sendEvents); + PUSH(GVAR(pendingNetworkEvents),_id); + TRACE_2("SENDING dedicated NETWORK EVENT ",_id,_sendEvents); [_id, _sendEvents] call FUNC(sendDataEvent); nil }; diff --git a/addons/sys_data/fnc_onDataChangeEvent.sqf b/addons/sys_data/fnc_onDataChangeEvent.sqf index 745e652ef..f0d180b45 100644 --- a/addons/sys_data/fnc_onDataChangeEvent.sqf +++ b/addons/sys_data/fnc_onDataChangeEvent.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("NETWORK DATA EVENT", _this); +TRACE_1("NETWORK DATA EVENT",_this); EGVAR(sys_core,speaking_cache_valid) = false; @@ -34,11 +34,11 @@ if (ACRE_DATA_SYNCED) then { _data = _data call FUNC(deserialize); TRACE_1("NETWORK EVENT",_x); private _params = [_eventKind, _radioId, _event, _data, true]; - TRACE_1("PARAMS 1", _params); + TRACE_1("PARAMS 1",_params); _params call FUNC(processSysEvent); - TRACE_1("PARAMS 2", _params); + TRACE_1("PARAMS 2",_params); _params call FUNC(processRadioEvent); - TRACE_1("PARAMS 3", _params); + TRACE_1("PARAMS 3",_params); if (isServer) then { private _radio = HASH_GET(GVAR(currentRadioStates),_radioId); if (isNil "_radio") then { @@ -49,11 +49,11 @@ if (ACRE_DATA_SYNCED) then { }; } forEach (_this select 2); } else { - TRACE_1("RECIEVED NETWORK EVENT CONFIRMATION", _eventId); + TRACE_1("RECIEVED NETWORK EVENT CONFIRMATION",_eventId); GVAR(pendingNetworkEvents) = GVAR(pendingNetworkEvents) - [_eventId]; }; } else { - PUSH(GVAR(pendingSyncEvents), _this); + PUSH(GVAR(pendingSyncEvents),_this); }; true diff --git a/addons/sys_data/fnc_processRadioEvent.sqf b/addons/sys_data/fnc_processRadioEvent.sqf index 39c4f921a..98cbbb573 100644 --- a/addons/sys_data/fnc_processRadioEvent.sqf +++ b/addons/sys_data/fnc_processRadioEvent.sqf @@ -21,12 +21,12 @@ params ["_eventKind", "_radioId", "_event", ["_data", []], ["_remote", false]]; private _return = nil; -if (!HASH_HASKEY(GVAR(radioData), _radioId)) exitWith { +if (!HASH_HASKEY(GVAR(radioData),_radioId)) exitWith { WARNING_2("Non-existent radio '%1' called %2 radio event!",_radioId,_event); nil }; -private _radioData = HASH_GET(GVAR(radioData), _radioId); +private _radioData = HASH_GET(GVAR(radioData),_radioId); private _cachekey = format ["%1:%2:%3", _eventKind, _radioId, _event]; private _handlerFunction = HASH_GET(GVAR(radioEventCache),_cacheKey); diff --git a/addons/sys_data/fnc_processSysEvent.sqf b/addons/sys_data/fnc_processSysEvent.sqf index f54f5adec..a28963b1f 100644 --- a/addons/sys_data/fnc_processSysEvent.sqf +++ b/addons/sys_data/fnc_processSysEvent.sqf @@ -18,17 +18,17 @@ #define DEBUG_MODE_REBUILD -TRACE_1("SYSTEM EVENT ENTER", _this); +TRACE_1("SYSTEM EVENT ENTER",_this); params ["_eventKind", "_radioId", "_event", ["_data", []], ["_remote", false]]; private _return = nil; -if (!HASH_HASKEY(GVAR(radioData), _radioId)) exitWith { +if (!HASH_HASKEY(GVAR(radioData),_radioId)) exitWith { WARNING_2("Non-existent radio '%1' called %2 system event!",_radioId,_event); nil }; -private _radioData = HASH_GET(GVAR(radioData), _radioId); +private _radioData = HASH_GET(GVAR(radioData),_radioId); private _cachekey = format ["%1:%2:%3", _eventKind, _radioId, _event]; private _handlerFunction = HASH_GET(GVAR(sysEventCache),_cacheKey); diff --git a/addons/sys_data/fnc_setScratchData.sqf b/addons/sys_data/fnc_setScratchData.sqf index 40f185b99..3cfa6d5a7 100644 --- a/addons/sys_data/fnc_setScratchData.sqf +++ b/addons/sys_data/fnc_setScratchData.sqf @@ -18,11 +18,11 @@ params ["_radioId", "_id", "_value"]; -if (!HASH_HASKEY(GVAR(radioScratchData), _radioId)) then { - HASH_SET(GVAR(radioScratchData), _radioId, HASH_CREATE); +if (!HASH_HASKEY(GVAR(radioScratchData),_radioId)) then { + HASH_SET(GVAR(radioScratchData),_radioId,HASH_CREATE); }; -private _data = HASH_GET(GVAR(radioScratchData), _radioId); -HASH_SET(_data, _id, _value); +private _data = HASH_GET(GVAR(radioScratchData),_radioId); +HASH_SET(_data,_id,_value); true diff --git a/addons/sys_data/fnc_sortRadioList.sqf b/addons/sys_data/fnc_sortRadioList.sqf index afd227689..827911d64 100644 --- a/addons/sys_data/fnc_sortRadioList.sqf +++ b/addons/sys_data/fnc_sortRadioList.sqf @@ -24,12 +24,12 @@ private _toRemove = []; private _sortList = _currentRadioList + []; { if (!(_x in _currentRadioList)) then { - PUSH(_toRemove, _x); + PUSH(_toRemove,_x); } else { - REM(_sortList, _x); + REM(_sortList,_x); }; } forEach _prepend; -{ REM(_prepend, _x); } forEach _toRemove; +{ REM(_prepend,_x); } forEach _toRemove; private _return = +_prepend; _return append _sortList; diff --git a/addons/sys_gui/fnc_antennaElevationDisplay.sqf b/addons/sys_gui/fnc_antennaElevationDisplay.sqf index 7530ba62c..5c74697f5 100644 --- a/addons/sys_gui/fnc_antennaElevationDisplay.sqf +++ b/addons/sys_gui/fnc_antennaElevationDisplay.sqf @@ -17,7 +17,7 @@ // Macro instead of func for performance (may be run each frame) #define FNC_SETANTENNAELEVATIONTEXT(theText) \ - private _ctrl = uiNamespace getVariable [ARR_2("ACRE_AntennaElevationInfo", controlNull)]; \ + private _ctrl = uiNamespace getVariable [ARR_2("ACRE_AntennaElevationInfo",controlNull)]; \ if (!isNull _ctrl) then { _ctrl ctrlSetText theText; }; diff --git a/addons/sys_io/fnc_serverReadLoop.sqf b/addons/sys_io/fnc_serverReadLoop.sqf index 98f84e5e2..64e461149 100644 --- a/addons/sys_io/fnc_serverReadLoop.sqf +++ b/addons/sys_io/fnc_serverReadLoop.sqf @@ -34,7 +34,7 @@ if (GVAR(pipeCode) == "1") then { if (_ret isEqualTo "_JERR_NOCONNECT" || {_ret isEqualTo "_JERR_NULL"}) exitWith {}; - TRACE_1("got message", _ret); + TRACE_1("got message",_ret); _ret call CALLSTACK(GVAR(ioEventFnc)); }; // diag_log text format["~~~~~~~~~~~~~~!!!!!!!!!!!!!!!!!!!! READ COUNT: %1", _count]; diff --git a/addons/sys_list/fnc_cycleRadios.sqf b/addons/sys_list/fnc_cycleRadios.sqf index e2c44b6bd..3caa7d7a4 100644 --- a/addons/sys_list/fnc_cycleRadios.sqf +++ b/addons/sys_list/fnc_cycleRadios.sqf @@ -36,16 +36,16 @@ if (!dialog) then { }; private _typeName = getText (configFile >> "CfgAcreComponents" >> _realRadio >> "name"); private _radio = [_typeName, _listInfo, _radioClass]; - TRACE_2("heh", _radioClass, ACRE_ACTIVE_RADIO); + TRACE_2("heh",_radioClass,ACRE_ACTIVE_RADIO); if (_radioClass == ACRE_ACTIVE_RADIO) then { - TRACE_1("found index", _count); + TRACE_1("found index",_count); _newRadioIndex = _count; }; _radios pushBack _radio; _count = _count + 1; } foreach _radioList; - TRACE_1("index was", _newRadioIndex); - TRACE_1("Active was", ACRE_ACTIVE_RADIO); + TRACE_1("index was",_newRadioIndex); + TRACE_1("Active was",ACRE_ACTIVE_RADIO); if ((count _radios) > 1) then { if (_direction == 1) then { if (_newRadioIndex >= (count _radios)-1) then { @@ -60,10 +60,10 @@ if (!dialog) then { _newRadioIndex = _newRadioIndex - 1; }; }; - TRACE_1("radios are", _radios); - TRACE_1("index is", _newRadioIndex); + TRACE_1("radios are",_radios); + TRACE_1("index is",_newRadioIndex); private _activateRadio = _radios select _newRadioIndex; - TRACE_1("Active is now", _activateRadio); + TRACE_1("Active is now",_activateRadio); [(_activateRadio select 2)] call EFUNC(sys_radio,setActiveRadio); ["acre_cycleRadio", (_activateRadio select 0), (_activateRadio select 1), "", 1, GVAR(CycleRadiosColor)] call FUNC(displayHint); }; diff --git a/addons/sys_modes/fnc_checkAvailability.sqf b/addons/sys_modes/fnc_checkAvailability.sqf index c26df38b4..5bb28318e 100644 --- a/addons/sys_modes/fnc_checkAvailability.sqf +++ b/addons/sys_modes/fnc_checkAvailability.sqf @@ -25,9 +25,9 @@ private _foundRadios = []; private _matches = []; private _exit = false; private _radioId1 = _x; - PUSH(_foundRadios, [ARR_2(_radioId1,_matches)]); + PUSH(_foundRadios,[ARR_2(_radioId1,_matches)]); private _radio1Data = [_radioId1, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); - private _mode1 = HASH_GET(_radio1Data, "mode"); + private _mode1 = HASH_GET(_radio1Data,"mode"); private _functionName = getText (configFile >> "CfgAcreRadioModes" >> _mode1 >> "availability"); if (_functionName != "") then { private _function = missionNamespace getVariable _functionName; @@ -36,9 +36,9 @@ private _foundRadios = []; private _on = [_radioId2, "getOnOffState"] call EFUNC(sys_data,dataEvent); private _isAvailable = false; if (_on == 1) then { - _isAvailable = [_radioId1, _radioId2] call CALLSTACK_NAMED(_function, _functionName); + _isAvailable = [_radioId1, _radioId2] call CALLSTACK_NAMED(_function,_functionName); if (_isAvailable) then { - PUSH(_matches, _radioId2); + PUSH(_matches,_radioId2); }; }; if (_isAvailable && {_quick}) exitWith {}; diff --git a/addons/sys_modes/fnc_sc_muting.sqf b/addons/sys_modes/fnc_sc_muting.sqf index 69b874f31..0044dfc8f 100644 --- a/addons/sys_modes/fnc_sc_muting.sqf +++ b/addons/sys_modes/fnc_sc_muting.sqf @@ -21,15 +21,15 @@ params ["_radioId1", "_radioId2"]; private _radioTxData = [_radioId1, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); private _radioRxData = [_radioId2, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); -private _mode1 = HASH_GET(_radioTxData, "mode"); -private _mode2 = HASH_GET(_radioRxData, "mode"); +private _mode1 = HASH_GET(_radioTxData,"mode"); +private _mode2 = HASH_GET(_radioRxData,"mode"); private _match = false; private _modeIsSingleChannel = (_mode1 == "singleChannel") && {_mode1 == _mode2}; private _modeIsSingleChannelPRR = (_mode1 == "singleChannelPRR") && {_mode1 == _mode2}; if (_modeIsSingleChannel || {_modeIsSingleChannelPRR}) then { - private _freq1 = HASH_GET(_radioTxData, "frequencyTX"); - private _freq2 = HASH_GET(_radioRxData, "frequencyRX"); + private _freq1 = HASH_GET(_radioTxData,"frequencyTX"); + private _freq2 = HASH_GET(_radioRxData,"frequencyRX"); if (_freq1 == _freq2) then { _match = true; }; diff --git a/addons/sys_modes/fnc_sc_speaking.sqf b/addons/sys_modes/fnc_sc_speaking.sqf index 1b5da89a1..0e360ca0d 100644 --- a/addons/sys_modes/fnc_sc_speaking.sqf +++ b/addons/sys_modes/fnc_sc_speaking.sqf @@ -21,8 +21,8 @@ params ["", "_txRadioId", "", "_rxRadioId"]; private _txData = [_txRadioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); -private _txFreq = HASH_GET(_txData, "frequencyTX"); -private _txPower = HASH_GET(_txData, "power"); +private _txFreq = HASH_GET(_txData,"frequencyTX"); +private _txPower = HASH_GET(_txData,"power"); private _maxSignal = [0, -993]; diff --git a/addons/sys_modes/fnc_sem70akw_muting.sqf b/addons/sys_modes/fnc_sem70akw_muting.sqf index 554903a0d..f909984b2 100644 --- a/addons/sys_modes/fnc_sem70akw_muting.sqf +++ b/addons/sys_modes/fnc_sem70akw_muting.sqf @@ -18,18 +18,18 @@ params ["_radioIdTX", "_radioIdRX"]; -TRACE_1("SEM70AKWMuting", _this); +TRACE_1("SEM70AKWMuting",_this); private _radioTxData = [_radioIdTX, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); private _radioRxData = [_radioIdRX, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); -private _modeTX = HASH_GET(_radioTxData, "mode"); -private _modeRX = HASH_GET(_radioRxData, "mode"); +private _modeTX = HASH_GET(_radioTxData,"mode"); +private _modeRX = HASH_GET(_radioRxData,"mode"); private _match = false; if (_modeTX == "sem70AKW" && {_modeRX == "sem70AKW"}) then { - private _frequenciesTX = HASH_GET(_radioTxData, "frequencies"); - private _frequenciesRX = HASH_GET(_radioRxData, "frequencies"); + private _frequenciesTX = HASH_GET(_radioTxData,"frequencies"); + private _frequenciesRX = HASH_GET(_radioRxData,"frequencies"); if (_frequenciesTX isEqualTo _frequenciesRX) then { _match = true; diff --git a/addons/sys_modes/fnc_sem70akw_speaking.sqf b/addons/sys_modes/fnc_sem70akw_speaking.sqf index ccde3a2fe..c9ac3ec0b 100644 --- a/addons/sys_modes/fnc_sem70akw_speaking.sqf +++ b/addons/sys_modes/fnc_sem70akw_speaking.sqf @@ -21,8 +21,8 @@ params ["", "_txRadioId", "", "_rxRadioId"]; private _txData = [_txRadioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); -private _txFreq = HASH_GET(_txData, "frequencyTX"); -private _txPower = HASH_GET(_txData, "power"); +private _txFreq = HASH_GET(_txData,"frequencyTX"); +private _txPower = HASH_GET(_txData,"power"); private _maxSignal = [0, -993]; diff --git a/addons/sys_prc117f/farris_menus/Loading.sqf b/addons/sys_prc117f/farris_menus/Loading.sqf index 78ad1b47f..fa51806f0 100644 --- a/addons/sys_prc117f/farris_menus/Loading.sqf +++ b/addons/sys_prc117f/farris_menus/Loading.sqf @@ -43,7 +43,7 @@ DFUNC(Loading_BarFill_end) = { // Turn the radio on [_radioId, "setOnOffState", 1] call EFUNC(sys_data,dataEvent); if (_radioId isEqualTo GVAR(currentRadioId)) then { - private _currentMenu = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + private _currentMenu = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); [_currentMenu] call FUNC(changeMenu); }; }; diff --git a/addons/sys_prc117f/farris_menus/Main.sqf b/addons/sys_prc117f/farris_menus/Main.sqf index 6a607cb04..cbf5448cb 100644 --- a/addons/sys_prc117f/farris_menus/Main.sqf +++ b/addons/sys_prc117f/farris_menus/Main.sqf @@ -47,10 +47,10 @@ GVAR(NoItems) = ["ERROR_NOENTRY", "ERROR_NOENTRY", "", }, // onEntry nil, // onExit { - TRACE_1("ERROR_NOENTRY:onButtonPress", (_this select 1)); + TRACE_1("ERROR_NOENTRY:onButtonPress",(_this select 1)); if (((_this select 1) select 0) == "ENT" || ((_this select 1) select 0) == "CLR") then { - TRACE_1("BACK TO HOME", ""); - private _home = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + TRACE_1("BACK TO HOME",""); + private _home = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); [_home] call FUNC(changeMenu); }; true @@ -70,10 +70,10 @@ GVAR(NOT_IMPLEMENTED) = ["NOT_IMPLEMENTED", "NOT_IMPLEMENTED", "", }, // onEntry nil, // onExit { - TRACE_1("ERROR_NOENTRY:onButtonPress", (_this select 1)); + TRACE_1("ERROR_NOENTRY:onButtonPress",(_this select 1)); if (((_this select 1) select 0) == "ENT" || ((_this select 1) select 0) == "CLR") then { - TRACE_1("BACK TO HOME", ""); - private _home = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + TRACE_1("BACK TO HOME",""); + private _home = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); [_home] call FUNC(changeMenu); }; true @@ -99,7 +99,7 @@ GVAR(VOLUME) = ["VOLUME", "VOLUME", "", private _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; - TRACE_2("Rendering VOLUME-STAGE-1",_volume, _display); + TRACE_2("Rendering VOLUME-STAGE-1",_volume,_display); if (!isNull _display) then { (_display displayCtrl ICON_LOADING) progressSetPosition _volume; (_display displayCtrl ICON_LOADING) ctrlCommit 0; @@ -132,9 +132,9 @@ GVAR(VULOSHOME) = ["VULOSHOME", "VULOSHOME", "", private _volume = GET_STATE("volume"); private _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; - private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID), "receivingSignal", 0); + private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID),"receivingSignal",0); - TRACE_2("Rendering VOLUME-STAGE-1",_volume, _display); + TRACE_2("Rendering VOLUME-STAGE-1",_volume,_display); if (!isNull _display) then { (_display displayCtrl ICON_VOLUME) progressSetPosition _volume; (_display displayCtrl ICON_VOLUME) ctrlCommit 0; @@ -162,9 +162,9 @@ GVAR(VULOSHOME) = ["VULOSHOME", "VULOSHOME", "", [ICON_TRANSMITBAR, true] call FUNC(toggleIcon); //[ICON_TRANSMIT, true] call FUNC(toggleIcon); private _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; - private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID), "receivingSignal", 0); + private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID),"receivingSignal",0); - TRACE_2("Rendering VOLUME-STAGE-1",_volume, _display); + TRACE_2("Rendering VOLUME-STAGE-1",_volume,_display); if (!isNull _display) then { (_display displayCtrl ICON_TRANSMITBAR) progressSetPosition _recStrength; (_display displayCtrl ICON_TRANSMITBAR) ctrlCommit 0; @@ -190,9 +190,9 @@ GVAR(VULOSHOME) = ["VULOSHOME", "VULOSHOME", "", [ICON_TRANSMITBAR, true] call FUNC(toggleIcon); //[ICON_TRANSMIT, true] call FUNC(toggleIcon); private _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; - private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID), "receivingSignal", 0); + private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID),"receivingSignal",0); - TRACE_2("Rendering VOLUME-STAGE-1",_volume, _display); + TRACE_2("Rendering VOLUME-STAGE-1",_volume,_display); if (!isNull _display) then { (_display displayCtrl ICON_TRANSMITBAR) progressSetPosition _recStrength; (_display displayCtrl ICON_TRANSMITBAR) ctrlCommit 0; diff --git a/addons/sys_prc117f/farris_menus/PGM.sqf b/addons/sys_prc117f/farris_menus/PGM.sqf index 0b1861f30..a6bee535d 100644 --- a/addons/sys_prc117f/farris_menus/PGM.sqf +++ b/addons/sys_prc117f/farris_menus/PGM.sqf @@ -21,14 +21,14 @@ DFUNC(CURRENT_RADIO_VALUE) = { private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); - private _value = HASH_GET(_channel, (_this select 0)); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); + private _value = HASH_GET(_channel,(_this select 0)); _value }; DFUNC(CURRENT_RADIO_CHANNEL) = { private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); _channel }; @@ -143,7 +143,7 @@ GVAR(PGM_NORM) = ["PGM_NORM", "PGM_NORM", "", [ { private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; - SCRATCH_SET(GVAR(currentRadioId), "menuNumber", _channelNumber+1); + SCRATCH_SET(GVAR(currentRadioId),"menuNumber",_channelNumber+1); }, // onEntry nil, // onExit. Our parent static display generic event handler handles the 'Next' key nil // We've implemented dynamic button press handlers for static displays @@ -204,22 +204,22 @@ GVAR(PGM_NORM) = ["PGM_NORM", "PGM_NORM", "", ["setCurrentChannel", _channelNumber] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); - //TRACE_3("Retrieving radio information", _channelNumber, _channel, _channels); + //TRACE_3("Retrieving radio information",_channelNumber,_channel,_channels); switch _activeInList do { case 'YES': { _activeInList = true; }; case 'NO': { _activeInList = false; }; default { _activeInList = true; }; }; - HASH_SET(_channel, "active", _activeInList); - HASHLIST_SET(_channels, _channelNumber, _channel); + HASH_SET(_channel,"active",_activeInList); + HASHLIST_SET(_channels,_channelNumber,_channel); - SET_STATE("channels", _channels); + SET_STATE("channels",_channels); - SET_STATE("pgm_preset_number", 0); - SET_STATE("pgm_name", nil); - SET_STATE("pgm_active_in_list", nil); + SET_STATE("pgm_preset_number",0); + SET_STATE("pgm_name",nil); + SET_STATE("pgm_active_in_list",nil); ["PGM_NORM_LOS"] call FUNC(changeMenu); true @@ -243,7 +243,7 @@ GVAR(PGM_NORM_LOS) = ["PGM_NORM_LOS", "PGM_NORM_LOS", "", [ { private _value = GET_RADIO_VALUE("frequencyRX"); - SCRATCH_SET(GVAR(currentRadioId), "menuFrequency", _value); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequency",_value); }, // onEntry nil, // onExit. Our parent static display generic event handler handles the 'Next' key nil // We've implemented dynamic button press handlers for static displays @@ -266,7 +266,7 @@ GVAR(PGM_NORM_LOS) = ["PGM_NORM_LOS", "PGM_NORM_LOS", "", [ { private _value = GET_RADIO_VALUE("frequencyTX"); - SCRATCH_SET(GVAR(currentRadioId), "menuFrequency", _value); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequency",_value); }, // onEntry nil, // onExit. Our parent static display generic event handler handles the 'Next' key nil // We've implemented dynamic button press handlers for static displays @@ -290,8 +290,8 @@ GVAR(PGM_NORM_LOS) = ["PGM_NORM_LOS", "PGM_NORM_LOS", "", { private _value = GET_RADIO_VALUE("rxOnly"); if (_value) then { - SET_STATE("menuSelection", 1); - SCRATCH_SET(GVAR(currentRadioId), "pgm_rx_only", "YES"); + SET_STATE("menuSelection",1); + SCRATCH_SET(GVAR(currentRadioId),"pgm_rx_only","YES"); }; }, nil, @@ -312,26 +312,26 @@ GVAR(PGM_NORM_LOS) = ["PGM_NORM_LOS", "PGM_NORM_LOS", "", private _channelType = GET_STATE("pgm_preset_type"); private _rx = GET_STATE("pgm_rx_freq"); private _tx = GET_STATE("pgm_tx_freq"); - private _rxOnly = SCRATCH_GET(GVAR(currentRadioId), "pgm_rx_only"); + private _rxOnly = SCRATCH_GET(GVAR(currentRadioId),"pgm_rx_only"); if (_rxOnly == "YES") then { _rxOnly = true; } else { _rxOnly = false; }; if (isNil "_rx" || isNil "_tx") exitWith { false }; private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); - //TRACE_3("Retrieving radio information", _channelNumber, _channel, _channels); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); + //TRACE_3("Retrieving radio information",_channelNumber,_channel,_channels); - HASH_SET(_channel, "frequencyRX", _rx); - HASH_SET(_channel, "frequencyTX", _tx); - HASH_SET(_channel, "rxOnly", _rxOnly); + HASH_SET(_channel,"frequencyRX",_rx); + HASH_SET(_channel,"frequencyTX",_tx); + HASH_SET(_channel,"rxOnly",_rxOnly); - HASHLIST_SET(_channels, _channelNumber, _channel); - SET_STATE("channels", _channels); + HASHLIST_SET(_channels,_channelNumber,_channel); + SET_STATE("channels",_channels); - SET_STATE("pgm_tx_freq", nil); - SET_STATE("pgm_rx_freq", nil); - SET_STATE("pgm_rx_only", nil); + SET_STATE("pgm_tx_freq",nil); + SET_STATE("pgm_rx_freq",nil); + SET_STATE("pgm_rx_only",nil); } ], [nil, "COMSEC", "", MENU_ACTION_SUBMENU, ["ERROR_NOENTRY"], nil ], @@ -348,37 +348,37 @@ GVAR(PGM_NORM_LOS) = ["PGM_NORM_LOS", "PGM_NORM_LOS", "", { TRACE_1("Entering tx power",""); private _power = GET_RADIO_VALUE("power"); - SET_STATE("menuSelection", 7); + SET_STATE("menuSelection",7); private _options = MENU_SELECTION_DISPLAYSET(_this) select 0; { private _powerInt = (parseNumber _x) * 1000; - TRACE_2("COMPARE", _powerInt, _power); + TRACE_2("COMPARE",_powerInt,_power); if (_powerInt == _power) exitWith { - TRACE_1("FOUND MATCH", _forEachIndex); - SET_STATE("menuSelection", _forEachIndex); + TRACE_1("FOUND MATCH",_forEachIndex); + SET_STATE("menuSelection",_forEachIndex); }; } forEach _options; }, // onEntry nil, nil, { - TRACE_1("Saving tx selection", ""); + TRACE_1("Saving tx selection",""); // If we are not in user mode, just skip this menu item private _options = MENU_SELECTION_DISPLAYSET(_this) select 0; private _selection = GET_STATE("menuSelection"); private _value = (parseNumber (_options select _selection)) * 1000; - TRACE_2("", _selection, _value); + TRACE_2("",_selection,_value); private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); - HASH_SET(_channel, "power", _value); - TRACE_1("Set radio power", _value); - HASHLIST_SET(_channels, _channelNumber, _channel); - SET_STATE("channels", _channels); + HASH_SET(_channel,"power",_value); + TRACE_1("Set radio power",_value); + HASHLIST_SET(_channels,_channelNumber,_channel); + SET_STATE("channels",_channels); }, nil, nil, @@ -401,19 +401,19 @@ GVAR(PGM_NORM_LOS) = ["PGM_NORM_LOS", "PGM_NORM_LOS", "", { private _value = GET_RADIO_VALUE("name"); _value = (_value + CHANNEL_PADDING_STRING) select [0, CHANNEL_NAME_MAX_LENGTH]; // Make sure we have something at each editindex - SCRATCH_SET(GVAR(currentRadioId), "menuString", _value); + SCRATCH_SET(GVAR(currentRadioId),"menuString",_value); }, { private _value = nil; - _value = GET_STATE_DEF("pgm_name", ""); + _value = GET_STATE_DEF("pgm_name",""); if (_value != "") then { private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); - HASH_SET(_channel, "name", _value); - HASHLIST_SET(_channels, _channelNumber, _channel); - SET_STATE("channels", _channels); + HASH_SET(_channel,"name",_value); + HASHLIST_SET(_channels,_channelNumber,_channel); + SET_STATE("channels",_channels); }; }, nil, diff --git a/addons/sys_prc117f/farris_menus/SQ.sqf b/addons/sys_prc117f/farris_menus/SQ.sqf index 6408da146..df4dc1bbe 100644 --- a/addons/sys_prc117f/farris_menus/SQ.sqf +++ b/addons/sys_prc117f/farris_menus/SQ.sqf @@ -30,10 +30,10 @@ GVAR(SQ_ONLY_AM) = ["SQ_ONLY_AM", "SQ_ONLY_AM", "", }, // onEntry nil, // onExit { - TRACE_1("ERROR_NOENTRY:onButtonPress", (_this select 1)); + TRACE_1("ERROR_NOENTRY:onButtonPress",(_this select 1)); if (((_this select 1) select 0) == "ENT" || ((_this select 1) select 0) == "CLR") then { - TRACE_1("BACK TO HOME", ""); - private _home = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + TRACE_1("BACK TO HOME",""); + private _home = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); [_home] call FUNC(changeMenu); }; true @@ -56,7 +56,7 @@ GVAR(SQ) = ["SQ", "SQ", "Squelch Settings", { // Need to pull the current squelch type and check if its digital currently // As there is no digital currently (and the value is not saved), we are going with OFF all the time - SET_STATE("menuSelection", 1); + SET_STATE("menuSelection",1); }, // onEntry nil, nil @@ -74,7 +74,7 @@ GVAR(SQ) = ["SQ", "SQ", "Squelch Settings", ], { //Call on series completion - private _selectDigital = SCRATCH_GET(GVAR(currentRadioID), "sq_select_digital"); + private _selectDigital = SCRATCH_GET(GVAR(currentRadioID),"sq_select_digital"); switch _selectDigital do { case 'ON': {_selectDigital = true; }; @@ -82,7 +82,7 @@ GVAR(SQ) = ["SQ", "SQ", "Squelch Settings", default {_selectDigital = false; }; }; - SCRATCH_SET(GVAR(currentRadioID), "sq_select_digital", nil); + SCRATCH_SET(GVAR(currentRadioID),"sq_select_digital",nil); if (_selectDigital) exitwith { ["NOT_IMPLEMENTED"] call FUNC(changeMenu); @@ -115,7 +115,7 @@ GVAR(SQ_NO_DIGITAL) = ["SQ_NO_DIGITAL", "SQ_NO_DIGITAL", "", private _mode = ""; private _ctcss = GET_RADIO_VALUE("CTCSSRx"); private _squelch = GET_RADIO_VALUE("squelch"); - SET_STATE("menuSelection", 0); + SET_STATE("menuSelection",0); if (_ctcss > 0) then { _mode = "CTCSS"; @@ -130,8 +130,8 @@ GVAR(SQ_NO_DIGITAL) = ["SQ_NO_DIGITAL", "SQ_NO_DIGITAL", "", { private _modeInt = _x; if (_modeInt == _mode) exitWith { - TRACE_1("FOUND MATCH", _forEachIndex); - SET_STATE("menuSelection", _forEachIndex); + TRACE_1("FOUND MATCH",_forEachIndex); + SET_STATE("menuSelection",_forEachIndex); }; } forEach _options; }, // onEntry, @@ -153,11 +153,11 @@ GVAR(SQ_NO_DIGITAL) = ["SQ_NO_DIGITAL", "SQ_NO_DIGITAL", "", ], { //Call on series completion - private _selectAnalogSquelch = SCRATCH_GET(GVAR(currentRadioID), "sq_select_analog"); + private _selectAnalogSquelch = SCRATCH_GET(GVAR(currentRadioID),"sq_select_analog"); private _channel = GET_CHANNEL_DATA; - private _CTCSS = HASH_GET(_channel, "CTCSSRx"); - private _squelch = HASH_GET(_channel, "squelch"); - private _modulation = HASH_GET(_channel, "modulation"); + private _CTCSS = HASH_GET(_channel,"CTCSSRx"); + private _squelch = HASH_GET(_channel,"squelch"); + private _modulation = HASH_GET(_channel,"modulation"); switch _selectAnalogSquelch do { case 'OFF': {_selectAnalogSquelch = 0; _CTCSS = 0; _squelch = 0; }; @@ -172,11 +172,11 @@ GVAR(SQ_NO_DIGITAL) = ["SQ_NO_DIGITAL", "SQ_NO_DIGITAL", "", ["ERROR_NOENTRY"] call FUNC(changeMenu); }; - HASH_SET(_channel, "CTCSSTx", _CTCSS); - HASH_SET(_channel, "CTCSSRx", _CTCSS); - HASH_SET(_channel, "squelch", _squelch); + HASH_SET(_channel,"CTCSSTx",_CTCSS); + HASH_SET(_channel,"CTCSSRx",_CTCSS); + HASH_SET(_channel,"squelch",_squelch); - SCRATCH_SET(GVAR(currentRadioID), "sq_select_analog", nil); + SCRATCH_SET(GVAR(currentRadioID),"sq_select_analog",nil); if (_selectAnalogSquelch > 1) exitWith { if (_selectAnalogSquelch > 2) exitWith { @@ -195,7 +195,7 @@ GVAR(SQ_NO_DIGITAL) = ["SQ_NO_DIGITAL", "SQ_NO_DIGITAL", "", true }; }; - private _home = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + private _home = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); [_home] call FUNC(changeMenu); true }, @@ -235,9 +235,9 @@ GVAR(SQ_SELECT_SQUELCH) = ["SQ_SELECT_SQUELCH", "SQ_SELECT_SQUELCH", "", ], { //Call on series completion - private _selectSquelch = SCRATCH_GET(GVAR(currentRadioID), "sq_select_squelch"); + private _selectSquelch = SCRATCH_GET(GVAR(currentRadioID),"sq_select_squelch"); private _channel = GET_CHANNEL_DATA; - private _squelch = HASH_GET(_channel, "squelch"); + private _squelch = HASH_GET(_channel,"squelch"); switch _selectSquelch do { case 'LOW': {_selectSquelch = 1; }; @@ -252,9 +252,9 @@ GVAR(SQ_SELECT_SQUELCH) = ["SQ_SELECT_SQUELCH", "SQ_SELECT_SQUELCH", "", ["ERROR_NOENTRY"] call FUNC(changeMenu); }; - HASH_SET(_channel, "squelch", _squelch); + HASH_SET(_channel,"squelch",_squelch); - SCRATCH_SET(GVAR(currentRadioID), "sq_select_squelch", nil); + SCRATCH_SET(GVAR(currentRadioID),"sq_select_squelch",nil); }, "SQ_NO_DIGITAL" @@ -276,15 +276,15 @@ GVAR(SQ_SELECT_CTCSS) = ["SQ_SELECT_CTCSS", "SQ_SELECT_CTCSS", "", { TRACE_1("Entering ctcss value",""); private _ctcss = GET_RADIO_VALUE("CTCSSRx"); - SET_STATE("menuSelection", 0); + SET_STATE("menuSelection",0); private _options = MENU_SELECTION_DISPLAYSET(_this) select 0; { private _ctcssInt = (parseNumber _x); - TRACE_2("COMPARE", _ctcssInt, _ctcss); + TRACE_2("COMPARE",_ctcssInt,_ctcss); if (_ctcssInt == _ctcss) exitWith { - TRACE_1("FOUND MATCH", _forEachIndex); - SET_STATE("menuSelection", _forEachIndex); + TRACE_1("FOUND MATCH",_forEachIndex); + SET_STATE("menuSelection",_forEachIndex); }; } forEach _options; }, // onEntry,, @@ -305,16 +305,16 @@ GVAR(SQ_SELECT_CTCSS) = ["SQ_SELECT_CTCSS", "SQ_SELECT_CTCSS", "", ], { //Call on series completion - private _selectctcss = SCRATCH_GET(GVAR(currentRadioID), "sq_select_ctcss"); + private _selectctcss = SCRATCH_GET(GVAR(currentRadioID),"sq_select_ctcss"); private _channel = GET_CHANNEL_DATA; - private _ctcss = HASH_GET(_channel, "CTCSSRx"); + private _ctcss = HASH_GET(_channel,"CTCSSRx"); _ctcss = parseNumber _selectctcss; - HASH_SET(_channel, "CTCSSRx", _ctcss); - HASH_SET(_channel, "CTCSSTx", _ctcss); - TRACE_1("SERIES COMPLETE ON CTCSS", _ctcss); - SCRATCH_SET(GVAR(currentRadioID), "sq_select_ctcss", nil); + HASH_SET(_channel,"CTCSSRx",_ctcss); + HASH_SET(_channel,"CTCSSTx",_ctcss); + TRACE_1("SERIES COMPLETE ON CTCSS",_ctcss); + SCRATCH_SET(GVAR(currentRadioID),"sq_select_ctcss",nil); false }, "VULOSHOME" diff --git a/addons/sys_prc117f/fnc_closeGui.sqf b/addons/sys_prc117f/fnc_closeGui.sqf index 3f8d6be5d..556d54a28 100644 --- a/addons/sys_prc117f/fnc_closeGui.sqf +++ b/addons/sys_prc117f/fnc_closeGui.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["_radioId", "", "", "", ""]; diff --git a/addons/sys_prc117f/fnc_formatChannelValue.sqf b/addons/sys_prc117f/fnc_formatChannelValue.sqf index c2ccb4952..e78a8eaa4 100644 --- a/addons/sys_prc117f/fnc_formatChannelValue.sqf +++ b/addons/sys_prc117f/fnc_formatChannelValue.sqf @@ -24,7 +24,7 @@ params ["_name", "_value"]; #define SQUELCH_OFF 0 #define SQUELCH_ON 1 -TRACE_1("Formatting", _this); +TRACE_1("Formatting",_this); switch _name do { case "frequency": { @@ -46,7 +46,7 @@ switch _name do { }; case "squelch": { private _channel = GET_CHANNEL_DATA; - private _ctcss = HASH_GET(_channel, "CTCSSRx"); + private _ctcss = HASH_GET(_channel,"CTCSSRx"); if (_value > 0) then { _value = "TONE"; @@ -65,7 +65,7 @@ switch _name do { if !(_value isEqualType "") then { _value = format["%1", _value]; }; -TRACE_1("Output", _value); +TRACE_1("Output",_value); _value @@ -77,10 +77,10 @@ _value HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); HASH_SET(_channel,"name",format["%1-FMVINVOC",str(_i+1)]); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"TEK",1); @@ -90,6 +90,6 @@ _value HASH_SET(_channel,"squelch",3); // 152 specific channel settings - HASH_SET(_channel,"deviation", 8.0); - HASH_SET(_channel,"optionCode", 201); // 200 for AM + HASH_SET(_channel,"deviation",8.0); + HASH_SET(_channel,"optionCode",201); // 200 for AM */ diff --git a/addons/sys_prc117f/fnc_initializeRadio.sqf b/addons/sys_prc117f/fnc_initializeRadio.sqf index 3df3e59f2..e67b92422 100644 --- a/addons/sys_prc117f/fnc_initializeRadio.sqf +++ b/addons/sys_prc117f/fnc_initializeRadio.sqf @@ -24,7 +24,7 @@ private _presetData = [_baseName, _preset] call EFUNC(sys_data,getPresetData); private _channels = HASH_GET(_presetData,"channels"); private _currentChannels = HASH_GET(_radioData,"channels"); -SCRATCH_SET(_radioId, "currentTransmissions", []); +SCRATCH_SET(_radioId,"currentTransmissions",[]); if (isNil "_currentChannels") then { _currentChannels = []; @@ -33,12 +33,12 @@ if (isNil "_currentChannels") then { for "_i" from 0 to (count _channels)-1 do { private _channelData = HASH_COPY((_channels select _i)); - TRACE_1("Setting PRC-117F Init Channel Data", _channelData); - PUSH(_currentChannels, _channelData); + TRACE_1("Setting PRC-117F Init Channel Data",_channelData); + PUSH(_currentChannels,_channelData); }; HASH_SET(_radioData,"volume",EGVAR(sys_core,defaultRadioVolume)); HASH_SET(_radioData,"currentChannel",0); -HASH_SET(_radioData,"radioOn", 1); -HASH_SET(_radioData,"pressedButton", -1); -HASH_SET(_radioData,"powerSource", "BAT"); -HASH_SET(_radioData,"pgm_pa_mode", "ON"); +HASH_SET(_radioData,"radioOn",1); +HASH_SET(_radioData,"pressedButton",-1); +HASH_SET(_radioData,"powerSource","BAT"); +HASH_SET(_radioData,"pgm_pa_mode","ON"); diff --git a/addons/sys_prc117f/fnc_openGui.sqf b/addons/sys_prc117f/fnc_openGui.sqf index 0ae58099f..8484c13d1 100644 --- a/addons/sys_prc117f/fnc_openGui.sqf +++ b/addons/sys_prc117f/fnc_openGui.sqf @@ -20,7 +20,7 @@ * Public: No */ -TRACE_1("OPENING GUI", _this); +TRACE_1("OPENING GUI",_this); params ["_radioId", "", "", "", ""]; // Prevent radio from being opened if it is externally used or it is not accessible @@ -37,7 +37,7 @@ MAIN_DISPLAY call (uiNamespace getVariable "CBA_events_fnc_initDisplayCurator"); private _onState = [GVAR(currentRadioId), "getOnOffState"] call EFUNC(sys_data,dataEvent); if (_onState >= 1) then { - private _currentMenu = GET_STATE_DEF("currentMenu", GVAR(VULOSHOME)); + private _currentMenu = GET_STATE_DEF("currentMenu",GVAR(VULOSHOME)); [_currentMenu] call FUNC(changeMenu); } else { //[GVAR(LOADING)] call FUNC(changeMenu); diff --git a/addons/sys_prc117f/fnc_preset_information.sqf b/addons/sys_prc117f/fnc_preset_information.sqf index c86674eab..53d2c144e 100644 --- a/addons/sys_prc117f/fnc_preset_information.sqf +++ b/addons/sys_prc117f/fnc_preset_information.sqf @@ -31,7 +31,7 @@ for "_i" from 0 to 99 do { }; } forEach _usedPresetFrequencies; if (_ok || (count _usedPresetFrequencies) == 0) then { - PUSH(_usedPresetFrequencies, _frequency); + PUSH(_usedPresetFrequencies,_frequency); }; }; // The above frequency generation is taken from the 148 so we match. @@ -41,23 +41,23 @@ for "_i" from 0 to 99 do { HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",20000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); private _desc = format["NET%1",([_i+1, 2] call CBA_fnc_formatNumber)]; HASH_SET(_channel,"name",_desc); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"TEK",1); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"syncLength",256); // 117 specific channel settings - HASH_SET(_channel,"squelch", 3); - HASH_SET(_channel,"deviation", 8.0); - HASH_SET(_channel,"optionCode", 201); // 200 for AM - HASH_SET(_channel,"rxOnly", false); - HASH_SET(_channel,"active", true); - HASHLIST_PUSH(_channels, _channel); + HASH_SET(_channel,"squelch",3); + HASH_SET(_channel,"deviation",8.0); + HASH_SET(_channel,"optionCode",201); // 200 for AM + HASH_SET(_channel,"rxOnly",false); + HASH_SET(_channel,"active",true); + HASHLIST_PUSH(_channels,_channel); }; HASH_SET(_presetData,"channels",_channels); ["ACRE_PRC117F","default",_presetData] call EFUNC(sys_data,registerRadioPreset); @@ -77,7 +77,7 @@ for "_i" from 0 to 99 do { }; } forEach _usedPresetFrequencies; if (_ok || (count _usedPresetFrequencies) == 0) then { - PUSH(_usedPresetFrequencies, _frequency); + PUSH(_usedPresetFrequencies,_frequency); }; }; // The above frequency generation is taken from the 148 so we match. @@ -87,23 +87,23 @@ for "_i" from 0 to 99 do { HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",20000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); private _desc = format["NET%1",([_i+1, 2] call CBA_fnc_formatNumber)]; HASH_SET(_channel,"name",_desc); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"TEK",1); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"syncLength",256); // 117 specific channel settings - HASH_SET(_channel,"squelch", 3); - HASH_SET(_channel,"deviation", 8.0); - HASH_SET(_channel,"optionCode", 201); // 200 for AM - HASH_SET(_channel,"rxOnly", false); - HASH_SET(_channel,"active", true); - HASHLIST_PUSH(_channels, _channel); + HASH_SET(_channel,"squelch",3); + HASH_SET(_channel,"deviation",8.0); + HASH_SET(_channel,"optionCode",201); // 200 for AM + HASH_SET(_channel,"rxOnly",false); + HASH_SET(_channel,"active",true); + HASHLIST_PUSH(_channels,_channel); }; HASH_SET(_presetData,"channels",_channels); ["ACRE_PRC117F","default2",_presetData] call EFUNC(sys_data,registerRadioPreset); @@ -122,7 +122,7 @@ for "_i" from 0 to 99 do { }; } forEach _usedPresetFrequencies; if (_ok || (count _usedPresetFrequencies) == 0) then { - PUSH(_usedPresetFrequencies, _frequency); + PUSH(_usedPresetFrequencies,_frequency); }; }; // The above frequency generation is taken from the 148 so we match. @@ -132,23 +132,23 @@ for "_i" from 0 to 99 do { HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",20000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); private _desc = format["NET%1",([_i+1, 2] call CBA_fnc_formatNumber)]; HASH_SET(_channel,"name",_desc); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"TEK",1); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"syncLength",256); // 117 specific channel settings - HASH_SET(_channel,"squelch", 3); - HASH_SET(_channel,"deviation", 8.0); - HASH_SET(_channel,"optionCode", 201); // 200 for AM - HASH_SET(_channel,"rxOnly", false); - HASH_SET(_channel,"active", true); - HASHLIST_PUSH(_channels, _channel); + HASH_SET(_channel,"squelch",3); + HASH_SET(_channel,"deviation",8.0); + HASH_SET(_channel,"optionCode",201); // 200 for AM + HASH_SET(_channel,"rxOnly",false); + HASH_SET(_channel,"active",true); + HASHLIST_PUSH(_channels,_channel); }; HASH_SET(_presetData,"channels",_channels); ["ACRE_PRC117F","default3",_presetData] call EFUNC(sys_data,registerRadioPreset); @@ -167,7 +167,7 @@ for "_i" from 0 to 99 do { }; } forEach _usedPresetFrequencies; if (_ok || (count _usedPresetFrequencies) == 0) then { - PUSH(_usedPresetFrequencies, _frequency); + PUSH(_usedPresetFrequencies,_frequency); }; }; // The above frequency generation is taken from the 148 so we match. @@ -177,23 +177,23 @@ for "_i" from 0 to 99 do { HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",20000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); private _desc = format["NET%1",([_i+1, 2] call CBA_fnc_formatNumber)]; HASH_SET(_channel,"name",_desc); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"TEK",1); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"syncLength",256); // 117 specific channel settings - HASH_SET(_channel,"squelch", 3); - HASH_SET(_channel,"deviation", 8.0); - HASH_SET(_channel,"optionCode", 201); // 200 for AM - HASH_SET(_channel,"rxOnly", false); - HASH_SET(_channel,"active", true); - HASHLIST_PUSH(_channels, _channel); + HASH_SET(_channel,"squelch",3); + HASH_SET(_channel,"deviation",8.0); + HASH_SET(_channel,"optionCode",201); // 200 for AM + HASH_SET(_channel,"rxOnly",false); + HASH_SET(_channel,"active",true); + HASHLIST_PUSH(_channels,_channel); }; HASH_SET(_presetData,"channels",_channels); ["ACRE_PRC117F","default4",_presetData] call EFUNC(sys_data,registerRadioPreset); diff --git a/addons/sys_prc117f/fnc_render.sqf b/addons/sys_prc117f/fnc_render.sqf index 7ee4cee4b..c2823e4b9 100644 --- a/addons/sys_prc117f/fnc_render.sqf +++ b/addons/sys_prc117f/fnc_render.sqf @@ -24,10 +24,10 @@ if (_this isNotEqualTo []) then { _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; }; -private _knobPosition = GET_STATE_DEF("knobPosition", 1); +private _knobPosition = GET_STATE_DEF("knobPosition",1); private _knobImageStr = [_knobPosition, 2, 0] call CBA_fnc_formatNumber; _knobImageStr = format ["\idi\acre\addons\sys_prc117f\Data\knobs\switch\prc117f_ui_swtch1_%1.paa", _knobImageStr]; -TRACE_1("Setting knob image", _knobImageStr); +TRACE_1("Setting knob image",_knobImageStr); (_display displayCtrl ICON_KNOB) ctrlSetText _knobImageStr; (_display displayCtrl ICON_KNOB) ctrlCommit 0; diff --git a/addons/sys_prc117f/menus/fnc_callEntryFunctor.sqf b/addons/sys_prc117f/menus/fnc_callEntryFunctor.sqf index ad2a63b15..453a05572 100644 --- a/addons/sys_prc117f/menus/fnc_callEntryFunctor.sqf +++ b/addons/sys_prc117f/menus/fnc_callEntryFunctor.sqf @@ -18,7 +18,7 @@ params ["_menu"]; -TRACE_1("enter", _menu); +TRACE_1("enter",_menu); private _ret = false; if (!isNil "_menu" && {(count _menu) > 5}) then { diff --git a/addons/sys_prc117f/menus/fnc_callRenderFunctor.sqf b/addons/sys_prc117f/menus/fnc_callRenderFunctor.sqf index 0119b4bd7..9895567da 100644 --- a/addons/sys_prc117f/menus/fnc_callRenderFunctor.sqf +++ b/addons/sys_prc117f/menus/fnc_callRenderFunctor.sqf @@ -17,7 +17,7 @@ */ params ["_menu"]; -TRACE_1("enter", _menu); +TRACE_1("enter",_menu); private _ret = false; if (!isNil "_menu" && {(count _menu) > 5}) then { diff --git a/addons/sys_prc117f/menus/fnc_changeMenu.sqf b/addons/sys_prc117f/menus/fnc_changeMenu.sqf index 90bdd7321..f8f534686 100644 --- a/addons/sys_prc117f/menus/fnc_changeMenu.sqf +++ b/addons/sys_prc117f/menus/fnc_changeMenu.sqf @@ -16,13 +16,13 @@ * Public: No */ -TRACE_1("changeMenu ENTER", ""); +TRACE_1("changeMenu ENTER",""); params ["_newMenu"]; // clear menu data -SET_STATE("menuSelection", 0); +SET_STATE("menuSelection",0); // // @@ -31,35 +31,35 @@ SCRATCH_SET(GVAR(currentRadioId),"menuEntry",true); // Set the state if (!isNil "_oldMenu") then { if (_oldMenu isEqualType "") then { - _oldMenu = HASH_GET(GVAR(Menus), _oldMenu); + _oldMenu = HASH_GET(GVAR(Menus),_oldMenu); }; if (!isNil "_oldMenu") then { - TRACE_1("changeMenu calling complete", MENU_DISPLAYNAME(_oldMenu)); + TRACE_1("changeMenu calling complete",MENU_DISPLAYNAME(_oldMenu)); [_oldMenu] call FUNC(callCompleteFunctor); private _menuId = MENU_ID(_oldMenu); - if (!isNil "_menuId") then { SET_STATE("lastMenu", _menuId); } else { SET_STATE("lastMenu", _oldMenu); }; + if (!isNil "_menuId") then { SET_STATE("lastMenu",_menuId); } else { SET_STATE("lastMenu",_oldMenu); }; }; }; // Set the state if (_newMenu isEqualType "") then { if (_newMenu == "HOME") then { - _newMenu = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + _newMenu = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); }; if (_newMenu isEqualType "") then { - _newMenu = HASH_GET(GVAR(Menus), _newMenu); + _newMenu = HASH_GET(GVAR(Menus),_newMenu); }; }; -TRACE_1("CHANGING MENU", _newMenu); +TRACE_1("CHANGING MENU",_newMenu); if (isNil "_newMenu") then { // Fall back worst case on the VULOS home if we fucked up royally somehow _newMenu = GVAR(VULOSHOME); }; private _menuId = MENU_ID(_newMenu); -if (!isNil "_menuId") then { SET_STATE("currentMenu", _menuId); } else { SET_STATE("currentMenu", _newMenu); }; +if (!isNil "_menuId") then { SET_STATE("currentMenu",_menuId); } else { SET_STATE("currentMenu",_newMenu); }; [_newMenu] call FUNC(callEntryFunctor); [_newMenu, _oldMenu] call FUNC(renderMenu); -SCRATCH_SET(GVAR(currentRadioId), "menuEntry", false); +SCRATCH_SET(GVAR(currentRadioId),"menuEntry",false); diff --git a/addons/sys_prc117f/menus/fnc_changeMode.sqf b/addons/sys_prc117f/menus/fnc_changeMode.sqf index e6308c3a3..17f96ed64 100644 --- a/addons/sys_prc117f/menus/fnc_changeMode.sqf +++ b/addons/sys_prc117f/menus/fnc_changeMode.sqf @@ -16,19 +16,19 @@ * Public: No */ -TRACE_1("changeMode", _this); +TRACE_1("changeMode",_this); -private _mode = GET_STATE_DEF("knobPosition", 1); +private _mode = GET_STATE_DEF("knobPosition",1); if (_mode == 0) then { - TRACE_2("Turning radio off!", _mode, GVAR(currentRadioId)); + TRACE_2("Turning radio off!",_mode,GVAR(currentRadioId)); [GVAR(currentRadioId), "setOnOffState", 0] call EFUNC(sys_data,dataEvent); private _onOffState = [GVAR(currentRadioId), "getOnOffState"] call EFUNC(sys_data,dataEvent); - TRACE_1("TEST", _onOffState); + TRACE_1("TEST",_onOffState); [GVAR(OFF)] call FUNC(changeMenu); } else { private _onOffState = [GVAR(currentRadioId), "getOnOffState"] call EFUNC(sys_data,dataEvent); - TRACE_2("State", _mode, _onOffState); + TRACE_2("State",_mode,_onOffState); if (_onOffState >= 1) then { switch _mode do { case 1: { diff --git a/addons/sys_prc117f/menus/fnc_changeValueAck.sqf b/addons/sys_prc117f/menus/fnc_changeValueAck.sqf index e7ed440e3..568fc2414 100644 --- a/addons/sys_prc117f/menus/fnc_changeValueAck.sqf +++ b/addons/sys_prc117f/menus/fnc_changeValueAck.sqf @@ -20,7 +20,7 @@ DFUNC(changeValueAck_End) = { params ["_radioId"]; TRACE_1("",_this); if (diag_tickTime > GVAR(changeValueAckTimer)) then { - private _lastMenu = SCRATCH_GET_DEF(_radioId, "lastMenu", nil); + private _lastMenu = SCRATCH_GET_DEF(_radioId,"lastMenu",nil); if (isNil "_lastMenu") then { _lastMenu = GVAR(VULOSHOME); }; if (!isNil QEGVAR(sys_radio,currentRadioDialog)) then { @@ -53,13 +53,13 @@ if (EGVAR(sys_radio,currentRadioDialog) != GVAR(currentRadioId)) exitWith { [] call FUNC(clearDisplay); -TRACE_2("ENTER", _valueType, _value); +TRACE_2("ENTER",_valueType,_value); switch _valueType do { case 'VOLUME': { - private _lastMenu = SCRATCH_GET_DEF(GVAR(currentRadioId), "lastMenu", nil); + private _lastMenu = SCRATCH_GET_DEF(GVAR(currentRadioId),"lastMenu",nil); if (isNil "_lastMenu") then { - SCRATCH_SET(GVAR(currentRadioId), "lastMenu", _menu); + SCRATCH_SET(GVAR(currentRadioId),"lastMenu",_menu); }; GVAR(changeValueAckTimer) = diag_tickTime + 3.5; diff --git a/addons/sys_prc117f/menus/fnc_createMenu.sqf b/addons/sys_prc117f/menus/fnc_createMenu.sqf index b33904e37..66076af27 100644 --- a/addons/sys_prc117f/menus/fnc_createMenu.sqf +++ b/addons/sys_prc117f/menus/fnc_createMenu.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("createMenu", _this); +TRACE_1("createMenu",_this); params ["_menu"]; /*if (count _this > 1) then { diff --git a/addons/sys_prc117f/menus/fnc_defaultButtonPress.sqf b/addons/sys_prc117f/menus/fnc_defaultButtonPress.sqf index 6b3f33c15..c0d85c217 100644 --- a/addons/sys_prc117f/menus/fnc_defaultButtonPress.sqf +++ b/addons/sys_prc117f/menus/fnc_defaultButtonPress.sqf @@ -22,7 +22,7 @@ private _ret = false; private _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; -TRACE_2("defaultButtonPress", _display, _event); +TRACE_2("defaultButtonPress",_display,_event); switch (_event select 0) do { case 'VOLUME_UP': { private _volume = GET_STATE("volume"); @@ -42,7 +42,7 @@ switch (_event select 0) do { }; case 'MODE_KNOB': { // Knob was clicked - private _knobPositionOld = GET_STATE_DEF("knobPosition", 1); + private _knobPositionOld = GET_STATE_DEF("knobPosition",1); private _dir = _event select 2; if (_dir == 0) then { _dir = 1; @@ -51,7 +51,7 @@ switch (_event select 0) do { _dir = -1; }; }; - TRACE_2("Knob Press", _knobPositionOld, _dir); + TRACE_2("Knob Press",_knobPositionOld,_dir); /////////////////////// private _knobPosition = _knobPositionOld + _dir; @@ -62,8 +62,8 @@ switch (_event select 0) do { _knobPosition = 0; }; - TRACE_1("New knob position", _knobPosition); - SET_STATE("knobPosition", _knobPosition); + TRACE_1("New knob position",_knobPosition); + SET_STATE("knobPosition",_knobPosition); _this call FUNC(changeMode); }; diff --git a/addons/sys_prc117f/menus/fnc_delayFunction.sqf b/addons/sys_prc117f/menus/fnc_delayFunction.sqf index ffad46db9..9fdccf446 100644 --- a/addons/sys_prc117f/menus/fnc_delayFunction.sqf +++ b/addons/sys_prc117f/menus/fnc_delayFunction.sqf @@ -18,7 +18,7 @@ params ["_radioId", "_endFunction", "_time"]; -TRACE_1("Registering a delayed function!", _this); +TRACE_1("Registering a delayed function!",_this); [{ params ["_args"]; diff --git a/addons/sys_prc117f/menus/fnc_drawCursor.sqf b/addons/sys_prc117f/menus/fnc_drawCursor.sqf index 1937669ee..ea3cf9eb7 100644 --- a/addons/sys_prc117f/menus/fnc_drawCursor.sqf +++ b/addons/sys_prc117f/menus/fnc_drawCursor.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("drawCursor", _this); +TRACE_1("drawCursor",_this); // Swap the background and foreground colors for a text range private ["_saveLength", "_rowCount"]; // TODO - some cases undefined private _display = uiNamespace getVariable QGVAR(currentDisplay); @@ -60,7 +60,7 @@ if (_alignment != ALIGN_LEFT) then { _saveLength = _i; }; }; - TRACE_2("Determined start and save", _start, _saveLength); + TRACE_2("Determined start and save",_start,_saveLength); } else { _saveLength = _rowCount; }; @@ -70,7 +70,7 @@ if (_len < 1) then { // Find the length of the string, and highlight it _len = _saveLength - _start; } else { - TRACE_2("Highlighting", _start, _len); + TRACE_2("Highlighting",_start,_len); if (_alignment != ALIGN_LEFT) then { _len = _len - 1; }; diff --git a/addons/sys_prc117f/menus/fnc_dynamicCall.sqf b/addons/sys_prc117f/menus/fnc_dynamicCall.sqf index 48f4f9593..65f625f9e 100644 --- a/addons/sys_prc117f/menus/fnc_dynamicCall.sqf +++ b/addons/sys_prc117f/menus/fnc_dynamicCall.sqf @@ -16,14 +16,14 @@ * Public: No */ -TRACE_1("dynamicCall", _this); +TRACE_1("dynamicCall",_this); params ["_funcName", "_var"]; private _ret = nil; if (_funcName isEqualType "") then { private _func = missionNamespace getVariable format ["%1_fnc_%2", QUOTE(ADDON), _funcName]; - _ret = _var call CALLSTACK_NAMED(_func, _funcName); + _ret = _var call CALLSTACK_NAMED(_func,_funcName); } else { if (_funcName isEqualType {}) then { // Calling code diff --git a/addons/sys_prc117f/menus/fnc_formatText.sqf b/addons/sys_prc117f/menus/fnc_formatText.sqf index d5f345f83..904b4856a 100644 --- a/addons/sys_prc117f/menus/fnc_formatText.sqf +++ b/addons/sys_prc117f/menus/fnc_formatText.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("formatText", _this); +TRACE_1("formatText",_this); params ["_text"]; @@ -25,7 +25,7 @@ if (count _this > 1) then { private _hash = _this select 1; { private _repStr = "%"+_x; - _text = [_text, _repStr, HASH_GET(_hash, _x)] call CBA_fnc_replace; + _text = [_text, _repStr, HASH_GET(_hash,_x)] call CBA_fnc_replace; } forEach HASH_KEYS(_hash); }; @@ -33,30 +33,30 @@ if (count _this > 1) then { private _result = [_text, "$ch"] call CBA_fnc_find; private _iter = 0; while {_result != -1 && _iter < 5} do { - TRACE_2("FOUND CHANNEL VALUE REPLACE", _text, _result); + TRACE_2("FOUND CHANNEL VALUE REPLACE",_text,_result); private _dash = [_text, "-", _result] call CBA_fnc_find; private _space = [_text, " ", _result] call CBA_fnc_find; if (_dash == -1) exitWith {}; if (_space == -1) then { _space = count (toArray _text); }; - TRACE_4("BALLS", _text, _result, _dash, _space); + TRACE_4("BALLS",_text,_result,_dash,_space); private _channelNumber = (parseNumber ([_text, _result+3, (_dash - (_result+3))] call CBA_fnc_substr)) - 1; private _key = [_text, _dash+1, (_space - _dash)] call CBA_fnc_substr; private _replacementValue = [_text, _result, (_space - _result)] call CBA_fnc_substr; - TRACE_3("Replacement index", _replacementValue, _channelNumber, _key); + TRACE_3("Replacement index",_replacementValue,_channelNumber,_key); - private _channel = HASHLIST_SELECT(GET_STATE("channels"), _channelNumber); - private _value = HASH_GET(_channel, _key); + private _channel = HASHLIST_SELECT(GET_STATE("channels"),_channelNumber); + private _value = HASH_GET(_channel,_key); - TRACE_2("channel data", _channelNumber, _channel); - TRACE_3("Performing replacement", _text, _key, _value); + TRACE_2("channel data",_channelNumber,_channel); + TRACE_3("Performing replacement",_text,_key,_value); _text = [ _text, _replacementValue, [_key, _value] call FUNC(formatChannelValue) ] call CBA_fnc_replace; - TRACE_1("DONE", _text); + TRACE_1("DONE",_text); _iter = _iter + 1; _result = [_text, "$ch"] call CBA_fnc_find; @@ -85,11 +85,11 @@ if (_result != -1) then { _text = [_text, "$cch-number", ([_channelNumber+1, 2] call CBA_fnc_formatNumber)] call CBA_fnc_replace; }; - TRACE_2("channel data", _channelNumber, _channel); + TRACE_2("channel data",_channelNumber,_channel); { private _repStr = "$cch-" + _x; - private _value = [ _x, HASH_GET(_channel, _x)] call FUNC(formatChannelValue); - TRACE_3("Calling replace", _text, _repStr, _value); + private _value = [ _x, HASH_GET(_channel,_x)] call FUNC(formatChannelValue); + TRACE_3("Calling replace",_text,_repStr,_value); _result = [_text, _x] call CBA_fnc_find; if (_result != -1) then { _text = [_text, _repStr, _value] call CBA_fnc_replace; @@ -98,5 +98,5 @@ if (_result != -1) then { }; // TODO: We need to find a way to replace icon shit. -TRACE_1("Returning", _text); +TRACE_1("Returning",_text); _text diff --git a/addons/sys_prc117f/menus/fnc_onButtonPress.sqf b/addons/sys_prc117f/menus/fnc_onButtonPress.sqf index d47084a6f..ef9e5c385 100644 --- a/addons/sys_prc117f/menus/fnc_onButtonPress.sqf +++ b/addons/sys_prc117f/menus/fnc_onButtonPress.sqf @@ -26,15 +26,15 @@ if (_control != (99902 + 222)) then { }; -private _currentMenu = GET_STATE_DEF("currentMenu", ""); -TRACE_1("Got current menu", _currentMenu); +private _currentMenu = GET_STATE_DEF("currentMenu",""); +TRACE_1("Got current menu",_currentMenu); if (isNil "_currentMenu") exitWith { WARNING("Button press without a selected menu item!"); true }; if (_currentMenu isEqualType "" && {_currentMenu != ""}) then { - private _tmpMenu = HASH_GET(GVAR(Menus), _currentMenu); + private _tmpMenu = HASH_GET(GVAR(Menus),_currentMenu); //diag_log text format["tmp: %1", _tmpMenu]; if (!isNil "_tmpMenu") then { _currentMenu = _tmpMenu; @@ -42,7 +42,7 @@ if (_currentMenu isEqualType "" && {_currentMenu != ""}) then { }; if (_currentMenu isEqualType []) then { - TRACE_1("Searching for key handler", MENU_ID(_currentMenu)); + TRACE_1("Searching for key handler",MENU_ID(_currentMenu)); // First, call our global key handler // We only call it if we had a valid menu, because it means the radio is active. Right!? // If it returns true, it means it consumed it and we dont move further @@ -86,16 +86,16 @@ if (_currentMenu isEqualType []) then { if (isNil "_ret") then { _ret = false; }; if (!_ret) then { - //TRACE_2("", _currentMenu, _this); + //TRACE_2("",_currentMenu,_this); _ret = [_currentMenu, _this] call FUNC(defaultButtonPress); if (!_ret) then { private ["_newId"]; - private _newMenu = GET_STATE_DEF("currentMenu", GVAR(VULOSHOME)); + private _newMenu = GET_STATE_DEF("currentMenu",GVAR(VULOSHOME)); private _oldId = MENU_ID(_currentMenu); if (typeName _newMenu == "STRING") then { _newId = _newMenu; - _newMenu = HASH_GET(GVAR(Menus), _newMenu); + _newMenu = HASH_GET(GVAR(Menus),_newMenu); }; if (!isNil "_oldId" && {!isNil "_newId"}) then { diff --git a/addons/sys_prc117f/menus/fnc_renderMenu.sqf b/addons/sys_prc117f/menus/fnc_renderMenu.sqf index 60d0f0695..4228eeabf 100644 --- a/addons/sys_prc117f/menus/fnc_renderMenu.sqf +++ b/addons/sys_prc117f/menus/fnc_renderMenu.sqf @@ -16,16 +16,16 @@ * Public: No */ -TRACE_1("renderMenu", _this); +TRACE_1("renderMenu",_this); params ["_menu", "_callerMenu"]; // the menu to render is passed [] call FUNC(clearDisplay); private _menuId = MENU_ID(_menu); if (isNil "_menuId") then { - SET_STATE("currentRenderMenu", _menu); + SET_STATE("currentRenderMenu",_menu); } else { - SET_STATE("currentRenderMenu", _menuId); + SET_STATE("currentRenderMenu",_menuId); }; [_menu] call FUNC(callRenderFunctor); @@ -34,11 +34,11 @@ if (MENU_TYPE(_menu) >= MENU_ACTION_NONE ) then { switch ( MENU_TYPE(_menu) ) do { // Its not a full submenu, but it references another embedded submenu. Render it case MENU_ACTION_SUBMENU: { - TRACE_1("MENU_ACTION_SUBMENU", MENU_SUBMENUS_ITEM(_menu,0)); - [MENU_SUBMENUS_ITEM(_menu,0), _callerMenu] call FUNC(changeMenu); + TRACE_1("MENU_ACTION_SUBMENU",MENU_SUBMENUS_ITEM(_menu,0)); + [MENU_SUBMENUS_ITEM(_menu,0),_callerMenu] call FUNC(changeMenu); }; case MENU_ACTION_CODE: { - [_menu, _callerMenu] call MENU_SUBMENUS_ITEM(_menu, 0); + [_menu, _callerMenu] call MENU_SUBMENUS_ITEM(_menu,0); }; default { WARNING("Unhandled menu action type!") @@ -75,7 +75,7 @@ if (MENU_TYPE(_menu) >= MENU_ACTION_NONE ) then { }; default { - TRACE_1("!!! INVALID MENU SPECIFIED", ""); + TRACE_1("!!! INVALID MENU SPECIFIED",""); }; }; }; diff --git a/addons/sys_prc117f/menus/fnc_renderText.sqf b/addons/sys_prc117f/menus/fnc_renderText.sqf index 3483c1512..daedbc1d0 100644 --- a/addons/sys_prc117f/menus/fnc_renderText.sqf +++ b/addons/sys_prc117f/menus/fnc_renderText.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("renderText", _this); +TRACE_1("renderText",_this); params ["_row", "_text", ["_alignment", ALIGN_LEFT]]; diff --git a/addons/sys_prc117f/menus/fnc_setRowText.sqf b/addons/sys_prc117f/menus/fnc_setRowText.sqf index 23adfa337..9699bcf63 100644 --- a/addons/sys_prc117f/menus/fnc_setRowText.sqf +++ b/addons/sys_prc117f/menus/fnc_setRowText.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("setRowText", _this); +TRACE_1("setRowText",_this); private _display = uiNamespace getVariable QGVAR(currentDisplay); @@ -55,7 +55,7 @@ switch _alignment do { }; }; }; -TRACE_3("setting text", _start, _rowCount, _length); +TRACE_3("setting text",_start,_rowCount,_length); private _baseId = (_row * 1000) +1; diff --git a/addons/sys_prc117f/menus/fnc_timerFunction.sqf b/addons/sys_prc117f/menus/fnc_timerFunction.sqf index 72cfb948c..9a6829d2a 100644 --- a/addons/sys_prc117f/menus/fnc_timerFunction.sqf +++ b/addons/sys_prc117f/menus/fnc_timerFunction.sqf @@ -19,7 +19,7 @@ params ["_radioId", "_endFunction", "_step", "_time"]; -TRACE_1("Registering a delayed function!", _this); +TRACE_1("Registering a delayed function!",_this); GVAR(timerFunction_NextStep) = diag_tickTime + _step; [{ diff --git a/addons/sys_prc117f/menus/types/ActionSeries.sqf b/addons/sys_prc117f/menus/types/ActionSeries.sqf index 38c9e3293..e832a1aed 100644 --- a/addons/sys_prc117f/menus/types/ActionSeries.sqf +++ b/addons/sys_prc117f/menus/types/ActionSeries.sqf @@ -17,48 +17,48 @@ */ DFUNC(onButtonPress_ActionSeries) = { - TRACE_1("onButtonPress_List", _this); + TRACE_1("onButtonPress_List",_this); params ["_menu", "_event"]; WARNING("AN/PRC-117F Menu Error!, This should not have been reached!"); }; DFUNC(renderMenu_ActionSeries) = { - TRACE_1("renderMenu_ActionSeries", _this); + TRACE_1("renderMenu_ActionSeries",_this); params ["_menu"]; // Its an action list of things to do in series, // which can be action menu types. Either way, they always bail back to us once completed - private _currentAction = GET_STATE_DEF("menuAction", 0); + private _currentAction = GET_STATE_DEF("menuAction",0); if (_currentAction < (count MENU_SUBMENUS(_menu)) ) then { // Annnnnd call it if (_currentAction > 0) then { - private _subMenu = MENU_SUBMENUS_ITEM(_menu, _currentAction-1); + private _subMenu = MENU_SUBMENUS_ITEM(_menu,_currentAction-1); [_subMenu] call FUNC(callSingleActionCompleteFunctor); }; private _saveAction = -1; if (_currentAction < (count MENU_SUBMENUS(_menu)) ) then { - private _subMenu = MENU_SUBMENUS_ITEM(_menu, _currentAction); - TRACE_1("ACTIONS INCREMENTING", _currentAction); + private _subMenu = MENU_SUBMENUS_ITEM(_menu,_currentAction); + TRACE_1("ACTIONS INCREMENTING",_currentAction); _saveAction = _currentAction; [_subMenu] call FUNC(changeMenu); }; _currentAction = _currentAction + 1; - SET_STATE("menuAction", _currentAction); + SET_STATE("menuAction",_currentAction); if (_saveAction+1 != _currentAction) then { _this call FUNC(renderMenu_ActionSeries); }; } else { - TRACE_1("ACTIONS COMPLETE", _currentAction); + TRACE_1("ACTIONS COMPLETE",_currentAction); // Call the action completion function - SET_STATE("menuAction", 0); - TRACE_1("Calling", MENU_ACTION_SERIESCOMPLETE(_menu)); + SET_STATE("menuAction",0); + TRACE_1("Calling",MENU_ACTION_SERIESCOMPLETE(_menu)); private _ret = [MENU_ACTION_SERIESCOMPLETE(_menu), [_menu]] call FUNC(dynamicCall); // Swap back to our parent @@ -67,7 +67,7 @@ DFUNC(renderMenu_ActionSeries) = { if (isNil "_ret") then { _ret = false; }; if (!_ret) then { private _parent = MENU_PARENT(_menu); - TRACE_1("Calling Parent!", _parent); + TRACE_1("Calling Parent!",_parent); [_parent] call FUNC(changeMenu); }; }; diff --git a/addons/sys_prc117f/menus/types/Alphanumeric.sqf b/addons/sys_prc117f/menus/types/Alphanumeric.sqf index 8d28f2fc4..e8e7826c4 100644 --- a/addons/sys_prc117f/menus/types/Alphanumeric.sqf +++ b/addons/sys_prc117f/menus/types/Alphanumeric.sqf @@ -32,36 +32,36 @@ GVAR(NumpadMap) = [ DFUNC(doAlphanumericButton) = { params ["_menu", "_event"]; - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuAlphaCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuAlphaCursor",0); - private _editButtonPress = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuAlphaCursorPress", 0); + private _editButtonPress = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuAlphaCursorPress",0); private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 0); - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuString", ""); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuString",""); private _number = parseNumber (_event select 0); private _key = _event select 0; - private _lastButton = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuAlphaLastButton", _key); + private _lastButton = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuAlphaLastButton",_key); if (_lastButton != _key) then { _editButtonPress = 0; [_menu, ['RIGHT']] call FUNC(onButtonPress_Alphanumeric); }; - TRACE_1("", _number); + TRACE_1("",_number); if (_number > -1 && _number < 10) then { private _arr = toArray _value; private _character = _arr select _editIndex; _character = ( toArray ((GVAR(NumpadMap) select _number) select _editButtonPress) select 0); - TRACE_4("Values", _character, _number, _editButtonPress, _arr); + TRACE_4("Values",_character,_number,_editButtonPress,_arr); _arr set[_editIndex, _character]; _value = toString _arr; - TRACE_2("Values 2", _editIndex, _character); - TRACE_1("New value", _value); + TRACE_2("Values 2",_editIndex,_character); + TRACE_1("New value",_value); // Increment the next character to use if (_editButtonPress + 1 >= (count (GVAR(NumpadMap) select _number))) then { @@ -70,9 +70,9 @@ DFUNC(doAlphanumericButton) = { _editButtonPress = _editButtonPress + 1; }; - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaLastButton", _key); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaCursorPress", _editButtonPress); - SCRATCH_SET(GVAR(currentRadioId), "menuString", _value); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaLastButton",_key); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaCursorPress",_editButtonPress); + SCRATCH_SET(GVAR(currentRadioId),"menuString",_value); // Re-render it [_menu] call FUNC(renderMenu_Alphanumeric); @@ -84,9 +84,9 @@ DFUNC(doAlphanumericButton) = { DFUNC(onButtonPress_Alphanumeric) = { params ["_menu", "_event"]; - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuString", ""); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuString",""); - TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!", (_event select 0)); + TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!",(_event select 0)); switch (_event select 0) do { case '1': { _this call FUNC(doAlphanumericButton); }; case '2': { _this call FUNC(doAlphanumericButton); }; @@ -100,50 +100,50 @@ DFUNC(onButtonPress_Alphanumeric) = { case '0': { _this call FUNC(doAlphanumericButton); }; case 'LEFT': { private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 0); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuAlphaCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuAlphaCursor",0); if (_editIndex > 0) then { _editIndex = _editIndex -1; } else { _editIndex = _editDigits -1; }; - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaCursor", _editIndex); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaCursorPress", 0); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaLastButton", nil); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaCursor",_editIndex); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaCursorPress",0); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaLastButton",nil); [_menu] call FUNC(renderMenu_Alphanumeric); }; case 'RIGHT': { private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 0); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuAlphaCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuAlphaCursor",0); if (_editIndex+1 < _editDigits) then { _editIndex = _editIndex + 1; } else { _editIndex = 0; }; - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaCursor", _editIndex); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaCursorPress", 0); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaLastButton", nil); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaCursor",_editIndex); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaCursorPress",0); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaLastButton",nil); [_menu] call FUNC(renderMenu_Alphanumeric); }; case 'ENT': { // swap to the parent - TRACE_1("onButtonPress_Alphanumeric: ENT hit", _value); + TRACE_1("onButtonPress_Alphanumeric: ENT hit",_value); private _saveName = MENU_SELECTION_VARIABLE(_menu); - SET_STATE(_saveName, _value); + SET_STATE(_saveName,_value); - SCRATCH_SET(GVAR(currentRadioId), "menuString", nil); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaCursorPress", 0); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaLastButton", nil); + SCRATCH_SET(GVAR(currentRadioId),"menuString",nil); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaCursorPress",0); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaLastButton",nil); - TRACE_2("Saved", _saveName, (GET_STATE(_saveName))); + TRACE_2("Saved",_saveName,(GET_STATE(_saveName))); // Our parent? - TRACE_1("Parent", MENU_PARENT_ID(_menu)); + TRACE_1("Parent",MENU_PARENT_ID(_menu)); [MENU_PARENT_ID(_menu)] call FUNC(changeMenu); }; case 'CLR': { TRACE_1("onButtonPress_Alphanumeric: CLR hit",""); - private _parentMenu = HASH_GET(GVAR(Menus), MENU_PARENT_ID(_menu)); + private _parentMenu = HASH_GET(GVAR(Menus),MENU_PARENT_ID(_menu)); private _useParent = true; //If Parent action series -> Go to its parent. @@ -151,7 +151,7 @@ DFUNC(onButtonPress_Alphanumeric) = { private _pid = MENU_PARENT_ID(_parentMenu); if (_pid isEqualType "") then { _useParent = false; - SET_STATE("menuAction", 0); + SET_STATE("menuAction",0); [_pid] call FUNC(changeMenu); }; }; @@ -170,11 +170,11 @@ DFUNC(renderMenu_Alphanumeric) = { params ["_menu"]; // the menu to render is passed private _displaySet = MENU_SUBMENUS(_menu); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuAlphaCursor", 0); - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuString", ""); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuAlphaCursor",0); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuString",""); private _valueHash = HASH_CREATE; - HASH_SET(_valueHash, "1", _value); + HASH_SET(_valueHash,"1",_value); [] call FUNC(clearDisplay); if (!isNil "_displaySet" && _displaySet isEqualType [] && (count _displaySet) > 0) then { diff --git a/addons/sys_prc117f/menus/types/ChangeValueAck.sqf b/addons/sys_prc117f/menus/types/ChangeValueAck.sqf index e0f851cfa..1fac49939 100644 --- a/addons/sys_prc117f/menus/types/ChangeValueAck.sqf +++ b/addons/sys_prc117f/menus/types/ChangeValueAck.sqf @@ -17,14 +17,14 @@ */ DFUNC(onButtonPress_ChangeValueAck) = { - TRACE_1("onButtonPress_ChangeValueAck", _this); + TRACE_1("onButtonPress_ChangeValueAck",_this); false }; DFUNC(renderMenu_ChangeValueAck) = { - TRACE_1("renderMenu_ChangeValueAck", _this); + TRACE_1("renderMenu_ChangeValueAck",_this); params ["_menu"]; // the menu to render is passed private _displaySet = MENU_SUBMENUS(_menu); diff --git a/addons/sys_prc117f/menus/types/Display.sqf b/addons/sys_prc117f/menus/types/Display.sqf index 1f6decfe7..da8796ecc 100644 --- a/addons/sys_prc117f/menus/types/Display.sqf +++ b/addons/sys_prc117f/menus/types/Display.sqf @@ -18,10 +18,10 @@ DFUNC(onButtonPress_Display) = { - TRACE_1("onButtonPress_Display", _this); + TRACE_1("onButtonPress_Display",_this); params ["_menu", "_event"]; - private _currentSelection = GET_STATE_DEF("menuSelection", 0); + private _currentSelection = GET_STATE_DEF("menuSelection",0); switch (_event select 0) do { case 'PRE_UP': { // OPT private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; @@ -34,12 +34,12 @@ DFUNC(onButtonPress_Display) = { _channelNumber = 0; }; private _channel = [GVAR(currentRadioId), _channelNumber] call FUNC(getChannelDataInternal); - _active = HASH_GET(_channel, "active"); + _active = HASH_GET(_channel,"active"); }; ["setCurrentChannel", _channelNumber] call GUI_DATA_EVENT; - [MENU_SUBMENUS_ITEM(_menu, _currentSelection)] call CALLSTACK(FUNC(renderMenu_Static)); + [MENU_SUBMENUS_ITEM(_menu,_currentSelection)] call CALLSTACK(FUNC(renderMenu_Static)); }; case 'PRE_DOWN': { // PGM private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; @@ -52,11 +52,11 @@ DFUNC(onButtonPress_Display) = { _channelNumber = 98; }; private _channel = [GVAR(currentRadioId), _channelNumber] call FUNC(getChannelDataInternal); - _active = HASH_GET(_channel, "active"); + _active = HASH_GET(_channel,"active"); }; ["setCurrentChannel", _channelNumber] call GUI_DATA_EVENT; - [MENU_SUBMENUS_ITEM(_menu, _currentSelection)] call CALLSTACK(FUNC(renderMenu_Static)); + [MENU_SUBMENUS_ITEM(_menu,_currentSelection)] call CALLSTACK(FUNC(renderMenu_Static)); }; case '4': { // SQ ["SQ"] call FUNC(changeMenu); @@ -68,8 +68,8 @@ DFUNC(onButtonPress_Display) = { ["PGM"] call FUNC(changeMenu); }; case '0': { - TRACE_2("Cycling display", _currentSelection, (count MENU_SUBMENUS(_menu))); - [MENU_SUBMENUS_ITEM(_menu, _currentSelection)] call FUNC(callCompleteFunctor); + TRACE_2("Cycling display",_currentSelection,(count MENU_SUBMENUS(_menu))); + [MENU_SUBMENUS_ITEM(_menu,_currentSelection)] call FUNC(callCompleteFunctor); if (_currentSelection+1 >= (count MENU_SUBMENUS(_menu))) then { _currentSelection = 0; @@ -77,13 +77,13 @@ DFUNC(onButtonPress_Display) = { _currentSelection = _currentSelection + 1; }; - SET_STATE("menuSelection", _currentSelection); - [MENU_SUBMENUS_ITEM(_menu, _currentSelection)] call FUNC(callEntryFunctor); - [MENU_SUBMENUS_ITEM(_menu, _currentSelection)] call FUNC(renderMenu_Static); + SET_STATE("menuSelection",_currentSelection); + [MENU_SUBMENUS_ITEM(_menu,_currentSelection)] call FUNC(callEntryFunctor); + [MENU_SUBMENUS_ITEM(_menu,_currentSelection)] call FUNC(renderMenu_Static); }; default { // Pass the button press along to the child menu - [MENU_SUBMENUS_ITEM(_menu, _currentSelection)] call FUNC(onButtonPress_Static); + [MENU_SUBMENUS_ITEM(_menu,_currentSelection)] call FUNC(onButtonPress_Static); }; }; @@ -91,17 +91,17 @@ DFUNC(onButtonPress_Display) = { }; DFUNC(renderMenu_Display) = { - TRACE_1("renderMenu_Display", _this); + TRACE_1("renderMenu_Display",_this); params ["_menu"]; // the menu to render is passed private _displaySet = MENU_SUBMENUS(_menu); - private _currentSelection = GET_STATE_DEF("menuSelection", 0); + private _currentSelection = GET_STATE_DEF("menuSelection",0); private _currentDisplay = MENU_SUBMENUS_ITEM(_menu,_currentSelection); // A display set has a set of children STATIC displays, which are rendered and canFire // be swaped with the 'NEXT' circly button thingy - private _entry = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuEntry", false); + private _entry = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuEntry",false); if (_entry) then { [_currentDisplay] call FUNC(callEntryFunctor); }; diff --git a/addons/sys_prc117f/menus/types/Frequency.sqf b/addons/sys_prc117f/menus/types/Frequency.sqf index 1b6addd94..92490d6c1 100644 --- a/addons/sys_prc117f/menus/types/Frequency.sqf +++ b/addons/sys_prc117f/menus/types/Frequency.sqf @@ -33,29 +33,29 @@ DFUNC(doFrequencyButton) = { params ["_menu", "_event"]; - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequencyCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequencyCursor",0); private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 2); - private _floatValue = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequency", 0.0); + private _floatValue = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequency",0.0); private _value = ["frequency", _floatValue] call FUNC(formatChannelValue); private _number = parseNumber (_event select 0); private _key = _event select 0; - TRACE_1("", _number); + TRACE_1("",_number); if (_number > -1 && _number < 10) then { private _arr = toArray _value; private _character = _arr select _editIndex; _character = ( toArray ((GVAR(NumpadMap_frequency) select _number) select 0) select 0); - TRACE_3("Values", _character, _number, _arr); + TRACE_3("Values",_character,_number,_arr); _arr set[_editIndex, _character]; _value = toString _arr; - TRACE_2("Values 2", _editIndex, _character); - TRACE_1("New value", _value); + TRACE_2("Values 2",_editIndex,_character); + TRACE_1("New value",_value); if (_editIndex < _editDigits) then { _editIndex = _editIndex + 1; @@ -64,14 +64,14 @@ DFUNC(doFrequencyButton) = { }; if ( ((toArray _value) select _editIndex) == 46) then { // recursively push a button again, since we want to skip it. - TRACE_1("Edit digit incrementing hit a dot, skip it",""); + TRACE_1("Edit digit incrementing hit a dot,skip it",""); _editIndex = _editIndex + 1; }; _floatValue = parseNumber _value; - TRACE_2("Re-parsed back to int", _floatValue, _value); - SCRATCH_SET(GVAR(currentRadioId), "menuFrequency", _floatValue); - SCRATCH_SET(GVAR(currentRadioId), "menuFrequencyCursor", _editIndex); + TRACE_2("Re-parsed back to int",_floatValue,_value); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequency",_floatValue); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequencyCursor",_editIndex); // Re-render it [_menu] call FUNC(renderMenu_Frequency); @@ -81,9 +81,9 @@ DFUNC(doFrequencyButton) = { DFUNC(onButtonPress_Frequency) = { params ["_menu", "_event"]; - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequency", 0.0); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequency",0.0); - TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!", (_event select 0)); + TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!",(_event select 0)); switch (_event select 0) do { case '1': { _this call FUNC(doFrequencyButton); }; case '2': { _this call FUNC(doFrequencyButton); }; @@ -97,7 +97,7 @@ DFUNC(onButtonPress_Frequency) = { case '0': { _this call FUNC(doFrequencyButton); }; case 'LEFT': { private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 2); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequencyCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequencyCursor",0); if (_editIndex > 0) then { _editIndex = _editIndex -1; @@ -105,11 +105,11 @@ DFUNC(onButtonPress_Frequency) = { _editIndex = _editDigits; }; - TRACE_3("Left hit, checking", _value, _editIndex, _editDigits); + TRACE_3("Left hit,checking",_value,_editIndex,_editDigits); private _strValue = ["frequency", _value] call FUNC(formatChannelValue); if ( ((toArray _strValue) select _editIndex) == 46) then { // recursively push a button again, since we want to skip it. - TRACE_1("Hit a digit, skipping", _editIndex); + TRACE_1("Hit a digit,skipping",_editIndex); if (_editIndex > 1) then { _editIndex = _editIndex - 1; } else { @@ -117,12 +117,12 @@ DFUNC(onButtonPress_Frequency) = { }; }; - SCRATCH_SET(GVAR(currentRadioId), "menuFrequencyCursor", _editIndex); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequencyCursor",_editIndex); [_menu] call FUNC(renderMenu_Frequency); }; case 'RIGHT': { private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 2); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequencyCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequencyCursor",0); if (_editIndex < _editDigits) then { _editIndex = _editIndex + 1; @@ -130,11 +130,11 @@ DFUNC(onButtonPress_Frequency) = { _editIndex = 0; }; - TRACE_3("Right hit, checking", _value, _editIndex, _editDigits); + TRACE_3("Right hit,checking",_value,_editIndex,_editDigits); private _strValue = ["frequency", _value] call FUNC(formatChannelValue); if ( ((toArray _strValue) select _editIndex) == 46) then { // recursively push a button again, since we want to skip it. - TRACE_1("Hit a digit, skipping", _editIndex); + TRACE_1("Hit a digit,skipping",_editIndex); if (_editIndex < _editDigits) then { _editIndex = _editIndex + 1; } else { @@ -142,28 +142,28 @@ DFUNC(onButtonPress_Frequency) = { }; }; - SCRATCH_SET(GVAR(currentRadioId), "menuFrequencyCursor", _editIndex); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequencyCursor",_editIndex); [_menu] call FUNC(renderMenu_Frequency); }; case 'ENT': { // swap to the parent - TRACE_1("onButtonPress_Frequency: ENT hit", _value); + TRACE_1("onButtonPress_Frequency: ENT hit",_value); private _saveName = MENU_SELECTION_VARIABLE(_menu); - SET_STATE(_saveName, _value); + SET_STATE(_saveName,_value); - SCRATCH_SET(GVAR(currentRadioId), "menuFrequency", 0); - SCRATCH_SET(GVAR(currentRadioId), "menuFrequencyCursor", 0.0); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequency",0); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequencyCursor",0.0); - TRACE_2("Saved", _saveName, (GET_STATE(_saveName))); + TRACE_2("Saved",_saveName,(GET_STATE(_saveName))); // Our parent? - TRACE_1("Parent", MENU_PARENT_ID(_menu)); + TRACE_1("Parent",MENU_PARENT_ID(_menu)); [MENU_PARENT_ID(_menu)] call FUNC(changeMenu); }; case 'CLR': { TRACE_1("onButtonPress_Frequency: CLR hit",""); - private _parentMenu = HASH_GET(GVAR(Menus), MENU_PARENT_ID(_menu)); + private _parentMenu = HASH_GET(GVAR(Menus),MENU_PARENT_ID(_menu)); private _useParent = true; //If Parent action series -> Go to its parent. @@ -171,7 +171,7 @@ DFUNC(onButtonPress_Frequency) = { private _pid = MENU_PARENT_ID(_parentMenu); if (_pid isEqualType "") then { _useParent = false; - SET_STATE("menuAction", 0); + SET_STATE("menuAction",0); [_pid] call FUNC(changeMenu); }; }; @@ -190,22 +190,22 @@ DFUNC(renderMenu_Frequency) = { params ["_menu"]; // the menu to render is passed private _displaySet = MENU_SUBMENUS(_menu); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequencyCursor", 0); - private _freqValue = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequency", 0.0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequencyCursor",0); + private _freqValue = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequency",0.0); private _value = ["frequency", _freqValue] call FUNC(formatChannelValue); - TRACE_2("Formatted frequency", _freqValue, _value); + TRACE_2("Formatted frequency",_freqValue,_value); // Check the current digit. If its a dot, we should skip it. // Dot as a DEC value of 46 if ( ((toArray _value) select _editIndex) == 46) then { - TRACE_1("Digit was a dot, moving forward", _editIndex); + TRACE_1("Digit was a dot,moving forward",_editIndex); _editIndex = _editIndex + 1; }; private _valueHash = HASH_CREATE; - HASH_SET(_valueHash, "1", _value); - TRACE_1("Pushed value hash", _value); + HASH_SET(_valueHash,"1",_value); + TRACE_1("Pushed value hash",_value); [] call FUNC(clearDisplay); if (!isNil "_displaySet" && _displaySet isEqualType [] && (count _displaySet) > 0) then { @@ -220,7 +220,7 @@ DFUNC(renderMenu_Frequency) = { [ROW_SMALL_1, MENU_PATHNAME(_menu)] call FUNC(renderText); // Header line private _editLocation = (MENU_SELECTION_DISPLAYSET(_menu) select 3); // cursor location from the config - TRACE_1("Rendered, pushing cursor", _editLocation); + TRACE_1("Rendered,pushing cursor",_editLocation); [(_editLocation select 0), [(_editLocation select 1)+_editIndex, diff --git a/addons/sys_prc117f/menus/types/List.sqf b/addons/sys_prc117f/menus/types/List.sqf index 20d888f46..af03f86e3 100644 --- a/addons/sys_prc117f/menus/types/List.sqf +++ b/addons/sys_prc117f/menus/types/List.sqf @@ -17,29 +17,29 @@ */ DFUNC(onButtonPress_List) = { -// TRACE_1("onButtonPress_List", _this); +// TRACE_1("onButtonPress_List",_this); params ["_menu", "_event"]; - private _currentSelection = GET_STATE_DEF("menuSelection", 0); - private _selectedMenu = MENU_SUBMENUS_ITEM(_menu, _currentSelection); - TRACE_3("", _currentSelection, _selectedMenu, _menu); + private _currentSelection = GET_STATE_DEF("menuSelection",0); + private _selectedMenu = MENU_SUBMENUS_ITEM(_menu,_currentSelection); + TRACE_3("",_currentSelection,_selectedMenu,_menu); switch (_event select 0) do { case 'ENT': { [_selectedMenu, _menu] call FUNC(changeMenu); }; case 'CLR': { // Back out of the menu back to the root menu of this menu...confusing right? - private _homeDisplay = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + private _homeDisplay = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); [_homeDisplay] call FUNC(changeMenu); }; case 'LEFT': { - TRACE_1("Enter LEFT", _currentSelection); + TRACE_1("Enter LEFT",_currentSelection); if (_currentSelection > 0 ) then { _currentSelection = _currentSelection - 1; }; }; case 'RIGHT': { - TRACE_1("Enter RIGHT", _currentSelection); + TRACE_1("Enter RIGHT",_currentSelection); if (_currentSelection+1 < (count MENU_SUBMENUS(_menu) )) then { _currentSelection = _currentSelection + 1; }; @@ -49,13 +49,13 @@ DFUNC(onButtonPress_List) = { }; }; - SET_STATE("menuSelection", _currentSelection); + SET_STATE("menuSelection",_currentSelection); false }; DFUNC(renderMenu_List) = { - TRACE_1("renderMenu_List", _this); + TRACE_1("renderMenu_List",_this); private ["_currentPage", "_currentSelectionIndex"]; params ["_menu"]; // the menu to render is passed @@ -63,7 +63,7 @@ DFUNC(renderMenu_List) = { [11, MENU_PATHNAME(_menu)] call FUNC(renderText); // Set our page based on the current selection index - private _currentSelection = GET_STATE_DEF("menuSelection", 0); + private _currentSelection = GET_STATE_DEF("menuSelection",0); private _pageCount = floor ((count MENU_SUBMENUS(_menu)) / MAX_MENU_ITEMS_PER_PAGE)+1; if (_currentSelection >= MAX_MENU_ITEMS_PER_PAGE) then { @@ -74,7 +74,7 @@ DFUNC(renderMenu_List) = { _currentPage = 1; _currentSelectionIndex = _currentSelection; }; - TRACE_5("Page index", MAX_MENU_ITEMS_PER_PAGE, _pageCount, _currentSelection, _currentPage, _currentSelectionIndex); + TRACE_5("Page index",MAX_MENU_ITEMS_PER_PAGE,_pageCount,_currentSelection,_currentPage,_currentSelectionIndex); // Render the current menus private _firstDisplayRow = ""; @@ -85,9 +85,9 @@ DFUNC(renderMenu_List) = { private _itemIndex = (((_currentPage-1) * MAX_MENU_ITEMS_PER_PAGE) + (_i-1)); if (_itemIndex >= (count MENU_SUBMENUS(_menu))) exitWith {}; - private _item = MENU_SUBMENUS_ITEM(_menu, _itemIndex); + private _item = MENU_SUBMENUS_ITEM(_menu,_itemIndex); private _itemDisplayName = MENU_DISPLAYNAME(_item); - TRACE_5("Item rendering", _itemIndex, _itemDisplayName, _item, _currentPage, _i); + TRACE_5("Item rendering",_itemIndex,_itemDisplayName,_item,_currentPage,_i); if (_i <= MAX_MENU_ITEMS_PER_PAGE/2 ) then { _firstDisplayRow = _firstDisplayRow + _itemDisplayName + " "; @@ -95,7 +95,7 @@ DFUNC(renderMenu_List) = { _secondDisplayRow = _secondDisplayRow + _itemDisplayName + " "; }; }; - TRACE_2("Rendering rows", _firstDisplayRow, _secondDisplayRow); + TRACE_2("Rendering rows",_firstDisplayRow,_secondDisplayRow); [ROW_LARGE_2, _firstDisplayRow, ALIGN_CENTER] call FUNC(renderText); [ROW_LARGE_3, _secondDisplayRow, ALIGN_CENTER] call FUNC(renderText); @@ -107,15 +107,15 @@ DFUNC(renderMenu_List) = { }; DFUNC(drawCursor_List) = { - TRACE_1("drawCursor_List", _this); + TRACE_1("drawCursor_List",_this); private ["_row"]; params ["_menu", "_currentSelection", "_currentSelectionIndex", "_data"]; - private _currentItemDisplayName = MENU_DISPLAYNAME( MENU_SUBMENUS_ITEM(_menu, _currentSelection) ); + private _currentItemDisplayName = MENU_DISPLAYNAME(MENU_SUBMENUS_ITEM(_menu,_currentSelection)); // optional 3rd argument of range private _len = (count (toArray _currentItemDisplayName)) ; - TRACE_2("CURSORING", _len, _currentItemDisplayName); + TRACE_2("CURSORING",_len,_currentItemDisplayName); private _rowText = ""; if (_currentSelectionIndex < MAX_MENU_ITEMS_PER_PAGE/2 ) then { @@ -126,11 +126,11 @@ DFUNC(drawCursor_List) = { _rowText = _data select 1; }; - TRACE_2("Searching for row text", _row, _rowText); + TRACE_2("Searching for row text",_row,_rowText); private _result = [_rowText, _currentItemDisplayName] call CBA_fnc_find; if (_result != -1) then { - TRACE_1("Dumping cursor at", _result); + TRACE_1("Dumping cursor at",_result); [_row, [_result,_len], true, ALIGN_CENTER] call FUNC(drawCursor); }; // We need to walk and figure out how to determine if its row 1 or 2 for the select, and also diff --git a/addons/sys_prc117f/menus/types/Number.sqf b/addons/sys_prc117f/menus/types/Number.sqf index 68d5a8070..9e425d803 100644 --- a/addons/sys_prc117f/menus/types/Number.sqf +++ b/addons/sys_prc117f/menus/types/Number.sqf @@ -32,29 +32,29 @@ GVAR(NumpadMap_Number) = [ DFUNC(doNumberButton) = { params ["_menu", "_event"]; - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumberCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumberCursor",0); private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 2); - private _numberValue = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumber", 0.0); + private _numberValue = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumber",0.0); private _value = [_numberValue, (MENU_SELECTION_DISPLAYSET(_menu) select 2)] call CBA_fnc_formatNumber; private _number = parseNumber (_event select 0); private _key = _event select 0; - TRACE_5("", _number, _numberValue, _value, _editDigits, _editIndex); + TRACE_5("",_number,_numberValue,_value,_editDigits,_editIndex); if (_number > -1 && _number < 10) then { private _arr = toArray _value; private _character = _arr select _editIndex; _character = ( toArray ((GVAR(NumpadMap_Number) select _number) select 0) select 0); - TRACE_3("Values", _character, _number, _arr); + TRACE_3("Values",_character,_number,_arr); _arr set[_editIndex, _character]; _value = toString _arr; - TRACE_2("Values 2", _editIndex, _character); - TRACE_1("New value", _value); + TRACE_2("Values 2",_editIndex,_character); + TRACE_1("New value",_value); if (_editIndex+1 < _editDigits) then { _editIndex = _editIndex + 1; @@ -63,14 +63,14 @@ DFUNC(doNumberButton) = { }; if ( ((toArray _value) select _editIndex) == 46) then { // recursively push a button again, since we want to skip it. - TRACE_1("Edit digit incrementing hit a dot, skip it",""); + TRACE_1("Edit digit incrementing hit a dot,skip it",""); _editIndex = _editIndex + 1; }; _numberValue = parseNumber _value; - TRACE_2("Re-parsed back to int", _numberValue, _value); - SCRATCH_SET(GVAR(currentRadioId), "menuNumber", _numberValue); - SCRATCH_SET(GVAR(currentRadioId), "menuNumberCursor", _editIndex); + TRACE_2("Re-parsed back to int",_numberValue,_value); + SCRATCH_SET(GVAR(currentRadioId),"menuNumber",_numberValue); + SCRATCH_SET(GVAR(currentRadioId),"menuNumberCursor",_editIndex); // Re-render it [_menu] call FUNC(renderMenu_Number); @@ -80,9 +80,9 @@ DFUNC(doNumberButton) = { DFUNC(onButtonPress_Number) = { params ["_menu", "_event"]; - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumber", 0.0); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumber",0.0); - TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!", (_event select 0)); + TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!",(_event select 0)); switch (_event select 0) do { case '1': { _this call FUNC(doNumberButton); }; case '2': { _this call FUNC(doNumberButton); }; @@ -96,18 +96,18 @@ DFUNC(onButtonPress_Number) = { case '0': { _this call FUNC(doNumberButton); }; case 'LEFT': { private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 2); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumberCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumberCursor",0); if (_editIndex > 0) then { _editIndex = _editIndex -1; } else { _editIndex = _editDigits; }; - TRACE_3("Left hit, checking", _value, _editIndex, _editDigits); + TRACE_3("Left hit,checking",_value,_editIndex,_editDigits); private _strValue = [_value, (MENU_SELECTION_DISPLAYSET(_menu) select 2)] call CBA_fnc_formatNumber; if ( ((toArray _strValue) select _editIndex) == 46) then { // recursively push a button again, since we want to skip it. - TRACE_1("Hit a digit, skipping", _editIndex); + TRACE_1("Hit a digit,skipping",_editIndex); if (_editIndex > 1) then { _editIndex = _editIndex - 1; } else { @@ -115,23 +115,23 @@ DFUNC(onButtonPress_Number) = { }; }; - SCRATCH_SET(GVAR(currentRadioId), "menuNumberCursor", _editIndex); + SCRATCH_SET(GVAR(currentRadioId),"menuNumberCursor",_editIndex); [_menu] call FUNC(renderMenu_Number); }; case 'RIGHT': { private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 2); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumberCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumberCursor",0); if (_editIndex+1 < _editDigits) then { _editIndex = _editIndex + 1; } else { _editIndex = 0; }; - TRACE_3("Right hit, checking", _value, _editIndex, _editDigits); + TRACE_3("Right hit,checking",_value,_editIndex,_editDigits); private _strValue = [_value, (MENU_SELECTION_DISPLAYSET(_menu) select 2)] call CBA_fnc_formatNumber; if ( ((toArray _strValue) select _editIndex) == 46) then { // recursively push a button again, since we want to skip it. - TRACE_1("Hit a digit, skipping", _editIndex); + TRACE_1("Hit a digit,skipping",_editIndex); if (_editIndex < _editDigits) then { _editIndex = _editIndex + 1; } else { @@ -139,28 +139,28 @@ DFUNC(onButtonPress_Number) = { }; }; - SCRATCH_SET(GVAR(currentRadioId), "menuNumberCursor", _editIndex); + SCRATCH_SET(GVAR(currentRadioId),"menuNumberCursor",_editIndex); [_menu] call FUNC(renderMenu_Number); }; case 'ENT': { // swap to the parent - TRACE_1("onButtonPress_Number: ENT hit", _value); + TRACE_1("onButtonPress_Number: ENT hit",_value); private _saveName = MENU_SELECTION_VARIABLE(_menu); - SET_STATE(_saveName, _value); + SET_STATE(_saveName,_value); - SCRATCH_SET(GVAR(currentRadioId), "menuNumber", nil); - SCRATCH_SET(GVAR(currentRadioId), "menuNumberCursor", 0); + SCRATCH_SET(GVAR(currentRadioId),"menuNumber",nil); + SCRATCH_SET(GVAR(currentRadioId),"menuNumberCursor",0); - TRACE_2("Saved", _saveName, (GET_STATE(_saveName))); + TRACE_2("Saved",_saveName,(GET_STATE(_saveName))); // Our parent? - TRACE_1("Parent", MENU_PARENT_ID(_menu)); + TRACE_1("Parent",MENU_PARENT_ID(_menu)); [MENU_PARENT_ID(_menu)] call FUNC(changeMenu); }; case 'CLR': { TRACE_1("onButtonPress_Number: CLR hit",""); - private _parentMenu = HASH_GET(GVAR(Menus), MENU_PARENT_ID(_menu)); + private _parentMenu = HASH_GET(GVAR(Menus),MENU_PARENT_ID(_menu)); private _useParent = true; //If Parent action series -> Go to its parent. @@ -168,7 +168,7 @@ DFUNC(onButtonPress_Number) = { private _pid = MENU_PARENT_ID(_parentMenu); if (_pid isEqualType "") then { _useParent = false; - SET_STATE("menuAction", 0); + SET_STATE("menuAction",0); [_pid] call FUNC(changeMenu); }; }; @@ -188,24 +188,24 @@ DFUNC(renderMenu_Number) = { private _displaySet = MENU_SUBMENUS(_menu); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumberCursor", 0); - private _numberValue = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumber", 0.0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumberCursor",0); + private _numberValue = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumber",0.0); private _value = [_numberValue, (MENU_SELECTION_DISPLAYSET(_menu) select 2)] call CBA_fnc_formatNumber; - TRACE_2("Formatted number", _numberValue, _value); + TRACE_2("Formatted number",_numberValue,_value); // Check the current digit. If its a dot, we should skip it. // Dot as a DEC value of 46 if ( ((toArray _value) select _editIndex) == 46) then { - TRACE_1("Digit was a dot, moving forward", _editIndex); + TRACE_1("Digit was a dot,moving forward",_editIndex); _editIndex = _editIndex + 1; }; private _valueHash = HASH_CREATE; private _replaceValue = format["$ch%1",_numberValue]; - HASH_SET(_valueHash, "ch", _replaceValue); // This is a custom menu change to allow displaying the channel in the display - HASH_SET(_valueHash, "1", _value); - TRACE_1("Pushed value hash", _value); + HASH_SET(_valueHash,"ch",_replaceValue); // This is a custom menu change to allow displaying the channel in the display + HASH_SET(_valueHash,"1",_value); + TRACE_1("Pushed value hash",_value); [] call FUNC(clearDisplay); if (!isNil "_displaySet" && _displaySet isEqualType [] && (count _displaySet) > 0) then { @@ -220,7 +220,7 @@ DFUNC(renderMenu_Number) = { [ROW_SMALL_1, MENU_PATHNAME(_menu)] call FUNC(renderText); // Header line private _editLocation = (MENU_SELECTION_DISPLAYSET(_menu) select 3); // cursor location from the config - TRACE_1("Rendered, pushing cursor", _editLocation); + TRACE_1("Rendered,pushing cursor",_editLocation); [(_editLocation select 0), [(_editLocation select 1)+_editIndex, diff --git a/addons/sys_prc117f/menus/types/Selection.sqf b/addons/sys_prc117f/menus/types/Selection.sqf index c5dfeb951..a57c9c89f 100644 --- a/addons/sys_prc117f/menus/types/Selection.sqf +++ b/addons/sys_prc117f/menus/types/Selection.sqf @@ -17,24 +17,24 @@ */ DFUNC(onButtonPress_Selection) = { - TRACE_1("onButtonPress_Selection", _this); + TRACE_1("onButtonPress_Selection",_this); params ["_menu", "_event"]; - private _currentSelection = GET_STATE_DEF("menuSelection", 0); - TRACE_2("!!!!!!!!!!!!!!!!!!!!!!!!!", _currentSelection, (_event select 0)); + private _currentSelection = GET_STATE_DEF("menuSelection",0); + TRACE_2("!!!!!!!!!!!!!!!!!!!!!!!!!",_currentSelection,(_event select 0)); switch (_event select 0) do { case 'ENT': { private _value = ((MENU_SELECTION_DISPLAYSET(_menu) select 0) select _currentSelection); - SCRATCH_SET(GVAR(currentRadioId), MENU_SELECTION_VARIABLE(_menu), _value); + SCRATCH_SET(GVAR(currentRadioId),MENU_SELECTION_VARIABLE(_menu),_value); // swap to the parent - TRACE_1("onButtonPress_Selection: Value saved", _value); + TRACE_1("onButtonPress_Selection: Value saved",_value); [MENU_PARENT(_menu)] call FUNC(changeMenu); }; case 'CLR': { TRACE_1("onButtonPress_Selection: Value not saved",""); - private _parentMenu = HASH_GET(GVAR(Menus), MENU_PARENT_ID(_menu)); + private _parentMenu = HASH_GET(GVAR(Menus),MENU_PARENT_ID(_menu)); private _useParent = true; //If Parent action series -> Go to its parent. @@ -42,7 +42,7 @@ DFUNC(onButtonPress_Selection) = { private _pid = MENU_PARENT_ID(_parentMenu); if (_pid isEqualType "") then { _useParent = false; - SET_STATE("menuAction", 0); + SET_STATE("menuAction",0); [_pid] call FUNC(changeMenu); }; }; @@ -54,18 +54,18 @@ DFUNC(onButtonPress_Selection) = { case '6': { if (_currentSelection > 0 ) then { _currentSelection = _currentSelection - 1; - SET_STATE("menuSelection", _currentSelection); + SET_STATE("menuSelection",_currentSelection); - TRACE_1("Decremented", _currentSelection); + TRACE_1("Decremented",_currentSelection); [_menu] call FUNC(renderMenu_Selection); }; }; case '9': { if (_currentSelection+1 < (count (MENU_SELECTION_DISPLAYSET(_menu) select 0) ) ) then { _currentSelection = _currentSelection + 1; - SET_STATE("menuSelection", _currentSelection); + SET_STATE("menuSelection",_currentSelection); - TRACE_1("Incremented", _currentSelection); + TRACE_1("Incremented",_currentSelection); [_menu] call FUNC(renderMenu_Selection); }; }; @@ -81,11 +81,11 @@ DFUNC(renderMenu_Selection) = { private _options = MENU_SELECTION_DISPLAYSET(_menu) select 0; private _cursor = MENU_SELECTION_DISPLAYSET(_menu) select 1; - private _currentSelection = GET_STATE_DEF("menuSelection", 0); + private _currentSelection = GET_STATE_DEF("menuSelection",0); private _value = _options select _currentSelection; private _valueHash = HASH_CREATE; - HASH_SET(_valueHash, "1", _value); + HASH_SET(_valueHash,"1",_value); [] call FUNC(clearDisplay); if (!isNil "_displaySet" && _displaySet isEqualType [] && (count _displaySet) > 0) then { diff --git a/addons/sys_prc117f/menus/types/Static.sqf b/addons/sys_prc117f/menus/types/Static.sqf index f5d3c7057..89185d0ff 100644 --- a/addons/sys_prc117f/menus/types/Static.sqf +++ b/addons/sys_prc117f/menus/types/Static.sqf @@ -17,14 +17,14 @@ */ DFUNC(onButtonPress_Static) = { - TRACE_1("onButtonPress_Static", _this); + TRACE_1("onButtonPress_Static",_this); false }; DFUNC(renderMenu_Static) = { - TRACE_1("renderMenu_Static", _this); + TRACE_1("renderMenu_Static",_this); params ["_menu"]; // the menu to render is passed private _displaySet = MENU_SUBMENUS(_menu); diff --git a/addons/sys_prc117f/radio/__PREP__.sqf b/addons/sys_prc117f/radio/__PREP__.sqf index a05b46ce3..11aa3c712 100644 --- a/addons/sys_prc117f/radio/__PREP__.sqf +++ b/addons/sys_prc117f/radio/__PREP__.sqf @@ -1,5 +1,5 @@ #include "..\script_component.hpp" -TRACE_1("enter", _this); +TRACE_1("enter",_this); PREP_MODULE(radio,setVolume); PREP_MODULE(radio,getVolume); diff --git a/addons/sys_prc117f/radio/fnc_getChannelData.sqf b/addons/sys_prc117f/radio/fnc_getChannelData.sqf index df1801e94..1310d3afd 100644 --- a/addons/sys_prc117f/radio/fnc_getChannelData.sqf +++ b/addons/sys_prc117f/radio/fnc_getChannelData.sqf @@ -19,35 +19,35 @@ params ["", "", "_eventData", "_radioData"]; private _channelNumber = _eventData; -private _channels = HASH_GET(_radioData, "channels"); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); +private _channels = HASH_GET(_radioData,"channels"); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); -private _channelType = HASH_GET(_channel, "channelMode"); +private _channelType = HASH_GET(_channel,"channelMode"); private _return = HASH_CREATE; switch _channelType do { case "BASIC": { - HASH_SET(_return, "mode", "singleChannel"); - HASH_SET(_return, "frequencyTX", HASH_GET(_channel, "frequencyTX")); - HASH_SET(_return, "frequencyRX", HASH_GET(_channel, "frequencyRX")); - if (HASH_GET(_radioData, "pgm_pa_mode") == "ON" && {HASH_GET(_radioData, "powerSource") == "VAU"}) then { - HASH_SET(_return, "power", VRC103_RACK_POWER); + HASH_SET(_return,"mode","singleChannel"); + HASH_SET(_return,"frequencyTX",HASH_GET(_channel,"frequencyTX")); + HASH_SET(_return,"frequencyRX",HASH_GET(_channel,"frequencyRX")); + if (HASH_GET(_radioData,"pgm_pa_mode") == "ON" && {HASH_GET(_radioData,"powerSource") == "VAU"}) then { + HASH_SET(_return,"power",VRC103_RACK_POWER); } else { - HASH_SET(_return, "power", HASH_GET(_channel, "power")); + HASH_SET(_return,"power",HASH_GET(_channel,"power")); }; - HASH_SET(_return, "CTCSSTx", HASH_GET(_channel, "CTCSSTx")); - HASH_SET(_return, "CTCSSRx", HASH_GET(_channel, "CTCSSRx")); - HASH_SET(_return, "modulation", HASH_GET(_channel, "modulation")); - HASH_SET(_return, "encryption", HASH_GET(_channel, "encryption")); - HASH_SET(_return, "TEK", HASH_GET(_channel, "tek")); - HASH_SET(_return, "trafficRate", HASH_GET(_channel, "trafficRate")); - HASH_SET(_return, "syncLength", HASH_GET(_channel, "phase")); - HASH_SET(_return, "optioncode", HASH_GET(_channel, "optioncode")); - HASH_SET(_return, "active", HASH_GET(_channel, "active")); - HASH_SET(_return, "rxonly", HASH_GET(_channel, "rxonly")); - HASH_SET(_return, "squelch", HASH_GET(_channel, "squelch")); - HASH_SET(_return, "channelmode", HASH_GET(_channel, "channelmode")); - HASH_SET(_return, "deviation", HASH_GET(_channel, "deviation")); - HASH_SET(_reutrn, "name", HASH_GET(_channel, "name")); + HASH_SET(_return,"CTCSSTx",HASH_GET(_channel,"CTCSSTx")); + HASH_SET(_return,"CTCSSRx",HASH_GET(_channel,"CTCSSRx")); + HASH_SET(_return,"modulation",HASH_GET(_channel,"modulation")); + HASH_SET(_return,"encryption",HASH_GET(_channel,"encryption")); + HASH_SET(_return,"TEK",HASH_GET(_channel,"tek")); + HASH_SET(_return,"trafficRate",HASH_GET(_channel,"trafficRate")); + HASH_SET(_return,"syncLength",HASH_GET(_channel,"phase")); + HASH_SET(_return,"optioncode",HASH_GET(_channel,"optioncode")); + HASH_SET(_return,"active",HASH_GET(_channel,"active")); + HASH_SET(_return,"rxonly",HASH_GET(_channel,"rxonly")); + HASH_SET(_return,"squelch",HASH_GET(_channel,"squelch")); + HASH_SET(_return,"channelmode",HASH_GET(_channel,"channelmode")); + HASH_SET(_return,"deviation",HASH_GET(_channel,"deviation")); + HASH_SET(_reutrn,"name",HASH_GET(_channel,"name")); }; }; _return diff --git a/addons/sys_prc117f/radio/fnc_getChannelDataInternal.sqf b/addons/sys_prc117f/radio/fnc_getChannelDataInternal.sqf index f0533699f..b8ecbead5 100644 --- a/addons/sys_prc117f/radio/fnc_getChannelDataInternal.sqf +++ b/addons/sys_prc117f/radio/fnc_getChannelDataInternal.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["_radioId"]; @@ -34,22 +34,22 @@ if ((count _this) > 1) then { if (!(isNil "_optChannelId") && {!(isNil "_opt")}) then { if (_optChannelId != _currentChannelId) then { // The current channel is not the same as the operational channel so just return - private _channel = HASHLIST_SELECT(_channels, _currentChannelId); + private _channel = HASHLIST_SELECT(_channels,_currentChannelId); _channel } else { // Get the actual channel data, then overlay it with the operational data - private _channel = HASHLIST_SELECT(_channels, _currentChannelId); + private _channel = HASHLIST_SELECT(_channels,_currentChannelId); { private _key = _x; - private _value = HASH_GET(_channel, _x); + private _value = HASH_GET(_channel,_x); - HASH_SET(_channel, _key, _value); + HASH_SET(_channel,_key,_value); } forEach HASH_KEYS(_opt); _channel }; } else { - private _channel = HASHLIST_SELECT(_channels, _currentChannelId); + private _channel = HASHLIST_SELECT(_channels,_currentChannelId); _channel }; diff --git a/addons/sys_prc117f/radio/fnc_getChannelDescription.sqf b/addons/sys_prc117f/radio/fnc_getChannelDescription.sqf index d32ccbecb..29438c5be 100644 --- a/addons/sys_prc117f/radio/fnc_getChannelDescription.sqf +++ b/addons/sys_prc117f/radio/fnc_getChannelDescription.sqf @@ -20,8 +20,8 @@ params ["_radioId"]; private _channelNumber = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _channels = [_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); -private _channelLabel = HASH_GET(_channel, "name"); +private _channelLabel = HASH_GET(_channel,"name"); format ["%1 - %2", [_channelNumber + 1, 2] call CBA_fnc_formatNumber, _channelLabel] diff --git a/addons/sys_prc117f/radio/fnc_getCurrentChannel.sqf b/addons/sys_prc117f/radio/fnc_getCurrentChannel.sqf index 909a4021d..49ef50a34 100644 --- a/addons/sys_prc117f/radio/fnc_getCurrentChannel.sqf +++ b/addons/sys_prc117f/radio/fnc_getCurrentChannel.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!GET CURRENT CHANNEL", _this); +TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!GET CURRENT CHANNEL",_this); params ["", "", "", "_radioData"]; diff --git a/addons/sys_prc117f/radio/fnc_getCurrentChannelData.sqf b/addons/sys_prc117f/radio/fnc_getCurrentChannelData.sqf index da924fa9c..d9c65c807 100644 --- a/addons/sys_prc117f/radio/fnc_getCurrentChannelData.sqf +++ b/addons/sys_prc117f/radio/fnc_getCurrentChannelData.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["", "", "", "_radioData"]; private _currentChannelId = HASH_GET(_radioData,"currentChannel"); @@ -28,41 +28,41 @@ if (isNil "_currentChannelId") then { }; }; private _radioChannels = HASH_GET(_radioData,"channels"); -private _currentChannelData = HASHLIST_SELECT(_radioChannels, _currentChannelId); +private _currentChannelData = HASHLIST_SELECT(_radioChannels,_currentChannelId); private _optChannelId = HASH_GET(_radioData,"optChannelId"); private _opt = HASH_GET(_radioData,"optChannelData"); -TRACE_4("", _currentChannelId, _currentChannelData, _optChannelId, _opt); +TRACE_4("",_currentChannelId,_currentChannelData,_optChannelId,_opt); if (!(isNil "_optChannelId") && {!(isNil "_opt")} && {_optChannelId == _currentChannelId}) then { { private _key = _x; - private _value = HASH_GET(_opt, _x); + private _value = HASH_GET(_opt,_x); - HASH_SET(_currentChannelData, _key, _value); + HASH_SET(_currentChannelData,_key,_value); } forEach HASH_KEYS(_opt); }; -private _channelType = HASH_GET(_currentChannelData, "channelMode"); +private _channelType = HASH_GET(_currentChannelData,"channelMode"); private _return = HASH_CREATE; switch _channelType do { case "BASIC": { - HASH_SET(_return, "mode", "singleChannel"); - HASH_SET(_return, "frequencyTX", HASH_GET(_currentChannelData, "frequencyTX")); - HASH_SET(_return, "frequencyRX", HASH_GET(_currentChannelData, "frequencyRX")); - if (HASH_GET(_radioData, "pgm_pa_mode") == "ON" && {HASH_GET(_radioData, "powerSource") == "VAU"}) then { - HASH_SET(_return, "power", VRC103_RACK_POWER); + HASH_SET(_return,"mode","singleChannel"); + HASH_SET(_return,"frequencyTX",HASH_GET(_currentChannelData,"frequencyTX")); + HASH_SET(_return,"frequencyRX",HASH_GET(_currentChannelData,"frequencyRX")); + if (HASH_GET(_radioData,"pgm_pa_mode") == "ON" && {HASH_GET(_radioData,"powerSource") == "VAU"}) then { + HASH_SET(_return,"power",VRC103_RACK_POWER); } else { - HASH_SET(_return, "power", HASH_GET(_currentChannelData, "power")); + HASH_SET(_return,"power",HASH_GET(_currentChannelData,"power")); }; - HASH_SET(_return, "CTCSSTx", HASH_GET(_currentChannelData, "CTCSSTx")); - HASH_SET(_return, "CTCSSRx", HASH_GET(_currentChannelData, "CTCSSRx")); - HASH_SET(_return, "modulation", HASH_GET(_currentChannelData, "modulation")); - HASH_SET(_return, "encryption", HASH_GET(_currentChannelData, "encryption")); - HASH_SET(_return, "TEK", HASH_GET(_currentChannelData, "tek")); - HASH_SET(_return, "trafficRate", HASH_GET(_currentChannelData, "trafficRate")); - HASH_SET(_return, "syncLength", HASH_GET(_currentChannelData, "phase")); + HASH_SET(_return,"CTCSSTx",HASH_GET(_currentChannelData,"CTCSSTx")); + HASH_SET(_return,"CTCSSRx",HASH_GET(_currentChannelData,"CTCSSRx")); + HASH_SET(_return,"modulation",HASH_GET(_currentChannelData,"modulation")); + HASH_SET(_return,"encryption",HASH_GET(_currentChannelData,"encryption")); + HASH_SET(_return,"TEK",HASH_GET(_currentChannelData,"tek")); + HASH_SET(_return,"trafficRate",HASH_GET(_currentChannelData,"trafficRate")); + HASH_SET(_return,"syncLength",HASH_GET(_currentChannelData,"phase")); }; }; _return diff --git a/addons/sys_prc117f/radio/fnc_getOnOffState.sqf b/addons/sys_prc117f/radio/fnc_getOnOffState.sqf index faa99d97b..316ac6a4b 100644 --- a/addons/sys_prc117f/radio/fnc_getOnOffState.sqf +++ b/addons/sys_prc117f/radio/fnc_getOnOffState.sqf @@ -18,4 +18,4 @@ params ["", "", "", "_radioData"]; -HASH_GET(_radioData, "radioOn"); +HASH_GET(_radioData,"radioOn"); diff --git a/addons/sys_prc117f/radio/fnc_getState.sqf b/addons/sys_prc117f/radio/fnc_getState.sqf index 392532f2d..2d81b9cb5 100644 --- a/addons/sys_prc117f/radio/fnc_getState.sqf +++ b/addons/sys_prc117f/radio/fnc_getState.sqf @@ -18,4 +18,4 @@ params ["", "", "_eventData", "_radioData"]; -HASH_GET(_radioData, _eventData); +HASH_GET(_radioData,_eventData); diff --git a/addons/sys_prc117f/radio/fnc_getStates.sqf b/addons/sys_prc117f/radio/fnc_getStates.sqf index 4e0cdf6db..74820d1b1 100644 --- a/addons/sys_prc117f/radio/fnc_getStates.sqf +++ b/addons/sys_prc117f/radio/fnc_getStates.sqf @@ -16,4 +16,4 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); diff --git a/addons/sys_prc117f/radio/fnc_getVolume.sqf b/addons/sys_prc117f/radio/fnc_getVolume.sqf index e26f79649..dfe2f85c7 100644 --- a/addons/sys_prc117f/radio/fnc_getVolume.sqf +++ b/addons/sys_prc117f/radio/fnc_getVolume.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["", "", "", "_radioData"]; diff --git a/addons/sys_prc117f/radio/fnc_handleBeginTransmission.sqf b/addons/sys_prc117f/radio/fnc_handleBeginTransmission.sqf index 3eb722359..8b5d67da6 100644 --- a/addons/sys_prc117f/radio/fnc_handleBeginTransmission.sqf +++ b/addons/sys_prc117f/radio/fnc_handleBeginTransmission.sqf @@ -21,9 +21,9 @@ params ["_radioId", "_eventKind", "_eventData"]; if (_radioId isNotEqualTo GVAR(currentRadioId)) exitWith { true }; // If display is open -private _currentMenu = GET_STATE_DEF("currentMenu", ""); +private _currentMenu = GET_STATE_DEF("currentMenu",""); if (_currentMenu isEqualType "" && {_currentMenu != ""}) then { - private _tmpMenu = HASH_GET(GVAR(Menus), _currentMenu); + private _tmpMenu = HASH_GET(GVAR(Menus),_currentMenu); if (!isNil "_tmpMenu") then { _currentMenu = _tmpMenu; }; diff --git a/addons/sys_prc117f/radio/fnc_handleEndTransmission.sqf b/addons/sys_prc117f/radio/fnc_handleEndTransmission.sqf index 18cff2684..82794c85d 100644 --- a/addons/sys_prc117f/radio/fnc_handleEndTransmission.sqf +++ b/addons/sys_prc117f/radio/fnc_handleEndTransmission.sqf @@ -19,25 +19,25 @@ params ["_radioId", "_eventKind", "_eventData"]; private _txId = _eventData select 0; -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); _currentTransmissions = _currentTransmissions - [_txId]; if (_currentTransmissions isEqualto []) then { - private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped"} && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); - SCRATCH_SET(_radioId, "receivingSignal", 0); + SCRATCH_SET(_radioId,"hasBeeped",false); + SCRATCH_SET(_radioId,"receivingSignal",0); }; if (_radioId isEqualTo GVAR(currentRadioId)) then { // If display is open - private _currentMenu = GET_STATE_DEF("currentMenu", ""); + private _currentMenu = GET_STATE_DEF("currentMenu",""); if (_currentMenu isEqualType "" && {_currentMenu != ""}) then { - private _tmpMenu = HASH_GET(GVAR(Menus), _currentMenu); + private _tmpMenu = HASH_GET(GVAR(Menus),_currentMenu); if (!isNil "_tmpMenu") then { _currentMenu = _tmpMenu; }; diff --git a/addons/sys_prc117f/radio/fnc_handleMultipleTransmissions.sqf b/addons/sys_prc117f/radio/fnc_handleMultipleTransmissions.sqf index 2883e3628..5a7577eb3 100644 --- a/addons/sys_prc117f/radio/fnc_handleMultipleTransmissions.sqf +++ b/addons/sys_prc117f/radio/fnc_handleMultipleTransmissions.sqf @@ -20,30 +20,30 @@ params ["_radioId","","_radios"]; if !([_radioId] call EFUNC(sys_radio,canUnitReceive)) exitWith { [] }; -if (SCRATCH_GET_DEF(_radioId, "PTTDown", false) && !EGVAR(sys_core,fullDuplex)) exitWith { [] }; -private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); +if (SCRATCH_GET_DEF(_radioId,"PTTDown",false) && !EGVAR(sys_core,fullDuplex)) exitWith { [] }; +private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); private _found = false; private _transmissionsChanged = false; -private _lastSignalTime = SCRATCH_GET_DEF(_radioId, "lastSignalTime", diag_tickTime-2); +private _lastSignalTime = SCRATCH_GET_DEF(_radioId,"lastSignalTime",diag_tickTime-2); if (diag_tickTime - _lastSignalTime > 1) then { - SCRATCH_SET(_radioId, "currentTransmissions", []); + SCRATCH_SET(_radioId,"currentTransmissions",[]); }; -SCRATCH_SET(_radioId, "lastSignalTime", diag_tickTime); +SCRATCH_SET(_radioId,"lastSignalTime",diag_tickTime); -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); if (isNil "_currentTransmissions") then { _currentTransmissions = []; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _transmissions = []; private _sortedRadios = []; private _okRadios = []; -private _lastSortTime = SCRATCH_GET_DEF(_radioId, "lastSortTime", diag_tickTime-4); -private _radioCache = SCRATCH_GET_DEF(_radioId, "currentTransmissionRadioCache", []); +private _lastSortTime = SCRATCH_GET_DEF(_radioId,"lastSortTime",diag_tickTime-4); +private _radioCache = SCRATCH_GET_DEF(_radioId,"currentTransmissionRadioCache",[]); // Restort every 3 seconds no matter what. if (diag_tickTime - _lastSortTime > 3) then { @@ -81,16 +81,16 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent"]; if (_signalData isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; - PUSH(_sorted, [ARR_2(_signalPercent,_forEachIndex)]); - PUSH(_transmissions, _txId); + PUSH(_sorted,[ARR_2(_signalPercent,_forEachIndex)]); + PUSH(_transmissions,_txId); } forEach _radios; _sorted sort false; // descending order { - PUSH(_sortedRadios, (_radios select (_x select 1))); + PUSH(_sortedRadios,(_radios select (_x select 1))); } forEach _sorted; } else { - PUSH(_transmissions, ((_radios select 0) select 1)); + PUSH(_transmissions,((_radios select 0) select 1)); if (((_radios select 0) select 2) isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; _sortedRadios = _radios; }; @@ -98,58 +98,58 @@ if (_transmissionsChanged) then { private _dif = _transmissions - _currentTransmissions; if (_dif isNotEqualTo []) then { _currentTransmissions = _transmissions; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _radioRxData = [_radioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); // diag_log text format["%1 NON-CACHED", diag_tickTime]; - if (HASH_GET(_radioRxData, "mode") == "singleChannel") then { + if (HASH_GET(_radioRxData,"mode") == "singleChannel") then { private _hearableTransmissions = []; private _junkTransmissions = []; private _digital = false; { private _txId = _x select 1; private _radioTxData = [_txId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); - if (HASH_GET(_radioRxData, "modulation") == HASH_GET(_radioTxData, "modulation")) then { + if (HASH_GET(_radioRxData,"modulation") == HASH_GET(_radioTxData,"modulation")) then { //diag_log text "MOD OK"; - if (HASH_GET(_radioRxData, "encryption") == 1 && {HASH_GET(_radioTxData, "encryption") == 1}) then { + if (HASH_GET(_radioRxData,"encryption") == 1 && {HASH_GET(_radioTxData,"encryption") == 1}) then { //diag_log text "ENCRYPTED"; - if (HASH_GET(_radioRxData, "TEK") == HASH_GET(_radioTxData, "TEK") && - {HASH_GET(_radioRxData, "trafficRate") == HASH_GET(_radioTxData, "trafficRate")} + if (HASH_GET(_radioRxData,"TEK") == HASH_GET(_radioTxData,"TEK") && + {HASH_GET(_radioRxData,"trafficRate") == HASH_GET(_radioTxData,"trafficRate")} ) then { //diag_log text "DIGITAL CRYPTO!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); _digital = true; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "encryption") == 0 && {HASH_GET(_radioTxData, "encryption") == 0}) then { + if (HASH_GET(_radioRxData,"encryption") == 0 && {HASH_GET(_radioTxData,"encryption") == 0}) then { //diag_log text "PT!"; - if (HASH_GET(_radioRxData, "modulation") == "FM" || {HASH_GET(_radioRxData, "modulation") == "NB"}) then { + if (HASH_GET(_radioRxData,"modulation") == "FM" || {HASH_GET(_radioRxData,"modulation") == "NB"}) then { //diag_log text "ITS FM BABY!"; - if (HASH_GET(_radioRxData, "CTCSSRx") == HASH_GET(_radioTxData, "CTCSSTx") || {HASH_GET(_radioRxData, "CTCSSRx") == 0}) then { + if (HASH_GET(_radioRxData,"CTCSSRx") == HASH_GET(_radioTxData,"CTCSSTx") || {HASH_GET(_radioRxData,"CTCSSRx") == 0}) then { //diag_log text "THE TONES MATCH!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData, "CTCSSRx"), HASH_GET(_radioTxData, "CTCSSTx")]; - PUSH(_junkTransmissions, _x); + //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData,"CTCSSRx"),HASH_GET(_radioTxData,"CTCSSTx")]; + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "modulation") == "AM") then { + if (HASH_GET(_radioRxData,"modulation") == "AM") then { //diag_log text "AM TALK JUNKIE!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } forEach _sortedRadios; @@ -193,44 +193,44 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent","_signalDbM"]; private _channelNum = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _channels = [_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent); - private _channel = HASHLIST_SELECT(_channels, _channelNum); - private _squelch = -118 + HASH_GET(_channel, "squelch"); + private _channel = HASHLIST_SELECT(_channels,_channelNum); + private _squelch = -118 + HASH_GET(_channel,"squelch"); // diag_log text format["squelch: %1 signal: %2", _squelch, _signalDbM]; if (_signalDbM < _squelch) then { _okRadios = []; - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped"} && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); } else { if (isNil "_beeped" || {!_beeped}) then { //diag_log "BEEP!"; - SCRATCH_SET(_radioId, "hasBeeped", true); + SCRATCH_SET(_radioId,"hasBeeped",true); private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOn", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; - SCRATCH_SET(_radioId, "receivingSignal", _signalPercent); + SCRATCH_SET(_radioId,"receivingSignal",_signalPercent); } else { - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped"} && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); - SCRATCH_SET(_radioId, "receivingSignal", 0); + SCRATCH_SET(_radioId,"hasBeeped",false); + SCRATCH_SET(_radioId,"receivingSignal",0); }; // Cache it - SCRATCH_SET(_radioId, "currentTransmissionRadioCache", _okRadios); + SCRATCH_SET(_radioId,"currentTransmissionRadioCache",_okRadios); //Force a recalculation if data is not ready if (_areAllRadiosInitialized) then { - SCRATCH_SET(_radioId, "lastSortTime", diag_tickTime); + SCRATCH_SET(_radioId,"lastSortTime",diag_tickTime); } else { - SCRATCH_SET(_radioId, "lastSortTime", -4); + SCRATCH_SET(_radioId,"lastSortTime",-4); }; } else { _okRadios = _radioCache; @@ -239,9 +239,9 @@ if (_transmissionsChanged) then { //Re-render if open. if (_radioId isEqualTo GVAR(currentRadioId)) then { // If display is open - private _currentMenu = GET_STATE_DEF("currentMenu", ""); + private _currentMenu = GET_STATE_DEF("currentMenu",""); if (_currentMenu isEqualType "" && {_currentMenu != ""}) then { - private _tmpMenu = HASH_GET(GVAR(Menus), _currentMenu); + private _tmpMenu = HASH_GET(GVAR(Menus),_currentMenu); if (!isNil "_tmpMenu") then { _currentMenu = _tmpMenu; }; diff --git a/addons/sys_prc117f/radio/fnc_handlePTTDown.sqf b/addons/sys_prc117f/radio/fnc_handlePTTDown.sqf index f4f5f62e9..2cdcddb4d 100644 --- a/addons/sys_prc117f/radio/fnc_handlePTTDown.sqf +++ b/addons/sys_prc117f/radio/fnc_handlePTTDown.sqf @@ -23,14 +23,14 @@ if !([_radioId] call EFUNC(sys_radio,canUnitTransmit)) exitWith {false}; private _channelNumber = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _channelData = [_radioId, _channelNumber] call FUNC(getChannelDataInternal); -private _rxOnly = HASH_GET(_channelData, "rxOnly"); -TRACE_3("RX ONLY", _radioId, _channelNumber, _rxOnly); +private _rxOnly = HASH_GET(_channelData,"rxOnly"); +TRACE_3("RX ONLY",_radioId,_channelNumber,_rxOnly); if (_rxOnly) exitWith { - TRACE_1("EXITING RX ONLY", _rxOnly); + TRACE_1("EXITING RX ONLY",_rxOnly); false; }; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericBeep", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", true); +SCRATCH_SET(_radioId,"PTTDown",true); true diff --git a/addons/sys_prc117f/radio/fnc_handlePTTUp.sqf b/addons/sys_prc117f/radio/fnc_handlePTTUp.sqf index c182a7a95..86311f362 100644 --- a/addons/sys_prc117f/radio/fnc_handlePTTUp.sqf +++ b/addons/sys_prc117f/radio/fnc_handlePTTUp.sqf @@ -21,12 +21,12 @@ params ["_radioId"]; private _channelNumber = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _channelData = [_radioId, _channelNumber] call FUNC(getChannelDataInternal); -private _rxOnly = HASH_GET(_channelData, "rxOnly"); +private _rxOnly = HASH_GET(_channelData,"rxOnly"); if (_rxOnly) exitWith { false }; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", false); +SCRATCH_SET(_radioId,"PTTDown",false); true; diff --git a/addons/sys_prc117f/radio/fnc_handleSignalData.sqf b/addons/sys_prc117f/radio/fnc_handleSignalData.sqf index abbd82fd4..1d18d7cbe 100644 --- a/addons/sys_prc117f/radio/fnc_handleSignalData.sqf +++ b/addons/sys_prc117f/radio/fnc_handleSignalData.sqf @@ -25,22 +25,22 @@ _radioTxData = [_txId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); _radioRxData = [_rxId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); if ( - HASH_GET(_radioRxData, "modulation") == HASH_GET(_radioTxData, "modulation") && - {HASH_GET(_radioRxData, "encryption") == HASH_GET(_radioTxData, "encryption")} && - {HASH_GET(_radioRxData, "TEK") == HASH_GET(_radioTxData, "TEK")} && - {HASH_GET(_radioRxData, "trafficRate") == HASH_GET(_radioTxData, "trafficRate")} && + HASH_GET(_radioRxData,"modulation") == HASH_GET(_radioTxData,"modulation") && + {HASH_GET(_radioRxData,"encryption") == HASH_GET(_radioTxData,"encryption")} && + {HASH_GET(_radioRxData,"TEK") == HASH_GET(_radioTxData,"TEK")} && + {HASH_GET(_radioRxData,"trafficRate") == HASH_GET(_radioTxData,"trafficRate")} && {( - HASH_GET(_rxChannel, "CTCSSRx") == HASH_GET(_radioTxData, "CTCSSTx") || - {HASH_GET(_rxChannel, "CTCSSRx") == 0} + HASH_GET(_rxChannel,"CTCSSRx") == HASH_GET(_radioTxData,"CTCSSTx") || + {HASH_GET(_rxChannel,"CTCSSRx") == 0} )} ) then { - _hearableTransmission = SCRATCH_GET(_rxId, "hearableTransmission"); + _hearableTransmission = SCRATCH_GET(_rxId,"hearableTransmission"); if (isNil "_hearableTransmission") then { _hearableTransmission = []; - SCRATCH_SET(_rxId, "hearableTransmission", _hearableTransmission); + SCRATCH_SET(_rxId,"hearableTransmission",_hearableTransmission); }; if (!(_txId in _hearableTransmission)) then { - PUSH(_hearableTransmission, _txId); + PUSH(_hearableTransmission,_txId); }; }; */ diff --git a/addons/sys_prc117f/radio/fnc_setChannelData.sqf b/addons/sys_prc117f/radio/fnc_setChannelData.sqf index 384b16415..0b85d7050 100644 --- a/addons/sys_prc117f/radio/fnc_setChannelData.sqf +++ b/addons/sys_prc117f/radio/fnc_setChannelData.sqf @@ -16,4 +16,4 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); diff --git a/addons/sys_prc117f/radio/fnc_setChannelDataOperational.sqf b/addons/sys_prc117f/radio/fnc_setChannelDataOperational.sqf index 2f110fb5c..a3bfccfa4 100644 --- a/addons/sys_prc117f/radio/fnc_setChannelDataOperational.sqf +++ b/addons/sys_prc117f/radio/fnc_setChannelDataOperational.sqf @@ -27,7 +27,7 @@ if (_optChannelId != _channelId) then { false }; -HASH_SET(_opt, _key, _value); +HASH_SET(_opt,_key,_value); [GVAR(currentRadioId), "setState", "optChannelData", _opt] call EFUNC(sys_data,dataEvent); diff --git a/addons/sys_prc117f/radio/fnc_setCurrentChannel.sqf b/addons/sys_prc117f/radio/fnc_setCurrentChannel.sqf index 6c6432a4a..8b6210698 100644 --- a/addons/sys_prc117f/radio/fnc_setCurrentChannel.sqf +++ b/addons/sys_prc117f/radio/fnc_setCurrentChannel.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["_radioId", "", "_eventData", "_radioData"]; diff --git a/addons/sys_prc117f/radio/fnc_setOnOffState.sqf b/addons/sys_prc117f/radio/fnc_setOnOffState.sqf index eb5ec1dd2..33cc3d0a9 100644 --- a/addons/sys_prc117f/radio/fnc_setOnOffState.sqf +++ b/addons/sys_prc117f/radio/fnc_setOnOffState.sqf @@ -18,7 +18,7 @@ params ["", "", "_eventData", "_radioData"]; -HASH_SET(_radioData, "radioOn", _eventData); +HASH_SET(_radioData,"radioOn",_eventData); /*if (_radioId == acre_sys_radio_currentRadioDialog) then { if (_eventData == 0) then { diff --git a/addons/sys_prc117f/radio/fnc_setState.sqf b/addons/sys_prc117f/radio/fnc_setState.sqf index 6071e0552..3ad08cc28 100644 --- a/addons/sys_prc117f/radio/fnc_setState.sqf +++ b/addons/sys_prc117f/radio/fnc_setState.sqf @@ -18,4 +18,4 @@ params ["", "", "_eventData", ""]; -HASH_SET(_radioData, _eventData select 0, _eventData select 1); +HASH_SET(_radioData,_eventData select 0,_eventData select 1); diff --git a/addons/sys_prc117f/radio/fnc_setVolume.sqf b/addons/sys_prc117f/radio/fnc_setVolume.sqf index 4777f7677..437b1d348 100644 --- a/addons/sys_prc117f/radio/fnc_setVolume.sqf +++ b/addons/sys_prc117f/radio/fnc_setVolume.sqf @@ -24,12 +24,12 @@ if (_vol % 0.10 != 0) then { _vol = _vol- (_vol % 0.10); }; -HASH_SET(_radioData, "volume", _eventData); +HASH_SET(_radioData,"volume",_eventData); -TRACE_3("VOLUME SET",_radioId, _vol, _radioData); +TRACE_3("VOLUME SET",_radioId,_vol,_radioData); if (IS_STRING(GVAR(currentRadioId)) && {GVAR(currentRadioId) == _radioId}) then { - private _currentMenu = GET_STATE_DEF("currentMenu", GVAR(VULOSHOME)); - TRACE_2("", GVAR(currentRadioId), _currentMenu); + private _currentMenu = GET_STATE_DEF("currentMenu",GVAR(VULOSHOME)); + TRACE_2("",GVAR(currentRadioId),_currentMenu); [_currentMenu, ["VOLUME", _vol] ] call FUNC(changeValueAck); }; diff --git a/addons/sys_prc148/fnc_initializeRadio.sqf b/addons/sys_prc148/fnc_initializeRadio.sqf index 11b2a417f..87b64bf0d 100644 --- a/addons/sys_prc148/fnc_initializeRadio.sqf +++ b/addons/sys_prc148/fnc_initializeRadio.sqf @@ -18,17 +18,17 @@ params ["_radioId", "_event", "_eventData", "_radioData"]; -HASH_SET(_radioData, "currentState", "DefaultDisplay"); -HASH_SET(_radioData, "menuPage", 0); -HASH_SET(_radioData, "menuIndex", 0); -HASH_SET(_radioData, "entryCursor", 0); -HASH_SET(_radioData, "selectedEntry", -1); -HASH_SET(_radioData, "editEntry", false); -HASH_SET(_radioData, "currentEditEntry", ""); -HASH_SET(_radioData, "volume", EGVAR(sys_core,defaultRadioVolume)); -HASH_SET(_radioData, "radioOn", 1); -HASH_SET(_radioData, "audioPath", "TOPAUDIO"); -HASH_SET(_radioData, "powerSource", "BAT"); +HASH_SET(_radioData,"currentState","DefaultDisplay"); +HASH_SET(_radioData,"menuPage",0); +HASH_SET(_radioData,"menuIndex",0); +HASH_SET(_radioData,"entryCursor",0); +HASH_SET(_radioData,"selectedEntry",-1); +HASH_SET(_radioData,"editEntry",false); +HASH_SET(_radioData,"currentEditEntry",""); +HASH_SET(_radioData,"volume",EGVAR(sys_core,defaultRadioVolume)); +HASH_SET(_radioData,"radioOn",1); +HASH_SET(_radioData,"audioPath","TOPAUDIO"); +HASH_SET(_radioData,"powerSource","BAT"); _eventData params ["_baseName", "_preset"]; private _presetData = [_baseName, _preset] call EFUNC(sys_data,getPresetData); @@ -37,15 +37,15 @@ private _channels = HASH_GET(_presetData,"channels"); private _currentChannels = HASH_GET(_radioData,"channels"); -SCRATCH_SET(_radioId, "currentTransmissions", []); +SCRATCH_SET(_radioId,"currentTransmissions",[]); if (isNil "_currentChannels") then { _currentChannels = HASH_COPY(_channels); HASH_SET(_radioData,"channels",_currentChannels); }; -HASH_SET(_radioData, "channelKnobPosition", 0); -HASH_SET(_radioData, "currentGroup", 0); +HASH_SET(_radioData,"channelKnobPosition",0); +HASH_SET(_radioData,"currentGroup",0); private _groups = HASH_GET(_presetData,"groups"); -HASH_SET(_radioData, "groups", +_groups); +HASH_SET(_radioData,"groups",+_groups); diff --git a/addons/sys_prc148/fnc_preset_information.sqf b/addons/sys_prc148/fnc_preset_information.sqf index 8c6d021e1..19a1bff31 100644 --- a/addons/sys_prc148/fnc_preset_information.sqf +++ b/addons/sys_prc148/fnc_preset_information.sqf @@ -32,17 +32,17 @@ for "_i" from 0 to 31 do { }; } forEach _usedPresetFrequencies; if (_ok || (count _usedPresetFrequencies) == 0) then { - PUSH(_usedPresetFrequencies, _frequency); + PUSH(_usedPresetFrequencies,_frequency); }; }; HASH_SET(_channel,"frequencyTX",_frequency); HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); HASH_SET(_channel,"label","CHAN " + str(_i+1)); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"TEK",1); @@ -51,7 +51,7 @@ for "_i" from 0 to 31 do { HASH_SET(_channel,"phase",256); HASH_SET(_channel,"squelch",3); - HASHLIST_PUSH(_channels, _channel); + HASHLIST_PUSH(_channels,_channel); }; HASH_SET(_presetData,"channels",_channels); private _groups = [ @@ -91,17 +91,17 @@ for "_i" from 0 to 31 do { }; } forEach _usedPresetFrequencies; if (_ok || (count _usedPresetFrequencies) == 0) then { - PUSH(_usedPresetFrequencies, _frequency); + PUSH(_usedPresetFrequencies,_frequency); }; }; HASH_SET(_channel,"frequencyTX",_frequency); HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); HASH_SET(_channel,"label","CHAN " + str(_i+1)); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"TEK",1); @@ -110,7 +110,7 @@ for "_i" from 0 to 31 do { HASH_SET(_channel,"phase",256); HASH_SET(_channel,"squelch",3); - HASHLIST_PUSH(_channels, _channel); + HASHLIST_PUSH(_channels,_channel); }; HASH_SET(_presetData,"channels",_channels); _groups = [ @@ -150,17 +150,17 @@ for "_i" from 0 to 31 do { }; } forEach _usedPresetFrequencies; if (_ok || (count _usedPresetFrequencies) == 0) then { - PUSH(_usedPresetFrequencies, _frequency); + PUSH(_usedPresetFrequencies,_frequency); }; }; HASH_SET(_channel,"frequencyTX",_frequency); HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); HASH_SET(_channel,"label","CHAN " + str(_i+1)); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"TEK",1); @@ -169,7 +169,7 @@ for "_i" from 0 to 31 do { HASH_SET(_channel,"phase",256); HASH_SET(_channel,"squelch",3); - HASHLIST_PUSH(_channels, _channel); + HASHLIST_PUSH(_channels,_channel); }; HASH_SET(_presetData,"channels",_channels); _groups = [ @@ -209,17 +209,17 @@ for "_i" from 0 to 31 do { }; } forEach _usedPresetFrequencies; if (_ok || (count _usedPresetFrequencies) == 0) then { - PUSH(_usedPresetFrequencies, _frequency); + PUSH(_usedPresetFrequencies,_frequency); }; }; HASH_SET(_channel,"frequencyTX",_frequency); HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); HASH_SET(_channel,"label","CHAN " + str(_i+1)); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"TEK",1); @@ -228,7 +228,7 @@ for "_i" from 0 to 31 do { HASH_SET(_channel,"phase",256); HASH_SET(_channel,"squelch",3); - HASHLIST_PUSH(_channels, _channel); + HASHLIST_PUSH(_channels,_channel); }; HASH_SET(_presetData,"channels",_channels); _groups = [ @@ -264,12 +264,12 @@ private _numeric = "1234567890"; private _array = toArray _alpha; { - PUSH(GVAR(alpha), (toString [_x])); + PUSH(GVAR(alpha),(toString [_x])); } forEach _array; _array = toArray _numeric; { - PUSH(GVAR(numeric), (toString [_x])); + PUSH(GVAR(numeric),(toString [_x])); } forEach _array; DGVAR(alphaNumeric) = GVAR(numeric) + GVAR(alpha); diff --git a/addons/sys_prc148/fnc_render.sqf b/addons/sys_prc148/fnc_render.sqf index ddcd58d16..2953e118e 100644 --- a/addons/sys_prc148/fnc_render.sqf +++ b/addons/sys_prc148/fnc_render.sqf @@ -22,8 +22,8 @@ params ["_display"]; uiNamespace setVariable [QGVAR(currentDisplay), _display]; -SCRATCH_SET(GVAR(currentRadioId), "flashingText", []); -SCRATCH_SET(GVAR(currentRadioId), "animations", []); +SCRATCH_SET(GVAR(currentRadioId),"flashingText",[]); +SCRATCH_SET(GVAR(currentRadioId),"animations",[]); [_display, ICON_BATSTRENGTH, false] call FUNC(showIcon); [_display, ICON_BATTERY, false] call FUNC(showIcon); [_display, ICON_SQUELCH, false] call FUNC(showIcon); @@ -54,7 +54,7 @@ SCRATCH_SET(GVAR(currentRadioId), "animations", []); [_display, BIG_LINE_4, " ", LEFT_ALIGN] call FUNC(displayLine); private _currentVolume = GET_STATE("volume"); //from 0 to 1 -RADIO_CTRL(12010+201) ctrlSetTooltip format ["%1: %2%3", LELSTRING(sys_radio,ui_CurrentVolume), round (_currentVolume * 100), "%"]; +RADIO_CTRL(12010+201) ctrlSetTooltip format ["%1: %2%3", LELSTRING(sys_radio,ui_CurrentVolume),round (_currentVolume * 100), "%"]; private _knobImageStr = format["\idi\acre\addons\sys_prc148\Data\knobs\volume\prc148_ui_vol_%1.paa", round(_currentVolume * 5)]; TRACE_1("VolumeKnob",_knobImageStr); diff --git a/addons/sys_prc148/menus/__PREP__.sqf b/addons/sys_prc148/menus/__PREP__.sqf index 0439fff7a..b67be33da 100644 --- a/addons/sys_prc148/menus/__PREP__.sqf +++ b/addons/sys_prc148/menus/__PREP__.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -TRACE_1("enter", _this); +TRACE_1("enter",_this); PREP_MODULE(menus,addAnimation); PREP_MODULE(menus,changeState); diff --git a/addons/sys_prc148/menus/fnc_PFH.sqf b/addons/sys_prc148/menus/fnc_PFH.sqf index 7f382a494..44b7bb125 100644 --- a/addons/sys_prc148/menus/fnc_PFH.sqf +++ b/addons/sys_prc148/menus/fnc_PFH.sqf @@ -17,8 +17,8 @@ */ private _display = uiNamespace getVariable QGVAR(currentDisplay); -private _flashingText = SCRATCH_GET_DEF(GVAR(currentRadioId), "flashingText", []); -private _flashingState = SCRATCH_GET_DEF(GVAR(currentRadioId), "flashingTextState", false); +private _flashingText = SCRATCH_GET_DEF(GVAR(currentRadioId),"flashingText",[]); +private _flashingState = SCRATCH_GET_DEF(GVAR(currentRadioId),"flashingTextState",false); private _color = [0, 0, 0, 1]; if (_flashingState) then { _color = [123/255, 179/255, 118/255, 1]; @@ -34,9 +34,9 @@ if (_flashingState) then { }; } forEach _flashingText; -SCRATCH_SET(GVAR(currentRadioId), "flashingTextState", !_flashingState); +SCRATCH_SET(GVAR(currentRadioId),"flashingTextState",!_flashingState); -private _animations = SCRATCH_GET_DEF(GVAR(currentRadioId), "animations", []); +private _animations = SCRATCH_GET_DEF(GVAR(currentRadioId),"animations",[]); { [(_x select 0), (_x select 1)] call (_x select 2); diff --git a/addons/sys_prc148/menus/fnc_addAnimation.sqf b/addons/sys_prc148/menus/fnc_addAnimation.sqf index d38fb3927..3f44129b4 100644 --- a/addons/sys_prc148/menus/fnc_addAnimation.sqf +++ b/addons/sys_prc148/menus/fnc_addAnimation.sqf @@ -16,7 +16,7 @@ * Public: No */ -private _animations = SCRATCH_GET_DEF(GVAR(currentRadioId), "animations", []); +private _animations = SCRATCH_GET_DEF(GVAR(currentRadioId),"animations",[]); params ["_func", "_args"]; private _id = (count _animations); diff --git a/addons/sys_prc148/menus/fnc_defaultButtonHandler.sqf b/addons/sys_prc148/menus/fnc_defaultButtonHandler.sqf index bf557a6e2..894e7987f 100644 --- a/addons/sys_prc148/menus/fnc_defaultButtonHandler.sqf +++ b/addons/sys_prc148/menus/fnc_defaultButtonHandler.sqf @@ -36,9 +36,9 @@ if (_button == "ESC") then { if (_button == "GR") then { // SET_PAGE_INDEX(0); // SET_MENU_INDEX(0); - SET_STATE("currentEditEntry", GET_STATE_DEF("currentGroup", 0)); + SET_STATE("currentEditEntry",GET_STATE_DEF("currentGroup",0)); [GVAR(currentRadioId), "GroupDisplay", 0, 0, 0, 0] call FUNC(changeState); - // SET_STATE("editEntry", true); + // SET_STATE("editEntry",true); }; if (_button == "MODE") then { _this call FUNC(handleModeButton); diff --git a/addons/sys_prc148/menus/fnc_displayLine.sqf b/addons/sys_prc148/menus/fnc_displayLine.sqf index 1985b0817..ead73ff0a 100644 --- a/addons/sys_prc148/menus/fnc_displayLine.sqf +++ b/addons/sys_prc148/menus/fnc_displayLine.sqf @@ -28,7 +28,7 @@ switch _align do { private _offset = floor ((_size-(count _textArray))/2); private _offsetArray = []; for "_i" from 1 to _offset do { - PUSH(_offsetArray, (toArray " ")); + PUSH(_offsetArray,(toArray " ")); }; _textArray = _offsetArray + _textArray; }; @@ -36,7 +36,7 @@ switch _align do { private _offset = floor ((_size-(count _textArray))); private _offsetArray = []; for "_i" from 1 to _offset do { - PUSH(_offsetArray, (toArray " ")); + PUSH(_offsetArray,(toArray " ")); }; _textArray = _offsetArray + _textArray; }; diff --git a/addons/sys_prc148/menus/fnc_handleEscButton.sqf b/addons/sys_prc148/menus/fnc_handleEscButton.sqf index 68647d9ac..42e7368f5 100644 --- a/addons/sys_prc148/menus/fnc_handleEscButton.sqf +++ b/addons/sys_prc148/menus/fnc_handleEscButton.sqf @@ -17,6 +17,6 @@ */ if (GET_STATE("editEntry")) then { - SET_STATE("editEntry", false); - SET_STATE("currentEditEntry", ""); + SET_STATE("editEntry",false); + SET_STATE("currentEditEntry",""); }; diff --git a/addons/sys_prc148/menus/fnc_handleMenuButtonEnter.sqf b/addons/sys_prc148/menus/fnc_handleMenuButtonEnter.sqf index 559efc230..afb4afadd 100644 --- a/addons/sys_prc148/menus/fnc_handleMenuButtonEnter.sqf +++ b/addons/sys_prc148/menus/fnc_handleMenuButtonEnter.sqf @@ -18,14 +18,14 @@ private _menuEntry = (GVAR(currentMenu) select (GVAR(entryMap) select 0)) select (GVAR(entryMap) select 1); if (!GET_STATE("editEntry")) then { - SET_STATE("editEntry", true); + SET_STATE("editEntry",true); _menuEntry = (GVAR(currentMenu) select (GVAR(entryMap) select 0)) select (GVAR(entryMap) select 1); _menuEntry params ["", "_value", "_row", "_range", "_type"]; switch _type do { case MENU_TYPE_TEXT: { SET_ENTRY_INDEX(0); - SET_STATE("currentEditEntry", _value); + SET_STATE("currentEditEntry",_value); }; case MENU_TYPE_NUM: { private _format = _menuEntry select 6; @@ -48,17 +48,17 @@ if (!GET_STATE("editEntry")) then { //acre_player sideChat format["VAL: '%1'", _value]; private _length = (count (toArray _value)) - 1; SET_ENTRY_INDEX(_length); - SET_STATE("currentEditEntry", _value); + SET_STATE("currentEditEntry",_value); }; case MENU_TYPE_LIST: { - SET_STATE("currentEditEntry", _value); + SET_STATE("currentEditEntry",_value); }; case MENU_TYPE_MENU: { private _call = _menuEntry select 5; private _newValue = GET_STATE("currentEditEntry"); [_newValue, _menuEntry] call _call; - SET_STATE("editEntry", false); - SET_STATE("currentEditEntry", "") + SET_STATE("editEntry",false); + SET_STATE("currentEditEntry","") }; }; } else { @@ -66,7 +66,7 @@ if (!GET_STATE("editEntry")) then { private _call = _menuEntry select 5; private _newValue = GET_STATE("currentEditEntry"); [_newValue, _menuEntry] call _call; - SET_STATE("editEntry", false); - SET_STATE("currentEditEntry", "") + SET_STATE("editEntry",false); + SET_STATE("currentEditEntry","") }; diff --git a/addons/sys_prc148/menus/fnc_handleMenuDirButton.sqf b/addons/sys_prc148/menus/fnc_handleMenuDirButton.sqf index 9acce5c1b..ee5905462 100644 --- a/addons/sys_prc148/menus/fnc_handleMenuDirButton.sqf +++ b/addons/sys_prc148/menus/fnc_handleMenuDirButton.sqf @@ -65,7 +65,7 @@ if (GET_STATE("editEntry")) then { _index = 0; }; _value = _list select _index; - SET_STATE("currentEditEntry", _value); + SET_STATE("currentEditEntry",_value); }; case MENU_TYPE_TEXT: { private _entryIndex = ENTRY_INDEX; @@ -91,7 +91,7 @@ if (GET_STATE("editEntry")) then { //acre_player sideChat format["_valArray after: %1", _valArray]; _value = toString _valArray; - SET_STATE("currentEditEntry", _value); + SET_STATE("currentEditEntry",_value); }; case MENU_TYPE_NUM: { @@ -112,7 +112,7 @@ if (GET_STATE("editEntry")) then { //acre_player sideChat format["_valArray after: %1", _valArray]; _value = toString _valArray; - SET_STATE("currentEditEntry", _value); + SET_STATE("currentEditEntry",_value); }; }; }; diff --git a/addons/sys_prc148/menus/fnc_onChannelKnobPress.sqf b/addons/sys_prc148/menus/fnc_onChannelKnobPress.sqf index c5681bb5b..5bf48622d 100644 --- a/addons/sys_prc148/menus/fnc_onChannelKnobPress.sqf +++ b/addons/sys_prc148/menus/fnc_onChannelKnobPress.sqf @@ -38,7 +38,7 @@ if (_channelPosition < 0) then { }; if (_channelPositionOld != _channelPosition) then { ["Acre_GenericClick", [0, 0, 0], [0, 0, 0], 0.6, false] call EFUNC(sys_sounds,playSound); - SET_STATE_CRIT("channelKnobPosition", _channelPosition); + SET_STATE_CRIT("channelKnobPosition",_channelPosition); if (_channelPosition > (count (_group select 1))-1) then { @@ -50,8 +50,8 @@ if (_channelPositionOld != _channelPosition) then { // [GVAR(currentRadioId), "DefaultDisplay"] call FUNC(changeState); // }; if (GET_STATE("editEntry")) then { - SET_STATE("editEntry", false); - SET_STATE("currentEditEntry", ""); + SET_STATE("editEntry",false); + SET_STATE("currentEditEntry",""); }; [GET_DISPLAY] call FUNC(render); }; diff --git a/addons/sys_prc148/menus/fnc_onVolumeKnobPress.sqf b/addons/sys_prc148/menus/fnc_onVolumeKnobPress.sqf index 5f06c90af..9ddb2e367 100644 --- a/addons/sys_prc148/menus/fnc_onVolumeKnobPress.sqf +++ b/addons/sys_prc148/menus/fnc_onVolumeKnobPress.sqf @@ -40,7 +40,7 @@ if (_currentVolume != _newVolume) then { if (_newVolume >= 0.2) then { ["Acre_GenericClick", [0, 0, 0], [0, 0, 0], _newVolume^3, false] call EFUNC(sys_sounds,playSound); ["setVolume", _newVolume] call GUI_DATA_EVENT; - RADIO_CTRL(12010+201) ctrlSetTooltip format ["%1: %2%3", LELSTRING(sys_radio,ui_CurrentVolume), round (_newVolume*100), "%"]; + RADIO_CTRL(12010+201) ctrlSetTooltip format ["%1: %2%3", LELSTRING(sys_radio,ui_CurrentVolume),round (_newVolume*100), "%"]; }; if (_newVolume < 0.2 /*&& _ctrl*/) then { ["setVolume", 0] call GUI_DATA_EVENT; diff --git a/addons/sys_prc148/menus/fnc_removeAnimation.sqf b/addons/sys_prc148/menus/fnc_removeAnimation.sqf index 4ad60635e..1027c4cd9 100644 --- a/addons/sys_prc148/menus/fnc_removeAnimation.sqf +++ b/addons/sys_prc148/menus/fnc_removeAnimation.sqf @@ -18,5 +18,5 @@ params ["_id"]; -private _animations = SCRATCH_GET_DEF(GVAR(currentRadioId), "animations", []); +private _animations = SCRATCH_GET_DEF(GVAR(currentRadioId),"animations",[]); _animations set [_id, []]; diff --git a/addons/sys_prc148/menus/fnc_startFlashText.sqf b/addons/sys_prc148/menus/fnc_startFlashText.sqf index 04969a184..8ab332a58 100644 --- a/addons/sys_prc148/menus/fnc_startFlashText.sqf +++ b/addons/sys_prc148/menus/fnc_startFlashText.sqf @@ -18,9 +18,9 @@ params ["_display", "_row", "_range"]; -private _flashingText = SCRATCH_GET_DEF(GVAR(currentRadioId), "flashingText", []); +private _flashingText = SCRATCH_GET_DEF(GVAR(currentRadioId),"flashingText",[]); private _id = count _flashingText; _flashingText set [_id, [_row, _range]]; -SCRATCH_SET(GVAR(currentRadioId), "flashingText", _flashingText); +SCRATCH_SET(GVAR(currentRadioId),"flashingText",_flashingText); hintSilent format["GVAR(currentRadioId): %1", GVAR(currentRadioId)]; _id; diff --git a/addons/sys_prc148/menus/fnc_updateChannelData.sqf b/addons/sys_prc148/menus/fnc_updateChannelData.sqf index 30f039c41..d90a49460 100644 --- a/addons/sys_prc148/menus/fnc_updateChannelData.sqf +++ b/addons/sys_prc148/menus/fnc_updateChannelData.sqf @@ -20,13 +20,13 @@ params ["_newVal", "_entry"]; _entry params ["_key", "_oldVal"]; private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; -private _channel = HASHLIST_SELECT(GET_STATE("channels"), _channelNumber); +private _channel = HASHLIST_SELECT(GET_STATE("channels"),_channelNumber); if (_key == "frequencyRX" || {_key == "frequencyTX"}) then { _oldVal = (parseNumber _oldVal)/100000; // //diag_log text format["new freq: %1", _newVal]; _newVal = parseNumber _newVal; // //diag_log text format["parse freq: %1", _newVal]; - private _modulation = HASH_GET(_channel, "modulation"); + private _modulation = HASH_GET(_channel,"modulation"); private _spacing = 500; if (_modulation == "NB") then { _spacing = 625; @@ -48,27 +48,27 @@ if (_key == "frequencyRX" || {_key == "frequencyTX"}) then { }; switch _key do { case "frequencyRX": { - HASH_SET(_channel, "frequencyTX", _newVal); + HASH_SET(_channel,"frequencyTX",_newVal); }; case "CTCSSRx": { - HASH_SET(_channel, "CTCSSTx", _newVal); + HASH_SET(_channel,"CTCSSTx",_newVal); }; case "modulation": { if (_newVal == "AM") then { - private _power = HASH_GET(_channel, "power"); + private _power = HASH_GET(_channel,"power"); if (_power != 1000 && {_power != 5000}) then { - HASH_SET(_channel, "power", 1000); + HASH_SET(_channel,"power",1000); }; - HASH_SET(_channel,"CTCSSTx", 0); - HASH_SET(_channel,"CTCSSRx", 0); + HASH_SET(_channel,"CTCSSTx",0); + HASH_SET(_channel,"CTCSSRx",0); }; if (_newVal == "NB") then { - HASH_SET(_channel, "encryption", 0); + HASH_SET(_channel,"encryption",0); }; }; }; // //diag_log text format["old: %1 new: %2", typeName _oldVal, typeName _newVal]; if (_newVal != _oldVal) then { - HASH_SET(_channel, _key, _newVal); + HASH_SET(_channel,_key,_newVal); ["setChannelData", [_channelNumber, _channel]] call GUI_DATA_EVENT; }; diff --git a/addons/sys_prc148/radio/__PREP__.sqf b/addons/sys_prc148/radio/__PREP__.sqf index 0421e2587..d6973bf78 100644 --- a/addons/sys_prc148/radio/__PREP__.sqf +++ b/addons/sys_prc148/radio/__PREP__.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -TRACE_1("enter", _this); +TRACE_1("enter",_this); PREP_MODULE(radio,getChannelData); PREP_MODULE(radio,getChannelDataInternal); diff --git a/addons/sys_prc148/radio/fnc_getChannelData.sqf b/addons/sys_prc148/radio/fnc_getChannelData.sqf index e29051e1a..1b137ef17 100644 --- a/addons/sys_prc148/radio/fnc_getChannelData.sqf +++ b/addons/sys_prc148/radio/fnc_getChannelData.sqf @@ -18,7 +18,7 @@ params ["_radioId", "", "_eventData", "_radioData"]; -private _cachedChannels = SCRATCH_GET_DEF(_radioId, "cachedFullChannels", []); +private _cachedChannels = SCRATCH_GET_DEF(_radioId,"cachedFullChannels",[]); private _return = nil; if (_eventData < (count _cachedChannels)) then { _return = _cachedChannels select _eventData; diff --git a/addons/sys_prc148/radio/fnc_getChannelDataInternal.sqf b/addons/sys_prc148/radio/fnc_getChannelDataInternal.sqf index 4cf67aa95..b0bab0094 100644 --- a/addons/sys_prc148/radio/fnc_getChannelDataInternal.sqf +++ b/addons/sys_prc148/radio/fnc_getChannelDataInternal.sqf @@ -18,30 +18,30 @@ params ["_channelNumber", "_radioData"]; -private _channels = HASH_GET(_radioData, "channels"); -private _powerSource = HASH_GET(_radioData, "powerSource"); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); +private _channels = HASH_GET(_radioData,"channels"); +private _powerSource = HASH_GET(_radioData,"powerSource"); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); -private _channelType = HASH_GET(_channel, "channelMode"); +private _channelType = HASH_GET(_channel,"channelMode"); private _return = HASH_CREATE; switch _channelType do { case "BASIC": { - HASH_SET(_return, "mode", "singleChannel"); - HASH_SET(_return, "frequencyTX", HASH_GET(_channel, "frequencyTX")); - HASH_SET(_return, "frequencyRX", HASH_GET(_channel, "frequencyRX")); + HASH_SET(_return,"mode","singleChannel"); + HASH_SET(_return,"frequencyTX",HASH_GET(_channel,"frequencyTX")); + HASH_SET(_return,"frequencyRX",HASH_GET(_channel,"frequencyRX")); if (_powerSource == "BAT") then { - HASH_SET(_return, "power", HASH_GET(_channel, "power")); + HASH_SET(_return,"power",HASH_GET(_channel,"power")); } else { // RACK BOOST - HASH_SET(_return, "power", VRC111_RACK_POWER); + HASH_SET(_return,"power",VRC111_RACK_POWER); }; - HASH_SET(_return, "CTCSSTx", HASH_GET(_channel, "CTCSSTx")); - HASH_SET(_return, "CTCSSRx", HASH_GET(_channel, "CTCSSRx")); - HASH_SET(_return, "modulation", HASH_GET(_channel, "modulation")); - HASH_SET(_return, "encryption", HASH_GET(_channel, "encryption")); - HASH_SET(_return, "TEK", HASH_GET(_channel, "tek")); - HASH_SET(_return, "trafficRate", HASH_GET(_channel, "trafficRate")); - HASH_SET(_return, "syncLength", HASH_GET(_channel, "phase")); + HASH_SET(_return,"CTCSSTx",HASH_GET(_channel,"CTCSSTx")); + HASH_SET(_return,"CTCSSRx",HASH_GET(_channel,"CTCSSRx")); + HASH_SET(_return,"modulation",HASH_GET(_channel,"modulation")); + HASH_SET(_return,"encryption",HASH_GET(_channel,"encryption")); + HASH_SET(_return,"TEK",HASH_GET(_channel,"tek")); + HASH_SET(_return,"trafficRate",HASH_GET(_channel,"trafficRate")); + HASH_SET(_return,"syncLength",HASH_GET(_channel,"phase")); }; }; _return diff --git a/addons/sys_prc148/radio/fnc_getChannelDescription.sqf b/addons/sys_prc148/radio/fnc_getChannelDescription.sqf index 5ce9f0b68..62c67e594 100644 --- a/addons/sys_prc148/radio/fnc_getChannelDescription.sqf +++ b/addons/sys_prc148/radio/fnc_getChannelDescription.sqf @@ -22,8 +22,8 @@ private _group = ([_radioId, "getState", "groups"] call EFUNC(sys_data,dataEvent private _channelNumber = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _groupLabel = _group select 0; private _channels = [_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); -private _channelLabel = HASH_GET(_channel, "label"); +private _channelLabel = HASH_GET(_channel,"label"); format ["%1 - %2", _groupLabel, _channelLabel] diff --git a/addons/sys_prc148/radio/fnc_getCurrentChannelData.sqf b/addons/sys_prc148/radio/fnc_getCurrentChannelData.sqf index f623b76c1..1a12d4567 100644 --- a/addons/sys_prc148/radio/fnc_getCurrentChannelData.sqf +++ b/addons/sys_prc148/radio/fnc_getCurrentChannelData.sqf @@ -22,7 +22,7 @@ private _channelNumber = HASH_GET(_radioData,"currentChannel"); if (isNil "_channelNumber") then { _channelNumber = 0; }; -private _cachedChannels = SCRATCH_GET_DEF(_radioId, "cachedFullChannels", []); +private _cachedChannels = SCRATCH_GET_DEF(_radioId,"cachedFullChannels",[]); private _return = nil; if (_channelNumber < (count _cachedChannels)) then { _return = _cachedChannels select _channelNumber; @@ -33,6 +33,6 @@ if (isNil "_return") then { // _iend = diag_tickTime; // diag_log text format["i: %1", _iend-_istart]; _cachedChannels set[_channelNumber, _return]; - SCRATCH_SET(_radioId, "cachedFullChannels", _cachedChannels); + SCRATCH_SET(_radioId,"cachedFullChannels",_cachedChannels); }; _return; diff --git a/addons/sys_prc148/radio/fnc_getOnOffState.sqf b/addons/sys_prc148/radio/fnc_getOnOffState.sqf index a00810728..a96b04b3e 100644 --- a/addons/sys_prc148/radio/fnc_getOnOffState.sqf +++ b/addons/sys_prc148/radio/fnc_getOnOffState.sqf @@ -18,4 +18,4 @@ params ["", "", "", "_radioData"]; -HASH_GET(_radioData, "radioOn"); +HASH_GET(_radioData,"radioOn"); diff --git a/addons/sys_prc148/radio/fnc_getState.sqf b/addons/sys_prc148/radio/fnc_getState.sqf index 9c6b73bc6..fcbcaebe0 100644 --- a/addons/sys_prc148/radio/fnc_getState.sqf +++ b/addons/sys_prc148/radio/fnc_getState.sqf @@ -18,4 +18,4 @@ params ["", "", "_eventData", "_radioData"]; -HASH_GET(_radioData, _eventData); +HASH_GET(_radioData,_eventData); diff --git a/addons/sys_prc148/radio/fnc_getVolume.sqf b/addons/sys_prc148/radio/fnc_getVolume.sqf index 1fc7f468a..5c8891e79 100644 --- a/addons/sys_prc148/radio/fnc_getVolume.sqf +++ b/addons/sys_prc148/radio/fnc_getVolume.sqf @@ -18,9 +18,9 @@ params ["", "", "", "_radioData"]; -private _volume = HASH_GET(_radioData, "volume"); +private _volume = HASH_GET(_radioData,"volume"); -if ((HASH_GET(_radioData, "audioPath") == "INTAUDIO")) then { +if ((HASH_GET(_radioData,"audioPath") == "INTAUDIO")) then { _volume = _volume*0.75; }; diff --git a/addons/sys_prc148/radio/fnc_handleEndTransmission.sqf b/addons/sys_prc148/radio/fnc_handleEndTransmission.sqf index a315d5643..0cfa03a89 100644 --- a/addons/sys_prc148/radio/fnc_handleEndTransmission.sqf +++ b/addons/sys_prc148/radio/fnc_handleEndTransmission.sqf @@ -19,19 +19,19 @@ params ["_radioId", "", "_eventData"]; _eventData params ["_txId"]; -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); _currentTransmissions = _currentTransmissions - [_txId]; if (_currentTransmissions isEqualTo []) then { - private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown) then { if (!isNil "_beeped" && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); }; true; diff --git a/addons/sys_prc148/radio/fnc_handleMultipleTransmissions.sqf b/addons/sys_prc148/radio/fnc_handleMultipleTransmissions.sqf index a62e79cb2..5a7b18733 100644 --- a/addons/sys_prc148/radio/fnc_handleMultipleTransmissions.sqf +++ b/addons/sys_prc148/radio/fnc_handleMultipleTransmissions.sqf @@ -20,31 +20,31 @@ params ["_radioId","","_radios"]; if !([_radioId] call EFUNC(sys_radio,canUnitReceive)) exitWith { [] }; -if (SCRATCH_GET_DEF(_radioId, "PTTDown", false) && {!EGVAR(sys_core,fullDuplex)}) exitWith { [] }; -private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); +if (SCRATCH_GET_DEF(_radioId,"PTTDown",false) && {!EGVAR(sys_core,fullDuplex)}) exitWith { [] }; +private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); private _found = false; private _transmissionsChanged = false; -private _lastSignalTime = SCRATCH_GET_DEF(_radioId, "lastSignalTime", diag_tickTime-2); +private _lastSignalTime = SCRATCH_GET_DEF(_radioId,"lastSignalTime",diag_tickTime-2); if (diag_tickTime - _lastSignalTime > 1) then { - SCRATCH_SET(_radioId, "currentTransmissions", []); + SCRATCH_SET(_radioId,"currentTransmissions",[]); }; -SCRATCH_SET(_radioId, "lastSignalTime", diag_tickTime); +SCRATCH_SET(_radioId,"lastSignalTime",diag_tickTime); -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); if (isNil "_currentTransmissions") then { _currentTransmissions = []; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _transmissions = []; private _sortedRadios = []; private _okRadios = []; -private _lastSortTime = SCRATCH_GET_DEF(_radioId, "lastSortTime", diag_tickTime-4); -private _radioCache = SCRATCH_GET_DEF(_radioId, "currentTransmissionRadioCache", []); +private _lastSortTime = SCRATCH_GET_DEF(_radioId,"lastSortTime",diag_tickTime-4); +private _radioCache = SCRATCH_GET_DEF(_radioId,"currentTransmissionRadioCache",[]); // Restort every 3 seconds no matter what. if (diag_tickTime - _lastSortTime > 3) then { @@ -82,16 +82,16 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent"]; if (_signalData isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; - PUSH(_sorted, [ARR_2(_signalPercent, _forEachIndex)]); - PUSH(_transmissions, _txId); + PUSH(_sorted,[ARR_2(_signalPercent,_forEachIndex)]); + PUSH(_transmissions,_txId); } forEach _radios; _sorted sort false; // descending order { - PUSH(_sortedRadios, (_radios select (_x select 1))); + PUSH(_sortedRadios,(_radios select (_x select 1))); } forEach _sorted; } else { - PUSH(_transmissions, ((_radios select 0) select 1)); + PUSH(_transmissions,((_radios select 0) select 1)); if (((_radios select 0) select 2) isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; _sortedRadios = _radios; }; @@ -99,58 +99,58 @@ if (_transmissionsChanged) then { private _dif = _transmissions - _currentTransmissions; if (_dif isNotEqualTo []) then { _currentTransmissions = _transmissions; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _radioRxData = [_radioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); // diag_log text format["%1 NON-CACHED", diag_tickTime]; - if (HASH_GET(_radioRxData, "mode") == "singleChannel") then { + if (HASH_GET(_radioRxData,"mode") == "singleChannel") then { private _hearableTransmissions = []; private _junkTransmissions = []; private _digital = false; { private _txId = _x select 1; private _radioTxData = [_txId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); - if (HASH_GET(_radioRxData, "modulation") == HASH_GET(_radioTxData, "modulation")) then { + if (HASH_GET(_radioRxData,"modulation") == HASH_GET(_radioTxData,"modulation")) then { //diag_log text "MOD OK"; - if (HASH_GET(_radioRxData, "encryption") == 1 && {HASH_GET(_radioTxData, "encryption") == 1}) then { + if (HASH_GET(_radioRxData,"encryption") == 1 && {HASH_GET(_radioTxData,"encryption") == 1}) then { //diag_log text "ENCRYPTED"; - if (HASH_GET(_radioRxData, "TEK") == HASH_GET(_radioTxData, "TEK") && - {HASH_GET(_radioRxData, "trafficRate") == HASH_GET(_radioTxData, "trafficRate")} + if (HASH_GET(_radioRxData,"TEK") == HASH_GET(_radioTxData,"TEK") && + {HASH_GET(_radioRxData,"trafficRate") == HASH_GET(_radioTxData,"trafficRate")} ) then { //diag_log text "DIGITAL CRYPTO!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); _digital = true; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "encryption") == 0 && {HASH_GET(_radioTxData, "encryption") == 0}) then { + if (HASH_GET(_radioRxData,"encryption") == 0 && {HASH_GET(_radioTxData,"encryption") == 0}) then { //diag_log text "PT!"; - if (HASH_GET(_radioRxData, "modulation") == "FM" || {HASH_GET(_radioRxData, "modulation") == "NB"}) then { + if (HASH_GET(_radioRxData,"modulation") == "FM" || {HASH_GET(_radioRxData,"modulation") == "NB"}) then { //diag_log text "ITS FM BABY!"; - if (HASH_GET(_radioRxData, "CTCSSRx") == HASH_GET(_radioTxData, "CTCSSTx") || {HASH_GET(_radioRxData, "CTCSSRx") == 0}) then { + if (HASH_GET(_radioRxData,"CTCSSRx") == HASH_GET(_radioTxData,"CTCSSTx") || {HASH_GET(_radioRxData,"CTCSSRx") == 0}) then { //diag_log text "THE TONES MATCH!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData, "CTCSSRx"), HASH_GET(_radioTxData, "CTCSSTx")]; - PUSH(_junkTransmissions, _x); + //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData,"CTCSSRx"),HASH_GET(_radioTxData,"CTCSSTx")]; + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "modulation") == "AM") then { + if (HASH_GET(_radioRxData,"modulation") == "AM") then { //diag_log text "AM TALK JUNKIE!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } forEach _sortedRadios; @@ -195,45 +195,45 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent","_signalDbM"]; private _channelNum = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _channels = [_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent); - private _channel = HASHLIST_SELECT(_channels, _channelNum); - private _squelch = (-116 - 7) + HASH_GET(_channel, "squelch"); + private _channel = HASHLIST_SELECT(_channels,_channelNum); + private _squelch = (-116 - 7) + HASH_GET(_channel,"squelch"); // diag_log text format["squelch: %1 signal: %2", _squelch, _signalDbM]; if (_signalDbM < _squelch) then { _okRadios = []; - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown) then { if (!isNil "_beeped" && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); } else { if (isNil "_beeped" || {!_beeped}) then { //diag_log "BEEP!"; - SCRATCH_SET(_radioId, "hasBeeped", true); + SCRATCH_SET(_radioId,"hasBeeped",true); private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOn", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; } else { - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown) then { if (!isNil "_beeped" && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); }; // Cache it - SCRATCH_SET(_radioId, "currentTransmissionRadioCache", _okRadios); + SCRATCH_SET(_radioId,"currentTransmissionRadioCache",_okRadios); //Force a recalculation if data is not ready if (_areAllRadiosInitialized) then { - SCRATCH_SET(_radioId, "lastSortTime", diag_tickTime); + SCRATCH_SET(_radioId,"lastSortTime",diag_tickTime); } else { - SCRATCH_SET(_radioId, "lastSortTime", -4); + SCRATCH_SET(_radioId,"lastSortTime",-4); }; } else { _okRadios = _radioCache; diff --git a/addons/sys_prc148/radio/fnc_handlePTTDown.sqf b/addons/sys_prc148/radio/fnc_handlePTTDown.sqf index d078f500a..0958d8650 100644 --- a/addons/sys_prc148/radio/fnc_handlePTTDown.sqf +++ b/addons/sys_prc148/radio/fnc_handlePTTDown.sqf @@ -22,5 +22,5 @@ if !([_radioId] call EFUNC(sys_radio,canUnitTransmit)) exitWith {false}; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericBeep", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", true); +SCRATCH_SET(_radioId,"PTTDown",true); true diff --git a/addons/sys_prc148/radio/fnc_handlePTTUp.sqf b/addons/sys_prc148/radio/fnc_handlePTTUp.sqf index 9d68b0347..a9e4e5ce6 100644 --- a/addons/sys_prc148/radio/fnc_handlePTTUp.sqf +++ b/addons/sys_prc148/radio/fnc_handlePTTUp.sqf @@ -20,5 +20,5 @@ params ["_radioId"]; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", false); +SCRATCH_SET(_radioId,"PTTDown",false); true; diff --git a/addons/sys_prc148/radio/fnc_handleSignalData.sqf b/addons/sys_prc148/radio/fnc_handleSignalData.sqf index 29c85f626..7da313d45 100644 --- a/addons/sys_prc148/radio/fnc_handleSignalData.sqf +++ b/addons/sys_prc148/radio/fnc_handleSignalData.sqf @@ -25,22 +25,22 @@ _radioTxData = [_txId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); _radioRxData = [_rxId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); if ( - HASH_GET(_radioRxData, "modulation") == HASH_GET(_radioTxData, "modulation") && - {HASH_GET(_radioRxData, "encryption") == HASH_GET(_radioTxData, "encryption")} && - {HASH_GET(_radioRxData, "TEK") == HASH_GET(_radioTxData, "TEK")} && - {HASH_GET(_radioRxData, "trafficRate") == HASH_GET(_radioTxData, "trafficRate")} && + HASH_GET(_radioRxData,"modulation") == HASH_GET(_radioTxData,"modulation") && + {HASH_GET(_radioRxData,"encryption") == HASH_GET(_radioTxData,"encryption")} && + {HASH_GET(_radioRxData,"TEK") == HASH_GET(_radioTxData,"TEK")} && + {HASH_GET(_radioRxData,"trafficRate") == HASH_GET(_radioTxData,"trafficRate")} && {( - HASH_GET(_rxChannel, "CTCSSRx") == HASH_GET(_radioTxData, "CTCSSTx") || - {HASH_GET(_rxChannel, "CTCSSRx") == 0} + HASH_GET(_rxChannel,"CTCSSRx") == HASH_GET(_radioTxData,"CTCSSTx") || + {HASH_GET(_rxChannel,"CTCSSRx") == 0} )} ) then { - _hearableTransmission = SCRATCH_GET(_rxId, "hearableTransmission"); + _hearableTransmission = SCRATCH_GET(_rxId,"hearableTransmission"); if (isNil "_hearableTransmission") then { _hearableTransmission = []; - SCRATCH_SET(_rxId, "hearableTransmission", _hearableTransmission); + SCRATCH_SET(_rxId,"hearableTransmission",_hearableTransmission); }; if (!(_txId in _hearableTransmission)) then { - PUSH(_hearableTransmission, _txId); + PUSH(_hearableTransmission,_txId); }; }; */ diff --git a/addons/sys_prc148/radio/fnc_isExternalAudio.sqf b/addons/sys_prc148/radio/fnc_isExternalAudio.sqf index 25ac7f757..87fe0ab66 100644 --- a/addons/sys_prc148/radio/fnc_isExternalAudio.sqf +++ b/addons/sys_prc148/radio/fnc_isExternalAudio.sqf @@ -18,4 +18,4 @@ params ["", "", "", "_radioData"]; -HASH_GET(_radioData, "audioPath") == "INTAUDIO" +HASH_GET(_radioData,"audioPath") == "INTAUDIO" diff --git a/addons/sys_prc148/radio/fnc_setChannelData.sqf b/addons/sys_prc148/radio/fnc_setChannelData.sqf index 744da2038..2d6fb98eb 100644 --- a/addons/sys_prc148/radio/fnc_setChannelData.sqf +++ b/addons/sys_prc148/radio/fnc_setChannelData.sqf @@ -18,12 +18,12 @@ params ["_radioId", "_event", "_eventData", "_radioData"]; -private _channels = HASH_GET(_radioData, "channels"); +private _channels = HASH_GET(_radioData,"channels"); -private _cachedChannels = SCRATCH_GET_DEF(_radioId, "cachedFullChannels", []); +private _cachedChannels = SCRATCH_GET_DEF(_radioId,"cachedFullChannels",[]); _cachedChannels set[(_eventData select 0), nil]; -SCRATCH_SET(_radioId, "cachedFullChannels", _cachedChannels); +SCRATCH_SET(_radioId,"cachedFullChannels",_cachedChannels); -HASHLIST_SET(_channels, (_eventData select 0), (_eventData select 1)); +HASHLIST_SET(_channels,(_eventData select 0),(_eventData select 1)); true diff --git a/addons/sys_prc148/radio/fnc_setCurrentChannel.sqf b/addons/sys_prc148/radio/fnc_setCurrentChannel.sqf index 0cd9dc36c..d1957264e 100644 --- a/addons/sys_prc148/radio/fnc_setCurrentChannel.sqf +++ b/addons/sys_prc148/radio/fnc_setCurrentChannel.sqf @@ -19,7 +19,7 @@ params ["_radioId", "", "_eventData", "_radioData"]; TRACE_1("SETTING CURRENT CHANNEL",_this); -private _groups = HASH_GET(_radioData, "groups"); +private _groups = HASH_GET(_radioData,"groups"); { _x params ["","_channelNums"]; @@ -27,8 +27,8 @@ private _groups = HASH_GET(_radioData, "groups"); if (_eventData in _channelNums) exitWith { { if (_x == _eventData) then { - HASH_SET(_radioData, "currentGroup", _groupIndex); - HASH_SET(_radioData, "channelKnobPosition", _forEachIndex); + HASH_SET(_radioData,"currentGroup",_groupIndex); + HASH_SET(_radioData,"channelKnobPosition",_forEachIndex); }; } forEach _channelNums; }; diff --git a/addons/sys_prc148/radio/fnc_setOnOffState.sqf b/addons/sys_prc148/radio/fnc_setOnOffState.sqf index 75546d06c..d2805a9fd 100644 --- a/addons/sys_prc148/radio/fnc_setOnOffState.sqf +++ b/addons/sys_prc148/radio/fnc_setOnOffState.sqf @@ -18,23 +18,23 @@ params ["_radioId", "", "_eventData", "_radioData"]; -HASH_SET(_radioData, "radioOn", _eventData); +HASH_SET(_radioData,"radioOn",_eventData); if (_radioId == EGVAR(sys_radio,currentRadioDialog)) then { if (_eventData == 0) then { //acre_player sideChat "RADIO OFF!"; - HASH_SET(_radioData, "currentState", "OffDisplay"); - HASH_SET(_radioData, "menuPage", 0); - HASH_SET(_radioData, "menuIndex", 0); - HASH_SET(_radioData, "entryCursor", 0); - HASH_SET(_radioData, "selectedEntry", 0); + HASH_SET(_radioData,"currentState","OffDisplay"); + HASH_SET(_radioData,"menuPage",0); + HASH_SET(_radioData,"menuIndex",0); + HASH_SET(_radioData,"entryCursor",0); + HASH_SET(_radioData,"selectedEntry",0); } else { if (_eventData == 0.5) then { //acre_player sideChat "RADIO ON!"; - HASH_SET(_radioData, "currentState", "PostScreen"); - HASH_SET(_radioData, "menuPage", 0); - HASH_SET(_radioData, "menuIndex", 0); - HASH_SET(_radioData, "entryCursor", 0); - HASH_SET(_radioData, "selectedEntry", 0); + HASH_SET(_radioData,"currentState","PostScreen"); + HASH_SET(_radioData,"menuPage",0); + HASH_SET(_radioData,"menuIndex",0); + HASH_SET(_radioData,"entryCursor",0); + HASH_SET(_radioData,"selectedEntry",0); }; }; private _display = uiNamespace getVariable QGVAR(currentDisplay); diff --git a/addons/sys_prc148/radio/fnc_setState.sqf b/addons/sys_prc148/radio/fnc_setState.sqf index afeedef95..c7733c24d 100644 --- a/addons/sys_prc148/radio/fnc_setState.sqf +++ b/addons/sys_prc148/radio/fnc_setState.sqf @@ -18,7 +18,7 @@ params ["_radioId", "", "_eventData", "_radioData"]; -HASH_SET(_radioData, _eventData select 0, _eventData select 1); +HASH_SET(_radioData,_eventData select 0,_eventData select 1); if (_radioId == EGVAR(sys_radio,currentRadioDialog)) then { private _display = uiNamespace getVariable QGVAR(currentDisplay); [_display] call FUNC(render); diff --git a/addons/sys_prc148/radio/fnc_setVolume.sqf b/addons/sys_prc148/radio/fnc_setVolume.sqf index 0740b9038..0e5fe1e57 100644 --- a/addons/sys_prc148/radio/fnc_setVolume.sqf +++ b/addons/sys_prc148/radio/fnc_setVolume.sqf @@ -24,4 +24,4 @@ if (_vol%0.20 != 0) then { _vol = _vol-(_vol%0.20); }; -HASH_SET(_radioData, "volume", _eventData); +HASH_SET(_radioData,"volume",_eventData); diff --git a/addons/sys_prc148/states/ChannelDisplays.sqf b/addons/sys_prc148/states/ChannelDisplays.sqf index b2412cc28..1c7e9ef9a 100644 --- a/addons/sys_prc148/states/ChannelDisplays.sqf +++ b/addons/sys_prc148/states/ChannelDisplays.sqf @@ -27,15 +27,15 @@ DFUNC(ChannelDisplay_Render) = { private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _groupLabel = _group select 0; - private _channel = HASHLIST_SELECT(GET_STATE("channels"), _channelNumber); + private _channel = HASHLIST_SELECT(GET_STATE("channels"),_channelNumber); - private _channelType = HASH_GET(_channel, "channelMode"); + private _channelType = HASH_GET(_channel,"channelMode"); private _pageIndex = PAGE_INDEX; GVAR(currentMenu) = []; if (_pageIndex == 0) then { - SET_TEXT("CH = ", BIG_LINE_1, 2, 6); - SET_TEXT("PWR = ", BIG_LINE_3, 2, 7); + SET_TEXT("CH = ",BIG_LINE_1,2,6); + SET_TEXT("PWR = ",BIG_LINE_3,2,7); }; private _pageOne = []; private _channelNumberTxt = str (_channelNumber+1); @@ -48,11 +48,11 @@ DFUNC(ChannelDisplay_Render) = { }; _pageOne pushBack ["CHANNEL", _channelNumberTxt, BIG_LINE_1, [7, 9], MENU_TYPE_MENU, {}]; private _encryption = "PLAIN"; - if (HASH_GET(_channel, "encryption") == 1) then { + if (HASH_GET(_channel,"encryption") == 1) then { _encryption = "SECURE"; }; - _pageOne pushBack ["encryption", HASH_GET(_channel, "encryption"), BIG_LINE_1, [12, 17], MENU_TYPE_LIST, FUNC(updateChannelData), ["PLAIN", "SECURE"], [0,1]]; - _pageOne pushBack ["label", HASH_GET(_channel, "label"), BIG_LINE_2, [2, 8], MENU_TYPE_TEXT, FUNC(updateChannelData)]; + _pageOne pushBack ["encryption", HASH_GET(_channel,"encryption"),BIG_LINE_1,[12,17],MENU_TYPE_LIST,FUNC(updateChannelData), ["PLAIN", "SECURE"], [0,1]]; + _pageOne pushBack ["label", HASH_GET(_channel,"label"),BIG_LINE_2,[2,8],MENU_TYPE_TEXT,FUNC(updateChannelData)]; private _powersList = [["0.1 W", "0.5 W", "1.0 W", "3.0 W", "5.0 W"], [100, 500, 1000, 3000, 5000]]; _pageOne set[4, ["channelMode", _channelType, BIG_LINE_4, [2, 9], MENU_TYPE_LIST, FUNC(updateChannelData), ["BASIC"], ["BASIC"]]]; // //acre_player sideChat format["page: %1", _pageIndex]; @@ -60,18 +60,18 @@ DFUNC(ChannelDisplay_Render) = { case "BASIC": { switch _pageIndex do { case 1: { - SET_TEXT("RX = ", BIG_LINE_1, 1, 5); - SET_TEXT("TX = ", BIG_LINE_2, 1, 5); - SET_TEXT("R = ", BIG_LINE_3, 1, 4); - SET_TEXT("T = ", BIG_LINE_3, 10, 14); - SET_TEXT("TEK ", BIG_LINE_4, 11, 14); + SET_TEXT("RX = ",BIG_LINE_1,1,5); + SET_TEXT("TX = ",BIG_LINE_2,1,5); + SET_TEXT("R = ",BIG_LINE_3,1,4); + SET_TEXT("T = ",BIG_LINE_3,10,14); + SET_TEXT("TEK ",BIG_LINE_4,11,14); }; case 2: { - SET_TEXT("RPTR", BIG_LINE_1, 1, 4); - SET_TEXT("FADE", BIG_LINE_2, 1, 4); - SET_TEXT("PHASE", BIG_LINE_3, 1, 5); - SET_TEXT("SQLCH", BIG_LINE_4, 1, 5); + SET_TEXT("RPTR",BIG_LINE_1,1,4); + SET_TEXT("FADE",BIG_LINE_2,1,4); + SET_TEXT("PHASE",BIG_LINE_3,1,5); + SET_TEXT("SQLCH",BIG_LINE_4,1,5); }; }; @@ -82,27 +82,27 @@ DFUNC(ChannelDisplay_Render) = { ]; private _ctcssLabelList = +_ctcssList; _ctcssLabelList set[0, "OFF"]; - if (HASH_GET(_channel, "modulation") == "AM") then { + if (HASH_GET(_channel,"modulation") == "AM") then { _ctcssList = [0]; _ctcssLabelList = ["OFF"]; _powersList = [["1.0 W", "5.0 W"], [1000, 5000]]; }; - // //diag_log text format["freq: %1 %2", ([HASH_GET(_channel, "frequencyRX")] call FUNC(frequencyToString)), HASH_GET(_channel, "frequencyRX")]; + // //diag_log text format["freq: %1 %2", ([HASH_GET(_channel,"frequencyRX")] call FUNC(frequencyToString)),HASH_GET(_channel,"frequencyRX")]; private _tekList = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20]; private _page2 = [ - ["frequencyRX", ([HASH_GET(_channel, "frequencyRX")] call FUNC(frequencyToString)), BIG_LINE_1, [6, 14], MENU_TYPE_NUM, FUNC(updateChannelData), "###.#####"], - ["frequencyTX", ([HASH_GET(_channel, "frequencyTX")] call FUNC(frequencyToString)), BIG_LINE_2, [6, 14], MENU_TYPE_NUM, FUNC(updateChannelData), "###.#####"], - ["CTCSSRx", HASH_GET(_channel, "CTCSSRx"), BIG_LINE_3, [5, 9], MENU_TYPE_LIST, FUNC(updateChannelData), _ctcssLabelList, _ctcssList], - ["CTCSSTx", HASH_GET(_channel, "CTCSSTx"), BIG_LINE_3, [14, 18], MENU_TYPE_LIST, FUNC(updateChannelData), _ctcssLabelList, _ctcssList], - ["modulation", HASH_GET(_channel, "modulation"), BIG_LINE_4, [1, 2], MENU_TYPE_LIST, FUNC(updateChannelData), ["AM", "FM", "NB"], ["AM", "FM", "NB"]], - ["trafficRate", HASH_GET(_channel, "trafficRate"), BIG_LINE_4, [6, 8], MENU_TYPE_LIST, FUNC(updateChannelData), ["12K", "16K"], [12, 16]], - ["TEK", HASH_GET(_channel, "TEK"), BIG_LINE_4, [15, 16], MENU_TYPE_LIST, FUNC(updateChannelData), _tekList, _tekList] + ["frequencyRX", ([HASH_GET(_channel,"frequencyRX")] call FUNC(frequencyToString)),BIG_LINE_1,[6,14],MENU_TYPE_NUM,FUNC(updateChannelData), "###.#####"], + ["frequencyTX", ([HASH_GET(_channel,"frequencyTX")] call FUNC(frequencyToString)),BIG_LINE_2,[6,14],MENU_TYPE_NUM,FUNC(updateChannelData), "###.#####"], + ["CTCSSRx", HASH_GET(_channel,"CTCSSRx"),BIG_LINE_3,[5,9],MENU_TYPE_LIST,FUNC(updateChannelData), _ctcssLabelList, _ctcssList], + ["CTCSSTx", HASH_GET(_channel,"CTCSSTx"),BIG_LINE_3,[14,18],MENU_TYPE_LIST,FUNC(updateChannelData), _ctcssLabelList, _ctcssList], + ["modulation", HASH_GET(_channel,"modulation"),BIG_LINE_4,[1,2],MENU_TYPE_LIST,FUNC(updateChannelData), ["AM", "FM", "NB"], ["AM", "FM", "NB"]], + ["trafficRate", HASH_GET(_channel,"trafficRate"),BIG_LINE_4,[6,8],MENU_TYPE_LIST,FUNC(updateChannelData), ["12K", "16K"], [12, 16]], + ["TEK", HASH_GET(_channel,"TEK"),BIG_LINE_4,[15,16],MENU_TYPE_LIST,FUNC(updateChannelData), _tekList, _tekList] ]; private _page3 = [ - ["RPTR", HASH_GET(_channel, "RPTR"), BIG_LINE_1, [7, 10], MENU_TYPE_LIST, FUNC(updateChannelData), ["0.2S", "0.4S", "0.6S", "0.8S", "1.0S", "NONE"], [0.2, 0.4, 0.6, 0.8, 1.0, 0]], - ["fade", HASH_GET(_channel, "fade"), BIG_LINE_2, [7, 10], MENU_TYPE_LIST, FUNC(updateChannelData), ["1.0S", "2.0S", "3.0S", "4.0S", "0.0S"], [1, 2, 3, 4, 0]], - ["phase", HASH_GET(_channel, "phase"), BIG_LINE_3, [7, 11], MENU_TYPE_LIST, FUNC(updateChannelData), ["OFF", ".256S", ".384S", "1.06S"], [0, 256, 384, 1060]], - ["squelch", HASH_GET(_channel, "squelch"), BIG_LINE_4, [7, 7], MENU_TYPE_LIST, FUNC(updateChannelData), [0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 6, 7]] + ["RPTR", HASH_GET(_channel,"RPTR"),BIG_LINE_1,[7,10],MENU_TYPE_LIST,FUNC(updateChannelData), ["0.2S", "0.4S", "0.6S", "0.8S", "1.0S", "NONE"], [0.2, 0.4, 0.6, 0.8, 1.0, 0]], + ["fade", HASH_GET(_channel,"fade"),BIG_LINE_2,[7,10],MENU_TYPE_LIST,FUNC(updateChannelData), ["1.0S", "2.0S", "3.0S", "4.0S", "0.0S"], [1, 2, 3, 4, 0]], + ["phase", HASH_GET(_channel,"phase"),BIG_LINE_3,[7,11],MENU_TYPE_LIST,FUNC(updateChannelData), ["OFF", ".256S", ".384S", "1.06S"], [0, 256, 384, 1060]], + ["squelch", HASH_GET(_channel,"squelch"),BIG_LINE_4,[7,7],MENU_TYPE_LIST,FUNC(updateChannelData), [0, 1, 2, 3, 4, 5, 6, 7], [0, 1, 2, 3, 4, 5, 6, 7]] ]; GVAR(currentMenu) set[1, _page2]; GVAR(currentMenu) set[2, _page3]; @@ -110,7 +110,7 @@ DFUNC(ChannelDisplay_Render) = { }; }; - _pageOne set[3, ["power", HASH_GET(_channel, "power"), BIG_LINE_3, [7, 11], MENU_TYPE_LIST, FUNC(updateChannelData), _powersList select 0, _powersList select 1]]; + _pageOne set[3, ["power", HASH_GET(_channel,"power"),BIG_LINE_3,[7,11],MENU_TYPE_LIST,FUNC(updateChannelData), _powersList select 0, _powersList select 1]]; GVAR(currentMenu) set[0, _pageOne]; [_display, GVAR(currentMenu)] call FUNC(showMenu); }; diff --git a/addons/sys_prc148/states/Group.sqf b/addons/sys_prc148/states/Group.sqf index cc4743ae9..501b22e3c 100644 --- a/addons/sys_prc148/states/Group.sqf +++ b/addons/sys_prc148/states/Group.sqf @@ -22,12 +22,12 @@ DFUNC(GroupDisplay_Render) = { private _groups = GET_STATE("groups"); private _options = []; private _labels = []; - SET_TEXT("GROUP =", BIG_LINE_3, 4, 10); + SET_TEXT("GROUP =",BIG_LINE_3,4,10); { _x params ["_label", "_channels"]; if ((count _channels) > 0) then { - PUSH(_labels, _label); - PUSH(_options, _forEachIndex); + PUSH(_labels,_label); + PUSH(_options,_forEachIndex); }; } forEach _groups; @@ -35,7 +35,7 @@ DFUNC(GroupDisplay_Render) = { GVAR(currentMenu) = [ [ - ["groupSelect", GET_STATE_DEF("currentGroup", 0), BIG_LINE_3, [12, 14], MENU_TYPE_LIST, FUNC(GroupDisplay_Select), _labels, _options] + ["groupSelect", GET_STATE_DEF("currentGroup",0),BIG_LINE_3,[12,14],MENU_TYPE_LIST,FUNC(GroupDisplay_Select), _labels, _options] ] ]; @@ -51,7 +51,7 @@ DFUNC(GroupDisplay_Select) = { //diag_log text format["new: %1", _newValue]; private _newGroup = (_menuEntry select 7) select _newValue; - SET_STATE_CRIT("currentGroup", _newGroup); + SET_STATE_CRIT("currentGroup",_newGroup); private _group = GET_STATE("groups") select GET_STATE("currentGroup"); private _channelPosition = GET_STATE("channelKnobPosition"); diff --git a/addons/sys_prc148/states/MainDisplays.sqf b/addons/sys_prc148/states/MainDisplays.sqf index 06f1fbb98..6b44bc146 100644 --- a/addons/sys_prc148/states/MainDisplays.sqf +++ b/addons/sys_prc148/states/MainDisplays.sqf @@ -22,7 +22,7 @@ DFUNC(DefaultDisplay_Render) = { [_display, ICON_BATTERY, true] call FUNC(showIcon); [_display, ICON_BATSTRENGTH, true] call FUNC(showIcon); - if (SCRATCH_GET_DEF(GVAR(currentRadioId), "squelchOpen", false)) then { + if (SCRATCH_GET_DEF(GVAR(currentRadioId),"squelchOpen",false)) then { [_display, ICON_SQUELCH, true] call FUNC(showIcon); }; @@ -35,26 +35,26 @@ DFUNC(DefaultDisplay_Render) = { private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _groupLabel = _group select 0; - private _channel = HASHLIST_SELECT(GET_STATE("channels"), _channelNumber); + private _channel = HASHLIST_SELECT(GET_STATE("channels"),_channelNumber); - private _channelLabel = HASH_GET(_channel, "label"); + private _channelLabel = HASH_GET(_channel,"label"); - SET_TEXT(_groupLabel, SMALL_LINE_1, 6, 8); - SET_TEXT(_channelLabel, SMALL_LINE_2, 6, 12); - if (GET_STATE_DEF("SAEnabled", false)) then { - SET_TEXT("SA", SMALL_LINE_4, 9, 10); + SET_TEXT(_groupLabel,SMALL_LINE_1,6,8); + SET_TEXT(_channelLabel,SMALL_LINE_2,6,12); + if (GET_STATE_DEF("SAEnabled",false)) then { + SET_TEXT("SA",SMALL_LINE_4,9,10); }; - if (HASH_GET(_channel, "encryption") == 1) then { - SET_TEXT("CT", SMALL_LINE_5, 9, 10); + if (HASH_GET(_channel,"encryption") == 1) then { + SET_TEXT("CT",SMALL_LINE_5,9,10); } else { - SET_TEXT("PT", SMALL_LINE_5, 9, 10); + SET_TEXT("PT",SMALL_LINE_5,9,10); }; - private _channelMode = HASH_GET(_channel, "channelMode"); + private _channelMode = HASH_GET(_channel,"channelMode"); switch _channelMode do { case "BASIC": { - private _modulation = HASH_GET(_channel, "modulation"); - SET_TEXT(_modulation, SMALL_LINE_5, 14, 15); + private _modulation = HASH_GET(_channel,"modulation"); + SET_TEXT(_modulation,SMALL_LINE_5,14,15); }; }; //diag_log text format["channel: %1", _channel]; @@ -80,40 +80,40 @@ DFUNC(AlternateDisplay_Render) = { private _group = GET_STATE("groups") select GET_STATE("currentGroup"); private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; - private _channel = HASHLIST_SELECT(GET_STATE("channels"), _channelNumber); + private _channel = HASHLIST_SELECT(GET_STATE("channels"),_channelNumber); - private _channelMode = HASH_GET(_channel, "channelMode"); + private _channelMode = HASH_GET(_channel,"channelMode"); switch _channelMode do { case "BASIC": { - private _fTX = HASH_GET(_channel, "frequencyTX"); - private _fRX = HASH_GET(_channel, "frequencyRX"); + private _fTX = HASH_GET(_channel,"frequencyTX"); + private _fRX = HASH_GET(_channel,"frequencyRX"); // _fTX = 167.5625; // _fRX = _fTX; - private _cTX = HASH_GET(_channel, "CTCSSTx"); - private _cRX = HASH_GET(_channel, "CTCSSRx"); + private _cTX = HASH_GET(_channel,"CTCSSTx"); + private _cRX = HASH_GET(_channel,"CTCSSRx"); - private _modulation = HASH_GET(_channel, "modulation"); - private _trafficRate = HASH_GET(_channel, "trafficRate"); - private _TEK = HASH_GET(_channel, "TEK"); + private _modulation = HASH_GET(_channel,"modulation"); + private _trafficRate = HASH_GET(_channel,"trafficRate"); + private _TEK = HASH_GET(_channel,"TEK"); //acre_player sideChat format["_fTX: %1", _fTX]; // [_display, SMALL_LINE_1, format[" RX = %1", ([_fRX] call FUNC(frequencyToString))], LEFT_ALIGN] call FUNC(displayLine); // [_display, SMALL_LINE_2, format[" TX = %1", ([_fRX] call FUNC(frequencyToString))], LEFT_ALIGN] call FUNC(displayLine); - SET_TEXT("RX =", SMALL_LINE_1, 2, 5); + SET_TEXT("RX =",SMALL_LINE_1,2,5); [_display, SMALL_LINE_1, [7, 16], ([_fRX] call FUNC(frequencyToString)), "###.#####"] call FUNC(setText); - SET_TEXT("TX =", SMALL_LINE_2, 2, 5); + SET_TEXT("TX =",SMALL_LINE_2,2,5); [_display, SMALL_LINE_2, [7, 16], ([_fTX] call FUNC(frequencyToString)), "###.#####"] call FUNC(setText); private _cRxStr = format["R = %1", _cRX]; private _cTxStr = format["T = %1", _cRX]; - SET_TEXT(_cRxStr, SMALL_LINE_3, 2, 10); - SET_TEXT(_cTxStr, SMALL_LINE_3, 15, 23); + SET_TEXT(_cRxStr,SMALL_LINE_3,2,10); + SET_TEXT(_cTxStr,SMALL_LINE_3,15,23); - SET_TEXT(_modulation, SMALL_LINE_5, 2, 3); - SET_TEXT((str _trafficRate) + "K", SMALL_LINE_5, 10, 12); - SET_TEXT("TEK " + (str _TEK), SMALL_LINE_5, 19, 23); + SET_TEXT(_modulation,SMALL_LINE_5,2,3); + SET_TEXT((str _trafficRate) + "K",SMALL_LINE_5,10,12); + SET_TEXT("TEK " + (str _TEK),SMALL_LINE_5,19,23); }; }; diff --git a/addons/sys_prc148/states/StartUp.sqf b/addons/sys_prc148/states/StartUp.sqf index ca266f454..2523f6907 100644 --- a/addons/sys_prc148/states/StartUp.sqf +++ b/addons/sys_prc148/states/StartUp.sqf @@ -22,7 +22,7 @@ DFUNC(PostScreen_Render) = { params ["_display"]; [_display, BIG_LINE_3, "TESTING", CENTER_ALIGN] call FUNC(displayLine); - SCRATCH_SET(GVAR(currentRadioId), "post_animation_step", 0); + SCRATCH_SET(GVAR(currentRadioId),"post_animation_step",0); [FUNC(PostScreen_Animation), []] call FUNC(addAnimation); }; @@ -30,7 +30,7 @@ DFUNC(PostScreen_Render) = { DFUNC(PostScreen_Animation) = { params ["_args","_id"]; - private _step = SCRATCH_GET_DEF(GVAR(currentRadioId), "post_animation_step", 0); + private _step = SCRATCH_GET_DEF(GVAR(currentRadioId),"post_animation_step",0); if (_step == 0) then { [_display, SMALL_LINE_1, [1,25], false] call FUNC(highlightText); [_display, SMALL_LINE_5, [1,25], false] call FUNC(highlightText); @@ -47,9 +47,9 @@ DFUNC(PostScreen_Animation) = { [_display, SMALL_LINE_5, [_stepRight,_stepRight]] call FUNC(highlightText); }; if (_step == 5) then { - SCRATCH_SET(GVAR(currentRadioId), "post_animation_step", 0); + SCRATCH_SET(GVAR(currentRadioId),"post_animation_step",0); } else { - SCRATCH_SET(GVAR(currentRadioId), "post_animation_step", _step+1); + SCRATCH_SET(GVAR(currentRadioId),"post_animation_step",_step+1); }; }; @@ -72,7 +72,7 @@ DFUNC(LogoScreen_Render) = { DFUNC(LogoScreen_Animation) = { params ["_args","_id"]; - private _step = SCRATCH_GET_DEF(GVAR(currentRadioId), "logo_animation_step", 0); + private _step = SCRATCH_GET_DEF(GVAR(currentRadioId),"logo_animation_step",0); if (_step == 0) then { [_display, SMALL_LINE_1, [1,25], false] call FUNC(highlightText); [_display, SMALL_LINE_2, [1,25], false] call FUNC(highlightText); @@ -108,7 +108,7 @@ DFUNC(LogoScreen_Animation) = { }; }; if (_step <= 5) then { - SCRATCH_SET(GVAR(currentRadioId), "logo_animation_step", _step+1); + SCRATCH_SET(GVAR(currentRadioId),"logo_animation_step",_step+1); }; }; diff --git a/addons/sys_prc152/farris_menus/Loading.sqf b/addons/sys_prc152/farris_menus/Loading.sqf index 9652c6695..bf100baed 100644 --- a/addons/sys_prc152/farris_menus/Loading.sqf +++ b/addons/sys_prc152/farris_menus/Loading.sqf @@ -28,7 +28,7 @@ DFUNC(Loading_BarFill_end) = { // Turn the radio on [_radioId, "setOnOffState", 1] call EFUNC(sys_data,dataEvent); if (_radioId isEqualTo GVAR(currentRadioId)) then { - private _currentMenu = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + private _currentMenu = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); [_currentMenu] call FUNC(changeMenu); }; }; diff --git a/addons/sys_prc152/farris_menus/Main.sqf b/addons/sys_prc152/farris_menus/Main.sqf index e7f6c250e..82586c3a0 100644 --- a/addons/sys_prc152/farris_menus/Main.sqf +++ b/addons/sys_prc152/farris_menus/Main.sqf @@ -35,7 +35,7 @@ GVAR(VOLUME) = ["VOLUME", "VOLUME", "", private _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; - TRACE_2("Rendering VOLUME-STAGE-1",_volume, _display); + TRACE_2("Rendering VOLUME-STAGE-1",_volume,_display); if (!isNull _display) then { (_display displayCtrl ICON_LOADING) progressSetPosition _volume; (_display displayCtrl ICON_LOADING) ctrlCommit 0; @@ -54,15 +54,15 @@ GVAR(NoItems) = ["ERROR_NOENTRY", "ERROR_NOENTRY", "", ], [ { - TRACE_1("Entry", ""); + TRACE_1("Entry",""); }, // onEntry nil, // onExit { - TRACE_1("ERROR_NOENTRY:onButtonPress", (_this select 1)); + TRACE_1("ERROR_NOENTRY:onButtonPress",(_this select 1)); if (((_this select 1) select 0) == "ENT" || ((_this select 1) select 0) == "CLR") then { - TRACE_1("BACK TO HOME", ""); - private _home = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + TRACE_1("BACK TO HOME",""); + private _home = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); [_home] call FUNC(changeMenu); }; true @@ -94,9 +94,9 @@ GVAR(VULOSHOME) = ["VULOSHOME", "VULOSHOME", "", private _volume = GET_STATE("volume"); private _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; - private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID), "receivingSignal", 0); + private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID),"receivingSignal",0); - TRACE_2("Rendering VOLUME-STAGE-1",_volume, _display); + TRACE_2("Rendering VOLUME-STAGE-1",_volume,_display); if (!isNull _display) then { (_display displayCtrl ICON_VOLUME) progressSetPosition _volume; (_display displayCtrl ICON_VOLUME) ctrlCommit 0; @@ -126,9 +126,9 @@ GVAR(VULOSHOME) = ["VULOSHOME", "VULOSHOME", "", private _volume = GET_STATE("volume"); private _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; - private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID), "receivingSignal", 0); + private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID),"receivingSignal",0); - TRACE_2("Rendering VOLUME-STAGE-1",_volume, _display); + TRACE_2("Rendering VOLUME-STAGE-1",_volume,_display); if (!isNull _display) then { (_display displayCtrl ICON_VOLUME) progressSetPosition _volume; (_display displayCtrl ICON_VOLUME) ctrlCommit 0; @@ -158,9 +158,9 @@ GVAR(VULOSHOME) = ["VULOSHOME", "VULOSHOME", "", private _volume = GET_STATE("volume"); private _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; - private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID), "receivingSignal", 0); + private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID),"receivingSignal",0); - TRACE_2("Rendering VOLUME-STAGE-1",_volume, _display); + TRACE_2("Rendering VOLUME-STAGE-1",_volume,_display); if (!isNull _display) then { (_display displayCtrl ICON_VOLUME) progressSetPosition _volume; (_display displayCtrl ICON_VOLUME) ctrlCommit 0; @@ -188,9 +188,9 @@ GVAR(VULOSHOME) = ["VULOSHOME", "VULOSHOME", "", private _volume = GET_STATE("volume"); private _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; - private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID), "receivingSignal", 0); + private _recStrength = SCRATCH_GET_DEF(GVAR(currentRadioID),"receivingSignal",0); - TRACE_2("Rendering VOLUME-STAGE-1",_volume, _display); + TRACE_2("Rendering VOLUME-STAGE-1",_volume,_display); if (!isNull _display) then { (_display displayCtrl ICON_VOLUME) progressSetPosition _volume; (_display displayCtrl ICON_VOLUME) ctrlCommit 0; diff --git a/addons/sys_prc152/farris_menus/OPT.sqf b/addons/sys_prc152/farris_menus/OPT.sqf index 5af0b160b..0ae87df2a 100644 --- a/addons/sys_prc152/farris_menus/OPT.sqf +++ b/addons/sys_prc152/farris_menus/OPT.sqf @@ -17,8 +17,8 @@ GVAR(OptRadioOptions) = ["RADIO_OPTIONS", "RADIO OPTIONS", "OPT-RADIO", private _value = GET_STATE("audioPath"); //diag_log text format["render: %1", _value]; if (_value == "INTAUDIO") then { - SCRATCH_SET(GVAR(currentRadioId), "opt_radio_speaker", "ON"); - SET_STATE("menuSelection", 1); + SCRATCH_SET(GVAR(currentRadioId),"opt_radio_speaker","ON"); + SET_STATE("menuSelection",1); }; }, { @@ -26,12 +26,12 @@ GVAR(OptRadioOptions) = ["RADIO_OPTIONS", "RADIO OPTIONS", "OPT-RADIO", // If its RX only, zero out the TX frequency and // Skip the rest of the menus private _menu = _this select 0; - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "opt_radio_speaker", "OFF"); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"opt_radio_speaker","OFF"); if (_value == "ON") then { //diag_log text format["ON!!!!!!!"]; - SET_STATE("audioPath", "INTAUDIO"); + SET_STATE("audioPath","INTAUDIO"); } else { - SET_STATE("audioPath", "TOPAUDIO"); + SET_STATE("audioPath","TOPAUDIO"); }; },nil,nil ], diff --git a/addons/sys_prc152/farris_menus/PGM.sqf b/addons/sys_prc152/farris_menus/PGM.sqf index 8a6182c90..40a663e10 100644 --- a/addons/sys_prc152/farris_menus/PGM.sqf +++ b/addons/sys_prc152/farris_menus/PGM.sqf @@ -6,14 +6,14 @@ DFUNC(CURRENT_RADIO_VALUE) = { private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); - private _value = HASH_GET(_channel, (_this select 0)); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); + private _value = HASH_GET(_channel,(_this select 0)); _value }; DFUNC(CURRENT_RADIO_CHANNEL) = { private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); _channel }; @@ -62,7 +62,7 @@ GVAR(PGM) = ["PGM", "PGM", "PGM", [ { private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; - SCRATCH_SET(GVAR(currentRadioId), "menuNumber", _channelNumber+1); + SCRATCH_SET(GVAR(currentRadioId),"menuNumber",_channelNumber+1); }, // onEntry nil, // onExit. Our parent static display generic event handler handles the 'Next' key nil // We've implemented dynamic button press handlers for static displays @@ -86,7 +86,7 @@ GVAR(PGM) = ["PGM", "PGM", "PGM", { private _value = GET_RADIO_VALUE("description"); _value = (_value + CHANNEL_PADDING_STRING) select [0, CHANNEL_NAME_MAX_LENGTH]; // Make sure we have something at each editindex - SCRATCH_SET(GVAR(currentRadioId), "menuString", _value); + SCRATCH_SET(GVAR(currentRadioId),"menuString",_value); }, nil, nil @@ -120,7 +120,7 @@ GVAR(PGM) = ["PGM", "PGM", "PGM", nil], // This will be called after every action within the action list // This will get called on series completion { - TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!", _this); + TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",_this); // Set the current channel to the edited preset, and save the so-far-edited values private _channelNumber = GET_STATE("pgm_preset_number") - 1; private _channelWaveform = GET_STATE("pgm_preset_waveform"); @@ -128,19 +128,19 @@ GVAR(PGM) = ["PGM", "PGM", "PGM", _channelDescription = [_channelDescription] call CBA_fnc_trim; ["setCurrentChannel", _channelNumber] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); - //TRACE_3("Retrieving radio information", _channelNumber, _channel, _channels); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); + //TRACE_3("Retrieving radio information",_channelNumber,_channel,_channels); - HASH_SET(_channel, "description", _channelDescription); - //HASH_SET(_channel, "type", (["channelMode", _channelWaveform, 1] call FUNC(formatChannelValue))); - HASH_SET(_channel, "type", "BASIC"); + HASH_SET(_channel,"description",_channelDescription); + //HASH_SET(_channel,"type",(["channelMode",_channelWaveform,1] call FUNC(formatChannelValue))); + HASH_SET(_channel,"type","BASIC"); - HASHLIST_SET(_channels, _channelNumber, _channel); - SET_STATE("channels", _channels); + HASHLIST_SET(_channels,_channelNumber,_channel); + SET_STATE("channels",_channels); - SET_STATE("pgm_preset_number", 0); - SET_STATE("pgm_preset_waveform", nil); - SET_STATE("pgm_description", nil); + SET_STATE("pgm_preset_number",0); + SET_STATE("pgm_preset_waveform",nil); + SET_STATE("pgm_description",nil); // Now move on to our inner PGM menu // Because this action series ends differently, we call out our change menu rather than @@ -168,7 +168,7 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", [ { private _value = GET_RADIO_VALUE("description"); - SCRATCH_SET(GVAR(currentRadioId), "menuString", _value); + SCRATCH_SET(GVAR(currentRadioId),"menuString",_value); }, // onEntry nil, // onExit. Our parent static display generic event handler handles the 'Next' key nil // We've implemented dynamic button press handlers for static displays @@ -212,17 +212,17 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); - //TRACE_3("Retrieving radio information", _channelNumber, _channel, _channels); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); + //TRACE_3("Retrieving radio information",_channelNumber,_channel,_channels); - HASH_SET(_channel, "description", _channelDescription); - HASH_SET(_channel, "type", _channelType); + HASH_SET(_channel,"description",_channelDescription); + HASH_SET(_channel,"type",_channelType); - HASHLIST_SET(_channels, _channelNumber, _channel); - SET_STATE("channels", _channels); + HASHLIST_SET(_channels,_channelNumber,_channel); + SET_STATE("channels",_channels); - SET_STATE("pgm_preset_type", nil); - SET_STATE("pgm_preset_description", nil); + SET_STATE("pgm_preset_type",nil); + SET_STATE("pgm_preset_description",nil); } ], ["FREQUENCY", "FREQUENCY", "PGM-SYS PRESETS-CFG", @@ -238,7 +238,7 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", [ { private _value = GET_RADIO_VALUE("frequencyRX"); - SCRATCH_SET(GVAR(currentRadioId), "menuFrequency", _value); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequency",_value); }, // onEntry nil, // onExit. Our parent static display generic event handler handles the 'Next' key nil // We've implemented dynamic button press handlers for static displays @@ -267,12 +267,12 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", // If its RX only, zero out the TX frequency and // Skip the rest of the menus private _menu = _this select 0; - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "pgm_rx_only", "NO"); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"pgm_rx_only","NO"); if (_value == "YES") then { - //SCRATCH_SET(GVAR(currentRadioId), "pgm_tx_freq", 0.0); + //SCRATCH_SET(GVAR(currentRadioId),"pgm_tx_freq",0.0); private _currentAction = GET_STATE("menuAction"); _currentAction = _currentAction + 2; - SET_STATE("menuAction", _currentAction); + SET_STATE("menuAction",_currentAction); }; } ], @@ -295,14 +295,14 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", nil, nil, { - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "pgm_tx", "USE RX"); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"pgm_tx","USE RX"); // If it is USE TX, we just skip the next menu action and it should finalize if (_value == "USE RX") then { - private _rx = GET_STATE_DEF("pgm_rx_freq", "0"); - SET_STATE("pgm_tx_freq", _rx); + private _rx = GET_STATE_DEF("pgm_rx_freq","0"); + SET_STATE("pgm_tx_freq",_rx); private _currentAction = GET_STATE("menuAction"); _currentAction = _currentAction + 1; - SET_STATE("menuAction", _currentAction); + SET_STATE("menuAction",_currentAction); }; } ], @@ -322,7 +322,7 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", [ { private _value = GET_RADIO_VALUE("frequencyTX"); - SCRATCH_SET(GVAR(currentRadioId), "menuFrequency", _value); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequency",_value); }, // onEntry nil, // onExit. Our parent static display generic event handler handles the 'Next' key nil // We've implemented dynamic button press handlers for static displays @@ -342,28 +342,28 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", private _channelType = GET_STATE("pgm_preset_type"); private _rx = GET_STATE("pgm_rx_freq"); private _tx = GET_STATE("pgm_tx_freq"); - private _rxOnly = SCRATCH_GET(GVAR(currentRadioId), "pgm_rx_only"); + private _rxOnly = SCRATCH_GET(GVAR(currentRadioId),"pgm_rx_only"); if (_rxOnly == "YES") then { _rxOnly = true; } else { _rxOnly = false; }; if (isNil "_rx" || isNil "_tx") exitWith {}; private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); - TRACE_3("Retrieving radio information", _channelNumber, _channel, _channels); - TRACE_3("Saving", _rx, _tx, _rxOnly); + TRACE_3("Retrieving radio information",_channelNumber,_channel,_channels); + TRACE_3("Saving",_rx,_tx,_rxOnly); - HASH_SET(_channel, "frequencyRX", _rx); - HASH_SET(_channel, "frequencyTX", _tx); - HASH_SET(_channel, "rxOnly", _rxOnly); + HASH_SET(_channel,"frequencyRX",_rx); + HASH_SET(_channel,"frequencyTX",_tx); + HASH_SET(_channel,"rxOnly",_rxOnly); - HASHLIST_SET(_channels, _channelNumber, _channel); - SET_STATE("channels", _channels); + HASHLIST_SET(_channels,_channelNumber,_channel); + SET_STATE("channels",_channels); - SET_STATE("pgm_tx_freq", nil); - SET_STATE("pgm_rx_freq", nil); - SET_STATE("pgm_rx_only", nil); + SET_STATE("pgm_tx_freq",nil); + SET_STATE("pgm_rx_freq",nil); + SET_STATE("pgm_rx_only",nil); } ], ["COMSEC", "COMSEC", "PGM-SYS PRESETS-CFG", @@ -386,23 +386,23 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", { private _power = GET_RADIO_VALUE("power"); - SCRATCH_SET(GVAR(currentRadioId), "pgm_tx_power", _power); + SCRATCH_SET(GVAR(currentRadioId),"pgm_tx_power",_power); switch _power do { case 5000: { - SCRATCH_SET(GVAR(currentRadioId), "pgm_tx_select", "HIGH"); - SET_STATE("menuSelection", 0); + SCRATCH_SET(GVAR(currentRadioId),"pgm_tx_select","HIGH"); + SET_STATE("menuSelection",0); }; case 2000: { - SCRATCH_SET(GVAR(currentRadioId), "pgm_tx_select", "MED"); - SET_STATE("menuSelection", 1); + SCRATCH_SET(GVAR(currentRadioId),"pgm_tx_select","MED"); + SET_STATE("menuSelection",1); }; case 250: { - SCRATCH_SET(GVAR(currentRadioId), "pgm_tx_select", "LOW"); - SET_STATE("menuSelection", 2); + SCRATCH_SET(GVAR(currentRadioId),"pgm_tx_select","LOW"); + SET_STATE("menuSelection",2); }; default { - SCRATCH_SET(GVAR(currentRadioId), "pgm_tx_select", "USER"); - SET_STATE("menuSelection", 3); + SCRATCH_SET(GVAR(currentRadioId),"pgm_tx_select","USER"); + SET_STATE("menuSelection",3); }; }; }, // onEntry @@ -411,22 +411,22 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", nil, { // If we are not in user mode, just skip this menu item - private _check = SCRATCH_GET_DEF(GVAR(currentRadioId), "pgm_tx_select", "HIGH"); + private _check = SCRATCH_GET_DEF(GVAR(currentRadioId),"pgm_tx_select","HIGH"); if (_check != "USER") then { private _currentAction = GET_STATE("menuAction"); _currentAction = _currentAction + 1; switch _check do { case 'HIGH': { - SET_STATE("pgm_tx_power", 5000); + SET_STATE("pgm_tx_power",5000); }; case 'MED': { - SET_STATE("pgm_tx_power", 2000); + SET_STATE("pgm_tx_power",2000); }; case 'LOW': { - SET_STATE("pgm_tx_power", 250); + SET_STATE("pgm_tx_power",250); }; }; - SET_STATE("menuAction", _currentAction); + SET_STATE("menuAction",_currentAction); }; } ], @@ -446,7 +446,7 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", [ { private _value = GET_RADIO_VALUE("power"); - SCRATCH_SET(GVAR(currentRadioId), "menuNumber", _value); + SCRATCH_SET(GVAR(currentRadioId),"menuNumber",_value); }, nil ], @@ -463,21 +463,21 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", nil], { // Save the new power. - private _power = GET_STATE_DEF("pgm_tx_power", 5000); + private _power = GET_STATE_DEF("pgm_tx_power",5000); private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); if (_power > 5000) then { _power = 5000; }; - HASH_SET(_channel, "power", _power); + HASH_SET(_channel,"power",_power); - HASHLIST_SET(_channels, _channelNumber, _channel); - SET_STATE("channels", _channels); + HASHLIST_SET(_channels,_channelNumber,_channel); + SET_STATE("channels",_channels); - SET_STATE("pgm_tx_power", nil); + SET_STATE("pgm_tx_power",nil); } ], ["SQUELCH", "SQUELCH", "PGM-SYS PRESETS-CFG", @@ -498,8 +498,8 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", }; case 3: { - SCRATCH_SET(GVAR(currentRadioId), "pgm_sq_tx_select", "CTCSS"); - SET_STATE("menuSelection", 1); + SCRATCH_SET(GVAR(currentRadioId),"pgm_sq_tx_select","CTCSS"); + SET_STATE("menuSelection",1); }; }; }, @@ -507,12 +507,12 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", nil, nil, { - private _sqType = SCRATCH_GET_DEF(GVAR(currentRadioId), "pgm_sq_tx_select", "CTCSS"); + private _sqType = SCRATCH_GET_DEF(GVAR(currentRadioId),"pgm_sq_tx_select","CTCSS"); switch _sqType do { default { // Default is go to end, we only have 1 configurable SQ for now private _currentAction = GET_STATE("menuAction"); _currentAction = _currentAction + 999; - SET_STATE("menuAction", _currentAction); + SET_STATE("menuAction",_currentAction); }; case 'CTCSS': { // Next menu is CTCSS @@ -539,7 +539,7 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", private _txTone = GET_RADIO_VALUE("CTCSSTx"); { if (_txTone == (parseNumber _x)) exitWith { - SET_STATE("menuSelection", _forEachIndex); + SET_STATE("menuSelection",_forEachIndex); }; } forEach _options; }, @@ -547,7 +547,7 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", nil, nil, { - //_sqTone = SCRATCH_GET_DEF(GVAR(currentRadioId), "pgm_sq_tx_ctcss_tone", "250.3"); + //_sqTone = SCRATCH_GET_DEF(GVAR(currentRadioId),"pgm_sq_tx_ctcss_tone","250.3"); } ], [ @@ -565,14 +565,14 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", ], [ { - SCRATCH_SET(GVAR(currentRadioId), "pgm_sq_rx_select", "CTCSS"); - SET_STATE("menuSelection", 1); + SCRATCH_SET(GVAR(currentRadioId),"pgm_sq_rx_select","CTCSS"); + SET_STATE("menuSelection",1); }, nil, nil, nil, { - //_sqTone = SCRATCH_GET_DEF(GVAR(currentRadioId), "pgm_sq_tx_ctcss_tone", "250.3"); + //_sqTone = SCRATCH_GET_DEF(GVAR(currentRadioId),"pgm_sq_tx_ctcss_tone","250.3"); } ], [ @@ -590,11 +590,11 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", ], [ { - private _sqType = SCRATCH_GET_DEF(GVAR(currentRadioId), "pgm_sq_tx_select", "CTCSS"); + private _sqType = SCRATCH_GET_DEF(GVAR(currentRadioId),"pgm_sq_tx_select","CTCSS"); if (_sqType != "CTCSS" && _sqType != "CDCSS") then { private _currentAction = GET_STATE("menuAction"); _currentAction = _currentAction + 1; - SET_STATE("menuAction", _currentAction); + SET_STATE("menuAction",_currentAction); }; }, nil, @@ -615,27 +615,27 @@ GVAR(PGMChannelMenu) = ["PGM PRESET", "PGM PRESET", "PGM-SYS PRESETS-CFG", nil, nil, nil,nil ], { - TRACE_1("Saving top level squelch information", ""); + TRACE_1("Saving top level squelch information",""); - private _sqType = SCRATCH_GET_DEF(GVAR(currentRadioId), "pgm_sq_tx_select", "CTCSS"); - TRACE_1("SQUELCH TYPE", _sqType); + private _sqType = SCRATCH_GET_DEF(GVAR(currentRadioId),"pgm_sq_tx_select","CTCSS"); + TRACE_1("SQUELCH TYPE",_sqType); switch _sqType do { default { }; case 'CTCSS': { - private _sqToneStr = SCRATCH_GET(GVAR(currentRadioId), "pgm_sq_tx_ctcss_tone"); + private _sqToneStr = SCRATCH_GET(GVAR(currentRadioId),"pgm_sq_tx_ctcss_tone"); private _value = parseNumber _sqToneStr; - TRACE_3("Set squelch", _sqType, _sqToneStr, _value); + TRACE_3("Set squelch",_sqType,_sqToneStr,_value); private _channelNumber = ["getCurrentChannel"] call GUI_DATA_EVENT; private _channels = GET_STATE("channels"); - private _channel = HASHLIST_SELECT(_channels, _channelNumber); + private _channel = HASHLIST_SELECT(_channels,_channelNumber); - HASH_SET(_channel, "squelch", 3); - HASH_SET(_channel, "CTCSSTx", _value); - HASH_SET(_channel, "CTCSSRx", _value); + HASH_SET(_channel,"squelch",3); + HASH_SET(_channel,"CTCSSTx",_value); + HASH_SET(_channel,"CTCSSRx",_value); - SET_STATE("channels", _channels); + SET_STATE("channels",_channels); }; }; } diff --git a/addons/sys_prc152/fnc_closeGui.sqf b/addons/sys_prc152/fnc_closeGui.sqf index a568433cd..bf99c2371 100644 --- a/addons/sys_prc152/fnc_closeGui.sqf +++ b/addons/sys_prc152/fnc_closeGui.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["_radioId", "", "", "", ""]; diff --git a/addons/sys_prc152/fnc_formatChannelValue.sqf b/addons/sys_prc152/fnc_formatChannelValue.sqf index f5c1aebb2..c45e5bde3 100644 --- a/addons/sys_prc152/fnc_formatChannelValue.sqf +++ b/addons/sys_prc152/fnc_formatChannelValue.sqf @@ -20,7 +20,7 @@ params ["_name","_value"]; #define SQUELCH_CTCSS 3 -TRACE_1("Formatting", _this); +TRACE_1("Formatting",_this); switch _name do { case "frequency": { @@ -50,7 +50,7 @@ switch _name do { if !(_value isEqualType "") then { _value = format["%1", _value]; }; -TRACE_1("Output", _value); +TRACE_1("Output",_value); _value @@ -62,10 +62,10 @@ _value HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); HASH_SET(_channel,"name",format["%1-FMVINVOC",str(_i+1)]); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"TEK",1); @@ -75,6 +75,6 @@ _value HASH_SET(_channel,"squelch",3); // 152 specific channel settings - HASH_SET(_channel,"deviation", 8.0); - HASH_SET(_channel,"optionCode", 201); // 200 for AM + HASH_SET(_channel,"deviation",8.0); + HASH_SET(_channel,"optionCode",201); // 200 for AM */ diff --git a/addons/sys_prc152/fnc_initializeRadio.sqf b/addons/sys_prc152/fnc_initializeRadio.sqf index f19d3aea2..84e62045c 100644 --- a/addons/sys_prc152/fnc_initializeRadio.sqf +++ b/addons/sys_prc152/fnc_initializeRadio.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("INITIALIZING RADIO PRC-152", _this); +TRACE_1("INITIALIZING RADIO PRC-152",_this); params ["_radioId", "_event", "_eventData", "_radioData"]; @@ -26,7 +26,7 @@ private _presetData = [_baseName, _preset] call EFUNC(sys_data,getPresetData); private _channels = HASH_GET(_presetData,"channels"); private _currentChannels = HASH_GET(_radioData,"channels"); -SCRATCH_SET(_radioId, "currentTransmissions", []); +SCRATCH_SET(_radioId,"currentTransmissions",[]); if (isNil "_currentChannels") then { _currentChannels = []; @@ -35,11 +35,11 @@ if (isNil "_currentChannels") then { for "_i" from 0 to (count _channels)-1 do { private _channelData = HASH_COPY((_channels select _i)); - TRACE_1("Setting PRC-152 Init Channel Data", _channelData); - PUSH(_currentChannels, _channelData); + TRACE_1("Setting PRC-152 Init Channel Data",_channelData); + PUSH(_currentChannels,_channelData); }; HASH_SET(_radioData,"volume",EGVAR(sys_core,defaultRadioVolume)); HASH_SET(_radioData,"currentChannel",0); HASH_SET(_radioData,"radioOn",1); -HASH_SET(_radioData,"audioPath", "TOPAUDIO"); +HASH_SET(_radioData,"audioPath","TOPAUDIO"); HASH_SET(_radioData,"powerSource","BAT"); diff --git a/addons/sys_prc152/fnc_openGui.sqf b/addons/sys_prc152/fnc_openGui.sqf index 903f0c461..af7504271 100644 --- a/addons/sys_prc152/fnc_openGui.sqf +++ b/addons/sys_prc152/fnc_openGui.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("OPENING GUI", _this); +TRACE_1("OPENING GUI",_this); params ["_radioId", "", "", "", ""]; // Prevent radio from being opened if it is externally used or it is not accessible @@ -32,10 +32,10 @@ MAIN_DISPLAY call (uiNamespace getVariable "CBA_events_fnc_initDisplayCurator"); private _onState = [GVAR(currentRadioId), "getOnOffState"] call EFUNC(sys_data,dataEvent); -TRACE_2("Opening 152", GVAR(currentRadioId), _onState); +TRACE_2("Opening 152",GVAR(currentRadioId),_onState); if (_onState >= 1) then { - private _currentMenu = GET_STATE_DEF("currentMenu", GVAR(VULOSHOME)); + private _currentMenu = GET_STATE_DEF("currentMenu",GVAR(VULOSHOME)); [_currentMenu] call FUNC(changeMenu); } else { //[GVAR(LOADING)] call FUNC(changeMenu); diff --git a/addons/sys_prc152/fnc_preset_information.sqf b/addons/sys_prc152/fnc_preset_information.sqf index 48dbd9355..83927e69a 100644 --- a/addons/sys_prc152/fnc_preset_information.sqf +++ b/addons/sys_prc152/fnc_preset_information.sqf @@ -31,7 +31,7 @@ for "_i" from 0 to 99 do { }; } forEach _usedPresetFrequencies; if (_ok || (count _usedPresetFrequencies) == 0) then { - PUSH(_usedPresetFrequencies, _frequency); + PUSH(_usedPresetFrequencies,_frequency); }; }; // The above frequency generation is taken from the 148 so we match. @@ -41,23 +41,23 @@ for "_i" from 0 to 99 do { HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); private _desc = format["FMLOSVOC%1",([_i+1, 2] call CBA_fnc_formatNumber)]; HASH_SET(_channel,"description",_desc); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"TEK",1); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"syncLength",256); // 152 specific channel settings - HASH_SET(_channel,"squelch", 3); - HASH_SET(_channel,"deviation", 8.0); - HASH_SET(_channel,"optionCode", 201); // 200 for AM - HASH_SET(_channel,"rxOnly", false); + HASH_SET(_channel,"squelch",3); + HASH_SET(_channel,"deviation",8.0); + HASH_SET(_channel,"optionCode",201); // 200 for AM + HASH_SET(_channel,"rxOnly",false); - HASHLIST_PUSH(_channels, _channel); + HASHLIST_PUSH(_channels,_channel); }; HASH_SET(_presetData,"channels",_channels); ["ACRE_PRC152","default",_presetData] call EFUNC(sys_data,registerRadioPreset); @@ -77,7 +77,7 @@ for "_i" from 0 to 99 do { }; } forEach _usedPresetFrequencies; if (_ok || (count _usedPresetFrequencies) == 0) then { - PUSH(_usedPresetFrequencies, _frequency); + PUSH(_usedPresetFrequencies,_frequency); }; }; // The above frequency generation is taken from the 148 so we match. @@ -87,23 +87,23 @@ for "_i" from 0 to 99 do { HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); private _desc = format["FMLOSVOC%1",([_i+1, 2] call CBA_fnc_formatNumber)]; HASH_SET(_channel,"description",_desc); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"TEK",1); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"syncLength",256); // 152 specific channel settings - HASH_SET(_channel,"squelch", 3); - HASH_SET(_channel,"deviation", 8.0); - HASH_SET(_channel,"optionCode", 201); // 200 for AM - HASH_SET(_channel,"rxOnly", false); + HASH_SET(_channel,"squelch",3); + HASH_SET(_channel,"deviation",8.0); + HASH_SET(_channel,"optionCode",201); // 200 for AM + HASH_SET(_channel,"rxOnly",false); - HASHLIST_PUSH(_channels, _channel); + HASHLIST_PUSH(_channels,_channel); }; HASH_SET(_presetData,"channels",_channels); ["ACRE_PRC152","default2",_presetData] call EFUNC(sys_data,registerRadioPreset); @@ -123,7 +123,7 @@ for "_i" from 0 to 99 do { }; } forEach _usedPresetFrequencies; if (_ok || (count _usedPresetFrequencies) == 0) then { - PUSH(_usedPresetFrequencies, _frequency); + PUSH(_usedPresetFrequencies,_frequency); }; }; // The above frequency generation is taken from the 148 so we match. @@ -133,23 +133,23 @@ for "_i" from 0 to 99 do { HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); private _desc = format["FMLOSVOC%1",([_i+1, 2] call CBA_fnc_formatNumber)]; HASH_SET(_channel,"description",_desc); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"TEK",1); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"syncLength",256); // 152 specific channel settings - HASH_SET(_channel,"squelch", 3); - HASH_SET(_channel,"deviation", 8.0); - HASH_SET(_channel,"optionCode", 201); // 200 for AM - HASH_SET(_channel,"rxOnly", false); + HASH_SET(_channel,"squelch",3); + HASH_SET(_channel,"deviation",8.0); + HASH_SET(_channel,"optionCode",201); // 200 for AM + HASH_SET(_channel,"rxOnly",false); - HASHLIST_PUSH(_channels, _channel); + HASHLIST_PUSH(_channels,_channel); }; HASH_SET(_presetData,"channels",_channels); ["ACRE_PRC152","default3",_presetData] call EFUNC(sys_data,registerRadioPreset); @@ -169,7 +169,7 @@ for "_i" from 0 to 99 do { }; } forEach _usedPresetFrequencies; if (_ok || (count _usedPresetFrequencies) == 0) then { - PUSH(_usedPresetFrequencies, _frequency); + PUSH(_usedPresetFrequencies,_frequency); }; }; // The above frequency generation is taken from the 148 so we match. @@ -179,23 +179,23 @@ for "_i" from 0 to 99 do { HASH_SET(_channel,"frequencyRX",_frequency); HASH_SET(_channel,"power",5000); HASH_SET(_channel,"encryption",0); - HASH_SET(_channel,"channelMode", "BASIC"); + HASH_SET(_channel,"channelMode","BASIC"); private _desc = format["FMLOSVOC%1",([_i+1, 2] call CBA_fnc_formatNumber)]; HASH_SET(_channel,"description",_desc); - HASH_SET(_channel,"CTCSSTx", 250.3); - HASH_SET(_channel,"CTCSSRx", 250.3); + HASH_SET(_channel,"CTCSSTx",250.3); + HASH_SET(_channel,"CTCSSRx",250.3); HASH_SET(_channel,"modulation","FM"); HASH_SET(_channel,"TEK",1); HASH_SET(_channel,"trafficRate",16); HASH_SET(_channel,"syncLength",256); // 152 specific channel settings - HASH_SET(_channel,"squelch", 3); - HASH_SET(_channel,"deviation", 8.0); - HASH_SET(_channel,"optionCode", 201); // 200 for AM - HASH_SET(_channel,"rxOnly", false); + HASH_SET(_channel,"squelch",3); + HASH_SET(_channel,"deviation",8.0); + HASH_SET(_channel,"optionCode",201); // 200 for AM + HASH_SET(_channel,"rxOnly",false); - HASHLIST_PUSH(_channels, _channel); + HASHLIST_PUSH(_channels,_channel); }; HASH_SET(_presetData,"channels",_channels); ["ACRE_PRC152","default4",_presetData] call EFUNC(sys_data,registerRadioPreset); diff --git a/addons/sys_prc152/fnc_render.sqf b/addons/sys_prc152/fnc_render.sqf index 58ed2bdb3..bd14b0438 100644 --- a/addons/sys_prc152/fnc_render.sqf +++ b/addons/sys_prc152/fnc_render.sqf @@ -24,10 +24,10 @@ if (_this isNotEqualTo []) then { _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; }; -private _knobPosition = GET_STATE_DEF("knobPosition", 1); +private _knobPosition = GET_STATE_DEF("knobPosition",1); private _knobImageStr = [_knobPosition, 1, 0] call CBA_fnc_formatNumber; _knobImageStr = format ["\idi\acre\addons\sys_prc152\Data\knobs\channelknob\prc152c_ui_knob_%1.paa", _knobImageStr]; -TRACE_1("Setting knob image", _knobImageStr); +TRACE_1("Setting knob image",_knobImageStr); (_display displayCtrl ICON_KNOB) ctrlSetText _knobImageStr; (_display displayCtrl ICON_KNOB) ctrlCommit 0; diff --git a/addons/sys_prc152/menus/fnc_callEntryFunctor.sqf b/addons/sys_prc152/menus/fnc_callEntryFunctor.sqf index dad5e6ad7..822c67240 100644 --- a/addons/sys_prc152/menus/fnc_callEntryFunctor.sqf +++ b/addons/sys_prc152/menus/fnc_callEntryFunctor.sqf @@ -18,7 +18,7 @@ params ["_menu"]; -TRACE_1("enter", _menu); +TRACE_1("enter",_menu); private _ret = false; if ((!isNil "_menu") && {(count _menu) > 5}) then { private _events = MENU_ACTION_EVENTS(_menu); diff --git a/addons/sys_prc152/menus/fnc_callRenderFunctor.sqf b/addons/sys_prc152/menus/fnc_callRenderFunctor.sqf index 3268ce51e..7defeb06f 100644 --- a/addons/sys_prc152/menus/fnc_callRenderFunctor.sqf +++ b/addons/sys_prc152/menus/fnc_callRenderFunctor.sqf @@ -17,7 +17,7 @@ */ params ["_menu"]; -TRACE_1("enter", _menu); +TRACE_1("enter",_menu); private _ret = false; if ((!isNil "_menu") && {(count _menu) > 5}) then { diff --git a/addons/sys_prc152/menus/fnc_changeMenu.sqf b/addons/sys_prc152/menus/fnc_changeMenu.sqf index 704c99e67..5cb338f1d 100644 --- a/addons/sys_prc152/menus/fnc_changeMenu.sqf +++ b/addons/sys_prc152/menus/fnc_changeMenu.sqf @@ -16,17 +16,17 @@ * Public: No */ -TRACE_1("changeMenu", _this); +TRACE_1("changeMenu",_this); params ["_newMenu"]; /* if (!([_newMenu] call FUNC(verifyIsMenu)) ) then { - _newMenu = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + _newMenu = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); }; */ // clear menu data -SET_STATE("menuSelection", 0); +SET_STATE("menuSelection",0); // // @@ -36,35 +36,35 @@ SCRATCH_SET(GVAR(currentRadioId),"menuEntry",true); // Set the state if (!isNil "_oldMenu") then { if (_oldMenu isEqualType "") then { - _oldMenu = HASH_GET(GVAR(Menus), _oldMenu); + _oldMenu = HASH_GET(GVAR(Menus),_oldMenu); }; if (!isNil "_oldMenu") then { - TRACE_1("changeMenu calling", _oldMenu); + TRACE_1("changeMenu calling",_oldMenu); [_oldMenu] call FUNC(callCompleteFunctor); private _menuId = MENU_ID(_oldMenu); - if (!isNil "_menuId") then { SET_STATE("lastMenu", _menuId); } else { SET_STATE("lastMenu", _oldMenu); }; + if (!isNil "_menuId") then { SET_STATE("lastMenu",_menuId); } else { SET_STATE("lastMenu",_oldMenu); }; }; }; // Set the state if (_newMenu isEqualType "") then { if (_newMenu == "HOME") then { - _newMenu = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + _newMenu = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); }; if (_newMenu isEqualType "") then { - _newMenu = HASH_GET(GVAR(Menus), _newMenu); + _newMenu = HASH_GET(GVAR(Menus),_newMenu); }; }; -TRACE_1("CHANGING MENU", _newMenu); +TRACE_1("CHANGING MENU",_newMenu); if (isNil "_newMenu") then { // Fall back worst case on the VULOS home if we fucked up royally somehow _newMenu = GVAR(VULOSHOME); }; private _menuId = MENU_ID(_newMenu); -if (!isNil "_menuId") then { SET_STATE("currentMenu", _menuId); } else { SET_STATE("currentMenu", _newMenu); }; +if (!isNil "_menuId") then { SET_STATE("currentMenu",_menuId); } else { SET_STATE("currentMenu",_newMenu); }; [_newMenu] call FUNC(callEntryFunctor); [_newMenu, _oldMenu] call FUNC(renderMenu); -SCRATCH_SET(GVAR(currentRadioId), "menuEntry", false); +SCRATCH_SET(GVAR(currentRadioId),"menuEntry",false); diff --git a/addons/sys_prc152/menus/fnc_changeMode.sqf b/addons/sys_prc152/menus/fnc_changeMode.sqf index 210c7a635..48f49add6 100644 --- a/addons/sys_prc152/menus/fnc_changeMode.sqf +++ b/addons/sys_prc152/menus/fnc_changeMode.sqf @@ -16,22 +16,22 @@ * Public: No */ -TRACE_1("changeMode", _this); +TRACE_1("changeMode",_this); -private _knobPosition = GET_STATE_DEF("knobPosition", 1); +private _knobPosition = GET_STATE_DEF("knobPosition",1); if (_knobPosition == 0) then { - TRACE_2("Turning radio off!", _knobPosition, GVAR(currentRadioId)); + TRACE_2("Turning radio off!",_knobPosition,GVAR(currentRadioId)); [GVAR(currentRadioId), "setOnOffState", 0] call EFUNC(sys_data,dataEvent); private _onOffState = [GVAR(currentRadioId), "getOnOffState"] call EFUNC(sys_data,dataEvent); - TRACE_1("TEST", _onOffState); + TRACE_1("TEST",_onOffState); [GVAR(OFF)] call FUNC(changeMenu); } else { private _onOffState = [GVAR(currentRadioId), "getOnOffState"] call EFUNC(sys_data,dataEvent); - TRACE_2("State", _knobPosition, _onOffState); + TRACE_2("State",_knobPosition,_onOffState); if (_onOffState >= 1) then { ["setCurrentChannel", _knobPosition - 1] call GUI_DATA_EVENT; - private _currentMenu = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + private _currentMenu = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); [_currentMenu] call FUNC(renderMenu); } else { if (_onOffState == 0) then { diff --git a/addons/sys_prc152/menus/fnc_changeValueAck.sqf b/addons/sys_prc152/menus/fnc_changeValueAck.sqf index 0e1207b89..08ea4b65e 100644 --- a/addons/sys_prc152/menus/fnc_changeValueAck.sqf +++ b/addons/sys_prc152/menus/fnc_changeValueAck.sqf @@ -21,7 +21,7 @@ DFUNC(changeValueAck_End) = { TRACE_1("",_this); if (diag_tickTime > GVAR(changeValueAckTimer)) then { - private _lastMenu = SCRATCH_GET_DEF(_radioId, "lastMenu", nil); + private _lastMenu = SCRATCH_GET_DEF(_radioId,"lastMenu",nil); if (isNil "_lastMenu") then { _lastMenu = GVAR(VULOSHOME); }; if (!isNil QEGVAR(sys_radio,currentRadioDialog)) then { @@ -56,13 +56,13 @@ if (EGVAR(sys_radio,currentRadioDialog) != GVAR(currentRadioId)) exitWith { [] call FUNC(clearDisplay); -TRACE_2("ENTER", _valueType, _value); +TRACE_2("ENTER",_valueType,_value); switch _valueType do { case 'VOLUME': { - private _lastMenu = SCRATCH_GET_DEF(GVAR(currentRadioId), "lastMenu", nil); + private _lastMenu = SCRATCH_GET_DEF(GVAR(currentRadioId),"lastMenu",nil); if (isNil "_lastMenu") then { - SCRATCH_SET(GVAR(currentRadioId), "lastMenu", _menu); + SCRATCH_SET(GVAR(currentRadioId),"lastMenu",_menu); }; GVAR(changeValueAckTimer) = diag_tickTime + 3.5; diff --git a/addons/sys_prc152/menus/fnc_createMenu.sqf b/addons/sys_prc152/menus/fnc_createMenu.sqf index 8ff74aa99..f05c24150 100644 --- a/addons/sys_prc152/menus/fnc_createMenu.sqf +++ b/addons/sys_prc152/menus/fnc_createMenu.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("createMenu", _this); +TRACE_1("createMenu",_this); params ["_menu","_parentMenu"]; diff --git a/addons/sys_prc152/menus/fnc_defaultButtonPress.sqf b/addons/sys_prc152/menus/fnc_defaultButtonPress.sqf index d0663e0d3..260020a53 100644 --- a/addons/sys_prc152/menus/fnc_defaultButtonPress.sqf +++ b/addons/sys_prc152/menus/fnc_defaultButtonPress.sqf @@ -30,13 +30,13 @@ if (_dir == 0) then { }; private _display = uiNamespace getVariable [QGVAR(currentDisplay), displayNull]; -TRACE_2("defaultButtonPress", _display, _event); +TRACE_2("defaultButtonPress",_display,_event); switch (_event select 0) do { case 'VOLUME': { private _volume = GET_STATE("volume"); - TRACE_2("Volume Before", _volume, _dir); + TRACE_2("Volume Before",_volume,_dir); _volume = ( (_volume * 10) + _dir) / 10; - TRACE_1("Volume After", _volume); + TRACE_1("Volume After",_volume); if (_volume > 1) then { _volume = 1.0; @@ -44,13 +44,13 @@ switch (_event select 0) do { if (_volume < 0) then { _volume = 0; }; - SET_STATE("volume", _volume); + SET_STATE("volume",_volume); ["setVolume", _volume] call GUI_DATA_EVENT; }; case 'KNOB': { // Knob was clicked - private _knobPositionOld = GET_STATE_DEF("knobPosition", 1); - TRACE_2("Knob Press", _knobPositionOld, _dir); + private _knobPositionOld = GET_STATE_DEF("knobPosition",1); + TRACE_2("Knob Press",_knobPositionOld,_dir); /////////////////////// private _knobPosition = _knobPositionOld + _dir; @@ -61,8 +61,8 @@ switch (_event select 0) do { _knobPosition = 0; }; - TRACE_1("New knob position", _knobPosition); - SET_STATE("knobPosition", _knobPosition); + TRACE_1("New knob position",_knobPosition); + SET_STATE("knobPosition",_knobPosition); _this call FUNC(changeMode); }; diff --git a/addons/sys_prc152/menus/fnc_delayFunction.sqf b/addons/sys_prc152/menus/fnc_delayFunction.sqf index fafcaad66..c7e01b61e 100644 --- a/addons/sys_prc152/menus/fnc_delayFunction.sqf +++ b/addons/sys_prc152/menus/fnc_delayFunction.sqf @@ -18,7 +18,7 @@ params ["_radioId", "_endFunction", "_time"]; -TRACE_1("Registering a delayed function!", _this); +TRACE_1("Registering a delayed function!",_this); [{ params ["_args"]; diff --git a/addons/sys_prc152/menus/fnc_drawCursor.sqf b/addons/sys_prc152/menus/fnc_drawCursor.sqf index 31449c641..cb1d141b3 100644 --- a/addons/sys_prc152/menus/fnc_drawCursor.sqf +++ b/addons/sys_prc152/menus/fnc_drawCursor.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("drawCursor", _this); +TRACE_1("drawCursor",_this); // Swap the background and foreground colors for a text range private ["_saveLength", "_rowCount"]; // TODO undefined in some cases private _display = uiNamespace getVariable QGVAR(currentDisplay); @@ -60,7 +60,7 @@ if (_alignment != ALIGN_LEFT) then { _saveLength = _i; }; }; - TRACE_2("Determined start and save", _start, _saveLength); + TRACE_2("Determined start and save",_start,_saveLength); } else { //TODO _rowCount is undefined _saveLength = _rowCount; @@ -71,7 +71,7 @@ if (_len < 1) then { // Find the length of the string, and highlight it _len = _saveLength - _start; } else { - TRACE_2("Highlighting", _start, _len); + TRACE_2("Highlighting",_start,_len); if (_alignment != ALIGN_LEFT) then { _len = _len - 1; }; diff --git a/addons/sys_prc152/menus/fnc_dynamicCall.sqf b/addons/sys_prc152/menus/fnc_dynamicCall.sqf index 463f8efc8..73a5e5348 100644 --- a/addons/sys_prc152/menus/fnc_dynamicCall.sqf +++ b/addons/sys_prc152/menus/fnc_dynamicCall.sqf @@ -16,13 +16,13 @@ * Public: No */ -TRACE_1("dynamicCall", _this); +TRACE_1("dynamicCall",_this); private ["_ret"]; params ["_funcName", "_var"]; if (_funcName isEqualType "") then { private _func = missionNamespace getVariable format["%1_fnc_%2", QUOTE(ADDON), _funcName]; - _ret = _var call CALLSTACK_NAMED(_func, _funcName); + _ret = _var call CALLSTACK_NAMED(_func,_funcName); } else { if (_funcName isEqualType {}) then { // Calling code diff --git a/addons/sys_prc152/menus/fnc_formatText.sqf b/addons/sys_prc152/menus/fnc_formatText.sqf index 7f12b358d..db2fa145c 100644 --- a/addons/sys_prc152/menus/fnc_formatText.sqf +++ b/addons/sys_prc152/menus/fnc_formatText.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("formatText", _this); +TRACE_1("formatText",_this); params ["_text"]; @@ -25,7 +25,7 @@ if (count _this > 1) then { private _hash = _this select 1; { private _repStr = "%"+_x; - _text = [_text, _repStr, HASH_GET(_hash, _x)] call CBA_fnc_replace; + _text = [_text, _repStr, HASH_GET(_hash,_x)] call CBA_fnc_replace; } forEach HASH_KEYS(_hash); }; @@ -33,30 +33,30 @@ if (count _this > 1) then { private _result = [_text, "$ch"] call CBA_fnc_find; private _iter = 0; while { _result != -1 && _iter < 5} do { - TRACE_2("FOUND CHANNEL VALUE REPLACE", _text, _result); + TRACE_2("FOUND CHANNEL VALUE REPLACE",_text,_result); private _dash = [_text, "-", _result] call CBA_fnc_find; private _space = [_text, " ", _result] call CBA_fnc_find; if (_dash == -1) exitWith {}; if (_space == -1) then { _space = count (toArray _text); }; - TRACE_4("BALLS", _text, _result, _dash, _space); + TRACE_4("BALLS",_text,_result,_dash,_space); private _channelNumber = (parseNumber ([_text, _result+3, (_dash - (_result+3))] call CBA_fnc_substr)) - 1; private _key = [_text, _dash+1, (_space - _dash)] call CBA_fnc_substr; private _replacementValue = [_text, _result, (_space - _result)] call CBA_fnc_substr; - TRACE_3("Replacement index", _replacementValue, _channelNumber, _key); + TRACE_3("Replacement index",_replacementValue,_channelNumber,_key); - private _channel = HASHLIST_SELECT(GET_STATE("channels"), _channelNumber); - private _value = HASH_GET(_channel, _key); + private _channel = HASHLIST_SELECT(GET_STATE("channels"),_channelNumber); + private _value = HASH_GET(_channel,_key); - TRACE_2("channel data", _channelNumber, _channel); - TRACE_3("Performing replacement", _text, _key, _value); + TRACE_2("channel data",_channelNumber,_channel); + TRACE_3("Performing replacement",_text,_key,_value); _text = [ _text, _replacementValue, [_key, _value] call FUNC(formatChannelValue) ] call CBA_fnc_replace; - TRACE_1("DONE", _text); + TRACE_1("DONE",_text); _iter = _iter + 1; _result = [_text, "$ch"] call CBA_fnc_find; @@ -86,11 +86,11 @@ if (_result != -1) then { _text = [_text, "$cch-number", ([_channelNumber+1, 2] call CBA_fnc_formatNumber)] call CBA_fnc_replace; }; - TRACE_2("channel data", _channelNumber, _channel); + TRACE_2("channel data",_channelNumber,_channel); { private _repStr = "$cch-" + _x; - private _value = [ _x, HASH_GET(_channel, _x) ] call FUNC(formatChannelValue); - TRACE_3("Calling replace", _text, _repStr, _value); + private _value = [ _x, HASH_GET(_channel,_x) ] call FUNC(formatChannelValue); + TRACE_3("Calling replace",_text,_repStr,_value); _result = [_text, _x] call CBA_fnc_find; if (_result != -1) then { _text = [_text, _repStr, _value] call CBA_fnc_replace; @@ -99,5 +99,5 @@ if (_result != -1) then { }; // TODO: We need to find a way to replace icon shit. -TRACE_1("Returning", _text); +TRACE_1("Returning",_text); _text diff --git a/addons/sys_prc152/menus/fnc_onButtonPress.sqf b/addons/sys_prc152/menus/fnc_onButtonPress.sqf index 139de94de..073a8a15c 100644 --- a/addons/sys_prc152/menus/fnc_onButtonPress.sqf +++ b/addons/sys_prc152/menus/fnc_onButtonPress.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("enter", _this); +TRACE_1("enter",_this); //["Acre_GenericClick", [0,0,0], [0,0,0], 0.2, false] call EFUNC(sys_sounds,playSound); @@ -33,8 +33,8 @@ if (_control != 222 && {_control != (99902 + 116)} && {_control != (99902 + 117) }; -private _currentMenu = GET_STATE_DEF("currentMenu", ""); -TRACE_1("Got current menu", _currentMenu); +private _currentMenu = GET_STATE_DEF("currentMenu",""); +TRACE_1("Got current menu",_currentMenu); if (isNil "_currentMenu") exitWith { WARNING("Button press without a selected menu item!"); @@ -42,14 +42,14 @@ if (isNil "_currentMenu") exitWith { }; if (_currentMenu isEqualType "" && {_currentMenu != ""}) then { - private _tmpMenu = HASH_GET(GVAR(Menus), _currentMenu); + private _tmpMenu = HASH_GET(GVAR(Menus),_currentMenu); if (!isNil "_tmpMenu") then { _currentMenu = _tmpMenu; }; }; if (_currentMenu isEqualType []) then { - TRACE_1("Searching for key handler", MENU_ID(_currentMenu)); + TRACE_1("Searching for key handler",MENU_ID(_currentMenu)); // First, call our global key handler // We only call it if we had a valid menu, because it means the radio is active. Right!? // If it returns true, it means it consumed it and we dont move further @@ -94,16 +94,16 @@ if (_currentMenu isEqualType []) then { if (isNil "_ret") then { _ret = false; }; if (!_ret) then { - //TRACE_2("", _currentMenu, _this); + //TRACE_2("",_currentMenu,_this); _ret = [_currentMenu, _this] call FUNC(defaultButtonPress); if (!_ret) then { private _newId = nil; - private _newMenu = GET_STATE_DEF("currentMenu", GVAR(VULOSHOME)); + private _newMenu = GET_STATE_DEF("currentMenu",GVAR(VULOSHOME)); private _oldId = MENU_ID(_currentMenu); if (typeName _newMenu == "STRING") then { _newId = _newMenu; - _newMenu = HASH_GET(GVAR(Menus), _newMenu); + _newMenu = HASH_GET(GVAR(Menus),_newMenu); }; if (!isNil "_oldId" && {!isNil "_newId"}) then { diff --git a/addons/sys_prc152/menus/fnc_renderMenu.sqf b/addons/sys_prc152/menus/fnc_renderMenu.sqf index 784b7bfe5..e13bd2968 100644 --- a/addons/sys_prc152/menus/fnc_renderMenu.sqf +++ b/addons/sys_prc152/menus/fnc_renderMenu.sqf @@ -16,21 +16,21 @@ * Public: No */ -TRACE_1("renderMenu", _this); +TRACE_1("renderMenu",_this); params ["_menu", "_callerMenu"]; // the menu to render is passed [] call FUNC(clearDisplay); /* if (!([_menu] call FUNC(verifyIsMenu)) ) exitWith { - _menu = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + _menu = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); [_menu] call FUNC(changeMenu); }; */ private _menuId = MENU_ID(_menu); if (isNil "_menuId") then { - SET_STATE("currentRenderMenu", _menu); + SET_STATE("currentRenderMenu",_menu); } else { - SET_STATE("currentRenderMenu", _menuId); + SET_STATE("currentRenderMenu",_menuId); }; [_menu] call FUNC(callRenderFunctor); @@ -39,11 +39,11 @@ if (MENU_TYPE(_menu) >= MENU_ACTION_NONE ) then { switch ( MENU_TYPE(_menu) ) do { // Its not a full submenu, but it references another embedded submenu. Render it case MENU_ACTION_SUBMENU: { - TRACE_1("MENU_ACTION_SUBMENU", MENU_SUBMENUS_ITEM(_menu,0)); - [MENU_SUBMENUS_ITEM(_menu,0), _callerMenu] call FUNC(changeMenu); + TRACE_1("MENU_ACTION_SUBMENU",MENU_SUBMENUS_ITEM(_menu,0)); + [MENU_SUBMENUS_ITEM(_menu,0),_callerMenu] call FUNC(changeMenu); }; case MENU_ACTION_CODE: { - [_menu, _callerMenu] call MENU_SUBMENUS_ITEM(_menu, 0); + [_menu, _callerMenu] call MENU_SUBMENUS_ITEM(_menu,0); }; default { WARNING("Unhandled menu action type!"); @@ -80,7 +80,7 @@ if (MENU_TYPE(_menu) >= MENU_ACTION_NONE ) then { }; default { - TRACE_1("!!! INVALID MENU SPECIFIED", ""); + TRACE_1("!!! INVALID MENU SPECIFIED",""); }; }; }; diff --git a/addons/sys_prc152/menus/fnc_renderText.sqf b/addons/sys_prc152/menus/fnc_renderText.sqf index fbe4ad9f0..b32f1ac5f 100644 --- a/addons/sys_prc152/menus/fnc_renderText.sqf +++ b/addons/sys_prc152/menus/fnc_renderText.sqf @@ -20,7 +20,7 @@ BEGIN_COUNTER(renderText); #endif -TRACE_1("renderText", _this); +TRACE_1("renderText",_this); params ["_row", "_text", ["_alignment", ALIGN_LEFT]]; diff --git a/addons/sys_prc152/menus/fnc_setRowText.sqf b/addons/sys_prc152/menus/fnc_setRowText.sqf index 7ae83f59e..edc6498d5 100644 --- a/addons/sys_prc152/menus/fnc_setRowText.sqf +++ b/addons/sys_prc152/menus/fnc_setRowText.sqf @@ -20,7 +20,7 @@ BEGIN_COUNTER(setRowText); #endif -TRACE_1("setRowText", _this); +TRACE_1("setRowText",_this); private _display = uiNamespace getVariable QGVAR(currentDisplay); params ["_row", "_string", ["_alignment", ALIGN_LEFT]]; @@ -55,7 +55,7 @@ switch _alignment do { _start = floor ( (_rowCount - _length) / 2); }; }; -TRACE_3("setting text", _start, _rowCount, _length); +TRACE_3("setting text",_start,_rowCount,_length); private _baseId = (_row * 1000) +1; diff --git a/addons/sys_prc152/menus/fnc_timerFunction.sqf b/addons/sys_prc152/menus/fnc_timerFunction.sqf index 780fddf90..d24a7ceeb 100644 --- a/addons/sys_prc152/menus/fnc_timerFunction.sqf +++ b/addons/sys_prc152/menus/fnc_timerFunction.sqf @@ -18,7 +18,7 @@ params ["_radioId","_endFunction", "_step", "_time"]; -TRACE_1("Registering a delayed function!", _this); +TRACE_1("Registering a delayed function!",_this); GVAR(timerFunction_NextStep) = diag_tickTime + _step; [{ diff --git a/addons/sys_prc152/menus/types/ActionSeries.sqf b/addons/sys_prc152/menus/types/ActionSeries.sqf index 1cc497b22..a34b28a46 100644 --- a/addons/sys_prc152/menus/types/ActionSeries.sqf +++ b/addons/sys_prc152/menus/types/ActionSeries.sqf @@ -17,50 +17,50 @@ */ DFUNC(onButtonPress_ActionSeries) = { - TRACE_1("onButtonPress_List", _this); + TRACE_1("onButtonPress_List",_this); params ["_menu", "_event"]; WARNING("AN/PRC-152 Menu Error!, This should not have been reached!"); }; DFUNC(renderMenu_ActionSeries) = { - TRACE_1("renderMenu_ActionSeries", _this); + TRACE_1("renderMenu_ActionSeries",_this); params ["_menu"]; // Its an action list of things to do in series, // which can be action menu types. Either way, they always bail back to us once completed - private _currentAction = GET_STATE_DEF("menuAction", 0); + private _currentAction = GET_STATE_DEF("menuAction",0); if (_currentAction < (count MENU_SUBMENUS(_menu)) ) then { // Annnnnd call it if (_currentAction > 0) then { - private _subMenu = MENU_SUBMENUS_ITEM(_menu, _currentAction-1); + private _subMenu = MENU_SUBMENUS_ITEM(_menu,_currentAction-1); [_subMenu] call FUNC(callSingleActionCompleteFunctor); }; private _saveAction = -1; if (_currentAction < (count MENU_SUBMENUS(_menu)) ) then { - private _subMenu = MENU_SUBMENUS_ITEM(_menu, _currentAction); - TRACE_1("ACTIONS INCREMENTING", _currentAction); + private _subMenu = MENU_SUBMENUS_ITEM(_menu,_currentAction); + TRACE_1("ACTIONS INCREMENTING",_currentAction); _saveAction = _currentAction; [_subMenu] call FUNC(changeMenu); }; // Get the last menuAction in case it was modified during menu operations (RX only, power level selection, ...) - _currentAction = GET_STATE_DEF("menuAction", 0); + _currentAction = GET_STATE_DEF("menuAction",0); _currentAction = _currentAction + 1; - SET_STATE("menuAction", _currentAction); + SET_STATE("menuAction",_currentAction); if (_saveAction+1 != _currentAction) then { _this call FUNC(renderMenu_ActionSeries); }; } else { - TRACE_1("ACTIONS COMPLETE", _currentAction); + TRACE_1("ACTIONS COMPLETE",_currentAction); // Call the action completion function - SET_STATE("menuAction", 0); - TRACE_1("Calling", MENU_ACTION_SERIESCOMPLETE(_menu)); + SET_STATE("menuAction",0); + TRACE_1("Calling",MENU_ACTION_SERIESCOMPLETE(_menu)); private _ret = [MENU_ACTION_SERIESCOMPLETE(_menu), [_menu]] call FUNC(dynamicCall); // Swap back to our parent @@ -69,7 +69,7 @@ DFUNC(renderMenu_ActionSeries) = { if (isNil "_ret") then { _ret = false; }; if (!_ret) then { private _parent = MENU_PARENT(_menu); - TRACE_1("Calling Parent!", _menuParent); + TRACE_1("Calling Parent!",_menuParent); [_parent] call FUNC(changeMenu); }; }; diff --git a/addons/sys_prc152/menus/types/Alphanumeric.sqf b/addons/sys_prc152/menus/types/Alphanumeric.sqf index 7d94aa2bc..7e23bfa55 100644 --- a/addons/sys_prc152/menus/types/Alphanumeric.sqf +++ b/addons/sys_prc152/menus/types/Alphanumeric.sqf @@ -32,36 +32,36 @@ GVAR(NumpadMap) = [ DFUNC(doAlphanumericButton) = { params ["_menu", "_event"]; - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuAlphaCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuAlphaCursor",0); - private _editButtonPress = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuAlphaCursorPress", 0); + private _editButtonPress = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuAlphaCursorPress",0); private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 0); - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuString", ""); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuString",""); private _number = parseNumber (_event select 0); private _key = _event select 0; - private _lastButton = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuAlphaLastButton", _key); + private _lastButton = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuAlphaLastButton",_key); if (_lastButton != _key) then { _editButtonPress = 0; [_menu, ['RIGHT']] call FUNC(onButtonPress_Alphanumeric); }; - TRACE_1("", _number); + TRACE_1("",_number); if (_number > -1 && _number < 10) then { private _arr = toArray _value; private _character = _arr select _editIndex; _character = ( toArray ((GVAR(NumpadMap) select _number) select _editButtonPress) select 0); - TRACE_4("Values", _character, _number, _editButtonPress, _arr); + TRACE_4("Values",_character,_number,_editButtonPress,_arr); _arr set[_editIndex, _character]; _value = toString _arr; - TRACE_2("Values 2", _editIndex, _character); - TRACE_1("New value", _value); + TRACE_2("Values 2",_editIndex,_character); + TRACE_1("New value",_value); // Increment the next character to use if (_editButtonPress + 1 >= (count (GVAR(NumpadMap) select _number))) then { @@ -70,9 +70,9 @@ DFUNC(doAlphanumericButton) = { _editButtonPress = _editButtonPress + 1; }; - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaLastButton", _key); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaCursorPress", _editButtonPress); - SCRATCH_SET(GVAR(currentRadioId), "menuString", _value); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaLastButton",_key); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaCursorPress",_editButtonPress); + SCRATCH_SET(GVAR(currentRadioId),"menuString",_value); // Re-render it [_menu] call FUNC(renderMenu_Alphanumeric); @@ -84,9 +84,9 @@ DFUNC(doAlphanumericButton) = { DFUNC(onButtonPress_Alphanumeric) = { params ["_menu", "_event"]; - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuString", ""); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuString",""); - TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!", (_event select 0)); + TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!",(_event select 0)); switch (_event select 0) do { case '1': { _this call FUNC(doAlphanumericButton); }; case '2': { _this call FUNC(doAlphanumericButton); }; @@ -100,51 +100,51 @@ DFUNC(onButtonPress_Alphanumeric) = { case '0': { _this call FUNC(doAlphanumericButton); }; case 'LEFT': { private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 0); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuAlphaCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuAlphaCursor",0); if (_editIndex > 0) then { _editIndex = _editIndex -1; } else { _editIndex = _editDigits -1; }; - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaCursor", _editIndex); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaCursorPress", 0); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaLastButton", nil); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaCursor",_editIndex); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaCursorPress",0); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaLastButton",nil); [_menu] call FUNC(renderMenu_Alphanumeric); }; case 'RIGHT': { private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 0); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuAlphaCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuAlphaCursor",0); if (_editIndex+1 < _editDigits) then { _editIndex = _editIndex + 1; } else { _editIndex = 0; }; - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaCursor", _editIndex); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaCursorPress", 0); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaLastButton", nil); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaCursor",_editIndex); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaCursorPress",0); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaLastButton",nil); [_menu] call FUNC(renderMenu_Alphanumeric); }; case 'ENT': { // swap to the parent - TRACE_1("onButtonPress_Alphanumeric: ENT hit", _value); + TRACE_1("onButtonPress_Alphanumeric: ENT hit",_value); private _saveName = MENU_SELECTION_VARIABLE(_menu); - SET_STATE(_saveName, _value); + SET_STATE(_saveName,_value); - SCRATCH_SET(GVAR(currentRadioId), "menuString", nil); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaCursorPress", 0); - SCRATCH_SET(GVAR(currentRadioId), "menuAlphaLastButton", nil); + SCRATCH_SET(GVAR(currentRadioId),"menuString",nil); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaCursorPress",0); + SCRATCH_SET(GVAR(currentRadioId),"menuAlphaLastButton",nil); - TRACE_2("Saved", _saveName, (GET_STATE(_saveName))); + TRACE_2("Saved",_saveName,(GET_STATE(_saveName))); // Our parent? - TRACE_1("Parent", MENU_PARENT_ID(_menu)); + TRACE_1("Parent",MENU_PARENT_ID(_menu)); [MENU_PARENT_ID(_menu)] call FUNC(changeMenu); }; case 'CLR': { TRACE_1("onButtonPress_Alphanumeric: CLR hit",""); - private _parentMenu = HASH_GET(GVAR(Menus), MENU_PARENT_ID(_menu)); + private _parentMenu = HASH_GET(GVAR(Menus),MENU_PARENT_ID(_menu)); private _useParent = true; //If Parent action series -> Go to its parent. @@ -152,7 +152,7 @@ DFUNC(onButtonPress_Alphanumeric) = { private _pid = MENU_PARENT_ID(_parentMenu); if (_pid isEqualType "") then { _useParent = false; - SET_STATE("menuAction", 0); + SET_STATE("menuAction",0); [_pid] call FUNC(changeMenu); }; }; @@ -172,11 +172,11 @@ DFUNC(renderMenu_Alphanumeric) = { private _displaySet = MENU_SUBMENUS(_menu); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuAlphaCursor", 0); - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuString", ""); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuAlphaCursor",0); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuString",""); private _valueHash = HASH_CREATE; - HASH_SET(_valueHash, "1", _value); + HASH_SET(_valueHash,"1",_value); [] call FUNC(clearDisplay); if (!isNil "_displaySet" && _displaySet isEqualType [] && (count _displaySet) > 0) then { diff --git a/addons/sys_prc152/menus/types/ChangeValueAck.sqf b/addons/sys_prc152/menus/types/ChangeValueAck.sqf index e0f851cfa..1fac49939 100644 --- a/addons/sys_prc152/menus/types/ChangeValueAck.sqf +++ b/addons/sys_prc152/menus/types/ChangeValueAck.sqf @@ -17,14 +17,14 @@ */ DFUNC(onButtonPress_ChangeValueAck) = { - TRACE_1("onButtonPress_ChangeValueAck", _this); + TRACE_1("onButtonPress_ChangeValueAck",_this); false }; DFUNC(renderMenu_ChangeValueAck) = { - TRACE_1("renderMenu_ChangeValueAck", _this); + TRACE_1("renderMenu_ChangeValueAck",_this); params ["_menu"]; // the menu to render is passed private _displaySet = MENU_SUBMENUS(_menu); diff --git a/addons/sys_prc152/menus/types/Display.sqf b/addons/sys_prc152/menus/types/Display.sqf index 6867606c6..9d7415bba 100644 --- a/addons/sys_prc152/menus/types/Display.sqf +++ b/addons/sys_prc152/menus/types/Display.sqf @@ -17,10 +17,10 @@ */ DFUNC(onButtonPress_Display) = { - TRACE_1("onButtonPress_Display", _this); + TRACE_1("onButtonPress_Display",_this); params ["_menu", "_event"]; - private _currentSelection = GET_STATE_DEF("menuSelection", 0); + private _currentSelection = GET_STATE_DEF("menuSelection",0); switch (_event select 0) do { case 'PRE_UP': { // OPT @@ -42,7 +42,7 @@ DFUNC(onButtonPress_Display) = { END_COUNTER(onButtonPress_Display_GuiEvents); #endif - [MENU_SUBMENUS_ITEM(_menu, _currentSelection)] call CALLSTACK(FUNC(renderMenu_Static)); + [MENU_SUBMENUS_ITEM(_menu,_currentSelection)] call CALLSTACK(FUNC(renderMenu_Static)); #ifdef ENABLE_PERFORMANCE_COUNTERS END_COUNTER(onButtonPress_Display_PRE_UP); @@ -68,7 +68,7 @@ DFUNC(onButtonPress_Display) = { END_COUNTER(onButtonPress_Display_GuiEvents); #endif - [MENU_SUBMENUS_ITEM(_menu, _currentSelection)] call CALLSTACK(FUNC(renderMenu_Static)); + [MENU_SUBMENUS_ITEM(_menu,_currentSelection)] call CALLSTACK(FUNC(renderMenu_Static)); #ifdef ENABLE_PERFORMANCE_COUNTERS END_COUNTER(onButtonPress_Display_PRE_DOWN); @@ -81,8 +81,8 @@ DFUNC(onButtonPress_Display) = { ["PGM"] call FUNC(changeMenu); }; case '0': { - TRACE_2("Cycling display", _currentSelection, (count MENU_SUBMENUS(_menu))); - [MENU_SUBMENUS_ITEM(_menu, _currentSelection)] call FUNC(callCompleteFunctor); + TRACE_2("Cycling display",_currentSelection,(count MENU_SUBMENUS(_menu))); + [MENU_SUBMENUS_ITEM(_menu,_currentSelection)] call FUNC(callCompleteFunctor); if (_currentSelection+1 >= (count MENU_SUBMENUS(_menu))) then { _currentSelection = 0; @@ -90,13 +90,13 @@ DFUNC(onButtonPress_Display) = { _currentSelection = _currentSelection + 1; }; - SET_STATE("menuSelection", _currentSelection); - [MENU_SUBMENUS_ITEM(_menu, _currentSelection)] call FUNC(callEntryFunctor); - [MENU_SUBMENUS_ITEM(_menu, _currentSelection)] call FUNC(renderMenu_Static); + SET_STATE("menuSelection",_currentSelection); + [MENU_SUBMENUS_ITEM(_menu,_currentSelection)] call FUNC(callEntryFunctor); + [MENU_SUBMENUS_ITEM(_menu,_currentSelection)] call FUNC(renderMenu_Static); }; default { // Pass the button press along to the child menu - [MENU_SUBMENUS_ITEM(_menu, _currentSelection)] call FUNC(onButtonPress_Static); + [MENU_SUBMENUS_ITEM(_menu,_currentSelection)] call FUNC(onButtonPress_Static); }; }; @@ -108,17 +108,17 @@ DFUNC(renderMenu_Display) = { BEGIN_COUNTER(renderMenu_Display); #endif - TRACE_1("renderMenu_Display", _this); + TRACE_1("renderMenu_Display",_this); params ["_menu"]; // the menu to render is passed private _displaySet = MENU_SUBMENUS(_menu); - private _currentSelection = GET_STATE_DEF("menuSelection", 0); + private _currentSelection = GET_STATE_DEF("menuSelection",0); private _currentDisplay = MENU_SUBMENUS_ITEM(_menu,_currentSelection); // A display set has a set of children STATIC displays, which are rendered and canFire // be swaped with the 'NEXT' circly button thingy - private _entry = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuEntry", false); + private _entry = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuEntry",false); if (_entry) then { [_currentDisplay] call FUNC(callEntryFunctor); }; diff --git a/addons/sys_prc152/menus/types/Frequency.sqf b/addons/sys_prc152/menus/types/Frequency.sqf index 0c08085ea..b665cb1de 100644 --- a/addons/sys_prc152/menus/types/Frequency.sqf +++ b/addons/sys_prc152/menus/types/Frequency.sqf @@ -33,29 +33,29 @@ DFUNC(doFrequencyButton) = { params ["_menu", "_event"]; - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequencyCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequencyCursor",0); private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 2); - private _floatValue = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequency", 0.0); + private _floatValue = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequency",0.0); private _value = ["frequency", _floatValue] call FUNC(formatChannelValue); private _number = parseNumber (_event select 0); private _key = _event select 0; - TRACE_1("", _number); + TRACE_1("",_number); if (_number > -1 && _number < 10) then { private _arr = toArray _value; private _character = _arr select _editIndex; _character = ( toArray ((GVAR(NumpadMap_frequency) select _number) select 0) select 0); - TRACE_3("Values", _character, _number, _arr); + TRACE_3("Values",_character,_number,_arr); _arr set[_editIndex, _character]; _value = toString _arr; - TRACE_2("Values 2", _editIndex, _character); - TRACE_1("New value", _value); + TRACE_2("Values 2",_editIndex,_character); + TRACE_1("New value",_value); if (_editIndex < _editDigits) then { _editIndex = _editIndex + 1; @@ -64,14 +64,14 @@ DFUNC(doFrequencyButton) = { }; if ( ((toArray _value) select _editIndex) == 46) then { // recursively push a button again, since we want to skip it. - TRACE_1("Edit digit incrementing hit a dot, skip it",""); + TRACE_1("Edit digit incrementing hit a dot,skip it",""); _editIndex = _editIndex + 1; }; _floatValue = parseNumber _value; - TRACE_2("Re-parsed back to int", _floatValue, _value); - SCRATCH_SET(GVAR(currentRadioId), "menuFrequency", _floatValue); - SCRATCH_SET(GVAR(currentRadioId), "menuFrequencyCursor", _editIndex); + TRACE_2("Re-parsed back to int",_floatValue,_value); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequency",_floatValue); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequencyCursor",_editIndex); // Re-render it [_menu] call FUNC(renderMenu_Frequency); @@ -81,9 +81,9 @@ DFUNC(doFrequencyButton) = { DFUNC(onButtonPress_Frequency) = { params ["_menu", "_event"]; - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequency", 0.0); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequency",0.0); - TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!", (_event select 0)); + TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!",(_event select 0)); switch (_event select 0) do { case '1': { _this call FUNC(doFrequencyButton); }; case '2': { _this call FUNC(doFrequencyButton); }; @@ -97,7 +97,7 @@ DFUNC(onButtonPress_Frequency) = { case '0': { _this call FUNC(doFrequencyButton); }; case 'LEFT': { private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 2); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequencyCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequencyCursor",0); if (_editIndex > 0) then { _editIndex = _editIndex -1; @@ -105,11 +105,11 @@ DFUNC(onButtonPress_Frequency) = { _editIndex = _editDigits; }; - TRACE_3("Left hit, checking", _value, _editIndex, _editDigits); + TRACE_3("Left hit,checking",_value,_editIndex,_editDigits); private _strValue = ["frequency", _value] call FUNC(formatChannelValue); if ( ((toArray _strValue) select _editIndex) == 46) then { // recursively push a button again, since we want to skip it. - TRACE_1("Hit a digit, skipping", _editIndex); + TRACE_1("Hit a digit,skipping",_editIndex); if (_editIndex > 1) then { _editIndex = _editIndex - 1; } else { @@ -117,12 +117,12 @@ DFUNC(onButtonPress_Frequency) = { }; }; - SCRATCH_SET(GVAR(currentRadioId), "menuFrequencyCursor", _editIndex); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequencyCursor",_editIndex); [_menu] call FUNC(renderMenu_Frequency); }; case 'RIGHT': { private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 2); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequencyCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequencyCursor",0); if (_editIndex < _editDigits) then { _editIndex = _editIndex + 1; @@ -130,11 +130,11 @@ DFUNC(onButtonPress_Frequency) = { _editIndex = 0; }; - TRACE_3("Right hit, checking", _value, _editIndex, _editDigits); + TRACE_3("Right hit,checking",_value,_editIndex,_editDigits); private _strValue = ["frequency", _value] call FUNC(formatChannelValue); if ( ((toArray _strValue) select _editIndex) == 46) then { // recursively push a button again, since we want to skip it. - TRACE_1("Hit a digit, skipping", _editIndex); + TRACE_1("Hit a digit,skipping",_editIndex); if (_editIndex < _editDigits) then { _editIndex = _editIndex + 1; } else { @@ -142,28 +142,28 @@ DFUNC(onButtonPress_Frequency) = { }; }; - SCRATCH_SET(GVAR(currentRadioId), "menuFrequencyCursor", _editIndex); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequencyCursor",_editIndex); [_menu] call FUNC(renderMenu_Frequency); }; case 'ENT': { // swap to the parent - TRACE_1("onButtonPress_Frequency: ENT hit", _value); + TRACE_1("onButtonPress_Frequency: ENT hit",_value); private _saveName = MENU_SELECTION_VARIABLE(_menu); - SET_STATE(_saveName, _value); + SET_STATE(_saveName,_value); - SCRATCH_SET(GVAR(currentRadioId), "menuFrequency", 0); - SCRATCH_SET(GVAR(currentRadioId), "menuFrequencyCursor", 0.0); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequency",0); + SCRATCH_SET(GVAR(currentRadioId),"menuFrequencyCursor",0.0); - TRACE_2("Saved", _saveName, (GET_STATE(_saveName))); + TRACE_2("Saved",_saveName,(GET_STATE(_saveName))); // Our parent? - TRACE_1("Parent", MENU_PARENT_ID(_menu)); + TRACE_1("Parent",MENU_PARENT_ID(_menu)); [MENU_PARENT_ID(_menu)] call FUNC(changeMenu); }; case 'CLR': { TRACE_1("onButtonPress_Frequency: CLR hit",""); - private _parentMenu = HASH_GET(GVAR(Menus), MENU_PARENT_ID(_menu)); + private _parentMenu = HASH_GET(GVAR(Menus),MENU_PARENT_ID(_menu)); private _useParent = true; //If Parent action series -> Go to its parent. @@ -171,7 +171,7 @@ DFUNC(onButtonPress_Frequency) = { private _pid = MENU_PARENT_ID(_parentMenu); if (_pid isEqualType "") then { _useParent = false; - SET_STATE("menuAction", 0); + SET_STATE("menuAction",0); [_pid] call FUNC(changeMenu); }; }; @@ -190,23 +190,23 @@ DFUNC(renderMenu_Frequency) = { params ["_menu"]; // the menu to render is passed private _displaySet = MENU_SUBMENUS(_menu); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequencyCursor", 0); - private _freqValue = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuFrequency", 0.0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequencyCursor",0); + private _freqValue = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuFrequency",0.0); private _value = ["frequency", _freqValue] call FUNC(formatChannelValue); - TRACE_2("Formatted frequency", _freqValue, _value); + TRACE_2("Formatted frequency",_freqValue,_value); // Check the current digit. If its a dot, we should skip it. // Dot as a DEC value of 46 if ( ((toArray _value) select _editIndex) == 46) then { - TRACE_1("Digit was a dot, moving forward", _editIndex); + TRACE_1("Digit was a dot,moving forward",_editIndex); _editIndex = _editIndex + 1; }; private _valueHash = HASH_CREATE; - HASH_SET(_valueHash, "1", _value); - TRACE_1("Pushed value hash", _value); + HASH_SET(_valueHash,"1",_value); + TRACE_1("Pushed value hash",_value); [] call FUNC(clearDisplay); if (!isNil "_displaySet" && _displaySet isEqualType [] && (count _displaySet) > 0) then { @@ -221,7 +221,7 @@ DFUNC(renderMenu_Frequency) = { [ROW_SMALL_1, MENU_PATHNAME(_menu)] call FUNC(renderText); // Header line private _editLocation = (MENU_SELECTION_DISPLAYSET(_menu) select 3); // cursor location from the config - TRACE_1("Rendered, pushing cursor", _editLocation); + TRACE_1("Rendered,pushing cursor",_editLocation); [(_editLocation select 0), [(_editLocation select 1)+_editIndex, diff --git a/addons/sys_prc152/menus/types/List.sqf b/addons/sys_prc152/menus/types/List.sqf index b909d5700..4dcfe7b33 100644 --- a/addons/sys_prc152/menus/types/List.sqf +++ b/addons/sys_prc152/menus/types/List.sqf @@ -17,29 +17,29 @@ */ DFUNC(onButtonPress_List) = { -// TRACE_1("onButtonPress_List", _this); +// TRACE_1("onButtonPress_List",_this); params ["_menu", "_event"]; - private _currentSelection = GET_STATE_DEF("menuSelection", 0); - private _selectedMenu = MENU_SUBMENUS_ITEM(_menu, _currentSelection); - TRACE_3("", _currentSelection, _selectedMenu, _menu); + private _currentSelection = GET_STATE_DEF("menuSelection",0); + private _selectedMenu = MENU_SUBMENUS_ITEM(_menu,_currentSelection); + TRACE_3("",_currentSelection,_selectedMenu,_menu); switch (_event select 0) do { case 'ENT': { [_selectedMenu, _menu] call FUNC(changeMenu); }; case 'CLR': { // Back out of the menu back to the root menu of this menu...confusing right? - private _homeDisplay = GET_STATE_DEF("currentHome", GVAR(VULOSHOME)); + private _homeDisplay = GET_STATE_DEF("currentHome",GVAR(VULOSHOME)); [_homeDisplay] call FUNC(changeMenu); }; case '6': { - TRACE_1("Enter 6", _currentSelection); + TRACE_1("Enter 6",_currentSelection); if (_currentSelection > 0 ) then { _currentSelection = _currentSelection - 1; }; }; case '9': { - TRACE_1("Enter 9", _currentSelection); + TRACE_1("Enter 9",_currentSelection); if (_currentSelection+1 < (count MENU_SUBMENUS(_menu) )) then { _currentSelection = _currentSelection + 1; }; @@ -49,13 +49,13 @@ DFUNC(onButtonPress_List) = { }; }; - SET_STATE("menuSelection", _currentSelection); + SET_STATE("menuSelection",_currentSelection); false }; DFUNC(renderMenu_List) = { - TRACE_1("renderMenu_List", _this); + TRACE_1("renderMenu_List",_this); private ["_currentPage", "_currentSelectionIndex"]; params ["_menu"]; // the menu to render is passed @@ -66,7 +66,7 @@ DFUNC(renderMenu_List) = { [ICON_SCROLLBAR, true] call FUNC(toggleIcon); }; // Set our page based on the current selection index - private _currentSelection = GET_STATE_DEF("menuSelection", 0); + private _currentSelection = GET_STATE_DEF("menuSelection",0); private _pageCount = floor ((count MENU_SUBMENUS(_menu)) / MAX_MENU_ITEMS_PER_PAGE)+1; if (_currentSelection >= MAX_MENU_ITEMS_PER_PAGE) then { @@ -77,7 +77,7 @@ DFUNC(renderMenu_List) = { _currentPage = 1; _currentSelectionIndex = _currentSelection; }; - TRACE_4("Page index", _pageCount, _currentSelection, _currentPage, _currentSelectionIndex); + TRACE_4("Page index",_pageCount,_currentSelection,_currentPage,_currentSelectionIndex); // Render the current menus for "_i" from 1 to MAX_MENU_ITEMS_PER_PAGE do { @@ -85,9 +85,9 @@ DFUNC(renderMenu_List) = { private _itemIndex = (((_currentPage-1) * MAX_MENU_ITEMS_PER_PAGE) + (_i-1)); if (_itemIndex >= (count MENU_SUBMENUS(_menu))) exitWith {}; - private _item = MENU_SUBMENUS_ITEM(_menu, _itemIndex); + private _item = MENU_SUBMENUS_ITEM(_menu,_itemIndex); private _itemDisplayName = MENU_DISPLAYNAME(_item); - TRACE_4("Item rendering", _itemDisplayName, _item, _currentPage, _i); + TRACE_4("Item rendering",_itemDisplayName,_item,_currentPage,_i); [ROW_LARGE_1+(_i), _itemDisplayName] call FUNC(renderText); }; @@ -99,11 +99,11 @@ DFUNC(renderMenu_List) = { }; DFUNC(drawCursor_List) = { - TRACE_1("drawCursor_List", _this); + TRACE_1("drawCursor_List",_this); private ["_len"]; params ["_menu","_currentSelection","_currentSelectionIndex"]; - private _currentItemDisplayName = MENU_DISPLAYNAME( MENU_SUBMENUS_ITEM(_menu, _currentSelection) ); + private _currentItemDisplayName = MENU_DISPLAYNAME(MENU_SUBMENUS_ITEM(_menu,_currentSelection)); // optional 3rd argument of range if (count _this > 3) then { @@ -111,7 +111,7 @@ DFUNC(drawCursor_List) = { } else { _len = (count (toArray _currentItemDisplayName)) - 1; }; - TRACE_2("CURSORING", _len, _currentItemDisplayName); + TRACE_2("CURSORING",_len,_currentItemDisplayName); [22+_currentSelectionIndex, [0,_len]] call FUNC(drawCursor); }; diff --git a/addons/sys_prc152/menus/types/Number.sqf b/addons/sys_prc152/menus/types/Number.sqf index d7d2fda37..1dadcc920 100644 --- a/addons/sys_prc152/menus/types/Number.sqf +++ b/addons/sys_prc152/menus/types/Number.sqf @@ -32,29 +32,29 @@ GVAR(NumpadMap_Number) = [ DFUNC(doNumberButton) = { params ["_menu","_event"]; - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumberCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumberCursor",0); private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 2); - private _numberValue = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumber", 0.0); + private _numberValue = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumber",0.0); private _value = [_numberValue, (MENU_SELECTION_DISPLAYSET(_menu) select 2)] call CBA_fnc_formatNumber; private _number = parseNumber (_event select 0); private _key = _event select 0; - TRACE_5("", _number, _numberValue, _value, _editDigits, _editIndex); + TRACE_5("",_number,_numberValue,_value,_editDigits,_editIndex); if (_number > -1 && _number < 10) then { private _arr = toArray _value; private _character = _arr select _editIndex; _character = ( toArray ((GVAR(NumpadMap_Number) select _number) select 0) select 0); - TRACE_3("Values", _character, _number, _arr); + TRACE_3("Values",_character,_number,_arr); _arr set[_editIndex, _character]; _value = toString _arr; - TRACE_2("Values 2", _editIndex, _character); - TRACE_1("New value", _value); + TRACE_2("Values 2",_editIndex,_character); + TRACE_1("New value",_value); if (_editIndex+1 < _editDigits) then { _editIndex = _editIndex + 1; @@ -63,14 +63,14 @@ DFUNC(doNumberButton) = { }; if ( ((toArray _value) select _editIndex) == 46) then { // recursively push a button again, since we want to skip it. - TRACE_1("Edit digit incrementing hit a dot, skip it",""); + TRACE_1("Edit digit incrementing hit a dot - skip it",""); _editIndex = _editIndex + 1; }; _numberValue = parseNumber _value; - TRACE_2("Re-parsed back to int", _numberValue, _value); - SCRATCH_SET(GVAR(currentRadioId), "menuNumber", _numberValue); - SCRATCH_SET(GVAR(currentRadioId), "menuNumberCursor", _editIndex); + TRACE_2("Re-parsed back to int",_numberValue,_value); + SCRATCH_SET(GVAR(currentRadioId),"menuNumber",_numberValue); + SCRATCH_SET(GVAR(currentRadioId),"menuNumberCursor",_editIndex); // Re-render it [_menu] call FUNC(renderMenu_Number); @@ -80,9 +80,9 @@ DFUNC(doNumberButton) = { DFUNC(onButtonPress_Number) = { params ["_menu","_event"]; - private _value = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumber", 0.0); + private _value = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumber",0.0); - TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!", (_event select 0)); + TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!",(_event select 0)); switch (_event select 0) do { case '1': { _this call FUNC(doNumberButton); }; case '2': { _this call FUNC(doNumberButton); }; @@ -96,18 +96,18 @@ DFUNC(onButtonPress_Number) = { case '0': { _this call FUNC(doNumberButton); }; case 'LEFT': { private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 2); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumberCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumberCursor",0); if (_editIndex > 0) then { _editIndex = _editIndex -1; } else { _editIndex = _editDigits; }; - TRACE_3("Left hit, checking", _value, _editIndex, _editDigits); + TRACE_3("Left hit - checking",_value,_editIndex,_editDigits); private _strValue = [_value, (MENU_SELECTION_DISPLAYSET(_menu) select 2)] call CBA_fnc_formatNumber; if ( ((toArray _strValue) select _editIndex) == 46) then { // recursively push a button again, since we want to skip it. - TRACE_1("Hit a digit, skipping", _editIndex); + TRACE_1("Hit a digit - skipping",_editIndex); if (_editIndex > 1) then { _editIndex = _editIndex - 1; } else { @@ -115,23 +115,23 @@ DFUNC(onButtonPress_Number) = { }; }; - SCRATCH_SET(GVAR(currentRadioId), "menuNumberCursor", _editIndex); + SCRATCH_SET(GVAR(currentRadioId),"menuNumberCursor",_editIndex); [_menu] call FUNC(renderMenu_Number); }; case 'RIGHT': { private _editDigits = (MENU_SELECTION_DISPLAYSET(_menu) select 2); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumberCursor", 0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumberCursor",0); if (_editIndex+1 < _editDigits) then { _editIndex = _editIndex + 1; } else { _editIndex = 0; }; - TRACE_3("Right hit, checking", _value, _editIndex, _editDigits); + TRACE_3("Right hit - checking",_value,_editIndex,_editDigits); private _strValue = [_value, (MENU_SELECTION_DISPLAYSET(_menu) select 2)] call CBA_fnc_formatNumber; if ( ((toArray _strValue) select _editIndex) == 46) then { // recursively push a button again, since we want to skip it. - TRACE_1("Hit a digit, skipping", _editIndex); + TRACE_1("Hit a digit - skipping",_editIndex); if (_editIndex < _editDigits) then { _editIndex = _editIndex + 1; } else { @@ -139,28 +139,28 @@ DFUNC(onButtonPress_Number) = { }; }; - SCRATCH_SET(GVAR(currentRadioId), "menuNumberCursor", _editIndex); + SCRATCH_SET(GVAR(currentRadioId),"menuNumberCursor",_editIndex); [_menu] call FUNC(renderMenu_Number); }; case 'ENT': { // swap to the parent - TRACE_1("onButtonPress_Number: ENT hit", _value); + TRACE_1("onButtonPress_Number: ENT hit",_value); private _saveName = MENU_SELECTION_VARIABLE(_menu); - SET_STATE(_saveName, _value); + SET_STATE(_saveName,_value); - SCRATCH_SET(GVAR(currentRadioId), "menuNumber", nil); - SCRATCH_SET(GVAR(currentRadioId), "menuNumberCursor", 0); + SCRATCH_SET(GVAR(currentRadioId),"menuNumber",nil); + SCRATCH_SET(GVAR(currentRadioId),"menuNumberCursor",0); - TRACE_2("Saved", _saveName, (GET_STATE(_saveName))); + TRACE_2("Saved",_saveName,(GET_STATE(_saveName))); // Our parent? - TRACE_1("Parent", MENU_PARENT_ID(_menu)); + TRACE_1("Parent",MENU_PARENT_ID(_menu)); [MENU_PARENT_ID(_menu)] call FUNC(changeMenu); }; case 'CLR': { TRACE_1("onButtonPress_Number: CLR hit",""); - private _parentMenu = HASH_GET(GVAR(Menus), MENU_PARENT_ID(_menu)); + private _parentMenu = HASH_GET(GVAR(Menus),MENU_PARENT_ID(_menu)); private _useParent = true; //If Parent action series -> Go to its parent. @@ -168,7 +168,7 @@ DFUNC(onButtonPress_Number) = { private _pid = MENU_PARENT_ID(_parentMenu); if (_pid isEqualType "") then { _useParent = false; - SET_STATE("menuAction", 0); + SET_STATE("menuAction",0); [_pid] call FUNC(changeMenu); }; }; @@ -188,24 +188,24 @@ DFUNC(renderMenu_Number) = { private _displaySet = MENU_SUBMENUS(_menu); - private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumberCursor", 0); - private _numberValue = SCRATCH_GET_DEF(GVAR(currentRadioId), "menuNumber", 0.0); + private _editIndex = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumberCursor",0); + private _numberValue = SCRATCH_GET_DEF(GVAR(currentRadioId),"menuNumber",0.0); private _value = [_numberValue, (MENU_SELECTION_DISPLAYSET(_menu) select 2)] call CBA_fnc_formatNumber; - TRACE_2("Formatted number", _numberValue, _value); + TRACE_2("Formatted number",_numberValue,_value); // Check the current digit. If its a dot, we should skip it. // Dot as a DEC value of 46 if ( ((toArray _value) select _editIndex) == 46) then { - TRACE_1("Digit was a dot, moving forward", _editIndex); + TRACE_1("Digit was a dot,moving forward",_editIndex); _editIndex = _editIndex + 1; }; private _valueHash = HASH_CREATE; private _replaceValue = format["$ch%1",_numberValue]; - HASH_SET(_valueHash, "ch", _replaceValue); // This is a custom menu change to allow displaying the channel in the display - HASH_SET(_valueHash, "1", _value); - TRACE_1("Pushed value hash", _value); + HASH_SET(_valueHash,"ch",_replaceValue); // This is a custom menu change to allow displaying the channel in the display + HASH_SET(_valueHash,"1",_value); + TRACE_1("Pushed value hash",_value); [] call FUNC(clearDisplay); if (!isNil "_displaySet" && _displaySet isEqualType [] && (count _displaySet) > 0) then { @@ -220,7 +220,7 @@ DFUNC(renderMenu_Number) = { [ROW_SMALL_1, MENU_PATHNAME(_menu)] call FUNC(renderText); // Header line private _editLocation = (MENU_SELECTION_DISPLAYSET(_menu) select 3); // cursor location from the config - TRACE_1("Rendered, pushing cursor", _editLocation); + TRACE_1("Rendered,pushing cursor",_editLocation); [(_editLocation select 0), [(_editLocation select 1)+_editIndex, diff --git a/addons/sys_prc152/menus/types/Selection.sqf b/addons/sys_prc152/menus/types/Selection.sqf index c5dfeb951..a57c9c89f 100644 --- a/addons/sys_prc152/menus/types/Selection.sqf +++ b/addons/sys_prc152/menus/types/Selection.sqf @@ -17,24 +17,24 @@ */ DFUNC(onButtonPress_Selection) = { - TRACE_1("onButtonPress_Selection", _this); + TRACE_1("onButtonPress_Selection",_this); params ["_menu", "_event"]; - private _currentSelection = GET_STATE_DEF("menuSelection", 0); - TRACE_2("!!!!!!!!!!!!!!!!!!!!!!!!!", _currentSelection, (_event select 0)); + private _currentSelection = GET_STATE_DEF("menuSelection",0); + TRACE_2("!!!!!!!!!!!!!!!!!!!!!!!!!",_currentSelection,(_event select 0)); switch (_event select 0) do { case 'ENT': { private _value = ((MENU_SELECTION_DISPLAYSET(_menu) select 0) select _currentSelection); - SCRATCH_SET(GVAR(currentRadioId), MENU_SELECTION_VARIABLE(_menu), _value); + SCRATCH_SET(GVAR(currentRadioId),MENU_SELECTION_VARIABLE(_menu),_value); // swap to the parent - TRACE_1("onButtonPress_Selection: Value saved", _value); + TRACE_1("onButtonPress_Selection: Value saved",_value); [MENU_PARENT(_menu)] call FUNC(changeMenu); }; case 'CLR': { TRACE_1("onButtonPress_Selection: Value not saved",""); - private _parentMenu = HASH_GET(GVAR(Menus), MENU_PARENT_ID(_menu)); + private _parentMenu = HASH_GET(GVAR(Menus),MENU_PARENT_ID(_menu)); private _useParent = true; //If Parent action series -> Go to its parent. @@ -42,7 +42,7 @@ DFUNC(onButtonPress_Selection) = { private _pid = MENU_PARENT_ID(_parentMenu); if (_pid isEqualType "") then { _useParent = false; - SET_STATE("menuAction", 0); + SET_STATE("menuAction",0); [_pid] call FUNC(changeMenu); }; }; @@ -54,18 +54,18 @@ DFUNC(onButtonPress_Selection) = { case '6': { if (_currentSelection > 0 ) then { _currentSelection = _currentSelection - 1; - SET_STATE("menuSelection", _currentSelection); + SET_STATE("menuSelection",_currentSelection); - TRACE_1("Decremented", _currentSelection); + TRACE_1("Decremented",_currentSelection); [_menu] call FUNC(renderMenu_Selection); }; }; case '9': { if (_currentSelection+1 < (count (MENU_SELECTION_DISPLAYSET(_menu) select 0) ) ) then { _currentSelection = _currentSelection + 1; - SET_STATE("menuSelection", _currentSelection); + SET_STATE("menuSelection",_currentSelection); - TRACE_1("Incremented", _currentSelection); + TRACE_1("Incremented",_currentSelection); [_menu] call FUNC(renderMenu_Selection); }; }; @@ -81,11 +81,11 @@ DFUNC(renderMenu_Selection) = { private _options = MENU_SELECTION_DISPLAYSET(_menu) select 0; private _cursor = MENU_SELECTION_DISPLAYSET(_menu) select 1; - private _currentSelection = GET_STATE_DEF("menuSelection", 0); + private _currentSelection = GET_STATE_DEF("menuSelection",0); private _value = _options select _currentSelection; private _valueHash = HASH_CREATE; - HASH_SET(_valueHash, "1", _value); + HASH_SET(_valueHash,"1",_value); [] call FUNC(clearDisplay); if (!isNil "_displaySet" && _displaySet isEqualType [] && (count _displaySet) > 0) then { diff --git a/addons/sys_prc152/menus/types/Static.sqf b/addons/sys_prc152/menus/types/Static.sqf index 954cebaf6..8b461a5fa 100644 --- a/addons/sys_prc152/menus/types/Static.sqf +++ b/addons/sys_prc152/menus/types/Static.sqf @@ -17,7 +17,7 @@ */ DFUNC(onButtonPress_Static) = { - TRACE_1("onButtonPress_Static", _this); + TRACE_1("onButtonPress_Static",_this); false }; @@ -27,7 +27,7 @@ DFUNC(renderMenu_Static) = { BEGIN_COUNTER(renderMenu_Static); #endif - TRACE_1("renderMenu_Static", _this); + TRACE_1("renderMenu_Static",_this); params ["_menu"]; // the menu to render is passed private _displaySet = MENU_SUBMENUS(_menu); diff --git a/addons/sys_prc152/radio/__PREP__.sqf b/addons/sys_prc152/radio/__PREP__.sqf index a05b46ce3..11aa3c712 100644 --- a/addons/sys_prc152/radio/__PREP__.sqf +++ b/addons/sys_prc152/radio/__PREP__.sqf @@ -1,5 +1,5 @@ #include "..\script_component.hpp" -TRACE_1("enter", _this); +TRACE_1("enter",_this); PREP_MODULE(radio,setVolume); PREP_MODULE(radio,getVolume); diff --git a/addons/sys_prc152/radio/fnc_getChannelData.sqf b/addons/sys_prc152/radio/fnc_getChannelData.sqf index d698a1933..fe39389e2 100644 --- a/addons/sys_prc152/radio/fnc_getChannelData.sqf +++ b/addons/sys_prc152/radio/fnc_getChannelData.sqf @@ -19,35 +19,35 @@ params ["_radioId", "_event", "_eventData", "_radioData"]; private _channelNumber = _eventData; -private _channels = HASH_GET(_radioData, "channels"); -private _powerSource = HASH_GET(_radioData, "powerSource"); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); +private _channels = HASH_GET(_radioData,"channels"); +private _powerSource = HASH_GET(_radioData,"powerSource"); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); -private _channelType = HASH_GET(_channel, "channelMode"); +private _channelType = HASH_GET(_channel,"channelMode"); private _return = HASH_CREATE; switch _channelType do { case "BASIC": { - HASH_SET(_return, "mode", "singleChannel"); - HASH_SET(_return, "frequencyTX", HASH_GET(_channel, "frequencyTX")); - HASH_SET(_return, "frequencyRX", HASH_GET(_channel, "frequencyRX")); + HASH_SET(_return,"mode","singleChannel"); + HASH_SET(_return,"frequencyTX",HASH_GET(_channel,"frequencyTX")); + HASH_SET(_return,"frequencyRX",HASH_GET(_channel,"frequencyRX")); if (_powerSource == "BAT") then { - HASH_SET(_return, "power", HASH_GET(_channel, "power")); + HASH_SET(_return,"power",HASH_GET(_channel,"power")); } else { // RACK BOOST - HASH_SET(_return, "power", VRC110_RACK_POWER); + HASH_SET(_return,"power",VRC110_RACK_POWER); }; - HASH_SET(_return, "CTCSSTx", HASH_GET(_channel, "CTCSSTx")); - HASH_SET(_return, "CTCSSRx", HASH_GET(_channel, "CTCSSRx")); - HASH_SET(_return, "modulation", HASH_GET(_channel, "modulation")); - HASH_SET(_return, "encryption", HASH_GET(_channel, "encryption")); - HASH_SET(_return, "TEK", HASH_GET(_channel, "tek")); - HASH_SET(_return, "trafficRate", HASH_GET(_channel, "trafficRate")); - HASH_SET(_return, "syncLength", HASH_GET(_channel, "phase")); - HASH_SET(_return, "optioncode", HASH_GET(_channel, "optioncode")); - HASH_SET(_return, "rxonly", HASH_GET(_channel, "rxonly")); - HASH_SET(_return, "squelch", HASH_GET(_channel, "squelch")); - HASH_SET(_return, "channelmode", HASH_GET(_channel, "channelmode")); - HASH_SET(_return, "deviation", HASH_GET(_channel, "deviation")); - HASH_SET(_return, "description", HASH_GET(_channel, "description")); + HASH_SET(_return,"CTCSSTx",HASH_GET(_channel,"CTCSSTx")); + HASH_SET(_return,"CTCSSRx",HASH_GET(_channel,"CTCSSRx")); + HASH_SET(_return,"modulation",HASH_GET(_channel,"modulation")); + HASH_SET(_return,"encryption",HASH_GET(_channel,"encryption")); + HASH_SET(_return,"TEK",HASH_GET(_channel,"tek")); + HASH_SET(_return,"trafficRate",HASH_GET(_channel,"trafficRate")); + HASH_SET(_return,"syncLength",HASH_GET(_channel,"phase")); + HASH_SET(_return,"optioncode",HASH_GET(_channel,"optioncode")); + HASH_SET(_return,"rxonly",HASH_GET(_channel,"rxonly")); + HASH_SET(_return,"squelch",HASH_GET(_channel,"squelch")); + HASH_SET(_return,"channelmode",HASH_GET(_channel,"channelmode")); + HASH_SET(_return,"deviation",HASH_GET(_channel,"deviation")); + HASH_SET(_return,"description",HASH_GET(_channel,"description")); }; }; _return diff --git a/addons/sys_prc152/radio/fnc_getChannelDataInternal.sqf b/addons/sys_prc152/radio/fnc_getChannelDataInternal.sqf index 4321df763..30e7c138b 100644 --- a/addons/sys_prc152/radio/fnc_getChannelDataInternal.sqf +++ b/addons/sys_prc152/radio/fnc_getChannelDataInternal.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["_radioId"]; private _channels = [_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent); @@ -33,22 +33,22 @@ if ((count _this) > 1) then { if (!(isNil "_optChannelId") && {!(isNil "_opt")}) then { if (_optChannelId != _currentChannelId) then { // The current channel is not the same as the operational channel so just return - private _channel = HASHLIST_SELECT(_channels, _currentChannelId); + private _channel = HASHLIST_SELECT(_channels,_currentChannelId); _channel } else { // Get the actual channel data, then overlay it with the operational data - private _channel = HASHLIST_SELECT(_channels, _currentChannelId); + private _channel = HASHLIST_SELECT(_channels,_currentChannelId); { private _key = _x; - private _value = HASH_GET(_channel, _x); + private _value = HASH_GET(_channel,_x); - HASH_SET(_channel, _key, _value); + HASH_SET(_channel,_key,_value); } forEach HASH_KEYS(_opt); _channel }; } else { - private _channel = HASHLIST_SELECT(_channels, _currentChannelId); + private _channel = HASHLIST_SELECT(_channels,_currentChannelId); _channel }; diff --git a/addons/sys_prc152/radio/fnc_getChannelDescription.sqf b/addons/sys_prc152/radio/fnc_getChannelDescription.sqf index 3706385ab..7a9d8abaf 100644 --- a/addons/sys_prc152/radio/fnc_getChannelDescription.sqf +++ b/addons/sys_prc152/radio/fnc_getChannelDescription.sqf @@ -20,8 +20,8 @@ params ["_radioId"]; private _channelNumber = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _channels = [_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); -private _channelLabel = HASH_GET(_channel, "description"); +private _channelLabel = HASH_GET(_channel,"description"); format ["%1 - %2", [_channelNumber + 1, 2] call CBA_fnc_formatNumber, _channelLabel] diff --git a/addons/sys_prc152/radio/fnc_getCurrentChannel.sqf b/addons/sys_prc152/radio/fnc_getCurrentChannel.sqf index ac676f1fa..581e0b870 100644 --- a/addons/sys_prc152/radio/fnc_getCurrentChannel.sqf +++ b/addons/sys_prc152/radio/fnc_getCurrentChannel.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!GET CURRENT CHANNEL", _this); +TRACE_1("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!GET CURRENT CHANNEL",_this); params ["", "", "", "_radioData"]; diff --git a/addons/sys_prc152/radio/fnc_getCurrentChannelData.sqf b/addons/sys_prc152/radio/fnc_getCurrentChannelData.sqf index ca28c2152..5fa93a08a 100644 --- a/addons/sys_prc152/radio/fnc_getCurrentChannelData.sqf +++ b/addons/sys_prc152/radio/fnc_getCurrentChannelData.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["", "", "", "_radioData"]; private _currentChannelId = HASH_GET(_radioData,"currentChannel"); @@ -28,42 +28,42 @@ if (isNil "_currentChannelId") then { }; }; private _radioChannels = HASH_GET(_radioData,"channels"); -private _currentChannelData = HASHLIST_SELECT(_radioChannels, _currentChannelId); +private _currentChannelData = HASHLIST_SELECT(_radioChannels,_currentChannelId); private _optChannelId = HASH_GET(_radioData,"optChannelId"); private _opt = HASH_GET(_radioData,"optChannelData"); -TRACE_4("", _currentChannelId, _currentChannelData, _optChannelId, _opt); +TRACE_4("",_currentChannelId,_currentChannelData,_optChannelId,_opt); if (!(isNil "_optChannelId") && {!(isNil "_opt")} && {_optChannelId == _currentChannelId}) then { { private _key = _x; - private _value = HASH_GET(_opt, _x); + private _value = HASH_GET(_opt,_x); - HASH_SET(_currentChannelData, _key, _value); + HASH_SET(_currentChannelData,_key,_value); } forEach HASH_KEYS(_opt); }; -private _channelType = HASH_GET(_currentChannelData, "channelMode"); -private _powerSource = HASH_GET(_radioData, "powerSource"); +private _channelType = HASH_GET(_currentChannelData,"channelMode"); +private _powerSource = HASH_GET(_radioData,"powerSource"); private _return = HASH_CREATE; switch _channelType do { case "BASIC": { - HASH_SET(_return, "mode", "singleChannel"); - HASH_SET(_return, "frequencyTX", HASH_GET(_currentChannelData, "frequencyTX")); - HASH_SET(_return, "frequencyRX", HASH_GET(_currentChannelData, "frequencyRX")); + HASH_SET(_return,"mode","singleChannel"); + HASH_SET(_return,"frequencyTX",HASH_GET(_currentChannelData,"frequencyTX")); + HASH_SET(_return,"frequencyRX",HASH_GET(_currentChannelData,"frequencyRX")); if (_powerSource == "BAT") then { - HASH_SET(_return, "power", HASH_GET(_currentChannelData, "power")); + HASH_SET(_return,"power",HASH_GET(_currentChannelData,"power")); } else { // RACK BOOST - HASH_SET(_return, "power", VRC110_RACK_POWER); + HASH_SET(_return,"power",VRC110_RACK_POWER); }; - HASH_SET(_return, "CTCSSTx", HASH_GET(_currentChannelData, "CTCSSTx")); - HASH_SET(_return, "CTCSSRx", HASH_GET(_currentChannelData, "CTCSSRx")); - HASH_SET(_return, "modulation", HASH_GET(_currentChannelData, "modulation")); - HASH_SET(_return, "encryption", HASH_GET(_currentChannelData, "encryption")); - HASH_SET(_return, "TEK", HASH_GET(_currentChannelData, "tek")); - HASH_SET(_return, "trafficRate", HASH_GET(_currentChannelData, "trafficRate")); - HASH_SET(_return, "syncLength", HASH_GET(_currentChannelData, "phase")); + HASH_SET(_return,"CTCSSTx",HASH_GET(_currentChannelData,"CTCSSTx")); + HASH_SET(_return,"CTCSSRx",HASH_GET(_currentChannelData,"CTCSSRx")); + HASH_SET(_return,"modulation",HASH_GET(_currentChannelData,"modulation")); + HASH_SET(_return,"encryption",HASH_GET(_currentChannelData,"encryption")); + HASH_SET(_return,"TEK",HASH_GET(_currentChannelData,"tek")); + HASH_SET(_return,"trafficRate",HASH_GET(_currentChannelData,"trafficRate")); + HASH_SET(_return,"syncLength",HASH_GET(_currentChannelData,"phase")); }; }; _return diff --git a/addons/sys_prc152/radio/fnc_getOnOffState.sqf b/addons/sys_prc152/radio/fnc_getOnOffState.sqf index 3e014502a..48a99f85b 100644 --- a/addons/sys_prc152/radio/fnc_getOnOffState.sqf +++ b/addons/sys_prc152/radio/fnc_getOnOffState.sqf @@ -18,4 +18,4 @@ params ["_radioId", "_event", "_eventData", "_radioData"]; -HASH_GET(_radioData, "radioOn"); +HASH_GET(_radioData,"radioOn"); diff --git a/addons/sys_prc152/radio/fnc_getState.sqf b/addons/sys_prc152/radio/fnc_getState.sqf index b142d0658..a1675d69d 100644 --- a/addons/sys_prc152/radio/fnc_getState.sqf +++ b/addons/sys_prc152/radio/fnc_getState.sqf @@ -18,4 +18,4 @@ params ["", "", "_eventData", "_radioData"]; -HASH_GET(_radioData, _eventData); +HASH_GET(_radioData,_eventData); diff --git a/addons/sys_prc152/radio/fnc_getStates.sqf b/addons/sys_prc152/radio/fnc_getStates.sqf index b68e6706e..745f5e716 100644 --- a/addons/sys_prc152/radio/fnc_getStates.sqf +++ b/addons/sys_prc152/radio/fnc_getStates.sqf @@ -16,4 +16,4 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); diff --git a/addons/sys_prc152/radio/fnc_getVolume.sqf b/addons/sys_prc152/radio/fnc_getVolume.sqf index 805ff8699..de1403d07 100644 --- a/addons/sys_prc152/radio/fnc_getVolume.sqf +++ b/addons/sys_prc152/radio/fnc_getVolume.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["", "", "", "_radioData"]; diff --git a/addons/sys_prc152/radio/fnc_handleBeginTransmission.sqf b/addons/sys_prc152/radio/fnc_handleBeginTransmission.sqf index f18b2abae..3d8a419e9 100644 --- a/addons/sys_prc152/radio/fnc_handleBeginTransmission.sqf +++ b/addons/sys_prc152/radio/fnc_handleBeginTransmission.sqf @@ -20,9 +20,9 @@ params ["_radioId", "", ""]; if (_radioId isEqualTo GVAR(currentRadioId)) then { // If display is open - private _currentMenu = GET_STATE_DEF("currentMenu", ""); + private _currentMenu = GET_STATE_DEF("currentMenu",""); if ((_currentMenu isEqualType "") && {_currentMenu != ""}) then { - private _tmpMenu = HASH_GET(GVAR(Menus), _currentMenu); + private _tmpMenu = HASH_GET(GVAR(Menus),_currentMenu); if (!isNil "_tmpMenu") then { _currentMenu = _tmpMenu; }; diff --git a/addons/sys_prc152/radio/fnc_handleEndTransmission.sqf b/addons/sys_prc152/radio/fnc_handleEndTransmission.sqf index ec90759cd..2a41a1b30 100644 --- a/addons/sys_prc152/radio/fnc_handleEndTransmission.sqf +++ b/addons/sys_prc152/radio/fnc_handleEndTransmission.sqf @@ -19,26 +19,26 @@ params ["_radioId", "", "_eventData"]; _eventData params ["_txId"]; -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); _currentTransmissions = _currentTransmissions - [_txId]; if (_currentTransmissions isEqualTo []) then { - private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped" && {_beeped}}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); - SCRATCH_SET(_radioId, "receivingSignal", 0); + SCRATCH_SET(_radioId,"hasBeeped",false); + SCRATCH_SET(_radioId,"receivingSignal",0); }; // Update interface if (_radioId isEqualTo GVAR(currentRadioId)) then { // If display is open - private _currentMenu = GET_STATE_DEF("currentMenu", ""); + private _currentMenu = GET_STATE_DEF("currentMenu",""); if ((_currentMenu isEqualType "") && {_currentMenu != ""}) then { - private _tmpMenu = HASH_GET(GVAR(Menus), _currentMenu); + private _tmpMenu = HASH_GET(GVAR(Menus),_currentMenu); if (!isNil "_tmpMenu") then { _currentMenu = _tmpMenu; }; diff --git a/addons/sys_prc152/radio/fnc_handleMultipleTransmissions.sqf b/addons/sys_prc152/radio/fnc_handleMultipleTransmissions.sqf index 09eb7eb5b..d88d801c0 100644 --- a/addons/sys_prc152/radio/fnc_handleMultipleTransmissions.sqf +++ b/addons/sys_prc152/radio/fnc_handleMultipleTransmissions.sqf @@ -20,30 +20,30 @@ params ["_radioId","","_radios"]; if !([_radioId] call EFUNC(sys_radio,canUnitReceive)) exitWith { [] }; -if (SCRATCH_GET_DEF(_radioId, "PTTDown", false) && !EGVAR(sys_core,fullDuplex)) exitWith { [] }; -private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); +if (SCRATCH_GET_DEF(_radioId,"PTTDown",false) && !EGVAR(sys_core,fullDuplex)) exitWith { [] }; +private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); private _found = false; private _transmissionsChanged = false; -private _lastSignalTime = SCRATCH_GET_DEF(_radioId, "lastSignalTime", diag_tickTime-2); +private _lastSignalTime = SCRATCH_GET_DEF(_radioId,"lastSignalTime",diag_tickTime-2); if (diag_tickTime - _lastSignalTime > 1) then { - SCRATCH_SET(_radioId, "currentTransmissions", []); + SCRATCH_SET(_radioId,"currentTransmissions",[]); }; -SCRATCH_SET(_radioId, "lastSignalTime", diag_tickTime); +SCRATCH_SET(_radioId,"lastSignalTime",diag_tickTime); -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); if (isNil "_currentTransmissions") then { _currentTransmissions = []; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _transmissions = []; private _sortedRadios = []; private _okRadios = []; -private _lastSortTime = SCRATCH_GET_DEF(_radioId, "lastSortTime", diag_tickTime-4); -private _radioCache = SCRATCH_GET_DEF(_radioId, "currentTransmissionRadioCache", []); +private _lastSortTime = SCRATCH_GET_DEF(_radioId,"lastSortTime",diag_tickTime-4); +private _radioCache = SCRATCH_GET_DEF(_radioId,"currentTransmissionRadioCache",[]); // Restort every 3 seconds no matter what. if (diag_tickTime - _lastSortTime > 3) then { @@ -80,16 +80,16 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent"]; if (_signalData isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; - PUSH(_sorted, [ARR_2(_signalPercent, _forEachIndex)]); - PUSH(_transmissions, _txId); + PUSH(_sorted,[ARR_2(_signalPercent,_forEachIndex)]); + PUSH(_transmissions,_txId); } forEach _radios; _sorted sort false; // descending order { - PUSH(_sortedRadios, (_radios select (_x select 1))); + PUSH(_sortedRadios,(_radios select (_x select 1))); } forEach _sorted; } else { - PUSH(_transmissions, ((_radios select 0) select 1)); + PUSH(_transmissions,((_radios select 0) select 1)); if (((_radios select 0) select 2) isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; _sortedRadios = _radios; }; @@ -97,58 +97,58 @@ if (_transmissionsChanged) then { private _dif = _transmissions - _currentTransmissions; if (_dif isNotEqualTo []) then { _currentTransmissions = _transmissions; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _radioRxData = [_radioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); // diag_log text format["%1 NON-CACHED", diag_tickTime]; - if (HASH_GET(_radioRxData, "mode") == "singleChannel") then { + if (HASH_GET(_radioRxData,"mode") == "singleChannel") then { private _hearableTransmissions = []; private _junkTransmissions = []; private _digital = false; { private _txId = _x select 1; private _radioTxData = [_txId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); - if (HASH_GET(_radioRxData, "modulation") == HASH_GET(_radioTxData, "modulation")) then { + if (HASH_GET(_radioRxData,"modulation") == HASH_GET(_radioTxData,"modulation")) then { //diag_log text "MOD OK"; - if (HASH_GET(_radioRxData, "encryption") == 1 && {HASH_GET(_radioTxData, "encryption") == 1}) then { + if (HASH_GET(_radioRxData,"encryption") == 1 && {HASH_GET(_radioTxData,"encryption") == 1}) then { //diag_log text "ENCRYPTED"; - if (HASH_GET(_radioRxData, "TEK") == HASH_GET(_radioTxData, "TEK") && - {HASH_GET(_radioRxData, "trafficRate") == HASH_GET(_radioTxData, "trafficRate")} + if (HASH_GET(_radioRxData,"TEK") == HASH_GET(_radioTxData,"TEK") && + {HASH_GET(_radioRxData,"trafficRate") == HASH_GET(_radioTxData,"trafficRate")} ) then { //diag_log text "DIGITAL CRYPTO!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); _digital = true; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "encryption") == 0 && {HASH_GET(_radioTxData, "encryption") == 0}) then { + if (HASH_GET(_radioRxData,"encryption") == 0 && {HASH_GET(_radioTxData,"encryption") == 0}) then { //diag_log text "PT!"; - if (HASH_GET(_radioRxData, "modulation") == "FM" || {HASH_GET(_radioRxData, "modulation") == "NB"}) then { + if (HASH_GET(_radioRxData,"modulation") == "FM" || {HASH_GET(_radioRxData,"modulation") == "NB"}) then { //diag_log text "ITS FM BABY!"; - if (HASH_GET(_radioRxData, "CTCSSRx") == HASH_GET(_radioTxData, "CTCSSTx") || {HASH_GET(_radioRxData, "CTCSSRx") == 0}) then { + if (HASH_GET(_radioRxData,"CTCSSRx") == HASH_GET(_radioTxData,"CTCSSTx") || {HASH_GET(_radioRxData,"CTCSSRx") == 0}) then { //diag_log text "THE TONES MATCH!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData, "CTCSSRx"), HASH_GET(_radioTxData, "CTCSSTx")]; - PUSH(_junkTransmissions, _x); + //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData,"CTCSSRx"),HASH_GET(_radioTxData,"CTCSSTx")]; + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "modulation") == "AM") then { + if (HASH_GET(_radioRxData,"modulation") == "AM") then { //diag_log text "AM TALK JUNKIE!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } forEach _sortedRadios; @@ -193,44 +193,44 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent","_signalDbM"]; private _channelNum = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _channels = [_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent); - private _channel = HASHLIST_SELECT(_channels, _channelNum); - private _squelch = -116 + HASH_GET(_channel, "squelch"); + private _channel = HASHLIST_SELECT(_channels,_channelNum); + private _squelch = -116 + HASH_GET(_channel,"squelch"); // diag_log text format["squelch: %1 signal: %2", _squelch, _signalDbM]; if (_signalDbM < _squelch) then { _okRadios = []; - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped" && {_beeped}}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); } else { if (isNil "_beeped" || {!_beeped}) then { //diag_log "BEEP!"; - SCRATCH_SET(_radioId, "hasBeeped", true); + SCRATCH_SET(_radioId,"hasBeeped",true); private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOn", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; - SCRATCH_SET(_radioId, "receivingSignal", _signalPercent); + SCRATCH_SET(_radioId,"receivingSignal",_signalPercent); } else { - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped" && {_beeped}}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); - SCRATCH_SET(_radioId, "receivingSignal", 0); + SCRATCH_SET(_radioId,"hasBeeped",false); + SCRATCH_SET(_radioId,"receivingSignal",0); }; // Cache it - SCRATCH_SET(_radioId, "currentTransmissionRadioCache", _okRadios); + SCRATCH_SET(_radioId,"currentTransmissionRadioCache",_okRadios); //Force a recalculation if data is not ready if (_areAllRadiosInitialized) then { - SCRATCH_SET(_radioId, "lastSortTime", diag_tickTime); + SCRATCH_SET(_radioId,"lastSortTime",diag_tickTime); } else { - SCRATCH_SET(_radioId, "lastSortTime", -4); + SCRATCH_SET(_radioId,"lastSortTime",-4); }; } else { _okRadios = _radioCache; @@ -239,9 +239,9 @@ if (_transmissionsChanged) then { //Re-render if open. if (_radioId isEqualTo GVAR(currentRadioId)) then { // If display is open - private _currentMenu = GET_STATE_DEF("currentMenu", ""); + private _currentMenu = GET_STATE_DEF("currentMenu",""); if (_currentMenu isEqualType "" && {_currentMenu != ""}) then { - private _tmpMenu = HASH_GET(GVAR(Menus), _currentMenu); + private _tmpMenu = HASH_GET(GVAR(Menus),_currentMenu); if (!isNil "_tmpMenu") then { _currentMenu = _tmpMenu; }; diff --git a/addons/sys_prc152/radio/fnc_handlePTTDown.sqf b/addons/sys_prc152/radio/fnc_handlePTTDown.sqf index 307224d19..cfc08a7fe 100644 --- a/addons/sys_prc152/radio/fnc_handlePTTDown.sqf +++ b/addons/sys_prc152/radio/fnc_handlePTTDown.sqf @@ -23,15 +23,15 @@ if !([_radioId] call EFUNC(sys_radio,canUnitTransmit)) exitWith {false}; private _channelNumber = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _channelData = [_radioId, _channelNumber] call FUNC(getChannelDataInternal); -private _rxOnly = HASH_GET(_channelData, "rxOnly"); -TRACE_3("RX ONLY", _radioId, _channelNumber, _rxOnly); +private _rxOnly = HASH_GET(_channelData,"rxOnly"); +TRACE_3("RX ONLY",_radioId,_channelNumber,_rxOnly); if (_rxOnly) exitWith { - TRACE_1("EXITING RX ONLY", _rxOnly); + TRACE_1("EXITING RX ONLY",_rxOnly); false }; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericBeep", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", true); +SCRATCH_SET(_radioId,"PTTDown",true); true diff --git a/addons/sys_prc152/radio/fnc_handlePTTUp.sqf b/addons/sys_prc152/radio/fnc_handlePTTUp.sqf index e4cfaf8f3..ba2fa74e9 100644 --- a/addons/sys_prc152/radio/fnc_handlePTTUp.sqf +++ b/addons/sys_prc152/radio/fnc_handlePTTUp.sqf @@ -21,13 +21,13 @@ params ["_radioId"]; private _channelNumber = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _channelData = [_radioId, _channelNumber] call FUNC(getChannelDataInternal); -private _rxOnly = HASH_GET(_channelData, "rxOnly"); +private _rxOnly = HASH_GET(_channelData,"rxOnly"); if (_rxOnly) exitWith { false }; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", false); +SCRATCH_SET(_radioId,"PTTDown",false); true diff --git a/addons/sys_prc152/radio/fnc_handleSignalData.sqf b/addons/sys_prc152/radio/fnc_handleSignalData.sqf index c8449dcec..71de260b2 100644 --- a/addons/sys_prc152/radio/fnc_handleSignalData.sqf +++ b/addons/sys_prc152/radio/fnc_handleSignalData.sqf @@ -25,22 +25,22 @@ _radioTxData = [_txId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); _radioRxData = [_rxId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); if ( - HASH_GET(_radioRxData, "modulation") == HASH_GET(_radioTxData, "modulation") && - {HASH_GET(_radioRxData, "encryption") == HASH_GET(_radioTxData, "encryption")} && - {HASH_GET(_radioRxData, "TEK") == HASH_GET(_radioTxData, "TEK")} && - {HASH_GET(_radioRxData, "trafficRate") == HASH_GET(_radioTxData, "trafficRate")} && + HASH_GET(_radioRxData,"modulation") == HASH_GET(_radioTxData,"modulation") && + {HASH_GET(_radioRxData,"encryption") == HASH_GET(_radioTxData,"encryption")} && + {HASH_GET(_radioRxData,"TEK") == HASH_GET(_radioTxData,"TEK")} && + {HASH_GET(_radioRxData,"trafficRate") == HASH_GET(_radioTxData,"trafficRate")} && {( - HASH_GET(_rxChannel, "CTCSSRx") == HASH_GET(_radioTxData, "CTCSSTx") || - {HASH_GET(_rxChannel, "CTCSSRx") == 0} + HASH_GET(_rxChannel,"CTCSSRx") == HASH_GET(_radioTxData,"CTCSSTx") || + {HASH_GET(_rxChannel,"CTCSSRx") == 0} )} ) then { - _hearableTransmission = SCRATCH_GET(_rxId, "hearableTransmission"); + _hearableTransmission = SCRATCH_GET(_rxId,"hearableTransmission"); if (isNil "_hearableTransmission") then { _hearableTransmission = []; - SCRATCH_SET(_rxId, "hearableTransmission", _hearableTransmission); + SCRATCH_SET(_rxId,"hearableTransmission",_hearableTransmission); }; if (!(_txId in _hearableTransmission)) then { - PUSH(_hearableTransmission, _txId); + PUSH(_hearableTransmission,_txId); }; }; */ diff --git a/addons/sys_prc152/radio/fnc_isExternalAudio.sqf b/addons/sys_prc152/radio/fnc_isExternalAudio.sqf index f851ca730..fb348b8cf 100644 --- a/addons/sys_prc152/radio/fnc_isExternalAudio.sqf +++ b/addons/sys_prc152/radio/fnc_isExternalAudio.sqf @@ -18,4 +18,4 @@ params ["", "", "", "_radioData"]; -(HASH_GET(_radioData, "audioPath") == "INTAUDIO") +(HASH_GET(_radioData,"audioPath") == "INTAUDIO") diff --git a/addons/sys_prc152/radio/fnc_setChannelData.sqf b/addons/sys_prc152/radio/fnc_setChannelData.sqf index 8293bdc42..ed23e25ea 100644 --- a/addons/sys_prc152/radio/fnc_setChannelData.sqf +++ b/addons/sys_prc152/radio/fnc_setChannelData.sqf @@ -16,4 +16,4 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); diff --git a/addons/sys_prc152/radio/fnc_setChannelDataOperational.sqf b/addons/sys_prc152/radio/fnc_setChannelDataOperational.sqf index b4cfa4734..4515227f0 100644 --- a/addons/sys_prc152/radio/fnc_setChannelDataOperational.sqf +++ b/addons/sys_prc152/radio/fnc_setChannelDataOperational.sqf @@ -27,7 +27,7 @@ if (_optChannelId != _channelId) then { false }; -HASH_SET(_opt, _key, _value); +HASH_SET(_opt,_key,_value); [GVAR(currentRadioId), "setState", "optChannelData", _opt] call EFUNC(sys_data,dataEvent); diff --git a/addons/sys_prc152/radio/fnc_setCurrentChannel.sqf b/addons/sys_prc152/radio/fnc_setCurrentChannel.sqf index 4e32ef423..a6b24e1c3 100644 --- a/addons/sys_prc152/radio/fnc_setCurrentChannel.sqf +++ b/addons/sys_prc152/radio/fnc_setCurrentChannel.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["_radioId", "_event", "_eventData", "_radioData"]; private _channelsCount = count ([_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent)) - 1; diff --git a/addons/sys_prc152/radio/fnc_setOnOffState.sqf b/addons/sys_prc152/radio/fnc_setOnOffState.sqf index 26cf99083..4000f1244 100644 --- a/addons/sys_prc152/radio/fnc_setOnOffState.sqf +++ b/addons/sys_prc152/radio/fnc_setOnOffState.sqf @@ -18,7 +18,7 @@ params ["", "", "_eventData", "_radioData"]; -HASH_SET(_radioData, "radioOn", _eventData); +HASH_SET(_radioData,"radioOn",_eventData); /*if (_radioId == acre_sys_radio_currentRadioDialog) then { if (_eventData == 0) then { diff --git a/addons/sys_prc152/radio/fnc_setState.sqf b/addons/sys_prc152/radio/fnc_setState.sqf index 0f21f0202..9d48a8acf 100644 --- a/addons/sys_prc152/radio/fnc_setState.sqf +++ b/addons/sys_prc152/radio/fnc_setState.sqf @@ -18,4 +18,4 @@ params ["", "", "_eventData", "_radioData"]; -HASH_SET(_radioData, _eventData select 0, _eventData select 1); +HASH_SET(_radioData,_eventData select 0,_eventData select 1); diff --git a/addons/sys_prc152/radio/fnc_setVolume.sqf b/addons/sys_prc152/radio/fnc_setVolume.sqf index 8efb10a39..584c7eb9a 100644 --- a/addons/sys_prc152/radio/fnc_setVolume.sqf +++ b/addons/sys_prc152/radio/fnc_setVolume.sqf @@ -24,14 +24,14 @@ if (_vol % 0.10 != 0) then { _vol = _vol - (_vol % 0.10); }; -HASH_SET(_radioData, "volume", _eventData); +HASH_SET(_radioData,"volume",_eventData); -TRACE_3("VOLUME SET",_radioId, _vol, _radioData); +TRACE_3("VOLUME SET",_radioId,_vol,_radioData); if (IS_STRING(GVAR(currentRadioId))) then { if (GVAR(currentRadioId) == _radioId) then { - private _currentMenu = GET_STATE_DEF("currentMenu", GVAR(VULOSHOME)); - TRACE_2("", GVAR(currentRadioId), _currentMenu); + private _currentMenu = GET_STATE_DEF("currentMenu",GVAR(VULOSHOME)); + TRACE_2("",GVAR(currentRadioId),_currentMenu); [_currentMenu, ["VOLUME", _vol] ] call FUNC(changeValueAck); }; }; diff --git a/addons/sys_prc343/functions/fnc_onPTTHandlePress.sqf b/addons/sys_prc343/functions/fnc_onPTTHandlePress.sqf index 8a17a2955..4bbaa73d2 100644 --- a/addons/sys_prc343/functions/fnc_onPTTHandlePress.sqf +++ b/addons/sys_prc343/functions/fnc_onPTTHandlePress.sqf @@ -29,7 +29,7 @@ if (_key == 0) then { _newView = IN; }; if (_newView != _currentView) then { - SET_STATE("currentView", _newView); + SET_STATE("currentView",_newView); [_newView] call CALLSTACK(FUNC(zoomChannelBlockSelector)); }; }; diff --git a/addons/sys_prc343/functions/fnc_render.sqf b/addons/sys_prc343/functions/fnc_render.sqf index 017b66d3e..6e3f3085f 100644 --- a/addons/sys_prc343/functions/fnc_render.sqf +++ b/addons/sys_prc343/functions/fnc_render.sqf @@ -31,18 +31,18 @@ private _currentVolume = GET_STATE("volume"); //from 0 to 1 private _currentVolumeKnobState = round (_currentVolume * 5); private _currentView = GET_STATE("currentView"); //0(IN) or 1(OUT) -{_x ctrlEnable false;} forEach [RADIO_CTRL(201), RADIO_CTRL(202), RADIO_CTRL(203), RADIO_CTRL(204)]; +{_x ctrlEnable false;} forEach [RADIO_CTRL(201), RADIO_CTRL(202), RADIO_CTRL(203),RADIO_CTRL(204)]; private _currentViewFrame = 0; if (_currentView == 0) then { _currentViewFrame = count (GVAR(backgroundImages)) - 1; - RADIO_CTRL(203) ctrlSetPosition [(0.3 * safeZoneW + safeZoneX), (0.277 * safeZoneH + safeZoneY), 0.1*SafeZoneW, 0.5*SafeZoneW]; + RADIO_CTRL(203) ctrlSetPosition [(0.3 * safeZoneW + safeZoneX),(0.277 * safeZoneH + safeZoneY), 0.1*SafeZoneW, 0.5*SafeZoneW]; RADIO_CTRL(203) ctrlCommit 0.01; RADIO_CTRL(203) ctrlSetTooltip LELSTRING(sys_radio,ui_handleAttach); - RADIO_CTRL(204) ctrlSetTooltip format ["%1: %2", LELSTRING(sys_radio,ui_CurrentChannelBlock), _currentBlock + 1]; + RADIO_CTRL(204) ctrlSetTooltip format ["%1: %2",LELSTRING(sys_radio,ui_CurrentChannelBlock), _currentBlock + 1]; { (RADIO_CTRL(_x)) ctrlSetFade 1; @@ -52,11 +52,11 @@ if (_currentView == 0) then { RADIO_CTRL(99999) ctrlSetText (GVAR(backgroundImages) select _currentViewFrame); - {_x ctrlEnable true;} forEach [RADIO_CTRL(203), RADIO_CTRL(204)]; + {_x ctrlEnable true;} forEach [RADIO_CTRL(203),RADIO_CTRL(204)]; } else { _currentViewFrame = 0; - RADIO_CTRL(203) ctrlSetPosition [(0.35 * safeZoneW + safeZoneX), (0.377 * safeZoneH + safeZoneY), 0.07*SafeZoneW, 0.4*SafeZoneW]; + RADIO_CTRL(203) ctrlSetPosition [(0.35 * safeZoneW + safeZoneX),(0.377 * safeZoneH + safeZoneY), 0.07*SafeZoneW, 0.4*SafeZoneW]; RADIO_CTRL(203) ctrlCommit 0.01; RADIO_CTRL(203) ctrlSetTooltip LELSTRING(sys_radio,ui_handleDetach); @@ -69,11 +69,11 @@ if (_currentView == 0) then { RADIO_CTRL(106) ctrlSetText format ["\idi\acre\addons\sys_prc343\Data\knobs\channel\prc343_ui_pre_%1.paa", _currentChannel + 1]; RADIO_CTRL(107) ctrlSetText format ["\idi\acre\addons\sys_prc343\Data\knobs\volume\prc343_ui_vol_%1.paa", _currentVolumeKnobState]; - RADIO_CTRL(202) ctrlSetTooltip format ["%1: %2%3", LELSTRING(sys_radio,ui_CurrentVolume), round (_currentVolume * 100), "%"]; + RADIO_CTRL(202) ctrlSetTooltip format ["%1: %2%3", LELSTRING(sys_radio,ui_CurrentVolume),round (_currentVolume * 100), "%"]; RADIO_CTRL(99999) ctrlSetText QPATHTOF(Data\static\prc343_ui_backplate.paa); - {_x ctrlEnable true;} forEach [RADIO_CTRL(201), RADIO_CTRL(202), RADIO_CTRL(203)]; + {_x ctrlEnable true;} forEach [RADIO_CTRL(201), RADIO_CTRL(202),RADIO_CTRL(203)]; }; -TRACE_3("rendering", _currentChannel, _currentVolume, EGVAR(sys_radio,currentRadioDialog)); +TRACE_3("rendering",_currentChannel,_currentVolume,EGVAR(sys_radio,currentRadioDialog)); true diff --git a/addons/sys_prc343/functions/fnc_zoomChannelBlockSelector.sqf b/addons/sys_prc343/functions/fnc_zoomChannelBlockSelector.sqf index a898694b5..30efbb35c 100644 --- a/addons/sys_prc343/functions/fnc_zoomChannelBlockSelector.sqf +++ b/addons/sys_prc343/functions/fnc_zoomChannelBlockSelector.sqf @@ -22,11 +22,11 @@ params ["_direction"]; {ctrlEnable [_x, false];} forEach [201, 202, 203, 204]; -private _animation = SCRATCH_GET_DEF(GVAR(currentRadioId), "animation", false); //false if no animation is running +private _animation = SCRATCH_GET_DEF(GVAR(currentRadioId),"animation",false); //false if no animation is running if (_animation) exitWith { [] }; if (_direction == OUT) then { - SCRATCH_SET(GVAR(currentRadioId), "animation", true); + SCRATCH_SET(GVAR(currentRadioId),"animation",true); private _currentAbsChannel = [GVAR(currentRadioId)] call FUNC(getCurrentChannelInternal); private _currentBlock = floor (_currentAbsChannel / 16); private _currentChannel = _currentAbsChannel - _currentBlock*16; @@ -43,7 +43,7 @@ if (_direction == OUT) then { // If the CurrentRadioId is not existing (-1) -> Bug out if!(IS_STRING(GVAR(currentRadioId))) exitWith { - SCRATCH_SET(_radioId, "animation", false); + SCRATCH_SET(_radioId,"animation",false); [_radioId, "setOnOffState", 1] call EFUNC(sys_data,dataEvent); [_PFHid] call CBA_fnc_removePerFrameHandler; }; @@ -51,7 +51,7 @@ if (_direction == OUT) then { // If currentRadioId is valid, check if it is equal to the temporary ID (_radioId) // and run animation or bug out if (GVAR(currentRadioId) == _radioId) then { - TRACE_1("Radio Id Match", _radioId); + TRACE_1("Radio Id Match",_radioId); if (_index < 0) then { if (_channelindex < _currentChannel || {_currentVolume != 3 && {_currentVolume != _volumeindex}}) then { @@ -77,7 +77,7 @@ if (_direction == OUT) then { (MAIN_DISPLAY displayCtrl 107) ctrlSetText format ["\idi\acre\addons\sys_prc343\Data\knobs\volume\prc343_ui_vol_%1.paa", _volumeindex]; }; } else { - SCRATCH_SET(_radioId, "animation", false); + SCRATCH_SET(_radioId,"animation",false); if (_currentVolume != 0) then { ["setOnOffState", 1] call GUI_DATA_EVENT; }; @@ -97,7 +97,7 @@ if (_direction == OUT) then { }; } else { TRACE_2("Mismatch",_radioId,GVAR(currentRadioId)); - SCRATCH_SET(_radioId, "animation", false); + SCRATCH_SET(_radioId,"animation",false); [_radioId, "setOnOffState", 1] call EFUNC(sys_data,dataEvent); [_PFHid] call CBA_fnc_removePerFrameHandler; }; @@ -106,7 +106,7 @@ if (_direction == OUT) then { if (_direction == IN) then { - SCRATCH_SET(GVAR(currentRadioId), "animation", true); + SCRATCH_SET(GVAR(currentRadioId),"animation",true); private _currentAbsChannel = [GVAR(currentRadioId)] call FUNC(getCurrentChannelInternal); private _currentBlock = floor (_currentAbsChannel / 16); private _currentChannel = _currentAbsChannel - _currentBlock*16; @@ -131,9 +131,9 @@ if (_direction == IN) then { // If currentRadioId is valid, check if it is equal to the temporary ID (_radioId) // and run animation or bug out if (GVAR(currentRadioId) == _radioId) then { - TRACE_1("Radio Id Match", _radioId); + TRACE_1("Radio Id Match",_radioId); if (_index == (count GVAR(backgroundImages))) then { - SCRATCH_SET(_radioId, "animation", false); + SCRATCH_SET(_radioId,"animation",false); [MAIN_DISPLAY] call CALLSTACK(FUNC(render)); [_PFHid] call CBA_fnc_removePerFrameHandler; diff --git a/addons/sys_prc343/radio/fnc_getChannelData.sqf b/addons/sys_prc343/radio/fnc_getChannelData.sqf index edae2bb28..7537fa3a9 100644 --- a/addons/sys_prc343/radio/fnc_getChannelData.sqf +++ b/addons/sys_prc343/radio/fnc_getChannelData.sqf @@ -19,17 +19,17 @@ * Public: No */ -TRACE_1("343 getChannelData", _this); +TRACE_1("343 getChannelData",_this); params ["", "", "_eventData", "_radioData", ""]; private _channelNumber = _eventData; -private _channels = HASH_GET(_radioData, "channels"); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); +private _channels = HASH_GET(_radioData,"channels"); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); private _return = HASH_CREATE; -HASH_SET(_return, "mode", "singleChannelPRR"); -HASH_SET(_return, "frequencyTX", HASH_GET(_channel, "frequencyTX")); -HASH_SET(_return, "frequencyRX", HASH_GET(_channel, "frequencyRX")); -HASH_SET(_return, "power", 100); +HASH_SET(_return,"mode","singleChannelPRR"); +HASH_SET(_return,"frequencyTX",HASH_GET(_channel,"frequencyTX")); +HASH_SET(_return,"frequencyRX",HASH_GET(_channel,"frequencyRX")); +HASH_SET(_return,"power",100); _return diff --git a/addons/sys_prc343/radio/fnc_getCurrentChannelData.sqf b/addons/sys_prc343/radio/fnc_getCurrentChannelData.sqf index 7b904f92d..506e187c8 100644 --- a/addons/sys_prc343/radio/fnc_getCurrentChannelData.sqf +++ b/addons/sys_prc343/radio/fnc_getCurrentChannelData.sqf @@ -26,11 +26,11 @@ if (isNil "_currentChannelId") then { _currentChannelId = 0; }; private _radioChannels = HASH_GET(_radioData,"channels"); -private _currentChannelData = HASHLIST_SELECT(_radioChannels, _currentChannelId); +private _currentChannelData = HASHLIST_SELECT(_radioChannels,_currentChannelId); private _return = HASH_CREATE; -HASH_SET(_return, "mode", "singleChannelPRR"); -HASH_SET(_return, "frequencyTX", HASH_GET(_currentChannelData, "frequencyTX")); -HASH_SET(_return, "frequencyRX", HASH_GET(_currentChannelData, "frequencyRX")); -HASH_SET(_return, "power", 100); +HASH_SET(_return,"mode","singleChannelPRR"); +HASH_SET(_return,"frequencyTX",HASH_GET(_currentChannelData,"frequencyTX")); +HASH_SET(_return,"frequencyRX",HASH_GET(_currentChannelData,"frequencyRX")); +HASH_SET(_return,"power",100); _return diff --git a/addons/sys_prc343/radio/fnc_getOnOffState.sqf b/addons/sys_prc343/radio/fnc_getOnOffState.sqf index 22c63084b..5f63bb2b8 100644 --- a/addons/sys_prc343/radio/fnc_getOnOffState.sqf +++ b/addons/sys_prc343/radio/fnc_getOnOffState.sqf @@ -21,4 +21,4 @@ params ["", "", "", "_radioData", ""]; -HASH_GET(_radioData, "radioOn"); +HASH_GET(_radioData,"radioOn"); diff --git a/addons/sys_prc343/radio/fnc_getState.sqf b/addons/sys_prc343/radio/fnc_getState.sqf index 78bb3ce4a..b79dc53dc 100644 --- a/addons/sys_prc343/radio/fnc_getState.sqf +++ b/addons/sys_prc343/radio/fnc_getState.sqf @@ -22,4 +22,4 @@ params ["", "", "_eventData", "_radioData", ""]; -HASH_GET(_radioData, _eventData); +HASH_GET(_radioData,_eventData); diff --git a/addons/sys_prc343/radio/fnc_getStates.sqf b/addons/sys_prc343/radio/fnc_getStates.sqf index cb40b0005..7f5b60ea2 100644 --- a/addons/sys_prc343/radio/fnc_getStates.sqf +++ b/addons/sys_prc343/radio/fnc_getStates.sqf @@ -19,4 +19,4 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); diff --git a/addons/sys_prc343/radio/fnc_handleEndTransmission.sqf b/addons/sys_prc343/radio/fnc_handleEndTransmission.sqf index 86f87311c..baec325f1 100644 --- a/addons/sys_prc343/radio/fnc_handleEndTransmission.sqf +++ b/addons/sys_prc343/radio/fnc_handleEndTransmission.sqf @@ -27,15 +27,15 @@ private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); _currentTransmissions = _currentTransmissions - [_txId]; if (_currentTransmissions isEqualTo []) then { - private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown) then { if (!isNil "_beeped" && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); }; true; diff --git a/addons/sys_prc343/radio/fnc_handleMultipleTransmissions.sqf b/addons/sys_prc343/radio/fnc_handleMultipleTransmissions.sqf index da42eaf88..6d34f8dbc 100644 --- a/addons/sys_prc343/radio/fnc_handleMultipleTransmissions.sqf +++ b/addons/sys_prc343/radio/fnc_handleMultipleTransmissions.sqf @@ -26,31 +26,31 @@ params ["_radioId", "", "_radios", "", ""]; if (!([_radioId] call EFUNC(sys_radio,canUnitReceive))) exitWith { [] }; -if (SCRATCH_GET_DEF(_radioId, "PTTDown", false) && !EGVAR(sys_core,fullDuplex)) exitWith { [] }; -private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); +if (SCRATCH_GET_DEF(_radioId,"PTTDown",false) && !EGVAR(sys_core,fullDuplex)) exitWith { [] }; +private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); private _found = false; private _transmissionsChanged = false; -private _lastSignalTime = SCRATCH_GET_DEF(_radioId, "lastSignalTime", diag_tickTime-2); +private _lastSignalTime = SCRATCH_GET_DEF(_radioId,"lastSignalTime",diag_tickTime-2); if (diag_tickTime - _lastSignalTime > 1) then { - SCRATCH_SET(_radioId, "currentTransmissions", []); + SCRATCH_SET(_radioId,"currentTransmissions",[]); }; -SCRATCH_SET(_radioId, "lastSignalTime", diag_tickTime); +SCRATCH_SET(_radioId,"lastSignalTime",diag_tickTime); -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); if (isNil "_currentTransmissions") then { _currentTransmissions = []; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _transmissions = []; private _sortedRadios = []; private _okRadios = []; -private _lastSortTime = SCRATCH_GET_DEF(_radioId, "lastSortTime", diag_tickTime-4); -private _radioCache = SCRATCH_GET_DEF(_radioId, "currentTransmissionRadioCache", []); +private _lastSortTime = SCRATCH_GET_DEF(_radioId,"lastSortTime",diag_tickTime-4); +private _radioCache = SCRATCH_GET_DEF(_radioId,"currentTransmissionRadioCache",[]); // Restort every 3 seconds no matter what. if (diag_tickTime - _lastSortTime > 3) then { @@ -86,16 +86,16 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent"]; if (_signalData isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; - PUSH(_sorted, [ARR_2(_signalPercent,_forEachIndex)]); - PUSH(_transmissions, _txId); + PUSH(_sorted,[ARR_2(_signalPercent,_forEachIndex)]); + PUSH(_transmissions,_txId); } forEach _radios; _sorted sort false; // descending order { - PUSH(_sortedRadios, (_radios select (_x select 1))); + PUSH(_sortedRadios,(_radios select (_x select 1))); } forEach _sorted; } else { - PUSH(_transmissions, ((_radios select 0) select 1)); + PUSH(_transmissions,((_radios select 0) select 1)); if (((_radios select 0) select 2) isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; _sortedRadios = _radios; }; @@ -103,7 +103,7 @@ if (_transmissionsChanged) then { private _dif = _transmissions - _currentTransmissions; if (_dif isNotEqualTo []) then { _currentTransmissions = _transmissions; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; @@ -111,11 +111,11 @@ if (_transmissionsChanged) then { //diag_log text format["%1 NON-CACHED", diag_tickTime]; - if (HASH_GET(_radioRxData, "mode") == "singleChannelPRR") then { + if (HASH_GET(_radioRxData,"mode") == "singleChannelPRR") then { private _hearableTransmissions = []; private _junkTransmissions = []; { - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } forEach _sortedRadios; if (EGVAR(sys_core,interference)) then { @@ -156,40 +156,40 @@ if (_transmissionsChanged) then { if (EGVAR(sys_core,interference)) then { _okRadios = []; }; - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown) then { if (!isNil "_beeped" && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); } else { if (isNil "_beeped" || {!_beeped}) then { - SCRATCH_SET(_radioId, "hasBeeped", true); + SCRATCH_SET(_radioId,"hasBeeped",true); private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOn", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; } else { - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown) then { if (!isNil "_beeped" && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); }; // Cache it - SCRATCH_SET(_radioId, "currentTransmissionRadioCache", _okRadios); + SCRATCH_SET(_radioId,"currentTransmissionRadioCache",_okRadios); //Force a recalculation if data is not ready if (_areAllRadiosInitialized) then { - SCRATCH_SET(_radioId, "lastSortTime", diag_tickTime); + SCRATCH_SET(_radioId,"lastSortTime",diag_tickTime); } else { - SCRATCH_SET(_radioId, "lastSortTime", -4); + SCRATCH_SET(_radioId,"lastSortTime",-4); }; } else { _okRadios = _radioCache; diff --git a/addons/sys_prc343/radio/fnc_handlePTTDown.sqf b/addons/sys_prc343/radio/fnc_handlePTTDown.sqf index 2ac7cd6a2..3d9d1746a 100644 --- a/addons/sys_prc343/radio/fnc_handlePTTDown.sqf +++ b/addons/sys_prc343/radio/fnc_handlePTTDown.sqf @@ -26,5 +26,5 @@ if (!([_radioId] call EFUNC(sys_radio,canUnitTransmit))) exitWith {false}; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericBeep", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", true); +SCRATCH_SET(_radioId,"PTTDown",true); true diff --git a/addons/sys_prc343/radio/fnc_handlePTTUp.sqf b/addons/sys_prc343/radio/fnc_handlePTTUp.sqf index b258f7576..3150829b8 100644 --- a/addons/sys_prc343/radio/fnc_handlePTTUp.sqf +++ b/addons/sys_prc343/radio/fnc_handlePTTUp.sqf @@ -24,5 +24,5 @@ params ["_radioId", "", "", "", ""]; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", false); +SCRATCH_SET(_radioId,"PTTDown",false); true; diff --git a/addons/sys_prc343/radio/fnc_initializeRadio.sqf b/addons/sys_prc343/radio/fnc_initializeRadio.sqf index fc4091657..8af384a14 100644 --- a/addons/sys_prc343/radio/fnc_initializeRadio.sqf +++ b/addons/sys_prc343/radio/fnc_initializeRadio.sqf @@ -20,7 +20,7 @@ * Public: No */ -TRACE_1("INITIALIZING RADIO 343", _this); +TRACE_1("INITIALIZING RADIO 343",_this); params ["_radioId", "_event", "_eventData", "_radioData", ""]; @@ -29,7 +29,7 @@ private _presetData = [_baseName, _preset] call EFUNC(sys_data,getPresetData); private _channels = HASH_GET(_presetData,"channels"); private _currentChannels = HASH_GET(_radioData,"channels"); -SCRATCH_SET(_radioId, "currentTransmissions", []); +SCRATCH_SET(_radioId,"currentTransmissions",[]); if (isNil "_currentChannels") then { _currentChannels = []; @@ -38,8 +38,8 @@ if (isNil "_currentChannels") then { for "_i" from 0 to (count _channels)-1 do { private _channelData = HASH_COPY(_channels select _i); - TRACE_1("Setting PRC-343 Init Channel Data", _channelData); - PUSH(_currentChannels, _channelData); + TRACE_1("Setting PRC-343 Init Channel Data",_channelData); + PUSH(_currentChannels,_channelData); }; HASH_SET(_radioData,"volume",EGVAR(sys_core,defaultRadioVolume)); diff --git a/addons/sys_prc343/radio/fnc_openGui.sqf b/addons/sys_prc343/radio/fnc_openGui.sqf index a4d1e9996..cfac89273 100644 --- a/addons/sys_prc343/radio/fnc_openGui.sqf +++ b/addons/sys_prc343/radio/fnc_openGui.sqf @@ -21,7 +21,7 @@ * Public: No */ -TRACE_1("OPENING GUI", _this); +TRACE_1("OPENING GUI",_this); params ["_radioId", "", "", "", ""]; // Prevent radio from being opened if it is externally used or it is not accessible diff --git a/addons/sys_prc343/radio/fnc_setChannelData.sqf b/addons/sys_prc343/radio/fnc_setChannelData.sqf index cae785ede..c04cce7c5 100644 --- a/addons/sys_prc343/radio/fnc_setChannelData.sqf +++ b/addons/sys_prc343/radio/fnc_setChannelData.sqf @@ -19,4 +19,4 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); diff --git a/addons/sys_prc343/radio/fnc_setCurrentChannel.sqf b/addons/sys_prc343/radio/fnc_setCurrentChannel.sqf index 50cbda7ef..8600a34a6 100644 --- a/addons/sys_prc343/radio/fnc_setCurrentChannel.sqf +++ b/addons/sys_prc343/radio/fnc_setCurrentChannel.sqf @@ -19,7 +19,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["_radioId", "", "_eventData", "_radioData", ""]; private _channelsCount = count ([_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent)) - 1; diff --git a/addons/sys_prc343/radio/fnc_setState.sqf b/addons/sys_prc343/radio/fnc_setState.sqf index fc236a211..ba23981d9 100644 --- a/addons/sys_prc343/radio/fnc_setState.sqf +++ b/addons/sys_prc343/radio/fnc_setState.sqf @@ -22,4 +22,4 @@ params ["", "", "_eventData", "_radioData", ""]; -HASH_SET(_radioData, _eventData select 0, _eventData select 1); +HASH_SET(_radioData,_eventData select 0,_eventData select 1); diff --git a/addons/sys_prc343/radio/fnc_setVolume.sqf b/addons/sys_prc343/radio/fnc_setVolume.sqf index ec71811b0..ec841ff0f 100644 --- a/addons/sys_prc343/radio/fnc_setVolume.sqf +++ b/addons/sys_prc343/radio/fnc_setVolume.sqf @@ -19,7 +19,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["", "", "_eventData", "_radioData", ""]; diff --git a/addons/sys_prc77/functions/__PREP__.sqf b/addons/sys_prc77/functions/__PREP__.sqf index 3d988a7c9..92e06f950 100644 --- a/addons/sys_prc77/functions/__PREP__.sqf +++ b/addons/sys_prc77/functions/__PREP__.sqf @@ -1,5 +1,5 @@ #include "..\script_component.hpp" -TRACE_1("enter", _this); +TRACE_1("enter",_this); PREP_MODULE(functions,preset_information); diff --git a/addons/sys_prc77/functions/fnc_onBandSelectorKnobPress.sqf b/addons/sys_prc77/functions/fnc_onBandSelectorKnobPress.sqf index a9d13ec6c..e5f15f1be 100644 --- a/addons/sys_prc77/functions/fnc_onBandSelectorKnobPress.sqf +++ b/addons/sys_prc77/functions/fnc_onBandSelectorKnobPress.sqf @@ -30,7 +30,7 @@ private _currentTuneKnobsPosition = GET_STATE("currentChannel"); //Define and set new knob position private _newBand = ((_currentBand + _dir) max 0) min 1; -SET_STATE_CRIT("band", _newBand); +SET_STATE_CRIT("band",_newBand); //The setCurrentChannel Event shall be triggered as well! ["setCurrentChannel", _currentTuneKnobsPosition] call CALLSTACK(GUI_DATA_EVENT); diff --git a/addons/sys_prc77/functions/fnc_onFunctionKnobPress.sqf b/addons/sys_prc77/functions/fnc_onFunctionKnobPress.sqf index 47d616170..ca29c00dd 100644 --- a/addons/sys_prc77/functions/fnc_onFunctionKnobPress.sqf +++ b/addons/sys_prc77/functions/fnc_onFunctionKnobPress.sqf @@ -30,7 +30,7 @@ private _currentFunction = GET_STATE("function"); // Define and set new function private _newFunction = ((_currentFunction + _dir) max 0) min 4; -SET_STATE_CRIT("function", _newFunction); +SET_STATE_CRIT("function",_newFunction); // Handle new function if (_newFunction != _currentFunction) then { @@ -40,14 +40,14 @@ if (_newFunction != _currentFunction) then { ["setOnOffState", 0] call GUI_DATA_EVENT; }; if (_newFunction == 1) then { - SET_STATE("squelch", 0); - SET_STATE("CTCSSRx", 0); - SET_STATE("CTCSSTx", 0); + SET_STATE("squelch",0); + SET_STATE("CTCSSRx",0); + SET_STATE("CTCSSTx",0); }; if (_newFunction == 2) then { - SET_STATE("squelch", 3); - SET_STATE("CTCSSRx", 150); - SET_STATE("CTCSSTx", 150); + SET_STATE("squelch",3); + SET_STATE("CTCSSRx",150); + SET_STATE("CTCSSTx",150); }; // if (_newFunction == 3) then { // Retrans diff --git a/addons/sys_prc77/functions/fnc_onPresetKnobPress.sqf b/addons/sys_prc77/functions/fnc_onPresetKnobPress.sqf index 864c8fa47..3faa5ff69 100644 --- a/addons/sys_prc77/functions/fnc_onPresetKnobPress.sqf +++ b/addons/sys_prc77/functions/fnc_onPresetKnobPress.sqf @@ -51,7 +51,7 @@ if (_fnc == 0) then { private _newPresets = + _currentPresets; (_newPresets select _preset) set [0, _newPreset select 0]; (_newPresets select _preset) set [1, _newPreset select 1]; - SET_STATE("currentPreset", _newPresets); + SET_STATE("currentPreset",_newPresets); // Change the image and play click sound ["Acre_GenericClick", [0,0,0], [0,0,0], 1, false] call EFUNC(sys_sounds,playSound); diff --git a/addons/sys_prc77/functions/fnc_snapbackFunctionKnob.sqf b/addons/sys_prc77/functions/fnc_snapbackFunctionKnob.sqf index 0737a529c..07ffba541 100644 --- a/addons/sys_prc77/functions/fnc_snapbackFunctionKnob.sqf +++ b/addons/sys_prc77/functions/fnc_snapbackFunctionKnob.sqf @@ -29,7 +29,7 @@ private _currentFunction = GET_STATE("function"); // Define and set new function private _newFunction = ((_currentFunction + _dir) max 0) min 4; -SET_STATE_CRIT("function", _newFunction); +SET_STATE_CRIT("function",_newFunction); // Handle new function if (_newFunction != _currentFunction) then { diff --git a/addons/sys_prc77/radio/__PREP__.sqf b/addons/sys_prc77/radio/__PREP__.sqf index 5781d4fa6..8302b7514 100644 --- a/addons/sys_prc77/radio/__PREP__.sqf +++ b/addons/sys_prc77/radio/__PREP__.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -TRACE_1("enter", _this); +TRACE_1("enter",_this); PREP_MODULE(radio,initializeRadio); diff --git a/addons/sys_prc77/radio/fnc_closeGui.sqf b/addons/sys_prc77/radio/fnc_closeGui.sqf index 8f91ffe3e..c5c12d8ba 100644 --- a/addons/sys_prc77/radio/fnc_closeGui.sqf +++ b/addons/sys_prc77/radio/fnc_closeGui.sqf @@ -19,7 +19,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["_radioId", "", "", "", ""]; diff --git a/addons/sys_prc77/radio/fnc_getCurrentChannel.sqf b/addons/sys_prc77/radio/fnc_getCurrentChannel.sqf index b8e2acdc9..acd0162a7 100644 --- a/addons/sys_prc77/radio/fnc_getCurrentChannel.sqf +++ b/addons/sys_prc77/radio/fnc_getCurrentChannel.sqf @@ -19,7 +19,7 @@ * Public: No */ -TRACE_1("GET CURRENT CHANNEL", _this); +TRACE_1("GET CURRENT CHANNEL",_this); params ["", "", "", "_radioData", ""]; diff --git a/addons/sys_prc77/radio/fnc_getCurrentChannelData.sqf b/addons/sys_prc77/radio/fnc_getCurrentChannelData.sqf index 075098df3..a22054c34 100644 --- a/addons/sys_prc77/radio/fnc_getCurrentChannelData.sqf +++ b/addons/sys_prc77/radio/fnc_getCurrentChannelData.sqf @@ -43,20 +43,20 @@ _frequency = _MHz + _kHz;*/ private _return = HASH_CREATE; -HASH_SET(_return, "mode", HASH_GET(_radioData, "mode")); -HASH_SET(_return, "frequencyTX", HASH_GET(_radioData, "frequencyTX")); -HASH_SET(_return, "frequencyRX", HASH_GET(_radioData, "frequencyRX")); -if (HASH_GET(_radioData, "powerSource") == "VAU") then { - HASH_SET(_return, "power", VRC64_RACK_POWER); +HASH_SET(_return,"mode",HASH_GET(_radioData,"mode")); +HASH_SET(_return,"frequencyTX",HASH_GET(_radioData,"frequencyTX")); +HASH_SET(_return,"frequencyRX",HASH_GET(_radioData,"frequencyRX")); +if (HASH_GET(_radioData,"powerSource") == "VAU") then { + HASH_SET(_return,"power",VRC64_RACK_POWER); } else { - HASH_SET(_return, "power", HASH_GET(_radioData, "power")); + HASH_SET(_return,"power",HASH_GET(_radioData,"power")); }; -HASH_SET(_return, "CTCSSTx", HASH_GET(_radioData, "CTCSSTx")); -HASH_SET(_return, "CTCSSRx", HASH_GET(_radioData, "CTCSSRx")); -HASH_SET(_return, "modulation", HASH_GET(_radioData, "modulation")); -HASH_SET(_return, "encryption", HASH_GET(_radioData, "encryption")); -HASH_SET(_return, "TEK", HASH_GET(_radioData, "TEK")); -HASH_SET(_return, "trafficRate", HASH_GET(_radioData, "trafficRate")); -HASH_SET(_return, "syncLength", HASH_GET(_radioData, "syncLength")); +HASH_SET(_return,"CTCSSTx",HASH_GET(_radioData,"CTCSSTx")); +HASH_SET(_return,"CTCSSRx",HASH_GET(_radioData,"CTCSSRx")); +HASH_SET(_return,"modulation",HASH_GET(_radioData,"modulation")); +HASH_SET(_return,"encryption",HASH_GET(_radioData,"encryption")); +HASH_SET(_return,"TEK",HASH_GET(_radioData,"TEK")); +HASH_SET(_return,"trafficRate",HASH_GET(_radioData,"trafficRate")); +HASH_SET(_return,"syncLength",HASH_GET(_radioData,"syncLength")); _return diff --git a/addons/sys_prc77/radio/fnc_getCurrentChannelInternal.sqf b/addons/sys_prc77/radio/fnc_getCurrentChannelInternal.sqf index c8dfe510f..6f7eb240b 100644 --- a/addons/sys_prc77/radio/fnc_getCurrentChannelInternal.sqf +++ b/addons/sys_prc77/radio/fnc_getCurrentChannelInternal.sqf @@ -19,7 +19,7 @@ * Public: No */ -TRACE_1("GET CURRENT CHANNEL", _this); +TRACE_1("GET CURRENT CHANNEL",_this); params ["", "", "", "_radioData", ""]; diff --git a/addons/sys_prc77/radio/fnc_getOnOffState.sqf b/addons/sys_prc77/radio/fnc_getOnOffState.sqf index 1007e8943..5a3203566 100644 --- a/addons/sys_prc77/radio/fnc_getOnOffState.sqf +++ b/addons/sys_prc77/radio/fnc_getOnOffState.sqf @@ -21,4 +21,4 @@ params ["", "", "", "_radioData", ""]; -HASH_GET(_radioData, "radioOn"); +HASH_GET(_radioData,"radioOn"); diff --git a/addons/sys_prc77/radio/fnc_getState.sqf b/addons/sys_prc77/radio/fnc_getState.sqf index ed3f68312..c0d7c8d88 100644 --- a/addons/sys_prc77/radio/fnc_getState.sqf +++ b/addons/sys_prc77/radio/fnc_getState.sqf @@ -22,4 +22,4 @@ params ["","", "_eventData", "_radioData", ""]; -HASH_GET(_radioData, _eventData); +HASH_GET(_radioData,_eventData); diff --git a/addons/sys_prc77/radio/fnc_getVolume.sqf b/addons/sys_prc77/radio/fnc_getVolume.sqf index 6ee8a0bf2..d5055fbf8 100644 --- a/addons/sys_prc77/radio/fnc_getVolume.sqf +++ b/addons/sys_prc77/radio/fnc_getVolume.sqf @@ -18,7 +18,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["", "", "", "_radioData", ""]; private _volume = HASH_GET(_radioData,"volume"); diff --git a/addons/sys_prc77/radio/fnc_handleEndTransmission.sqf b/addons/sys_prc77/radio/fnc_handleEndTransmission.sqf index b823971ad..9af8da19c 100644 --- a/addons/sys_prc77/radio/fnc_handleEndTransmission.sqf +++ b/addons/sys_prc77/radio/fnc_handleEndTransmission.sqf @@ -23,17 +23,17 @@ params ["_radioId", "", "_eventData", "", ""]; private _txId = _eventData select 0; -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); _currentTransmissions = _currentTransmissions - [_txId]; if (_currentTransmissions isEqualTo []) then { - private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped"} && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); }; true; diff --git a/addons/sys_prc77/radio/fnc_handleMultipleTransmissions.sqf b/addons/sys_prc77/radio/fnc_handleMultipleTransmissions.sqf index 87323e033..4b2dc3018 100644 --- a/addons/sys_prc77/radio/fnc_handleMultipleTransmissions.sqf +++ b/addons/sys_prc77/radio/fnc_handleMultipleTransmissions.sqf @@ -39,31 +39,31 @@ params ["_radioId", "", "_radios", "", ""]; if !([_radioId] call EFUNC(sys_radio,canUnitReceive)) exitWith { [] }; -if (SCRATCH_GET_DEF(_radioId, "PTTDown", false) && !EGVAR(sys_core,fullDuplex)) exitWith { [] }; -private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); +if (SCRATCH_GET_DEF(_radioId,"PTTDown",false) && !EGVAR(sys_core,fullDuplex)) exitWith { [] }; +private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); private _found = false; private _transmissionsChanged = false; -private _lastSignalTime = SCRATCH_GET_DEF(_radioId, "lastSignalTime", diag_tickTime-2); +private _lastSignalTime = SCRATCH_GET_DEF(_radioId,"lastSignalTime",diag_tickTime-2); if (diag_tickTime - _lastSignalTime > 1) then { - SCRATCH_SET(_radioId, "currentTransmissions", []); + SCRATCH_SET(_radioId,"currentTransmissions",[]); }; -SCRATCH_SET(_radioId, "lastSignalTime", diag_tickTime); +SCRATCH_SET(_radioId,"lastSignalTime",diag_tickTime); -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); if (isNil "_currentTransmissions") then { _currentTransmissions = []; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _transmissions = []; private _sortedRadios = []; private _okRadios = []; -private _lastSortTime = SCRATCH_GET_DEF(_radioId, "lastSortTime", diag_tickTime-4); -private _radioCache = SCRATCH_GET_DEF(_radioId, "currentTransmissionRadioCache", []); +private _lastSortTime = SCRATCH_GET_DEF(_radioId,"lastSortTime",diag_tickTime-4); +private _radioCache = SCRATCH_GET_DEF(_radioId,"currentTransmissionRadioCache",[]); // Restort every 3 seconds no matter what. if (diag_tickTime - _lastSortTime > 3) then { @@ -99,16 +99,16 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent"]; if (_signalData isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; - PUSH(_sorted, [ARR_2(_signalPercent,_forEachIndex)]); - PUSH(_transmissions, _txId); + PUSH(_sorted,[ARR_2(_signalPercent,_forEachIndex)]); + PUSH(_transmissions,_txId); } forEach _radios; _sorted sort false; // descending order { - PUSH(_sortedRadios, (_radios select (_x select 1))); + PUSH(_sortedRadios,(_radios select (_x select 1))); } forEach _sorted; } else { - PUSH(_transmissions, ((_radios select 0) select 1)); + PUSH(_transmissions,((_radios select 0) select 1)); if (((_radios select 0) select 2) isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; _sortedRadios = _radios; }; @@ -116,57 +116,57 @@ if (_transmissionsChanged) then { private _dif = _transmissions - _currentTransmissions; if (_dif isNotEqualTo []) then { _currentTransmissions = _transmissions; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _radioRxData = [_radioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); // diag_log text format["%1 NON-CACHED", diag_tickTime]; - if (HASH_GET(_radioRxData, "mode") == "singleChannel") then { + if (HASH_GET(_radioRxData,"mode") == "singleChannel") then { private _hearableTransmissions = []; private _junkTransmissions = []; private _digital = false; { private _txId = _x select 1; private _radioTxData = [_txId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); - if (HASH_GET(_radioRxData, "modulation") == HASH_GET(_radioTxData, "modulation")) then { + if (HASH_GET(_radioRxData,"modulation") == HASH_GET(_radioTxData,"modulation")) then { //diag_log text "MOD OK"; - if (HASH_GET(_radioRxData, "encryption") == 1 && {HASH_GET(_radioTxData, "encryption") == 1}) then { + if (HASH_GET(_radioRxData,"encryption") == 1 && {HASH_GET(_radioTxData,"encryption") == 1}) then { //diag_log text "ENCRYPTED"; - if (HASH_GET(_radioRxData, "TEK") == HASH_GET(_radioTxData, "TEK") && - {HASH_GET(_radioRxData, "trafficRate") == HASH_GET(_radioTxData, "trafficRate")} + if (HASH_GET(_radioRxData,"TEK") == HASH_GET(_radioTxData,"TEK") && + {HASH_GET(_radioRxData,"trafficRate") == HASH_GET(_radioTxData,"trafficRate")} ) then { //diag_log text "DIGITAL CRYPTO!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); _digital = true; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "encryption") == 0 && {HASH_GET(_radioTxData, "encryption") == 0}) then { + if (HASH_GET(_radioRxData,"encryption") == 0 && {HASH_GET(_radioTxData,"encryption") == 0}) then { //diag_log text "PT!"; - if (HASH_GET(_radioRxData, "modulation") == "FM" || {HASH_GET(_radioRxData, "modulation") == "NB"}) then { + if (HASH_GET(_radioRxData,"modulation") == "FM" || {HASH_GET(_radioRxData,"modulation") == "NB"}) then { //diag_log text "ITS FM BABY!"; - if (HASH_GET(_radioRxData, "CTCSSRx") == HASH_GET(_radioTxData, "CTCSSTx") || {HASH_GET(_radioRxData, "CTCSSRx") == 0}) then { + if (HASH_GET(_radioRxData,"CTCSSRx") == HASH_GET(_radioTxData,"CTCSSTx") || {HASH_GET(_radioRxData,"CTCSSRx") == 0}) then { //diag_log text "THE TONES MATCH!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData, "CTCSSRx"), HASH_GET(_radioTxData, "CTCSSTx")]; - PUSH(_junkTransmissions, _x); + //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData,"CTCSSRx"),HASH_GET(_radioTxData,"CTCSSTx")]; + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "modulation") == "AM") then { + if (HASH_GET(_radioRxData,"modulation") == "AM") then { //diag_log text "AM TALK JUNKIE!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } forEach _sortedRadios; @@ -211,7 +211,7 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent", "_signalDbM"]; //_channelNum = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); //_channels = [_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent); - //_channel = HASHLIST_SELECT(_channels, _channelNum); + //_channel = HASHLIST_SELECT(_channels,_channelNum); private _squelch = [_radioId, "getState", "squelch"] call EFUNC(sys_data,dataEvent); _squelch = -116 + _squelch; // diag_log text format["squelch: %1 signal: %2", _squelch, _signalDbM]; @@ -219,36 +219,36 @@ if (_transmissionsChanged) then { if (EGVAR(sys_core,interference)) then { _okRadios = []; }; - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped"} && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); } else { if (isNil "_beeped" || {!_beeped}) then { //diag_log "BEEP!"; - SCRATCH_SET(_radioId, "hasBeeped", true); + SCRATCH_SET(_radioId,"hasBeeped",true); private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOn", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; } else { - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped"} && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); }; // Cache it - SCRATCH_SET(_radioId, "currentTransmissionRadioCache", _okRadios); + SCRATCH_SET(_radioId,"currentTransmissionRadioCache",_okRadios); //Force a recalculation if data is not ready if (_areAllRadiosInitialized) then { - SCRATCH_SET(_radioId, "lastSortTime", diag_tickTime); + SCRATCH_SET(_radioId,"lastSortTime",diag_tickTime); } else { - SCRATCH_SET(_radioId, "lastSortTime", -4); + SCRATCH_SET(_radioId,"lastSortTime",-4); }; } else { _okRadios = _radioCache; diff --git a/addons/sys_prc77/radio/fnc_handlePTTDown.sqf b/addons/sys_prc77/radio/fnc_handlePTTDown.sqf index 699eb0e30..f3467456e 100644 --- a/addons/sys_prc77/radio/fnc_handlePTTDown.sqf +++ b/addons/sys_prc77/radio/fnc_handlePTTDown.sqf @@ -26,5 +26,5 @@ if !([_radioId] call EFUNC(sys_radio,canUnitTransmit)) exitWith {false}; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericBeep", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", true); +SCRATCH_SET(_radioId,"PTTDown",true); true diff --git a/addons/sys_prc77/radio/fnc_handlePTTUp.sqf b/addons/sys_prc77/radio/fnc_handlePTTUp.sqf index f583363dd..614f49da8 100644 --- a/addons/sys_prc77/radio/fnc_handlePTTUp.sqf +++ b/addons/sys_prc77/radio/fnc_handlePTTUp.sqf @@ -24,5 +24,5 @@ params ["_radioId", "", "", "", ""]; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", false); +SCRATCH_SET(_radioId,"PTTDown",false); true; diff --git a/addons/sys_prc77/radio/fnc_initializeRadio.sqf b/addons/sys_prc77/radio/fnc_initializeRadio.sqf index 5f7c38f0d..1bb9ccc0b 100644 --- a/addons/sys_prc77/radio/fnc_initializeRadio.sqf +++ b/addons/sys_prc77/radio/fnc_initializeRadio.sqf @@ -21,7 +21,7 @@ */ params ["_radioId", "", "_eventData", "_radioData", ""]; -TRACE_1("INITIALIZING RADIO 77", _this); +TRACE_1("INITIALIZING RADIO 77",_this); // Function to convert frequency to knob positions. private _frequencyToKnobPositions = { @@ -62,24 +62,24 @@ private _knobPositions = ([_frequencyTx] call _frequencyToKnobPositions); private _secondPresetKnobPositions = ([_secondPresetFrequency] call _frequencyToKnobPositions); -SCRATCH_SET(_radioId, "currentTransmissions", []); +SCRATCH_SET(_radioId,"currentTransmissions",[]); //Radio Settings HASH_SET(_radioData,"volume",EGVAR(sys_core,defaultRadioVolume)); //0-1 -HASH_SET(_radioData,"function",2); //0 - OFF, 1 - ON, 2 - SQUELCH, 3 - RETRANS, 4 - LITE (Temp) +HASH_SET(_radioData,"function",2); //0 - OFF,1 - ON,2 - SQUELCH,3 - RETRANS,4 - LITE (Temp) HASH_SET(_radioData,"radioOn",1); //0 - OFF, 1 - ON HASH_SET(_radioData,"band",_band); //{0,1} HASH_SET(_radioData,"currentPreset",[ARR_2(_knobPositions,_secondPresetKnobPositions)]); //Array of Presetarrays (KnobPositions) HASH_SET(_radioData,"currentChannel",_knobPositions); -HASH_SET(_radioData,"powerSource", "BAT"); +HASH_SET(_radioData,"powerSource","BAT"); //Common Channel Settings HASH_SET(_radioData,"frequencyTX",_frequencyTx); HASH_SET(_radioData,"frequencyRX",_frequencyTx); HASH_SET(_radioData,"power",3500); HASH_SET(_radioData,"mode","singleChannel"); -HASH_SET(_radioData,"CTCSSTx", 150); -HASH_SET(_radioData,"CTCSSRx", 150); +HASH_SET(_radioData,"CTCSSTx",150); +HASH_SET(_radioData,"CTCSSRx",150); HASH_SET(_radioData,"modulation","FM"); HASH_SET(_radioData,"encryption",0); HASH_SET(_radioData,"TEK",""); diff --git a/addons/sys_prc77/radio/fnc_openGui.sqf b/addons/sys_prc77/radio/fnc_openGui.sqf index f6b984644..56a1047bf 100644 --- a/addons/sys_prc77/radio/fnc_openGui.sqf +++ b/addons/sys_prc77/radio/fnc_openGui.sqf @@ -16,7 +16,7 @@ * Public: No */ -TRACE_1("OPENING GUI", _this); +TRACE_1("OPENING GUI",_this); params ["_radioId", "", "", "", ""]; // Prevent radio from being opened if it is externally used or it is not accessible diff --git a/addons/sys_prc77/radio/fnc_setCurrentChannel.sqf b/addons/sys_prc77/radio/fnc_setCurrentChannel.sqf index 826d52dad..49fb67cbd 100644 --- a/addons/sys_prc77/radio/fnc_setCurrentChannel.sqf +++ b/addons/sys_prc77/radio/fnc_setCurrentChannel.sqf @@ -19,7 +19,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["_radioId", "", "_eventData", "_radioData", ""]; diff --git a/addons/sys_prc77/radio/fnc_setOnOffState.sqf b/addons/sys_prc77/radio/fnc_setOnOffState.sqf index 734891c60..fa3566ac2 100644 --- a/addons/sys_prc77/radio/fnc_setOnOffState.sqf +++ b/addons/sys_prc77/radio/fnc_setOnOffState.sqf @@ -21,4 +21,4 @@ params ["", "", "_eventData", "_radioData", ""]; -HASH_SET(_radioData, "radioOn", _eventData); +HASH_SET(_radioData,"radioOn",_eventData); diff --git a/addons/sys_prc77/radio/fnc_setState.sqf b/addons/sys_prc77/radio/fnc_setState.sqf index ae0a3e96d..8fa1f90ca 100644 --- a/addons/sys_prc77/radio/fnc_setState.sqf +++ b/addons/sys_prc77/radio/fnc_setState.sqf @@ -22,7 +22,7 @@ params ["", "", "_eventData", "_radioData", ""]; -HASH_SET(_radioData, _eventData select 0, _eventData select 1); +HASH_SET(_radioData,_eventData select 0,_eventData select 1); // if (_radioId == acre_sys_radio_currentRadioDialog) then { // _display = uiNamespace getVariable QGVAR(currentDisplay); // [_display] call FUNC(render); diff --git a/addons/sys_prc77/radio/fnc_setVolume.sqf b/addons/sys_prc77/radio/fnc_setVolume.sqf index 79c39c9ba..517ed40f2 100644 --- a/addons/sys_prc77/radio/fnc_setVolume.sqf +++ b/addons/sys_prc77/radio/fnc_setVolume.sqf @@ -19,7 +19,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["_radioId", "_event", "_eventData", "_radioData", ""]; diff --git a/addons/sys_rack/fnc_addRackOnReturn.sqf b/addons/sys_rack/fnc_addRackOnReturn.sqf index a5174742e..24c4e8fd5 100644 --- a/addons/sys_rack/fnc_addRackOnReturn.sqf +++ b/addons/sys_rack/fnc_addRackOnReturn.sqf @@ -60,5 +60,5 @@ if (_idx != -1) then { }; if (!_handled) then { - WARNING_2("Recieved new rack ID (%1) for vehicle (%2) but no entry in queue rack.", _rackId, typeOf _vehicle); + WARNING_2("Recieved new rack ID (%1) for vehicle (%2) but no entry in queue rack.",_rackId,typeOf _vehicle); }; diff --git a/addons/sys_rack/fnc_onReturnRackId.sqf b/addons/sys_rack/fnc_onReturnRackId.sqf index ba5851fdd..8a834d059 100644 --- a/addons/sys_rack/fnc_onReturnRackId.sqf +++ b/addons/sys_rack/fnc_onReturnRackId.sqf @@ -26,12 +26,12 @@ private _dataHash = HASH_CREATE; // diag_log text format ["acre_sys_data_radioData: %1", acre_sys_data_radioData]; -HASH_SET(EGVAR(sys_data,radioData), _class, _dataHash); +HASH_SET(EGVAR(sys_data,radioData),_class,_dataHash); private _idRelation = [_entity, _entity]; -HASH_SET(EGVAR(sys_server,objectIdRelationTable), _class, _idRelation); +HASH_SET(EGVAR(sys_server,objectIdRelationTable),_class,_idRelation); if (_replacementId != "") then { - private _radioData = HASH_GET(EGVAR(sys_data,radioData), _replacementId); - HASH_SET(EGVAR(sys_data,radioData), _class, HASH_COPY(_radioData)); + private _radioData = HASH_GET(EGVAR(sys_data,radioData),_replacementId); + HASH_SET(EGVAR(sys_data,radioData),_class,HASH_COPY(_radioData)); }; // To further check. No isses found. diff --git a/addons/sys_rack/fnc_onReturnRadioId.sqf b/addons/sys_rack/fnc_onReturnRadioId.sqf index 237816d33..5e53b74aa 100644 --- a/addons/sys_rack/fnc_onReturnRadioId.sqf +++ b/addons/sys_rack/fnc_onReturnRadioId.sqf @@ -55,7 +55,7 @@ if (_condition) then { if (_baseRadio == GET_STATE_RACK(_rackId,"mountedRadio")) then { // Add a new radio based on the id we just got - TRACE_2("Adding radio", _class, _baseRadio); + TRACE_2("Adding radio",_class,_baseRadio); // Initialize the new radio private _preset = _vehicle getVariable [QGVAR(vehicleRacksPreset), ""]; diff --git a/addons/sys_rack/script_acre_rack_defines.hpp b/addons/sys_rack/script_acre_rack_defines.hpp index 3bba9ffff..bf5b5e490 100644 --- a/addons/sys_rack/script_acre_rack_defines.hpp +++ b/addons/sys_rack/script_acre_rack_defines.hpp @@ -1,6 +1,10 @@ #define SEM90_RACK_POWER_MULTIPLIER 10 -#define VRC64_RACK_POWER 50000 // 50W -#define VRC103_RACK_POWER 50000 // 50W -#define VRC110_RACK_POWER 20000 // 20W -#define VRC111_RACK_POWER 20000 // 20W +// 50W +#define VRC64_RACK_POWER 50000 +// 50W +#define VRC103_RACK_POWER 50000 +// 20W +#define VRC110_RACK_POWER 20000 +// 20W +#define VRC111_RACK_POWER 20000 diff --git a/addons/sys_rack/sem90/__PREP__.sqf b/addons/sys_rack/sem90/__PREP__.sqf index c3823cdf6..abc8ad0fb 100644 --- a/addons/sys_rack/sem90/__PREP__.sqf +++ b/addons/sys_rack/sem90/__PREP__.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -TRACE_1("enter", _this); +TRACE_1("enter",_this); PREP_MODULE(sem90,sem90MountRadio); PREP_MODULE(sem90,sem90UnmountRadio); diff --git a/addons/sys_rack/vrc103/__PREP__.sqf b/addons/sys_rack/vrc103/__PREP__.sqf index a677d5adf..82714bdcb 100644 --- a/addons/sys_rack/vrc103/__PREP__.sqf +++ b/addons/sys_rack/vrc103/__PREP__.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -TRACE_1("enter", _this); +TRACE_1("enter",_this); PREP_MODULE(vrc103,vrc103MountRadio); PREP_MODULE(vrc103,vrc103UnmountRadio); diff --git a/addons/sys_rack/vrc110/__PREP__.sqf b/addons/sys_rack/vrc110/__PREP__.sqf index cf2ff29fb..d95b4f75a 100644 --- a/addons/sys_rack/vrc110/__PREP__.sqf +++ b/addons/sys_rack/vrc110/__PREP__.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -TRACE_1("enter", _this); +TRACE_1("enter",_this); PREP_MODULE(vrc110,vrc110MountRadio); PREP_MODULE(vrc110,vrc110UnmountRadio); diff --git a/addons/sys_rack/vrc111/__PREP__.sqf b/addons/sys_rack/vrc111/__PREP__.sqf index 073d17a0a..310615ef0 100644 --- a/addons/sys_rack/vrc111/__PREP__.sqf +++ b/addons/sys_rack/vrc111/__PREP__.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -TRACE_1("enter", _this); +TRACE_1("enter",_this); PREP_MODULE(vrc111,vrc111MountRadio); PREP_MODULE(vrc111,vrc111UnmountRadio); diff --git a/addons/sys_rack/vrc64/__PREP__.sqf b/addons/sys_rack/vrc64/__PREP__.sqf index f357d9b9b..038eac551 100644 --- a/addons/sys_rack/vrc64/__PREP__.sqf +++ b/addons/sys_rack/vrc64/__PREP__.sqf @@ -1,6 +1,6 @@ #include "..\script_component.hpp" -TRACE_1("enter", _this); +TRACE_1("enter",_this); PREP_MODULE(vrc64,vrc64MountRadio); PREP_MODULE(vrc64,vrc64UnmountRadio); diff --git a/addons/sys_radio/fnc_getRadioObject.sqf b/addons/sys_radio/fnc_getRadioObject.sqf index 828dc3a23..719d6637d 100644 --- a/addons/sys_radio/fnc_getRadioObject.sqf +++ b/addons/sys_radio/fnc_getRadioObject.sqf @@ -21,12 +21,12 @@ private _ret = nil; // On a dedicated server objectIdRelationTable will not be available, but we can use masterIdTable which has identical data if (isDedicated) then { - if (HASH_HASKEY(EGVAR(sys_server,masterIdTable), _class)) then { - _ret = (HASH_GET(EGVAR(sys_server,masterIdTable), _class) select 0); + if (HASH_HASKEY(EGVAR(sys_server,masterIdTable),_class)) then { + _ret = (HASH_GET(EGVAR(sys_server,masterIdTable),_class) select 0); }; } else { - if (HASH_HASKEY(EGVAR(sys_server,objectIdRelationTable), _class)) then { - _ret = (HASH_GET(EGVAR(sys_server,objectIdRelationTable), _class) select 0); + if (HASH_HASKEY(EGVAR(sys_server,objectIdRelationTable),_class)) then { + _ret = (HASH_GET(EGVAR(sys_server,objectIdRelationTable),_class) select 0); }; }; _ret; diff --git a/addons/sys_radio/fnc_getRadioPos.sqf b/addons/sys_radio/fnc_getRadioPos.sqf index 63dba3e2f..848146cf7 100644 --- a/addons/sys_radio/fnc_getRadioPos.sqf +++ b/addons/sys_radio/fnc_getRadioPos.sqf @@ -18,7 +18,7 @@ params ["_class"]; private _ret = [0,0,0]; -if (HASH_HASKEY(EGVAR(sys_server,objectIdRelationTable), _class)) then { - _ret = getPosASL (HASH_GET(EGVAR(sys_server,objectIdRelationTable), _class) select 0); +if (HASH_HASKEY(EGVAR(sys_server,objectIdRelationTable),_class)) then { + _ret = getPosASL (HASH_GET(EGVAR(sys_server,objectIdRelationTable),_class) select 0); }; _ret; diff --git a/addons/sys_radio/fnc_getRadioSubObject.sqf b/addons/sys_radio/fnc_getRadioSubObject.sqf index cddb5a4fd..c25ec47a4 100644 --- a/addons/sys_radio/fnc_getRadioSubObject.sqf +++ b/addons/sys_radio/fnc_getRadioSubObject.sqf @@ -18,7 +18,7 @@ params ["_class"]; private _ret = nil; -if (HASH_HASKEY(EGVAR(sys_server,objectIdRelationTable), _class)) then { - _ret = (HASH_GET(EGVAR(sys_server,objectIdRelationTable), _class) select 1); +if (HASH_HASKEY(EGVAR(sys_server,objectIdRelationTable),_class)) then { + _ret = (HASH_GET(EGVAR(sys_server,objectIdRelationTable),_class) select 1); }; _ret; diff --git a/addons/sys_radio/fnc_handleRadioSpatialKeyPressed.sqf b/addons/sys_radio/fnc_handleRadioSpatialKeyPressed.sqf index 35416df76..2b3a148df 100644 --- a/addons/sys_radio/fnc_handleRadioSpatialKeyPressed.sqf +++ b/addons/sys_radio/fnc_handleRadioSpatialKeyPressed.sqf @@ -18,7 +18,7 @@ params ["_side"]; -TRACE_1("GOT SPATIAL KEY PRESS", _side); +TRACE_1("GOT SPATIAL KEY PRESS",_side); if (ACRE_ACTIVE_RADIO == "") exitWith { nil diff --git a/addons/sys_radio/fnc_initDefaultRadio.sqf b/addons/sys_radio/fnc_initDefaultRadio.sqf index 07a27b6c6..0f5a6d1c8 100644 --- a/addons/sys_radio/fnc_initDefaultRadio.sqf +++ b/addons/sys_radio/fnc_initDefaultRadio.sqf @@ -17,7 +17,7 @@ */ LOG("INITIALIZING DEFAULT RADIO"); -TRACE_1("", _this); +TRACE_1("",_this); params ["_radioId", ["_preset", "default"]]; private _baseName = BASECLASS(_radioId); @@ -29,4 +29,4 @@ private _baseName = BASECLASS(_radioId); // External antenna [_radioId] call EFUNC(sys_gsa,initRadio); -TRACE_1("", _baseName); +TRACE_1("",_baseName); diff --git a/addons/sys_radio/fnc_monitorRadiosPFH.sqf b/addons/sys_radio/fnc_monitorRadiosPFH.sqf index 274535558..feb8d61c1 100644 --- a/addons/sys_radio/fnc_monitorRadiosPFH.sqf +++ b/addons/sys_radio/fnc_monitorRadiosPFH.sqf @@ -65,7 +65,7 @@ private _currentUniqueItems = []; if (_hasUnique) then { GVAR(requestingNewId) = true; ["acre_getRadioId", [acre_player, _radio, QGVAR(returnRadioId)]] call CALLSTACK(CBA_fnc_serverEvent); - TRACE_1("Getting ID for", _radio); + TRACE_1("Getting ID for",_radio); }; }; diff --git a/addons/sys_radio/fnc_onPlayerKilled.sqf b/addons/sys_radio/fnc_onPlayerKilled.sqf index 489e66f80..472ea6079 100644 --- a/addons/sys_radio/fnc_onPlayerKilled.sqf +++ b/addons/sys_radio/fnc_onPlayerKilled.sqf @@ -15,7 +15,7 @@ * Public: No */ -TRACE_1("", _this); +TRACE_1("",_this); params ["_unit"]; if (_unit == acre_player) then { diff --git a/addons/sys_radio/fnc_onReturnRadioId.sqf b/addons/sys_radio/fnc_onReturnRadioId.sqf index bbca545a6..ca0e2a0c5 100644 --- a/addons/sys_radio/fnc_onReturnRadioId.sqf +++ b/addons/sys_radio/fnc_onReturnRadioId.sqf @@ -28,10 +28,10 @@ private _dataHash = HASH_CREATE; HASH_SET(EGVAR(sys_data,radioData),_class,_dataHash); private _idRelation = [_player, _player]; -HASH_SET(EGVAR(sys_server,objectIdRelationTable), _class, _idRelation); +HASH_SET(EGVAR(sys_server,objectIdRelationTable),_class,_idRelation); if (_replacementId isNotEqualTo "") then { - private _radioData = HASH_GET(EGVAR(sys_data,radioData), _replacementId); - HASH_SET(EGVAR(sys_data,radioData), _class, HASH_COPY(_radioData)); + private _radioData = HASH_GET(EGVAR(sys_data,radioData),_replacementId); + HASH_SET(EGVAR(sys_data,radioData),_class,HASH_COPY(_radioData)); }; if (_player == acre_player) then { @@ -42,10 +42,10 @@ if (_player == acre_player) then { private _weapons = [acre_player] call EFUNC(sys_core,getGear); //if (_baseRadio in _weapons || ("ItemRadio" in _weapons && _baseRadio == GVAR(defaultItemRadioType) ) ) then { - TRACE_2("Check inventory", _baseRadio, _weapons); + TRACE_2("Check inventory",_baseRadio,_weapons); if ((toLower _baseRadio) in _weapons) then { // Add a new radio based on the id we just got - TRACE_3("Adding radio", _class, _baseRadio, _replacementId); + TRACE_3("Adding radio",_class,_baseRadio,_replacementId); if (_replacementId isEqualTo "") then { // initialize the new radio diff --git a/addons/sys_radio/fnc_radioExists.sqf b/addons/sys_radio/fnc_radioExists.sqf index a95bcfc90..d513b1481 100644 --- a/addons/sys_radio/fnc_radioExists.sqf +++ b/addons/sys_radio/fnc_radioExists.sqf @@ -17,4 +17,4 @@ params ["_class"]; -HASH_HASKEY(EGVAR(sys_server,objectIdRelationTable), _class) +HASH_HASKEY(EGVAR(sys_server,objectIdRelationTable),_class) diff --git a/addons/sys_radio/fnc_setActiveRadio.sqf b/addons/sys_radio/fnc_setActiveRadio.sqf index 29637b8a4..4177da197 100644 --- a/addons/sys_radio/fnc_setActiveRadio.sqf +++ b/addons/sys_radio/fnc_setActiveRadio.sqf @@ -15,7 +15,7 @@ * Public: No */ -TRACE_1("SETTING ACTIVE RADIO", _this); +TRACE_1("SETTING ACTIVE RADIO",_this); ACRE_ACTIVE_RADIO = _this select 0; diff --git a/addons/sys_rpc/fnc_addProcedure.sqf b/addons/sys_rpc/fnc_addProcedure.sqf index 005e04d6e..970a63a9c 100644 --- a/addons/sys_rpc/fnc_addProcedure.sqf +++ b/addons/sys_rpc/fnc_addProcedure.sqf @@ -17,4 +17,4 @@ */ params ["_procedureName", "_procedureCodeBlock"]; -HASH_SET(GVAR(procedures), _procedureName, _procedureCodeBlock); +HASH_SET(GVAR(procedures),_procedureName,_procedureCodeBlock); diff --git a/addons/sys_rpc/fnc_callRemoteProcedure.sqf b/addons/sys_rpc/fnc_callRemoteProcedure.sqf index 3e9532dfb..873b32d4f 100644 --- a/addons/sys_rpc/fnc_callRemoteProcedure.sqf +++ b/addons/sys_rpc/fnc_callRemoteProcedure.sqf @@ -42,5 +42,5 @@ if (IS_ARRAY(_params)) then { _params = _array joinString ","; }; private _data = _name + ":" + _params; -TRACE_1("sendMessage ", _data); +TRACE_1("sendMessage ",_data); _data call EFUNC(sys_io,sendMessage); diff --git a/addons/sys_rpc/fnc_handleData.sqf b/addons/sys_rpc/fnc_handleData.sqf index 01a84ac7f..788ddd208 100644 --- a/addons/sys_rpc/fnc_handleData.sqf +++ b/addons/sys_rpc/fnc_handleData.sqf @@ -27,11 +27,11 @@ private _restOfMessage = _message select [(count _procedureCall) +1]; private _paramArray = _restOfMessage splitString ","; TRACE_1("PARAMS TO PROCEDURE",_paramArray); -if (HASH_HASKEY(GVAR(procedures), _procedureCall)) then { - private _function = HASH_GET(GVAR(procedures), _procedureCall); +if (HASH_HASKEY(GVAR(procedures),_procedureCall)) then { + private _function = HASH_GET(GVAR(procedures),_procedureCall); TRACE_1("!!!!!!!!!!!!_---------------------------- CALLING FUNCTION -----------------!!!!!!",_procedureCall); // diag_log text format["CALL FUNC: %1", _function]; - _paramArray call CALLSTACK_NAMED(_function, _procedureCall); + _paramArray call CALLSTACK_NAMED(_function,_procedureCall); }; true diff --git a/addons/sys_sem52sl/functions/fnc_render.sqf b/addons/sys_sem52sl/functions/fnc_render.sqf index 29bc87830..b338fbc34 100644 --- a/addons/sys_sem52sl/functions/fnc_render.sqf +++ b/addons/sys_sem52sl/functions/fnc_render.sqf @@ -99,5 +99,5 @@ if (_audioPath == "HEADSET") then { //display [_display] call FUNC(renderDisplay); -TRACE_3("rendering", _currentChannel, _currentVolume, EGVAR(sys_radio,currentRadioDialog)); +TRACE_3("rendering",_currentChannel,_currentVolume,EGVAR(sys_radio,currentRadioDialog)); true diff --git a/addons/sys_sem52sl/radio/fnc_getChannelData.sqf b/addons/sys_sem52sl/radio/fnc_getChannelData.sqf index c144828a9..9d3f18521 100644 --- a/addons/sys_sem52sl/radio/fnc_getChannelData.sqf +++ b/addons/sys_sem52sl/radio/fnc_getChannelData.sqf @@ -45,8 +45,8 @@ params ["", "", "_eventData", "_radioData"]; * which is contained in the _radioData -- channels hash. */ private _channelNumber = _eventData; -private _channels = HASH_GET(_radioData, "channels"); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); +private _channels = HASH_GET(_radioData,"channels"); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); /* * All needed data from the channel hash can be extracted and @@ -62,13 +62,13 @@ private _channel = HASHLIST_SELECT(_channels, _channelNumber); * "singleChannel" for all channels. */ private _return = HASH_CREATE; -HASH_SET(_return, "mode", GVAR(channelMode)); -HASH_SET(_return, "frequencyTX", HASH_GET(_channel, "frequencyTX")); -HASH_SET(_return, "frequencyRX", HASH_GET(_channel, "frequencyRX")); -HASH_SET(_return, "CTCSSTx", GVAR(channelCTCSS)); -HASH_SET(_return, "CTCSSRx", GVAR(channelCTCSS)); -HASH_SET(_return, "modulation", GVAR(channelModulation)); -HASH_SET(_return, "encryption", GVAR(channelEncryption)); -HASH_SET(_return, "power", GVAR(channelPower)); -HASH_SET(_return, "squelch", GVAR(channelSquelch)); +HASH_SET(_return,"mode",GVAR(channelMode)); +HASH_SET(_return,"frequencyTX",HASH_GET(_channel,"frequencyTX")); +HASH_SET(_return,"frequencyRX",HASH_GET(_channel,"frequencyRX")); +HASH_SET(_return,"CTCSSTx",GVAR(channelCTCSS)); +HASH_SET(_return,"CTCSSRx",GVAR(channelCTCSS)); +HASH_SET(_return,"modulation",GVAR(channelModulation)); +HASH_SET(_return,"encryption",GVAR(channelEncryption)); +HASH_SET(_return,"power",GVAR(channelPower)); +HASH_SET(_return,"squelch",GVAR(channelSquelch)); _return diff --git a/addons/sys_sem52sl/radio/fnc_getCurrentChannelData.sqf b/addons/sys_sem52sl/radio/fnc_getCurrentChannelData.sqf index 74947d4f4..36cdec654 100644 --- a/addons/sys_sem52sl/radio/fnc_getCurrentChannelData.sqf +++ b/addons/sys_sem52sl/radio/fnc_getCurrentChannelData.sqf @@ -46,8 +46,8 @@ params ["", "", "", "_radioData"]; */ private _channelNumber = HASH_GET(_radioData,"currentChannel"); ISNILS(_channelNumber,0); -private _channels = HASH_GET(_radioData, "channels"); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); +private _channels = HASH_GET(_radioData,"channels"); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); /* * All needed data from the channel hash can be extracted and @@ -63,13 +63,13 @@ private _channel = HASHLIST_SELECT(_channels, _channelNumber); * "singleChannel" for all channels. */ private _return = HASH_CREATE; -HASH_SET(_return, "mode", GVAR(channelMode)); -HASH_SET(_return, "frequencyTX", HASH_GET(_channel, "frequencyTX")); -HASH_SET(_return, "frequencyRX", HASH_GET(_channel, "frequencyRX")); -HASH_SET(_return, "CTCSSTx", GVAR(channelCTCSS)); -HASH_SET(_return, "CTCSSRx", GVAR(channelCTCSS)); -HASH_SET(_return, "modulation", GVAR(channelModulation)); -HASH_SET(_return, "encryption", GVAR(channelEncryption)); -HASH_SET(_return, "power", GVAR(channelPower)); -HASH_SET(_return, "squelch", GVAR(channelSquelch)); +HASH_SET(_return,"mode",GVAR(channelMode)); +HASH_SET(_return,"frequencyTX",HASH_GET(_channel,"frequencyTX")); +HASH_SET(_return,"frequencyRX",HASH_GET(_channel,"frequencyRX")); +HASH_SET(_return,"CTCSSTx",GVAR(channelCTCSS)); +HASH_SET(_return,"CTCSSRx",GVAR(channelCTCSS)); +HASH_SET(_return,"modulation",GVAR(channelModulation)); +HASH_SET(_return,"encryption",GVAR(channelEncryption)); +HASH_SET(_return,"power",GVAR(channelPower)); +HASH_SET(_return,"squelch",GVAR(channelSquelch)); _return diff --git a/addons/sys_sem52sl/radio/fnc_getOnOffState.sqf b/addons/sys_sem52sl/radio/fnc_getOnOffState.sqf index 011e751d7..d65a4d175 100644 --- a/addons/sys_sem52sl/radio/fnc_getOnOffState.sqf +++ b/addons/sys_sem52sl/radio/fnc_getOnOffState.sqf @@ -41,4 +41,4 @@ params ["", "", "", "_radioData"]; -HASH_GET(_radioData, "radioOn"); +HASH_GET(_radioData,"radioOn"); diff --git a/addons/sys_sem52sl/radio/fnc_getSpatial.sqf b/addons/sys_sem52sl/radio/fnc_getSpatial.sqf index 5771be955..a909f77c0 100644 --- a/addons/sys_sem52sl/radio/fnc_getSpatial.sqf +++ b/addons/sys_sem52sl/radio/fnc_getSpatial.sqf @@ -42,7 +42,7 @@ params ["", "", "", "_radioData"]; -private _spatial = HASH_GET(_radioData, "ACRE_INTERNAL_RADIOSPATIALIZATION"); +private _spatial = HASH_GET(_radioData,"ACRE_INTERNAL_RADIOSPATIALIZATION"); if (!isNil "_spatial") exitWith { _spatial }; 0 diff --git a/addons/sys_sem52sl/radio/fnc_getState.sqf b/addons/sys_sem52sl/radio/fnc_getState.sqf index 6cf52e661..e370a416d 100644 --- a/addons/sys_sem52sl/radio/fnc_getState.sqf +++ b/addons/sys_sem52sl/radio/fnc_getState.sqf @@ -40,4 +40,4 @@ params ["", "", "_eventData", "_radioData"]; -HASH_GET(_radioData, _eventData); +HASH_GET(_radioData,_eventData); diff --git a/addons/sys_sem52sl/radio/fnc_handleBeginTransmission.sqf b/addons/sys_sem52sl/radio/fnc_handleBeginTransmission.sqf index b7b54066b..07251399d 100644 --- a/addons/sys_sem52sl/radio/fnc_handleBeginTransmission.sqf +++ b/addons/sys_sem52sl/radio/fnc_handleBeginTransmission.sqf @@ -41,6 +41,6 @@ params ["_radioId", "", ""]; -SCRATCH_SET(_radioId, "cachedTransmissions", false); +SCRATCH_SET(_radioId,"cachedTransmissions",false); true; diff --git a/addons/sys_sem52sl/radio/fnc_handleEndTransmission.sqf b/addons/sys_sem52sl/radio/fnc_handleEndTransmission.sqf index b20139185..cf38efe00 100644 --- a/addons/sys_sem52sl/radio/fnc_handleEndTransmission.sqf +++ b/addons/sys_sem52sl/radio/fnc_handleEndTransmission.sqf @@ -43,17 +43,17 @@ params ["_radioId", "", "_eventData"]; _eventData params ["_txId"]; -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); _currentTransmissions = _currentTransmissions - [_txId]; if (_currentTransmissions isEqualTo []) then { - private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped"} && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); }; -SCRATCH_SET(_radioId, "cachedTransmissions", false); +SCRATCH_SET(_radioId,"cachedTransmissions",false); true; diff --git a/addons/sys_sem52sl/radio/fnc_handleMultipleTransmissions.sqf b/addons/sys_sem52sl/radio/fnc_handleMultipleTransmissions.sqf index a34620b64..78e81ee61 100644 --- a/addons/sys_sem52sl/radio/fnc_handleMultipleTransmissions.sqf +++ b/addons/sys_sem52sl/radio/fnc_handleMultipleTransmissions.sqf @@ -89,31 +89,31 @@ params ["_radioId", "", "_radios"]; if !([_radioId] call EFUNC(sys_radio,canUnitReceive)) exitWith { [] }; -if (SCRATCH_GET_DEF(_radioId, "PTTDown", false) && {!EGVAR(sys_core,fullDuplex)}) exitWith { [] }; -private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); +if (SCRATCH_GET_DEF(_radioId,"PTTDown",false) && {!EGVAR(sys_core,fullDuplex)}) exitWith { [] }; +private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); private _found = false; private _transmissionsChanged = false; -private _lastSignalTime = SCRATCH_GET_DEF(_radioId, "lastSignalTime", diag_tickTime-2); +private _lastSignalTime = SCRATCH_GET_DEF(_radioId,"lastSignalTime",diag_tickTime-2); if (diag_tickTime - _lastSignalTime > 1) then { - SCRATCH_SET(_radioId, "currentTransmissions", []); + SCRATCH_SET(_radioId,"currentTransmissions",[]); }; -SCRATCH_SET(_radioId, "lastSignalTime", diag_tickTime); +SCRATCH_SET(_radioId,"lastSignalTime",diag_tickTime); -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); if (isNil "_currentTransmissions") then { _currentTransmissions = []; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _transmissions = []; private _sortedRadios = []; private _okRadios = []; -private _lastSortTime = SCRATCH_GET_DEF(_radioId, "lastSortTime", diag_tickTime-4); -private _radioCache = SCRATCH_GET_DEF(_radioId, "currentTransmissionRadioCache", []); +private _lastSortTime = SCRATCH_GET_DEF(_radioId,"lastSortTime",diag_tickTime-4); +private _radioCache = SCRATCH_GET_DEF(_radioId,"currentTransmissionRadioCache",[]); // Restort every 3 seconds no matter what. if (diag_tickTime - _lastSortTime > 3) then { @@ -151,16 +151,16 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent"]; if (_signalData isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; - PUSH(_sorted, [ARR_2(_signalPercent,_forEachIndex)]); - PUSH(_transmissions, _txId); + PUSH(_sorted,[ARR_2(_signalPercent,_forEachIndex)]); + PUSH(_transmissions,_txId); } forEach _radios; _sorted sort false; // descending order { - PUSH(_sortedRadios, (_radios select (_x select 1))); + PUSH(_sortedRadios,(_radios select (_x select 1))); } forEach _sorted; } else { - PUSH(_transmissions, ((_radios select 0) select 1)); + PUSH(_transmissions,((_radios select 0) select 1)); if (((_radios select 0) select 2) isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; _sortedRadios = _radios; }; @@ -168,61 +168,61 @@ if (_transmissionsChanged) then { private _dif = _transmissions - _currentTransmissions; if (_dif isNotEqualTo []) then { _currentTransmissions = _transmissions; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; //implement caching here //cache the results of this codeblock //invalidate cache on start/end transmissions and after a period of time ~1sec - // acre_player sideChat format["c: %1", SCRATCH_GET(_radioId, "cachedTransmissions")]; - if (!SCRATCH_GET(_radioId, "cachedTransmissions") || {diag_tickTime - SCRATCH_GET_DEF(_radioId, "cachedTransmissionsTime", diag_tickTime-3) > 2.5} || {_transmissionsChanged}) then { + // acre_player sideChat format["c: %1", SCRATCH_GET(_radioId,"cachedTransmissions")]; + if (!SCRATCH_GET(_radioId,"cachedTransmissions") || {diag_tickTime - SCRATCH_GET_DEF(_radioId,"cachedTransmissionsTime",diag_tickTime-3) > 2.5} || {_transmissionsChanged}) then { private _radioRxData = [_radioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); // diag_log text format["%1 NON-CACHED", diag_tickTime]; - if (HASH_GET(_radioRxData, "mode") == "singleChannel") then { + if (HASH_GET(_radioRxData,"mode") == "singleChannel") then { private _hearableTransmissions = []; private _junkTransmissions = []; private _digital = false; { private _txId = _x select 1; private _radioTxData = [_txId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); - if (HASH_GET(_radioRxData, "modulation") == HASH_GET(_radioTxData, "modulation")) then { + if (HASH_GET(_radioRxData,"modulation") == HASH_GET(_radioTxData,"modulation")) then { //diag_log text "MOD OK"; - if (HASH_GET(_radioRxData, "encryption") == 1 && {HASH_GET(_radioTxData, "encryption") == 1}) then { + if (HASH_GET(_radioRxData,"encryption") == 1 && {HASH_GET(_radioTxData,"encryption") == 1}) then { //diag_log text "ENCRYPTED"; - if (HASH_GET(_radioRxData, "TEK") == HASH_GET(_radioTxData, "TEK") && - {HASH_GET(_radioRxData, "trafficRate") == HASH_GET(_radioTxData, "trafficRate")} + if (HASH_GET(_radioRxData,"TEK") == HASH_GET(_radioTxData,"TEK") && + {HASH_GET(_radioRxData,"trafficRate") == HASH_GET(_radioTxData,"trafficRate")} ) then { //diag_log text "DIGITAL CRYPTO!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); _digital = true; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "encryption") == 0 && {HASH_GET(_radioTxData, "encryption") == 0}) then { + if (HASH_GET(_radioRxData,"encryption") == 0 && {HASH_GET(_radioTxData,"encryption") == 0}) then { //diag_log text "PT!"; - if (HASH_GET(_radioRxData, "modulation") == "FM" || {HASH_GET(_radioRxData, "modulation") == "NB"}) then { + if (HASH_GET(_radioRxData,"modulation") == "FM" || {HASH_GET(_radioRxData,"modulation") == "NB"}) then { //diag_log text "ITS FM BABY!"; - if (HASH_GET(_radioRxData, "CTCSSRx") == HASH_GET(_radioTxData, "CTCSSTx") || {HASH_GET(_radioRxData, "CTCSSRx") == 0}) then { + if (HASH_GET(_radioRxData,"CTCSSRx") == HASH_GET(_radioTxData,"CTCSSTx") || {HASH_GET(_radioRxData,"CTCSSRx") == 0}) then { //diag_log text "THE TONES MATCH!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData, "CTCSSRx"), HASH_GET(_radioTxData, "CTCSSTx")]; - PUSH(_junkTransmissions, _x); + //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData,"CTCSSRx"),HASH_GET(_radioTxData,"CTCSSTx")]; + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "modulation") == "AM") then { + if (HASH_GET(_radioRxData,"modulation") == "AM") then { //diag_log text "AM TALK JUNKIE!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } forEach _sortedRadios; @@ -260,12 +260,12 @@ if (_transmissionsChanged) then { _okRadios = _hearableTransmissions; }; }; - SCRATCH_SET(_radioId, "cachedTransmissionsData", +_okRadios); - SCRATCH_SET(_radioId, "cachedTransmissions", true); - SCRATCH_SET(_radioId, "cachedTransmissionsTime", diag_tickTime); + SCRATCH_SET(_radioId,"cachedTransmissionsData",+_okRadios); + SCRATCH_SET(_radioId,"cachedTransmissions",true); + SCRATCH_SET(_radioId,"cachedTransmissionsTime",diag_tickTime); } else { - _okRadios = +SCRATCH_GET(_radioId, "cachedTransmissionsData"); + _okRadios = +SCRATCH_GET(_radioId,"cachedTransmissionsData"); }; if (_okRadios isNotEqualTo []) then { @@ -273,42 +273,42 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent","_signalDbM"]; private _channelNum = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _channels = [_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent); - private _channel = HASHLIST_SELECT(_channels, _channelNum); - private _squelch = -117 + HASH_GET(_channel, "squelch"); + private _channel = HASHLIST_SELECT(_channels,_channelNum); + private _squelch = -117 + HASH_GET(_channel,"squelch"); // diag_log text format["squelch: %1 signal: %2", _squelch, _signalDbM]; if (_signalDbM < _squelch) then { _okRadios = []; - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped"} && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); } else { if (isNil "_beeped" || {!_beeped}) then { //diag_log "BEEP!"; - SCRATCH_SET(_radioId, "hasBeeped", true); + SCRATCH_SET(_radioId,"hasBeeped",true); private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOn", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; } else { - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped"} && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); }; // Cache it - SCRATCH_SET(_radioId, "currentTransmissionRadioCache", _okRadios); + SCRATCH_SET(_radioId,"currentTransmissionRadioCache",_okRadios); //Force a recalculation if data is not ready if (_areAllRadiosInitialized) then { - SCRATCH_SET(_radioId, "lastSortTime", diag_tickTime); + SCRATCH_SET(_radioId,"lastSortTime",diag_tickTime); } else { - SCRATCH_SET(_radioId, "lastSortTime", -4); + SCRATCH_SET(_radioId,"lastSortTime",-4); }; } else { _okRadios = _radioCache; diff --git a/addons/sys_sem52sl/radio/fnc_handlePTTDown.sqf b/addons/sys_sem52sl/radio/fnc_handlePTTDown.sqf index 9b775bb92..6261a09f2 100644 --- a/addons/sys_sem52sl/radio/fnc_handlePTTDown.sqf +++ b/addons/sys_sem52sl/radio/fnc_handlePTTDown.sqf @@ -53,5 +53,5 @@ if !([_radioId] call EFUNC(sys_radio,canUnitTransmit)) exitWith {false}; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericBeep", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", true); +SCRATCH_SET(_radioId,"PTTDown",true); true diff --git a/addons/sys_sem52sl/radio/fnc_handlePTTUp.sqf b/addons/sys_sem52sl/radio/fnc_handlePTTUp.sqf index eb0bac71f..937a00f63 100644 --- a/addons/sys_sem52sl/radio/fnc_handlePTTUp.sqf +++ b/addons/sys_sem52sl/radio/fnc_handlePTTUp.sqf @@ -51,5 +51,5 @@ params ["_radioId"]; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", false); +SCRATCH_SET(_radioId,"PTTDown",false); true; diff --git a/addons/sys_sem52sl/radio/fnc_initializeRadio.sqf b/addons/sys_sem52sl/radio/fnc_initializeRadio.sqf index 12ce04e23..2d4d49f2a 100644 --- a/addons/sys_sem52sl/radio/fnc_initializeRadio.sqf +++ b/addons/sys_sem52sl/radio/fnc_initializeRadio.sqf @@ -43,7 +43,7 @@ * nil */ -TRACE_1("INITIALIZING ACRE_SEM52SL", _this); +TRACE_1("INITIALIZING ACRE_SEM52SL",_this); params ["_radioId", "", "_eventData", "_radioData"]; @@ -62,7 +62,7 @@ _eventData params ["_baseName", "_preset"]; private _presetData = [_baseName, _preset] call EFUNC(sys_data,getPresetData); private _channels = HASH_GET(_presetData,"channels"); -SCRATCH_SET(_radioId, "currentTransmissions", []); +SCRATCH_SET(_radioId,"currentTransmissions",[]); private _currentChannels = HASH_GET(_radioData,"channels"); if (isNil "_currentChannels") then { @@ -72,8 +72,8 @@ if (isNil "_currentChannels") then { for "_i" from 0 to (count _channels)-1 do { private _channelData = HASH_COPY(_channels select _i); - TRACE_1("Setting " + QUOTE(RADIONAME) + " Init Channel Data", _channelData); - PUSH(_currentChannels, _channelData); + TRACE_1("Setting " + QUOTE(RADIONAME) + " Init Channel Data",_channelData); + PUSH(_currentChannels,_channelData); }; // Map 20/40/60/80/100% volume setting to the nearest valid value and knob position diff --git a/addons/sys_sem52sl/radio/fnc_isExternalAudio.sqf b/addons/sys_sem52sl/radio/fnc_isExternalAudio.sqf index fabb865d3..a920e41fe 100644 --- a/addons/sys_sem52sl/radio/fnc_isExternalAudio.sqf +++ b/addons/sys_sem52sl/radio/fnc_isExternalAudio.sqf @@ -42,4 +42,4 @@ params ["", "", "", "_radioData"]; -(HASH_GET(_radioData, "audioPath") == "INTSPEAKER") +(HASH_GET(_radioData,"audioPath") == "INTSPEAKER") diff --git a/addons/sys_sem52sl/radio/fnc_setChannelData.sqf b/addons/sys_sem52sl/radio/fnc_setChannelData.sqf index eb9e01042..da0395e5b 100644 --- a/addons/sys_sem52sl/radio/fnc_setChannelData.sqf +++ b/addons/sys_sem52sl/radio/fnc_setChannelData.sqf @@ -44,8 +44,8 @@ params ["", "", "_eventData", "_radioData"]; -private _channels = HASH_GET(_radioData, "channels"); +private _channels = HASH_GET(_radioData,"channels"); -HASHLIST_SET(_channels, (_eventData select 0), (_eventData select 1)); +HASHLIST_SET(_channels,(_eventData select 0),(_eventData select 1)); true diff --git a/addons/sys_sem52sl/radio/fnc_setCurrentChannel.sqf b/addons/sys_sem52sl/radio/fnc_setCurrentChannel.sqf index 8e92599b7..3340f79f8 100644 --- a/addons/sys_sem52sl/radio/fnc_setCurrentChannel.sqf +++ b/addons/sys_sem52sl/radio/fnc_setCurrentChannel.sqf @@ -40,7 +40,7 @@ params ["", "", "_eventData", "_radioData"]; // First, we check how many channels are available in total -private _channelCount = count (HASH_GET(_radioData, "channels")) - 1; +private _channelCount = count (HASH_GET(_radioData,"channels")) - 1; // Then we define our upper and lower limits // And write the new channel to the radioData hash diff --git a/addons/sys_sem52sl/radio/fnc_setOnOffState.sqf b/addons/sys_sem52sl/radio/fnc_setOnOffState.sqf index 9872811bd..29da9c311 100644 --- a/addons/sys_sem52sl/radio/fnc_setOnOffState.sqf +++ b/addons/sys_sem52sl/radio/fnc_setOnOffState.sqf @@ -41,7 +41,7 @@ params ["_radioId", "", "_eventData", "_radioData"]; -HASH_SET(_radioData, "radioOn", _eventData); +HASH_SET(_radioData,"radioOn",_eventData); if (_radioId == EGVAR(sys_radio,currentRadioDialog)) then { if (_eventData isEqualTo 0) then { diff --git a/addons/sys_sem52sl/radio/fnc_setState.sqf b/addons/sys_sem52sl/radio/fnc_setState.sqf index 4b69c73c9..93ae0d020 100644 --- a/addons/sys_sem52sl/radio/fnc_setState.sqf +++ b/addons/sys_sem52sl/radio/fnc_setState.sqf @@ -40,4 +40,4 @@ params ["", "", "_eventData", "_radioData"]; -HASH_SET(_radioData, _eventData param [0], _eventData param [1]); +HASH_SET(_radioData,_eventData param [0],_eventData param [1]); diff --git a/addons/sys_sem52sl/radio/fnc_setVolume.sqf b/addons/sys_sem52sl/radio/fnc_setVolume.sqf index 181334d6a..8c70f1b25 100644 --- a/addons/sys_sem52sl/radio/fnc_setVolume.sqf +++ b/addons/sys_sem52sl/radio/fnc_setVolume.sqf @@ -55,5 +55,5 @@ if (_vol%0.20 != 0) then { _vol = _vol-(_vol%0.20); }; -HASH_SET(_radioData, "volume", _eventData); -TRACE_3("VOLUME SET",_radioId, _vol, _radioData); +HASH_SET(_radioData,"volume",_eventData); +TRACE_3("VOLUME SET",_radioId,_vol,_radioData); diff --git a/addons/sys_sem70/functions/fnc_renderDisplay.sqf b/addons/sys_sem70/functions/fnc_renderDisplay.sqf index a425e8a07..4993e081e 100644 --- a/addons/sys_sem70/functions/fnc_renderDisplay.sqf +++ b/addons/sys_sem70/functions/fnc_renderDisplay.sqf @@ -120,7 +120,7 @@ if (_manualChannelSelection == 1) then { private _freq = HASH_GET(_channel,"frequencyRX"); private _numbers = [_freq] call _fnc_formatNumber; - TRACE_1("Frequency Number", _numbers); + TRACE_1("Frequency Number",_numbers); RADIO_CTRL(301) ctrlSetText (_firstDigit param [_numbers param [0,0]]); RADIO_CTRL(302) ctrlSetText (_secondDigit param [_numbers param [1,0]]); diff --git a/addons/sys_sem70/functions/fnc_setNetworkID.sqf b/addons/sys_sem70/functions/fnc_setNetworkID.sqf index 99d4d9b92..5e52744b8 100644 --- a/addons/sys_sem70/functions/fnc_setNetworkID.sqf +++ b/addons/sys_sem70/functions/fnc_setNetworkID.sqf @@ -35,8 +35,8 @@ private "_newNetworkID"; _newNetworkID = 100*_hecto + 10*_deca + _ones; private _currentChannel = ["getCurrentChannel"] call GUI_DATA_EVENT; -private _channel = HASHLIST_SELECT(GET_STATE("channels"), _currentChannel); -HASH_SET(_channel, "networkID", _newNetworkID); +private _channel = HASHLIST_SELECT(GET_STATE("channels"),_currentChannel); +HASH_SET(_channel,"networkID",_newNetworkID); ["setChannelData", [_currentChannel, _channel]] call GUI_DATA_EVENT; //["setState", ["networkID", _newNetworkID]] call GUI_DATA_EVENT; diff --git a/addons/sys_sem70/radio/fnc_getChannelData.sqf b/addons/sys_sem70/radio/fnc_getChannelData.sqf index fe72a546b..56e87075f 100644 --- a/addons/sys_sem70/radio/fnc_getChannelData.sqf +++ b/addons/sys_sem70/radio/fnc_getChannelData.sqf @@ -45,9 +45,9 @@ params ["", "", "_eventData", "_radioData"]; * which is contained in the _radioData -- channels hash. */ private _channelNumber = _eventData; -private _channels = HASH_GET(_radioData, "channels"); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); -private _manualChannel = HASH_GET(_radioData, "manualChannelSelection"); +private _channels = HASH_GET(_radioData,"channels"); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); +private _manualChannel = HASH_GET(_radioData,"manualChannelSelection"); /* * All needed data from the channel hash can be extracted and * consequently written to the _return hash. @@ -65,30 +65,30 @@ private _manualChannel = HASH_GET(_radioData, "manualChannelSelection"); private _return = HASH_CREATE; if (_manualChannel isEqualTo 1) then { - _channel = HASHLIST_SELECT(_channels, GVAR(manualChannel)); - HASH_SET(_return, "mode", HASH_GET(_channel, "mode")); - HASH_SET(_return, "frequencyTX", HASH_GET(_channel, "frequencyTX")); - HASH_SET(_return, "frequencyRX", HASH_GET(_channel, "frequencyRX")); - HASH_SET(_return, "CTCSSTx", HASH_GET(_radioData, "CTCSS")); - HASH_SET(_return, "CTCSSRx", HASH_GET(_radioData, "CTCSS")); - HASH_SET(_return, "modulation", HASH_GET(_radioData, "modulation")); - HASH_SET(_return, "encryption", HASH_GET(_radioData, "encryption")); - HASH_SET(_return, "squelch", HASH_GET(_radioData, "squelch")); - if (HASH_GET(_radioData, "powerSource") == "VAU") then { - HASH_SET(_return, "power", (HASH_GET(_radioData, "power") * SEM90_RACK_POWER_MULTIPLIER)); + _channel = HASHLIST_SELECT(_channels,GVAR(manualChannel)); + HASH_SET(_return,"mode",HASH_GET(_channel,"mode")); + HASH_SET(_return,"frequencyTX",HASH_GET(_channel,"frequencyTX")); + HASH_SET(_return,"frequencyRX",HASH_GET(_channel,"frequencyRX")); + HASH_SET(_return,"CTCSSTx",HASH_GET(_radioData,"CTCSS")); + HASH_SET(_return,"CTCSSRx",HASH_GET(_radioData,"CTCSS")); + HASH_SET(_return,"modulation",HASH_GET(_radioData,"modulation")); + HASH_SET(_return,"encryption",HASH_GET(_radioData,"encryption")); + HASH_SET(_return,"squelch",HASH_GET(_radioData,"squelch")); + if (HASH_GET(_radioData,"powerSource") == "VAU") then { + HASH_SET(_return,"power",(HASH_GET(_radioData,"power") * SEM90_RACK_POWER_MULTIPLIER)); } else { - HASH_SET(_return, "power", HASH_GET(_radioData, "power")); + HASH_SET(_return,"power",HASH_GET(_radioData,"power")); }; } else { - HASH_SET(_return, "mode", HASH_GET(_channel, "mode")); - HASH_SET(_return, "networkID", HASH_GET(_channel, "networkID")); - HASH_SET(_return, "frequencies", HASH_GET(_channel, "frequencies")); - HASH_SET(_return, "frequencyTX", HASH_GET(_channel, "frequencyTX")); - HASH_SET(_return, "frequencyRX", HASH_GET(_channel, "frequencyRX")); - if (HASH_GET(_radioData, "powerSource") == "VAU") then { - HASH_SET(_return, "power", (HASH_GET(_radioData, "power") * SEM90_RACK_POWER_MULTIPLIER)); + HASH_SET(_return,"mode",HASH_GET(_channel,"mode")); + HASH_SET(_return,"networkID",HASH_GET(_channel,"networkID")); + HASH_SET(_return,"frequencies",HASH_GET(_channel,"frequencies")); + HASH_SET(_return,"frequencyTX",HASH_GET(_channel,"frequencyTX")); + HASH_SET(_return,"frequencyRX",HASH_GET(_channel,"frequencyRX")); + if (HASH_GET(_radioData,"powerSource") == "VAU") then { + HASH_SET(_return,"power",(HASH_GET(_radioData,"power") * SEM90_RACK_POWER_MULTIPLIER)); } else { - HASH_SET(_return, "power", HASH_GET(_radioData, "power")); + HASH_SET(_return,"power",HASH_GET(_radioData,"power")); }; }; _return diff --git a/addons/sys_sem70/radio/fnc_getChannelDescription.sqf b/addons/sys_sem70/radio/fnc_getChannelDescription.sqf index 62258fdb0..d786d245f 100644 --- a/addons/sys_sem70/radio/fnc_getChannelDescription.sqf +++ b/addons/sys_sem70/radio/fnc_getChannelDescription.sqf @@ -40,7 +40,7 @@ params ["_radioId", "", "", "_radioData"]; -private _manualChannel = HASH_GET(_radioData, "manualChannelSelection"); +private _manualChannel = HASH_GET(_radioData,"manualChannelSelection"); private _hashData = [_radioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); private _description = ""; if (_manualChannel isEqualTo 1) then { diff --git a/addons/sys_sem70/radio/fnc_getCurrentChannelData.sqf b/addons/sys_sem70/radio/fnc_getCurrentChannelData.sqf index b9f7399ee..548597240 100644 --- a/addons/sys_sem70/radio/fnc_getCurrentChannelData.sqf +++ b/addons/sys_sem70/radio/fnc_getCurrentChannelData.sqf @@ -46,9 +46,9 @@ params ["", "", "", "_radioData"]; */ private _channelNumber = HASH_GET(_radioData,"currentChannel"); ISNILS(_channelNumber,0); -private _channels = HASH_GET(_radioData, "channels"); -private _channel = HASHLIST_SELECT(_channels, _channelNumber); -private _manualChannel = HASH_GET(_radioData, "manualChannelSelection"); +private _channels = HASH_GET(_radioData,"channels"); +private _channel = HASHLIST_SELECT(_channels,_channelNumber); +private _manualChannel = HASH_GET(_radioData,"manualChannelSelection"); /* * All needed data from the channel hash can be extracted and * consequently written to the _return hash. @@ -66,27 +66,27 @@ private _manualChannel = HASH_GET(_radioData, "manualChannelSelection"); private _return = HASH_CREATE; if (_manualChannel isEqualTo 1) then { - _channel = HASHLIST_SELECT(_channels, GVAR(manualChannel)); - HASH_SET(_return, "mode", HASH_GET(_channel, "mode")); - HASH_SET(_return, "frequencyTX", HASH_GET(_channel, "frequencyTX")); - HASH_SET(_return, "frequencyRX", HASH_GET(_channel, "frequencyRX")); - HASH_SET(_return, "CTCSSTx", HASH_GET(_radioData, "CTCSS")); - HASH_SET(_return, "CTCSSRx", HASH_GET(_radioData, "CTCSS")); - HASH_SET(_return, "modulation", HASH_GET(_radioData, "modulation")); - HASH_SET(_return, "encryption", HASH_GET(_radioData, "encryption")); - HASH_SET(_return, "power", HASH_GET(_radioData, "power")); - HASH_SET(_return, "squelch", HASH_GET(_radioData, "squelch")); + _channel = HASHLIST_SELECT(_channels,GVAR(manualChannel)); + HASH_SET(_return,"mode",HASH_GET(_channel,"mode")); + HASH_SET(_return,"frequencyTX",HASH_GET(_channel,"frequencyTX")); + HASH_SET(_return,"frequencyRX",HASH_GET(_channel,"frequencyRX")); + HASH_SET(_return,"CTCSSTx",HASH_GET(_radioData,"CTCSS")); + HASH_SET(_return,"CTCSSRx",HASH_GET(_radioData,"CTCSS")); + HASH_SET(_return,"modulation",HASH_GET(_radioData,"modulation")); + HASH_SET(_return,"encryption",HASH_GET(_radioData,"encryption")); + HASH_SET(_return,"power",HASH_GET(_radioData,"power")); + HASH_SET(_return,"squelch",HASH_GET(_radioData,"squelch")); } else { - HASH_SET(_return, "mode", HASH_GET(_channel, "mode")); - HASH_SET(_return, "networkID", HASH_GET(_channel, "networkID")); - HASH_SET(_return, "frequencies", HASH_GET(_channel, "frequencies")); - HASH_SET(_return, "frequencyTX", HASH_GET(_channel, "frequencyTX")); - HASH_SET(_return, "frequencyRX", HASH_GET(_channel, "frequencyRX")); - //HASH_SET(_return, "CTCSSTx", HASH_GET(_radioData, "CTCSS")); - //HASH_SET(_return, "CTCSSRx", HASH_GET(_radioData, "CTCSS")); - //HASH_SET(_return, "modulation", HASH_GET(_radioData, "modulation")); - //HASH_SET(_return, "encryption", HASH_GET(_radioData, "encryption")); - HASH_SET(_return, "power", HASH_GET(_radioData, "power")); - //HASH_SET(_return, "squelch", HASH_GET(_radioData, "squelch")); + HASH_SET(_return,"mode",HASH_GET(_channel,"mode")); + HASH_SET(_return,"networkID",HASH_GET(_channel,"networkID")); + HASH_SET(_return,"frequencies",HASH_GET(_channel,"frequencies")); + HASH_SET(_return,"frequencyTX",HASH_GET(_channel,"frequencyTX")); + HASH_SET(_return,"frequencyRX",HASH_GET(_channel,"frequencyRX")); + //HASH_SET(_return,"CTCSSTx",HASH_GET(_radioData,"CTCSS")); + //HASH_SET(_return,"CTCSSRx",HASH_GET(_radioData,"CTCSS")); + //HASH_SET(_return,"modulation",HASH_GET(_radioData,"modulation")); + //HASH_SET(_return,"encryption",HASH_GET(_radioData,"encryption")); + HASH_SET(_return,"power",HASH_GET(_radioData,"power")); + //HASH_SET(_return,"squelch",HASH_GET(_radioData,"squelch")); }; _return diff --git a/addons/sys_sem70/radio/fnc_getOnOffState.sqf b/addons/sys_sem70/radio/fnc_getOnOffState.sqf index cadd24c43..cdac9a4e7 100644 --- a/addons/sys_sem70/radio/fnc_getOnOffState.sqf +++ b/addons/sys_sem70/radio/fnc_getOnOffState.sqf @@ -41,4 +41,4 @@ params ["", "", "", "_radioData"]; -HASH_GET(_radioData, "radioOn"); +HASH_GET(_radioData,"radioOn"); diff --git a/addons/sys_sem70/radio/fnc_getSpatial.sqf b/addons/sys_sem70/radio/fnc_getSpatial.sqf index 21ffd303d..953eae5e6 100644 --- a/addons/sys_sem70/radio/fnc_getSpatial.sqf +++ b/addons/sys_sem70/radio/fnc_getSpatial.sqf @@ -42,7 +42,7 @@ params ["", "", "", "_radioData"]; -private _spatial = HASH_GET(_radioData, "ACRE_INTERNAL_RADIOSPATIALIZATION"); +private _spatial = HASH_GET(_radioData,"ACRE_INTERNAL_RADIOSPATIALIZATION"); if (!isNil "_spatial") exitWith { _spatial }; 0 diff --git a/addons/sys_sem70/radio/fnc_getState.sqf b/addons/sys_sem70/radio/fnc_getState.sqf index 1008eeef5..477af2cdd 100644 --- a/addons/sys_sem70/radio/fnc_getState.sqf +++ b/addons/sys_sem70/radio/fnc_getState.sqf @@ -42,4 +42,4 @@ params ["", "", "_eventData", "_radioData"]; //TRACE_4("getState",_radioData,_event,_eventData,_radioData); -HASH_GET(_radioData, _eventData); +HASH_GET(_radioData,_eventData); diff --git a/addons/sys_sem70/radio/fnc_handleBeginTransmission.sqf b/addons/sys_sem70/radio/fnc_handleBeginTransmission.sqf index 3ef0e3ae0..60a0f6a7b 100644 --- a/addons/sys_sem70/radio/fnc_handleBeginTransmission.sqf +++ b/addons/sys_sem70/radio/fnc_handleBeginTransmission.sqf @@ -41,6 +41,6 @@ params ["_radioId", "", "", ""]; -SCRATCH_SET(_radioId, "cachedTransmissions", false); +SCRATCH_SET(_radioId,"cachedTransmissions",false); true; diff --git a/addons/sys_sem70/radio/fnc_handleEndTransmission.sqf b/addons/sys_sem70/radio/fnc_handleEndTransmission.sqf index 86201d304..b7b20f7ca 100644 --- a/addons/sys_sem70/radio/fnc_handleEndTransmission.sqf +++ b/addons/sys_sem70/radio/fnc_handleEndTransmission.sqf @@ -43,17 +43,17 @@ params ["_radioId", "", "_eventData"]; _eventData params ["_txId"]; -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); _currentTransmissions = _currentTransmissions - [_txId]; if (_currentTransmissions isEqualTo []) then { - private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped"} && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); }; -SCRATCH_SET(_radioId, "cachedTransmissions", false); +SCRATCH_SET(_radioId,"cachedTransmissions",false); true; diff --git a/addons/sys_sem70/radio/fnc_handleMultipleTransmissions.sqf b/addons/sys_sem70/radio/fnc_handleMultipleTransmissions.sqf index c27f448e1..4bf94a249 100644 --- a/addons/sys_sem70/radio/fnc_handleMultipleTransmissions.sqf +++ b/addons/sys_sem70/radio/fnc_handleMultipleTransmissions.sqf @@ -89,31 +89,31 @@ params ["_radioId", "", "_radios"]; if !([_radioId] call EFUNC(sys_radio,canUnitReceive)) exitWith { [] }; -if (SCRATCH_GET_DEF(_radioId, "PTTDown", false) && {!EGVAR(sys_core,fullDuplex)}) exitWith { [] }; -private _beeped = SCRATCH_GET(_radioId, "hasBeeped"); +if (SCRATCH_GET_DEF(_radioId,"PTTDown",false) && {!EGVAR(sys_core,fullDuplex)}) exitWith { [] }; +private _beeped = SCRATCH_GET(_radioId,"hasBeeped"); private _found = false; private _transmissionsChanged = false; -private _lastSignalTime = SCRATCH_GET_DEF(_radioId, "lastSignalTime", diag_tickTime-2); +private _lastSignalTime = SCRATCH_GET_DEF(_radioId,"lastSignalTime",diag_tickTime-2); if (diag_tickTime - _lastSignalTime > 1) then { - SCRATCH_SET(_radioId, "currentTransmissions", []); + SCRATCH_SET(_radioId,"currentTransmissions",[]); }; -SCRATCH_SET(_radioId, "lastSignalTime", diag_tickTime); +SCRATCH_SET(_radioId,"lastSignalTime",diag_tickTime); -private _currentTransmissions = SCRATCH_GET(_radioId, "currentTransmissions"); +private _currentTransmissions = SCRATCH_GET(_radioId,"currentTransmissions"); if (isNil "_currentTransmissions") then { _currentTransmissions = []; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; private _transmissions = []; private _sortedRadios = []; private _okRadios = []; -private _lastSortTime = SCRATCH_GET_DEF(_radioId, "lastSortTime", diag_tickTime-4); -private _radioCache = SCRATCH_GET_DEF(_radioId, "currentTransmissionRadioCache", []); +private _lastSortTime = SCRATCH_GET_DEF(_radioId,"lastSortTime",diag_tickTime-4); +private _radioCache = SCRATCH_GET_DEF(_radioId,"currentTransmissionRadioCache",[]); // Resort every 3 seconds no matter what. if (diag_tickTime - _lastSortTime > 3) then { @@ -148,15 +148,15 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent"]; if (_signalData isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; - PUSH(_sorted, [ARR_2(_signalPercent,_forEachIndex)]); - PUSH(_transmissions, _txId); + PUSH(_sorted,[ARR_2(_signalPercent,_forEachIndex)]); + PUSH(_transmissions,_txId); } forEach _radios; _sorted sort false; // descending order { - PUSH(_sortedRadios, (_radios select (_x select 1))); + PUSH(_sortedRadios,(_radios select (_x select 1))); } forEach _sorted; } else { - PUSH(_transmissions, ((_radios select 0) select 1)); + PUSH(_transmissions,((_radios select 0) select 1)); if (((_radios select 0) select 2) isEqualTo [0, -992]) then {_areAllRadiosInitialized = false;}; _sortedRadios = _radios; }; @@ -164,59 +164,59 @@ if (_transmissionsChanged) then { private _dif = _transmissions - _currentTransmissions; if (_dif isNotEqualTo []) then { _currentTransmissions = _transmissions; - SCRATCH_SET(_radioId, "currentTransmissions", _currentTransmissions); + SCRATCH_SET(_radioId,"currentTransmissions",_currentTransmissions); }; //implement caching here //cache the results of this codeblock //invalidate cache on start/end transmissions and after a period of time ~1sec - // acre_player sideChat format["c: %1", SCRATCH_GET(_radioId, "cachedTransmissions")]; - if (!SCRATCH_GET(_radioId, "cachedTransmissions") || {diag_tickTime-SCRATCH_GET_DEF(_radioId, "cachedTransmissionsTime", diag_tickTime-3) > 2.5} || {_transmissionsChanged}) then { + // acre_player sideChat format["c: %1", SCRATCH_GET(_radioId,"cachedTransmissions")]; + if (!SCRATCH_GET(_radioId,"cachedTransmissions") || {diag_tickTime-SCRATCH_GET_DEF(_radioId,"cachedTransmissionsTime",diag_tickTime-3) > 2.5} || {_transmissionsChanged}) then { private _radioRxData = [_radioId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); // diag_log text format["%1 NON-CACHED", diag_tickTime]; - if (HASH_GET(_radioRxData, "mode") == "singleChannel") then { + if (HASH_GET(_radioRxData,"mode") == "singleChannel") then { private _hearableTransmissions = []; private _junkTransmissions = []; private _digital = false; { private _txId = _x select 1; private _radioTxData = [_txId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); - if (HASH_GET(_radioRxData, "modulation") == HASH_GET(_radioTxData, "modulation")) then { + if (HASH_GET(_radioRxData,"modulation") == HASH_GET(_radioTxData,"modulation")) then { //diag_log text "MOD OK"; - if (HASH_GET(_radioRxData, "encryption") == 1 && {HASH_GET(_radioTxData, "encryption") == 1}) then { + if (HASH_GET(_radioRxData,"encryption") == 1 && {HASH_GET(_radioTxData,"encryption") == 1}) then { //diag_log text "ENCRYPTED"; - if (HASH_GET(_radioRxData, "TEK") == HASH_GET(_radioTxData, "TEK") && {HASH_GET(_radioRxData, "trafficRate") == HASH_GET(_radioTxData, "trafficRate")} + if (HASH_GET(_radioRxData,"TEK") == HASH_GET(_radioTxData,"TEK") && {HASH_GET(_radioRxData,"trafficRate") == HASH_GET(_radioTxData,"trafficRate")} ) then { //diag_log text "DIGITAL CRYPTO!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); _digital = true; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "encryption") == 0 && {HASH_GET(_radioTxData, "encryption") == 0}) then { + if (HASH_GET(_radioRxData,"encryption") == 0 && {HASH_GET(_radioTxData,"encryption") == 0}) then { //diag_log text "PT!"; - if (HASH_GET(_radioRxData, "modulation") == "FM" || {HASH_GET(_radioRxData, "modulation") == "NB"}) then { + if (HASH_GET(_radioRxData,"modulation") == "FM" || {HASH_GET(_radioRxData,"modulation") == "NB"}) then { //diag_log text "ITS FM BABY!"; - if (HASH_GET(_radioRxData, "CTCSSRx") == HASH_GET(_radioTxData, "CTCSSTx") || {HASH_GET(_radioRxData, "CTCSSRx") == 0}) then { + if (HASH_GET(_radioRxData,"CTCSSRx") == HASH_GET(_radioTxData,"CTCSSTx") || {HASH_GET(_radioRxData,"CTCSSRx") == 0}) then { //diag_log text "THE TONES MATCH!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData, "CTCSSRx"), HASH_GET(_radioTxData, "CTCSSTx")]; - PUSH(_junkTransmissions, _x); + //diag_log text format["NO TONE BONE: %1 == %2", HASH_GET(_radioRxData,"CTCSSRx"),HASH_GET(_radioTxData,"CTCSSTx")]; + PUSH(_junkTransmissions,_x); }; } else { - if (HASH_GET(_radioRxData, "modulation") == "AM") then { + if (HASH_GET(_radioRxData,"modulation") == "AM") then { //diag_log text "AM TALK JUNKIE!"; - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } forEach _sortedRadios; @@ -267,40 +267,40 @@ if (_transmissionsChanged) then { // ToDo: Implement the functionality that a receiving radio is able to transmit on the same frequency if PTT is held within // 4 seconds prior current transmission ends. - if (HASH_GET(_radioRxData, "mode") == "sem70AKW") then { + if (HASH_GET(_radioRxData,"mode") == "sem70AKW") then { private _hearableTransmissions = []; private _junkTransmissions = []; private _digital = false; - private _rxFreqRX = HASH_GET(_radioRxData, "frequencyRX"); + private _rxFreqRX = HASH_GET(_radioRxData,"frequencyRX"); if (isNil "_rxFreqRX" ) then { _rxFreqRX = -1; }; - //private _rxFreqTX = HASH_GET(_radioRxData, "frequencyTX") + //private _rxFreqTX = HASH_GET(_radioRxData,"frequencyTX") { private _txId = _x select 1; private _radioTxData = [_txId, "getCurrentChannelData"] call EFUNC(sys_data,dataEvent); - private _txFreqTX = HASH_GET(_radioTxData, "frequencyTX"); + private _txFreqTX = HASH_GET(_radioTxData,"frequencyTX"); // Check if we have the same networkID - if (HASH_GET(_radioRxData, "networkID") == HASH_GET(_radioTxData, "networkID")) then { + if (HASH_GET(_radioRxData,"networkID") == HASH_GET(_radioTxData,"networkID")) then { // If both frequencies on receiver and transmitter match, go ahead // Otherwise set frequency on receiver if (_rxFreqRX isEqualTo _txFreqTX) then { - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { private _currentChannel = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); - HASH_SET(_radioRxData, "frequencyTX", _txFreqTX); - HASH_SET(_radioRxData, "frequencyRX", _txFreqTX); + HASH_SET(_radioRxData,"frequencyTX",_txFreqTX); + HASH_SET(_radioRxData,"frequencyRX",_txFreqTX); private _success = [_radioId, "setChannelData", [_currentChannel, _radioRxData]] call EFUNC(sys_data,dataEvent); // Will be true if successful // If success then push hearable Transmission if (_success) then { - PUSH(_hearableTransmissions, _x); + PUSH(_hearableTransmissions,_x); } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; }; } else { - PUSH(_junkTransmissions, _x); + PUSH(_junkTransmissions,_x); }; } forEach _sortedRadios; @@ -339,12 +339,12 @@ if (_transmissionsChanged) then { }; }; - SCRATCH_SET(_radioId, "cachedTransmissionsData", +_okRadios); - SCRATCH_SET(_radioId, "cachedTransmissions", true); - SCRATCH_SET(_radioId, "cachedTransmissionsTime", diag_tickTime); + SCRATCH_SET(_radioId,"cachedTransmissionsData",+_okRadios); + SCRATCH_SET(_radioId,"cachedTransmissions",true); + SCRATCH_SET(_radioId,"cachedTransmissionsTime",diag_tickTime); } else { - _okRadios = +SCRATCH_GET(_radioId, "cachedTransmissionsData"); + _okRadios = +SCRATCH_GET(_radioId,"cachedTransmissionsData"); }; if (_okRadios isNotEqualTo []) then { @@ -352,42 +352,42 @@ if (_transmissionsChanged) then { _signalData params ["_signalPercent","_signalDbM"]; private _channelNum = [_radioId, "getCurrentChannel"] call EFUNC(sys_data,dataEvent); private _channels = [_radioId, "getState", "channels"] call EFUNC(sys_data,dataEvent); - private _channel = HASHLIST_SELECT(_channels, _channelNum); + private _channel = HASHLIST_SELECT(_channels,_channelNum); private _squelch = -117; // diag_log text format["squelch: %1 signal: %2", _squelch, _signalDbM]; if (_signalDbM < _squelch) then { _okRadios = []; - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped"} && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); } else { if (isNil "_beeped" || {!_beeped}) then { //diag_log "BEEP!"; - SCRATCH_SET(_radioId, "hasBeeped", true); + SCRATCH_SET(_radioId,"hasBeeped",true); private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOn", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; }; } else { - private _pttDown = SCRATCH_GET_DEF(_radioId, "PTTDown", false); + private _pttDown = SCRATCH_GET_DEF(_radioId,"PTTDown",false); if (!_pttDown && {!isNil "_beeped"} && {_beeped}) then { private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0,0,0], [0,1,0], _volume] call EFUNC(sys_radio,playRadioSound); }; - SCRATCH_SET(_radioId, "hasBeeped", false); + SCRATCH_SET(_radioId,"hasBeeped",false); }; // Cache it - SCRATCH_SET(_radioId, "currentTransmissionRadioCache", _okRadios); + SCRATCH_SET(_radioId,"currentTransmissionRadioCache",_okRadios); //Force a recalculation if data is not ready if (_areAllRadiosInitialized) then { - SCRATCH_SET(_radioId, "lastSortTime", diag_tickTime); + SCRATCH_SET(_radioId,"lastSortTime",diag_tickTime); } else { - SCRATCH_SET(_radioId, "lastSortTime", -4); + SCRATCH_SET(_radioId,"lastSortTime",-4); }; } else { _okRadios = _radioCache; diff --git a/addons/sys_sem70/radio/fnc_handlePTTDown.sqf b/addons/sys_sem70/radio/fnc_handlePTTDown.sqf index 5d0458d76..aaa62208d 100644 --- a/addons/sys_sem70/radio/fnc_handlePTTDown.sqf +++ b/addons/sys_sem70/radio/fnc_handlePTTDown.sqf @@ -53,20 +53,20 @@ if !([_radioId] call EFUNC(sys_radio,canUnitTransmit)) exitWith {false}; private _manualChannelSelection = [_radioId, "getState", "manualChannelSelection"] call EFUNC(sys_data,dataEvent); if (_manualChannelSelection != 1) then { - private _currentChannel = HASH_GET(_radioData, "currentChannel"); - private _channels = HASH_GET(_radioData, "channels"); - private _channel = HASHLIST_SELECT(_channels, _currentChannel); + private _currentChannel = HASH_GET(_radioData,"currentChannel"); + private _channels = HASH_GET(_radioData,"channels"); + private _channel = HASHLIST_SELECT(_channels,_currentChannel); private _frequencies = HASH_GET(_channel,"frequencies"); private _frequency = _frequencies call BIS_fnc_selectRandom; - HASH_SET(_channel, "frequencyTX", _frequency); - HASH_SET(_channel, "frequencyRX", _frequency); + HASH_SET(_channel,"frequencyTX",_frequency); + HASH_SET(_channel,"frequencyRX",_frequency); [_radioId, "setChannelData", [_currentChannel, _channel]] call EFUNC(sys_data,dataEvent); }; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericBeep", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", true); +SCRATCH_SET(_radioId,"PTTDown",true); true diff --git a/addons/sys_sem70/radio/fnc_handlePTTUp.sqf b/addons/sys_sem70/radio/fnc_handlePTTUp.sqf index 84cc6bebe..5a56050de 100644 --- a/addons/sys_sem70/radio/fnc_handlePTTUp.sqf +++ b/addons/sys_sem70/radio/fnc_handlePTTUp.sqf @@ -51,5 +51,5 @@ params ["_radioId"]; private _volume = [_radioId, "getVolume"] call EFUNC(sys_data,dataEvent); [_radioId, "Acre_GenericClickOff", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound); -SCRATCH_SET(_radioId, "PTTDown", false); +SCRATCH_SET(_radioId,"PTTDown",false); true; diff --git a/addons/sys_sem70/radio/fnc_initializeRadio.sqf b/addons/sys_sem70/radio/fnc_initializeRadio.sqf index 1a816d09d..6d0f40724 100644 --- a/addons/sys_sem70/radio/fnc_initializeRadio.sqf +++ b/addons/sys_sem70/radio/fnc_initializeRadio.sqf @@ -43,7 +43,7 @@ * nil */ -TRACE_1("INITIALIZING ACRE_SEM70", _this); +TRACE_1("INITIALIZING ACRE_SEM70",_this); params ["_radioId", "", "_eventData", "_radioData"]; @@ -62,7 +62,7 @@ _eventData params ["_baseName", "_preset"]; private _presetData = [_baseName, _preset] call EFUNC(sys_data,getPresetData); private _channels = HASH_GET(_presetData,"channels"); -SCRATCH_SET(_radioId, "currentTransmissions", []); +SCRATCH_SET(_radioId,"currentTransmissions",[]); private _currentChannels = HASH_GET(_radioData,"channels"); if (isNil "_currentChannels") then { @@ -72,8 +72,8 @@ if (isNil "_currentChannels") then { for "_i" from 0 to (count _channels)-1 do { private _channelData = HASH_COPY(_channels select _i); - TRACE_1("Setting " + QUOTE(RADIONAME) + " Init Channel Data", _channelData); - PUSH(_currentChannels, _channelData); + TRACE_1("Setting " + QUOTE(RADIONAME) + " Init Channel Data",_channelData); + PUSH(_currentChannels,_channelData); }; @@ -82,8 +82,8 @@ HASH_SET(_radioData,"radioOn",1); HASH_SET(_radioData,"volume",EGVAR(sys_core,defaultRadioVolume)); HASH_SET(_radioData,"currentChannel",GVAR(manualChannel)); // Manual Channel //HASH_SET(_radioData,"lastActiveChannel",GVAR(manualChannel)); -HASH_SET(_radioData,"audioPath", "HEADSET"); -HASH_SET(_radioData,"powerSource", "BAT"); +HASH_SET(_radioData,"audioPath","HEADSET"); +HASH_SET(_radioData,"powerSource","BAT"); // Channel //HASH_SET(_radioData,"mode","singleChannel"); // or "sem70AKW" @@ -101,7 +101,7 @@ HASH_SET(_radioData,"squelch",0); HASH_SET(_radioData,"mainKnobPosition",2); // High Power Setting HASH_SET(_radioData,"functionKnobPosition",2); // Manual Frequency Selection (no Relais) HASH_SET(_radioData,"volumeKnobPosition",EGVAR(sys_core,defaultRadioVolume) * 5); -HASH_SET(_radioData,"channelSpacingKnobPosition", 1); // 0-3 +HASH_SET(_radioData,"channelSpacingKnobPosition",1); // 0-3 HASH_SET(_radioData,"kHzKnobPosition",0); HASH_SET(_radioData,"MHzKnobPosition",0); HASH_SET(_radioData,"MemorySlotKnobPosition",0); diff --git a/addons/sys_sem70/radio/fnc_isExternalAudio.sqf b/addons/sys_sem70/radio/fnc_isExternalAudio.sqf index 632a31153..4113f0b47 100644 --- a/addons/sys_sem70/radio/fnc_isExternalAudio.sqf +++ b/addons/sys_sem70/radio/fnc_isExternalAudio.sqf @@ -42,4 +42,4 @@ params ["", "", "", "_radioData"]; -HASH_GET(_radioData, "audioPath") == "INTSPEAKER" +HASH_GET(_radioData,"audioPath") == "INTSPEAKER" diff --git a/addons/sys_sem70/radio/fnc_setChannelData.sqf b/addons/sys_sem70/radio/fnc_setChannelData.sqf index 9d9ca599a..1116d56c7 100644 --- a/addons/sys_sem70/radio/fnc_setChannelData.sqf +++ b/addons/sys_sem70/radio/fnc_setChannelData.sqf @@ -46,8 +46,8 @@ params ["", "", "_eventData", "_radioData"]; TRACE_1("",_this); -private _channels = HASH_GET(_radioData, "channels"); +private _channels = HASH_GET(_radioData,"channels"); -HASHLIST_SET(_channels, (_eventData select 0), (_eventData select 1)); +HASHLIST_SET(_channels,(_eventData select 0),(_eventData select 1)); true diff --git a/addons/sys_sem70/radio/fnc_setCurrentChannel.sqf b/addons/sys_sem70/radio/fnc_setCurrentChannel.sqf index c2c60dfaa..80e80b9d0 100644 --- a/addons/sys_sem70/radio/fnc_setCurrentChannel.sqf +++ b/addons/sys_sem70/radio/fnc_setCurrentChannel.sqf @@ -40,21 +40,21 @@ params ["_radioId", "", "_eventData", "_radioData"]; TRACE_2("setCurrentChannel",_radioID,_eventData); -private _manualChannel = HASH_GET(_radioData, "manualChannelSelection"); +private _manualChannel = HASH_GET(_radioData,"manualChannelSelection"); TRACE_1("ManualChannel",_manualChannel); if (_manualChannel isEqualTo 1) then { - private _currentMHzFrequency = HASH_GET(_radioData, "MHzKnobPosition"); + private _currentMHzFrequency = HASH_GET(_radioData,"MHzKnobPosition"); _currentMHzFrequency = _currentMHzFrequency + 30; - private _currentkHzFrequency = HASH_GET(_radioData, "kHzKnobPosition"); + private _currentkHzFrequency = HASH_GET(_radioData,"kHzKnobPosition"); _currentkHzFrequency = _currentkHzFrequency * 25 / 1000; private _newFreq = _currentMHzFrequency + _currentkHzFrequency; - private _channels = HASH_GET(_radioData, "channels"); - private _channel = HASHLIST_SELECT(_channels, GVAR(manualChannel)); + private _channels = HASH_GET(_radioData,"channels"); + private _channel = HASHLIST_SELECT(_channels,GVAR(manualChannel)); - HASH_SET(_channel, "frequencyTX", _newFreq); - HASH_SET(_channel, "frequencyRX", _newFreq); + HASH_SET(_channel,"frequencyTX",_newFreq); + HASH_SET(_channel,"frequencyRX",_newFreq); TRACE_3("",_currentMHzFrequency,_currentkHzFrequency,_newFreq); [_radioID,"setChannelData", [GVAR(manualChannel), _channel]] call EFUNC(sys_data,dataEvent); @@ -62,7 +62,7 @@ if (_manualChannel isEqualTo 1) then { HASH_SET(_radioData,"currentChannel",GVAR(manualChannel)); } else { // First, we check how many channels are available in total - private _channelCount = count (HASH_GET(_radioData, "channels")) - 1; + private _channelCount = count (HASH_GET(_radioData,"channels")) - 1; // Then we define our upper and lower limits // And write the new channel to the radioData hash diff --git a/addons/sys_sem70/radio/fnc_setOnOffState.sqf b/addons/sys_sem70/radio/fnc_setOnOffState.sqf index ed0a58b8e..9ed544f6e 100644 --- a/addons/sys_sem70/radio/fnc_setOnOffState.sqf +++ b/addons/sys_sem70/radio/fnc_setOnOffState.sqf @@ -41,7 +41,7 @@ params ["_radioId", "", "_eventData", "_radioData"]; -HASH_SET(_radioData, "radioOn", _eventData); +HASH_SET(_radioData,"radioOn",_eventData); if (_radioId == acre_sys_radio_currentRadioDialog) then { if (_eventData isEqualTo 0) then { diff --git a/addons/sys_sem70/radio/fnc_setState.sqf b/addons/sys_sem70/radio/fnc_setState.sqf index 04162e39f..d3de2f09a 100644 --- a/addons/sys_sem70/radio/fnc_setState.sqf +++ b/addons/sys_sem70/radio/fnc_setState.sqf @@ -40,4 +40,4 @@ params ["", "", "_eventData", "_radioData"]; -HASH_SET(_radioData, _eventData param [0], _eventData param [1]); +HASH_SET(_radioData,_eventData param [0],_eventData param [1]); diff --git a/addons/sys_sem70/radio/fnc_setVolume.sqf b/addons/sys_sem70/radio/fnc_setVolume.sqf index 7062bc383..2b1b85c85 100644 --- a/addons/sys_sem70/radio/fnc_setVolume.sqf +++ b/addons/sys_sem70/radio/fnc_setVolume.sqf @@ -51,5 +51,5 @@ params ["", "", "_eventData", "_radioData"]; private _vol = _eventData; -HASH_SET(_radioData, "volume", _eventData); -//TRACE_3("VOLUME SET",_radioId, _vol, _radioData); +HASH_SET(_radioData,"volume",_eventData); +//TRACE_3("VOLUME SET",_radioId,_vol,_radioData); diff --git a/addons/sys_server/fnc_acknowledgeId.sqf b/addons/sys_server/fnc_acknowledgeId.sqf index a612137df..ba6a04a10 100644 --- a/addons/sys_server/fnc_acknowledgeId.sqf +++ b/addons/sys_server/fnc_acknowledgeId.sqf @@ -25,12 +25,12 @@ if (_index != -1) then { private _fnc = { _class = _this; GVAR(unacknowledgedIds) deleteAt (GVAR(unacknowledgedIds) find _class); - HASH_REM(GVAR(unacknowledgedTable), _class); + HASH_REM(GVAR(unacknowledgedTable),_class); }; [_fnc, _class] call CBA_fnc_execNextFrame; } else { GVAR(unacknowledgedIds) deleteAt _index; - HASH_REM(GVAR(unacknowledgedTable), _class); + HASH_REM(GVAR(unacknowledgedTable),_class); }; } else { WARNING_2("%1 attempted to acknowledge ID %2 which was not awaiting acknowledgement",_player,_class); diff --git a/addons/sys_server/fnc_clientGCRadio.sqf b/addons/sys_server/fnc_clientGCRadio.sqf index 6b0d7f438..42d0dd961 100644 --- a/addons/sys_server/fnc_clientGCRadio.sqf +++ b/addons/sys_server/fnc_clientGCRadio.sqf @@ -27,8 +27,8 @@ if ((toLower _radioId) in _radioList) then { [QGVAR(invalidGarbageCollect), [profileName, _radioId]] call CALLSTACK(CBA_fnc_serverEvent); }; -HASH_SET(EGVAR(sys_data,radioData), _radioId, nil); -if (HASH_HASKEY(EGVAR(sys_data,radioScratchData), _radioId)) then { - HASH_REM(EGVAR(sys_data,radioScratchData), _radioId); +HASH_SET(EGVAR(sys_data,radioData),_radioId,nil); +if (HASH_HASKEY(EGVAR(sys_data,radioScratchData),_radioId)) then { + HASH_REM(EGVAR(sys_data,radioScratchData),_radioId); }; -HASH_REM(GVAR(objectIdRelationTable), _radioId); +HASH_REM(GVAR(objectIdRelationTable),_radioId); diff --git a/addons/sys_server/fnc_collect.sqf b/addons/sys_server/fnc_collect.sqf index f57e295d3..b39fd86e2 100644 --- a/addons/sys_server/fnc_collect.sqf +++ b/addons/sys_server/fnc_collect.sqf @@ -33,7 +33,7 @@ if (_keyIndex != -1) then { GVAR(masterIdList) deleteAt (GVAR(masterIdList) find _radioId); HASH_REM(GVAR(markedForGC),_radioId); [QGVAR(clientGCRadio), [_radioId]] call CALLSTACK(CBA_fnc_globalEvent); - HASH_SET(EGVAR(sys_data,radioData), _radioId, nil); + HASH_SET(EGVAR(sys_data,radioData),_radioId,nil); } else { WARNING_1("A unique radio of a never initialized base class was attempted to be collected! Possible gear script issue on radio: %1!",_baseRadio); }; diff --git a/addons/sys_server/fnc_doAddComponentCargo.sqf b/addons/sys_server/fnc_doAddComponentCargo.sqf index 7bb733f47..81fd46edd 100644 --- a/addons/sys_server/fnc_doAddComponentCargo.sqf +++ b/addons/sys_server/fnc_doAddComponentCargo.sqf @@ -30,8 +30,8 @@ if (_hasUnique) then { private _dataHash = HASH_CREATE; HASH_SET(EGVAR(sys_data,radioData),_uniqueComponent,_dataHash); GVAR(unacknowledgedIds) pushBack _uniqueComponent; - HASH_SET(GVAR(unacknowledgedTable), _uniqueComponent, time); - HASH_SET(GVAR(masterIdTable), _uniqueComponent, [ARR_2(_container,_container)]); + HASH_SET(GVAR(unacknowledgedTable),_uniqueComponent,time); + HASH_SET(GVAR(masterIdTable),_uniqueComponent,[ARR_2(_container,_container)]); _container addItemCargoGlobal [_uniqueComponent, 1]; [_uniqueComponent, "initializeComponent", [_type, _preset]] call EFUNC(sys_data,dataEvent); if (_callBack != "") then { diff --git a/addons/sys_server/fnc_masterIdTracker.sqf b/addons/sys_server/fnc_masterIdTracker.sqf index a1709bc85..36ac1e29e 100644 --- a/addons/sys_server/fnc_masterIdTracker.sqf +++ b/addons/sys_server/fnc_masterIdTracker.sqf @@ -15,7 +15,7 @@ * Public: No */ -TRACE_1("Enter", ""); +TRACE_1("Enter",""); if (diag_tickTime > GVAR(nextSearchTime)) then { GVAR(doFullSearch) = true; @@ -27,7 +27,7 @@ if (!GVAR(doFullSearch)) then { private _shortSearchList = HASH_KEYS(GVAR(masterIdTable))-GVAR(unacknowledgedIds); { private _uniqueId = _x; - private _mainObject = HASH_GET(GVAR(masterIdTable), _uniqueId) select 0; + private _mainObject = HASH_GET(GVAR(masterIdTable),_uniqueId) select 0; // diag_log text format["main object: %1", _mainObject]; if (isNil "_mainObject") exitWith { GVAR(doFullSearch) = true; }; private _objects = [_mainObject]; @@ -59,11 +59,11 @@ if (!GVAR(doFullSearch)) then { } forEach _shortSearchList; }; -TRACE_2("Enter masterIdTracker", GVAR(doFullSearch), GVAR(nextSearchTime) ); +TRACE_2("Enter masterIdTracker",GVAR(doFullSearch),GVAR(nextSearchTime)); if (GVAR(doFullSearch)) then { GVAR(doFullSearch) = false; - TRACE_1("Spawned master container search", ""); + TRACE_1("Spawned master container search",""); private _idTable = HASH_CREATE; private _idList = []; @@ -94,13 +94,13 @@ if (GVAR(doFullSearch)) then { { private _item = _x; if (_idList pushBackUnique _item != -1) then { // Add to ID list and this condition returns true if it was not present in the _idList. - HASH_SET(_idTable, _item, [ARR_2(_mainObject,_object)]); + HASH_SET(_idTable,_item,[ARR_2(_mainObject,_object)]); } else { // Already present in _idList private _duplicateIdList = []; - if (!HASH_HASKEY(_duplicateIdTable, _item)) then { - HASH_SET(_duplicateIdTable, _item, _duplicateIdList); + if (!HASH_HASKEY(_duplicateIdTable,_item)) then { + HASH_SET(_duplicateIdTable,_item,_duplicateIdList); } else { - _duplicateIdList = HASH_GET(_duplicateIdTable, _item); + _duplicateIdList = HASH_GET(_duplicateIdTable,_item); }; _duplicateIdList pushBack [_mainObject, _object]; }; @@ -119,13 +119,13 @@ if (GVAR(doFullSearch)) then { } else { _mainObject = _vehicle; if (_idList pushBackUnique _rackId != -1) then { // Add to ID list and this condition returns true if it was not present in the _idList. - HASH_SET(_idTable, _rackId, [ARR_2(_mainObject,_x)]); + HASH_SET(_idTable,_rackId,[ARR_2(_mainObject,_x)]); } else { // Already present in _idList private _duplicateIdList = []; - if (!HASH_HASKEY(_duplicateIdTable, _rackId)) then { - HASH_SET(_duplicateIdTable, _rackId, _duplicateIdList); + if (!HASH_HASKEY(_duplicateIdTable,_rackId)) then { + HASH_SET(_duplicateIdTable,_rackId,_duplicateIdList); } else { - _duplicateIdList = HASH_GET(_duplicateIdTable, _rackId); + _duplicateIdList = HASH_GET(_duplicateIdTable,_rackId); }; _duplicateIdList pushBack [_mainObject, _x]; }; @@ -134,13 +134,13 @@ if (GVAR(doFullSearch)) then { if (_mountedRadio != "") then { // Radio is mounted. if (getNumber (_cfgWeapons >> _mountedRadio >> "acre_isUnique") == 1) then { if (_idList pushBackUnique _mountedRadio != -1) then { // Add to ID list and this condition returns true if it was not present in the _idList. - HASH_SET(_idTable, _mountedRadio, [ARR_2(_mainObject,_x)]); + HASH_SET(_idTable,_mountedRadio,[ARR_2(_mainObject,_x)]); } else { // Already present in _idList private _duplicateIdList = []; - if (!HASH_HASKEY(_duplicateIdTable, _mountedRadio)) then { - HASH_SET(_duplicateIdTable, _mountedRadio, _duplicateIdList); + if (!HASH_HASKEY(_duplicateIdTable,_mountedRadio)) then { + HASH_SET(_duplicateIdTable,_mountedRadio,_duplicateIdList); } else { - _duplicateIdList = HASH_GET(_duplicateIdTable, _mountedRadio); + _duplicateIdList = HASH_GET(_duplicateIdTable,_mountedRadio); }; _duplicateIdList pushBack [_mainObject, _x]; }; @@ -152,8 +152,8 @@ if (GVAR(doFullSearch)) then { { private _key = _x; - if (HASH_HASKEY(GVAR(masterIdTable), _key)) then { - HASH_SET(_idTable, _key, HASH_GET(GVAR(masterIdTable), _key)); + if (HASH_HASKEY(GVAR(masterIdTable),_key)) then { + HASH_SET(_idTable,_key,HASH_GET(GVAR(masterIdTable),_key)); } else { private _time = HASH_GET(GVAR(unacknowledgedTable),_key); @@ -167,7 +167,7 @@ if (GVAR(doFullSearch)) then { WARNING_1("Releasing unacknowledged key (%1)",_key); GVAR(unacknowledgedIds) deleteAt (GVAR(unacknowledgedIds) find _key); GVAR(masterIdList) deleteAt (GVAR(masterIdList) find _key); - HASH_REM(GVAR(unacknowledgedTable), _key); + HASH_REM(GVAR(unacknowledgedTable),_key); private _baseRadio = [_key] call EFUNC(sys_radio,getRadioBaseClassname); private _idNumber = getNumber (configFile >> "CfgWeapons" >> _key >> "acre_uniqueId"); @@ -184,8 +184,8 @@ if (GVAR(doFullSearch)) then { { private _key = _x; - private _duplicates = HASH_GET(_duplicateIdTable, _key); - private _firstFound = HASH_GET(_idTable, _key); + private _duplicates = HASH_GET(_duplicateIdTable,_key); + private _firstFound = HASH_GET(_idTable,_key); private _players = allPlayers; // firstFound is always a player if a player has the item. @@ -219,17 +219,17 @@ if (GVAR(doFullSearch)) then { if (time > _timeMessage + 20 && {time > _timeGC + 20}) then { // GC #ifdef DEBUG_MODE_FULL acre_player sideChat "Collecting Unaccounted"; - TRACE_1("Collecting", _radio); + TRACE_1("Collecting",_radio); #endif [_radio] call FUNC(collect); } else { - HASH_SET(_idTable, _radio, [ARR_2(_object,_object)]); + HASH_SET(_idTable,_radio,[ARR_2(_object,_object)]); }; } else { [_radio] call FUNC(sendIntentToGarbageCollect); // Act as if nothing has happened just yet. - if (HASH_HASKEY(GVAR(masterIdTable), _radio)) then { - HASH_SET(_idTable, _radio, HASH_GET(GVAR(masterIdTable), _radio)); + if (HASH_HASKEY(GVAR(masterIdTable),_radio)) then { + HASH_SET(_idTable,_radio,HASH_GET(GVAR(masterIdTable),_radio)); }; }; } forEach _unaccountedForIds; @@ -237,10 +237,10 @@ if (GVAR(doFullSearch)) then { private _toUpdate = []; { private _key = _x; - private _value = HASH_GET(_idTable, _key); + private _value = HASH_GET(_idTable,_key); - if (HASH_HASKEY(GVAR(masterIdTable), _key)) then { - private _currentEntry = HASH_GET(GVAR(masterIdTable), _key); + if (HASH_HASKEY(GVAR(masterIdTable),_key)) then { + private _currentEntry = HASH_GET(GVAR(masterIdTable),_key); if (_value isNotEqualTo _currentEntry) then { _toUpdate pushBack [_key, _value]; }; @@ -255,7 +255,7 @@ if (GVAR(doFullSearch)) then { if (_toUpdate isNotEqualTo []) then { #ifdef DEBUG_MODE_FULL - TRACE_1("calling updateIdObjects", _toUpdate); + TRACE_1("calling updateIdObjects",_toUpdate); acre_player sideChat "Calling updateIdObjects"; #endif ["acre_updateIdObjects", _toUpdate] call CALLSTACK(CBA_fnc_globalEvent); @@ -263,7 +263,7 @@ if (GVAR(doFullSearch)) then { GVAR(masterIdTable) = _idTable; GVAR(nextSearchTime) = diag_tickTime + 10; - TRACE_1("COMPLETE crate search", GVAR(nextSearchTime)); + TRACE_1("COMPLETE crate search",GVAR(nextSearchTime)); }; //private _end = diag_tickTime; diff --git a/addons/sys_server/fnc_onGetRadioId.sqf b/addons/sys_server/fnc_onGetRadioId.sqf index e28247278..4e8f42a1f 100644 --- a/addons/sys_server/fnc_onGetRadioId.sqf +++ b/addons/sys_server/fnc_onGetRadioId.sqf @@ -33,14 +33,14 @@ if (_ret != -1) then { if (isServer) then { private _dataHash = HASH_CREATE; if (_replacementId != "") then { - _dataHash = HASH_COPY(HASH_GET(EGVAR(sys_data,radioData), _replacementId)); + _dataHash = HASH_COPY(HASH_GET(EGVAR(sys_data,radioData),_replacementId)); }; HASH_SET(EGVAR(sys_data,radioData),_uniqueClass,_dataHash); }; - TRACE_1("callback=", _callback); + TRACE_1("callback=",_callback); GVAR(unacknowledgedIds) pushBack _uniqueClass; - HASH_SET(GVAR(unacknowledgedTable), _uniqueClass, time); - HASH_SET(GVAR(masterIdTable), _uniqueClass, [ARR_2(acre_player,acre_player)]); + HASH_SET(GVAR(unacknowledgedTable),_uniqueClass,time); + HASH_SET(GVAR(masterIdTable),_uniqueClass,[ARR_2(acre_player,acre_player)]); [_callback, [_entity, _uniqueClass, _ret, _replacementId]] call CALLSTACK(CBA_fnc_globalEvent); // GVAR(waitingForIdAck) = true; }; diff --git a/addons/sys_server/fnc_sendIntentToGarbageCollect.sqf b/addons/sys_server/fnc_sendIntentToGarbageCollect.sqf index f576a3b69..026dd1b33 100644 --- a/addons/sys_server/fnc_sendIntentToGarbageCollect.sqf +++ b/addons/sys_server/fnc_sendIntentToGarbageCollect.sqf @@ -20,7 +20,7 @@ params ["_radioId"]; _radioId = toLower _radioId; private _object = objNull; -private _idTableEntry = HASH_GET(GVAR(masterIdTable), _radioId); +private _idTableEntry = HASH_GET(GVAR(masterIdTable),_radioId); if (!isNil "_idTableEntry") then { _object = _idTableEntry select 0; }; private _value = [-10, time, _object]; diff --git a/addons/sys_server/fnc_updateIdObjects.sqf b/addons/sys_server/fnc_updateIdObjects.sqf index b3cc38bb4..0a3208c35 100644 --- a/addons/sys_server/fnc_updateIdObjects.sqf +++ b/addons/sys_server/fnc_updateIdObjects.sqf @@ -18,7 +18,7 @@ private _update = _this; if (ACRE_DATA_SYNCED) then { { - HASH_SET(GVAR(objectIdRelationTable), _x select 0, _x select 1); + HASH_SET(GVAR(objectIdRelationTable),_x select 0,_x select 1); } forEach _update; } else { GVAR(pendingIdRelationUpdates) pushBack _update; diff --git a/addons/sys_signalmap/fnc_doProcess.sqf b/addons/sys_signalmap/fnc_doProcess.sqf index 51697fe76..4e623cb9b 100644 --- a/addons/sys_signalmap/fnc_doProcess.sqf +++ b/addons/sys_signalmap/fnc_doProcess.sqf @@ -79,25 +79,25 @@ with uiNamespace do { ctrlSetFocus GVAR(overlayMessageGrp); private ["_bg"]; - CTRLOVERLAY(_bg, "RscBackground"); + CTRLOVERLAY(_bg,"RscBackground"); _bg ctrlSetPosition [0, 0, 0.5, 0.75]; _bg ctrlCommit 0; - CTRLOVERLAY(GVAR(chunkProgressText), "RscStructuredText"); + CTRLOVERLAY(GVAR(chunkProgressText),"RscStructuredText"); GVAR(chunkProgressText) ctrlSetPosition [0.0, 0.25, 0.5, 0.045]; GVAR(chunkProgressText) ctrlCommit 0; - CTRLOVERLAY(GVAR(progressBar), "RscProgress"); + CTRLOVERLAY(GVAR(progressBar),"RscProgress"); GVAR(progressBar) ctrlSetPosition [0.025, 0.3, 0.45, 0.045]; GVAR(progressBar) ctrlCommit 0; GVAR(progressBar) progressSetPosition 0; - CTRLOVERLAY(GVAR(areaProgressText), "RscStructuredText"); + CTRLOVERLAY(GVAR(areaProgressText),"RscStructuredText"); GVAR(areaProgressText) ctrlSetPosition [0.0, 0.35, 0.5, 0.045]; GVAR(areaProgressText) ctrlSetStructuredText (parseText format["Processing Area: %1 of %2", GVAR(areaProgress)+1, (count GVAR(rxAreas))]); GVAR(areaProgressText) ctrlCommit 0; - CTRLOVERLAY(GVAR(progressBarArea), "RscProgress"); + CTRLOVERLAY(GVAR(progressBarArea),"RscProgress"); GVAR(progressBarArea) ctrlSetPosition [0.025, 0.4, 0.45, 0.045]; GVAR(progressBarArea) ctrlCommit 0; GVAR(progressBarArea) progressSetPosition 0; @@ -176,14 +176,14 @@ with uiNamespace do { { (_x select 1) setMarkerAlphaLocal 0; } forEach GVAR(rxAreas); - CTRLOVERLAY(GVAR(modifyButton), "RscButton"); + CTRLOVERLAY(GVAR(modifyButton),"RscButton"); GVAR(modifyButton) ctrlSetPosition [0.05, 0.055*10, 0.4, 0.045]; GVAR(modifyButton) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(modifyButton) ctrlSetText "Modify"; GVAR(modifyButton) ctrlSetEventHandler ["MouseButtonUp", QUOTE([] call FUNC(modify))]; GVAR(modifyButton) ctrlCommit 0; - CTRLOVERLAY(GVAR(clearButton), "RscButton"); + CTRLOVERLAY(GVAR(clearButton),"RscButton"); GVAR(clearButton) ctrlSetPosition [0.05, 0.055*11, 0.4, 0.045]; GVAR(clearButton) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(clearButton) ctrlSetText "Clear"; diff --git a/addons/sys_signalmap/fnc_drawMenu.sqf b/addons/sys_signalmap/fnc_drawMenu.sqf index 1371e285e..2946c6dbc 100644 --- a/addons/sys_signalmap/fnc_drawMenu.sqf +++ b/addons/sys_signalmap/fnc_drawMenu.sqf @@ -56,14 +56,14 @@ with uiNamespace do { GVAR(ctrlGroup) ctrlCommit 0; private ["_background"]; - CTRL(_background, "RscBackground"); + CTRL(_background,"RscBackground"); //_background ctrlSetBackgroundColor [0.8,0.75,0.35,0.75]; _background ctrlSetPosition [0, 0, 0.5, 0.75]; _background ctrlCommit 0; - CTRL(GVAR(txAntennaListBox), "RscCombo"); + CTRL(GVAR(txAntennaListBox),"RscCombo"); GVAR(txAntennaListBox) ctrlSetPosition [0.15, 0, 0.35, 0.045]; private _components = configFile >> "CfgAcreComponents"; @@ -84,37 +84,37 @@ with uiNamespace do { GVAR(txAntennaListBox) ctrlCommit 0; private ["_txAntText"]; - CTRL(_txAntText, "RscText"); + CTRL(_txAntText,"RscText"); _txAntText ctrlSetPosition [0.0, 0, 0.35, 0.045]; _txAntText ctrlSetText "Tx Antenna: "; _txAntText ctrlCommit 0; - CTRL(GVAR(txHeight), "RscEdit"); + CTRL(GVAR(txHeight),"RscEdit"); GVAR(txHeight) ctrlSetPosition [0.15, 0.055, 0.1, 0.045]; GVAR(txHeight) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(txHeight) ctrlSetText str (uiNamespace getVariable [QGVAR(txHeightValue), 2]); GVAR(txHeight) ctrlCommit 0; private ["_txHeightTxt"]; - CTRL(_txHeightTxt, "RscText"); + CTRL(_txHeightTxt,"RscText"); _txHeightTxt ctrlSetPosition [0.0, 0.055, 0.35, 0.045]; _txHeightTxt ctrlSetText "Tx Height: "; _txHeightTxt ctrlCommit 0; - CTRL(GVAR(txDir), "RscEdit"); + CTRL(GVAR(txDir),"RscEdit"); GVAR(txDir) ctrlSetPosition [0.35, 0.055, 0.1, 0.045]; GVAR(txDir) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(txDir) ctrlSetText str (uiNamespace getVariable [QGVAR(txDirValue), 0]); GVAR(txDir) ctrlCommit 0; private ["_txDirTxt"]; - CTRL(_txDirTxt, "RscText"); + CTRL(_txDirTxt,"RscText"); _txDirTxt ctrlSetPosition [0.26, 0.055, 0.35, 0.045]; _txDirTxt ctrlSetText "Tx Dir: "; _txDirTxt ctrlCommit 0; - CTRL(GVAR(rxAntennaListBox), "RscCombo"); + CTRL(GVAR(rxAntennaListBox),"RscCombo"); GVAR(rxAntennaListBox) ctrlSetPosition [0.15, 0.055*2, 0.35, 0.045]; _components = configFile >> "CfgAcreComponents"; @@ -134,125 +134,125 @@ with uiNamespace do { GVAR(rxAntennaListBox) ctrlCommit 0; private ["_rxAntText"]; - CTRL(_rxAntText, "RscText"); + CTRL(_rxAntText,"RscText"); _rxAntText ctrlSetPosition [0.0, 0.055*2, 0.35, 0.045]; _rxAntText ctrlSetText "Rx Antenna: "; _rxAntText ctrlCommit 0; - CTRL(GVAR(rxHeight), "RscEdit"); + CTRL(GVAR(rxHeight),"RscEdit"); GVAR(rxHeight) ctrlSetPosition [0.15, 0.055*3, 0.1, 0.045]; GVAR(rxHeight) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(rxHeight) ctrlSetText str (uiNamespace getVariable [QGVAR(rxHeightValue), 2]); GVAR(rxHeight) ctrlCommit 0; private ["_rxHeightTxt"]; - CTRL(_rxHeightTxt, "RscText"); + CTRL(_rxHeightTxt,"RscText"); _rxHeightTxt ctrlSetPosition [0.0, 0.055*3, 0.35, 0.045]; _rxHeightTxt ctrlSetText "Rx Height: "; _rxHeightTxt ctrlCommit 0; - CTRL(GVAR(sampleSize), "RscEdit"); + CTRL(GVAR(sampleSize),"RscEdit"); GVAR(sampleSize) ctrlSetPosition [0.42, 0.055*3, 0.07, 0.045]; GVAR(sampleSize) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(sampleSize) ctrlSetText str (uiNamespace getVariable [QGVAR(sampleSizeValue), 50]); GVAR(sampleSize) ctrlCommit 0; private ["_txSampleSizeTxt"]; - CTRL(_txSampleSizeTxt, "RscText"); + CTRL(_txSampleSizeTxt,"RscText"); _txSampleSizeTxt ctrlSetPosition [0.26, 0.055*3, 0.35, 0.045]; _txSampleSizeTxt ctrlSetText "Sample Size: "; _txSampleSizeTxt ctrlCommit 0; - CTRL(GVAR(txFreq), "RscEdit"); + CTRL(GVAR(txFreq),"RscEdit"); GVAR(txFreq) ctrlSetPosition [0.15, 0.055*4, 0.2, 0.045]; GVAR(txFreq) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(txFreq) ctrlSetText str (uiNamespace getVariable [QGVAR(txFreqValue), 65]); GVAR(txFreq) ctrlCommit 0; - CTRL(_rxHeightTxt, "RscText"); + CTRL(_rxHeightTxt,"RscText"); _rxHeightTxt ctrlSetPosition [0.0, 0.055*4, 0.35, 0.045]; _rxHeightTxt ctrlSetText "Frequency: "; _rxHeightTxt ctrlCommit 0; - CTRL(_rxHeightTxt, "RscText"); + CTRL(_rxHeightTxt,"RscText"); _rxHeightTxt ctrlSetPosition [0.35, 0.055*4, 0.35, 0.045]; _rxHeightTxt ctrlSetText "MHz"; _rxHeightTxt ctrlCommit 0; - CTRL(GVAR(txPower), "RscEdit"); + CTRL(GVAR(txPower),"RscEdit"); GVAR(txPower) ctrlSetPosition [0.15, 0.055*5, 0.2, 0.045]; GVAR(txPower) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(txPower) ctrlSetText str (uiNamespace getVariable [QGVAR(txPowerValue), 4000]); GVAR(txPower) ctrlCommit 0; - CTRL(_rxHeightTxt, "RscText"); + CTRL(_rxHeightTxt,"RscText"); _rxHeightTxt ctrlSetPosition [0.0, 0.055*5, 0.35, 0.045]; _rxHeightTxt ctrlSetText "Tx Power: "; _rxHeightTxt ctrlCommit 0; - CTRL(_rxHeightTxt, "RscText"); + CTRL(_rxHeightTxt,"RscText"); _rxHeightTxt ctrlSetPosition [0.35, 0.055*5, 0.35, 0.045]; _rxHeightTxt ctrlSetText "mW"; _rxHeightTxt ctrlCommit 0; - CTRL(GVAR(rxSensitivity), "RscEdit"); + CTRL(GVAR(rxSensitivity),"RscEdit"); GVAR(rxSensitivity) ctrlSetPosition [0.15, 0.055*6, 0.2, 0.045]; GVAR(rxSensitivity) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(rxSensitivity) ctrlSetText str (uiNamespace getVariable [QGVAR(rxSensitivityValue), -116]); GVAR(rxSensitivity) ctrlCommit 0; - CTRL(_rxHeightTxt, "RscText"); + CTRL(_rxHeightTxt,"RscText"); _rxHeightTxt ctrlSetPosition [0.0, 0.055*6, 0.35, 0.045]; _rxHeightTxt ctrlSetText "Sensitivity: "; _rxHeightTxt ctrlCommit 0; - CTRL(_rxHeightTxt, "RscText"); + CTRL(_rxHeightTxt,"RscText"); _rxHeightTxt ctrlSetPosition [0.35, 0.055*6, 0.35, 0.045]; _rxHeightTxt ctrlSetText "dBm (min)"; _rxHeightTxt ctrlCommit 0; - CTRL(GVAR(rxSensitivityUpper), "RscEdit"); + CTRL(GVAR(rxSensitivityUpper),"RscEdit"); GVAR(rxSensitivityUpper) ctrlSetPosition [0.15, 0.055*7, 0.2, 0.045]; GVAR(rxSensitivityUpper) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(rxSensitivityUpper) ctrlSetText str (uiNamespace getVariable [QGVAR(rxSensitivityUpperValue), -50]); GVAR(rxSensitivityUpper) ctrlCommit 0; - CTRL(_rxHeightTxt, "RscText"); + CTRL(_rxHeightTxt,"RscText"); _rxHeightTxt ctrlSetPosition [0.0, 0.055*7, 0.35, 0.045]; _rxHeightTxt ctrlSetText "Sensitivity: "; _rxHeightTxt ctrlCommit 0; - CTRL(_rxHeightTxt, "RscText"); + CTRL(_rxHeightTxt,"RscText"); _rxHeightTxt ctrlSetPosition [0.35, 0.055*7, 0.35, 0.045]; _rxHeightTxt ctrlSetText "dBm (max)"; _rxHeightTxt ctrlCommit 0; - CTRL(GVAR(setTxPosButton), "RscButton"); + CTRL(GVAR(setTxPosButton),"RscButton"); GVAR(setTxPosButton) ctrlSetPosition [0.05, 0.055*8, 0.4, 0.045]; GVAR(setTxPosButton) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(setTxPosButton) ctrlSetText "Set Tx Position"; GVAR(setTxPosButton) ctrlSetEventHandler ["MouseButtonUp", QUOTE(_this call FUNC(setTxPositionStart))]; GVAR(setTxPosButton) ctrlCommit 0; - CTRL(GVAR(txPositionTxt), "RscEdit"); + CTRL(GVAR(txPositionTxt),"RscEdit"); GVAR(txPositionTxt) ctrlSetPosition [0.15, 0.055*9, 0.35, 0.045]; GVAR(txPositionTxt) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(txPositionTxt) ctrlSetText ""; GVAR(txPositionTxt) ctrlCommit 0; - CTRL(_rxHeightTxt, "RscText"); + CTRL(_rxHeightTxt,"RscText"); _rxHeightTxt ctrlSetPosition [0.0, 0.055*9, 0.35, 0.045]; _rxHeightTxt ctrlSetText "Tx Position: "; _rxHeightTxt ctrlCommit 0; - CTRL(GVAR(addRxAreaButton), "RscButton"); + CTRL(GVAR(addRxAreaButton),"RscButton"); GVAR(addRxAreaButton) ctrlSetPosition [0.05, 0.055*10, 0.4, 0.045]; GVAR(addRxAreaButton) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(addRxAreaButton) ctrlSetText "Add Rx Area"; GVAR(addRxAreaButton) ctrlSetEventHandler ["MouseButtonUp", QUOTE(_this call FUNC(addRxAreaStart))]; GVAR(addRxAreaButton) ctrlCommit 0; - CTRL(GVAR(rxAreaList), "RscCombo"); + CTRL(GVAR(rxAreaList),"RscCombo"); GVAR(rxAreaList) ctrlSetPosition [0.05, 0.055*11, 0.3, 0.045]; _components = configFile >> "CfgAcreComponents"; @@ -266,14 +266,14 @@ with uiNamespace do { GVAR(rxAreaList) lbSetCurSel 0; GVAR(rxAreaList) ctrlCommit 0; - CTRL(GVAR(addRxAreaButton), "RscButton"); + CTRL(GVAR(addRxAreaButton),"RscButton"); GVAR(addRxAreaButton) ctrlSetPosition [0.355, 0.055*11, 0.095, 0.045]; GVAR(addRxAreaButton) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(addRxAreaButton) ctrlSetText "Delete"; GVAR(addRxAreaButton) ctrlSetEventHandler ["MouseButtonUp", QUOTE(_this call FUNC(deleteRxArea))]; GVAR(addRxAreaButton) ctrlCommit 0; - CTRL(GVAR(addRxAreaButton), "RscButton"); + CTRL(GVAR(addRxAreaButton),"RscButton"); GVAR(addRxAreaButton) ctrlSetPosition [0.05, 0.055*12.5, 0.4, 0.045]; GVAR(addRxAreaButton) ctrlSetBackgroundColor [0,0,0,0.25]; GVAR(addRxAreaButton) ctrlSetText "Process"; diff --git a/addons/sys_signalmap/fnc_showOverlayMessage.sqf b/addons/sys_signalmap/fnc_showOverlayMessage.sqf index dd36665bc..f5622b680 100644 --- a/addons/sys_signalmap/fnc_showOverlayMessage.sqf +++ b/addons/sys_signalmap/fnc_showOverlayMessage.sqf @@ -26,10 +26,10 @@ with uiNamespace do { ctrlSetFocus GVAR(overlayMessageGrp); private ["_bg", "_customText"]; - CTRLOVERLAY(_bg, "RscBackground"); + CTRLOVERLAY(_bg,"RscBackground"); _bg ctrlSetPosition [0, 0, 0.5, 0.75]; _bg ctrlCommit 0; - CTRLOVERLAY(_customText, "RscStructuredText"); + CTRLOVERLAY(_customText,"RscStructuredText"); _customText ctrlSetPosition [0, 0.3, 0.5, 0.75/2]; _customText ctrlSetStructuredText (parseText (_this select 0)); _customText ctrlCommit 0; diff --git a/addons/sys_signalmap/script_component.hpp b/addons/sys_signalmap/script_component.hpp index a26bb7ff7..3f0e9d504 100644 --- a/addons/sys_signalmap/script_component.hpp +++ b/addons/sys_signalmap/script_component.hpp @@ -18,6 +18,6 @@ #include "\idi\acre\addons\sys_components\script_acre_component_defines.hpp" -#define CTRL(var, type) var = GVAR(mapDisplay) ctrlCreate [type, GVAR(debugIdc), GVAR(ctrlGroup)]; GVAR(debugIdc) = GVAR(debugIdc) + 1; GVAR(signal_debug) pushBack var +#define CTRL(var, type) var = GVAR(mapDisplay) ctrlCreate [type, GVAR(debugIdc),GVAR(ctrlGroup)]; GVAR(debugIdc) = GVAR(debugIdc) + 1; GVAR(signal_debug) pushBack var #define CTRLOVERLAY(var, type) var = GVAR(mapDisplay) ctrlCreate [type, GVAR(debugIdc), GVAR(overlayMessageGrp)]; GVAR(debugIdc) = GVAR(debugIdc) + 1; GVAR(signal_debug) pushBack var #define TILE_SIZE 4000 diff --git a/addons/sys_sounds/fnc_handleLoadedSound.sqf b/addons/sys_sounds/fnc_handleLoadedSound.sqf index 681c7080e..7d275802d 100644 --- a/addons/sys_sounds/fnc_handleLoadedSound.sqf +++ b/addons/sys_sounds/fnc_handleLoadedSound.sqf @@ -22,13 +22,13 @@ _okN = parseNumber _okN; private _ok = false; -TRACE_2("Sound File Loaded", _id, _ok); +TRACE_2("Sound File Loaded",_id,_ok); if (_okN == 1) then { _ok = true; GVAR(loadedSounds) pushBack _id; }; -if (HASH_HASKEY(GVAR(callBacks), _id)) then { - private _func = HASH_GET(GVAR(callBacks), _id); - [_id, _ok] call CALLSTACK_NAMED(_func, _id); +if (HASH_HASKEY(GVAR(callBacks),_id)) then { + private _func = HASH_GET(GVAR(callBacks),_id); + [_id, _ok] call CALLSTACK_NAMED(_func,_id); }; diff --git a/addons/sys_sounds/fnc_loadSound.sqf b/addons/sys_sounds/fnc_loadSound.sqf index 65635dc0a..3ad61ab00 100644 --- a/addons/sys_sounds/fnc_loadSound.sqf +++ b/addons/sys_sounds/fnc_loadSound.sqf @@ -26,7 +26,7 @@ if (EGVAR(sys_core,ts3id) != -1) then { if (_fileName != "") then { [] call (compile loadFile _fileName); if (!isNil "ACRE_B64_FILE") then { - TRACE_2("Lounding Sound File", _className, _fileName); + TRACE_2("Lounding Sound File",_className,_fileName); if (!isNil "_returnFunction") then { HASH_SET(GVAR(callBacks),_className,_returnFunction); }; @@ -34,7 +34,7 @@ if (EGVAR(sys_core,ts3id) != -1) then { ["loadSound", [_className, _forEachIndex+1, count(ACRE_B64_FILE), _x]] call EFUNC(sys_rpc,callRemoteProcedure); } forEach ACRE_B64_FILE; ACRE_B64_FILE = nil; - TRACE_2("Sound File Sent", _className, _fileName); + TRACE_2("Sound File Sent",_className,_fileName); }; }; }; diff --git a/docs/wiki/development/coding-guidelines-sqf.md b/docs/wiki/development/coding-guidelines-sqf.md index 3f133b2cb..7a34c36dd 100644 --- a/docs/wiki/development/coding-guidelines-sqf.md +++ b/docs/wiki/development/coding-guidelines-sqf.md @@ -637,12 +637,12 @@ The following example is a simple usage using our macros which will be explained ```sqf _hash = HASHCREATE; -HASH_SET(_hash, "key", "value"); -if (HASH_HASKEY(_hash, "key")) then { - player sideChat format ["val: %1", HASH_GET(_hash, "key"); // will print out "val: value" +HASH_SET(_hash,"key","value"); +if (HASH_HASKEY(_hash,"key")) then { + player sideChat format ["val: %1", HASH_GET(_hash,"key"); // will print out "val: value" }; -HASH_REM(_hash, "key"); -if (HASH_HASKEY(_hash, "key")) then { +HASH_REM(_hash,"key"); +if (HASH_HASKEY(_hash,"key")) then { // this will never execute because we removed the hash key/val pair "key" }; ``` @@ -670,22 +670,22 @@ _hashList = HASHLIST_CREATELIST(_defaultKeys); _hash = HASHLIST_CREATEHASH(_hashList); //_hash is now a standard hash... -HASH_SET(_hash, "key1", "1"); +HASH_SET(_hash,"key1","1"); //to store it to the list we need to push it to the list -HASHLIST_PUSH(_hashList, _hash); +HASHLIST_PUSH(_hashList,_hash); //now lets get it out and store it in something else for fun //it was pushed to an empty list, so it's index is 0 -_anotherHash = HASHLIST_SELECT(_hashList, 0); +_anotherHash = HASHLIST_SELECT(_hashList,0); // this should print "val: 1" -player sideChat format["val: %1", HASH_GET(_anotherHash, "key1")]; +player sideChat format["val: %1", HASH_GET(_anotherHash,"key1")]; //Say we need to add a new key to the hashlist //that we didn't initialize it with? We can simply //set a new key using the standard HASH_SET macro -HASH_SET(_anotherHash, "anotherKey", "another value"); +HASH_SET(_anotherHash,"anotherKey","another value"); ``` As you can see above working with hashlists are fairly simple, a more in depth explanation of the macros is below. diff --git a/docs/wiki/frameworks/creating-new-radio.md b/docs/wiki/frameworks/creating-new-radio.md index be4e66df5..51c0a0a29 100644 --- a/docs/wiki/frameworks/creating-new-radio.md +++ b/docs/wiki/frameworks/creating-new-radio.md @@ -74,7 +74,7 @@ handleMultipleTransmission The sensitivity (minimum signal strength the radio can pick up) should also go in here as well. In the below code the sensitivity of the radio is -117, any signal with a strength less than it is discarded. ``` -_squelch = -117 + HASH_GET(_channel, "squelch"); +_squelch = -117 + HASH_GET(_channel,"squelch"); if(_signalDbM < _squelch) then { ```