From 306dce2153579793bb706b82b86c8279f1eb6a3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20Badano?= Date: Mon, 12 Jan 2015 01:02:33 -0300 Subject: [PATCH] Finnish porting agm_core. Replace all AGM prefixes by ACE, including stringtables and main variables like ACE_player --- addons/core/CfgFunctions.hpp | 147 ---------------- addons/core/CfgSounds.hpp | 4 +- addons/core/CfgVehicles.hpp | 30 ++-- addons/core/CfgWeapons.hpp | 8 +- addons/core/FixAnimations.hpp | 2 +- addons/core/HintConfig.hpp | 20 +-- addons/core/MainMenu.hpp | 16 +- addons/core/MenuConfig.hpp | 166 +++++++++--------- addons/core/NoVoice.hpp | 18 +- addons/core/ProgressScreen.hpp | 8 +- addons/core/RscInfoType.hpp | 14 +- addons/core/XEH_postInit.sqf | 26 ++- addons/core/XEH_preInit.sqf | 157 +++++++++++++++-- addons/core/config.cpp | 15 +- addons/core/functions/fn_adminKick.sqf | 7 + .../functions/fnc_addActionEventHandler.sqf | 5 +- .../fnc_addActionMenuEventHandler.sqf | 5 +- .../functions/fnc_addCameraEventHandler.sqf | 9 +- .../functions/fnc_addCustomEventHandler.sqf | 3 +- .../fnc_addInfoDisplayEventHandler.sqf | 3 +- ..._addInventoryDisplayLoadedEventHandler.sqf | 5 +- .../fnc_addMapMarkerCreatedEventHandler.sqf | 9 +- .../fnc_addScrollWheelEventHandler.sqf | 5 +- .../functions/fnc_addUnloadEventhandler.sqf | 3 +- addons/core/functions/fnc_adminKick.sqf | 1 + .../core/functions/fnc_ambientBrightness.sqf | 1 + .../functions/fnc_applyForceWalkStatus.sqf | 5 +- addons/core/functions/fnc_binarizeNumber.sqf | 1 + .../functions/fnc_callCustomEventHandlers.sqf | 3 +- .../fnc_callCustomEventHandlersGlobal.sqf | 1 + .../core/functions/fnc_canGetInPosition.sqf | 1 + addons/core/functions/fnc_canInteractWith.sqf | 3 +- addons/core/functions/fnc_canUseWeapon.sqf | 1 + .../fnc_changeProjectileDirection.sqf | 5 +- addons/core/functions/fnc_checkPBOs.sqf | 1 + addons/core/functions/fnc_claim.sqf | 13 +- .../fnc_closeDialogIfTargetMoves.sqf | 11 +- addons/core/functions/fnc_codeToLetter.sqf | 1 + addons/core/functions/fnc_codeToString.sqf | 5 +- addons/core/functions/fnc_convertKeyCode.sqf | 7 +- addons/core/functions/fnc_currentChannel.sqf | 7 +- .../core/functions/fnc_disableUserInput.sqf | 17 +- addons/core/functions/fnc_displayText.sqf | 3 +- .../core/functions/fnc_displayTextPicture.sqf | 1 + .../functions/fnc_displayTextStructured.sqf | 7 +- addons/core/functions/fnc_doAnimation.sqf | 9 +- .../functions/fnc_endRadioTransmission.sqf | 1 + .../core/functions/fnc_execPersistentFnc.sqf | 11 +- addons/core/functions/fnc_execRemoteFnc.sqf | 3 +- .../core/functions/fnc_executePersistent.sqf | 5 +- addons/core/functions/fnc_exportConfig.sqf | 4 +- addons/core/functions/fnc_filter.sqf | 3 +- addons/core/functions/fnc_fixCrateContent.sqf | 1 + .../fnc_fixLoweredRifleAnimation.sqf | 1 + .../core/functions/fnc_getCaptivityStatus.sqf | 3 +- addons/core/functions/fnc_getChildren.sqf | 1 + .../core/functions/fnc_getConfigCommander.sqf | 5 +- addons/core/functions/fnc_getConfigGunner.sqf | 5 +- addons/core/functions/fnc_getDefaultAnim.sqf | 1 + .../functions/fnc_getDisplayConfigName.sqf | 1 + addons/core/functions/fnc_getDoorTurrets.sqf | 21 +-- .../core/functions/fnc_getForceWalkStatus.sqf | 7 +- addons/core/functions/fnc_getHitPoints.sqf | 1 + .../fnc_getHitPointsWithSelections.sqf | 1 + addons/core/functions/fnc_getInPosition.sqf | 1 + addons/core/functions/fnc_getMarkerType.sqf | 5 +- addons/core/functions/fnc_getName.sqf | 3 +- .../functions/fnc_getNumberFromMissionSQM.sqf | 5 +- addons/core/functions/fnc_getPitchBankYaw.sqf | 1 + .../functions/fnc_getStringFromMissionSQM.sqf | 1 + .../fnc_getTargetAzimuthAndInclination.sqf | 5 +- .../core/functions/fnc_getTargetDistance.sqf | 3 +- addons/core/functions/fnc_getTargetObject.sqf | 5 +- .../core/functions/fnc_getTurretCommander.sqf | 1 + .../functions/fnc_getTurretConfigPath.sqf | 1 + .../core/functions/fnc_getTurretCopilot.sqf | 1 + addons/core/functions/fnc_getTurretGunner.sqf | 1 + addons/core/functions/fnc_getTurretIndex.sqf | 1 + addons/core/functions/fnc_getTurrets.sqf | 3 +- addons/core/functions/fnc_getTurretsFFV.sqf | 1 + addons/core/functions/fnc_getTurretsOther.sqf | 1 + .../functions/fnc_getUavControlPosition.sqf | 3 +- addons/core/functions/fnc_getVehicleCargo.sqf | 1 + .../core/functions/fnc_getVehicleCodriver.sqf | 1 + addons/core/functions/fnc_getVehicleCrew.sqf | 1 + .../fnc_getWeaponAzimuthAndInclination.sqf | 7 +- addons/core/functions/fnc_getWeaponType.sqf | 1 + .../core/functions/fnc_getWindDirection.sqf | 1 + addons/core/functions/fnc_goKneeling.sqf | 1 + addons/core/functions/fnc_hadamardProduct.sqf | 1 + .../core/functions/fnc_inTransitionAnim.sqf | 1 + .../functions/fnc_interpolateFromArray.sqf | 1 + addons/core/functions/fnc_isAutoWind.sqf | 5 +- addons/core/functions/fnc_isEOD.sqf | 19 +- addons/core/functions/fnc_isEngineer.sqf | 3 +- addons/core/functions/fnc_isInBuilding.sqf | 1 + addons/core/functions/fnc_isMedic.sqf | 3 +- addons/core/functions/fnc_isPlayer.sqf | 1 + addons/core/functions/fnc_isTurnedOut.sqf | 1 + addons/core/functions/fnc_letterToCode.sqf | 1 + addons/core/functions/fnc_log.sqf | 5 +- addons/core/functions/fnc_logControls.sqf | 1 + addons/core/functions/fnc_logDisplays.sqf | 1 + addons/core/functions/fnc_map.sqf | 3 +- addons/core/functions/fnc_moduleCheckPBOs.sqf | 27 +-- .../core/functions/fnc_moduleLSDVehicles.sqf | 3 +- addons/core/functions/fnc_monitor.sqf | 5 +- addons/core/functions/fnc_muteUnit.sqf | 11 +- addons/core/functions/fnc_numberToDigits.sqf | 1 + .../functions/fnc_numberToDigitsString.sqf | 1 + .../functions/fnc_onLoadRscDisplayChannel.sqf | 26 +-- addons/core/functions/fnc_owned.sqf | 3 +- addons/core/functions/fnc_player.sqf | 3 +- addons/core/functions/fnc_playerSide.sqf | 3 +- addons/core/functions/fnc_progressBar.sqf | 3 +- addons/core/functions/fnc_queueAnimation.sqf | 5 +- .../fnc_readBooleanParameterFromModule.sqf | 15 +- .../fnc_readNumericParameterFromModule.sqf | 13 +- .../fnc_removeActionEventHandler.sqf | 3 +- .../fnc_removeActionMenuEventHandler.sqf | 3 +- .../fnc_removeCameraEventHandler.sqf | 5 +- .../fnc_removeCustomEventHandler.sqf | 3 +- .../fnc_removeInfoDisplayEventHandler.sqf | 3 +- ...moveInventoryDisplayLoadedEventHandler.sqf | 5 +- ...fnc_removeMapMarkerCreatedEventHandler.sqf | 5 +- .../fnc_removeScrollWheelEventHandler.sqf | 5 +- .../functions/fnc_restoreVariablesJIP.sqf | 5 +- .../functions/fnc_revertKeyCodeLocalized.sqf | 1 + addons/core/functions/fnc_sanitizeString.sqf | 3 +- addons/core/functions/fnc_serverLog.sqf | 1 + .../core/functions/fnc_setCaptivityStatus.sqf | 7 +- .../core/functions/fnc_setForceWalkStatus.sqf | 11 +- addons/core/functions/fnc_setKeyDefault.sqf | 11 +- addons/core/functions/fnc_setName.sqf | 5 +- addons/core/functions/fnc_setParameter.sqf | 3 +- addons/core/functions/fnc_setPitchBankYaw.sqf | 13 +- addons/core/functions/fnc_setVariableJIP.sqf | 5 +- addons/core/functions/fnc_showUser.sqf | 5 +- .../functions/fnc_stringToColoredText.sqf | 1 + addons/core/functions/fnc_subString.sqf | 1 + addons/core/functions/fnc_toBin.sqf | 1 + addons/core/functions/fnc_toBitmask.sqf | 1 + addons/core/functions/fnc_toHex.sqf | 1 + addons/core/functions/fnc_toNumber.sqf | 4 +- addons/core/functions/fnc_unmuteUnit.sqf | 9 +- .../KeyInput/initCanInteractFunction.sqf | 3 +- addons/core/scripts/KeyInput/initKeys.sqf | 21 +-- .../core/scripts/KeyInput/initScrollWheel.sqf | 3 +- .../scripts/Version/checkVersionNumber.sqf | 47 ++--- addons/core/scripts/assignedItemFix.sqf | 27 +-- addons/core/scripts/closeMenu.sqf | 1 + addons/core/scripts/editKey.sqf | 3 +- addons/core/scripts/keyInput.sqf | 1 + addons/core/scripts/keyRelease.sqf | 1 + addons/core/scripts/nextKeys.sqf | 5 +- addons/core/scripts/openMenu.sqf | 5 +- addons/core/scripts/readParameters.sqf | 25 +-- addons/core/scripts/toggleState.sqf | 3 +- .../sounds/{AGM_click.wav => ACE_click.wav} | Bin addons/core/stringtable.xml | 140 +++++++-------- 160 files changed, 795 insertions(+), 695 deletions(-) delete mode 100644 addons/core/CfgFunctions.hpp create mode 100644 addons/core/functions/fn_adminKick.sqf rename addons/core/sounds/{AGM_click.wav => ACE_click.wav} (100%) diff --git a/addons/core/CfgFunctions.hpp b/addons/core/CfgFunctions.hpp deleted file mode 100644 index 1dba4f856d..0000000000 --- a/addons/core/CfgFunctions.hpp +++ /dev/null @@ -1,147 +0,0 @@ -class CfgFunctions { - class ADDON { - class ADDON { - file = PATHTOF(functions\); - class addActionEventHandler; - class addActionMenuEventHandler; - class addCameraEventHandler; - class addCustomEventHandler; - class addInfoDisplayEventHandler; - class addMapMarkerCreatedEventHandler; - class addInventoryDisplayLoadedEventHandler; - class addScrollWheelEventHandler; - class adminKick; - class ambientBrightness; - class applyForceWalkStatus; - class binarizeNumber; - class callCustomEventHandlers; - class callCustomEventHandlersGlobal; - class canGetInPosition; - class canInteractWith; - class canUseWeapon; - class changeProjectileDirection; - class checkPBOs; - class claim; - class closeDialogIfTargetMoves; - class codeToLetter; - class codeToString; - class convertKeyCode; - class currentChannel; - class disableUserInput; - class displayText; - class displayTextPicture; - class displayTextStructured; - class doAnimation; - class endRadioTransmission; - class execPersistentFnc; - class execRemoteFnc; - class executePersistent; - class filter; - class fixLoweredRifleAnimation; - class getCaptivityStatus; - class getConfigCommander; - class getConfigGunner; - class getDefaultAnim; - class getDoorTurrets; - class getForceWalkStatus; - class getHitPoints; - class getHitPointsWithSelections; - class getInPosition; - class getMarkerType; - class getName; - class getNumberFromMissionSQM; - class getPitchBankYaw; - class getStringFromMissionSQM; - class getTargetAzimuthAndInclination; - class getTargetDistance; - class getTargetObject; - class getTurretCommander; - class getTurretConfigPath; - class getTurretCopilot; - class getTurretGunner; - class getTurretIndex; - class getTurrets; - class getTurretsFFV; - class getTurretsOther; - class getUavControlPosition; - class getVehicleCargo; - class getVehicleCodriver; - class getVehicleCrew; - class getWeaponAzimuthAndInclination; - class getWeaponType; - class getWindDirection; - class goKneeling; - class hadamardProduct; - class interpolateFromArray; - class inTransitionAnim; - class isAutoWind; - class isEngineer; - class isEOD; - class isInBuilding; - class isMedic; - class isPlayer; - class isTurnedOut; - class letterToCode; - class map; - class moduleCheckPBOs; - class moduleLSDVehicles; - class muteUnit; - class numberToDigits; - class numberToDigitsString; - class onLoadRscDisplayChannel; - class owned; - class player; - class playerSide; - class progressBar; - class queueAnimation; - class readBooleanParameterFromModule; - class readNumericParameterFromModule; - class removeActionEventHandler; - class removeActionMenuEventHandler; - class removeCameraEventHandler; - class removeCustomEventHandler; - class removeInfoDisplayEventHandler; - class removeInventoryDisplayLoadedEventHandler; - class removeMapMarkerCreatedEventHandler; - class removeScrollWheelEventHandler; - class restoreVariablesJIP; - class revertKeyCodeLocalized; - class sanitizeString; - class serverLog; - class setCaptivityStatus; - class setForceWalkStatus; - class setKeyDefault; - class setName; - class setParameter; - class setPitchBankYaw; - class setVariableJIP; - class stringToColoredText; - class subString; - class toBin; - class toBitmask; - class toHex; - class toNumber; - class unmuteUnit; - }; - }; - class AGM_Debug { - class AGM_Debug { - file = PATHTOF(functions\Debug); - class exportConfig; - class getChildren; - class getDisplayConfigName; - class log; - class logControls; - class logDisplays; - class monitor; - class showUser; - }; - }; - class AGM_CuratorFix { - class AGM_CuratorFix { - file = PATHTOF(functions\CuratorFix); - class addUnloadEventhandler; - class fixCrateContent; - }; - }; -}; \ No newline at end of file diff --git a/addons/core/CfgSounds.hpp b/addons/core/CfgSounds.hpp index 3b7f0b091d..b3784aee36 100644 --- a/addons/core/CfgSounds.hpp +++ b/addons/core/CfgSounds.hpp @@ -1,7 +1,7 @@ class CfgSounds { - class AGM_Sound_Click { - sound[] = {PATHTOF(sounds\AGM_click.wav), 1, 1, 200}; + class ACE_Sound_Click { + sound[] = {PATHTOF(sounds\ACE_click.wav), 1, 1, 200}; titles[] = {}; }; }; \ No newline at end of file diff --git a/addons/core/CfgVehicles.hpp b/addons/core/CfgVehicles.hpp index e07e67f80b..8c626b9047 100644 --- a/addons/core/CfgVehicles.hpp +++ b/addons/core/CfgVehicles.hpp @@ -3,7 +3,7 @@ class CfgVehicles { class CAManBase: Man { // @todo class UserActions { - class AGM_Fire { + class ACE_Fire { displayName = ""; priority = -99; available = 1; @@ -14,8 +14,8 @@ class CfgVehicles { showIn3D = 0; onlyForPlayer = 1; shortcut = "DefaultAction"; - condition = "call AGM_Core_UserActionFireCondition"; - statement = "call AGM_Core_UserActionFire"; + condition = "call ACE_Core_UserActionFireCondition"; + statement = "call ACE_Core_UserActionFire"; userActionID = 100; }; }; @@ -25,11 +25,11 @@ class CfgVehicles { //#include class Module_F; - class AGM_ModuleCheckPBOs: Module_F { - author = "$STR_AGM_Core_AGMTeam"; - category = "AGM"; + class ACE_ModuleCheckPBOs: Module_F { + author = "$STR_ACE_Core_ACETeam"; + category = "ACE"; displayName = "Check PBOs"; - function = "AGM_Core_fnc_moduleCheckPBOs"; + function = "ACE_Core_fnc_moduleCheckPBOs"; scope = 2; isGlobal = 1; icon = PATHTOF(UI\IconCheckPBO_ca.paa); @@ -55,7 +55,7 @@ class CfgVehicles { }; class CheckAll { displayName = "Check all addons"; - description = "Check all addons instead of only those of AGM?"; + description = "Check all addons instead of only those of ACE?"; typeName = "BOOL"; class values { class WarnOnce { @@ -80,11 +80,11 @@ class CfgVehicles { }; }; - class AGM_ModuleLSDVehicles: Module_F { - author = "$STR_AGM_Core_AGMTeam"; - category = "AGM"; + class ACE_ModuleLSDVehicles: Module_F { + author = "$STR_ACE_Core_ACETeam"; + category = "ACE"; displayName = "LSD Vehicles"; - function = "AGM_Core_fnc_moduleLSDVehicles"; + function = "ACE_Core_fnc_moduleLSDVehicles"; scope = 2; isGlobal = 1; class Arguments { @@ -92,9 +92,9 @@ class CfgVehicles { }; class Box_NATO_Support_F; - class AGM_Box_Misc: Box_NATO_Support_F { - author = "$STR_AGM_Core_AGMTeam"; - displayName = "$STR_AGM_Core_MiscItems"; + class ACE_Box_Misc: Box_NATO_Support_F { + author = "$STR_ACE_Core_ACETeam"; + displayName = "$STR_ACE_Core_MiscItems"; transportMaxWeapons = 9001; transportMaxMagazines = 9001; transportMaxItems = 9001; diff --git a/addons/core/CfgWeapons.hpp b/addons/core/CfgWeapons.hpp index 59bc47b502..0c2239a3ab 100644 --- a/addons/core/CfgWeapons.hpp +++ b/addons/core/CfgWeapons.hpp @@ -1,19 +1,19 @@ class CfgWeapons { class ItemCore; - class AGM_ItemCore: ItemCore { + class ACE_ItemCore: ItemCore { type = 4096;//4; detectRange = -1; simulation = "ItemMineDetector"; }; class Rifle_Base_F; - class AGM_FakePrimaryWeapon: Rifle_Base_F { + class ACE_FakePrimaryWeapon: Rifle_Base_F { discreteDistance[] = {}; discreteDistanceInitIndex = 0; displayName = ""; picture = ""; model = ""; - magazines[] = {"AGM_FakeMagazine"}; + magazines[] = {"ACE_FakeMagazine"}; scope = 2; }; }; @@ -21,7 +21,7 @@ class CfgWeapons { class CfgMagazines { class CA_Magazine; - class AGM_FakeMagazine: CA_Magazine { + class ACE_FakeMagazine: CA_Magazine { descriptionShort = ""; displayName = ""; displayNameShort = ""; diff --git a/addons/core/FixAnimations.hpp b/addons/core/FixAnimations.hpp index 83353fe27d..f94a9fa00e 100644 --- a/addons/core/FixAnimations.hpp +++ b/addons/core/FixAnimations.hpp @@ -29,7 +29,7 @@ class CfgMovesMaleSdr: CfgMovesBasic { }; class LadderCivilStatic: StandBase { - AGM_isLadder = 1; + ACE_isLadder = 1; }; }; }; diff --git a/addons/core/HintConfig.hpp b/addons/core/HintConfig.hpp index d600609ee5..f4e8c0d2d4 100644 --- a/addons/core/HintConfig.hpp +++ b/addons/core/HintConfig.hpp @@ -4,14 +4,14 @@ class RscStructuredText; class RscMapControl; class RscTitles { - class AGM_RscHint { + class ACE_RscHint { idd = -1; - onLoad = "uiNamespace setVariable ['AGM_ctrlHint', (_this select 0) displayCtrl 1];"; + onLoad = "uiNamespace setVariable ['ACE_ctrlHint', (_this select 0) displayCtrl 1];"; movingEnable = false; duration = 4; fadeIn = 0.2; fadeOut = 0.2; - name = "AGM_RscHint"; + name = "ACE_RscHint"; class controls { class HintBox: RscStructuredText { @@ -28,14 +28,14 @@ class RscTitles { }; }; }; - class AGM_RscErrorHint { + class ACE_RscErrorHint { idd = -1; - onLoad = "uiNamespace setVariable ['AGM_ctrlErrorHint', (_this select 0) displayCtrl 1];"; + onLoad = "uiNamespace setVariable ['ACE_ctrlErrorHint', (_this select 0) displayCtrl 1];"; movingEnable = false; duration = 999999; fadeIn = 0.2; fadeOut = 0.2; - name = "AGM_RscErrorHint"; + name = "ACE_RscErrorHint"; class controls { class HintBox: RscStructuredText { @@ -52,21 +52,21 @@ class RscTitles { }; }; }; - class AGM_EventHandlerHelper: AGM_Rsc_Display_Base { + class ACE_EventHandlerHelper: ACE_Rsc_Display_Base { idd = -1; class controls { class CameraView: RscMapControl { - onDraw = "if (cameraView != uiNamespace getVariable 'AGM_EventHandler_CameraMode') then {uiNamespace setVariable ['AGM_EventHandler_CameraMode', cameraView]; {[uiNamespace getVariable 'AGM_EventHandler_CameraMode'] call _x; nil} count ((missionNamespace getVariable 'AGM_EventHandler_CameraMode') select 2);};"; + onDraw = "if (cameraView != uiNamespace getVariable 'ACE_EventHandler_CameraMode') then {uiNamespace setVariable ['ACE_EventHandler_CameraMode', cameraView]; {[uiNamespace getVariable 'ACE_EventHandler_CameraMode'] call _x; nil} count ((missionNamespace getVariable 'ACE_EventHandler_CameraMode') select 2);};"; idc = -1; w = 0; h = 0; }; }; }; - class AGM_EventHandlerHelper2: AGM_Rsc_Display_Base { + class ACE_EventHandlerHelper2: ACE_Rsc_Display_Base { class controls { class MapMarkerCreated: RscMapControl { - onDraw = "if (count allMapMarkers != uiNamespace getVariable 'AGM_EventHandler_MapMarker') then {if (count allMapMarkers > uiNamespace getVariable 'AGM_EventHandler_MapMarker') then {{[allMapMarkers select count allMapMarkers - 1] call _x; nil} count ((missionNamespace getVariable 'AGM_EventHandler_MapMarker') select 2);}; uiNamespace setVariable ['AGM_EventHandler_MapMarker', count allMapMarkers];};"; + onDraw = "if (count allMapMarkers != uiNamespace getVariable 'ACE_EventHandler_MapMarker') then {if (count allMapMarkers > uiNamespace getVariable 'ACE_EventHandler_MapMarker') then {{[allMapMarkers select count allMapMarkers - 1] call _x; nil} count ((missionNamespace getVariable 'ACE_EventHandler_MapMarker') select 2);}; uiNamespace setVariable ['ACE_EventHandler_MapMarker', count allMapMarkers];};"; idc = -1; w = 0; h = 0; diff --git a/addons/core/MainMenu.hpp b/addons/core/MainMenu.hpp index 785e789c8c..3d30ee2117 100644 --- a/addons/core/MainMenu.hpp +++ b/addons/core/MainMenu.hpp @@ -1,5 +1,5 @@ -class AGM_Tile_Base { +class ACE_Tile_Base { class Attributes { font = "PuristaMedium"; color = "#E5E5E5"; @@ -29,7 +29,7 @@ class AGM_Tile_Base { right = 0; bottom = 0; }; - action = "(findDisplay 49) closeDisplay 0; 0 spawn AGM_Core_openMenu;"; + action = "(findDisplay 49) closeDisplay 0; 0 spawn ACE_Core_openMenu;"; animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)"; animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; @@ -61,7 +61,7 @@ class AGM_Tile_Base { soundEscape[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEscape",0.09,1}; soundPush[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundPush",0.09,1}; style = "0x02 + 0xC0"; - text = "$STR_AGM_Core_Options"; + text = "$STR_ACE_Core_Options"; textureNoShortcut = "#(argb,8,8,3)color(0,0,0,0)"; tooltip = ""; tooltipColorBox[] = {1,1,1,1}; @@ -78,26 +78,26 @@ class RscStandardDisplay; /*class RscDisplayMain: RscStandardDisplay { class controls { - class AGM_Tile : AGM_Tile_Base {}; + class ACE_Tile : ACE_Tile_Base {}; }; };*/ class RscDisplayMPInterrupt: RscStandardDisplay { class controls { - class AGM_Tile : AGM_Tile_Base {}; + class ACE_Tile : ACE_Tile_Base {}; }; }; class RscDisplayInterrupt: RscStandardDisplay { class controls { - class AGM_Tile : AGM_Tile_Base {}; + class ACE_Tile : ACE_Tile_Base {}; }; }; class RscDisplayInterruptEditor3D: RscStandardDisplay { class controls { - class AGM_Tile : AGM_Tile_Base {}; + class ACE_Tile : ACE_Tile_Base {}; }; }; class RscDisplayInterruptEditorPreview: RscStandardDisplay { class controls { - class AGM_Tile : AGM_Tile_Base {}; + class ACE_Tile : ACE_Tile_Base {}; }; }; diff --git a/addons/core/MenuConfig.hpp b/addons/core/MenuConfig.hpp index 4e813ecc85..5326b648eb 100644 --- a/addons/core/MenuConfig.hpp +++ b/addons/core/MenuConfig.hpp @@ -3,7 +3,7 @@ #define VSPACE 0.3 #define BORDER 0.1 -class AGM_Core_Interactive_Button_Base { +class ACE_Core_Interactive_Button_Base { tooltip = ""; action = ""; @@ -46,7 +46,7 @@ class AGM_Core_Interactive_Button_Base { #define VSPACE2 0.05 #define BORDER 0.1 -class AGM_Core_Text_Button_Base { +class ACE_Core_Text_Button_Base { idc = 2; moving = 0; text = ""; @@ -65,10 +65,10 @@ class AGM_Core_Text_Button_Base { h = 0; }; -class AGM_Core_OptionsMenu_Dialog { +class ACE_Core_OptionsMenu_Dialog { idd = -1; movingEnable = true; - onLoad = "_dlgMenuDialog = _this select 0; for '_a' from 20 to 32 do {(_dlgMenuDialog displayCtrl _a) ctrlShow false}; for '_a' from 100 to 119 do {(_dlgMenuDialog displayCtrl _a) ctrlShow false}; for '_a' from 200 to 219 do {(_dlgMenuDialog displayCtrl _a) ctrlShow false}; for '_a' from 300 to 319 do {(_dlgMenuDialog displayCtrl _a) ctrlShow false}; for '_a' from 400 to 419 do {(_dlgMenuDialog displayCtrl _a) ctrlShow false}; for '_a' from 500 to 519 do {(_dlgMenuDialog displayCtrl _a) ctrlShow false}; uiNamespace setVariable ['AGM_Core_MenuDialog', _dlgMenuDialog];"; + onLoad = "_dlgMenuDialog = _this select 0; for '_a' from 20 to 32 do {(_dlgMenuDialog displayCtrl _a) ctrlShow false}; for '_a' from 100 to 119 do {(_dlgMenuDialog displayCtrl _a) ctrlShow false}; for '_a' from 200 to 219 do {(_dlgMenuDialog displayCtrl _a) ctrlShow false}; for '_a' from 300 to 319 do {(_dlgMenuDialog displayCtrl _a) ctrlShow false}; for '_a' from 400 to 419 do {(_dlgMenuDialog displayCtrl _a) ctrlShow false}; for '_a' from 500 to 519 do {(_dlgMenuDialog displayCtrl _a) ctrlShow false}; uiNamespace setVariable ['ACE_Core_MenuDialog', _dlgMenuDialog];"; objects[] = {}; class controlsBackground { @@ -95,7 +95,7 @@ class AGM_Core_OptionsMenu_Dialog { class Header { idc = 2; moving = 0; - text = "$STR_AGM_Core_Options"; + text = "$STR_ACE_Core_Options"; font = "PuristaMedium"; sizeEx = "1 / 40 / (getResolution select 5)";// * safezoneX / safezoneXAbs"; lineSpacing = 0; @@ -112,13 +112,13 @@ class AGM_Core_OptionsMenu_Dialog { h = 0.3 / 9 * safezoneH; }; - class AGM_Logo : AGM_Core_Interactive_Button_Base { + class ACE_Logo : ACE_Core_Interactive_Button_Base { action = "closeDialog 0;"; type = 0; style = 48; onMouseEnter = "hint ('_' + str(_this))"; tooltip = ""; - text = "";//"\AGM_common\rsc\bwlogo.paa"; + text = "";//"\ACE_common\rsc\bwlogo.paa"; idc = 2; x = ((1 - 2 * HSPACE2 / 2) - (HSPACE2 + 0.5 * 0.1)) * safezoneW + safezoneX; y = (VSPACE2 + 2 * 0.04) * safezoneH + safezoneY; @@ -128,7 +128,7 @@ class AGM_Core_OptionsMenu_Dialog { }; class controls { - class Text_Button0 : AGM_Core_Text_Button_Base { + class Text_Button0 : ACE_Core_Text_Button_Base { idc = 100; style = 0 + 0x800; x = (HSPACE2 + 0 * 0.1) * safezoneW + safezoneX; @@ -234,8 +234,8 @@ class AGM_Core_OptionsMenu_Dialog { ////////////////////////////////////////////////// - class Interactive_Button0 : AGM_Core_Interactive_Button_Base { - action = "AGM_Core_keySet = -1; [0] spawn AGM_Core_editKey"; + class Interactive_Button0 : ACE_Core_Interactive_Button_Base { + action = "ACE_Core_keySet = -1; [0] spawn ACE_Core_editKey"; sizeEx = "0.8 / 40 / (getResolution select 5)";// * safezoneX / safezoneXAbs"; idc = 200; style = 2 + 0x800; @@ -246,115 +246,115 @@ class AGM_Core_OptionsMenu_Dialog { }; class Interactive_Button1 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [1] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [1] spawn ACE_Core_editKey"; idc = 201; y = (VSPACE2 + 3 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button2 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [2] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [2] spawn ACE_Core_editKey"; idc = 202; y = (VSPACE2 + 4 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button3 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [3] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [3] spawn ACE_Core_editKey"; idc = 203; y = (VSPACE2 + 5 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button4 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [4] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [4] spawn ACE_Core_editKey"; idc = 204; y = (VSPACE2 + 6 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button5 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [5] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [5] spawn ACE_Core_editKey"; idc = 205; y = (VSPACE2 + 7 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button6 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [6] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [6] spawn ACE_Core_editKey"; idc = 206; y = (VSPACE2 + 8 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button7 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [7] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [7] spawn ACE_Core_editKey"; idc = 207; y = (VSPACE2 + 9 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button8 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [8] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [8] spawn ACE_Core_editKey"; idc = 208; y = (VSPACE2 + 10 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button9 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [9] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [9] spawn ACE_Core_editKey"; idc = 209; y = (VSPACE2 + 11 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button10 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [10] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [10] spawn ACE_Core_editKey"; idc = 210; y = (VSPACE2 + 12 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button11 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [11] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [11] spawn ACE_Core_editKey"; idc = 211; y = (VSPACE2 + 13 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button12 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [12] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [12] spawn ACE_Core_editKey"; idc = 212; y = (VSPACE2 + 14 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button13 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [13] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [13] spawn ACE_Core_editKey"; idc = 213; y = (VSPACE2 + 15 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button14 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [14] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [14] spawn ACE_Core_editKey"; idc = 214; y = (VSPACE2 + 16 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button15 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [15] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [15] spawn ACE_Core_editKey"; idc = 215; y = (VSPACE2 + 17 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button16 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [16] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [16] spawn ACE_Core_editKey"; idc = 216; y = (VSPACE2 + 18 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button17 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [17] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [17] spawn ACE_Core_editKey"; idc = 217; y = (VSPACE2 + 19 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button18 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [18] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [18] spawn ACE_Core_editKey"; idc = 218; y = (VSPACE2 + 20 * 0.04) * safezoneH + safezoneY; }; class Interactive_Button19 : Interactive_Button0 { - action = "AGM_Core_keySet = -1; [19] spawn AGM_Core_editKey"; + action = "ACE_Core_keySet = -1; [19] spawn ACE_Core_editKey"; idc = 219; y = (VSPACE2 + 21 * 0.04) * safezoneH + safezoneY; }; @@ -596,8 +596,8 @@ class AGM_Core_OptionsMenu_Dialog { ////////////////////////////////////////////////// - class Interactive_CheckboxButton0 : AGM_Core_Interactive_Button_Base { - action = "[0] call AGM_Core_toggleState"; + class Interactive_CheckboxButton0 : ACE_Core_Interactive_Button_Base { + action = "[0] call ACE_Core_toggleState"; idc = 500; colorBackground[] = {0, 0, 0, 0}; colorBackgroundActive[] = {0, 0, 0, 0}; @@ -609,115 +609,115 @@ class AGM_Core_OptionsMenu_Dialog { }; class Interactive_CheckboxButton1 : Interactive_CheckboxButton0 { - action = "[1] call AGM_Core_toggleState"; + action = "[1] call ACE_Core_toggleState"; idc = 501; y = (VSPACE2 + 3 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton2 : Interactive_CheckboxButton0 { - action = "[2] call AGM_Core_toggleState"; + action = "[2] call ACE_Core_toggleState"; idc = 502; y = (VSPACE2 + 4 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton3 : Interactive_CheckboxButton0 { - action = "[3] call AGM_Core_toggleState"; + action = "[3] call ACE_Core_toggleState"; idc = 503; y = (VSPACE2 + 5 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton4 : Interactive_CheckboxButton0 { - action = "[4] call AGM_Core_toggleState"; + action = "[4] call ACE_Core_toggleState"; idc = 504; y = (VSPACE2 + 6 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton5 : Interactive_CheckboxButton0 { - action = "[5] call AGM_Core_toggleState"; + action = "[5] call ACE_Core_toggleState"; idc = 505; y = (VSPACE2 + 7 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton6 : Interactive_CheckboxButton0 { - action = "[6] call AGM_Core_toggleState"; + action = "[6] call ACE_Core_toggleState"; idc = 506; y = (VSPACE2 + 8 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton7 : Interactive_CheckboxButton0 { - action = "[7] call AGM_Core_toggleState"; + action = "[7] call ACE_Core_toggleState"; idc = 507; y = (VSPACE2 + 9 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton8 : Interactive_CheckboxButton0 { - action = "[8] call AGM_Core_toggleState"; + action = "[8] call ACE_Core_toggleState"; idc = 508; y = (VSPACE2 + 10 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton9 : Interactive_CheckboxButton0 { - action = "[9] call AGM_Core_toggleState"; + action = "[9] call ACE_Core_toggleState"; idc = 509; y = (VSPACE2 + 11 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton10 : Interactive_CheckboxButton0 { - action = "[10] call AGM_Core_toggleState"; + action = "[10] call ACE_Core_toggleState"; idc = 510; y = (VSPACE2 + 12 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton11 : Interactive_CheckboxButton0 { - action = "[11] call AGM_Core_toggleState"; + action = "[11] call ACE_Core_toggleState"; idc = 511; y = (VSPACE2 + 13 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton12 : Interactive_CheckboxButton0 { - action = "[12] call AGM_Core_toggleState"; + action = "[12] call ACE_Core_toggleState"; idc = 512; y = (VSPACE2 + 14 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton13 : Interactive_CheckboxButton0 { - action = "[13] call AGM_Core_toggleState"; + action = "[13] call ACE_Core_toggleState"; idc = 513; y = (VSPACE2 + 15 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton14 : Interactive_CheckboxButton0 { - action = "[14] call AGM_Core_toggleState"; + action = "[14] call ACE_Core_toggleState"; idc = 514; y = (VSPACE2 + 16 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton15 : Interactive_CheckboxButton0 { - action = "[15] call AGM_Core_toggleState"; + action = "[15] call ACE_Core_toggleState"; idc = 515; y = (VSPACE2 + 17 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton16 : Interactive_CheckboxButton0 { - action = "[16] call AGM_Core_toggleState"; + action = "[16] call ACE_Core_toggleState"; idc = 516; y = (VSPACE2 + 18 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton17 : Interactive_CheckboxButton0 { - action = "[17] call AGM_Core_toggleState"; + action = "[17] call ACE_Core_toggleState"; idc = 517; y = (VSPACE2 + 19 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton18 : Interactive_CheckboxButton0 { - action = "[18] call AGM_Core_toggleState"; + action = "[18] call ACE_Core_toggleState"; idc = 518; y = (VSPACE2 + 20 * 0.04) * safezoneH + safezoneY; }; class Interactive_CheckboxButton19 : Interactive_CheckboxButton0 { - action = "[19] call AGM_Core_toggleState"; + action = "[19] call ACE_Core_toggleState"; idc = 519; y = (VSPACE2 + 21 * 0.04) * safezoneH + safezoneY; }; @@ -735,7 +735,7 @@ class AGM_Core_OptionsMenu_Dialog { }; /*class TextBox_Key_Shift : TextBox_KeyChange { - text = "$STR_AGM_Core_Shift"; + text = "$STR_ACE_Core_Shift"; idc = 21; colorText[] = {0.25,0.25,0.25,1}; colorBackground[] = {0,0,0,0}; @@ -746,22 +746,22 @@ class AGM_Core_OptionsMenu_Dialog { }; class TextBox_Key_Control : TextBox_Key_Shift { - text = "$STR_AGM_Core_Ctrl"; + text = "$STR_ACE_Core_Ctrl"; idc = 22; x = (3 / 4 * HSPACE2 + 6.75 * 0.1) * safezoneW + safezoneX; y = (VSPACE2 + 10 * 0.04) * safezoneH + safezoneY; }; class TextBox_Key_Alt : TextBox_Key_Shift { - text = "$STR_AGM_Core_Alt"; + text = "$STR_ACE_Core_Alt"; idc = 23; x = (3 / 4 * HSPACE2 + 7.75 * 0.1) * safezoneW + safezoneX; y = (VSPACE2 + 10 * 0.04) * safezoneH + safezoneY; };*/ class TextBox_Key_Shift : Interactive_Button0 { - action = "AGM_Core_keyNewTemp = [42, [false, false, false], 42];"; - text = "$STR_AGM_Core_Shift"; + action = "ACE_Core_keyNewTemp = [42, [false, false, false], 42];"; + text = "$STR_ACE_Core_Shift"; sizeEx = "0.7 / 40 / (getResolution select 5)";// * safezoneX / safezoneXAbs"; idc = 21; colorText[] = {1,1,1,1}; @@ -773,40 +773,40 @@ class AGM_Core_OptionsMenu_Dialog { }; class TextBox_Key_Control : TextBox_Key_Shift { - action = "AGM_Core_keyNewTemp = [29, [false, false, false], 29];"; - text = "$STR_AGM_Core_Ctrl"; + action = "ACE_Core_keyNewTemp = [29, [false, false, false], 29];"; + text = "$STR_ACE_Core_Ctrl"; idc = 22; x = (3 / 4 * HSPACE2 + 6.75 * 0.1) * safezoneW + safezoneX; y = (VSPACE2 + 10 * 0.04) * safezoneH + safezoneY; }; class TextBox_Key_Alt : TextBox_Key_Shift { - action = "AGM_Core_keyNewTemp = [56, [false, false, false], 56];"; - text = "$STR_AGM_Core_Alt"; + action = "ACE_Core_keyNewTemp = [56, [false, false, false], 56];"; + text = "$STR_ACE_Core_Alt"; idc = 23; x = (3 / 4 * HSPACE2 + 7.5 * 0.1) * safezoneW + safezoneX; y = (VSPACE2 + 10 * 0.04) * safezoneH + safezoneY; }; class TextBox_Key_Shift_Right : TextBox_Key_Shift { - action = "AGM_Core_keyNewTemp = [54, [false, false, false], 54];"; - text = "$STR_AGM_Core_Shift_Right"; + action = "ACE_Core_keyNewTemp = [54, [false, false, false], 54];"; + text = "$STR_ACE_Core_Shift_Right"; idc = 27; x = (3 / 4 * HSPACE2 + 6 * 0.1) * safezoneW + safezoneX; y = (VSPACE2 + 11 * 0.04) * safezoneH + safezoneY; }; class TextBox_Key_Control_Right : TextBox_Key_Shift { - action = "AGM_Core_keyNewTemp = [157, [false, false, false], 157];"; - text = "$STR_AGM_Core_Ctrl_Right"; + action = "ACE_Core_keyNewTemp = [157, [false, false, false], 157];"; + text = "$STR_ACE_Core_Ctrl_Right"; idc = 28; x = (3 / 4 * HSPACE2 + 6.75 * 0.1) * safezoneW + safezoneX; y = (VSPACE2 + 11 * 0.04) * safezoneH + safezoneY; }; class TextBox_Key_Alt_Right : TextBox_Key_Shift { - action = "AGM_Core_keyNewTemp = [184, [false, false, false], 184];"; - text = "$STR_AGM_Core_Alt_Right"; + action = "ACE_Core_keyNewTemp = [184, [false, false, false], 184];"; + text = "$STR_ACE_Core_Alt_Right"; idc = 29; x = (3 / 4 * HSPACE2 + 7.5 * 0.1) * safezoneW + safezoneX; y = (VSPACE2 + 11 * 0.04) * safezoneH + safezoneY; @@ -825,16 +825,16 @@ class AGM_Core_OptionsMenu_Dialog { }; class TextBox_Key_Default : TextBox_Key_Shift { - action = "call AGM_Core_keysetDefault"; - text = "$STR_AGM_Core_KeyDefault"; + action = "call ACE_Core_keysetDefault"; + text = "$STR_ACE_Core_KeyDefault"; idc = 31; x = (3 / 4 * HSPACE2 + 8.25 * 0.1) * safezoneW + safezoneX; y = (VSPACE2 + 10 * 0.04) * safezoneH + safezoneY; }; class TextBox_Key_None : TextBox_Key_Shift { - action = "AGM_Core_keyNewTemp = [0, [false, false, false], 0];"; - text = "$STR_AGM_Core_KeyNone"; + action = "ACE_Core_keyNewTemp = [0, [false, false, false], 0];"; + text = "$STR_ACE_Core_KeyNone"; idc = 32; x = (3 / 4 * HSPACE2 + 8.25 * 0.1) * safezoneW + safezoneX; y = (VSPACE2 + 11 * 0.04) * safezoneH + safezoneY; @@ -853,8 +853,8 @@ class AGM_Core_OptionsMenu_Dialog { }; class Interactive_ButtonV : Interactive_Button0 { - action = "AGM_Core_keySet = 1"; - text = "$STR_AGM_Core_Save"; + action = "ACE_Core_keySet = 1"; + text = "$STR_ACE_Core_Save"; sizeEx = "1 / 40 / (getResolution select 5)";// * safezoneX / safezoneXAbs"; idc = 25; colorBackground[] = {0,0,0,0}; @@ -865,8 +865,8 @@ class AGM_Core_OptionsMenu_Dialog { }; class Interactive_ButtonW : Interactive_ButtonV { - action = "AGM_Core_keySet = -1"; - text = "$STR_AGM_Core_Cancel"; + action = "ACE_Core_keySet = -1"; + text = "$STR_ACE_Core_Cancel"; idc = 26; x = (HSPACE2 + 7.5 * 0.1) * safezoneW + safezoneX; y = (VSPACE2 + 13 * 0.04) * safezoneH + safezoneY; @@ -875,8 +875,8 @@ class AGM_Core_OptionsMenu_Dialog { }; class Interactive_ButtonX : Interactive_Button0 { - action = "AGM_Core_keySave = 1; closeDialog 0"; - text = "$STR_AGM_Core_Save"; + action = "ACE_Core_keySave = 1; closeDialog 0"; + text = "$STR_ACE_Core_Save"; sizeEx = "1 / 40 / (getResolution select 5)";// * safezoneX / safezoneXAbs"; idc = 10; x = ((1 - 2 * HSPACE2 / 2) - (HSPACE2 + 2.5 * 0.1)) * safezoneW + safezoneX; @@ -886,8 +886,8 @@ class AGM_Core_OptionsMenu_Dialog { }; class Interactive_ButtonY : Interactive_Button0 { - action = "AGM_Core_keySave = -1; closeDialog 0"; - text = "$STR_AGM_Core_Cancel"; + action = "ACE_Core_keySave = -1; closeDialog 0"; + text = "$STR_ACE_Core_Cancel"; sizeEx = "1 / 40 / (getResolution select 5)";// * safezoneX / safezoneXAbs"; idc = 11; x = ((1 - 2 * HSPACE2 / 2) - (HSPACE2 + 1 * 0.1)) * safezoneW + safezoneX; @@ -896,9 +896,9 @@ class AGM_Core_OptionsMenu_Dialog { h = 0.3 / 9 * safezoneH; }; - class Interactive_ButtonA : AGM_Core_Interactive_Button_Base { - action = "false call AGM_Core_nextKeys"; - text = "$STR_AGM_Core_Prev"; + class Interactive_ButtonA : ACE_Core_Interactive_Button_Base { + action = "false call ACE_Core_nextKeys"; + text = "$STR_ACE_Core_Prev"; idc = 12; style = 2 + 0x800; x = (HSPACE2 + 3 * 0.1) * safezoneW + safezoneX; @@ -908,13 +908,13 @@ class AGM_Core_OptionsMenu_Dialog { }; class Interactive_ButtonB : Interactive_ButtonA { - action = "true call AGM_Core_nextKeys"; - text = "$STR_AGM_Core_Next"; + action = "true call ACE_Core_nextKeys"; + text = "$STR_ACE_Core_Next"; idc = 13; x = (HSPACE2 + 3 * 0.1 + 2.0 / 16) * safezoneW + safezoneX; }; - class Interactive_ButtonC : AGM_Core_Text_Button_Base { + class Interactive_ButtonC : ACE_Core_Text_Button_Base { text = ""; idc = 14; style = 2 + 0x800; diff --git a/addons/core/NoVoice.hpp b/addons/core/NoVoice.hpp index 15fb8440a5..7740ea071b 100644 --- a/addons/core/NoVoice.hpp +++ b/addons/core/NoVoice.hpp @@ -2,7 +2,7 @@ class RadioProtocolBase { class Words; }; -class AGM_RadioProtocolNoRadio: RadioProtocolBase { +class ACE_RadioProtocolNoRadio: RadioProtocolBase { class CuratorWaypointPlaced; class CuratorWaypointPlacedAttack; class CuratorObjectPlaced; @@ -205,23 +205,23 @@ class AGM_RadioProtocolNoRadio: RadioProtocolBase { }; class CfgVoice { - class AGM_NoVoice { - author = "$STR_AGM_Core_AGMTeam"; - protocol = "AGM_RadioProtocolNoRadio"; + class ACE_NoVoice { + author = "$STR_ACE_Core_ACETeam"; + protocol = "ACE_RadioProtocolNoRadio"; variants[] = {1}; directories[] = {"",""}; identityTypes[] = {"Default"}; scope = 2; voiceType = ""; icon = "\a3\Ui_f\data\Map\Markers\Flags\nato_ca.paa"; - displayName = "$STR_AGM_Core_NoVoice"; + displayName = "$STR_ACE_Core_NoVoice"; }; }; class CfgVoiceTypes { - class AGM_NoVoice { - name = "$STR_AGM_Core_NoVoice"; - voices[] = {"AGM_NoVoice","AGM_NoVoice","AGM_NoVoice"}; - preview = "AGM_NoVoice"; + class ACE_NoVoice { + name = "$STR_ACE_Core_NoVoice"; + voices[] = {"ACE_NoVoice","ACE_NoVoice","ACE_NoVoice"}; + preview = "ACE_NoVoice"; alternative = ""; }; }; diff --git a/addons/core/ProgressScreen.hpp b/addons/core/ProgressScreen.hpp index f43b34db52..ae2fa06e30 100644 --- a/addons/core/ProgressScreen.hpp +++ b/addons/core/ProgressScreen.hpp @@ -1,8 +1,8 @@ -class AGM_Core_ProgressBar_Dialog { +class ACE_Core_ProgressBar_Dialog { idd = -1; movingEnable = false; - onLoad = "uiNamespace setVariable ['AGM_Core_ctrlProgressBar', (_this select 0) displayCtrl 1]; uiNamespace setVariable ['AGM_Core_ctrlProgressBarTitle', (_this select 0) displayCtrl 2];"; + onLoad = "uiNamespace setVariable ['ACE_Core_ctrlProgressBar', (_this select 0) displayCtrl 1]; uiNamespace setVariable ['ACE_Core_ctrlProgressBarTitle', (_this select 0) displayCtrl 2];"; objects[] = {}; class controlsBackground { @@ -66,10 +66,10 @@ class AGM_Core_ProgressBar_Dialog { }; }; -class AGM_Core_DisableMouse_Dialog { +class ACE_Core_DisableMouse_Dialog { idd = -1; movingEnable = false; - onLoad = "uiNamespace setVariable ['AGM_Core_dlgDisableMouse', _this select 0];"; + onLoad = "uiNamespace setVariable ['ACE_Core_dlgDisableMouse', _this select 0];"; objects[] = {}; class controlsBackground { class Background { diff --git a/addons/core/RscInfoType.hpp b/addons/core/RscInfoType.hpp index c8d56aba7a..91937c08fb 100644 --- a/addons/core/RscInfoType.hpp +++ b/addons/core/RscInfoType.hpp @@ -2,26 +2,26 @@ class RscInGameUI { class RscUnitInfo; class RscUnitInfoSoldier: RscUnitInfo { - onLoad = "uiNamespace setVariable ['AGM_dlgSoldier', _this select 0]; {_this call _x} forEach ((missionNamespace getVariable ['AGM_onLoadInfoSoldier', [-1, [], []]]) select 2); {_this call _x} forEach ((missionNamespace getVariable ['AGM_onLoadInfoAny', [-1, [], []]]) select 2); [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; + onLoad = "uiNamespace setVariable ['ACE_dlgSoldier', _this select 0]; {_this call _x} forEach ((missionNamespace getVariable ['ACE_onLoadInfoSoldier', [-1, [], []]]) select 2); {_this call _x} forEach ((missionNamespace getVariable ['ACE_onLoadInfoAny', [-1, [], []]]) select 2); [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; }; class RscUnitInfoTank: RscUnitInfo { - onLoad = "uiNamespace setVariable ['AGM_dlgVehicle', _this select 0]; {_this call _x} forEach ((missionNamespace getVariable ['AGM_onLoadInfoVehicle', [-1, [], []]]) select 2); {_this call _x} forEach ((missionNamespace getVariable ['AGM_onLoadInfoAny', [-1, [], []]]) select 2); [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; + onLoad = "uiNamespace setVariable ['ACE_dlgVehicle', _this select 0]; {_this call _x} forEach ((missionNamespace getVariable ['ACE_onLoadInfoVehicle', [-1, [], []]]) select 2); {_this call _x} forEach ((missionNamespace getVariable ['ACE_onLoadInfoAny', [-1, [], []]]) select 2); [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; }; class RscUnitInfoAir: RscUnitInfo { - onLoad = "uiNamespace setVariable ['AGM_dlgAircraft', _this select 0]; {_this call _x} forEach ((missionNamespace getVariable ['AGM_onLoadInfoAircraft', [-1, [], []]]) select 2); {_this call _x} forEach ((missionNamespace getVariable ['AGM_onLoadInfoAny', [-1, [], []]]) select 2); [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; + onLoad = "uiNamespace setVariable ['ACE_dlgAircraft', _this select 0]; {_this call _x} forEach ((missionNamespace getVariable ['ACE_onLoadInfoAircraft', [-1, [], []]]) select 2); {_this call _x} forEach ((missionNamespace getVariable ['ACE_onLoadInfoAny', [-1, [], []]]) select 2); [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; }; class RscUnitInfoShip: RscUnitInfo { - onLoad = "uiNamespace setVariable ['AGM_dlgShip', _this select 0]; {_this call _x} forEach ((missionNamespace getVariable ['AGM_onLoadInfoShip', [-1, [], []]]) select 2); {_this call _x} forEach ((missionNamespace getVariable ['AGM_onLoadInfoAny', [-1, [], []]]) select 2); [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; + onLoad = "uiNamespace setVariable ['ACE_dlgShip', _this select 0]; {_this call _x} forEach ((missionNamespace getVariable ['ACE_onLoadInfoShip', [-1, [], []]]) select 2); {_this call _x} forEach ((missionNamespace getVariable ['ACE_onLoadInfoAny', [-1, [], []]]) select 2); [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; }; class RscUnitInfoParachute: RscUnitInfo { - onLoad = "uiNamespace setVariable ['AGM_dlgParachute', _this select 0]; {_this call _x} forEach ((missionNamespace getVariable ['AGM_onLoadInfoParachute', [-1, [], []]]) select 2); {_this call _x} forEach ((missionNamespace getVariable ['AGM_onLoadInfoAny', [-1, [], []]]) select 2); [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; + onLoad = "uiNamespace setVariable ['ACE_dlgParachute', _this select 0]; {_this call _x} forEach ((missionNamespace getVariable ['ACE_onLoadInfoParachute', [-1, [], []]]) select 2); {_this call _x} forEach ((missionNamespace getVariable ['ACE_onLoadInfoAny', [-1, [], []]]) select 2); [""onLoad"",_this,""RscUnitInfo"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf"""; }; }; class RscDisplayInventory { - onLoad = "[""onLoad"",_this,""RscDisplayInventory"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; {_this call _x} forEach ((missionNamespace getVariable ['AGM_onLoadInventory', [-1, [], []]]) select 2);"; + onLoad = "[""onLoad"",_this,""RscDisplayInventory"",'IGUI'] call compile preprocessfilelinenumbers ""A3\ui_f\scripts\initDisplay.sqf""; {_this call _x} forEach ((missionNamespace getVariable ['ACE_onLoadInventory', [-1, [], []]]) select 2);"; }; class RscDisplayChannel { - onLoad = "_this call AGM_Core_fnc_onLoadRscDisplayChannel;"; + onLoad = "_this call ACE_Core_fnc_onLoadRscDisplayChannel;"; }; diff --git a/addons/core/XEH_postInit.sqf b/addons/core/XEH_postInit.sqf index 622bd66bc2..df170d1fa6 100644 --- a/addons/core/XEH_postInit.sqf +++ b/addons/core/XEH_postInit.sqf @@ -1,5 +1,5 @@ -// BWA3 Realism - Core -// (C) 2013 KoffeinFlummi. See LICENSE. +// ACE - Core +#include "script_component.hpp" QGVAR(remoteFnc) addPublicVariableEventHandler { (_this select 1) call FUNC(execRemoteFnc); @@ -8,13 +8,13 @@ QGVAR(remoteFnc) addPublicVariableEventHandler { [missionNamespace] call FUNC(executePersistent); // check previous version number from profile -_currentVersion = getText (configFile >> "CfgPatches" >> "AGM_Core" >> "version"); -_previousVersion = profileNamespace getVariable ["AGM_VersionNumberString", ""]; +_currentVersion = getText (configFile >> "CfgPatches" >> "ACE_Core" >> "version"); +_previousVersion = profileNamespace getVariable ["ACE_VersionNumberString", ""]; if (_currentVersion != _previousVersion) then { // do something - profileNamespace setVariable ["AGM_VersionNumberString", _currentVersion]; + profileNamespace setVariable ["ACE_VersionNumberString", _currentVersion]; }; 0 spawn compile preprocessFileLineNumbers PATHTOF(scripts\Version\checkVersionNumber.sqf); @@ -48,9 +48,9 @@ call compile preprocessFileLineNumbers PATHTOF(scripts\KeyInput\initScrollWheel. 0 spawn { while {true} do { waitUntil {!isNull (findDisplay 46)}; sleep 0.1; - findDisplay 46 displayAddEventHandler ["KeyDown", "_this call GVAR(onKeyDown)"]; - findDisplay 46 displayAddEventHandler ["KeyUp", "_this call GVAR(onKeyUp)"]; - findDisplay 46 displayAddEventHandler ["MouseZChanged", "_this call GVAR(onScrollWheel)"]; + findDisplay 46 displayAddEventHandler ["KeyDown", QUOTE( _this call QUOTE(QGVAR(onKeyDown)) )]; + findDisplay 46 displayAddEventHandler ["KeyUp", QUOTE( _this call QUOTE(QGVAR(onKeyUp)) )]; + findDisplay 46 displayAddEventHandler ["MouseZChanged", QUOTE( _this call QUOTE(QGVAR(onScrollWheel)) )]; [false] call FUNC(disableUserInput); waitUntil {isNull (findDisplay 46)}; }; @@ -58,4 +58,12 @@ call compile preprocessFileLineNumbers PATHTOF(scripts\KeyInput\initScrollWheel. enableCamShake true; -[missionNamespace, "playerChanged", "{if (alive (_this select 0)) then {[_this select 0] call FUNC(setName)}; if (alive (_this select 1)) then {[_this select 1] call FUNC(setName)};}"] call FUNC(addCustomEventhandler); +// Set the name for the current player +[missionNamespace, "playerChanged", { + if (alive (_this select 0)) then { + [_this select 0] call FUNC(setName) + }; + if (alive (_this select 1)) then { + [_this select 1] call FUNC(setName) + }; +}] call FUNC(addCustomEventhandler); diff --git a/addons/core/XEH_preInit.sqf b/addons/core/XEH_preInit.sqf index f117b2ffd7..90fe5bd75c 100644 --- a/addons/core/XEH_preInit.sqf +++ b/addons/core/XEH_preInit.sqf @@ -1,22 +1,153 @@ // by commy2 +#include "script_component.hpp" -AGM_player = player; +// ACE Core Function +PREPF(addActionEventHandler); +PREPF(addActionMenuEventHandler); +PREPF(addCameraEventHandler); +PREPF(addCustomEventHandler); +PREPF(addInfoDisplayEventHandler); +PREPF(addMapMarkerCreatedEventHandler); +PREPF(addInventoryDisplayLoadedEventHandler); +PREPF(addScrollWheelEventHandler); +PREPF(adminKick); +PREPF(ambientBrightness); +PREPF(applyForceWalkStatus); +PREPF(binarizeNumber); +PREPF(callCustomEventHandlers); +PREPF(callCustomEventHandlersGlobal); +PREPF(canGetInPosition); +PREPF(canInteractWith); +PREPF(canUseWeapon); +PREPF(changeProjectileDirection); +PREPF(checkPBOs); +PREPF(claim); +PREPF(closeDialogIfTargetMoves); +PREPF(codeToLetter); +PREPF(codeToString); +PREPF(convertKeyCode); +PREPF(currentChannel); +PREPF(disableUserInput); +PREPF(displayText); +PREPF(displayTextPicture); +PREPF(displayTextStructured); +PREPF(doAnimation); +PREPF(endRadioTransmission); +PREPF(execPersistentFnc); +PREPF(execRemoteFnc); +PREPF(executePersistent); +PREPF(filter); +PREPF(fixLoweredRifleAnimation); +PREPF(getCaptivityStatus); +PREPF(getConfigCommander); +PREPF(getConfigGunner); +PREPF(getDefaultAnim); +PREPF(getDoorTurrets); +PREPF(getForceWalkStatus); +PREPF(getHitPoints); +PREPF(getHitPointsWithSelections); +PREPF(getInPosition); +PREPF(getMarkerType); +PREPF(getName); +PREPF(getNumberFromMissionSQM); +PREPF(getPitchBankYaw); +PREPF(getStringFromMissionSQM); +PREPF(getTargetAzimuthAndInclination); +PREPF(getTargetDistance); +PREPF(getTargetObject); +PREPF(getTurretCommander); +PREPF(getTurretConfigPath); +PREPF(getTurretCopilot); +PREPF(getTurretGunner); +PREPF(getTurretIndex); +PREPF(getTurrets); +PREPF(getTurretsFFV); +PREPF(getTurretsOther); +PREPF(getUavControlPosition); +PREPF(getVehicleCargo); +PREPF(getVehicleCodriver); +PREPF(getVehicleCrew); +PREPF(getWeaponAzimuthAndInclination); +PREPF(getWeaponType); +PREPF(getWindDirection); +PREPF(goKneeling); +PREPF(hadamardProduct); +PREPF(interpolateFromArray); +PREPF(inTransitionAnim); +PREPF(isAutoWind); +PREPF(isEngineer); +PREPF(isEOD); +PREPF(isInBuilding); +PREPF(isMedic); +PREPF(isPlayer); +PREPF(isTurnedOut); +PREPF(letterToCode); +PREPF(map); +PREPF(moduleCheckPBOs); +PREPF(moduleLSDVehicles); +PREPF(muteUnit); +PREPF(numberToDigits); +PREPF(numberToDigitsString); +PREPF(onLoadRscDisplayChannel); +PREPF(owned); +PREPF(player); +PREPF(playerSide); +PREPF(progressBar); +PREPF(queueAnimation); +PREPF(readBooleanParameterFromModule); +PREPF(readNumericParameterFromModule); +PREPF(removeActionEventHandler); +PREPF(removeActionMenuEventHandler); +PREPF(removeCameraEventHandler); +PREPF(removeCustomEventHandler); +PREPF(removeInfoDisplayEventHandler); +PREPF(removeInventoryDisplayLoadedEventHandler); +PREPF(removeMapMarkerCreatedEventHandler); +PREPF(removeScrollWheelEventHandler); +PREPF(restoreVariablesJIP); +PREPF(revertKeyCodeLocalized); +PREPF(sanitizeString); +PREPF(serverLog); +PREPF(setCaptivityStatus); +PREPF(setForceWalkStatus); +PREPF(setKeyDefault); +PREPF(setName); +PREPF(setParameter); +PREPF(setPitchBankYaw); +PREPF(setVariableJIP); +PREPF(stringToColoredText); +PREPF(subString); +PREPF(toBin); +PREPF(toBitmask); +PREPF(toHex); +PREPF(toNumber); +PREPF(unmuteUnit); +// ACE_Debug +PREPF(exportConfig); +PREPF(getChildren); +PREPF(getDisplayConfigName); +PREPF(log); +PREPF(logControls); +PREPF(logDisplays); +PREPF(monitor); +PREPF(showUser); + +// ACE_CuratorFix +PREPF(addUnloadEventhandler); +PREPF(fixCrateContent); + +// Loop to update the ACE_player variable +ACE_player = player; if (hasInterface) then { - ["AGM_CheckForPlayerChange", "onEachFrame", { - if !(AGM_player isEqualTo (missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player])) then { - //if (AGM_player != missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player]) then { - _this = AGM_player; + ["ACE_CheckForPlayerChange", "onEachFrame", { + if !(ACE_player isEqualTo (missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player])) then { + _this = ACE_player; - AGM_player = missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player]; - uiNamespace setVariable ["AGM_player", AGM_player]; + ACE_player = missionNamespace getVariable ["BIS_fnc_moduleRemoteControl_unit", player]; + uiNamespace setVariable ["ACE_player", ACE_player]; - [missionNamespace, "playerChanged", [AGM_player, _this]] call FUNC(callCustomEventHandlers); + [missionNamespace, "playerChanged", [ACE_player, _this]] call FUNC(callCustomEventHandlers); }; }] call BIS_fnc_addStackedEventHandler; }; - -// remove this for the release -/*if (isNil "AGM_Debug") then { - AGM_Debug = ["remote"]; -};*/ diff --git a/addons/core/config.cpp b/addons/core/config.cpp index e1a71e0103..b8ca86acb3 100644 --- a/addons/core/config.cpp +++ b/addons/core/config.cpp @@ -2,8 +2,8 @@ class CfgPatches { class ADDON { - units[] = {"AGM_Box_Misc"}; - weapons[] = {"AGM_ItemCore", "AGM_FakePrimaryWeapon"}; + units[] = {"ACE_Box_Misc"}; + weapons[] = {"ACE_ItemCore", "ACE_FakePrimaryWeapon"}; requiredVersion = 0.60; requiredAddons[] = { "ace_main" @@ -17,7 +17,6 @@ class CfgPatches { }; #include "CfgEventHandlers.hpp" -#include "CfgFunctions.hpp" #include "CfgSounds.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" @@ -30,7 +29,7 @@ class CfgFactionClasses { }; }; -class AGM_Rsc_Display_Base { +class ACE_Rsc_Display_Base { idd = -1; type = 0; style = 48; @@ -44,7 +43,7 @@ class AGM_Rsc_Display_Base { colorText[] = {1, 1, 1, 1}; }; -class AGM_Rsc_Control_Base { +class ACE_Rsc_Control_Base { idc = 1; type = 0; style = 48; @@ -71,7 +70,7 @@ class GVAR(canInteractConditions) { class GVAR(Options) { class enableNumberHotkeys { - displayName = "$STR_AGM_Core_EnableNumberHotkeys"; + displayName = "$STR_ACE_Core_EnableNumberHotkeys"; default = 1; }; }; @@ -82,9 +81,9 @@ class GVAR(Options) { #include /* -class RscControlsGroupNoScrollbars; +class RscControlsGroupNoScrollbars; class RscAttributeInventory: RscControlsGroupNoScrollbars { - onSetFocus = "[_this,""RscAttributeInventory"",'CuratorCommon'] call (uinamespace getvariable ""BIS_fnc_initCuratorAttribute""); _this select 0 call AGM_CuratorFix_fnc_addUnloadEventhandler;"; + onSetFocus = "[_this,""RscAttributeInventory"",'CuratorCommon'] call (uinamespace getvariable ""BIS_fnc_initCuratorAttribute""); _this select 0 call ACE_CuratorFix_fnc_addUnloadEventhandler;"; }; */ diff --git a/addons/core/functions/fn_adminKick.sqf b/addons/core/functions/fn_adminKick.sqf new file mode 100644 index 0000000000..c53d228da5 --- /dev/null +++ b/addons/core/functions/fn_adminKick.sqf @@ -0,0 +1,7 @@ +// by commy2 + +private "_name"; + +_name = name (_this select 0); + +[_name, "{if (serverCommandAvailable '#kick') then {serverCommand format['#kick %1', _this]}}"] call FUNC(execRemoteFnc); diff --git a/addons/core/functions/fnc_addActionEventHandler.sqf b/addons/core/functions/fnc_addActionEventHandler.sqf index 8ea3267335..a75b1537d1 100644 --- a/addons/core/functions/fnc_addActionEventHandler.sqf +++ b/addons/core/functions/fnc_addActionEventHandler.sqf @@ -12,6 +12,7 @@ * Return value: * ID of the action (used to remove it later). */ +#include "script_component.hpp" private ["_unit", "_action", "_condition", "_statement", "_name", "_actionsVar", "_actionID", "_actions", "_id", "_actionIDs"]; @@ -28,7 +29,7 @@ if (typeName _statement == "STRING") then { _statement = compile _statement; }; -_name = format ["AGM_Action_%1", _action]; +_name = format ["ACE_Action_%1", _action]; _actionsVar = _unit getVariable [_name, [-1, [-1, [], []]]]; @@ -55,7 +56,7 @@ if (_actionID == -1) then { false, true, '%1', - ""if (_this != AGM_player || {vehicle _this != _target}) exitWith {false}; _actions = (_this getVariable '%2') select 1 select 2; _count = count _actions; _index = 0; _return = false; while {_index < _count && {!_return}} do {_return = [_target, _this] call ((_actions select _index) select 0); _index = _index + 1}; _return"" + ""if (_this != ACE_player || {vehicle _this != _target}) exitWith {false}; _actions = (_this getVariable '%2') select 1 select 2; _count = count _actions; _index = 0; _return = false; while {_index < _count && {!_return}} do {_return = [_target, _this] call ((_actions select _index) select 0); _index = _index + 1}; _return"" ]", _action, _name diff --git a/addons/core/functions/fnc_addActionMenuEventHandler.sqf b/addons/core/functions/fnc_addActionMenuEventHandler.sqf index 9819c84271..249ee7e1cd 100644 --- a/addons/core/functions/fnc_addActionMenuEventHandler.sqf +++ b/addons/core/functions/fnc_addActionMenuEventHandler.sqf @@ -16,6 +16,7 @@ * Return value: * ID of the action (used to remove it later). */ +#include "script_component.hpp" private ["_unit", "_displayName", "_action", "_condition", "_statement", "_condition2", "_statement2", "_priority", "_name", "_actionsVar", "_id", "_actionIDs", "_actions", "_nameVar", "_addAction", "_actionID"]; @@ -46,7 +47,7 @@ if (typeName _statement2 == "STRING") then { _statement2 = compile _statement2; }; -_name = format ["AGM_ActionMenu_%1", _action]; +_name = format ["ACE_ActionMenu_%1", _action]; _actionsVar = _unit getVariable [_name, [-1, [], []]]; @@ -68,7 +69,7 @@ _addAction = call compile format [ false, true, '%1', - ""if (_this != AGM_player || {vehicle _this != _target}) exitWith {false}; [_target, _this] call (%3 select 0)"" + ""if (_this != ACE_player || {vehicle _this != _target}) exitWith {false}; [_target, _this] call (%3 select 0)"" ]", _action, _displayName, diff --git a/addons/core/functions/fnc_addCameraEventHandler.sqf b/addons/core/functions/fnc_addCameraEventHandler.sqf index 281b0366ec..45fdb3bdca 100644 --- a/addons/core/functions/fnc_addCameraEventHandler.sqf +++ b/addons/core/functions/fnc_addCameraEventHandler.sqf @@ -10,6 +10,7 @@ * Return value: * ID of the event script (used to remove it later). */ +#include "script_component.hpp" private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"]; @@ -19,20 +20,20 @@ if (typeName _statement == "STRING") then { _statement = compile _statement; }; -_actionsVar = missionNamespace getVariable ["AGM_EventHandler_CameraMode", [-1, [], []]]; +_actionsVar = missionNamespace getVariable ["ACE_EventHandler_CameraMode", [-1, [], []]]; _id = (_actionsVar select 0) + 1; _actionIDs = _actionsVar select 1; _actions = _actionsVar select 2; if (_id == 0) then { - uiNamespace setVariable ["AGM_EventHandler_CameraMode", cameraView]; - ("AGM_EventHandlerHelper" call BIS_fnc_rscLayer) cutRsc ["AGM_EventHandlerHelper", "PLAIN"]; + uiNamespace setVariable ["ACE_EventHandler_CameraMode", cameraView]; + (QGVAR(EventHandlerHelper) call BIS_fnc_rscLayer) cutRsc [QGVAR(EventHandlerHelper), "PLAIN"]; }; _actionIDs pushBack _id; _actions pushBack _statement; -missionNamespace setVariable ["AGM_EventHandler_CameraMode", [_id, _actionIDs, _actions]]; +missionNamespace setVariable ["ACE_EventHandler_CameraMode", [_id, _actionIDs, _actions]]; _id diff --git a/addons/core/functions/fnc_addCustomEventHandler.sqf b/addons/core/functions/fnc_addCustomEventHandler.sqf index 55bcd722ae..e31730dbb3 100644 --- a/addons/core/functions/fnc_addCustomEventHandler.sqf +++ b/addons/core/functions/fnc_addCustomEventHandler.sqf @@ -11,6 +11,7 @@ * Return value: * ID of the event script (used to remove it later). */ +#include "script_component.hpp" private ["_object", "_type", "_statement", "_name", "_actionsVar", "_id", "_actionIDs", "_actions"]; @@ -22,7 +23,7 @@ if (typeName _statement == "STRING") then { _statement = compile _statement; }; -_name = format ["AGM_CustomEventHandlers_%1", _type]; +_name = format ["ACE_CustomEventHandlers_%1", _type]; _actionsVar = _object getVariable [_name, [-1, [], []]]; diff --git a/addons/core/functions/fnc_addInfoDisplayEventHandler.sqf b/addons/core/functions/fnc_addInfoDisplayEventHandler.sqf index 2cb4e6ea73..d80c8b7fec 100644 --- a/addons/core/functions/fnc_addInfoDisplayEventHandler.sqf +++ b/addons/core/functions/fnc_addInfoDisplayEventHandler.sqf @@ -10,10 +10,11 @@ * Return value: * ID of the event script (used to remove it later). */ +#include "script_component.hpp" private ["_type", "_statement", "_actionsVar", "_id", "_actionIDs", "_actions"]; -_type = format ["AGM_onLoadInfo%1", _this select 0]; +_type = format ["ACE_onLoadInfo%1", _this select 0]; _statement = _this select 1; if (typeName _statement == "STRING") then { diff --git a/addons/core/functions/fnc_addInventoryDisplayLoadedEventHandler.sqf b/addons/core/functions/fnc_addInventoryDisplayLoadedEventHandler.sqf index b9b49551b0..60681e066c 100644 --- a/addons/core/functions/fnc_addInventoryDisplayLoadedEventHandler.sqf +++ b/addons/core/functions/fnc_addInventoryDisplayLoadedEventHandler.sqf @@ -9,6 +9,7 @@ * Return value: * ID of the event script (used to remove it later). */ +#include "script_component.hpp" private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"]; @@ -18,7 +19,7 @@ if (typeName _statement == "STRING") then { _statement = compile _statement; }; -_actionsVar = missionNamespace getVariable ["AGM_onLoadInventory", [-1, [], []]]; +_actionsVar = missionNamespace getVariable ["ACE_onLoadInventory", [-1, [], []]]; _id = (_actionsVar select 0) + 1; _actionIDs = _actionsVar select 1; @@ -27,6 +28,6 @@ _actions = _actionsVar select 2; _actionIDs pushBack _id; _actions pushBack _statement; -missionNamespace setVariable ["AGM_onLoadInventory", [_id, _actionIDs, _actions]]; +missionNamespace setVariable ["ACE_onLoadInventory", [_id, _actionIDs, _actions]]; _id diff --git a/addons/core/functions/fnc_addMapMarkerCreatedEventHandler.sqf b/addons/core/functions/fnc_addMapMarkerCreatedEventHandler.sqf index fbcddbe5c3..64ce3e9735 100644 --- a/addons/core/functions/fnc_addMapMarkerCreatedEventHandler.sqf +++ b/addons/core/functions/fnc_addMapMarkerCreatedEventHandler.sqf @@ -9,6 +9,7 @@ * Return value: * ID of the event script (used to remove it later). */ +#include "script_component.hpp" private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"]; @@ -18,20 +19,20 @@ if (typeName _statement == "STRING") then { _statement = compile _statement; }; -_actionsVar = missionNamespace getVariable ["AGM_EventHandler_MapMarker", [-1, [], []]]; +_actionsVar = missionNamespace getVariable ["ACE_EventHandler_MapMarker", [-1, [], []]]; _id = (_actionsVar select 0) + 1; _actionIDs = _actionsVar select 1; _actions = _actionsVar select 2; if (_id == 0) then { - uiNamespace setVariable ["AGM_EventHandler_MapMarker", count allMapMarkers]; - ("AGM_EventHandlerHelper2" call BIS_fnc_rscLayer) cutRsc ["AGM_EventHandlerHelper2", "PLAIN"]; + uiNamespace setVariable ["ACE_EventHandler_MapMarker", count allMapMarkers]; + ("ACE_EventHandlerHelper2" call BIS_fnc_rscLayer) cutRsc ["ACE_EventHandlerHelper2", "PLAIN"]; }; _actionIDs pushBack _id; _actions pushBack _statement; -missionNamespace setVariable ["AGM_EventHandler_MapMarker", [_id, _actionIDs, _actions]]; +missionNamespace setVariable ["ACE_EventHandler_MapMarker", [_id, _actionIDs, _actions]]; _id diff --git a/addons/core/functions/fnc_addScrollWheelEventHandler.sqf b/addons/core/functions/fnc_addScrollWheelEventHandler.sqf index 33c4dd9acc..98444a160d 100644 --- a/addons/core/functions/fnc_addScrollWheelEventHandler.sqf +++ b/addons/core/functions/fnc_addScrollWheelEventHandler.sqf @@ -9,6 +9,7 @@ * Return value: * ID of the event script (used to remove it later). */ +#include "script_component.hpp" private ["_statement", "_actionsVar", "_id", "_actionIDs", "_actions"]; @@ -18,7 +19,7 @@ if (typeName _statement == "STRING") then { _statement = compile _statement; }; -_actionsVar = missionNamespace getVariable ["AGM_EventHandler_ScrollWheel", [-1, [], []]]; +_actionsVar = missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]]; _id = (_actionsVar select 0) + 1; _actionIDs = _actionsVar select 1; @@ -27,6 +28,6 @@ _actions = _actionsVar select 2; _actionIDs pushBack _id; _actions pushBack _statement; -missionNamespace setVariable ["AGM_EventHandler_ScrollWheel", [_id, _actionIDs, _actions]]; +missionNamespace setVariable ["ACE_EventHandler_ScrollWheel", [_id, _actionIDs, _actions]]; _id diff --git a/addons/core/functions/fnc_addUnloadEventhandler.sqf b/addons/core/functions/fnc_addUnloadEventhandler.sqf index 583879848a..0d1606aaf6 100644 --- a/addons/core/functions/fnc_addUnloadEventhandler.sqf +++ b/addons/core/functions/fnc_addUnloadEventhandler.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" private "_dlg"; @@ -7,6 +8,6 @@ _dlg = ctrlParent _this; _dlg displayAddEventHandler ["unload", { if (_this select 1 == 1) then { - [missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call AGM_CuratorFix_fnc_fixCrateContent; + [missionnamespace getvariable ["BIS_fnc_initCuratorAttributes_target", objNull]] call FUNC(fixCrateContent); }; }]; diff --git a/addons/core/functions/fnc_adminKick.sqf b/addons/core/functions/fnc_adminKick.sqf index c53d228da5..bc9afd9fcb 100644 --- a/addons/core/functions/fnc_adminKick.sqf +++ b/addons/core/functions/fnc_adminKick.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" private "_name"; diff --git a/addons/core/functions/fnc_ambientBrightness.sqf b/addons/core/functions/fnc_ambientBrightness.sqf index f3ec3d4bfe..034129735a 100644 --- a/addons/core/functions/fnc_ambientBrightness.sqf +++ b/addons/core/functions/fnc_ambientBrightness.sqf @@ -9,5 +9,6 @@ * Return value: * Ambient brightness (Number) */ +#include "script_component.hpp" sunOrMoon * sunOrMoon + moonIntensity/5 min 1 diff --git a/addons/core/functions/fnc_applyForceWalkStatus.sqf b/addons/core/functions/fnc_applyForceWalkStatus.sqf index 54c78a2977..0f8ffb58ea 100644 --- a/addons/core/functions/fnc_applyForceWalkStatus.sqf +++ b/addons/core/functions/fnc_applyForceWalkStatus.sqf @@ -13,12 +13,13 @@ Returns: None Example: - [AGM_Player] call FUNC(applyForceWalkStatus) + [ACE_Player] call FUNC(applyForceWalkStatus) */ +#include "script_component.hpp" private ["_unit", "_forceWalkNumber"]; _unit = _this select 0; -_forceWalkNumber = _unit getVariable ["AGM_forceWalkStatusNumber", 0]; +_forceWalkNumber = _unit getVariable ["ACE_forceWalkStatusNumber", 0]; _unit forceWalk (_forceWalkNumber > 0); diff --git a/addons/core/functions/fnc_binarizeNumber.sqf b/addons/core/functions/fnc_binarizeNumber.sqf index d0ec7fe3b8..11334083f8 100644 --- a/addons/core/functions/fnc_binarizeNumber.sqf +++ b/addons/core/functions/fnc_binarizeNumber.sqf @@ -10,6 +10,7 @@ * Return value: * Booleans (Array) */ +#include "script_component.hpp" private ["_number", "_minLength", "_array", "_index", "_rest"]; diff --git a/addons/core/functions/fnc_callCustomEventHandlers.sqf b/addons/core/functions/fnc_callCustomEventHandlers.sqf index b028102e7f..4b822e0754 100644 --- a/addons/core/functions/fnc_callCustomEventHandlers.sqf +++ b/addons/core/functions/fnc_callCustomEventHandlers.sqf @@ -11,6 +11,7 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_object", "_type", "_argument", "_name", "_actions"]; @@ -20,7 +21,7 @@ _argument = _this select 2; if (isNil "_argument") then {_argument = [_object]}; -_name = format ["AGM_CustomEventHandlers_%1", _type]; +_name = format ["ACE_CustomEventHandlers_%1", _type]; _actions = (_object getVariable [_name, [-1, [], []]]) select 2; diff --git a/addons/core/functions/fnc_callCustomEventHandlersGlobal.sqf b/addons/core/functions/fnc_callCustomEventHandlersGlobal.sqf index 7195f70316..e1dddd5916 100644 --- a/addons/core/functions/fnc_callCustomEventHandlersGlobal.sqf +++ b/addons/core/functions/fnc_callCustomEventHandlersGlobal.sqf @@ -11,5 +11,6 @@ * Return value: * None. */ +#include "script_component.hpp" [_this, QUOTE(FUNC(callCustomEventHandlers)), 2] call FUNC(execRemoteFnc); diff --git a/addons/core/functions/fnc_canGetInPosition.sqf b/addons/core/functions/fnc_canGetInPosition.sqf index a4ca107cf9..859d8ed461 100644 --- a/addons/core/functions/fnc_canGetInPosition.sqf +++ b/addons/core/functions/fnc_canGetInPosition.sqf @@ -14,6 +14,7 @@ * Return Value: * Nothing */ +#include "script_component.hpp" #define CANGETINDRIVER (isNull (driver _vehicle) || {!alive driver _vehicle}) && {!lockedDriver _vehicle} && {getNumber (_config >> "isUav") != 1} #define CANGETINTURRETINDEX (isNull (_vehicle turretUnit _turret) || {!alive (_vehicle turretUnit _turret)}) && {!(_vehicle lockedTurret _turret)} && {getNumber (_config >> "isUav") != 1} diff --git a/addons/core/functions/fnc_canInteractWith.sqf b/addons/core/functions/fnc_canInteractWith.sqf index 1550fcc031..9c5405452e 100644 --- a/addons/core/functions/fnc_canInteractWith.sqf +++ b/addons/core/functions/fnc_canInteractWith.sqf @@ -1,10 +1,11 @@ // by commy2 +#include "script_component.hpp" private ["_unit", "_target", "_owner"]; _unit = _this select 0; _target = _this select 1; -_owner = _target getVariable ["AGM_isUsedBy", objNull]; +_owner = _target getVariable ["ACE_isUsedBy", objNull]; isNull _owner || {_unit == _owner} || {!isPlayer _owner} diff --git a/addons/core/functions/fnc_canUseWeapon.sqf b/addons/core/functions/fnc_canUseWeapon.sqf index 038e9b716a..cbb33f1905 100644 --- a/addons/core/functions/fnc_canUseWeapon.sqf +++ b/addons/core/functions/fnc_canUseWeapon.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" // returns true if the unit is on foot or in a ffv position diff --git a/addons/core/functions/fnc_changeProjectileDirection.sqf b/addons/core/functions/fnc_changeProjectileDirection.sqf index a70d443d01..04154da9c1 100644 --- a/addons/core/functions/fnc_changeProjectileDirection.sqf +++ b/addons/core/functions/fnc_changeProjectileDirection.sqf @@ -12,6 +12,7 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_projectile", "_adjustDir", "_adjustUp", "_adjustSpeed", "_vdir", "_dir", "_up", "_l", "_r", "_vup", "_vel"]; @@ -24,7 +25,7 @@ if (isNil "_adjustSpeed") then { _adjustSpeed = 0; }; -["CPD", [_fnc_scriptNameParent, _adjustDir, _adjustUp, _adjustSpeed], nil, false] call AGM_Debug_fnc_log; +["CPD", [_fnc_scriptNameParent, _adjustDir, _adjustUp, _adjustSpeed], nil, false] call FUNC(log); // get old direction vector _vdir = vectorDir _projectile; @@ -41,7 +42,7 @@ _vdir = [ ]; // get best up vector -_l = sqrt ((_vdir select 0) ^ 2 + (_vdir select 1) ^ 2); if (_l == 0) then {diag_log text format ["[AGM] ERROR: %1, %2, %3, %4, %5, %6, %7", _projectile, _adjustDir, _adjustUp, vectorDir _projectile, _vdir, _dir, _up]}; +_l = sqrt ((_vdir select 0) ^ 2 + (_vdir select 1) ^ 2); if (_l == 0) then {diag_log text format ["[ACE] ERROR: %1, %2, %3, %4, %5, %6, %7", _projectile, _adjustDir, _adjustUp, vectorDir _projectile, _vdir, _dir, _up]}; _r = -(_vdir select 2) / _l; _vup = [ diff --git a/addons/core/functions/fnc_checkPBOs.sqf b/addons/core/functions/fnc_checkPBOs.sqf index 5b3cf1ed13..7c4aaeba13 100644 --- a/addons/core/functions/fnc_checkPBOs.sqf +++ b/addons/core/functions/fnc_checkPBOs.sqf @@ -14,6 +14,7 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_mode", "_checkAll", "_whitelist", "_logic"]; diff --git a/addons/core/functions/fnc_claim.sqf b/addons/core/functions/fnc_claim.sqf index c92f9aa8d5..cf960ac462 100644 --- a/addons/core/functions/fnc_claim.sqf +++ b/addons/core/functions/fnc_claim.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" private ["_unit", "_target", "_lockTarget", "_owner"]; @@ -8,20 +9,20 @@ _lockTarget = _this select 2; if (isNil "_lockTarget") then {_lockTarget = false}; -_owner = _target getVariable ["AGM_isUsedBy", objNull]; +_owner = _target getVariable ["ACE_isUsedBy", objNull]; if (!isNull _owner && {!isNull _unit} && {_unit != _owner}) then { - diag_log text "[AGM] ERROR: Claiming already owned object."; + diag_log text "[ACE] ERROR: Claiming already owned object."; }; -_target setVariable ["AGM_isUsedBy", _unit, true]; +_target setVariable ["ACE_isUsedBy", _unit, true]; if (_lockTarget) then { if (!isNull _unit) then { - [_target, "{_locked = locked _this; _this setVariable ['AGM_lockStatus', _locked]; _this lock 2}", _target] call FUNC(execRemoteFnc); + [_target, "{_locked = locked _this; _this setVariable ['ACE_lockStatus', _locked]; _this lock 2}", _target] call FUNC(execRemoteFnc); } else { - [_target, "{_this lock (_this getVariable ['AGM_lockStatus', locked _this])}", _target] call FUNC(execRemoteFnc); + [_target, "{_this lock (_this getVariable ['ACE_lockStatus', locked _this])}", _target] call FUNC(execRemoteFnc); }; }; -//systemChat str locked _target; systemChat str (_target getVariable ['AGM_lockStatus', locked _target]); +//systemChat str locked _target; systemChat str (_target getVariable ['ACE_lockStatus', locked _target]); diff --git a/addons/core/functions/fnc_closeDialogIfTargetMoves.sqf b/addons/core/functions/fnc_closeDialogIfTargetMoves.sqf index 72d5efd337..c701db6a02 100644 --- a/addons/core/functions/fnc_closeDialogIfTargetMoves.sqf +++ b/addons/core/functions/fnc_closeDialogIfTargetMoves.sqf @@ -10,6 +10,7 @@ * Return Value: * None */ +#include "script_component.hpp" _this spawn { _target = _this select 0; @@ -17,21 +18,21 @@ _this spawn { if (isNil "_ignoreDead") then {_ignoreDead = false}; _vehicleTarget = vehicle _target; - _vehiclePlayer = vehicle AGM_player; + _vehiclePlayer = vehicle ACE_player; _inVehicle = _target != _vehicleTarget; _position = getPosASL _target; _fnc_check = { // either unit changed vehicles - if (_vehiclePlayer != vehicle AGM_player) exitWith {True}; + if (_vehiclePlayer != vehicle ACE_player) exitWith {True}; if (_vehicleTarget != vehicle _target) exitWith {True}; // target died if (!alive _target && {!_ignoreDead}) exitWith {True}; // player fell unconscious - if (AGM_player getVariable ["AGM_isUnconscious", False]) exitWith {True}; + if (ACE_player getVariable ["ACE_isUnconscious", False]) exitWith {True}; // target moved (outside of vehicle) (!_inVehicle && {getPosASL _target distanceSqr _position > 1}) @@ -40,8 +41,8 @@ _this spawn { waitUntil { if (call _fnc_check) then { closeDialog 0; - call AGM_Interaction_fnc_hideMenu; + call ACE_Interaction_fnc_hideMenu; }; - (isNil "AGM_Interaction_MainButton" && !dialog) || {!isNull (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull])} //Exit loop if DisableMouse dialog open + (isNil "ACE_Interaction_MainButton" && !dialog) || {!isNull (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull])} //Exit loop if DisableMouse dialog open }; }; diff --git a/addons/core/functions/fnc_codeToLetter.sqf b/addons/core/functions/fnc_codeToLetter.sqf index 78f4e84eef..8e8a9c8a3e 100644 --- a/addons/core/functions/fnc_codeToLetter.sqf +++ b/addons/core/functions/fnc_codeToLetter.sqf @@ -1,3 +1,4 @@ // by commy2 +#include "script_component.hpp" ["", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] select ([2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 44, 21] find (_this select 0)) + 1 diff --git a/addons/core/functions/fnc_codeToString.sqf b/addons/core/functions/fnc_codeToString.sqf index 943696e32a..440cacc5a3 100644 --- a/addons/core/functions/fnc_codeToString.sqf +++ b/addons/core/functions/fnc_codeToString.sqf @@ -2,13 +2,14 @@ * Author: commy2 * * Removes the brackets around a code and returns the code as a string. It does nothing if the code is already a string. - * + * * Argument: * 0: Code (Code or String) - * + * * Return value: * Code (String) */ +#include "script_component.hpp" private "_function"; diff --git a/addons/core/functions/fnc_convertKeyCode.sqf b/addons/core/functions/fnc_convertKeyCode.sqf index 45ba78c02e..a8af25401c 100644 --- a/addons/core/functions/fnc_convertKeyCode.sqf +++ b/addons/core/functions/fnc_convertKeyCode.sqf @@ -1,17 +1,18 @@ /* * Author: commy2 * - * Get a key code used in AGM key input eh. - * + * Get a key code used in ACE key input eh. + * * Argument: * 0: Arma DIK code (Number) * 1: Key state for shift left and shift right key (Bool) * 2: Key state for ctrl left and ctrl right key (Bool) * 3: Key state for alt and alt gr key (Bool) - * + * * Return value: * Key code (Number) */ +#include "script_component.hpp" #define KEY_MODIFIERS [42, 54, 29, 157, 56, 184] diff --git a/addons/core/functions/fnc_currentChannel.sqf b/addons/core/functions/fnc_currentChannel.sqf index 0be751367d..115364fb24 100644 --- a/addons/core/functions/fnc_currentChannel.sqf +++ b/addons/core/functions/fnc_currentChannel.sqf @@ -2,15 +2,16 @@ * Author: commy2 * * Returns the current radio / chat / marker channel. - * + * * Argument: * NONE. - * + * * Return value: * The current channel. Can be "group", "side", "global", "command", "vehicle" or "direct" (String) */ +#include "script_component.hpp" #define CHANNELS ["group", "side", "global", "command", "vehicle", "direct"] #define CHANNELS_LOCALIZED [localize "str_channel_group", localize "str_channel_side", localize "str_channel_global", localize "str_channel_command", localize "str_channel_vehicle", localize "str_channel_direct"] -CHANNELS select (CHANNELS_LOCALIZED find (uiNamespace getVariable ["AGM_currentChannel", ""])) max 0 +CHANNELS select (CHANNELS_LOCALIZED find (uiNamespace getVariable ["ACE_currentChannel", ""])) max 0 diff --git a/addons/core/functions/fnc_disableUserInput.sqf b/addons/core/functions/fnc_disableUserInput.sqf index 12b3aae23c..923575dd97 100644 --- a/addons/core/functions/fnc_disableUserInput.sqf +++ b/addons/core/functions/fnc_disableUserInput.sqf @@ -9,6 +9,7 @@ * Return value: * Nothing */ +#include "script_component.hpp" private ["_state", "_dlg"]; @@ -18,13 +19,13 @@ if (_state) then { disableSerialization; if (!isNull (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull])) exitWith {}; - if ("AGM_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call FUNC(map))) exitWith {}; + if ("ACE_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call FUNC(map))) exitWith {}; // end TFAR and ACRE2 radio transmissions 0 spawn FUNC(endRadioTransmission); // Close map - if (visibleMap && {!(player getVariable ["AGM_canSwitchUnits", false])}) then {openMap false}; + if (visibleMap && {!(player getVariable ["ACE_canSwitchUnits", false])}) then {openMap false}; closeDialog 0; createDialog QGVAR(DisableMouse_Dialog); @@ -63,9 +64,9 @@ if (_state) then { if (_key in actionKeys "TeamSwitch" && {teamSwitchEnabled}) then {(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0; teamSwitch};//_acc = accTime; teamSwitch; setAccTime _acc}; if (_key in actionKeys "CuratorInterface" && {getAssignedCuratorLogic player in allCurators}) then {(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0; openCuratorInterface}; - if (_key in actionKeys "ShowMap" && {player getVariable ["AGM_canSwitchUnits", false]}) then {(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0; openMap true}; + if (_key in actionKeys "ShowMap" && {player getVariable ["ACE_canSwitchUnits", false]}) then {(uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0; openMap true}; - if (serverCommandAvailable "#missions" || {player getVariable ["AGM_isUnconscious", false] && {(call FUNC(player)) getVariable ["AGM_Medical_AllowChatWhileUnconscious", missionNamespace getVariable ["AGM_Medical_AllowChatWhileUnconscious", false]]}}) then { + if (serverCommandAvailable "#missions" || {player getVariable ["ACE_isUnconscious", false] && {(call FUNC(player)) getVariable [QEGVAR(medical,AllowChatWhileUnconscious), missionNamespace getVariable [QEGVAR(medical,AllowChatWhileUnconscious), false]]}}) then { if (!(_key in (actionKeys "DefaultAction" + actionKeys "Throw")) && {_key in (actionKeys "Chat" + actionKeys "PrevChannel" + actionKeys "NextChannel")}) then { _key = 0; }; @@ -75,15 +76,15 @@ if (_state) then { }]; _dlg displayAddEventHandler ["KeyUp", {true}]; - ["AGM_DisableUserInput", "onEachFrame", { + ["ACE_DisableUserInput", "onEachFrame", { if (isNull (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) && {!visibleMap && isNull findDisplay 49 && isNull findDisplay 312 && isNull findDisplay 632}) then { - ["AGM_DisableUserInput", "onEachFrame"] call BIS_fnc_removeStackedEventHandler; + ["ACE_DisableUserInput", "onEachFrame"] call BIS_fnc_removeStackedEventHandler; [true] call FUNC(disableUserInput); }; }] call BIS_fnc_addStackedEventHandler; } else { - if ("AGM_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call FUNC(map))) then { - ["AGM_DisableUserInput", "onEachFrame"] call BIS_fnc_removeStackedEventHandler; + if ("ACE_DisableUserInput" in ([BIS_stackedEventHandlers_onEachFrame, {_this select 0}] call FUNC(map))) then { + ["ACE_DisableUserInput", "onEachFrame"] call BIS_fnc_removeStackedEventHandler; }; (uiNamespace getVariable [QGVAR(dlgDisableMouse), displayNull]) closeDisplay 0; diff --git a/addons/core/functions/fnc_displayText.sqf b/addons/core/functions/fnc_displayText.sqf index 89f0a44948..c6a68cbab2 100644 --- a/addons/core/functions/fnc_displayText.sqf +++ b/addons/core/functions/fnc_displayText.sqf @@ -12,6 +12,7 @@ * Return value: * Nothing */ +#include "script_component.hpp" #define DEFAULT_PLAY_SOUND false #define DEFAULT_DELAY 2 @@ -42,7 +43,7 @@ _this spawn { _time = time; if (_time > _lastHintTime + _delay || {_priority >= _lastHintPriority}) then { hintSilent _text; - if (_sound) then {playSound "AGM_Sound_Click"}; + if (_sound) then {playSound "ACE_Sound_Click"}; GVAR(lastHint) set [0, _time]; GVAR(lastHint) set [1, _priority]; diff --git a/addons/core/functions/fnc_displayTextPicture.sqf b/addons/core/functions/fnc_displayTextPicture.sqf index 7da5095c9e..8d46d8d38e 100644 --- a/addons/core/functions/fnc_displayTextPicture.sqf +++ b/addons/core/functions/fnc_displayTextPicture.sqf @@ -10,6 +10,7 @@ * Return value: * Nothing */ +#include "script_component.hpp" private ["_text", "_image"]; diff --git a/addons/core/functions/fnc_displayTextStructured.sqf b/addons/core/functions/fnc_displayTextStructured.sqf index 4c7b2970a6..62db6a829f 100644 --- a/addons/core/functions/fnc_displayTextStructured.sqf +++ b/addons/core/functions/fnc_displayTextStructured.sqf @@ -10,6 +10,7 @@ * Return value: * Nothing */ +#include "script_component.hpp" private ["_text", "_size", "_isShown", "_ctrlHint"]; @@ -22,12 +23,12 @@ if (typeName _text != "TEXT") then { _text = composeText [lineBreak, parseText format ["%1", _text]]; }; -_isShown = ctrlShown (uiNamespace getVariable ["AGM_ctrlHint", controlNull]); +_isShown = ctrlShown (uiNamespace getVariable ["ACE_ctrlHint", controlNull]); -("AGM_RscHint" call BIS_fnc_rscLayer) cutRsc ["AGM_RscHint", "PLAIN", 0, true]; +("ACE_RscHint" call BIS_fnc_rscLayer) cutRsc ["ACE_RscHint", "PLAIN", 0, true]; disableSerialization; -_ctrlHint = uiNamespace getVariable "AGM_ctrlHint"; +_ctrlHint = uiNamespace getVariable "ACE_ctrlHint"; _ctrlHint ctrlSetPosition [ safeZoneW + safeZoneX - 0 * safezoneW, diff --git a/addons/core/functions/fnc_doAnimation.sqf b/addons/core/functions/fnc_doAnimation.sqf index ef0c74d94c..969a57fd6d 100644 --- a/addons/core/functions/fnc_doAnimation.sqf +++ b/addons/core/functions/fnc_doAnimation.sqf @@ -14,6 +14,7 @@ * Return value: * Nothing */ +#include "script_component.hpp" private ["_unit", "_animation", "_priority", "_force"]; @@ -24,7 +25,7 @@ _force = False; // no animation given if (isNil "_animation") exitWith { - diag_log format ["[AGM] ERROR: No animation specified in %1", _fnc_scriptNameParent]; + diag_log format ["[ACE] ERROR: No animation specified in %1", _fnc_scriptNameParent]; }; if (isNil "_priority") then { @@ -35,14 +36,14 @@ if (count _this > 3) then { }; // don't overwrite more important animations -if (_unit getVariable ["AGM_isUnconscious", false] && {!_force}) exitWith { +if (_unit getVariable ["ACE_isUnconscious", false] && {!_force}) exitWith { if (_animation != "Unconscious") then { [_unit, "Unconscious", 2] call FUNC(doAnimation); }; }; // don't go unconscious if the unit isn't unconscious -if (_animation == "Unconscious" && {!(_unit getVariable ["AGM_isUnconscious", false])}) exitWith {}; +if (_animation == "Unconscious" && {!(_unit getVariable ["ACE_isUnconscious", false])}) exitWith {}; // switchMove "" no longer works in dev 1.37 if (_animation == "") then { @@ -73,4 +74,4 @@ switch (_priority) do { default {}; }; -["Anim", [_priority, _animation]] call AGM_Debug_fnc_log; +["Anim", [_priority, _animation]] call FUNC(log); diff --git a/addons/core/functions/fnc_endRadioTransmission.sqf b/addons/core/functions/fnc_endRadioTransmission.sqf index 7cf764b6c5..990d4e03d8 100644 --- a/addons/core/functions/fnc_endRadioTransmission.sqf +++ b/addons/core/functions/fnc_endRadioTransmission.sqf @@ -10,6 +10,7 @@ * None. * */ +#include "script_component.hpp" // ACRE if (isClass (configFile >> "CfgPatches" >> "acre_main")) then { diff --git a/addons/core/functions/fnc_execPersistentFnc.sqf b/addons/core/functions/fnc_execPersistentFnc.sqf index 5ca2f3ed43..248d35636e 100644 --- a/addons/core/functions/fnc_execPersistentFnc.sqf +++ b/addons/core/functions/fnc_execPersistentFnc.sqf @@ -12,6 +12,7 @@ * Return value: * Nothing. */ +#include "script_component.hpp" private ["_arguments", "_function", "_unit", "_name"]; @@ -22,7 +23,7 @@ _function = call compile (_this select 1); _unit = _this select 2; _name = _this select 3; -["Remote", [_arguments, _this select 1, _name], {format ["%1 call %2 id: %3", _this select 0, _this select 1, _this select 2]}, false] call AGM_Debug_fnc_log; +["Remote", [_arguments, _this select 1, _name], {format ["%1 call %2 id: %3", _this select 0, _this select 1, _this select 2]}, false] call FUNC(log); // execute function on every currently connected machine [[_arguments, _unit], _this select 1, 2] call FUNC(execRemoteFnc); @@ -30,7 +31,7 @@ _name = _this select 3; // save persistent function for JIP private ["_persistentFunctions", "_index"]; -_persistentFunctions = _unit getVariable ["AGM_PersistentFunctions", []]; +_persistentFunctions = _unit getVariable ["ACE_PersistentFunctions", []]; // find index to overwrite function with the same name, add to end otherwise _index = count _persistentFunctions; @@ -45,8 +46,8 @@ _persistentFunctions set [_index, [_arguments, _function, _name]]; // broadcast variable if (typeName _unit == "NAMESPACE") then { - AGM_PersistentFunctions = _persistentFunctions; - publicVariable "AGM_PersistentFunctions"; + ACE_PersistentFunctions = _persistentFunctions; + publicVariable "ACE_PersistentFunctions"; } else { - _unit setVariable ["AGM_PersistentFunctions", _persistentFunctions, true]; + _unit setVariable ["ACE_PersistentFunctions", _persistentFunctions, true]; }; diff --git a/addons/core/functions/fnc_execRemoteFnc.sqf b/addons/core/functions/fnc_execRemoteFnc.sqf index 4f14d46890..111dbbdc0c 100644 --- a/addons/core/functions/fnc_execRemoteFnc.sqf +++ b/addons/core/functions/fnc_execRemoteFnc.sqf @@ -15,6 +15,7 @@ * Return value: * Nothing */ +#include "script_component.hpp" private ["_arguments", "_function", "_unit", "_id"]; @@ -28,7 +29,7 @@ if (isNil "_unit") then { _unit = 2; }; -["Remote", [_arguments, _this select 1, _unit], {format ["%1 call %2 to: %3", _this select 0, _this select 1, _this select 2]}, false] call AGM_Debug_fnc_log; +["Remote", [_arguments, _this select 1, _unit], {format ["%1 call %2 to: %3", _this select 0, _this select 1, _this select 2]}, false] call FUNC(log); if (typeName _unit == "SCALAR") exitWith { switch (_unit) do { diff --git a/addons/core/functions/fnc_executePersistent.sqf b/addons/core/functions/fnc_executePersistent.sqf index 9e2fab7b3d..80f29f35ad 100644 --- a/addons/core/functions/fnc_executePersistent.sqf +++ b/addons/core/functions/fnc_executePersistent.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" private "_target"; @@ -6,10 +7,10 @@ _target = _this select 0; { if (isNil "_x") then { - diag_log text format ["[AGM] ERROR: No argument and function for remote function. ID: %1", _forEachIndex]; + diag_log text format ["[ACE] ERROR: No argument and function for remote function. ID: %1", _forEachIndex]; } else { if (typeName _x == "ARRAY") then { [_x select 0, _target] call (_x select 1); }; }; -} forEach (_target getVariable ["AGM_PersistentFunctions", []]); +} forEach (_target getVariable ["ACE_PersistentFunctions", []]); diff --git a/addons/core/functions/fnc_exportConfig.sqf b/addons/core/functions/fnc_exportConfig.sqf index 9c28c36451..10c88d6bca 100644 --- a/addons/core/functions/fnc_exportConfig.sqf +++ b/addons/core/functions/fnc_exportConfig.sqf @@ -1,10 +1,10 @@ // by commy2 - /* usage: - (configFile >> "CfgAmmo") call AGM_Debug_fnc_exportConfig; + (configFile >> "CfgAmmo") call FUNC(exportConfig); */ +#include "script_component.hpp" private "_fnc_logEntries"; diff --git a/addons/core/functions/fnc_filter.sqf b/addons/core/functions/fnc_filter.sqf index febbb7f38a..23e28c5fc5 100644 --- a/addons/core/functions/fnc_filter.sqf +++ b/addons/core/functions/fnc_filter.sqf @@ -13,6 +13,7 @@ * Usage: * [[0,1,2,3,4], {_this > 2}] call FUNC(filter) ==> [3,4] */ +#include "script_component.hpp" private ["_array", "_code", "_newArray", "_index"]; @@ -20,7 +21,7 @@ _array = _this select 0; _code = _this select 1; if (isNil "_array") exitWith { - diag_log text format ["[AGM] ERROR: No array for function filter in %1", _fnc_scriptNameParent]; + diag_log text format ["[ACE] ERROR: No array for function filter in %1", _fnc_scriptNameParent]; [] }; diff --git a/addons/core/functions/fnc_fixCrateContent.sqf b/addons/core/functions/fnc_fixCrateContent.sqf index e79e570c30..3128f783d5 100644 --- a/addons/core/functions/fnc_fixCrateContent.sqf +++ b/addons/core/functions/fnc_fixCrateContent.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" private ["_crate", "_weapons", "_items"]; diff --git a/addons/core/functions/fnc_fixLoweredRifleAnimation.sqf b/addons/core/functions/fnc_fixLoweredRifleAnimation.sqf index 6a6e584305..55bc6865b0 100644 --- a/addons/core/functions/fnc_fixLoweredRifleAnimation.sqf +++ b/addons/core/functions/fnc_fixLoweredRifleAnimation.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" private "_unit"; diff --git a/addons/core/functions/fnc_getCaptivityStatus.sqf b/addons/core/functions/fnc_getCaptivityStatus.sqf index d2352f2098..dcd3d6b0ff 100644 --- a/addons/core/functions/fnc_getCaptivityStatus.sqf +++ b/addons/core/functions/fnc_getCaptivityStatus.sqf @@ -9,12 +9,13 @@ * Return value: * Reasons, why the unit is a captive. An empty array is returned if the unit is not a captive (Array of Strings) */ +#include "script_component.hpp" private ["_unit", "_captivityReasons", "_unitCaptivityStatus", "_unitCaptivityReasons"]; _unit = _this select 0; -_captivityReasons = missionNamespace getVariable ["AGM_captivityReasons", []]; +_captivityReasons = missionNamespace getVariable ["ACE_captivityReasons", []]; _unitCaptivityStatus = [captiveNum _unit, count _captivityReasons] call FUNC(binarizeNumber); diff --git a/addons/core/functions/fnc_getChildren.sqf b/addons/core/functions/fnc_getChildren.sqf index c230713e36..057b14ff40 100644 --- a/addons/core/functions/fnc_getChildren.sqf +++ b/addons/core/functions/fnc_getChildren.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" private ["_name", "_cfgClass", "_classes"]; diff --git a/addons/core/functions/fnc_getConfigCommander.sqf b/addons/core/functions/fnc_getConfigCommander.sqf index fd1863ae6b..5fca3af81c 100644 --- a/addons/core/functions/fnc_getConfigCommander.sqf +++ b/addons/core/functions/fnc_getConfigCommander.sqf @@ -2,13 +2,14 @@ * Author: commy2 * * Get the commander config of a vehicles turret. - * + * * Argument: * 0: vehicle type (String) - * + * * Return value: * Commander config (Config) */ +#include "script_component.hpp" private ["_vehicle", "_config", "_turret"]; diff --git a/addons/core/functions/fnc_getConfigGunner.sqf b/addons/core/functions/fnc_getConfigGunner.sqf index 1c13a2c99c..0c09461a04 100644 --- a/addons/core/functions/fnc_getConfigGunner.sqf +++ b/addons/core/functions/fnc_getConfigGunner.sqf @@ -2,13 +2,14 @@ * Author: commy2 * * Get the gunner config of a vehicles turret. - * + * * Argument: * 0: vehicle type (String) - * + * * Return value: * Gunner config (Config) */ +#include "script_component.hpp" private ["_vehicle", "_config", "_turret"]; diff --git a/addons/core/functions/fnc_getDefaultAnim.sqf b/addons/core/functions/fnc_getDefaultAnim.sqf index 1a2430af87..fd53668396 100644 --- a/addons/core/functions/fnc_getDefaultAnim.sqf +++ b/addons/core/functions/fnc_getDefaultAnim.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" private ["_unit", "_anim", "_stance"]; diff --git a/addons/core/functions/fnc_getDisplayConfigName.sqf b/addons/core/functions/fnc_getDisplayConfigName.sqf index 57eba31cf0..3ffc20de2f 100644 --- a/addons/core/functions/fnc_getDisplayConfigName.sqf +++ b/addons/core/functions/fnc_getDisplayConfigName.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" private ["_configName", "_index"]; diff --git a/addons/core/functions/fnc_getDoorTurrets.sqf b/addons/core/functions/fnc_getDoorTurrets.sqf index 8dd05861b3..eadaeb2000 100644 --- a/addons/core/functions/fnc_getDoorTurrets.sqf +++ b/addons/core/functions/fnc_getDoorTurrets.sqf @@ -2,30 +2,15 @@ * Author: bux578 * * Gets the turret index of door gunners - * + * * Argument: * 0: Vehicle type (String) - * + * * Return value: * Turret indexes of the door gunner. Empty array means no gunner position. (Array) */ +#include "script_component.hpp" - /* - Name: FUNC(getDoorTurrets) - - Author(s): - bux578 - - Description: - Returns the turret indices of door gunners - - Parameters: - 0: STRING - vehicle type - - Returns: - ARRAY -*/ - private ["_vehicleType", "_turrets", "_doorTurrets", "_config"]; _vehicleType = _this select 0; diff --git a/addons/core/functions/fnc_getForceWalkStatus.sqf b/addons/core/functions/fnc_getForceWalkStatus.sqf index be169761df..10a70546fb 100644 --- a/addons/core/functions/fnc_getForceWalkStatus.sqf +++ b/addons/core/functions/fnc_getForceWalkStatus.sqf @@ -13,16 +13,17 @@ Returns: ARRAY(of strings) - Reason why the unit is force walking Example: - [AGM_Player] call FUNC(getForceWalkStatus) + [ACE_Player] call FUNC(getForceWalkStatus) */ +#include "script_component.hpp" private ["_unit", "_forceWalkReasons", "_unitForceWalkNumber", "_unitForceWalkStatus", "_unitForceWalkReasons"]; _unit = _this select 0; -_forceWalkReasons = missionNamespace getVariable ["AGM_forceWalkReasons", []]; +_forceWalkReasons = missionNamespace getVariable ["ACE_forceWalkReasons", []]; -_unitForceWalkNumber = _unit getVariable ["AGM_forceWalkStatusNumber", 0]; +_unitForceWalkNumber = _unit getVariable ["ACE_forceWalkStatusNumber", 0]; _unitForceWalkStatus = [_unitForceWalkNumber, count _forceWalkReasons] call FUNC(binarizeNumber); diff --git a/addons/core/functions/fnc_getHitPoints.sqf b/addons/core/functions/fnc_getHitPoints.sqf index a6522348d1..a6d75e41b9 100644 --- a/addons/core/functions/fnc_getHitPoints.sqf +++ b/addons/core/functions/fnc_getHitPoints.sqf @@ -9,6 +9,7 @@ * Return Value: * The hitpoints (Array) */ +#include "script_component.hpp" private ["_vehicle", "_config", "_hitpoints"]; diff --git a/addons/core/functions/fnc_getHitPointsWithSelections.sqf b/addons/core/functions/fnc_getHitPointsWithSelections.sqf index 0b7133227c..e9a7a8fac5 100644 --- a/addons/core/functions/fnc_getHitPointsWithSelections.sqf +++ b/addons/core/functions/fnc_getHitPointsWithSelections.sqf @@ -9,6 +9,7 @@ * Return Value: * The hitpoints with selections. Format: [hitpoints, selections]. They correspond by index. (Array) */ +#include "script_component.hpp" private ["_vehicle", "_config", "_hitpoints", "_selections"]; diff --git a/addons/core/functions/fnc_getInPosition.sqf b/addons/core/functions/fnc_getInPosition.sqf index 6d2a40968d..0cfce1e124 100644 --- a/addons/core/functions/fnc_getInPosition.sqf +++ b/addons/core/functions/fnc_getInPosition.sqf @@ -13,6 +13,7 @@ * Return Value: * Nothing */ +#include "script_component.hpp" #define CANGETINDRIVER (isNull (driver _vehicle) || {!alive driver _vehicle}) && {!lockedDriver _vehicle} && {getNumber (_config >> "isUav") != 1} #define CANGETINTURRETINDEX (isNull (_vehicle turretUnit _turret) || {!alive (_vehicle turretUnit _turret)}) && {!(_vehicle lockedTurret _turret)} && {getNumber (_config >> "isUav") != 1} diff --git a/addons/core/functions/fnc_getMarkerType.sqf b/addons/core/functions/fnc_getMarkerType.sqf index 3d35cae56d..0324bf0ede 100644 --- a/addons/core/functions/fnc_getMarkerType.sqf +++ b/addons/core/functions/fnc_getMarkerType.sqf @@ -9,6 +9,7 @@ * Return Value: * Marker Type (string) */ +#include "script_component.hpp" _group = _this select 0; _leader = leader _group; @@ -34,8 +35,8 @@ if ( (getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "transportRepair") > 0) or (getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "transportFuel") > 0) or (getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "transportAmmo") > 0) or - (getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "AGM_canRepair") > 0) or - (getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "AGM_fuelCapacityCargo") > 0) + (getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "ACE_canRepair") > 0) or + (getNumber (configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "ACE_fuelCapacityCargo") > 0) ) exitWith { ["n_maint", "b_maint", "o_maint"] select ((["GUER", "WEST", "EAST"] find (str _side)) max 0) }; diff --git a/addons/core/functions/fnc_getName.sqf b/addons/core/functions/fnc_getName.sqf index 16ec94ab33..4d10ce052c 100644 --- a/addons/core/functions/fnc_getName.sqf +++ b/addons/core/functions/fnc_getName.sqf @@ -10,6 +10,7 @@ * Return value: * The name. */ +#include "script_component.hpp" private ["_unit", "_showEffective", "_name"]; @@ -23,7 +24,7 @@ if (isNil "_showEffective") then { _name = ""; if (_unit isKindOf "CAManBase") then { - _name = _unit getVariable ["AGM_Name", localize QUOTE(DOUBLES(STR,GVAR(Unknown)))]; + _name = _unit getVariable ["ACE_Name", localize QUOTE(DOUBLES(STR,GVAR(Unknown)))]; } else { if (_showEffective) then { _name = [effectiveCommander _unit] call FUNC(getName); diff --git a/addons/core/functions/fnc_getNumberFromMissionSQM.sqf b/addons/core/functions/fnc_getNumberFromMissionSQM.sqf index 47524d7cb6..1c9fbda77d 100644 --- a/addons/core/functions/fnc_getNumberFromMissionSQM.sqf +++ b/addons/core/functions/fnc_getNumberFromMissionSQM.sqf @@ -2,13 +2,14 @@ * Author: commy2 * * Get a number from the mission.sqm file. Mission has to be saved in the Editor. - * + * * Argument: * 0: Path of the entry in the mission.sqm (Array) - * + * * Return value: * Value of the entry. Note: If the entry does not exist, it might return 0 or an entry with the same name of another class! (Number) */ +#include "script_component.hpp" private "_number"; diff --git a/addons/core/functions/fnc_getPitchBankYaw.sqf b/addons/core/functions/fnc_getPitchBankYaw.sqf index 95f9846e9a..2a9b0bacd1 100644 --- a/addons/core/functions/fnc_getPitchBankYaw.sqf +++ b/addons/core/functions/fnc_getPitchBankYaw.sqf @@ -9,5 +9,6 @@ * Return Value: * [pitch, bank, yaw] */ +#include "script_component.hpp" ((_this select 0) call BIS_fnc_getPitchBank) + [getDir (_this select 0)] diff --git a/addons/core/functions/fnc_getStringFromMissionSQM.sqf b/addons/core/functions/fnc_getStringFromMissionSQM.sqf index 34a2565a7e..a19e3490aa 100644 --- a/addons/core/functions/fnc_getStringFromMissionSQM.sqf +++ b/addons/core/functions/fnc_getStringFromMissionSQM.sqf @@ -9,6 +9,7 @@ * Return value: * Value of the entry. Note: If the entry does not exist, it might return an empty string or an entry with the same name of another class! (String) */ +#include "script_component.hpp" private ["_path", "_mission", "_a", "_class", "_index", "_array", "_b", "_entry"]; diff --git a/addons/core/functions/fnc_getTargetAzimuthAndInclination.sqf b/addons/core/functions/fnc_getTargetAzimuthAndInclination.sqf index 5f75268514..396a3ec85e 100644 --- a/addons/core/functions/fnc_getTargetAzimuthAndInclination.sqf +++ b/addons/core/functions/fnc_getTargetAzimuthAndInclination.sqf @@ -2,14 +2,15 @@ * Author: commy2 * * Get players viewing direction and slope - * + * * Argument: * None. - * + * * Return value: * 0: Azimuth (Number) * 1: Inclination or 'slope' (Number) */ +#include "script_component.hpp" private ["_position", "_direction", "_azimuth", "_inclination"]; diff --git a/addons/core/functions/fnc_getTargetDistance.sqf b/addons/core/functions/fnc_getTargetDistance.sqf index b0b50539f5..79ef273fad 100644 --- a/addons/core/functions/fnc_getTargetDistance.sqf +++ b/addons/core/functions/fnc_getTargetDistance.sqf @@ -11,6 +11,7 @@ * Return value: * Measured distance in meters. Can return maximal or minimal distance (Number) */ +#include "script_component.hpp" private ["_interval", "_maxDistance", "_minDistance", "_position", "_laser", "_line", "_distance", "_iteration"]; @@ -36,7 +37,7 @@ while { _laser set [2, (_laser select 2) - (getTerrainHeightASL _laser min 0)]; _line set [1, _laser]; - _distance = _distance + (([1, -1] select (lineIntersects (_line + [vehicle AGM_player]) || {terrainIntersectASL _line})) * _iteration); + _distance = _distance + (([1, -1] select (lineIntersects (_line + [vehicle ACE_player]) || {terrainIntersectASL _line})) * _iteration); }; _distance = _interval * round (_distance / _interval); diff --git a/addons/core/functions/fnc_getTargetObject.sqf b/addons/core/functions/fnc_getTargetObject.sqf index 9fb07c1cf0..c00a0e2340 100644 --- a/addons/core/functions/fnc_getTargetObject.sqf +++ b/addons/core/functions/fnc_getTargetObject.sqf @@ -2,13 +2,14 @@ * Author: commy2 * * Get the nearest object the player is looking at. Used for laser designator instead of cursorTarget. - * + * * Argument: * 0: Maximal distance to search. (Number) - * + * * Return value: * Nearest object directly in line of sight, if none objNull (Object) */ +#include "script_component.hpp" private ["_maxDistance", "_position", "_laser", "_intersects"]; diff --git a/addons/core/functions/fnc_getTurretCommander.sqf b/addons/core/functions/fnc_getTurretCommander.sqf index 9989928576..4c2b1139c8 100644 --- a/addons/core/functions/fnc_getTurretCommander.sqf +++ b/addons/core/functions/fnc_getTurretCommander.sqf @@ -9,6 +9,7 @@ * Return value: * Turret index of the vehicles commander. Empty array means no observer position. (Array) */ +#include "script_component.hpp" private ["_vehicle", "_turrets", "_turret", "_config"]; diff --git a/addons/core/functions/fnc_getTurretConfigPath.sqf b/addons/core/functions/fnc_getTurretConfigPath.sqf index 7b463fa397..aab3433a4f 100644 --- a/addons/core/functions/fnc_getTurretConfigPath.sqf +++ b/addons/core/functions/fnc_getTurretConfigPath.sqf @@ -10,6 +10,7 @@ * Return value: * Turret config (Config) */ +#include "script_component.hpp" private ["_config", "_turretIndex", "_index", "_offset", "_config2", "_foundClasses"]; diff --git a/addons/core/functions/fnc_getTurretCopilot.sqf b/addons/core/functions/fnc_getTurretCopilot.sqf index c85c1ea114..c2a7e81778 100644 --- a/addons/core/functions/fnc_getTurretCopilot.sqf +++ b/addons/core/functions/fnc_getTurretCopilot.sqf @@ -9,6 +9,7 @@ * Return value: * Turret index of the vehicles gunner. Empty array means no copilot position. (Array) */ +#include "script_component.hpp" private ["_vehicle", "_turrets", "_turret", "_config"]; diff --git a/addons/core/functions/fnc_getTurretGunner.sqf b/addons/core/functions/fnc_getTurretGunner.sqf index b4531e6611..fd1134dc83 100644 --- a/addons/core/functions/fnc_getTurretGunner.sqf +++ b/addons/core/functions/fnc_getTurretGunner.sqf @@ -9,6 +9,7 @@ * Return value: * Turret index of the vehicles gunner. Empty array means no gunner position. (Array) */ +#include "script_component.hpp" private ["_vehicle", "_turrets", "_turret", "_config"]; diff --git a/addons/core/functions/fnc_getTurretIndex.sqf b/addons/core/functions/fnc_getTurretIndex.sqf index 402a21d969..7e62c78848 100644 --- a/addons/core/functions/fnc_getTurretIndex.sqf +++ b/addons/core/functions/fnc_getTurretIndex.sqf @@ -9,6 +9,7 @@ * Return value: * Turret index array or config path. E.g: [0] for gunner or [0,0] for commander. Returns empty array if unit is not in a turret. (Array) */ +#include "script_component.hpp" private ["_unit", "_vehicle", "_turrets", "_units", "_index"]; diff --git a/addons/core/functions/fnc_getTurrets.sqf b/addons/core/functions/fnc_getTurrets.sqf index c5c781c59c..47ffcde090 100644 --- a/addons/core/functions/fnc_getTurrets.sqf +++ b/addons/core/functions/fnc_getTurrets.sqf @@ -9,12 +9,13 @@ * Return value: * All turret index arrays of the vehicle. E.g: [[0], [0,0]] (Array) */ +#include "script_component.hpp" private ["_type", "_config", "_turrets", "_fnc_addTurret"]; _type = _this select 0; -_varName = format ["AGM_CachedTurrets_%1", _type]; +_varName = format ["ACE_CachedTurrets_%1", _type]; _turrets = + (uiNamespace getVariable _varName); if (!isNil "_turrets") exitWith {_turrets}; diff --git a/addons/core/functions/fnc_getTurretsFFV.sqf b/addons/core/functions/fnc_getTurretsFFV.sqf index 1c9947927f..b09dfed027 100644 --- a/addons/core/functions/fnc_getTurretsFFV.sqf +++ b/addons/core/functions/fnc_getTurretsFFV.sqf @@ -9,6 +9,7 @@ * Return value: * Turret index of the vehicles gunner. Empty array means no ffv turrets. (Array) */ +#include "script_component.hpp" private ["_vehicle", "_turrets", "_turret", "_config"]; diff --git a/addons/core/functions/fnc_getTurretsOther.sqf b/addons/core/functions/fnc_getTurretsOther.sqf index 6c1c629a55..53673b5a8d 100644 --- a/addons/core/functions/fnc_getTurretsOther.sqf +++ b/addons/core/functions/fnc_getTurretsOther.sqf @@ -9,6 +9,7 @@ * Return value: * Turret index of the vehicles gunner. Empty array means no other turrets. (Array) */ +#include "script_component.hpp" private ["_vehicle", "_turrets", "_turret", "_config"]; diff --git a/addons/core/functions/fnc_getUavControlPosition.sqf b/addons/core/functions/fnc_getUavControlPosition.sqf index 9d3e414b9f..82b04e2928 100644 --- a/addons/core/functions/fnc_getUavControlPosition.sqf +++ b/addons/core/functions/fnc_getUavControlPosition.sqf @@ -16,8 +16,9 @@ Returns: STRING - Position in the UAV that is currently being controled by the unit. Example: - [AGM_Player] call FUNC(getUavControlPosition) + [ACE_Player] call FUNC(getUavControlPosition) */ +#include "script_component.hpp" private ["_unit", "_uav", "_positionArray", "_playerIndex"]; diff --git a/addons/core/functions/fnc_getVehicleCargo.sqf b/addons/core/functions/fnc_getVehicleCargo.sqf index 2a4a784117..e0483e8487 100644 --- a/addons/core/functions/fnc_getVehicleCargo.sqf +++ b/addons/core/functions/fnc_getVehicleCargo.sqf @@ -9,6 +9,7 @@ * Return value: * Vehicle cargo positions. (Array) */ +#include "script_component.hpp" private ["_vehicle", "_config", "_cargo", "_codrivers"]; diff --git a/addons/core/functions/fnc_getVehicleCodriver.sqf b/addons/core/functions/fnc_getVehicleCodriver.sqf index 98f4a4bccd..4fd8058d1e 100644 --- a/addons/core/functions/fnc_getVehicleCodriver.sqf +++ b/addons/core/functions/fnc_getVehicleCodriver.sqf @@ -9,6 +9,7 @@ * Return value: * Vehicle codriver positions. (Array) */ +#include "script_component.hpp" private ["_vehicle", "_config", "_cargo", "_codrivers"]; diff --git a/addons/core/functions/fnc_getVehicleCrew.sqf b/addons/core/functions/fnc_getVehicleCrew.sqf index 927defdd1f..b14fbe561e 100644 --- a/addons/core/functions/fnc_getVehicleCrew.sqf +++ b/addons/core/functions/fnc_getVehicleCrew.sqf @@ -10,6 +10,7 @@ * Return value: * Crew (Array) */ +#include "script_component.hpp" private ["_vehicle", "_types", "_crew"]; diff --git a/addons/core/functions/fnc_getWeaponAzimuthAndInclination.sqf b/addons/core/functions/fnc_getWeaponAzimuthAndInclination.sqf index 702bde7761..7433991e29 100644 --- a/addons/core/functions/fnc_getWeaponAzimuthAndInclination.sqf +++ b/addons/core/functions/fnc_getWeaponAzimuthAndInclination.sqf @@ -2,20 +2,21 @@ * Author: commy2 * * Get players weapon direction and slope - * + * * Argument: * 0: Weapon name (String) - * + * * Return value: * 0: Azimuth (Number) * 1: Inclination or 'slope' (Number) */ +#include "script_component.hpp" private ["_weapon", "_direction", "_azimuth", "_inclination"]; _weapon = _this select 0; -_direction = AGM_player weaponDirection _weapon; +_direction = ACE_player weaponDirection _weapon; _azimuth = (_direction select 0) atan2 (_direction select 1); _inclination = asin (_direction select 2); diff --git a/addons/core/functions/fnc_getWeaponType.sqf b/addons/core/functions/fnc_getWeaponType.sqf index 3f2829b4a9..89ee46427b 100644 --- a/addons/core/functions/fnc_getWeaponType.sqf +++ b/addons/core/functions/fnc_getWeaponType.sqf @@ -9,6 +9,7 @@ * Return value: * Slot index of the given class name, 1: primary, 2: secondary, 3: handgun, else: -1 (Number) */ +#include "script_component.hpp" private ["_weapon", "_type", "_index"]; diff --git a/addons/core/functions/fnc_getWindDirection.sqf b/addons/core/functions/fnc_getWindDirection.sqf index fe1fad8341..5bd4ff12ff 100644 --- a/addons/core/functions/fnc_getWindDirection.sqf +++ b/addons/core/functions/fnc_getWindDirection.sqf @@ -9,6 +9,7 @@ * Return value: * Wind direction. (String) */ +#include "script_component.hpp" switch (round (windDir / 360 * 16)) do { case 1 : {localize QUOTE(DOUBLES(STR,GVAR(SSW)))}; diff --git a/addons/core/functions/fnc_goKneeling.sqf b/addons/core/functions/fnc_goKneeling.sqf index 1dcbc78706..fbe7c3b8f3 100644 --- a/addons/core/functions/fnc_goKneeling.sqf +++ b/addons/core/functions/fnc_goKneeling.sqf @@ -9,6 +9,7 @@ * Return value: * None. */ +#include "script_component.hpp" private "_unit"; diff --git a/addons/core/functions/fnc_hadamardProduct.sqf b/addons/core/functions/fnc_hadamardProduct.sqf index 3b0d3fea9f..dd614f8dd0 100644 --- a/addons/core/functions/fnc_hadamardProduct.sqf +++ b/addons/core/functions/fnc_hadamardProduct.sqf @@ -11,6 +11,7 @@ * Return Value: * Hadamard Product */ +#include "script_component.hpp" _vector1 = _this select 0; _vector2 = _this select 1; diff --git a/addons/core/functions/fnc_inTransitionAnim.sqf b/addons/core/functions/fnc_inTransitionAnim.sqf index 14f470dd7c..4ce16aebf9 100644 --- a/addons/core/functions/fnc_inTransitionAnim.sqf +++ b/addons/core/functions/fnc_inTransitionAnim.sqf @@ -1,3 +1,4 @@ // by commy2 +#include "script_component.hpp" getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState (_this select 0) >> "looped") == 0 diff --git a/addons/core/functions/fnc_interpolateFromArray.sqf b/addons/core/functions/fnc_interpolateFromArray.sqf index 4fc68ae427..8c0c8daa36 100644 --- a/addons/core/functions/fnc_interpolateFromArray.sqf +++ b/addons/core/functions/fnc_interpolateFromArray.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" private ["_array", "_value", "_min", "_max"]; diff --git a/addons/core/functions/fnc_isAutoWind.sqf b/addons/core/functions/fnc_isAutoWind.sqf index 756d0561f3..50933e40a2 100644 --- a/addons/core/functions/fnc_isAutoWind.sqf +++ b/addons/core/functions/fnc_isAutoWind.sqf @@ -2,12 +2,13 @@ * Author: commy2 * * Check if wind is set on auto. - * + * * Argument: * None. - * + * * Return value: * This mission has automatic wind? (Bool) */ +#include "script_component.hpp" ["Mission", "Intel", "windForced"] call FUNC(getNumberFromMissionSQM) != 1 diff --git a/addons/core/functions/fnc_isEOD.sqf b/addons/core/functions/fnc_isEOD.sqf index 257d6b0d5d..6149dfa37b 100644 --- a/addons/core/functions/fnc_isEOD.sqf +++ b/addons/core/functions/fnc_isEOD.sqf @@ -1,26 +1,27 @@ /* Name: FUNC(isEOD) - + Author: Garth de Wet (LH) - + Description: Checks whether the passed unit is an explosive specialist. Either through config entry: "canDeactivateMines" - or - unit setVariable ["AGM_isEOD", true] - - Parameters: + or + unit setVariable ["ACE_isEOD", true] + + Parameters: 0: OBJECT - Unit to check if is a specialist - + Returns: BOOLEAN - + Example: _isSpecialist = [player] call FUNC(isEOD); */ +#include "script_component.hpp" private "_unit"; _unit = _this select 0; -_unit getVariable ["AGM_isEOD", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "canDeactivateMines") == 1] +_unit getVariable ["ACE_isEOD", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "canDeactivateMines") == 1] diff --git a/addons/core/functions/fnc_isEngineer.sqf b/addons/core/functions/fnc_isEngineer.sqf index 7b147d827d..2bdb62df4c 100644 --- a/addons/core/functions/fnc_isEngineer.sqf +++ b/addons/core/functions/fnc_isEngineer.sqf @@ -9,9 +9,10 @@ * Return Value: * Bool: is the unit an engineer? */ +#include "script_component.hpp" private "_unit"; _unit = _this select 0; -_unit getVariable ["AGM_IsEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer") == 1] +_unit getVariable ["ACE_IsEngineer", getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "engineer") == 1] diff --git a/addons/core/functions/fnc_isInBuilding.sqf b/addons/core/functions/fnc_isInBuilding.sqf index 124c128e56..0989db42da 100644 --- a/addons/core/functions/fnc_isInBuilding.sqf +++ b/addons/core/functions/fnc_isInBuilding.sqf @@ -9,6 +9,7 @@ * Return value: * Is the unit in a building? (Bool) */ +#include "script_component.hpp" #define DISTANCE 10 diff --git a/addons/core/functions/fnc_isMedic.sqf b/addons/core/functions/fnc_isMedic.sqf index 59e3915948..d4efdca5b6 100644 --- a/addons/core/functions/fnc_isMedic.sqf +++ b/addons/core/functions/fnc_isMedic.sqf @@ -9,9 +9,10 @@ * Return Value: * Bool: is unit medic? */ +#include "script_component.hpp" private ["_unit"]; _unit = _this select 0; -_unit getVariable ["AGM_isMedic", (getNumber(configFile >> "CfgVehicles" >> typeOf _unit >> "attendant") == 1)] +_unit getVariable ["ACE_isMedic", (getNumber(configFile >> "CfgVehicles" >> typeOf _unit >> "attendant") == 1)] diff --git a/addons/core/functions/fnc_isPlayer.sqf b/addons/core/functions/fnc_isPlayer.sqf index 992e213776..772fae1746 100644 --- a/addons/core/functions/fnc_isPlayer.sqf +++ b/addons/core/functions/fnc_isPlayer.sqf @@ -10,5 +10,6 @@ * Return Value: * Bool: is unit a player? */ +#include "script_component.hpp" isPlayer (_this select 0) || {_this select 0 == call FUNC(player)} diff --git a/addons/core/functions/fnc_isTurnedOut.sqf b/addons/core/functions/fnc_isTurnedOut.sqf index e4acc89240..8f722ed733 100644 --- a/addons/core/functions/fnc_isTurnedOut.sqf +++ b/addons/core/functions/fnc_isTurnedOut.sqf @@ -9,6 +9,7 @@ * Return value: * Is the unit turned out or not? Will return false if there is no option to turn out in the first place. (Bool) */ +#include "script_component.hpp" private ["_unit", "_vehicle", "_config", "_animation", "_action", "_inAction", "_turretIndex"]; diff --git a/addons/core/functions/fnc_letterToCode.sqf b/addons/core/functions/fnc_letterToCode.sqf index 4382e94362..59243915f5 100644 --- a/addons/core/functions/fnc_letterToCode.sqf +++ b/addons/core/functions/fnc_letterToCode.sqf @@ -1,3 +1,4 @@ // by commy2 +#include "script_component.hpp" [-1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38, 50, 49, 24, 25, 16, 19, 31, 20, 22, 47, 17, 45, 44, 21] select (["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"] find toUpper (_this select 0)) + 1 diff --git a/addons/core/functions/fnc_log.sqf b/addons/core/functions/fnc_log.sqf index b2a260a31f..43a5a27682 100644 --- a/addons/core/functions/fnc_log.sqf +++ b/addons/core/functions/fnc_log.sqf @@ -1,6 +1,7 @@ // by commy2 +#include "script_component.hpp" -if ((_this select 0) in (missionNamespace getVariable ["AGM_Debug", []])) then { +if ((_this select 0) in (missionNamespace getVariable ["ACE_Debug", []])) then { private ["_type", "_argument", "_function", "_showInGame"]; _this resize 4; @@ -25,5 +26,5 @@ if ((_this select 0) in (missionNamespace getVariable ["AGM_Debug", []])) then { systemChat format ["%1", _result]; }; - diag_log text format ["[AGM] Debug: %1 : %2 - %3 : %4", _type, diag_frameno, _fnc_scriptNameParent, _result]; + diag_log text format ["[ACE] Debug: %1 : %2 - %3 : %4", _type, diag_frameno, _fnc_scriptNameParent, _result]; }; diff --git a/addons/core/functions/fnc_logControls.sqf b/addons/core/functions/fnc_logControls.sqf index d0037cce31..5a0a17c317 100644 --- a/addons/core/functions/fnc_logControls.sqf +++ b/addons/core/functions/fnc_logControls.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" private ["_array", "_index"]; diff --git a/addons/core/functions/fnc_logDisplays.sqf b/addons/core/functions/fnc_logDisplays.sqf index 5d990b8042..81598facf4 100644 --- a/addons/core/functions/fnc_logDisplays.sqf +++ b/addons/core/functions/fnc_logDisplays.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" private ["_array", "_index"]; diff --git a/addons/core/functions/fnc_map.sqf b/addons/core/functions/fnc_map.sqf index c1f3ab4802..99c52ae742 100644 --- a/addons/core/functions/fnc_map.sqf +++ b/addons/core/functions/fnc_map.sqf @@ -13,6 +13,7 @@ * Usage: * [["2", "gobblecock", "25"], {parseNumber _this}] call FUNC(map) ==> [2, 0, 25] */ +#include "script_component.hpp" private ["_array", "_code"]; @@ -20,7 +21,7 @@ _array = + _this select 0; _code = _this select 1; if (isNil "_array") exitWith { - diag_log text format ["[AGM] ERROR: No array for function map in %1", _fnc_scriptNameParent]; + diag_log text format ["[ACE] ERROR: No array for function map in %1", _fnc_scriptNameParent]; [] }; diff --git a/addons/core/functions/fnc_moduleCheckPBOs.sqf b/addons/core/functions/fnc_moduleCheckPBOs.sqf index 9e502fc325..4b5ea2374a 100644 --- a/addons/core/functions/fnc_moduleCheckPBOs.sqf +++ b/addons/core/functions/fnc_moduleCheckPBOs.sqf @@ -9,6 +9,7 @@ * Return Value: * None */ +#include "script_component.hpp" _logic = _this select 0; _units = _this select 1; @@ -26,8 +27,8 @@ if (isNil "_whitelist") then { _whitelist = [_whitelist, {toLower _this}] call FUNC(map); -AGM_Version_CheckAll = _checkAll; -AGM_Version_Whitelist = _whitelist; +ACE_Version_CheckAll = _checkAll; +ACE_Version_Whitelist = _whitelist; if (!isServer) then { [_mode, _checkAll, _whitelist] spawn { @@ -37,18 +38,18 @@ if (!isServer) then { waitUntil { sleep 1; - !isNil "AGM_Version_ClientErrors" + !isNil "ACE_Version_ClientErrors" }; - _missingAddon = AGM_Version_ClientErrors select 0; - _missingAddonServer = AGM_Version_ClientErrors select 1; - _oldVersionClient = AGM_Version_ClientErrors select 2; - _oldVersionServer = AGM_Version_ClientErrors select 3; + _missingAddon = ACE_Version_ClientErrors select 0; + _missingAddonServer = ACE_Version_ClientErrors select 1; + _oldVersionClient = ACE_Version_ClientErrors select 2; + _oldVersionServer = ACE_Version_ClientErrors select 3; // Display error message. if (_missingAddon || {_missingAddonServer} || {_oldVersionClient} || {_oldVersionServer}) then { - _text = "[AGM] Version mismatch:

"; - _error = format ["AGM version mismatch: %1: ", profileName]; + _text = "[ACE] Version mismatch:

"; + _error = format ["ACE version mismatch: %1: ", profileName]; if (_missingAddon) then { _text = _text + "Detected missing addon on client
"; @@ -72,11 +73,11 @@ if (!isServer) then { _text = composeText [lineBreak, parseText format ["%1", _text]]; - _rscLayer = "AGM_RscErrorHint" call BIS_fnc_rscLayer; - _rscLayer cutRsc ["AGM_RscErrorHint", "PLAIN", 0, true]; + _rscLayer = "ACE_RscErrorHint" call BIS_fnc_rscLayer; + _rscLayer cutRsc ["ACE_RscErrorHint", "PLAIN", 0, true]; disableSerialization; - _ctrlHint = uiNamespace getVariable "AGM_ctrlErrorHint"; + _ctrlHint = uiNamespace getVariable "ACE_ctrlErrorHint"; _ctrlHint ctrlSetStructuredText _text; if (_mode == 0) then { @@ -93,4 +94,4 @@ if (!isServer) then { }; }; -diag_log text format ["[AGM]: Check-PBOs Module Initialized. Mode: %1.", _mode]; +diag_log text format ["[ACE]: Check-PBOs Module Initialized. Mode: %1.", _mode]; diff --git a/addons/core/functions/fnc_moduleLSDVehicles.sqf b/addons/core/functions/fnc_moduleLSDVehicles.sqf index fbda2cc569..f06c1cf2ea 100644 --- a/addons/core/functions/fnc_moduleLSDVehicles.sqf +++ b/addons/core/functions/fnc_moduleLSDVehicles.sqf @@ -9,6 +9,7 @@ * Return Value: * None */ +#include "script_component.hpp" _logic = _this select 0; _units = _this select 1; @@ -43,4 +44,4 @@ if !(_activated) exitWith {}; }; } count _units; -diag_log text "[AGM]: WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE."; +diag_log text "[ACE]: WEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE."; diff --git a/addons/core/functions/fnc_monitor.sqf b/addons/core/functions/fnc_monitor.sqf index 6065e23837..dcb9e5163f 100644 --- a/addons/core/functions/fnc_monitor.sqf +++ b/addons/core/functions/fnc_monitor.sqf @@ -1,8 +1,9 @@ // by commy2 +#include "script_component.hpp" -terminate (missionNamespace getVariable ["AGM_Debug_MonitorFnc", scriptNull]); +terminate (missionNamespace getVariable [QGVAR(MonitorFnc), scriptNull]); -AGM_Debug_MonitorFnc = _this spawn { +GVAR(MonitorFnc) = _this spawn { waitUntil { hintSilent str (call _this); false diff --git a/addons/core/functions/fnc_muteUnit.sqf b/addons/core/functions/fnc_muteUnit.sqf index 0175118b50..8edf9df391 100644 --- a/addons/core/functions/fnc_muteUnit.sqf +++ b/addons/core/functions/fnc_muteUnit.sqf @@ -2,13 +2,14 @@ * Author: commy2 * * Mutes the unit. It won't trigger auto generated chat messages either. - * + * * Argument: * 0: Unit (Object) - * + * * Return value: * Nothing */ +#include "script_component.hpp" private ["_unit", "_speaker"]; @@ -17,8 +18,8 @@ _unit = _this select 0; if (isNull _unit) exitWith {}; _speaker = speaker _unit; -if (_speaker == "AGM_NoVoice") exitWith {}; +if (_speaker == "ACE_NoVoice") exitWith {}; -[0, "{(_this select 1) setSpeaker 'AGM_NoVoice'}", _unit, "AGM_Speaker"] call FUNC(execPersistentFnc); +[0, "{(_this select 1) setSpeaker 'ACE_NoVoice'}", _unit, "ACE_Speaker"] call FUNC(execPersistentFnc); -_unit setVariable ["AGM_OriginalSpeaker", _speaker, true]; +_unit setVariable ["ACE_OriginalSpeaker", _speaker, true]; diff --git a/addons/core/functions/fnc_numberToDigits.sqf b/addons/core/functions/fnc_numberToDigits.sqf index 304a5dea2c..465955b455 100644 --- a/addons/core/functions/fnc_numberToDigits.sqf +++ b/addons/core/functions/fnc_numberToDigits.sqf @@ -10,6 +10,7 @@ * Return value: * Digits. The maximum count is six digits. (Array) */ +#include "script_component.hpp" private ["_number", "_minLength", "_length", "_digits", "_index", "_count"]; diff --git a/addons/core/functions/fnc_numberToDigitsString.sqf b/addons/core/functions/fnc_numberToDigitsString.sqf index 492137009f..db4e33e6cb 100644 --- a/addons/core/functions/fnc_numberToDigitsString.sqf +++ b/addons/core/functions/fnc_numberToDigitsString.sqf @@ -10,6 +10,7 @@ * Return value: * Digits. The maximum length is six digits. (String) */ +#include "script_component.hpp" private ["_digits", "_count", "_string", "_index"]; diff --git a/addons/core/functions/fnc_onLoadRscDisplayChannel.sqf b/addons/core/functions/fnc_onLoadRscDisplayChannel.sqf index c1b7faa1ff..2a2fbfc9a4 100644 --- a/addons/core/functions/fnc_onLoadRscDisplayChannel.sqf +++ b/addons/core/functions/fnc_onLoadRscDisplayChannel.sqf @@ -4,7 +4,7 @@ Author: Pabst Mirror, commy2 Description: - When the RscDisplayChannel is loaded, this will constantly uiNamespace variable "AGM_currentChannel" + When the RscDisplayChannel is loaded, this will constantly uiNamespace variable "ACE_currentChannel" with the raw localized text of CA_Channel (IDC=101). Only runs while the display is open. Parameters: @@ -13,26 +13,12 @@ Returns: Nothing */ +#include "script_component.hpp" -/* -_this spawn { - private "_display"; - disableSerialization; - _display = _this select 0; - waitUntil { - if (isNull _display) exitWith {true}; - if (ctrlText (_display displayCtrl 101) != "") then { - uiNamespace setVariable ["AGM_currentChannel", ctrlText (_display displayCtrl 101)]; - }; - false - }; -}; -*/ +uiNamespace setVariable ["ACE_ctrlChannel", (_this select 0) displayCtrl 101]; -uiNamespace setVariable ["AGM_ctrlChannel", (_this select 0) displayCtrl 101]; - -["AGM_currentChannel", "onEachFrame", { - if (ctrlText (uiNamespace getVariable ["AGM_ctrlChannel", controlNull]) != "") then { - uiNamespace setVariable ["AGM_currentChannel", ctrlText (uiNamespace getVariable ["AGM_ctrlChannel", controlNull])]; +["ACE_currentChannel", "onEachFrame", { + if (ctrlText (uiNamespace getVariable ["ACE_ctrlChannel", controlNull]) != "") then { + uiNamespace setVariable ["ACE_currentChannel", ctrlText (uiNamespace getVariable ["ACE_ctrlChannel", controlNull])]; }; }] call BIS_fnc_addStackedEventhandler; diff --git a/addons/core/functions/fnc_owned.sqf b/addons/core/functions/fnc_owned.sqf index b3f7db8bf4..4fa1dbeb98 100644 --- a/addons/core/functions/fnc_owned.sqf +++ b/addons/core/functions/fnc_owned.sqf @@ -1,7 +1,8 @@ // by commy2 +#include "script_component.hpp" private "_object"; _object = _this select 0; -!isNull (_object getVariable ["AGM_isUsedBy", objNull]) +!isNull (_object getVariable ["ACE_isUsedBy", objNull]) diff --git a/addons/core/functions/fnc_player.sqf b/addons/core/functions/fnc_player.sqf index 25cefb9a86..3e5990f84b 100644 --- a/addons/core/functions/fnc_player.sqf +++ b/addons/core/functions/fnc_player.sqf @@ -2,7 +2,7 @@ * Author: bux578, commy2 * * Returns the player or curator controlled unit. - * Use this in INIT and RESPAWN eh scripts, because AGM_player isn't reset yet. + * Use this in INIT and RESPAWN eh scripts, because ACE_player isn't reset yet. * * Arguments: * NONE. @@ -10,5 +10,6 @@ * Return Value: * Player controlled unit (object) */ +#include "script_component.hpp" missionNamespace getVariable ["bis_fnc_moduleRemoteControl_unit", player] diff --git a/addons/core/functions/fnc_playerSide.sqf b/addons/core/functions/fnc_playerSide.sqf index d432a68fa7..632cf11abf 100644 --- a/addons/core/functions/fnc_playerSide.sqf +++ b/addons/core/functions/fnc_playerSide.sqf @@ -1,3 +1,4 @@ // by commy2 +#include "script_component.hpp" -side group AGM_player +side group ACE_player diff --git a/addons/core/functions/fnc_progressBar.sqf b/addons/core/functions/fnc_progressBar.sqf index 37d353940e..189208e602 100644 --- a/addons/core/functions/fnc_progressBar.sqf +++ b/addons/core/functions/fnc_progressBar.sqf @@ -13,6 +13,7 @@ * Return value: * Nothing */ +#include "script_component.hpp" closeDialog 0; createDialog QGVAR(ProgressBar_Dialog); @@ -42,7 +43,7 @@ _this spawn { _time = time + _time; waitUntil { //make sure the progressBar is still open, not just any dialog - (isNull (uiNamespace getVariable [QGVAR(ctrlProgressBar), controlNull])) || {!alive AGM_player} || {time > _time} + (isNull (uiNamespace getVariable [QGVAR(ctrlProgressBar), controlNull])) || {!alive ACE_player} || {time > _time} }; closeDialog 0; diff --git a/addons/core/functions/fnc_queueAnimation.sqf b/addons/core/functions/fnc_queueAnimation.sqf index eea4118dea..a489a46174 100644 --- a/addons/core/functions/fnc_queueAnimation.sqf +++ b/addons/core/functions/fnc_queueAnimation.sqf @@ -1,8 +1,9 @@ // by commy2 +#include "script_component.hpp" -terminate (missionNamespace getVariable ["AGM_waitForAnimationHandle", scriptNull]); +terminate (missionNamespace getVariable [QGVAR(waitForAnimationHandle), scriptNull]); -AGM_waitForAnimationHandle = _this spawn { +GVAR(waitForAnimationHandle) = _this spawn { waitUntil {!([_this select 0] call FUNC(inTransitionAnim))}; _this call FUNC(doAnimation); diff --git a/addons/core/functions/fnc_readBooleanParameterFromModule.sqf b/addons/core/functions/fnc_readBooleanParameterFromModule.sqf index 6d9c51f184..9ee2faa001 100644 --- a/addons/core/functions/fnc_readBooleanParameterFromModule.sqf +++ b/addons/core/functions/fnc_readBooleanParameterFromModule.sqf @@ -1,27 +1,28 @@ /* * Author: CAA-Picard * - * Reads a boolean value from a module, sets de AGM_Parameter. Logs if parameters are missing in the module. + * Reads a boolean value from a module, sets de ACE_Parameter. Logs if parameters are missing in the module. * * Arguments: * 0: Module (Object) - * 1: AGM_Parameter name (string) + * 1: ACE_Parameter name (string) * 2: Module parameter name (string) * * Return Value: * None */ +#include "script_component.hpp" + + private ["_logic", "_parameterName", "_moduleParameterName"]; - private ["_logic", "_agmParameterName", "_moduleParameterName"]; - _logic = _this select 0; -_agmParameterName = _this select 1; +_parameterName = _this select 1; _moduleParameterName = _this select 2; // Check if the parameter is defined in the module if (isNil {_logic getVariable _moduleParameterName}) exitWith { - diag_log text format["[AGM]: Warning in %1 module: %2 parameter is missing. Probably an obsolete version of the module is used in the mission.", typeOf _logic, _moduleParameterName]; + diag_log text format["[ACE]: Warning in %1 module: %2 parameter is missing. Probably an obsolete version of the module is used in the mission.", typeOf _logic, _moduleParameterName]; }; // Set the parameter -[_agmParameterName , if (_logic getVariable _moduleParameterName) then {1} else {0}] call FUNC(setParameter); +[_parameterName , if (_logic getVariable _moduleParameterName) then {1} else {0}] call FUNC(setParameter); diff --git a/addons/core/functions/fnc_readNumericParameterFromModule.sqf b/addons/core/functions/fnc_readNumericParameterFromModule.sqf index 723c0945a4..a9c35f5b46 100644 --- a/addons/core/functions/fnc_readNumericParameterFromModule.sqf +++ b/addons/core/functions/fnc_readNumericParameterFromModule.sqf @@ -1,26 +1,27 @@ /* * Author: CAA-Picard * - * Reads a numberic value from a module, sets de AGM_Parameter. Logs if parameters are missing in the module. + * Reads a numeric value from a module, sets de ACE_Parameter. Logs if parameters are missing in the module. * * Arguments: * 0: Module (Object) - * 1: AGM_Parameter name (string) + * 1: ACE_Parameter name (string) * 2: Module parameter name (string) * * Return Value: * None */ +#include "script_component.hpp" - private ["_logic", "_agmParameterName", "_moduleParameterName", "_value"]; + private ["_logic", "_parameterName", "_moduleParameterName", "_value"]; _logic = _this select 0; -_agmParameterName = _this select 1; +_parameterName = _this select 1; _moduleParameterName = _this select 2; // Check if the parameter is defined in the module if (isNil {_logic getVariable _moduleParameterName}) exitWith { - diag_log format["Warning in %1 module: %2 parameter is missing. Probably an obsolete version of the module is used in the mission.", typeOf _logic, _moduleParameterName] + diag_log text format["[ACE]: Warning in %1 module: %2 parameter is missing. Probably an obsolete version of the module is used in the mission.", typeOf _logic, _moduleParameterName] }; // Check if the value is defined as string for backward compatibility @@ -30,4 +31,4 @@ if (typeName _value == "STRING") then { }; // Set the parameter -[_agmParameterName, _value] call FUNC(setParameter); +[_parameterName, _value] call FUNC(setParameter); diff --git a/addons/core/functions/fnc_removeActionEventHandler.sqf b/addons/core/functions/fnc_removeActionEventHandler.sqf index 9e93e545d3..7d92b3de75 100644 --- a/addons/core/functions/fnc_removeActionEventHandler.sqf +++ b/addons/core/functions/fnc_removeActionEventHandler.sqf @@ -11,6 +11,7 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_unit", "_action", "_id", "_name", "_actionsVar", "_actionID", "_actions", "_currentID", "_actionIDs", "_count"]; @@ -20,7 +21,7 @@ _id = _this select 2; if (_id == -1) exitWith {}; -_name = format ["AGM_Action_%1", _action]; +_name = format ["ACE_Action_%1", _action]; _actionsVar = _unit getVariable [_name, [-1, [-1, [], []]]]; diff --git a/addons/core/functions/fnc_removeActionMenuEventHandler.sqf b/addons/core/functions/fnc_removeActionMenuEventHandler.sqf index cd7a3da1cd..7c45bae112 100644 --- a/addons/core/functions/fnc_removeActionMenuEventHandler.sqf +++ b/addons/core/functions/fnc_removeActionMenuEventHandler.sqf @@ -11,6 +11,7 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_unit", "_action", "_id", "_name", "_actionsVar", "_currentID", "_actionIDs", "_actions", "_actionID", "_nameVar"]; @@ -20,7 +21,7 @@ _id = _this select 2; if (_id == -1) exitWith {}; -_name = format ["AGM_ActionMenu_%1", _action]; +_name = format ["ACE_ActionMenu_%1", _action]; _actionsVar = _unit getVariable [_name, [-1, [-1, [], []]]]; diff --git a/addons/core/functions/fnc_removeCameraEventHandler.sqf b/addons/core/functions/fnc_removeCameraEventHandler.sqf index 912902a56a..0fe8953078 100644 --- a/addons/core/functions/fnc_removeCameraEventHandler.sqf +++ b/addons/core/functions/fnc_removeCameraEventHandler.sqf @@ -9,12 +9,13 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_id", "_actionsVar", "_currentId", "_actionIDs", "_actions"]; _id = _this select 0; -_actionsVar = missionNamespace getVariable ["AGM_EventHandler_CameraMode", [-1, [], []]]; +_actionsVar = missionNamespace getVariable ["ACE_EventHandler_CameraMode", [-1, [], []]]; _currentId = _actionsVar select 0; _actionIDs = _actionsVar select 1; @@ -30,4 +31,4 @@ _actionIDs = _actionIDs - [-1]; _actions set [_id, []];//{} _actions = _actions - [[]];//[{}] -missionNamespace setVariable ["AGM_EventHandler_CameraMode", [_currentId, _actionIDs, _actions]]; +missionNamespace setVariable ["ACE_EventHandler_CameraMode", [_currentId, _actionIDs, _actions]]; diff --git a/addons/core/functions/fnc_removeCustomEventHandler.sqf b/addons/core/functions/fnc_removeCustomEventHandler.sqf index 5337ace1f4..771ea9f5bf 100644 --- a/addons/core/functions/fnc_removeCustomEventHandler.sqf +++ b/addons/core/functions/fnc_removeCustomEventHandler.sqf @@ -11,6 +11,7 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_object", "_type", "_id", "_name", "_actionsVar", "_currentId", "_actionIDs", "_actions"]; @@ -18,7 +19,7 @@ _object = _this select 0; _type = _this select 1; _id = _this select 2; -_name = format ["AGM_CustomEventHandlers_%1", _type]; +_name = format ["ACE_CustomEventHandlers_%1", _type]; _actionsVar = _object getVariable [_name, [-1, [], []]]; diff --git a/addons/core/functions/fnc_removeInfoDisplayEventHandler.sqf b/addons/core/functions/fnc_removeInfoDisplayEventHandler.sqf index ea0252df82..160002990c 100644 --- a/addons/core/functions/fnc_removeInfoDisplayEventHandler.sqf +++ b/addons/core/functions/fnc_removeInfoDisplayEventHandler.sqf @@ -10,10 +10,11 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_type", "_id", "_actionsVar", "_currentId", "_actionIDs", "_actions"]; -_type = format ["AGM_onLoadInfo%1", _this select 0]; +_type = format ["ACE_onLoadInfo%1", _this select 0]; _id = _this select 1; _actionsVar = missionNamespace getVariable [_type, [-1, [], []]]; diff --git a/addons/core/functions/fnc_removeInventoryDisplayLoadedEventHandler.sqf b/addons/core/functions/fnc_removeInventoryDisplayLoadedEventHandler.sqf index b2cc322e36..f022d7d228 100644 --- a/addons/core/functions/fnc_removeInventoryDisplayLoadedEventHandler.sqf +++ b/addons/core/functions/fnc_removeInventoryDisplayLoadedEventHandler.sqf @@ -9,12 +9,13 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_id", "_actionsVar", "_currentId", "_actionIDs", "_actions"]; _id = _this select 0; -_actionsVar = missionNamespace getVariable ["AGM_onLoadInventory", [-1, [], []]]; +_actionsVar = missionNamespace getVariable ["ACE_onLoadInventory", [-1, [], []]]; _currentId = _actionsVar select 0; _actionIDs = _actionsVar select 1; @@ -27,4 +28,4 @@ if (_id == -1) exitWith {}; _actionIDs deleteAt _id; _actions deleteAt _id; -missionNamespace setVariable ["AGM_onLoadInventory", [_currentId, _actionIDs, _actions]]; +missionNamespace setVariable ["ACE_onLoadInventory", [_currentId, _actionIDs, _actions]]; diff --git a/addons/core/functions/fnc_removeMapMarkerCreatedEventHandler.sqf b/addons/core/functions/fnc_removeMapMarkerCreatedEventHandler.sqf index a0edb36b78..0f31b5e886 100644 --- a/addons/core/functions/fnc_removeMapMarkerCreatedEventHandler.sqf +++ b/addons/core/functions/fnc_removeMapMarkerCreatedEventHandler.sqf @@ -9,12 +9,13 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_id", "_actionsVar", "_currentId", "_actionIDs", "_actions"]; _id = _this select 0; -_actionsVar = missionNamespace getVariable ["AGM_EventHandler_MapMarker", [-1, [], []]]; +_actionsVar = missionNamespace getVariable ["ACE_EventHandler_MapMarker", [-1, [], []]]; _currentId = _actionsVar select 0; _actionIDs = _actionsVar select 1; @@ -30,4 +31,4 @@ _actionIDs = _actionIDs - [-1]; _actions set [_id, []];//{} _actions = _actions - [[]];//[{}] -missionNamespace setVariable ["AGM_EventHandler_MapMarker", [_currentId, _actionIDs, _actions]]; +missionNamespace setVariable ["ACE_EventHandler_MapMarker", [_currentId, _actionIDs, _actions]]; diff --git a/addons/core/functions/fnc_removeScrollWheelEventHandler.sqf b/addons/core/functions/fnc_removeScrollWheelEventHandler.sqf index b2dbd1317d..914064538d 100644 --- a/addons/core/functions/fnc_removeScrollWheelEventHandler.sqf +++ b/addons/core/functions/fnc_removeScrollWheelEventHandler.sqf @@ -9,12 +9,13 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_id", "_actionsVar", "_currentId", "_actionIDs", "_actions"]; _id = _this select 0; -_actionsVar = missionNamespace getVariable ["AGM_EventHandler_ScrollWheel", [-1, [], []]]; +_actionsVar = missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]]; _currentId = _actionsVar select 0; _actionIDs = _actionsVar select 1; @@ -30,4 +31,4 @@ _actionIDs = _actionIDs - [-1]; _actions set [_id, []];//{} _actions = _actions - [[]];//[{}] -missionNamespace setVariable ["AGM_EventHandler_ScrollWheel", [_currentId, _actionIDs, _actions]]; +missionNamespace setVariable ["ACE_EventHandler_ScrollWheel", [_currentId, _actionIDs, _actions]]; diff --git a/addons/core/functions/fnc_restoreVariablesJIP.sqf b/addons/core/functions/fnc_restoreVariablesJIP.sqf index 04d08e83b9..2c173a054c 100644 --- a/addons/core/functions/fnc_restoreVariablesJIP.sqf +++ b/addons/core/functions/fnc_restoreVariablesJIP.sqf @@ -9,15 +9,16 @@ * Return value: * Nothing. */ +#include "script_component.hpp" private ["_unit", "_respawnVariables"]; _unit = _this select 0; -_respawnVariables = _unit getVariable ["AGM_respawnVariables", []]; +_respawnVariables = _unit getVariable ["ACE_respawnVariables", []]; // yes those -_respawnVariables pushBack "AGM_PersistentFunctions"; +_respawnVariables pushBack "ACE_PersistentFunctions"; { _unit setVariable [_x, _unit getVariable _x, true]; diff --git a/addons/core/functions/fnc_revertKeyCodeLocalized.sqf b/addons/core/functions/fnc_revertKeyCodeLocalized.sqf index d7bd7cff99..bdffb3a6c9 100644 --- a/addons/core/functions/fnc_revertKeyCodeLocalized.sqf +++ b/addons/core/functions/fnc_revertKeyCodeLocalized.sqf @@ -9,6 +9,7 @@ * Return value: * What input will result in the given key code? (String) */ +#include "script_component.hpp" private ["_keyCode", "_key", "_alt", "_ctrl", "_shft"]; diff --git a/addons/core/functions/fnc_sanitizeString.sqf b/addons/core/functions/fnc_sanitizeString.sqf index 578991f332..44717915db 100644 --- a/addons/core/functions/fnc_sanitizeString.sqf +++ b/addons/core/functions/fnc_sanitizeString.sqf @@ -10,8 +10,9 @@ * Return Value: * Sanitized string */ +#include "script_component.hpp" - private ["_string", "_removeTags", "_array", "_arrayNew"]; +private ["_string", "_removeTags", "_array", "_arrayNew"]; _string = _this select 0; _removeTags = _this select 1; diff --git a/addons/core/functions/fnc_serverLog.sqf b/addons/core/functions/fnc_serverLog.sqf index 8e4b99d50d..e2c981302d 100644 --- a/addons/core/functions/fnc_serverLog.sqf +++ b/addons/core/functions/fnc_serverLog.sqf @@ -1,4 +1,5 @@ // by CAA-Picard +#include "script_component.hpp" if (isServer) then { diag_log _this; diff --git a/addons/core/functions/fnc_setCaptivityStatus.sqf b/addons/core/functions/fnc_setCaptivityStatus.sqf index 792a893fa7..b943fce4ab 100644 --- a/addons/core/functions/fnc_setCaptivityStatus.sqf +++ b/addons/core/functions/fnc_setCaptivityStatus.sqf @@ -11,6 +11,7 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_unit", "_reason", "_status", "_captivityReasons", "_unitCaptivityReasons", "_captivityReasonsBooleans", "_bitmask"]; @@ -18,14 +19,14 @@ _unit = _this select 0; _reason = _this select 1; _status = _this select 2; -_captivityReasons = missionNamespace getVariable ["AGM_captivityReasons", []]; +_captivityReasons = missionNamespace getVariable ["ACE_captivityReasons", []]; // register new reason (these reasons are shared publicly, since units can change ownership, but keep their captivity status) if !(_reason in _captivityReasons) then { _captivityReasons pushBack _reason; - AGM_captivityReasons = _captivityReasons; - publicVariable "AGM_captivityReasons"; + ACE_captivityReasons = _captivityReasons; + publicVariable "ACE_captivityReasons"; }; // get reasons why the unit is captive already and update to the new status diff --git a/addons/core/functions/fnc_setForceWalkStatus.sqf b/addons/core/functions/fnc_setForceWalkStatus.sqf index 4aab1a9998..52b674015f 100644 --- a/addons/core/functions/fnc_setForceWalkStatus.sqf +++ b/addons/core/functions/fnc_setForceWalkStatus.sqf @@ -16,8 +16,9 @@ Returns: None Example: - [AGM_Player, "BrokenLeg", true] call FUNC(setForceWalkStatus) + [ACE_Player, "BrokenLeg", true] call FUNC(setForceWalkStatus) */ +#include "script_component.hpp" private ["_unit", "_reason", "_status", "_forceWalkReasons", "_unitForceWalkReasons", "_forceWalkReasonsBooleans", "_bitmaskNumber"]; @@ -25,13 +26,13 @@ _unit = _this select 0; _reason = _this select 1; _status = _this select 2; -_forceWalkReasons = missionNamespace getVariable ["AGM_forceWalkReasons", []]; +_forceWalkReasons = missionNamespace getVariable ["ACE_forceWalkReasons", []]; // register new reason (these reasons are shared publicly, since units can change ownership, but keep their forceWalk status) if !(_reason in _forceWalkReasons) then { _forceWalkReasons pushBack _reason; - AGM_forceWalkReasons = _forceWalkReasons; - publicVariable "AGM_forceWalkReasons"; + ACE_forceWalkReasons = _forceWalkReasons; + publicVariable "ACE_forceWalkReasons"; }; // get reasons why the unit is forceWalking already and update to the new status @@ -46,7 +47,7 @@ _forceWalkReasonsBooleans set [_forceWalkReasons find _reason, _status]; _bitmaskNumber = _forceWalkReasonsBooleans call FUNC(toBitmask); -_unit setVariable ["AGM_forceWalkStatusNumber", _bitmaskNumber, true]; +_unit setVariable ["ACE_forceWalkStatusNumber", _bitmaskNumber, true]; // actually apply the forceWalk command globaly [[_unit], QUOTE(FUNC(applyForceWalkStatus)), _unit] call FUNC(execRemoteFnc); diff --git a/addons/core/functions/fnc_setKeyDefault.sqf b/addons/core/functions/fnc_setKeyDefault.sqf index 5882603038..e33843dc28 100644 --- a/addons/core/functions/fnc_setKeyDefault.sqf +++ b/addons/core/functions/fnc_setKeyDefault.sqf @@ -9,6 +9,7 @@ * Return value: * None. */ +#include "script_component.hpp" private ["_overwrite", "_saveProfile", "_config", "_count", "_index", "_configFile", "_name", "_key", "_shft", "_ctrl", "_alt", "_keyCode", "_state"]; @@ -21,7 +22,7 @@ _count = count _config; for "_index" from 0 to (_count - 1) do { _configFile = _config select _index; - _name = format ["AGM_Key_%1", configName _configFile]; + _name = format ["ACE_Key_%1", configName _configFile]; _key = profileNamespace getVariable _name; if (isNil "_key" || {_overwrite}) then { @@ -42,7 +43,7 @@ _count = count _config; for "_index" from 0 to (_count - 1) do { _configFile = _config select _index; - _name = format ["AGM_%1", configName _configFile]; + _name = format ["ACE_%1", configName _configFile]; _state = profileNamespace getVariable _name; if (isNil "_state" || {_overwrite}) then { @@ -55,12 +56,12 @@ for "_index" from 0 to (_count - 1) do { if (_overwrite) then { saveProfileNamespace; - diag_log text "[AGM]: Profile settings overwritten."; + diag_log text "[ACE]: Profile settings overwritten."; } else { if (_saveProfile) then { saveProfileNamespace; - diag_log text "[AGM]: Encountered missing variable in profile namespace. Profile saved."; + diag_log text "[ACE]: Encountered missing variable in profile namespace. Profile saved."; } else { - diag_log text "[AGM]: No missing variables encountered in profile namespace."; + diag_log text "[ACE]: No missing variables encountered in profile namespace."; }; }; diff --git a/addons/core/functions/fnc_setName.sqf b/addons/core/functions/fnc_setName.sqf index c5736e0a03..d50d5b1987 100644 --- a/addons/core/functions/fnc_setName.sqf +++ b/addons/core/functions/fnc_setName.sqf @@ -9,6 +9,7 @@ * Return value: * Nothing. */ +#include "script_component.hpp" private ["_unit", "_name"]; @@ -19,7 +20,7 @@ if (isNull _unit || {!alive _unit}) exitWith {}; if (_unit isKindOf "CAManBase") then { _name = [name _unit, true] call FUNC(sanitizeString); - //if (_name != _unit getVariable ["AGM_Name", ""]) then { - _unit setVariable ["AGM_Name", _name, true]; + //if (_name != _unit getVariable ["ACE_Name", ""]) then { + _unit setVariable ["ACE_Name", _name, true]; //}; }; diff --git a/addons/core/functions/fnc_setParameter.sqf b/addons/core/functions/fnc_setParameter.sqf index ac605e34d3..889c242bb3 100644 --- a/addons/core/functions/fnc_setParameter.sqf +++ b/addons/core/functions/fnc_setParameter.sqf @@ -1,7 +1,7 @@ /* * Author: CAA-Picard * - * Sets the value of an AGM_Parameter and makes it public. + * Sets the value of an ACE_Parameter and makes it public. * * Arguments: * 0: Parameter name (string) @@ -10,6 +10,7 @@ * Return Value: * None */ +#include "script_component.hpp" private ["_name", "_value"]; diff --git a/addons/core/functions/fnc_setPitchBankYaw.sqf b/addons/core/functions/fnc_setPitchBankYaw.sqf index 5624c6594f..f5d13eb6fe 100644 --- a/addons/core/functions/fnc_setPitchBankYaw.sqf +++ b/addons/core/functions/fnc_setPitchBankYaw.sqf @@ -3,7 +3,7 @@ * https://community.bistudio.com/wiki/BIS_fnc_setPitchBank * Edited By: * KoffeinFlummi - * + * * Arguments: * 0: Unit/Vehicle * 1: Pitch (degrees) @@ -13,6 +13,7 @@ * Return Value: * None */ +#include "script_component.hpp" private ["_object", "_aroundX", "_aroundY", "_aroundZ", "_dirX", "_dirY", "_dirZ", "_upX", "_upY", "_upZ", "_dir", "_up", "_dirXTemp", "_upXTemp"]; @@ -27,25 +28,25 @@ _dirZ = 0; _upX = 0; _upY = 0; _upZ = 1; -if (_aroundX != 0) then { +if (_aroundX != 0) then { _dirY = cos _aroundX; _dirZ = sin _aroundX; _upY = -sin _aroundX; _upZ = cos _aroundX; }; -if (_aroundY != 0) then { +if (_aroundY != 0) then { _dirX = _dirZ * sin _aroundY; _dirZ = _dirZ * cos _aroundY; _upX = _upZ * sin _aroundY; _upZ = _upZ * cos _aroundY; }; -if (_aroundZ != 0) then { +if (_aroundZ != 0) then { _dirXTemp = _dirX; _dirX = (_dirXTemp* cos _aroundZ) - (_dirY * sin _aroundZ); - _dirY = (_dirY * cos _aroundZ) + (_dirXTemp * sin _aroundZ); + _dirY = (_dirY * cos _aroundZ) + (_dirXTemp * sin _aroundZ); _upXTemp = _upX; _upX = (_upXTemp * cos _aroundZ) - (_upY * sin _aroundZ); - _upY = (_upY * cos _aroundZ) + (_upXTemp * sin _aroundZ); + _upY = (_upY * cos _aroundZ) + (_upXTemp * sin _aroundZ); }; _dir = [_dirX,_dirY,_dirZ]; diff --git a/addons/core/functions/fnc_setVariableJIP.sqf b/addons/core/functions/fnc_setVariableJIP.sqf index 78694b7740..8e790353f4 100644 --- a/addons/core/functions/fnc_setVariableJIP.sqf +++ b/addons/core/functions/fnc_setVariableJIP.sqf @@ -11,6 +11,7 @@ * Return value: * Nothing. */ +#include "script_component.hpp" private ["_unit", "_varName", "_value", "_respawnVariables"]; @@ -18,11 +19,11 @@ _unit = _this select 0; _varName = _this select 1; _value = _this select 2; -_respawnVariables = _unit getVariable ["AGM_respawnVariables", []]; +_respawnVariables = _unit getVariable ["ACE_respawnVariables", []]; if !(_varName in _respawnVariables) then { _respawnVariables pushBack _varName; - _unit setVariable ["AGM_respawnVariables", _respawnVariables, true]; + _unit setVariable ["ACE_respawnVariables", _respawnVariables, true]; }; _unit setVariable [_varName, _value, true]; diff --git a/addons/core/functions/fnc_showUser.sqf b/addons/core/functions/fnc_showUser.sqf index d01585c4dc..a5d602251d 100644 --- a/addons/core/functions/fnc_showUser.sqf +++ b/addons/core/functions/fnc_showUser.sqf @@ -1,9 +1,10 @@ // by commy2 +#include "script_component.hpp" private "_object"; -AGM_Debug_Object = _this select 0; +GVAR(Debug_Object) = _this select 0; onEachFrame { - hintSilent str (AGM_Debug_Object getVariable ["AGM_isUsedBy", objNull]); + hintSilent str (GVAR(Debug_Object) getVariable ["ACE_isUsedBy", objNull]); }; diff --git a/addons/core/functions/fnc_stringToColoredText.sqf b/addons/core/functions/fnc_stringToColoredText.sqf index 4f90a92984..4f6b1e7143 100644 --- a/addons/core/functions/fnc_stringToColoredText.sqf +++ b/addons/core/functions/fnc_stringToColoredText.sqf @@ -10,6 +10,7 @@ * Return value: * Text */ +#include "script_component.hpp" private ["_string", "_color"]; diff --git a/addons/core/functions/fnc_subString.sqf b/addons/core/functions/fnc_subString.sqf index c5eb1c8229..2389dbed00 100644 --- a/addons/core/functions/fnc_subString.sqf +++ b/addons/core/functions/fnc_subString.sqf @@ -11,6 +11,7 @@ * Return Value: * String when successfull / False when not */ +#include "script_component.hpp" _string = _this select 0; _index = _this select 1; diff --git a/addons/core/functions/fnc_toBin.sqf b/addons/core/functions/fnc_toBin.sqf index a4f8a40f6f..4fdcded607 100644 --- a/addons/core/functions/fnc_toBin.sqf +++ b/addons/core/functions/fnc_toBin.sqf @@ -10,6 +10,7 @@ A number Return Value: A binary number, String */ +#include "script_component.hpp" private ["_number", "_minLength", "_sign", "_bin", "_rest"]; diff --git a/addons/core/functions/fnc_toBitmask.sqf b/addons/core/functions/fnc_toBitmask.sqf index da997cc87a..eb69e67621 100644 --- a/addons/core/functions/fnc_toBitmask.sqf +++ b/addons/core/functions/fnc_toBitmask.sqf @@ -9,6 +9,7 @@ * Return value: * Bitmask (Number) */ +#include "script_component.hpp" private ["_array", "_result"]; diff --git a/addons/core/functions/fnc_toHex.sqf b/addons/core/functions/fnc_toHex.sqf index d61ac07e5e..df8f3654de 100644 --- a/addons/core/functions/fnc_toHex.sqf +++ b/addons/core/functions/fnc_toHex.sqf @@ -10,6 +10,7 @@ A number Return Value: A hexadecimal number, String */ +#include "script_component.hpp" private ["_number", "_minLength", "_sign", "_hex", "_rest"]; diff --git a/addons/core/functions/fnc_toNumber.sqf b/addons/core/functions/fnc_toNumber.sqf index 053714d3ca..fc481398d3 100644 --- a/addons/core/functions/fnc_toNumber.sqf +++ b/addons/core/functions/fnc_toNumber.sqf @@ -16,7 +16,9 @@ Example: _number = ["102"] call FUNC(toNumber); */ -if (TYPENAME(_this select 0) == "SCALAR")exitWith { +#include "script_component.hpp" + +if (typeName (_this select 0) == "SCALAR") exitWith { (_this select 0) }; diff --git a/addons/core/functions/fnc_unmuteUnit.sqf b/addons/core/functions/fnc_unmuteUnit.sqf index 3e2dae2c22..8de7708d4b 100644 --- a/addons/core/functions/fnc_unmuteUnit.sqf +++ b/addons/core/functions/fnc_unmuteUnit.sqf @@ -2,13 +2,14 @@ * Author: commy2 * * Unmutes the unit. - * + * * Argument: * 0: Unit (Object) - * + * * Return value: * Nothing */ +#include "script_component.hpp" private ["_unit", "_speaker"]; @@ -16,7 +17,7 @@ _unit = _this select 0; if (isNull _unit) exitWith {}; -_speaker = _unit getVariable ["AGM_OriginalSpeaker", ""]; +_speaker = _unit getVariable ["ACE_OriginalSpeaker", ""]; if (_speaker == "") exitWith {}; -[0, format ["{(_this select 1) setSpeaker '%1'}", _speaker], _unit, "AGM_Speaker"] call FUNC(execPersistentFnc); +[0, format ["{(_this select 1) setSpeaker '%1'}", _speaker], _unit, "ACE_Speaker"] call FUNC(execPersistentFnc); diff --git a/addons/core/scripts/KeyInput/initCanInteractFunction.sqf b/addons/core/scripts/KeyInput/initCanInteractFunction.sqf index ed0cc60042..d718be04fe 100644 --- a/addons/core/scripts/KeyInput/initCanInteractFunction.sqf +++ b/addons/core/scripts/KeyInput/initCanInteractFunction.sqf @@ -1,8 +1,9 @@ // by commy2 +#include "script_component.hpp" private ["_function", "_configFile", "_count", "_index", "_config", "_configName", "_condition"]; -_function = "private '_exceptions'; _exceptions = _this; alive AGM_player"; +_function = "private '_exceptions'; _exceptions = _this; alive ACE_player"; _configFile = configFile >> QGVAR(canInteractConditions); _count = count _configFile; diff --git a/addons/core/scripts/KeyInput/initKeys.sqf b/addons/core/scripts/KeyInput/initKeys.sqf index cf24748840..d8c19833db 100644 --- a/addons/core/scripts/KeyInput/initKeys.sqf +++ b/addons/core/scripts/KeyInput/initKeys.sqf @@ -1,16 +1,17 @@ // by commy2 +#include "script_component.hpp" _config = configFile >> QGVAR(Default_Keys); _count = count _config; -_header = "_keyCode = [_this select 1, _this select 2, _this select 3, _this select 4] call FUNC(convertKeyCode); _keyIndex = floor _keyCode; if (_keyIndex == 0) exitWith {false}; if (!(profileNamespace getVariable ['AGM_enableNumberHotkeys', true]) && {_keyIndex < 12} && {_keyIndex > 1} && {_keyCode mod 1 == 0}) exitWith {false}; _time = time; _player = AGM_player; _vehicle = vehicle _player; _isInput = false;"; -_headerUp = "_keyCode = _this select 1; _keyIndex = _keyCode; if (_keyIndex == 0) exitWith {false}; _time = time; _player = AGM_player; _vehicle = vehicle _player;"; +_header = "_keyCode = [_this select 1, _this select 2, _this select 3, _this select 4] call FUNC(convertKeyCode); _keyIndex = floor _keyCode; if (_keyIndex == 0) exitWith {false}; if (!(profileNamespace getVariable ['ACE_enableNumberHotkeys', true]) && {_keyIndex < 12} && {_keyIndex > 1} && {_keyCode mod 1 == 0}) exitWith {false}; _time = time; _player = ACE_player; _vehicle = vehicle _player; _isInput = false;"; +_headerUp = "_keyCode = _this select 1; _keyIndex = _keyCode; if (_keyIndex == 0) exitWith {false}; _time = time; _player = ACE_player; _vehicle = vehicle _player;"; _handleDoubleTap = "if (_time < (GVAR(keyTimes) select _keyIndex) + 0.5 && {_keyIndex == _keyCode}) then {_keyCode = _keyIndex + 0.8};"; _handleHold = "_allowHold = false; _disallowHold = false; if (GVAR(keyStates) select _keyIndex > 1) exitWith {false}; if (GVAR(keyStates) select _keyIndex > 0) then {_keyCode = _keyIndex + 0.9};"; _handleHoldUp = "if (GVAR(keyStates) select _keyIndex > 1) then {_keyCode = _keyIndex + 0.9};"; -_debug = "if (!isNil 'AGM_Debug' && {'Keys' in AGM_Debug}) then {systemChat (str _keyCode + ' ' + str (GVAR(keyStates) select _keyIndex))};"; +_debug = "if (!isNil 'ACE_Debug' && {'Keys' in ACE_Debug}) then {systemChat (str _keyCode + ' ' + str (GVAR(keyStates) select _keyIndex))};"; _onKeyDown = "" + _debug; _onKeyUp = "" + _debug; @@ -27,15 +28,15 @@ for "_index" from 0 to (_count - 1) do { _exceptions = getArray (_configFile >> "exceptions"); _canInteract = format ["%1 call GVAR(canInteract)", _exceptions]; - _conditionName = format ["AGM_Key_%1_Condition", _keyName]; - _statementName = format ["AGM_Key_%1_Statement", _keyName]; + _conditionName = format ["ACE_Key_%1_Condition", _keyName]; + _statementName = format ["ACE_Key_%1_Statement", _keyName]; missionNamespace setVariable [_conditionName, compileFinal _condition]; missionNamespace setVariable [_statementName, compileFinal _statement]; _handleHolding = ["_disallowHold = true;", "_allowHold = true;"] select (getNumber (_configFile >> "allowHolding") == 1); if (_statement != "") then { - _entry = format ["if (_keyCode == profileNamespace getVariable 'AGM_Key_%1' && {call %2}) then {if (%4) then {call %3};%5 _isInput = true;};", _keyName, _conditionName, _statementName, _canInteract, _handleHolding]; + _entry = format ["if (_keyCode == profileNamespace getVariable 'ACE_Key_%1' && {call %2}) then {if (%4) then {call %3};%5 _isInput = true;};", _keyName, _conditionName, _statementName, _canInteract, _handleHolding]; _onKeyDown = _onKeyDown + _entry; }; @@ -44,13 +45,13 @@ for "_index" from 0 to (_count - 1) do { _statement = getText (_configFile >> "statementUp"); - _conditionName = format ["AGM_Key_%1_ConditionUp", _keyName]; - _statementName = format ["AGM_Key_%1_StatementUp", _keyName]; + _conditionName = format ["ACE_Key_%1_ConditionUp", _keyName]; + _statementName = format ["ACE_Key_%1_StatementUp", _keyName]; missionNamespace setVariable [_conditionName, compileFinal _condition]; missionNamespace setVariable [_statementName, compileFinal _statement]; if (_statement != "") then { - _entry = format ["if (_keyCode == floor (profileNamespace getVariable 'AGM_Key_%1') && {call %2}) then {call %3; _isInput = true;};", _keyName, _conditionName, _statementName]; + _entry = format ["if (_keyCode == floor (profileNamespace getVariable 'ACE_Key_%1') && {call %2}) then {call %3; _isInput = true;};", _keyName, _conditionName, _statementName]; _onKeyUp = _onKeyUp + _entry; }; }; @@ -59,7 +60,7 @@ _halt = "if (!(_allowHold) || {_disallowHold}) then {GVAR(keyStates) set [_keyIn _haltUp = QGVAR(keyStates) set [_keyIndex, 0];; //_return = "_isInput"; -_return = "if (profileNamespace getVariable ['AGM_enableNumberHotkeys', true] && {_keyIndex < 12} && {_keyIndex > 1}) then {true} else {_isInput}"; +_return = "if (profileNamespace getVariable ['ACE_enableNumberHotkeys', true] && {_keyIndex < 12} && {_keyIndex > 1}) then {true} else {_isInput}"; _repeat = "if (!_isInput && {_keyCode mod 1 > 0.75} && {_keyCode mod 1 < 0.85}) exitWith {_keyCode = _keyIndex; " + _onKeyDown + _return + "};"; _repeatUp = "if (!_isInput && {_keyCode mod 1 > 0.75} && {_keyCode mod 1 < 0.85}) exitWith {_keyCode = _keyIndex; " + _onKeyUp + "};"; diff --git a/addons/core/scripts/KeyInput/initScrollWheel.sqf b/addons/core/scripts/KeyInput/initScrollWheel.sqf index 61f18b26f4..5a8bf57d79 100644 --- a/addons/core/scripts/KeyInput/initScrollWheel.sqf +++ b/addons/core/scripts/KeyInput/initScrollWheel.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" GVAR(ScrollWheelFrame) = diag_frameno; @@ -10,5 +11,5 @@ GVAR(onScrollWheel) = { { [_scroll] call _x; - } count ((missionNamespace getVariable ["AGM_EventHandler_ScrollWheel", [-1, [], []]]) select 2); + } count ((missionNamespace getVariable ["ACE_EventHandler_ScrollWheel", [-1, [], []]]) select 2); }; diff --git a/addons/core/scripts/Version/checkVersionNumber.sqf b/addons/core/scripts/Version/checkVersionNumber.sqf index 4e7049eeb2..ae3c438f70 100644 --- a/addons/core/scripts/Version/checkVersionNumber.sqf +++ b/addons/core/scripts/Version/checkVersionNumber.sqf @@ -1,24 +1,25 @@ // by commy2 +#include "script_component.hpp" sleep 1; //wait for module _files = []; -if (missionNamespace getVariable ["AGM_Version_CheckAll", false]) then { +if (missionNamespace getVariable ["ACE_Version_CheckAll", false]) then { { - if (toLower _x find "a3_" != 0 && {!(toLower _x in (missionNamespace getVariable ["AGM_Version_Whitelist", []]))}) then { + if (toLower _x find "a3_" != 0 && {!(toLower _x in (missionNamespace getVariable ["ACE_Version_Whitelist", []]))}) then { _files pushBack _x; }; } forEach activatedAddons; } else { { - if (toLower _x find "agm_" == 0) then { + if (toLower _x find "ACE_" == 0) then { _files pushBack _x; }; } forEach activatedAddons; }; -_versionMain = parseNumber getText (configFile >> "CfgPatches" >> "AGM_Core" >> "version"); +_versionMain = parseNumber getText (configFile >> "CfgPatches" >> "ACE_Core" >> "version"); _versions = []; { @@ -27,32 +28,32 @@ _versions = []; } forEach _files; if (isServer) then { - diag_log text format ["[AGM] Server: agm_core is Version %1.", _versionMain]; + diag_log text format ["[ACE] Server: ACE_core is Version %1.", _versionMain]; { - if (toLower _x find "agm_" == 0) then {// + if (toLower _x find "ACE_" == 0) then {// _version = _versions select _forEachIndex; if (_version != _versionMain) then { - diag_log text format ["[AGM] Server: %1 is Version %2.", _x, _version]; + diag_log text format ["[ACE] Server: %1 is Version %2.", _x, _version]; }; }; } forEach _files; - AGM_Version_ServerVersions = [_files, _versions]; - publicVariable "AGM_Version_ServerVersions"; + ACE_Version_ServerVersions = [_files, _versions]; + publicVariable "ACE_Version_ServerVersions"; } else { - diag_log text format ["[AGM] Client: agm_core is Version %1.", _versionMain]; + diag_log text format ["[ACE] Client: ACE_core is Version %1.", _versionMain]; { - if (toLower _x find "agm_" == 0) then {// + if (toLower _x find "ACE_" == 0) then {// _version = _versions select _forEachIndex; if (_version != _versionMain) then { - diag_log text format ["[AGM] Client: %1 is Version %2.", _x, _version]; + diag_log text format ["[ACE] Client: %1 is Version %2.", _x, _version]; }; }; } forEach _files; - AGM_Version_ClientVersions = [_files, _versions]; + ACE_Version_ClientVersions = [_files, _versions]; }; // Begin client version check @@ -60,16 +61,16 @@ if (!isServer) then { // Wait for server to send the servers files and version numbers waitUntil { sleep 1; - !isNil "AGM_Version_ClientVersions" && {!isNil "AGM_Version_ServerVersions"} + !isNil "ACE_Version_ClientVersions" && {!isNil "ACE_Version_ServerVersions"} }; _client = profileName; - _files = AGM_Version_ClientVersions select 0; - _versions = AGM_Version_ClientVersions select 1; + _files = ACE_Version_ClientVersions select 0; + _versions = ACE_Version_ClientVersions select 1; - _serverFiles = AGM_Version_ServerVersions select 0; - _serverVersions = AGM_Version_ServerVersions select 1; + _serverFiles = ACE_Version_ServerVersions select 0; + _serverVersions = ACE_Version_ServerVersions select 1; // Compare client and server files and versions _missingAddons = []; @@ -121,7 +122,7 @@ if (!isServer) then { if (count _missingAddons > 0) then { _missingAddon = true; - _error = format ["[AGM] %1: ERROR missing addon(s): ", _client]; + _error = format ["[ACE] %1: ERROR missing addon(s): ", _client]; { _error = _error + format ["%1, ", _x]; @@ -138,7 +139,7 @@ if (!isServer) then { if (count _missingAddonsServer > 0) then { _missingAddonServer = true; - _error = format ["[AGM] %1: ERROR missing server addon(s): ", _client]; + _error = format ["[ACE] %1: ERROR missing server addon(s): ", _client]; { _error = _error + format ["%1, ", _x]; @@ -155,7 +156,7 @@ if (!isServer) then { if (count _oldVersionsClient > 0) then { _oldVersionClient = true; - _error = format ["[AGM] %1: ERROR outdated addon(s): ", _client]; + _error = format ["[ACE] %1: ERROR outdated addon(s): ", _client]; { _error = _error + format ["%1 (client: %2, server: %3), ", _x select 0, _x select 1, _x select 2]; @@ -172,7 +173,7 @@ if (!isServer) then { if (count _oldVersionsServer > 0) then { _oldVersionServer = true; - _error = format ["[AGM] %1: ERROR outdated server addon(s): ", _client]; + _error = format ["[ACE] %1: ERROR outdated server addon(s): ", _client]; { _error = _error + format ["%1 (client: %2, server: %3), ", _x select 0, _x select 1, _x select 2]; @@ -185,5 +186,5 @@ if (!isServer) then { [_error, "{systemChat _this}"] call FUNC(execRemoteFnc); }; - AGM_Version_ClientErrors = [_missingAddon, _missingAddonServer, _oldVersionClient, _oldVersionServer]; + ACE_Version_ClientErrors = [_missingAddon, _missingAddonServer, _oldVersionClient, _oldVersionServer]; }; diff --git a/addons/core/scripts/assignedItemFix.sqf b/addons/core/scripts/assignedItemFix.sqf index e5b9948e6b..bf8dc193ec 100644 --- a/addons/core/scripts/assignedItemFix.sqf +++ b/addons/core/scripts/assignedItemFix.sqf @@ -1,18 +1,19 @@ // by commy2 +#include "script_component.hpp" -if (isNil "AGM_itemFix") then { - AGM_isMapEnabled = call {_config = missionConfigFile >> "showMap"; !isNumber _config || {getNumber _config == 1}}; - AGM_isCompassEnabled = call {_config = missionConfigFile >> "showCompass"; !isNumber _config || {getNumber _config == 1}}; - AGM_isWatchEnabled = call {_config = missionConfigFile >> "showWatch"; !isNumber _config || {getNumber _config == 1}}; - AGM_isRadioEnabled = call {_config = missionConfigFile >> "showRadio"; !isNumber _config || {getNumber _config == 1}}; - AGM_isGPSEnabled = call {_config = missionConfigFile >> "showGPS"; !isNumber _config || {getNumber _config == 1}}; +if (isNil "ACE_itemFix") then { + ACE_isMapEnabled = call {_config = missionConfigFile >> "showMap"; !isNumber _config || {getNumber _config == 1}}; + ACE_isCompassEnabled = call {_config = missionConfigFile >> "showCompass"; !isNumber _config || {getNumber _config == 1}}; + ACE_isWatchEnabled = call {_config = missionConfigFile >> "showWatch"; !isNumber _config || {getNumber _config == 1}}; + ACE_isRadioEnabled = call {_config = missionConfigFile >> "showRadio"; !isNumber _config || {getNumber _config == 1}}; + ACE_isGPSEnabled = call {_config = missionConfigFile >> "showGPS"; !isNumber _config || {getNumber _config == 1}}; - AGM_itemFix = ["AGM_itemFix", "onEachFrame", { - _items = assignedItems AGM_player; - showMap (AGM_isMapEnabled && {"ItemMap" in _items}); - showCompass (AGM_isCompassEnabled && {"ItemCompass" in _items}); - showWatch (AGM_isWatchEnabled && {"ItemWatch" in _items}); - //showRadio (AGM_isRadioEnabled && {"ItemRadio" in _items}); - showGPS (AGM_isGPSEnabled && {"ItemGPS" in _items || {cameraOn == getConnectedUAV AGM_player}}); //If player is activly controling a UAV, showGPS controls showing the map (m key) + ACE_itemFix = ["ACE_itemFix", "onEachFrame", { + _items = assignedItems ACE_player; + showMap (ACE_isMapEnabled && {"ItemMap" in _items}); + showCompass (ACE_isCompassEnabled && {"ItemCompass" in _items}); + showWatch (ACE_isWatchEnabled && {"ItemWatch" in _items}); + //showRadio (ACE_isRadioEnabled && {"ItemRadio" in _items}); + showGPS (ACE_isGPSEnabled && {"ItemGPS" in _items || {cameraOn == getConnectedUAV ACE_player}}); //If player is activly controling a UAV, showGPS controls showing the map (m key) }] call BIS_fnc_addStackedEventHandler; }; diff --git a/addons/core/scripts/closeMenu.sqf b/addons/core/scripts/closeMenu.sqf index f641bc499c..86206f2c93 100644 --- a/addons/core/scripts/closeMenu.sqf +++ b/addons/core/scripts/closeMenu.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" closeDialog 0; [localize QUOTE(DOUBLES(STR,GVAR(ProfileNotSaved)))] call FUNC(displayTextStructured); diff --git a/addons/core/scripts/editKey.sqf b/addons/core/scripts/editKey.sqf index 4d55a9808b..d3661c1e9c 100644 --- a/addons/core/scripts/editKey.sqf +++ b/addons/core/scripts/editKey.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" #define GRAY [0.25, 0.25, 0.25, 1] #define WHITE [1, 1, 1, 1] @@ -17,7 +18,7 @@ _ctrlMenuDialog = _dlgMenuDialog displayCtrl (OFFSET_2 + (_this select 0)); _action = GVAR(keyNames) select (_this select 0); _displayName = getText (configFile >> QGVAR(Default_Keys)" >> _action >> "displayName); -_keyCode = profileNamespace getVariable [format ["AGM_Key_%1", _action], 0];// +_keyCode = profileNamespace getVariable [format ["ACE_Key_%1", _action], 0];// for "_index1" from 0 to (count GVAR(keyNew) - 1) do { if (_action == (GVAR(keyNew) select _index1) select 0) then { _keyCode = (GVAR(keyNew) select _index1) select 1; diff --git a/addons/core/scripts/keyInput.sqf b/addons/core/scripts/keyInput.sqf index 3c3c15fb35..5e06d23bd5 100644 --- a/addons/core/scripts/keyInput.sqf +++ b/addons/core/scripts/keyInput.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" #define FORBIDDEN_KEYS [42, 54, 29, 157, 56, 184, 0, 183, 197, 1] diff --git a/addons/core/scripts/keyRelease.sqf b/addons/core/scripts/keyRelease.sqf index d9277a20f4..d0d1b736a0 100644 --- a/addons/core/scripts/keyRelease.sqf +++ b/addons/core/scripts/keyRelease.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" _keyIndex = _this select 1; diff --git a/addons/core/scripts/nextKeys.sqf b/addons/core/scripts/nextKeys.sqf index ff544f312c..d3d96ce20c 100644 --- a/addons/core/scripts/nextKeys.sqf +++ b/addons/core/scripts/nextKeys.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" #define OFFSET_1 100 #define OFFSET_2 200 @@ -34,7 +35,7 @@ if (GVAR(MenuPage) == _countPages - 1) then { _configFile = _config select _index + _offset; _configName = configName _configFile; _displayName = getText (_configFile >> "displayName"); - _state = profileNamespace getVariable format ["AGM_%1", _configName]; + _state = profileNamespace getVariable format ["ACE_%1", _configName]; _control1 = _dlgMenuDialog displayCtrl (OFFSET_3 + _index); _control2 = _dlgMenuDialog displayCtrl (OFFSET_4 + _index); @@ -91,7 +92,7 @@ if (GVAR(MenuPage) == _countPages - 1) then { _indexUpdate = _updateNames find _keyName; _keyCode = if (_indexUpdate == -1) then { - profileNamespace getVariable format ["AGM_Key_%1", _keyName]; + profileNamespace getVariable format ["ACE_Key_%1", _keyName]; } else { _updateKeys select _indexUpdate; }; diff --git a/addons/core/scripts/openMenu.sqf b/addons/core/scripts/openMenu.sqf index 12383b2f88..6e68a59482 100644 --- a/addons/core/scripts/openMenu.sqf +++ b/addons/core/scripts/openMenu.sqf @@ -1,4 +1,5 @@ // by commy2 +#include "script_component.hpp" #define OFFSET_1 100 #define OFFSET_2 200 @@ -33,7 +34,7 @@ for "_index" from 0 to (_count - 1 min 19) do { _displayName = getText (_configFile >> "displayName"); _isDisabled = getNumber (_configFile >> "disabled") == 1; - _keyCode = profileNamespace getVariable format ["AGM_Key_%1", _keyName]; + _keyCode = profileNamespace getVariable format ["ACE_Key_%1", _keyName]; _description = [_keyCode] call FUNC(revertKeyCodeLocalized); _control1 = _dlgMenuDialog displayCtrl (OFFSET_1 + _index); @@ -69,7 +70,7 @@ if (GVAR(keySave) == 1) then { _keyName = _key select 0; _keyCode = _key select 1; - profileNamespace setVariable [format ["AGM_Key_%1", _keyName], _keyCode]; + profileNamespace setVariable [format ["ACE_Key_%1", _keyName], _keyCode]; }; _count1 = count GVAR(OptionNamesNew); diff --git a/addons/core/scripts/readParameters.sqf b/addons/core/scripts/readParameters.sqf index 363b4915d5..3b17ea7f1f 100644 --- a/addons/core/scripts/readParameters.sqf +++ b/addons/core/scripts/readParameters.sqf @@ -1,7 +1,8 @@ // by CAA-Picard +#include "script_component.hpp" -// Read AGM_Parameters from config and set them on the mission namespace -_config = configFile >> "AGM_Parameters"; +// Read ACE_Parameters from config and set them on the mission namespace +_config = configFile >> "ACE_Parameters_Numeric"; _count = count _config; for "_index" from 0 to (_count - 1) do { _x = _config select _index; @@ -11,17 +12,7 @@ for "_index" from 0 to (_count - 1) do { [_name, _value] call FUNC(setParameter); }; -_config = configFile >> "AGM_Parameters_Numeric"; -_count = count _config; -for "_index" from 0 to (_count - 1) do { - _x = _config select _index; - - _name = configName _x; - _value = _x call bis_fnc_getcfgdata; - [_name, _value] call FUNC(setParameter); -}; - -_config = configFile >> "AGM_Parameters_Boolean"; +_config = configFile >> "ACE_Parameters_Boolean"; _count = count _config; for "_index" from 0 to (_count - 1) do { _x = _config select _index; @@ -32,8 +23,8 @@ for "_index" from 0 to (_count - 1) do { }; -// Read AGM_Parameters from mission and set them on the mission namespace, replacing defaults if necesary -_config = missionConfigFile >> "AGM_Parameters"; +// Read ACE_Parameters from mission and set them on the mission namespace, replacing defaults if necesary +_config = missionConfigFile >> "ACE_Parameters"; _count = count _config; for "_index" from 0 to (_count - 1) do { _x = _config select _index; @@ -43,7 +34,7 @@ for "_index" from 0 to (_count - 1) do { [_name, _value] call FUNC(setParameter); }; -_config = missionConfigFile >> "AGM_Parameters_Numeric"; +_config = missionConfigFile >> "ACE_Parameters_Numeric"; _count = count _config; for "_index" from 0 to (_count - 1) do { _x = _config select _index; @@ -53,7 +44,7 @@ for "_index" from 0 to (_count - 1) do { [_name, _value] call FUNC(setParameter); }; -_config = missionConfigFile >> "AGM_Parameters_Boolean"; +_config = missionConfigFile >> "ACE_Parameters_Boolean"; _count = count _config; for "_index" from 0 to (_count - 1) do { _x = _config select _index; diff --git a/addons/core/scripts/toggleState.sqf b/addons/core/scripts/toggleState.sqf index 1bd9b09912..ebffac5701 100644 --- a/addons/core/scripts/toggleState.sqf +++ b/addons/core/scripts/toggleState.sqf @@ -1,8 +1,9 @@ // by commy2 +#include "script_component.hpp" _index = _this select 0; -_name = format ["AGM_%1", GVAR(OptionNames) select _index]; +_name = format ["ACE_%1", GVAR(OptionNames) select _index]; _index1 = GVAR(OptionNamesNew) find _name; _state = if (_index1 == -1) then {_index1 = count GVAR(OptionNamesNew); !(profileNamespace getVariable _name)} else {!(GVAR(OptionStatesNew) select _index1)}; diff --git a/addons/core/sounds/AGM_click.wav b/addons/core/sounds/ACE_click.wav similarity index 100% rename from addons/core/sounds/AGM_click.wav rename to addons/core/sounds/ACE_click.wav diff --git a/addons/core/stringtable.xml b/addons/core/stringtable.xml index e60529bde0..bc20e646b0 100644 --- a/addons/core/stringtable.xml +++ b/addons/core/stringtable.xml @@ -1,20 +1,20 @@  - + - - AGM-Team - AGM-Team - AGM-Team - AGM-Team - AGM-Team - AGM-Team - Команда AGM - AGM-Team - AGM-Team - AGM-Team + + ACE-Team + ACE-Team + ACE-Team + ACE-Team + ACE-Team + ACE-Team + Команда ACE + ACE-Team + ACE-Team + ACE-Team - + Save Speichern Guardar @@ -26,7 +26,7 @@ Mentés Salva - + Cancel Abbrechen Cancelar @@ -38,19 +38,19 @@ Mégse Annulla - - AGM Options - AGM Optionen - Opciones AGM - Opcje AGM - AGM Nastavení - AGM Options - AGM Настройки - Opções do AGM - AGM Opciók - Opzioni AGM + + ACE Options + ACE Optionen + Opciones ACE + Opcje ACE + ACE Nastavení + ACE Options + ACE Настройки + Opções do ACE + ACE Opciók + Opzioni ACE - + Shift Umschalt Shift @@ -62,7 +62,7 @@ Shift Shift - + Ctrl Strg Ctrl @@ -74,7 +74,7 @@ Ctrl Ctrl - + Alt Alt Alt @@ -86,7 +86,7 @@ Alt Alt - + Shift right Umschalt rechts Shift derecho @@ -98,7 +98,7 @@ Jobb Shift Shift destro - + Ctrl right Strg rechts Ctrl derecho @@ -110,7 +110,7 @@ Jobb Ctrl Ctrl destro - + Alt right Alt Gr Alt derecho @@ -122,7 +122,7 @@ Alt Gr Alt Gr - + Default Standard Por defecto @@ -134,7 +134,7 @@ Alapértelmezett Standard - + None Keiner Ninguna @@ -146,7 +146,7 @@ Semmi Non assegnato - + 2x %1 2x %1 2x %1 @@ -158,7 +158,7 @@ 2x %1 2x %1 - + Hold %1 %1 halten Mantener %1 @@ -170,7 +170,7 @@ %1 Nyomvatartása Tieni premuto %1 - + Profile saved Profil gespeichert Perfil guardado @@ -182,7 +182,7 @@ Profil elmentve Profilo salvato - + Profile not saved Profil nicht gespeichert Perfil no guardado @@ -195,7 +195,7 @@ Profilo non salvato - + N N N @@ -207,7 +207,7 @@ É N - + NNE NNO NNE @@ -219,7 +219,7 @@ ÉÉK NNE - + NE NO NE @@ -231,7 +231,7 @@ ÉK NE - + ENE ONO ENE @@ -243,7 +243,7 @@ KÉK ENE - + E O E @@ -255,7 +255,7 @@ K E - + ESE OSO ESE @@ -267,7 +267,7 @@ KDK ESE - + SE SO SE @@ -279,7 +279,7 @@ DK SE - + SSE SSO SSE @@ -291,7 +291,7 @@ DDK SSE - + S S S @@ -303,7 +303,7 @@ D S - + SSW SSW SSO @@ -315,7 +315,7 @@ DDNy SSO - + SW SW SO @@ -327,7 +327,7 @@ DNy SO - + WSW WSW OSO @@ -339,7 +339,7 @@ NyDNy OSO - + W W O @@ -351,7 +351,7 @@ Ny O - + WNW WNW ONO @@ -363,7 +363,7 @@ NyÉNy ONO - + NW NW NO @@ -375,7 +375,7 @@ ÉNy NO - + NNW NNW NNO @@ -387,7 +387,7 @@ ÉÉNy NNO - + Action cancelled. Aktion abgebrochen. Acción cancelada. @@ -399,7 +399,7 @@ Művelet megszakítva. Azione cancellata. - + < Prev < Zurück < Anterior. @@ -411,7 +411,7 @@ < Előző < Prec - + Next > Weiter > Siguiente > @@ -423,19 +423,19 @@ Következő > Prossimo > - - [AGM] Miscellaneous Items - [AGM] Verschiedenes - [AGM] Objetos varios - [AGM] Różne przedmioty - [AGM] Ostatní předměty - [AGM] Objets divers - [AGM] Различные предметы - [AGM] Itens diversos - [AGM] Egyéb tárgyak - [AGM] Oggetti vari + + [ACE] Miscellaneous Items + [ACE] Verschiedenes + [ACE] Objetos varios + [ACE] Różne przedmioty + [ACE] Ostatní předměty + [ACE] Objets divers + [ACE] Различные предметы + [ACE] Itens diversos + [ACE] Egyéb tárgyak + [ACE] Oggetti vari - + Disable Command Menu Befehlsmenü ausschalten Desactivar menú de mando @@ -445,7 +445,7 @@ Выключить командное меню Parancsnoki menü kikapcsolása - + Unknown Unbekannt Desconocido @@ -454,7 +454,7 @@ Неизвестно Ismeretlen - + No Voice Keine Stimme Sin voz