diff --git a/AUTHORS.txt b/AUTHORS.txt index 11b34fff14..c3c4d7f12e 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -63,6 +63,7 @@ Dimaslg dixon13 Drill Dudakov aka [OMCB]Kaban +Drofseh Dslyecxi ElTyranos eRazeri @@ -130,6 +131,7 @@ System98 SzwedzikPL Tachi Tessa Elieff +Timi007 Toaster Tonic Tourorist diff --git a/README.md b/README.md index 8241ea340f..868201c9bf 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

- ACE3 Version + ACE3 Version ACE3 Issues @@ -21,8 +21,8 @@ ACE3 Slack - - ACE3 Build Status + + ACE3 Build Status

diff --git a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf index d988d5f8ed..791fdb5040 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAmmoTemperatureVelocityShift.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_muzzleVelocityShiftTable", "_temperature"]; diff --git a/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf b/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf index 326de5478e..b574698931 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateAtmosphericCorrection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * @@ -18,7 +19,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_ballisticCoefficient", "_temperature"/*in C*/, "_pressure"/*in hPa*/, "_relativeHumidity"/*as ratio 0-1*/, "_atmosphereModel"/*"ICAO" or "ASM"*/]; diff --git a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf index 4c5cd47a29..e28ccd2523 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateBarrelLengthVelocityShift.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg, MikeMatrix, joko // Jonas * @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_barrelLength", "_muzzleVelocityTable", "_barrelLengthTable", "_muzzleVelocity"]; TRACE_4("params",_barrelLength,_muzzleVelocityTable,_barrelLengthTable,_muzzleVelocity); diff --git a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf index 1c7cadd3f0..184ee6970d 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateRetardation.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" // Source: GNU Exterior Ballistics diff --git a/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf b/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf index 8af9f77930..cf6dbb03b1 100644 --- a/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf +++ b/addons/advanced_ballistics/functions/fnc_calculateStabilityFactor.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * @@ -20,7 +21,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_caliber", "_bulletLength", "_bulletMass", "_barrelTwist", "_muzzleVelocity", "_temperature", "_barometricPressure"]; diff --git a/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf b/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf index 4c929ac22d..d2f5cba98f 100644 --- a/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf +++ b/addons/advanced_ballistics/functions/fnc_diagnoseWeapons.sqf @@ -1,3 +1,5 @@ +#define DEBUG_MODE_FULL +#include "script_component.hpp" /* * Author: esteldunedain * @@ -15,8 +17,6 @@ * * Public: No */ -#define DEBUG_MODE_FULL -#include "script_component.hpp" private _diagnoseStartTime = diag_tickTime; #ifdef DEBUG_INIT_SPEEDS @@ -33,9 +33,7 @@ for "_i" from 0 to (count _cfgWeapons)-1 do { if (isClass _weaponConfig) then { private _weapon = configName _weaponConfig; private _weaponType = getNumber (_weaponConfig >> "Type"); - if (_weaponType in [1, 2]) then { - // The weapon is a primary weapon or a handgun weapon - + if (_weaponType in [TYPE_WEAPON_PRIMARY, TYPE_WEAPON_HANDGUN]) then { private _weaponInitSpeed = getNumber (_weaponConfig >> "initSpeed"); private _magazines = getArray (_weaponConfig >> "magazines"); { diff --git a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf index f50dcc6887..714aaa31ef 100644 --- a/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf +++ b/addons/advanced_ballistics/functions/fnc_displayProtractor.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" #define __dsp (uiNamespace getVariable "RscProtractor") #define __ctrl1 (__dsp displayCtrl 132950) diff --git a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf index af13926893..0c18ae539e 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFirePFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, Ruthberg, joko // Jonas * Handle the PFH for Bullets @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" { _x params ["_bullet","_caliber","_bulletTraceVisible","_index"]; diff --git a/addons/advanced_ballistics/functions/fnc_handleFired.sqf b/addons/advanced_ballistics/functions/fnc_handleFired.sqf index e77aad33ad..b1f9898b6d 100644 --- a/addons/advanced_ballistics/functions/fnc_handleFired.sqf +++ b/addons/advanced_ballistics/functions/fnc_handleFired.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, Ruthberg * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf index a92982db21..83e11175d3 100644 --- a/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf +++ b/addons/advanced_ballistics/functions/fnc_initModuleSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, Ruthberg * Module for adjusting the advanced ballistics settings @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic","_units", "_activated"]; diff --git a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf index 4b522656ff..5c634cadff 100644 --- a/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf +++ b/addons/advanced_ballistics/functions/fnc_initializeTerrainExtension.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Initializes the advanced ballistics dll extension with terrain data @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!hasInterface) exitWith {}; if (!GVAR(enabled)) exitWith {}; diff --git a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf index 2a5ccb4dfa..13b4692452 100644 --- a/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readAmmoDataFromConfig.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * @@ -25,7 +26,6 @@ * * Public: No */ -#include "script_component.hpp" TRACE_1("Reading Ammo Config",_this); diff --git a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf index a0fa193b6f..dbc9999824 100644 --- a/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf +++ b/addons/advanced_ballistics/functions/fnc_readWeaponDataFromConfig.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" private _weaponConfig = (configFile >> "CfgWeapons" >> _this); diff --git a/addons/advanced_ballistics/stringtable.xml b/addons/advanced_ballistics/stringtable.xml index 283a315c02..263f66876f 100644 --- a/addons/advanced_ballistics/stringtable.xml +++ b/addons/advanced_ballistics/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/advanced_fatigue/XEH_postInit.sqf b/addons/advanced_fatigue/XEH_postInit.sqf index 542360c0c3..fba0de9052 100644 --- a/addons/advanced_fatigue/XEH_postInit.sqf +++ b/addons/advanced_fatigue/XEH_postInit.sqf @@ -47,13 +47,3 @@ if (!hasInterface) exitWith {}; // - Add main loop at 1 second interval ------------------------------------------------------------- [FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute; }] call CBA_fnc_addEventHandler; - -["ace_settingChanged", { - params ["_name", "_value"]; - - if (_name == QGVAR(enableStaminaBar) && {!_value}) then { - private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; - _staminaBarContainer ctrlSetFade 1; - _staminaBarContainer ctrlCommit 0; - }; -}] call CBA_fnc_addEventHandler; diff --git a/addons/advanced_fatigue/functions/fnc_addDutyFactor.sqf b/addons/advanced_fatigue/functions/fnc_addDutyFactor.sqf index 89801e902e..e2f87f3080 100644 --- a/addons/advanced_fatigue/functions/fnc_addDutyFactor.sqf +++ b/addons/advanced_fatigue/functions/fnc_addDutyFactor.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Adds a duty factor. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_id", "", [""]], ["_factor", 1, [0, {}]]]; if (_id == "" || {_factor isEqualTo 1}) exitWith {}; diff --git a/addons/advanced_fatigue/functions/fnc_createStaminaBar.sqf b/addons/advanced_fatigue/functions/fnc_createStaminaBar.sqf index ce88c2b42e..157f683018 100644 --- a/addons/advanced_fatigue/functions/fnc_createStaminaBar.sqf +++ b/addons/advanced_fatigue/functions/fnc_createStaminaBar.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Creates the stamina bar. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_display"]; private _staminaBar = _display ctrlCreate [QGVAR(StaminaBarContainer), -1]; diff --git a/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf b/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf index 629152b6a1..717161b890 100644 --- a/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf +++ b/addons/advanced_fatigue/functions/fnc_getAnimDuty.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Calculates the duty of the current animation. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_animName"]; private _duty = 1; diff --git a/addons/advanced_fatigue/functions/fnc_getMetabolicCosts.sqf b/addons/advanced_fatigue/functions/fnc_getMetabolicCosts.sqf index c2c673fd95..0e0ce7de04 100644 --- a/addons/advanced_fatigue/functions/fnc_getMetabolicCosts.sqf +++ b/addons/advanced_fatigue/functions/fnc_getMetabolicCosts.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Calculates the current metabolic costs for a unit. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_velocity"]; private _gearMass = ((_unit getVariable [QEGVAR(movement,totalLoad), loadAbs _unit]) / 22.046) * GVAR(loadFactor); diff --git a/addons/advanced_fatigue/functions/fnc_handleEffects.sqf b/addons/advanced_fatigue/functions/fnc_handleEffects.sqf index dd973afe29..3733517f36 100644 --- a/addons/advanced_fatigue/functions/fnc_handleEffects.sqf +++ b/addons/advanced_fatigue/functions/fnc_handleEffects.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Handles any audible, visual and physical effects of fatigue. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_fatigue", "_speed", "_overexhausted"]; #ifdef DEBUG_MODE_FULL diff --git a/addons/advanced_fatigue/functions/fnc_handlePlayerChanged.sqf b/addons/advanced_fatigue/functions/fnc_handlePlayerChanged.sqf index 0e31e89645..0cea426eef 100644 --- a/addons/advanced_fatigue/functions/fnc_handlePlayerChanged.sqf +++ b/addons/advanced_fatigue/functions/fnc_handlePlayerChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Handles switching units (once on init and afterwards via Zeus). @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_newUnit", "_oldUnit"]; TRACE_2("unit changed",_newUnit,_oldUnit); diff --git a/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf b/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf index 72772d16b1..73ba6179a9 100644 --- a/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf +++ b/addons/advanced_fatigue/functions/fnc_handleStaminaBar.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Handles visual changes of the stamina bar. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_stamina"]; private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; diff --git a/addons/advanced_fatigue/functions/fnc_mainLoop.sqf b/addons/advanced_fatigue/functions/fnc_mainLoop.sqf index 4b23153dff..1d3b215b54 100644 --- a/addons/advanced_fatigue/functions/fnc_mainLoop.sqf +++ b/addons/advanced_fatigue/functions/fnc_mainLoop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Main looping function that updates fatigue values. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!alive ACE_player) exitWith { // Dead people don't breath, Will also handle null (Map intros) [FUNC(mainLoop), [], 1] call CBA_fnc_waitAndExecute; private _staminaBarContainer = uiNamespace getVariable [QGVAR(staminaBarContainer), controlNull]; diff --git a/addons/advanced_fatigue/functions/fnc_moduleSettings.sqf b/addons/advanced_fatigue/functions/fnc_moduleSettings.sqf index 9d1a0a6ab6..ab2742fb75 100644 --- a/addons/advanced_fatigue/functions/fnc_moduleSettings.sqf +++ b/addons/advanced_fatigue/functions/fnc_moduleSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Initializes the module settings. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; [_logic, QGVAR(enabled), "Enabled"] call EFUNC(common,readSettingFromModule); diff --git a/addons/advanced_fatigue/functions/fnc_removeDutyFactor.sqf b/addons/advanced_fatigue/functions/fnc_removeDutyFactor.sqf index 4ae07704a5..aacba72dd8 100644 --- a/addons/advanced_fatigue/functions/fnc_removeDutyFactor.sqf +++ b/addons/advanced_fatigue/functions/fnc_removeDutyFactor.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Removes a duty factor. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_id", "", [""]]]; GVAR(dutyList) params ["_idList", "_factorList"]; diff --git a/addons/advanced_fatigue/initSettings.sqf b/addons/advanced_fatigue/initSettings.sqf index 8f4e5f0c9a..4e44d75132 100644 --- a/addons/advanced_fatigue/initSettings.sqf +++ b/addons/advanced_fatigue/initSettings.sqf @@ -4,7 +4,9 @@ [LSTRING(Enabled), LSTRING(Enabled_Description)], LSTRING(DisplayName), true, - true + true, + {[QGVAR(enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_Settings_fnc_init; [ diff --git a/addons/advanced_fatigue/stringtable.xml b/addons/advanced_fatigue/stringtable.xml index 01bca90c11..1cb93b0315 100644 --- a/addons/advanced_fatigue/stringtable.xml +++ b/addons/advanced_fatigue/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -9,6 +9,7 @@ ACE アドバンスド ファティーグ ACE Fatica Avanzata ACE 고급 피로도 + ACE Fatigue Avancée Performance Factor @@ -114,12 +115,16 @@ 手ぶれ因数 抖动因数 抖動因素 + Facteur de stabilisation + Fattore di oscillazione Influences the amount of weapon sway. Higher means more sway. 武器を持つ手のぶれ度合いを設定します。 値が高ければ高いほど、手ぶれが強くなります。 影响手持武器的晃动程度,数值越高,抖动的越厉害. 影響手持武器晃動程度,數值越高抖動越厲害 + Influence les mouvements de l'arme, une valeur plus élevée signifie plus de mouvements + Influenza l'ammontare di oscillazione dell'arma. Maggiore significa più oscillazione. Enabled diff --git a/addons/advanced_throwing/functions/fnc_canPrepare.sqf b/addons/advanced_throwing/functions/fnc_canPrepare.sqf index 3c3d3e47b7..87c6a7843c 100644 --- a/addons/advanced_throwing/functions/fnc_canPrepare.sqf +++ b/addons/advanced_throwing/functions/fnc_canPrepare.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Checks if a throwable can be prepared. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", ["_ignoreLastThrownTime", false]]; @@ -31,7 +31,7 @@ GVAR(enabled) && {_unit getVariable [QGVAR(lastThrownTime), CBA_missionTime - 3] < CBA_missionTime - 2} && // Prevent throwing in quick succession #endif -{!(call EFUNC(common,isFeatureCameraActive))} && +{(call CBA_fnc_getActiveFeatureCamera) isEqualTo ""} && {[_unit, objNull, ["isNotInside", "isNotSwimming", "isNotSitting"/*, "isNotOnLadder"*/]] call EFUNC(common,canInteractWith)} && // Ladder needs positioning fixes on throw {_unit call CBA_fnc_canUseWeapon} && // Disable in non-FFV seats due to surface detection issues {"" == currentWeapon _unit || {currentWeapon _unit != secondaryWeapon _unit}} && diff --git a/addons/advanced_throwing/functions/fnc_canThrow.sqf b/addons/advanced_throwing/functions/fnc_canThrow.sqf index 1f5ef20d45..e5211dd33c 100644 --- a/addons/advanced_throwing/functions/fnc_canThrow.sqf +++ b/addons/advanced_throwing/functions/fnc_canThrow.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Checks if a throwable can be thrown. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/advanced_throwing/functions/fnc_drawArc.sqf b/addons/advanced_throwing/functions/fnc_drawArc.sqf index eef326750d..906650627f 100644 --- a/addons/advanced_throwing/functions/fnc_drawArc.sqf +++ b/addons/advanced_throwing/functions/fnc_drawArc.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Zapat, Dslyecxi, Jonpas * Draws throw arc. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Disable drawing when intersecting with the vehicle if !([ACE_player] call FUNC(canThrow)) exitWith { diff --git a/addons/advanced_throwing/functions/fnc_drawThrowable.sqf b/addons/advanced_throwing/functions/fnc_drawThrowable.sqf index 0e6a6dea99..42d52b7153 100644 --- a/addons/advanced_throwing/functions/fnc_drawThrowable.sqf +++ b/addons/advanced_throwing/functions/fnc_drawThrowable.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, Jonpas, SilentSpike * Handles drawing the currently selected or cooked throwable. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (dialog || {!(ACE_player getVariable [QGVAR(inHand), false])} || {!([ACE_player, true] call FUNC(canPrepare))}) exitWith { [ACE_player, "In dialog or no throwable in hand or cannot prepare throwable"] call FUNC(exitThrowMode); diff --git a/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf b/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf index 33ff556f6a..ffe1110dc2 100644 --- a/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf +++ b/addons/advanced_throwing/functions/fnc_exitThrowMode.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, Jonpas * Exits throw mode. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_reason"]; TRACE_2("params",_unit,_reason); diff --git a/addons/advanced_throwing/functions/fnc_getMuzzle.sqf b/addons/advanced_throwing/functions/fnc_getMuzzle.sqf index 030ec25ccb..03ac62f6d2 100644 --- a/addons/advanced_throwing/functions/fnc_getMuzzle.sqf +++ b/addons/advanced_throwing/functions/fnc_getMuzzle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Retrieve muzzle name from config. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_magazineClassname"]; diff --git a/addons/advanced_throwing/functions/fnc_moduleInit.sqf b/addons/advanced_throwing/functions/fnc_moduleInit.sqf index 2e7ae18e42..3f5d3bbd3f 100644 --- a/addons/advanced_throwing/functions/fnc_moduleInit.sqf +++ b/addons/advanced_throwing/functions/fnc_moduleInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Initializes the Advanced Throwing module. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/advanced_throwing/functions/fnc_onKeyDown.sqf b/addons/advanced_throwing/functions/fnc_onKeyDown.sqf index 42fab8fc1a..d0f8404203 100644 --- a/addons/advanced_throwing/functions/fnc_onKeyDown.sqf +++ b/addons/advanced_throwing/functions/fnc_onKeyDown.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, Jonpas * Key down event. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {false}; diff --git a/addons/advanced_throwing/functions/fnc_onMouseButtonDown.sqf b/addons/advanced_throwing/functions/fnc_onMouseButtonDown.sqf index e13ed52290..69abb9641b 100644 --- a/addons/advanced_throwing/functions/fnc_onMouseButtonDown.sqf +++ b/addons/advanced_throwing/functions/fnc_onMouseButtonDown.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, Jonpas * Mouse button down event. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {}; diff --git a/addons/advanced_throwing/functions/fnc_onMouseScroll.sqf b/addons/advanced_throwing/functions/fnc_onMouseScroll.sqf index b06d198380..f56b153557 100644 --- a/addons/advanced_throwing/functions/fnc_onMouseScroll.sqf +++ b/addons/advanced_throwing/functions/fnc_onMouseScroll.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, Jonpas * Mouse scroll wheel changed event. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if !(ACE_player getVariable [QGVAR(inHand), false]) exitWith {}; diff --git a/addons/advanced_throwing/functions/fnc_pickUp.sqf b/addons/advanced_throwing/functions/fnc_pickUp.sqf index 2238ea1893..9fd49486d1 100644 --- a/addons/advanced_throwing/functions/fnc_pickUp.sqf +++ b/addons/advanced_throwing/functions/fnc_pickUp.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Picks up a throwable from the ground. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_helper", "_unit"]; TRACE_2("params",_helper,_unit); diff --git a/addons/advanced_throwing/functions/fnc_prepare.sqf b/addons/advanced_throwing/functions/fnc_prepare.sqf index 6245b0627e..393f8301d3 100644 --- a/addons/advanced_throwing/functions/fnc_prepare.sqf +++ b/addons/advanced_throwing/functions/fnc_prepare.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, Jonpas * Prepares throwable or selects the next. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_1("params",_unit); diff --git a/addons/advanced_throwing/functions/fnc_prime.sqf b/addons/advanced_throwing/functions/fnc_prime.sqf index d52bee67f2..22681d3ebc 100644 --- a/addons/advanced_throwing/functions/fnc_prime.sqf +++ b/addons/advanced_throwing/functions/fnc_prime.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, Jonpas * Primes the throwable, creates global throwable vehicle and throws Fired XEH. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", ["_showHint", false]]; TRACE_2("params",_unit,_showHint); diff --git a/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf b/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf index 9f2743c600..5b7d2c9f0b 100644 --- a/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf +++ b/addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror, Jonpas * When interact_menu starts rendering (from "interact_keyDown" event). @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" [{ params ["_args", "_idPFH"]; diff --git a/addons/advanced_throwing/functions/fnc_throw.sqf b/addons/advanced_throwing/functions/fnc_throw.sqf index 038390ee74..3bc69be882 100644 --- a/addons/advanced_throwing/functions/fnc_throw.sqf +++ b/addons/advanced_throwing/functions/fnc_throw.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, Jonpas * Throw selected throwable. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_1("params",_unit); diff --git a/addons/advanced_throwing/functions/fnc_throwFiredXEH.sqf b/addons/advanced_throwing/functions/fnc_throwFiredXEH.sqf index a98551f220..80dbc2f973 100644 --- a/addons/advanced_throwing/functions/fnc_throwFiredXEH.sqf +++ b/addons/advanced_throwing/functions/fnc_throwFiredXEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: CBA Team * Throws Fired XEH. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" TRACE_1("Fired",_this); diff --git a/addons/advanced_throwing/functions/fnc_updateControlsHint.sqf b/addons/advanced_throwing/functions/fnc_updateControlsHint.sqf index 12170b5346..3dcb516c32 100644 --- a/addons/advanced_throwing/functions/fnc_updateControlsHint.sqf +++ b/addons/advanced_throwing/functions/fnc_updateControlsHint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Updates controls hints based on current state. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!GVAR(showMouseControls)) exitWith {}; diff --git a/addons/advanced_throwing/stringtable.xml b/addons/advanced_throwing/stringtable.xml index 7b870e010e..a060927076 100644 --- a/addons/advanced_throwing/stringtable.xml +++ b/addons/advanced_throwing/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/ai/CfgEventHandlers.hpp b/addons/ai/CfgEventHandlers.hpp index becf395052..9e715077f3 100644 --- a/addons/ai/CfgEventHandlers.hpp +++ b/addons/ai/CfgEventHandlers.hpp @@ -16,3 +16,9 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDisplayCurator { + ADDON = QUOTE(call FUNC(drawCuratorGarrisonPathing)); + }; +}; diff --git a/addons/ai/XEH_PREP.hpp b/addons/ai/XEH_PREP.hpp index d3a61e3012..9596af3286 100644 --- a/addons/ai/XEH_PREP.hpp +++ b/addons/ai/XEH_PREP.hpp @@ -1,3 +1,4 @@ +PREP(drawCuratorGarrisonPathing); PREP(garrison); PREP(unGarrison); PREP(garrisonMove); diff --git a/addons/ai/XEH_postInit.sqf b/addons/ai/XEH_postInit.sqf index 4ce37fd314..44f3c57472 100644 --- a/addons/ai/XEH_postInit.sqf +++ b/addons/ai/XEH_postInit.sqf @@ -68,42 +68,3 @@ params ["_unit", "_mode"]; _unit enableGunLights _mode; }] call CBA_fnc_addEventHandler; - -#ifdef DEBUG_MODE_FULL - addMissionEventHandler ["Draw3D", { - private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; - { - _x params ["_unit", "_pos"]; - - switch (true) do { - case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : { - for "_i" from 0 to 3 do { - drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]]; - }; - drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75]; - }; - - case (!surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : { - for "_i" from 0 to 3 do { - drawLine3D [_unit modelToWorldVisual [0,0,1], _pos, [1,0,0,1]]; - }; - drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75]; - }; - - case (!surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : { - for "_i" from 0 to 3 do { - drawLine3D [_unit modelToWorldVisual [0,0,1], (AGLToASL _pos), [1,0,0,1]]; - }; - drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75]; - }; - - case (surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : { - for "_i" from 0 to 3 do { - drawLine3D [_unit modelToWorldVisualWorld [0,0,1], _pos, [1,0,0,1]]; - }; - drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75]; - }; - }; - } forEach _unitMoveList; - }]; -#endif diff --git a/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf b/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf new file mode 100644 index 0000000000..de9a5b4dc7 --- /dev/null +++ b/addons/ai/functions/fnc_drawCuratorGarrisonPathing.sqf @@ -0,0 +1,54 @@ +#include "script_component.hpp" +/* + * Author: alganthe + * Add draw3D eh to the curator interface. + * + * Arguments: + * None + * + * Return value: + * None + * + * Public: No +*/ + +addMissionEventHandler ["Draw3D", { + if (findDisplay 312 isEqualTo displayNull) exitWith { + removeMissionEventHandler ["Draw3D", _thisEventHandler]; + }; + + private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; + { + _x params ["_unit", "_pos"]; + + switch (true) do { + case (surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : { + for "_i" from 0 to 3 do { + drawLine3D [_unit modelToWorldVisualWorld [0,0,1], (AGLtoASL _pos), [1,0,0,1]]; + }; + drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75]; + }; + + case (!surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : { + for "_i" from 0 to 3 do { + drawLine3D [_unit modelToWorldVisual [0,0,1], _pos, [1,0,0,1]]; + }; + drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75]; + }; + + case (!surfaceIsWater (getPos _unit) && {surfaceIsWater _pos}) : { + for "_i" from 0 to 3 do { + drawLine3D [_unit modelToWorldVisual [0,0,1], (AGLToASL _pos), [1,0,0,1]]; + }; + drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], (AGLtoASL _pos), 0.75, 0.75, 0.75]; + }; + + case (surfaceIsWater (getPos _unit) && {!surfaceIsWater _pos}) : { + for "_i" from 0 to 3 do { + drawLine3D [_unit modelToWorldVisualWorld [0,0,1], _pos, [1,0,0,1]]; + }; + drawIcon3D ["\a3\ui_f\data\map\groupicons\waypoint.paa", [1,0,0,1], _pos, 0.75, 0.75, 0.75]; + }; + }; + } forEach _unitMoveList; +}]; diff --git a/addons/ai/functions/fnc_garrison.sqf b/addons/ai/functions/fnc_garrison.sqf index c303d2b90c..30238e42a7 100644 --- a/addons/ai/functions/fnc_garrison.sqf +++ b/addons/ai/functions/fnc_garrison.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe * Garrison function used to garrison AI inside buildings. @@ -19,13 +20,13 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_startingPos",[0,0,0], [[]], 3], ["_buildingTypes", ["Building"], [[]]], ["_unitsArray", [], [[]]], ["_fillingRadius", 50, [0]], ["_fillingType", 0, [0]], ["_topDownFilling", false, [true]], ["_teleport", false, [true]]]; TRACE_6("fnc_garrison: Start",_startingPos,_buldingTypes,count _unitsArray,_fillingRadius,_fillingTYpe,_topDownFilling); _unitsArray = _unitsArray select {alive _x && {!isPlayer _x}}; +private _currentUnitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; if (_startingPos isEqualTo [0,0,0]) exitWith { TRACE_1("fnc_garrison: StartingPos error",_startingPos); @@ -79,11 +80,9 @@ if (_topDownFilling) then { //Remove positions units are already pathing to _buildingsIndex = _buildingsIndex apply { - private _testedBuilding = _x; - - _testedBuilding select { + _x select { private _testedPos = _x; - (({(_x select 1) isEqualTo _testedPos} count (missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []])) == 0) + ({(_x select 1) isEqualTo _testedPos} count (missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []])) == 0 } }; @@ -147,6 +146,8 @@ switch (_fillingType) do { _unit setPosATL _pos; }; + _currentUnitMoveList deleteAt (_currentUnitMoveList findIf {_x select 0 == _unit}); + } else { _unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)]; }; @@ -194,6 +195,8 @@ switch (_fillingType) do { _unit setPosATL _pos; }; + _currentUnitMoveList deleteAt (_currentUnitMoveList findIf {_x select 0 == _unit}); + } else { _unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)]; }; @@ -239,6 +242,8 @@ switch (_fillingType) do { _unit setPosATL _pos; }; + _currentUnitMoveList deleteAt (_currentUnitMoveList findIf {_x select 0 == _unit}); + } else { _unitMoveList pushBack [_unit,[_pos, AGLToASL _pos] select (_posSurface)]; }; diff --git a/addons/ai/functions/fnc_garrisonMove.sqf b/addons/ai/functions/fnc_garrisonMove.sqf index fc9f09b6ce..6bba35fbc3 100644 --- a/addons/ai/functions/fnc_garrisonMove.sqf +++ b/addons/ai/functions/fnc_garrisonMove.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe * Internal function used by ace_ai_fnc_garrison to make the units move to the positions it picked. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params [ ["_unitMoveList", nil, [[]]] ]; @@ -53,10 +53,41 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then { { _x params ["_unit", "_pos"]; - // Check if unit is alive or even existing - if (!alive _unit) then { + private _fnc_attemptFailed = { + if (_failSafeRemainingAttemps == 0 ) then { + _unit setVariable [QGVAR(garrisonMove_failSafe), nil, true]; + _unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true]; + [QGVAR(unGarrison), [[_unit]], _unit] call CBA_fnc_targetEvent; + _unitMoveList deleteAt (_unitMoveList find _x); + LOG("garrisonMove PFH: all moving commands failed | restoring AI capabilities"); + + } else { + _unit setVariable [QGVAR(garrisonMove_failSafe), [_failSafeTimer + 15, _failSafeRemainingAttemps - 1]]; + [QGVAR(doMove), [[[_unit, _pos]]], _unit] call CBA_fnc_targetEvent; + LOG("garrisonMove PFH unitReady: unit not close enough | Sending another doMove command"); + }; + }; + + private _fnc_attemptSuccessful = { + _unit setVariable [QGVAR(garrisonMove_failSafe), nil, true]; + _unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true]; + _unit setVariable [QGVAR(garrisonned), true, true]; _unitMoveList deleteAt (_unitMoveList find _x); - LOG(format [ARR_2("garrisonMove PFH: unit dead or deleted | %1 units left", count _unitMoveList)]); + + [QGVAR(AISection), [[_unit], ["PATH"], false], _unit] call CBA_fnc_targetEvent; + [QGVAR(AISection), [[_unit], ["FSM"], true], _unit] call CBA_fnc_targetEvent; + + if ({(_x select 0) in units _unit && {!isPlayer (_x select 0)}} count _unitMoveList == 0) then { + [QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent; + }; + + LOG(format [ARR_2("garrisonMove PFH: unit in position | %1 units left", count _unitMoveList)]); + }; + + // Check if unit is alive or even existing + if (!alive _unit || {_unit getVariable [QGVAR(garrisoned), false]}) then { + _unitMoveList deleteAt (_unitMoveList find _x); + LOG(format [ARR_2("garrisonMove PFH: unit dead, deleted or garrisoned via TP | %1 units left", count _unitMoveList)]); } else { private _unitPos = getPos _unit; @@ -68,38 +99,15 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then { if (unitReady _unit) then { // Check for distance, doMove and AI are moody and may stop for no reason, within 6 meters and ready should be fine - if (_unitPos distance _pos < 3) then { - _unit setVariable [QGVAR(garrisonMove_failSafe), nil, true]; - _unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true]; - _unit setVariable [QGVAR(garrisonned), true, true]; - _unitMoveList deleteAt (_unitMoveList find _x); - - [QGVAR(AISection), [[_unit], ["PATH"], false], _unit] call CBA_fnc_targetEvent; - [QGVAR(AISection), [[_unit], ["FSM"], true], _unit] call CBA_fnc_targetEvent; - - if ({(_x select 0) in units _unit && {!isPlayer (_x select 0)}} count _unitMoveList == 0) then { - [QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent; - }; - - LOG(format [ARR_2("garrisonMove PFH: unit in position | %1 units left", count _unitMoveList)]); + if (_unitPos distance _pos < 1.5) then { + call _fnc_attemptSuccessful; } else { // Tell the unit to move if an order wasn't given within 30s, avoid doMove spam (_unit getVariable [QGVAR(garrisonMove_failSafe), [CBA_missionTime, 5]]) params ["_failSafeTimer", "_failSafeRemainingAttemps"]; if (_failSafeTimer <= CBA_missionTime) then { - if (_failSafeRemainingAttemps == 0 ) then { - _unit setVariable [QGVAR(garrisonMove_failSafe), nil, true]; - _unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true]; - [QGVAR(unGarrison), [[_unit]], _unit] call CBA_fnc_targetEvent; - _unitMoveList deleteAt (_unitMoveList find _x); - LOG("garrisonMove PFH unitReady: all moving commands failed | restoring AI capabilities"); - - } else { - _unit setVariable [QGVAR(garrisonMove_failSafe), [_failSafeTimer + 15, _failSafeRemainingAttemps - 1]]; - [QGVAR(doMove), [[[_unit, _pos]]], _unit] call CBA_fnc_targetEvent; - LOG("garrisonMove PFH unitReady: unit not close enough | Sending another doMove command"); - }; + call _fnc_attemptFailed; }; }; } else { @@ -107,30 +115,12 @@ if (isNil QGVAR(garrison_moveUnitPFH)) then { // AI may sometimes not be able to report unitReady, this is to avoid the PFH running forever switch true do { - case ((_unitPosTimer + 15) < CBA_missionTime && {(_unitPos distance _pos) < 3}) : { - TRACE_1("case 1",_unit); - _unit setVariable [QGVAR(garrisonMove_failSafe), nil, true]; - _unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true]; - _unit setVariable [QGVAR(garrisonned), true, true]; - _unitMoveList deleteAt (_unitMoveList find _x); - - [QGVAR(AISection), [[_unit], ["PATH"], false], _unit] call CBA_fnc_targetEvent; - [QGVAR(AISection), [[_unit], ["FSM"], true], _unit] call CBA_fnc_targetEvent; - - if ({(_x select 0) in units _unit && {!isPlayer (_x select 0)}} count _unitMoveList == 0) then { - [QGVAR(enableAttack), [[_unit], true], _unit] call CBA_fnc_targetEvent; - }; - - LOG(format [ARR_2("garrisonMove PFH unitNotReady: unit in position | %1 units left", count _unitMoveList)]); + case ((_unitPos distance _pos) < 1.5) : { + call _fnc_attemptSuccessful; }; - case ((_unitPosTimer + 15) < CBA_missionTime && {_unitOldPos distance _unitPos < 0.5}) : { - TRACE_3("case 2",_unit, ((_unitPosTimer + 15) < CBA_missionTime), (_unitOldPos distance _unitPos < 0.5)); - _unit setVariable [QGVAR(garrisonMove_failSafe), nil, true]; - _unit setVariable [QGVAR(garrisonMove_unitPosMemory), nil, true]; - [QGVAR(unGarrison), [[_unit]], _unit] call CBA_fnc_targetEvent; - _unitMoveList deleteAt (_unitMoveList find _x); - LOG("garrisonMove PFH unitNotReady: all moving commands failed | restoring AI capabilities"); + case ((_unitPosTimer + 5) < CBA_missionTime && {_unitOldPos distance _unitPos < 0.5}) : { + call _fnc_attemptFailed; }; case (_unitOldPos distance _unitPos < 0.5) : {}; diff --git a/addons/ai/functions/fnc_unGarrison.sqf b/addons/ai/functions/fnc_unGarrison.sqf index 6174a840bd..e098f4b130 100644 --- a/addons/ai/functions/fnc_unGarrison.sqf +++ b/addons/ai/functions/fnc_unGarrison.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe * Used to un-garrison units. @@ -14,44 +15,37 @@ * Public: Yes * */ -#include "script_component.hpp" params [["_units", [], [[]]]]; _units = _units select {local _x}; { - if (!isPlayer _x && {local _x}) then { - _x enableAI "PATH"; - _x enableAI "FSM"; + private _unit = _x; + if (!isPlayer _unit && {local _unit}) then { + _unit enableAI "PATH"; + _unit enableAI "FSM"; - private _leader = leader _x; + private _leader = leader _unit; - TRACE_3("fnc_ungarrison: unit and leader",_x , _leader, (_leader == _x)); + TRACE_3("fnc_ungarrison: unit and leader",_unit , _leader, (_leader == _unit)); - _x setVariable [QGVAR(garrisonned), false, true]; + _unit setVariable [QGVAR(garrisonned), false, true]; - if (_leader != _x) then { - doStop _x; - _x doFollow _leader; + private _unitMoveList = missionNameSpace getVariable [QGVAR(garrison_unitMoveList), []]; + _unitMoveList deleteAt (_unitMoveList findIf {_x select 0 == _unit}); + + if (_leader != _unit) then { + doStop _unit; + _unit doFollow _leader; } else { - _x doMove ((nearestBuilding (getPos _x)) buildingExit 0); + _unit doMove ((nearestBuilding (getPos _unit)) buildingExit 0); }; - private _fnc_countGarrisonnedUnits = { - params ["_unit", "_bool"]; - if (_bool) then { - ({(_x getVariable [QGVAR(garrisonned), false]) && {!isPlayer _x}} count units _unit) - } else { - ({!(_x getVariable [QGVAR(garrisonned), false]) && {!isPlayer _x}} count units _unit) - }; - - }; - - if ([_x, true] call _fnc_countGarrisonnedUnits == ({!isPlayer _x} count (units _x)) - 1 || {[_x, false] call _fnc_countGarrisonnedUnits == {!isPlayer _x} count (units _x)}) then { + if ((units _unit) findif {(_x getVariable [QGVAR(garrisonned), false]) && !isPlayer _x} == -1) then { LOG("fnc_ungarrison: enableAttack true"); - (group _x) enableAttack true; + (group _unit) enableAttack true; }; }; } foreach _units; diff --git a/addons/ai/stringtable.xml b/addons/ai/stringtable.xml index 7e5e9b80a2..ccf55310b1 100644 --- a/addons/ai/stringtable.xml +++ b/addons/ai/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/aircraft/functions/fnc_canShowEject.sqf b/addons/aircraft/functions/fnc_canShowEject.sqf index b0803a49df..6ec13d2bb9 100644 --- a/addons/aircraft/functions/fnc_canShowEject.sqf +++ b/addons/aircraft/functions/fnc_canShowEject.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * Check if Eject action can be shown. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" #define FULLCREW_UNIT 0 #define FULLCREW_ROLE 1 diff --git a/addons/aircraft/functions/fnc_initEjectAction.sqf b/addons/aircraft/functions/fnc_initEjectAction.sqf index 94b72099ee..8ec9e33ade 100644 --- a/addons/aircraft/functions/fnc_initEjectAction.sqf +++ b/addons/aircraft/functions/fnc_initEjectAction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * Add Eject action to vehicle if needed. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/arsenal/ACE_Arsenal_Stats.hpp b/addons/arsenal/ACE_Arsenal_Stats.hpp index 885daa843f..1dd400856a 100644 --- a/addons/arsenal/ACE_Arsenal_Stats.hpp +++ b/addons/arsenal/ACE_Arsenal_Stats.hpp @@ -74,6 +74,14 @@ class GVAR(stats) { textStatement = QUOTE(call FUNC(statTextStatement_scopeMag)); tabs[] = {{}, {0}}; }; + class ACE_scopeVisionMode: statBase { + scope = 2; + priority = 1; + displayName = CSTRING(statVisionMode); + showText = 1; + textStatement = QUOTE(call FUNC(statTextStatement_scopeVisionMode)); + tabs[] = {{}, {0}}; + }; class ACE_ballisticProtection: statBase { scope = 2; priority = 5; @@ -101,4 +109,14 @@ class GVAR(stats) { barStatement = QUOTE([ARR_3((_this select 0) select 0, _this select 1, [ARR_3([ARR_2(0, 500)], [ARR_2(0.01, 1)], false)])] call FUNC(statBarStatement_default)); tabs[] = {{3,4,5}, {}}; }; + class ACE_smokeChemTTL: statBase { + scope = 2; + priority = 3; + stats[] = {"ammo"}; + displayName = CSTRING(statTTL); + showText = 1; + textStatement= QUOTE(call FUNC(statTextStatement_smokeChemTTL)); + condition = QUOTE((configName (_this select 1)) isKindOf [ARR_2('smokeShell', configFile >> 'CfgMagazines')]); + tabs[] = {{}, {5}}; + }; }; diff --git a/addons/arsenal/Cfg3DEN.hpp b/addons/arsenal/Cfg3DEN.hpp index 9b058f48c0..8e79b726b4 100644 --- a/addons/arsenal/Cfg3DEN.hpp +++ b/addons/arsenal/Cfg3DEN.hpp @@ -8,7 +8,7 @@ class Cfg3DEN { class GVAR(DefaultLoadoutsListAttribute) { property = QGVAR(DefaultLoadoutsListAttribute); value = 0; - expression = "if !(is3DEN) then {ace_arsenal_defaultLoadoutsList = _value};"; + expression = QUOTE(if (!is3DEN) then {GVAR(defaultLoadoutsList) = _value}); defaultValue = "[]"; validate = "none"; wikiType = "[[Array]]"; @@ -102,6 +102,8 @@ class Cfg3DEN { idcLeft = IDC_ATTRIBUTE_LIST_LEFT; idcRight = IDC_ATTRIBUTE_LIST_RIGHT; onLBDblClick = QUOTE(_this call FUNC(attributeDblClick)); + onSetFocus = QUOTE(SETUVAR(QGVAR(attributeFocus),ctrlParentControlsGroup (_this select 0))); + onKillFocus = QUOTE(SETUVAR(QGVAR(attributeFocus),nil)); x = QUOTE(5 * ATTRIBUTE_W); y = QUOTE(35.83 * ATTRIBUTE_H); w = QUOTE(125 * ATTRIBUTE_W); diff --git a/addons/arsenal/Display3DEN.hpp b/addons/arsenal/Display3DEN.hpp new file mode 100644 index 0000000000..0a693a2189 --- /dev/null +++ b/addons/arsenal/Display3DEN.hpp @@ -0,0 +1,34 @@ +class Display3DEN { + class ContextMenu: ctrlMenu { + class Items { + class Arsenal { + items[]= {"aceArsenal", "virtualArsenal"}; + }; + class virtualArsenal { + text = "BI Virtual Arsenal"; + action = QUOTE(['arsenal'] call bis_fnc_3DENEntityMenu); + value = 0; + data = "Arsenal"; + opensNewWindow = 1; + }; + class aceArsenal: virtualArsenal { + text = "ACE Arsenal"; + action = QUOTE(call FUNC(open3DEN)); + }; + }; + }; + class Controls { + class MenuStrip: ctrlMenuStrip { + class Items { + class Tools { + items[] += {"ACE_arsenal_portVALoadouts"}; + }; + class ACE_arsenal_portVALoadouts { + text = CSTRING(portLoadoutsText); + picture = QPATHTOEF(common,data\logo_ace3_ca.paa); + action = "call ace_arsenal_fnc_portVALoadouts;"; + }; + }; + }; + }; +}; diff --git a/addons/arsenal/XEH_PREP.hpp b/addons/arsenal/XEH_PREP.hpp index 98753b070c..3e64d3654e 100644 --- a/addons/arsenal/XEH_PREP.hpp +++ b/addons/arsenal/XEH_PREP.hpp @@ -1,3 +1,4 @@ +PREP(addDefaultLoadout); PREP(addListBoxItem); PREP(addStat); PREP(addVirtualItems); @@ -5,6 +6,7 @@ PREP(attributeAddItems); PREP(attributeClear); PREP(attributeDblClick); PREP(attributeInit); +PREP(attributeKeyDown); PREP(attributeLoad); PREP(attributeMode); PREP(attributeSelect); @@ -62,6 +64,8 @@ PREP(statTextStatement_accuracy); PREP(statTextStatement_mass); PREP(statTextStatement_rateOfFire); PREP(statTextStatement_scopeMag); +PREP(statTextStatement_scopeVisionMode); +PREP(statTextStatement_smokeChemTTL); PREP(updateCamPos); PREP(updateRightPanel); PREP(updateUniqueItemsList); diff --git a/addons/arsenal/config.cpp b/addons/arsenal/config.cpp index 32bc41d254..6eb4c895ce 100644 --- a/addons/arsenal/config.cpp +++ b/addons/arsenal/config.cpp @@ -15,6 +15,7 @@ class CfgPatches { }; #include "ui\RscAttributes.hpp" +#include "Display3DEN.hpp" #include "Cfg3DEN.hpp" #include "CfgEventHandlers.hpp" #include "RscDisplayMain.hpp" diff --git a/addons/arsenal/functions/fnc_addDefaultLoadout.sqf b/addons/arsenal/functions/fnc_addDefaultLoadout.sqf new file mode 100644 index 0000000000..2c18a38ca6 --- /dev/null +++ b/addons/arsenal/functions/fnc_addDefaultLoadout.sqf @@ -0,0 +1,31 @@ +#include "script_component.hpp" +/* + * Author: 654wak654 + * Adds a loadout to the "Default Loadouts" list. + * If a loadout with the same name exists, it is overwritten. + * + * Arguments: + * 0: Name of loadout + * 1: getUnitLoadout array + * + * Return Value: + * None + * + * Example: + * ["Squad Leader", getUnitLoadout sql1] call ace_arsenal_fnc_addDefaultLoadout + * + * Public: Yes +*/ + +params [["_name", "", [""]], ["_loadout", [], [[]], 10]]; + +if (isNil QGVAR(defaultLoadoutsList)) then { + GVAR(defaultLoadoutsList) = []; +}; + +private _loadoutIndex = (+(GVAR(defaultLoadoutsList))) findIf {(_x select 0) == _name}; +if (_loadoutIndex == -1) then { + GVAR(defaultLoadoutsList) pushBack [_name, _loadout]; +} else { + GVAR(defaultLoadoutsList) set [_loadoutIndex, [_name, _loadout]]; +}; diff --git a/addons/arsenal/functions/fnc_addListBoxItem.sqf b/addons/arsenal/functions/fnc_addListBoxItem.sqf index 815e3511a8..8a3fb1491f 100644 --- a/addons/arsenal/functions/fnc_addListBoxItem.sqf +++ b/addons/arsenal/functions/fnc_addListBoxItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dedmen * Add a listbox row. @@ -13,8 +14,6 @@ * * Public: Yes */ - -#include "script_component.hpp" params ["_configCategory", "_className", "_ctrlPanel", ["_pictureEntryName", "picture", [""]]]; private _cacheNamespace = _ctrlPanel; //For better readability. diff --git a/addons/arsenal/functions/fnc_addStat.sqf b/addons/arsenal/functions/fnc_addStat.sqf index d51c0ff13d..61e361fd0f 100644 --- a/addons/arsenal/functions/fnc_addStat.sqf +++ b/addons/arsenal/functions/fnc_addStat.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Add a stat to ACE Arsenal. @@ -29,7 +30,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [ ["_tabs", [[], []], [[]], 2], ["_class", "", [""]], diff --git a/addons/arsenal/functions/fnc_addVirtualItems.sqf b/addons/arsenal/functions/fnc_addVirtualItems.sqf index bfe17761c2..ff5865bb6b 100644 --- a/addons/arsenal/functions/fnc_addVirtualItems.sqf +++ b/addons/arsenal/functions/fnc_addVirtualItems.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe, Dedmen * Add virtual items to the provided target. @@ -16,8 +18,6 @@ * * Public: Yes */ -#include "script_component.hpp" -#include "..\defines.hpp" params [["_object", objNull, [objNull]], ["_items", [], [true, []]], ["_global", false, [false]]]; @@ -81,37 +81,37 @@ if (_items isEqualType true) then { /* Weapon acc */ case ( isClass (_configItemInfo) && - {(getNumber (_configItemInfo >> "type")) in [101, 201, 301, 302]} && + {(getNumber (_configItemInfo >> "type")) in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD]} && {!(_x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])} ): { switch (getNumber (_configItemInfo >> "type")) do { - case 201: { + case TYPE_OPTICS: { (_cargo select 1) select 0 pushBackUnique _x; }; - case 301: { + case TYPE_FLASHLIGHT: { (_cargo select 1) select 1 pushBackUnique _x; }; - case 101: { + case TYPE_MUZZLE: { (_cargo select 1) select 2 pushBackUnique _x; }; - case 302: { + case TYPE_BIPOD: { (_cargo select 1) select 3 pushBackUnique _x; }; }; }; /* Headgear */ case (isClass (_configItemInfo) && - {getNumber (_configItemInfo >> "type") == 605}): { + {getNumber (_configItemInfo >> "type") == TYPE_HEADGEAR}): { (_cargo select 3) pushBackUnique _x; }; /* Uniform */ case (isClass (_configItemInfo) && - {getNumber (_configItemInfo >> "type") == 801}): { + {getNumber (_configItemInfo >> "type") == TYPE_UNIFORM}): { (_cargo select 4) pushBackUnique _x; }; /* Vest */ case (isClass (_configItemInfo) && - {getNumber (_configItemInfo >> "type") == 701}): { + {getNumber (_configItemInfo >> "type") == TYPE_VEST}): { (_cargo select 5) pushBackUnique _x; }; /* NVgs */ @@ -120,7 +120,7 @@ if (_items isEqualType true) then { }; /* Binos */ case (_simulationType == "Binocular" || - {(_simulationType == 'Weapon') && {(getNumber (_configCfgWeapons >> _x >> 'type') == 4096)}}): { + {(_simulationType == 'Weapon') && {(getNumber (_configCfgWeapons >> _x >> 'type') == TYPE_BINOCULAR_AND_NVG)}}): { (_cargo select 9) pushBackUnique _x; }; /* Map */ @@ -145,20 +145,20 @@ if (_items isEqualType true) then { }; /* UAV terminals */ case (isClass (_configItemInfo) && - {getNumber (_configItemInfo >> "type") == 621}): { + {getNumber (_configItemInfo >> "type") == TYPE_UAV_TERMINAL}): { (_cargo select 14) pushBackUnique _x; }; /* Weapon, at the bottom to avoid adding binos */ case (isClass (_configCfgWeapons >> _x >> "WeaponSlotsInfo") && - {getNumber (_configCfgWeapons >> _x >> 'type') != 4096}): { + {getNumber (_configCfgWeapons >> _x >> 'type') != TYPE_BINOCULAR_AND_NVG}): { switch (getNumber (_configCfgWeapons >> _x >> "type")) do { - case 1: { + case TYPE_WEAPON_PRIMARY: { (_cargo select 0) select 0 pushBackUnique ([_x] call bis_fnc_baseWeapon); }; - case 2: { + case TYPE_WEAPON_HANDGUN: { (_cargo select 0) select 2 pushBackUnique ([_x] call bis_fnc_baseWeapon); }; - case 4: { + case TYPE_WEAPON_SECONDARY: { (_cargo select 0) select 1 pushBackUnique ([_x] call bis_fnc_baseWeapon); }; }; @@ -166,9 +166,9 @@ if (_items isEqualType true) then { /* Misc items */ case ( isClass (_configItemInfo) && - ((getNumber (_configItemInfo >> "type")) in [101, 201, 301, 302] && + ((getNumber (_configItemInfo >> "type")) in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD] && {(_x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}) || - {(getNumber (_configItemInfo >> "type")) in [401, 619, 620]} || + {(getNumber (_configItemInfo >> "type")) in [TYPE_FIRST_AID_KIT, TYPE_MEDIKIT, TYPE_TOOLKIT]} || {(getText (_configCfgWeapons >> _x >> "simulation")) == "ItemMineDetector"} ): { (_cargo select 17) pushBackUnique _x; @@ -193,7 +193,7 @@ if (_items isEqualType true) then { switch true do { // Rifle, handgun, secondary weapons mags case ( - (getNumber (configFile >> "CfgMagazines" >> _x >> "type") in [256,512,1536,16]) && + (getNumber (configFile >> "CfgMagazines" >> _x >> "type") in [TYPE_MAGAZINE_PRIMARY_AND_THROW,TYPE_MAGAZINE_SECONDARY_AND_PUT,1536,TYPE_MAGAZINE_HANDGUN_AND_GL]) && {!(_x in _grenadeList)} && {!(_x in _putList)} ): { diff --git a/addons/arsenal/functions/fnc_attributeAddItems.sqf b/addons/arsenal/functions/fnc_attributeAddItems.sqf index edc62ea6ed..12611bbdeb 100644 --- a/addons/arsenal/functions/fnc_attributeAddItems.sqf +++ b/addons/arsenal/functions/fnc_attributeAddItems.sqf @@ -11,7 +11,7 @@ * None * * Example: - * [CONTROL, 0] call ace_arsenal_fnc_attributeAddItems + * [CONTROL] call ace_arsenal_fnc_attributeAddItems * * Public: No */ diff --git a/addons/arsenal/functions/fnc_attributeInit.sqf b/addons/arsenal/functions/fnc_attributeInit.sqf index 14afa31691..8c1556fcd6 100644 --- a/addons/arsenal/functions/fnc_attributeInit.sqf +++ b/addons/arsenal/functions/fnc_attributeInit.sqf @@ -21,9 +21,16 @@ _value params ["_items", "_mode"]; TRACE_2("Initializing object with attribute",_object,_value); if (_mode > 0) then { - // Blacklist: all full arsenal and take items away + // Blacklist: add full arsenal and take items away [_object, true, true] call FUNC(initBox); - [_object, _items, true] call FUNC(removeVirtualItems); + + // Need to delay removal by 2 frames + [{ + [{ + params ["_object", "_items"]; + [_object, _items, true] call FUNC(removeVirtualItems); + }, _this] call CBA_fnc_execNextFrame; + }, [_object, _items]] call CBA_fnc_execNextFrame; } else { // Exit on whitelist mode with no items if (_items isEqualTo []) exitWith {}; diff --git a/addons/arsenal/functions/fnc_attributeKeyDown.sqf b/addons/arsenal/functions/fnc_attributeKeyDown.sqf new file mode 100644 index 0000000000..300ab9f6c5 --- /dev/null +++ b/addons/arsenal/functions/fnc_attributeKeyDown.sqf @@ -0,0 +1,39 @@ +#include "script_component.hpp" +#include "\a3\ui_f\hpp\defineDIKCodes.inc" +/* + * Author: mharis001 + * Handles keyboard input for the 3DEN attribute. + * + * Arguments: + * 0: Display + * 1: Key code + * + * Return Value: + * Handled + * + * Example: + * [DISPLAY, 0] call ace_arsenal_fnc_attributeKeyDown + * + * Public: No + */ + +params ["_display", "_keyCode"]; +TRACE_2("Attribute key down",_display,_keyCode); + +// Exit if attribute is not in focus +private _controlsGroup = uiNamespace getVariable QGVAR(attributeFocus); +if (isNil "_controlsGroup") exitWith {false}; + +switch (_keyCode) do { + case DIK_LEFT; + case DIK_NUMPADMINUS: { + [_controlsGroup, false] call FUNC(attributeSelect); + true + }; + case DIK_RIGHT; + case DIK_NUMPADPLUS: { + [_controlsGroup, true] call FUNC(attributeSelect); + true + }; + default {false}; +}; diff --git a/addons/arsenal/functions/fnc_attributeLoad.sqf b/addons/arsenal/functions/fnc_attributeLoad.sqf index b2b3f13b1e..439ec2ff36 100644 --- a/addons/arsenal/functions/fnc_attributeLoad.sqf +++ b/addons/arsenal/functions/fnc_attributeLoad.sqf @@ -23,6 +23,11 @@ TRACE_1("Initializing 3DEN attribute",_value); // Store working attribute value uiNamespace setVariable [QGVAR(attributeValue), _value]; +// Add keyDown EH to display +// Does not work properly when added to controls group +private _display = ctrlParent _controlsGroup; +_display displayAddEventHandler ["KeyDown", {call FUNC(attributeKeyDown)}]; + // Handle selected mode if (_value select 1 > 0) then { (_controlsGroup controlsGroupCtrl IDC_ATTRIBUTE_MODE) lbSetCurSel 1; diff --git a/addons/arsenal/functions/fnc_buttonCargo.sqf b/addons/arsenal/functions/fnc_buttonCargo.sqf index 1af4008caf..cc8cdf45bf 100644 --- a/addons/arsenal/functions/fnc_buttonCargo.sqf +++ b/addons/arsenal/functions/fnc_buttonCargo.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Add or remove item(s) when the + or - button is pressed in the right panel. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_addOrRemove"]; diff --git a/addons/arsenal/functions/fnc_buttonClearAll.sqf b/addons/arsenal/functions/fnc_buttonClearAll.sqf index d73d777ace..8e1d70d6eb 100644 --- a/addons/arsenal/functions/fnc_buttonClearAll.sqf +++ b/addons/arsenal/functions/fnc_buttonClearAll.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Clear the current container. @@ -10,8 +12,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display"]; diff --git a/addons/arsenal/functions/fnc_buttonExport.sqf b/addons/arsenal/functions/fnc_buttonExport.sqf index dd9233764b..86caf418e3 100644 --- a/addons/arsenal/functions/fnc_buttonExport.sqf +++ b/addons/arsenal/functions/fnc_buttonExport.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Export current loadout / default loadouts list to clipboard. @@ -10,7 +11,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_display"]; diff --git a/addons/arsenal/functions/fnc_buttonHide.sqf b/addons/arsenal/functions/fnc_buttonHide.sqf index da870e0b9f..23e4f7d081 100644 --- a/addons/arsenal/functions/fnc_buttonHide.sqf +++ b/addons/arsenal/functions/fnc_buttonHide.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Hide / show arsenal interface. @@ -10,8 +12,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display"]; diff --git a/addons/arsenal/functions/fnc_buttonImport.sqf b/addons/arsenal/functions/fnc_buttonImport.sqf index 7cc059d818..3eefba41a4 100644 --- a/addons/arsenal/functions/fnc_buttonImport.sqf +++ b/addons/arsenal/functions/fnc_buttonImport.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Import loadout / default loadouts list from clipboard. @@ -10,8 +12,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display"]; @@ -31,16 +31,7 @@ if (GVAR(shiftState) && {is3DEN}) then { {_x select 1 isEqualType []} && {count (_x select 1) == 10} ) then { - - _x params ["_loadoutName", "_loadout"]; - - private _sameNameLoadoutsList = GVAR(defaultLoadoutsList) select {_x select 0 == _loadoutName}; - - if (count _sameNameLoadoutsList == 0) then { - GVAR(defaultLoadoutsList) pushBack [_loadoutName, _loadout]; - } else { - GVAR(defaultLoadoutsList) set [GVAR(defaultLoadoutsList) find (_sameNameLoadoutsList select 0), _loadoutName, _loadout]; - }; + _x call FUNC(addDefaultLoadout); }; } foreach _data; diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf index d3621f5826..a1d39b1423 100644 --- a/addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf +++ b/addons/arsenal/functions/fnc_buttonLoadoutsDelete.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Delete / unshare loadout currently selected. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control"]; diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf index 131bc1331f..0a2faccc54 100644 --- a/addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf +++ b/addons/arsenal/functions/fnc_buttonLoadoutsLoad.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Load selected loadout. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control"]; @@ -76,10 +76,17 @@ for "_index" from 0 to 15 do { }; { private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation"); - private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType)); - GVAR(currentItems) set [_index, _x]; -} foreach (assignedItems GVAR(center)); + if (_simulationType != "NVGoggles") then { + if (_simulationType == "ItemGps" || _simulationType == "Weapon") then { + GVAR(currentItems) set [14, _x]; + } else { + + private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch"] find (tolower _simulationType)); + GVAR(currentItems) set [_index, _x]; + }; + }; +} forEach (assignedItems GVAR(center)); call FUNC(updateUniqueItemsList); diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsRename.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsRename.sqf index 5435d07279..a1f9294669 100644 --- a/addons/arsenal/functions/fnc_buttonLoadoutsRename.sqf +++ b/addons/arsenal/functions/fnc_buttonLoadoutsRename.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Rename selected loadout. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control"]; diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf index fecb6300e3..78e02431a4 100644 --- a/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf +++ b/addons/arsenal/functions/fnc_buttonLoadoutsSave.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Save selected loadout. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control"]; @@ -33,7 +33,7 @@ private _loadoutName = _contentPanelCtrl lnbText [_cursSelRow, 1]; private _curSelLoadout = (_contentPanelCtrl getVariable (_loadoutName + str GVAR(currentLoadoutsTab))) select 0; private _loadout = getUnitLoadout GVAR(center); -private _sameNameLoadoutsList = _data select {_x select 0 == _editBoxContent}; +private _loadoutIndex = _data findIf {(_x select 0) == _editBoxContent}; private _sharedLoadoutsVars = GVAR(sharedLoadoutsNamespace) getVariable QGVAR(sharedLoadoutsVars); // Make sure the loadout isn't yours (public tab) or being shared (my loadouts tab) @@ -124,10 +124,10 @@ switch (GVAR(currentLoadoutsTab)) do { }; }; - if (count _sameNameLoadoutsList == 0) then { + if (_loadoutIndex == -1) then { _data pushBack [_editBoxContent, _loadout]; } else { - _data set [_data find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]]; + _data set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]]; }; // Delete "old" loadout row @@ -155,7 +155,7 @@ switch (GVAR(currentLoadoutsTab)) do { if (is3DEN) then { - private _sameNameLoadoutsList = _data select {_x select 0 == _editBoxContent}; + private _loadoutIndex = _data findIf {(_x select 0) == _editBoxContent}; for "_dataIndex" from 0 to 10 do { switch (_dataIndex) do { @@ -232,10 +232,10 @@ switch (GVAR(currentLoadoutsTab)) do { }; }; - if (count _sameNameLoadoutsList == 0) then { + if (_loadoutIndex == -1) then { GVAR(defaultLoadoutsList) pushBack [_editBoxContent, _loadout]; } else { - GVAR(defaultLoadoutsList) set [GVAR(defaultLoadoutsList) find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]]; + GVAR(defaultLoadoutsList) set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]]; }; for '_i' from 0 to (((lnbsize _contentPanelCtrl) select 0) - 1) do { @@ -258,10 +258,10 @@ switch (GVAR(currentLoadoutsTab)) do { set3DENMissionAttributes [[QGVAR(DummyCategory), QGVAR(DefaultLoadoutsListAttribute), GVAR(defaultLoadoutsList)]]; } else { - if (count _sameNameLoadoutsList == 0) then { + if (_loadoutIndex == -1) then { _data pushBack [_editBoxContent, _curSelLoadout]; } else { - _data set [_data find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _curSelLoadout]]; + _data set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _curSelLoadout]]; _contentPanelCtrl setVariable [_editBoxContent + str IDC_buttonMyLoadouts, [_curSelLoadout] call FUNC(verifyLoadout)]; }; @@ -273,10 +273,10 @@ switch (GVAR(currentLoadoutsTab)) do { _loadout = (GVAR(sharedLoadoutsNamespace) getVariable ((_contentPanelCtrl lnbText [_cursSelRow, 0]) + (_contentPanelCtrl lnbText [_cursSelRow, 1]))) select 2; - if (count _sameNameLoadoutsList == 0) then { + if (_loadoutIndex == -1) then { _data pushBack [_editBoxContent, _loadout]; } else { - _data set [_data find (_sameNameLoadoutsList select 0), [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]]; + _data set [_loadoutIndex, [[_editBoxContent, _loadoutName] select (_loadoutName isEqualTo _editBoxContent), _loadout]]; _contentPanelCtrl setVariable [_editBoxContent + str IDC_buttonMyLoadouts, [_loadout] call FUNC(verifyLoadout)]; }; diff --git a/addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf b/addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf index d167522823..a9a1dd9d08 100644 --- a/addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf +++ b/addons/arsenal/functions/fnc_buttonLoadoutsShare.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Share selected loadout. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control"]; diff --git a/addons/arsenal/functions/fnc_buttonStats.sqf b/addons/arsenal/functions/fnc_buttonStats.sqf index 7fe2d1fbf1..0eaac78a41 100644 --- a/addons/arsenal/functions/fnc_buttonStats.sqf +++ b/addons/arsenal/functions/fnc_buttonStats.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Toggle the stats control group @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display"]; diff --git a/addons/arsenal/functions/fnc_buttonStatsPage.sqf b/addons/arsenal/functions/fnc_buttonStatsPage.sqf index b1c1cdf7eb..48c9b4715e 100644 --- a/addons/arsenal/functions/fnc_buttonStatsPage.sqf +++ b/addons/arsenal/functions/fnc_buttonStatsPage.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Handles the previous / next page buttons for stats @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control", "_nextPage"]; diff --git a/addons/arsenal/functions/fnc_clearSearchbar.sqf b/addons/arsenal/functions/fnc_clearSearchbar.sqf index c417b6d1a4..a6b7b534dc 100644 --- a/addons/arsenal/functions/fnc_clearSearchbar.sqf +++ b/addons/arsenal/functions/fnc_clearSearchbar.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Clear the provided searchbar. @@ -12,8 +14,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control", "_rightButton"]; diff --git a/addons/arsenal/functions/fnc_compileStats.sqf b/addons/arsenal/functions/fnc_compileStats.sqf index f705e76884..40c9d7cfa5 100644 --- a/addons/arsenal/functions/fnc_compileStats.sqf +++ b/addons/arsenal/functions/fnc_compileStats.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Create the internal stats arrays when needed for the first time @@ -10,7 +11,6 @@ * * Public: No */ -#include "script_component.hpp" if (!isNil QGVAR(statsListLeftPanel)) exitWith {}; diff --git a/addons/arsenal/functions/fnc_fillLeftPanel.sqf b/addons/arsenal/functions/fnc_fillLeftPanel.sqf index 357b1594e0..5009f46e3a 100644 --- a/addons/arsenal/functions/fnc_fillLeftPanel.sqf +++ b/addons/arsenal/functions/fnc_fillLeftPanel.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Fill left panel. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control"]; @@ -162,6 +162,16 @@ switch true do { { ["CfgUnitInsignia", configName _x, _ctrlPanel, "texture"] call FUNC(addListBoxItem); } foreach ("true" configClasses (configFile >> "CfgUnitInsignia")); + + { + private _displayName = getText (_x >> "displayName"); + private _className = configName _x; + private _lbAdd = _ctrlPanel lbAdd _displayName; + + _ctrlPanel lbSetData [_lbAdd, _className]; + _ctrlPanel lbSetPicture [_lbAdd, getText (_x >> "texture")]; + _ctrlPanel lbSetTooltip [_lbAdd, format ["%1\n%2", _displayName, _className]]; + } foreach ("true" configClasses (missionConfigFile >> "CfgUnitInsignia")); }; }; }; diff --git a/addons/arsenal/functions/fnc_fillLoadoutsList.sqf b/addons/arsenal/functions/fnc_fillLoadoutsList.sqf index 4388881eba..433f0304df 100644 --- a/addons/arsenal/functions/fnc_fillLoadoutsList.sqf +++ b/addons/arsenal/functions/fnc_fillLoadoutsList.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Fill loadouts list. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control"]; diff --git a/addons/arsenal/functions/fnc_fillRightPanel.sqf b/addons/arsenal/functions/fnc_fillRightPanel.sqf index e3d730f859..a5f60c593c 100644 --- a/addons/arsenal/functions/fnc_fillRightPanel.sqf +++ b/addons/arsenal/functions/fnc_fillRightPanel.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Fill right panel. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control"]; diff --git a/addons/arsenal/functions/fnc_handleLoadoutsSearchbar.sqf b/addons/arsenal/functions/fnc_handleLoadoutsSearchbar.sqf index 07a42c4fd5..2911e7aa19 100644 --- a/addons/arsenal/functions/fnc_handleLoadoutsSearchbar.sqf +++ b/addons/arsenal/functions/fnc_handleLoadoutsSearchbar.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Handles keyboard inputs inside the searchbars text boxes. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control"]; diff --git a/addons/arsenal/functions/fnc_handleMouse.sqf b/addons/arsenal/functions/fnc_handleMouse.sqf index 071eb1f94d..7d2fa2c9e2 100644 --- a/addons/arsenal/functions/fnc_handleMouse.sqf +++ b/addons/arsenal/functions/fnc_handleMouse.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Karel Moricky, modified by Alganthe * Update the camera position and pitch/bank. @@ -15,8 +17,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["", "_args"]; diff --git a/addons/arsenal/functions/fnc_handleScrollWheel.sqf b/addons/arsenal/functions/fnc_handleScrollWheel.sqf index e7dc3bbc1e..0fec3e7c5b 100644 --- a/addons/arsenal/functions/fnc_handleScrollWheel.sqf +++ b/addons/arsenal/functions/fnc_handleScrollWheel.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Handle the mouse wheel. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["", "_args"]; _args params ["", "_zPos"]; diff --git a/addons/arsenal/functions/fnc_handleSearchbar.sqf b/addons/arsenal/functions/fnc_handleSearchbar.sqf index 87b03d8c57..5632006f43 100644 --- a/addons/arsenal/functions/fnc_handleSearchbar.sqf +++ b/addons/arsenal/functions/fnc_handleSearchbar.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Handles keyboard inputs inside the searchbars text boxes. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control"]; diff --git a/addons/arsenal/functions/fnc_handleStats.sqf b/addons/arsenal/functions/fnc_handleStats.sqf index ec22b6055d..0c57f6c721 100644 --- a/addons/arsenal/functions/fnc_handleStats.sqf +++ b/addons/arsenal/functions/fnc_handleStats.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Handles the stats control group @@ -13,8 +15,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control", "_curSel", "_itemCfg"]; diff --git a/addons/arsenal/functions/fnc_initBox.sqf b/addons/arsenal/functions/fnc_initBox.sqf index 52d7662a00..1343a20f63 100644 --- a/addons/arsenal/functions/fnc_initBox.sqf +++ b/addons/arsenal/functions/fnc_initBox.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Initialize a box / object for arsenal. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_object", objNull, [objNull]], ["_items", true, [[], true]], ["_global", true, [true]]]; @@ -30,7 +30,7 @@ if (_global && {isMultiplayer} && {{_object in _x} count GVAR(EHIDArray) == 0}) private _ID = [QGVAR(initBox), [_object, _items, false]] call CBA_fnc_globalEventJIP; [_ID, _object] call CBA_fnc_removeGlobalEventJIP; - + GVAR(EHIDArray) pushBack [_ID, _object]; publicVariable QGVAR(EHIDArray); } else { @@ -38,19 +38,19 @@ if (_global && {isMultiplayer} && {{_object in _x} count GVAR(EHIDArray) == 0}) if ({(_x select 0) select 0 isEqualTo QGVAR(interaction)} count (_object getVariable [QEGVAR(interact_menu,actions), []]) == 0) then { private _action = [ - QGVAR(interaction), + QGVAR(interaction), localize "STR_A3_Arsenal", - "", + "", { params ["_target", "_player"]; [_target, _player] call FUNC(openBox); - }, + }, { params ["_target", "_player"]; - + [_player, _target] call EFUNC(common,canInteractWith) - }, + }, {}, [] ] call EFUNC(interact_menu,createAction); diff --git a/addons/arsenal/functions/fnc_itemInfo.sqf b/addons/arsenal/functions/fnc_itemInfo.sqf index 546158fa7e..85a848c3bd 100644 --- a/addons/arsenal/functions/fnc_itemInfo.sqf +++ b/addons/arsenal/functions/fnc_itemInfo.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Update arsenal's info box. @@ -13,8 +15,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control", "_curSel" ,"_itemCfg"]; diff --git a/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf b/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf index 1546d3ed6c..df5d8a5804 100644 --- a/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf +++ b/addons/arsenal/functions/fnc_loadoutsChangeTab.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Handles tab changing for the loadouts display. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control"]; diff --git a/addons/arsenal/functions/fnc_message.sqf b/addons/arsenal/functions/fnc_message.sqf index 92f922d7f9..8fbd48748f 100644 --- a/addons/arsenal/functions/fnc_message.sqf +++ b/addons/arsenal/functions/fnc_message.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Displays messages in arsenal. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_message"]; diff --git a/addons/arsenal/functions/fnc_onArsenalClose.sqf b/addons/arsenal/functions/fnc_onArsenalClose.sqf index bbf1e36f08..f4ad7dfed8 100644 --- a/addons/arsenal/functions/fnc_onArsenalClose.sqf +++ b/addons/arsenal/functions/fnc_onArsenalClose.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * onUnLoad EH for arsenal. @@ -10,7 +11,6 @@ * * Public: No */ -#include "script_component.hpp" (_this select 1) params ["", "_exitCode"]; diff --git a/addons/arsenal/functions/fnc_onArsenalOpen.sqf b/addons/arsenal/functions/fnc_onArsenalOpen.sqf index f61a60e2c1..9af448fd09 100644 --- a/addons/arsenal/functions/fnc_onArsenalOpen.sqf +++ b/addons/arsenal/functions/fnc_onArsenalOpen.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * onLoad EH for arsenal. @@ -12,8 +14,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["", "_args"]; _args params ["_display"]; @@ -38,7 +38,7 @@ if (isNil QGVAR(defaultLoadoutsList)) then { if (is3DEN) then { GVAR(defaultLoadoutsList) = (QGVAR(DummyCategory) get3DENMissionAttribute QGVAR(DefaultLoadoutsListAttribute)); } else { - GVAR(defaultLoadoutsList) = []; + GVAR(defaultLoadoutsList) = []; }; }; @@ -165,9 +165,16 @@ for "_index" from 0 to 15 do { { private _simulationType = getText (configFile >> "CfgWeapons" >> _x >> "simulation"); - private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch", "itemgps"] find (tolower _simulationType)); - GVAR(currentItems) set [_index, _x]; + if (_simulationType != "NVGoggles") then { + if (_simulationType == "ItemGps" || _simulationType == "Weapon") then { + GVAR(currentItems) set [14, _x]; + } else { + + private _index = 10 + (["itemmap", "itemcompass", "itemradio", "itemwatch"] find (tolower _simulationType)); + GVAR(currentItems) set [_index, _x]; + }; + }; } forEach (assignedItems GVAR(center)); GVAR(currentWeaponType) = switch true do { @@ -289,6 +296,10 @@ if (is3DEN) then { } else { GVAR(centerNotPlayer) = (GVAR(center) != player); + if (currentVisionMode ACE_Player == 1) then { + GVAR(center) action ["NVGogglesOff", GVAR(center)]; + }; + { private _ctrl = _display displayCtrl _x; _ctrl ctrlEnable GVAR(enableIdentityTabs); diff --git a/addons/arsenal/functions/fnc_onKeyDown.sqf b/addons/arsenal/functions/fnc_onKeyDown.sqf index d06055f149..a66ab3784d 100644 --- a/addons/arsenal/functions/fnc_onKeyDown.sqf +++ b/addons/arsenal/functions/fnc_onKeyDown.sqf @@ -1,3 +1,6 @@ +#include "script_component.hpp" +#include "..\defines.hpp" +#include "\A3\ui_f\hpp\defineDIKCodes.inc" /* * Author: Alganthe * Handles keyboard inputs in arsenal. @@ -14,9 +17,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" -#include "\A3\ui_f\hpp\defineDIKCodes.inc" params ["", "_args"]; _args params ["_display", "_keyPressed", "_shiftState", "_ctrlState", "_altState"]; diff --git a/addons/arsenal/functions/fnc_onLoadoutsClose.sqf b/addons/arsenal/functions/fnc_onLoadoutsClose.sqf index 4560fbe384..1b25ad4945 100644 --- a/addons/arsenal/functions/fnc_onLoadoutsClose.sqf +++ b/addons/arsenal/functions/fnc_onLoadoutsClose.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * onUnLoad EH for arsenal loadouts display. @@ -10,8 +12,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" GVAR(currentLoadoutsTab) = nil; diff --git a/addons/arsenal/functions/fnc_onLoadoutsOpen.sqf b/addons/arsenal/functions/fnc_onLoadoutsOpen.sqf index 613621e405..d22124359d 100644 --- a/addons/arsenal/functions/fnc_onLoadoutsOpen.sqf +++ b/addons/arsenal/functions/fnc_onLoadoutsOpen.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * onLoad EH for arsenal loadouts display. @@ -12,8 +14,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["", "_args"]; _args params ["_display"]; diff --git a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf index 6c1e76a239..acc1d12741 100644 --- a/addons/arsenal/functions/fnc_onSelChangedLeft.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedLeft.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Handles selection changes on the left panel. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_control", "_curSel"]; @@ -412,7 +412,14 @@ switch (GVAR(currentLeftPanel)) do { call FUNC(showItem); TOGGLE_RIGHT_PANEL_HIDE - [_display, _control, _curSel, (configFile >> "CfgUnitInsignia" >> _item)] call FUNC(itemInfo); + + private _unitInsigniaConfig = (configFile >> "CfgUnitInsignia" >> _item); + + if (configName _unitInsigniaConfig isEqualTo "") then { + [_display, _control, _curSel, (missionConfigFile >> "CfgUnitInsignia" >> _item)] call FUNC(itemInfo); + } else { + [_display, _control, _curSel, _unitInsigniaConfig] call FUNC(itemInfo); + }; }; }; diff --git a/addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf b/addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf index 3f4d508ae0..529f69da75 100644 --- a/addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedLoadouts.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Handles selection changes on loadouts panel. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_display", "_control", "_curSel"]; diff --git a/addons/arsenal/functions/fnc_onSelChangedRight.sqf b/addons/arsenal/functions/fnc_onSelChangedRight.sqf index 7a565cd14d..a2d83dceba 100644 --- a/addons/arsenal/functions/fnc_onSelChangedRight.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedRight.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Handles selection changes on the right panel. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_control", "_curSel"]; diff --git a/addons/arsenal/functions/fnc_onSelChangedRightListnBox.sqf b/addons/arsenal/functions/fnc_onSelChangedRightListnBox.sqf index 29c66a79f9..c2b14c6462 100644 --- a/addons/arsenal/functions/fnc_onSelChangedRightListnBox.sqf +++ b/addons/arsenal/functions/fnc_onSelChangedRightListnBox.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Handles selection changes on the right panel (listnbox). @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_control", "_curSel"]; diff --git a/addons/arsenal/functions/fnc_open3DEN.sqf b/addons/arsenal/functions/fnc_open3DEN.sqf index 6bb0adcaa3..103ec870e1 100644 --- a/addons/arsenal/functions/fnc_open3DEN.sqf +++ b/addons/arsenal/functions/fnc_open3DEN.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Replace the 3DEN "edit loadout" menu action @@ -11,7 +12,6 @@ * * Public: No */ -#include "script_component.hpp" private _entity = (uinamespace getvariable ["bis_fnc_3DENEntityMenu_data",[]]) param [1, objnull]; [_entity, _entity, true] call FUNC(openBox); diff --git a/addons/arsenal/functions/fnc_openBox.sqf b/addons/arsenal/functions/fnc_openBox.sqf index af23d9f990..ce02e6e343 100644 --- a/addons/arsenal/functions/fnc_openBox.sqf +++ b/addons/arsenal/functions/fnc_openBox.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Open arsenal. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_object", objNull, [objNull]], ["_center", objNull, [objNull]], ["_mode", false, [false]]]; diff --git a/addons/arsenal/functions/fnc_portVALoadouts.sqf b/addons/arsenal/functions/fnc_portVALoadouts.sqf index 7ad141819d..0e403eae92 100644 --- a/addons/arsenal/functions/fnc_portVALoadouts.sqf +++ b/addons/arsenal/functions/fnc_portVALoadouts.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe * Port VA loadouts to ACE Arsenal. @@ -10,7 +11,6 @@ * * Public: Yes */ -#include "script_component.hpp" private _VALoadouts = +(profilenamespace getvariable ["bis_fnc_saveInventory_data",[]]); private _aceLoadouts = +(profileNamespace getVariable [QGVAR(saved_loadouts),[]]); diff --git a/addons/arsenal/functions/fnc_removeBox.sqf b/addons/arsenal/functions/fnc_removeBox.sqf index 43fa903ca4..ed4ec7de4d 100644 --- a/addons/arsenal/functions/fnc_removeBox.sqf +++ b/addons/arsenal/functions/fnc_removeBox.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Remove arsenal from target. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_object", objNull, [objNull]], ["_global", true, [true]]]; diff --git a/addons/arsenal/functions/fnc_removeStat.sqf b/addons/arsenal/functions/fnc_removeStat.sqf index 86eecd839d..79f2173798 100644 --- a/addons/arsenal/functions/fnc_removeStat.sqf +++ b/addons/arsenal/functions/fnc_removeStat.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Remove a stat from ACE Arsenal. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_IDList"]; diff --git a/addons/arsenal/functions/fnc_removeVirtualItems.sqf b/addons/arsenal/functions/fnc_removeVirtualItems.sqf index f6fed970f9..d96d16e3d6 100644 --- a/addons/arsenal/functions/fnc_removeVirtualItems.sqf +++ b/addons/arsenal/functions/fnc_removeVirtualItems.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Remove virtual items to the provided target. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [ ["_object", objNull, [objNull]], ["_items", [], [true, [""]]], ["_global", false, [false]] ]; diff --git a/addons/arsenal/functions/fnc_scanConfig.sqf b/addons/arsenal/functions/fnc_scanConfig.sqf index f5c608db78..840c56d514 100644 --- a/addons/arsenal/functions/fnc_scanConfig.sqf +++ b/addons/arsenal/functions/fnc_scanConfig.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dedmen * Cache an array of all the compatible items for arsenal. @@ -10,7 +11,6 @@ * * Public: No */ -#include "script_component.hpp" private _cargo = [ [[], [], []], // Weapons 0, primary, secondary, handgun @@ -46,23 +46,23 @@ private _configCfgWeapons = configFile >> "CfgWeapons"; //Save this lookup in va /* Weapon acc */ case ( _hasItemInfo && - {_itemInfoType in [101, 201, 301, 302]} && + {_itemInfoType in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD]} && {!(configName _x isKindOf ["CBA_MiscItem", (_configCfgWeapons)])} ): { //Convert type to array index - (_cargo select 1) select ([201,301,101,302] find _itemInfoType) pushBackUnique _className; + (_cargo select 1) select ([TYPE_OPTICS,TYPE_FLASHLIGHT,TYPE_MUZZLE,TYPE_BIPOD] find _itemInfoType) pushBackUnique _className; }; /* Headgear */ - case (_itemInfoType == 605): { + case (_itemInfoType == TYPE_HEADGEAR): { (_cargo select 3) pushBackUnique _className; }; /* Uniform */\ - case (_itemInfoType == 801): { + case (_itemInfoType == TYPE_UNIFORM): { (_cargo select 4) pushBackUnique _className; }; /* Vest */ - case (_itemInfoType == 701): { + case (_itemInfoType == TYPE_VEST): { (_cargo select 5) pushBackUnique _className; }; /* NVgs */ @@ -71,7 +71,7 @@ private _configCfgWeapons = configFile >> "CfgWeapons"; //Save this lookup in va }; /* Binos */ case (_simulationType == "Binocular" || - ((_simulationType == 'Weapon') && {(getNumber (_x >> 'type') == 4096)})): { + ((_simulationType == 'Weapon') && {(getNumber (_x >> 'type') == TYPE_BINOCULAR_AND_NVG)})): { (_cargo select 9) pushBackUnique _className; }; /* Map */ @@ -95,20 +95,20 @@ private _configCfgWeapons = configFile >> "CfgWeapons"; //Save this lookup in va (_cargo select 14) pushBackUnique _className; }; /* UAV terminals */ - case (_itemInfoType == 621): { + case (_itemInfoType == TYPE_UAV_TERMINAL): { (_cargo select 14) pushBackUnique _className; }; /* Weapon, at the bottom to avoid adding binos */ case (isClass (_x >> "WeaponSlotsInfo") && - {getNumber (_x >> 'type') != 4096}): { + {getNumber (_x >> 'type') != TYPE_BINOCULAR_AND_NVG}): { switch (getNumber (_x >> "type")) do { - case 1: { + case TYPE_WEAPON_PRIMARY: { (_cargo select 0) select 0 pushBackUnique (_className call bis_fnc_baseWeapon); }; - case 2: { + case TYPE_WEAPON_HANDGUN: { (_cargo select 0) select 2 pushBackUnique (_className call bis_fnc_baseWeapon); }; - case 4: { + case TYPE_WEAPON_SECONDARY: { (_cargo select 0) select 1 pushBackUnique (_className call bis_fnc_baseWeapon); }; }; @@ -116,9 +116,9 @@ private _configCfgWeapons = configFile >> "CfgWeapons"; //Save this lookup in va /* Misc items */ case ( _hasItemInfo && - (_itemInfoType in [101, 201, 301, 302] && + (_itemInfoType in [TYPE_MUZZLE, TYPE_OPTICS, TYPE_FLASHLIGHT, TYPE_BIPOD] && {(_className isKindOf ["CBA_MiscItem", (_configCfgWeapons)])}) || - {_itemInfoType in [401, 619, 620]} || + {_itemInfoType in [TYPE_FIRST_AID_KIT, TYPE_MEDIKIT, TYPE_TOOLKIT]} || {(getText ( _x >> "simulation")) == "ItemMineDetector"} ): { (_cargo select 17) pushBackUnique _className; @@ -142,7 +142,7 @@ private _putList = []; switch true do { // Rifle, handgun, secondary weapons mags case ( - (getNumber (_x >> "type") in [256,512,1536,16]) && + (getNumber (_x >> "type") in [TYPE_MAGAZINE_PRIMARY_AND_THROW,TYPE_MAGAZINE_SECONDARY_AND_PUT,1536,TYPE_MAGAZINE_HANDGUN_AND_GL]) && {!(_className in _grenadeList)} && {!(_className in _putList)} ): { diff --git a/addons/arsenal/functions/fnc_showItem.sqf b/addons/arsenal/functions/fnc_showItem.sqf index 478ae4218d..d9bf74f061 100644 --- a/addons/arsenal/functions/fnc_showItem.sqf +++ b/addons/arsenal/functions/fnc_showItem.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Change unit animation / play sound preview. @@ -10,8 +12,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" if (GVAR(centerNotPlayer)) exitWith {}; diff --git a/addons/arsenal/functions/fnc_sortPanel.sqf b/addons/arsenal/functions/fnc_sortPanel.sqf index c8bf02777f..5d3a2af017 100644 --- a/addons/arsenal/functions/fnc_sortPanel.sqf +++ b/addons/arsenal/functions/fnc_sortPanel.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe, Dedmen * Sort arsenal panel. @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_control", "_mode"]; @@ -35,7 +35,16 @@ if (ctrlIDC _control == 17 && {GVAR(currentLeftPanel) in [IDC_buttonUniform ,IDC }; case 2: { + for "_i" from 0 to (((lnbsize _panel) select 0) - 1) do { + _panel lnbSetText [[_i, 2], str (parseNumber (_panel lnbText [_i, 2]) / 1000)]; + }; + _panel lnbSort [2, true]; + + + for "_i" from 0 to (((lnbsize _panel) select 0) - 1) do { + _panel lnbSetText [[_i, 2], str (parseNumber (_panel lnbText [_i, 2]) * 1000)]; + }; }; }; diff --git a/addons/arsenal/functions/fnc_statBarStatement_accuracy.sqf b/addons/arsenal/functions/fnc_statBarStatement_accuracy.sqf index f426cbd963..141cc262ad 100644 --- a/addons/arsenal/functions/fnc_statBarStatement_accuracy.sqf +++ b/addons/arsenal/functions/fnc_statBarStatement_accuracy.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Accuracy bar statement. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_stat", "_config", "_args"]; _args params ["_statMinMax", "_barLimits"]; diff --git a/addons/arsenal/functions/fnc_statBarStatement_default.sqf b/addons/arsenal/functions/fnc_statBarStatement_default.sqf index d31529b55b..4eb0a36f98 100644 --- a/addons/arsenal/functions/fnc_statBarStatement_default.sqf +++ b/addons/arsenal/functions/fnc_statBarStatement_default.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Generic bar statement for stats. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_stat", "_config", "_args"]; _args params ["_statMinMax", "_barLimits", "_configExtremeBool"]; diff --git a/addons/arsenal/functions/fnc_statBarStatement_impact.sqf b/addons/arsenal/functions/fnc_statBarStatement_impact.sqf index d979a178a0..c8839e85c2 100644 --- a/addons/arsenal/functions/fnc_statBarStatement_impact.sqf +++ b/addons/arsenal/functions/fnc_statBarStatement_impact.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Impact bar statement. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_stats", "_config", "_args"]; _args params ["_hitMinMax", "_initSpeedMinMax", "_launcherTabIDC"]; diff --git a/addons/arsenal/functions/fnc_statBarStatement_rateOfFIre.sqf b/addons/arsenal/functions/fnc_statBarStatement_rateOfFIre.sqf index 3557cd7ed5..8e2bd5fef8 100644 --- a/addons/arsenal/functions/fnc_statBarStatement_rateOfFIre.sqf +++ b/addons/arsenal/functions/fnc_statBarStatement_rateOfFIre.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Rate of fire bar statement. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_stat", "_config", "_args"]; _args params ["_statMinMax", "_barLimits"]; diff --git a/addons/arsenal/functions/fnc_statTextStatement_accuracy.sqf b/addons/arsenal/functions/fnc_statTextStatement_accuracy.sqf index 8f2045bdcf..cb2687097b 100644 --- a/addons/arsenal/functions/fnc_statTextStatement_accuracy.sqf +++ b/addons/arsenal/functions/fnc_statTextStatement_accuracy.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Accuracy text statement. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_stat", "_config", "_args"]; _args params ["_statMinMax", "_configExtremeBool"]; @@ -23,7 +23,9 @@ private _fireModes = getArray (_config >> "modes"); private _dispersion = []; { - _dispersion pushBackUnique (getNumber (_config >> _x >> "dispersion")); + if (getNumber (_config >> _x >> "showToPlayer") != 0) then { + _dispersion pushBackUnique (getNumber (_config >> _x >> "dispersion")); + }; } foreach _fireModes; _dispersion sort true; diff --git a/addons/arsenal/functions/fnc_statTextStatement_mass.sqf b/addons/arsenal/functions/fnc_statTextStatement_mass.sqf index eeda9d7203..9c2a0501a6 100644 --- a/addons/arsenal/functions/fnc_statTextStatement_mass.sqf +++ b/addons/arsenal/functions/fnc_statTextStatement_mass.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Text statement for the mass stat. @@ -11,7 +12,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "_config"]; diff --git a/addons/arsenal/functions/fnc_statTextStatement_rateOfFire.sqf b/addons/arsenal/functions/fnc_statTextStatement_rateOfFire.sqf index c57306f5af..46f66fd52a 100644 --- a/addons/arsenal/functions/fnc_statTextStatement_rateOfFire.sqf +++ b/addons/arsenal/functions/fnc_statTextStatement_rateOfFire.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Rate of fire text statement. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_stat", "_config", "_args"]; _args params ["_statMinMax", "_configExtremeBool"]; diff --git a/addons/arsenal/functions/fnc_statTextStatement_scopeMag.sqf b/addons/arsenal/functions/fnc_statTextStatement_scopeMag.sqf index 5445847215..f817ff6c3f 100644 --- a/addons/arsenal/functions/fnc_statTextStatement_scopeMag.sqf +++ b/addons/arsenal/functions/fnc_statTextStatement_scopeMag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Text statement for the scope magnification stat. @@ -11,7 +12,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "_config"]; TRACE_1("statTextStatement_scopeMag",_config); diff --git a/addons/arsenal/functions/fnc_statTextStatement_scopeVisionMode.sqf b/addons/arsenal/functions/fnc_statTextStatement_scopeVisionMode.sqf new file mode 100644 index 0000000000..f5a29f1996 --- /dev/null +++ b/addons/arsenal/functions/fnc_statTextStatement_scopeVisionMode.sqf @@ -0,0 +1,68 @@ +#include "script_component.hpp" +/* + * Author: Dedmen + * Text statement for the scope Night vision support stat. + * + * Arguments: + * 0: not used + * 1: item config path (CONFIG) + * + * Return Value: + * String to display + * + * Public: No + */ + +params ["", "_config"]; +TRACE_1("statTextStatement_scopeVisionMode",_config); + +private _opticsModes = ("true" configClasses (_config >> "ItemInfo" >> "OpticsModes")) apply { + private _visionMode = getArray (_x >> "visionMode"); + [ + getNumber (_x >> "useModelOptics") == 1, //is in optics + _visionMode isEqualTo [], //optional NVG + "NVG" in _visionMode, //Integrated NVG + "Ti" in _visionMode //Integrated Thermal + ] +}; + +private _primaryNVGIntegrated = false; +private _primaryNVGSupported = false; +private _primaryTiIntegrated = false; +private _secondaryNVGSupported = false; + +{ + _x params ["_isPrimary", "_optionalNvg", "_integratedNVG", "_integratedTi"]; + if (_isPrimary) then { + if (_integratedNVG) then { + _primaryNVGIntegrated = true; + }; + if (_optionalNvg) then { + _primaryNVGSupported = true; + }; + if (_integratedTi) then { + _primaryTiIntegrated = true; + }; + } else { + if (_optionalNvg) then { + _secondaryNVGSupported = true; + } + } +} forEach _opticsModes; + +//Detecting Primary by useModelOptics works in 99.9% of cases. +//But on some scopes (from one specific mod) even the primary mode has useModelOptics=false +//So we have this workaround + +if ( + count _opticsModes == 1 || //If we only have a single mode. And it's a secondary, then consider it primary. + {{_x select 1} count _opticsModes == count _opticsModes} //If every mode supports it. Then then the primary also supports it +) then { + _primaryNVGSupported = _secondaryNVGSupported; +}; + +if (_primaryNVGIntegrated) exitWith {LLSTRING(statVisionMode_IntPrim)}; +if (_primaryNVGSupported) exitWith {LLSTRING(statVisionMode_supPrim)}; +if (_secondaryNVGSupported) exitWith {LLSTRING(statVisionMode_supSec)}; + +LLSTRING(statVisionMode_NoSup) diff --git a/addons/arsenal/functions/fnc_statTextStatement_smokeChemTTL.sqf b/addons/arsenal/functions/fnc_statTextStatement_smokeChemTTL.sqf new file mode 100644 index 0000000000..edbcc715ae --- /dev/null +++ b/addons/arsenal/functions/fnc_statTextStatement_smokeChemTTL.sqf @@ -0,0 +1,40 @@ +#include "script_component.hpp" +/* + * Author: Alganthe + * Text statement for the smoke / chemlight time to live stat. + * + * Arguments: + * 0: not used + * 1: item config path (CONFIG) + * + * Return Value: + * String to display + * + * Public: No + */ + +params ["", "_config"]; + +private _TTL = getNumber (configFile >> "CfgAmmo" >> getText (_config >> "ammo") >> "timeToLive"); + +if (_TTL > 3600) then { + + _TTL = _TTL / 60^2; + _TTL = str _TTL splitString "."; + + if (count _TTL > 1) then { + format [ + "%1h %2m", + parseNumber (_TTL select 0), + round (60 * parseNumber ("0." + (_TTL select 1))) + ] + } else { + format [ + "%1h", + parseNumber (_TTL select 0) + ] + }; +} else { + + format ["%1m", round (_TTL / 60)]; +}; diff --git a/addons/arsenal/functions/fnc_updateCamPos.sqf b/addons/arsenal/functions/fnc_updateCamPos.sqf index 41b7399e61..66bad37936 100644 --- a/addons/arsenal/functions/fnc_updateCamPos.sqf +++ b/addons/arsenal/functions/fnc_updateCamPos.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Karel Moricky, modified by Alganthe * Update camera position @@ -11,7 +12,6 @@ * * Public: Yes */ -#include "script_component.hpp" GVAR(cameraPosition) params ["_distance", "_dirH", "_dirV"]; [GVAR(cameraHelper), [_dirH + 180, - _dirV, 0]] call bis_fnc_setobjectrotation; diff --git a/addons/arsenal/functions/fnc_updateRightPanel.sqf b/addons/arsenal/functions/fnc_updateRightPanel.sqf index 41c7c68483..8114b8a568 100644 --- a/addons/arsenal/functions/fnc_updateRightPanel.sqf +++ b/addons/arsenal/functions/fnc_updateRightPanel.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Update the right panel (listnbox). @@ -11,8 +13,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_control", "_maxLoad"]; diff --git a/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf b/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf index 7a037d987d..7405950631 100644 --- a/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf +++ b/addons/arsenal/functions/fnc_updateUniqueItemsList.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Update the list of unique items. @@ -10,8 +12,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" GVAR(virtualItems) set [18, []]; GVAR(virtualItems) set [19, []]; diff --git a/addons/arsenal/functions/fnc_verifyLoadout.sqf b/addons/arsenal/functions/fnc_verifyLoadout.sqf index d5d0923511..e7ce4fe0a6 100644 --- a/addons/arsenal/functions/fnc_verifyLoadout.sqf +++ b/addons/arsenal/functions/fnc_verifyLoadout.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "..\defines.hpp" /* * Author: Alganthe * Verify the provided loadout. @@ -10,8 +12,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "..\defines.hpp" params ["_loadout"]; diff --git a/addons/arsenal/missions/Arsenal.VR/XEH_postInit.sqf b/addons/arsenal/missions/Arsenal.VR/XEH_postInit.sqf index 3a36faa6a2..5b24421c20 100644 --- a/addons/arsenal/missions/Arsenal.VR/XEH_postInit.sqf +++ b/addons/arsenal/missions/Arsenal.VR/XEH_postInit.sqf @@ -29,7 +29,9 @@ cba_diagnostic_projectileMaxLines = 10; _x hideObject true; } forEach (allMissionObjects "" - [_player]); - _player call CBA_fnc_removeUnitTrackProjectiles; + if ((_player getVariable ["cba_projectile_firedEhId", -1]) != -1) then { + _player call CBA_fnc_removeUnitTrackProjectiles; + }; _player setFatigue 0; // Esc to close mission diff --git a/addons/arsenal/stringtable.xml b/addons/arsenal/stringtable.xml index 20796a96af..f751af59af 100644 --- a/addons/arsenal/stringtable.xml +++ b/addons/arsenal/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -719,6 +719,26 @@ 拡大倍率 Büyütme + + Nightvision Support + Nachtsicht Unterstützung + + + Primary supported + Primär unterstützt + + + Secondary supported + Sekundär unterstützt + + + Primary integrated + Primär Integriert + + + Not Supported + Nicht unterstützt + Page Page @@ -778,13 +798,15 @@ Fehérlista Вайтлист Lista Bianca - 許可制 + 許可リスト 화이트리스트 白名單 白名单 Blacklist + 禁止リスト + Lista Nera Items @@ -804,6 +826,12 @@ Export current items list as an array for use in scripts + スクリプト用に現在のアイテム リストをアレイで出力します + Esporta l'attuale lista di elementi come un array, per essere usati negli script + + + Time to live + Durée de vie diff --git a/addons/arsenal/ui/RscCommon.hpp b/addons/arsenal/ui/RscCommon.hpp index 1d580c679e..f74326bcfb 100644 --- a/addons/arsenal/ui/RscCommon.hpp +++ b/addons/arsenal/ui/RscCommon.hpp @@ -266,38 +266,3 @@ class ctrlMapEmpty; class ctrlMapMain; class ctrlListNBox; class ctrlCheckboxToolbar; - -class Display3DEN { - class ContextMenu :ctrlMenu { - class Items { - class Arsenal { - items[]= {"aceArsenal", "virtualArsenal"}; - }; - class virtualArsenal { - text = "BI Virtual Arsenal"; - action= QUOTE(['arsenal'] call bis_fnc_3DENEntityMenu); - value=0; - data="Arsenal"; - opensNewWindow=1; - }; - class aceArsenal: virtualArsenal { - text = "ACE Arsenal"; - action= QUOTE(call FUNC(open3DEN)); - }; - }; - }; - class Controls { - class MenuStrip: ctrlMenuStrip { - class Items { - class Tools { - items[] += {"ACE_arsenal_portVALoadouts"}; - }; - class ACE_arsenal_portVALoadouts { - text = CSTRING(portLoadoutsText); - picture = QPATHTOEF(common,data\logo_ace3_ca.paa); - action = "call ace_arsenal_fnc_portVALoadouts;"; - }; - }; - }; - }; -}; diff --git a/addons/atragmx/functions/fnc_add_new_gun.sqf b/addons/atragmx/functions/fnc_add_new_gun.sqf index 729649dc5d..94415852f9 100644 --- a/addons/atragmx/functions/fnc_add_new_gun.sqf +++ b/addons/atragmx/functions/fnc_add_new_gun.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Adds a new (default) gun profile to the profileNamespace @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" call FUNC(trim_gun_name); diff --git a/addons/atragmx/functions/fnc_calculate_distance_at_velocity.sqf b/addons/atragmx/functions/fnc_calculate_distance_at_velocity.sqf index cbb78df8e7..1f06d79988 100644 --- a/addons/atragmx/functions/fnc_calculate_distance_at_velocity.sqf +++ b/addons/atragmx/functions/fnc_calculate_distance_at_velocity.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates distance at which the bullet velocity drops below the threshold velocity @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define __DELTA_T 0.001 diff --git a/addons/atragmx/functions/fnc_calculate_range_card.sqf b/addons/atragmx/functions/fnc_calculate_range_card.sqf index 9201861351..473e49a8a1 100644 --- a/addons/atragmx/functions/fnc_calculate_range_card.sqf +++ b/addons/atragmx/functions/fnc_calculate_range_card.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the range card output based on the current data set @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(rangeCardData) = []; diff --git a/addons/atragmx/functions/fnc_calculate_solution.sqf b/addons/atragmx/functions/fnc_calculate_solution.sqf index a7928d1ef0..3c854499d9 100644 --- a/addons/atragmx/functions/fnc_calculate_solution.sqf +++ b/addons/atragmx/functions/fnc_calculate_solution.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the fireing solution @@ -41,7 +42,6 @@ * * Public: No */ -#include "script_component.hpp" params [ "_scopeBaseAngle", "_bulletMass", "_boreHeight", "_airFriction", "_muzzleVelocity", "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", "_windSpeed", diff --git a/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf b/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf index 3a1bd879f1..51f00cdaaf 100644 --- a/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_calculate_target_range_assist.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the target range and updates the output fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _angle = parseNumber(ctrlText 7012); private _targetSize = abs(parseNumber(ctrlText 7010)); diff --git a/addons/atragmx/functions/fnc_calculate_target_solution.sqf b/addons/atragmx/functions/fnc_calculate_target_solution.sqf index 4477025618..775467f5de 100644 --- a/addons/atragmx/functions/fnc_calculate_target_solution.sqf +++ b/addons/atragmx/functions/fnc_calculate_target_solution.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the fireing solution and updates the result input/output fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" [] call FUNC(parse_input); diff --git a/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf b/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf index eacefc9833..1e28a82339 100644 --- a/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_calculate_target_speed_assist.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the target speed and updates the output fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _targetRange = parseNumber(ctrlText 8004); private _numTicks = parseNumber(ctrlText 8005); diff --git a/addons/atragmx/functions/fnc_calculate_truing_drop.sqf b/addons/atragmx/functions/fnc_calculate_truing_drop.sqf index fa43ac73c2..be6ebd1eda 100644 --- a/addons/atragmx/functions/fnc_calculate_truing_drop.sqf +++ b/addons/atragmx/functions/fnc_calculate_truing_drop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the truing drop and updates the output fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _parseInput = _this; diff --git a/addons/atragmx/functions/fnc_can_show.sqf b/addons/atragmx/functions/fnc_can_show.sqf index bf05edee98..6d3ed1f6ec 100644 --- a/addons/atragmx/functions/fnc_can_show.sqf +++ b/addons/atragmx/functions/fnc_can_show.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Authors: Ruthberg * Tests if the ATragMX dialog can be shown @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" (("ACE_ATragMX" in (uniformItems ACE_player)) || ("ACE_ATragMX" in (vestItems ACE_player))) && !(underwater ACE_player); diff --git a/addons/atragmx/functions/fnc_change_gun.sqf b/addons/atragmx/functions/fnc_change_gun.sqf index 53167f87b1..9b3863420b 100644 --- a/addons/atragmx/functions/fnc_change_gun.sqf +++ b/addons/atragmx/functions/fnc_change_gun.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Selects a new gun profile and updates the gun column and the result input/output fields @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_gunID", "_restoreMemory", "_updateDisplay"]; diff --git a/addons/atragmx/functions/fnc_change_target_slot.sqf b/addons/atragmx/functions/fnc_change_target_slot.sqf index 6fd3889309..71118748d9 100644 --- a/addons/atragmx/functions/fnc_change_target_slot.sqf +++ b/addons/atragmx/functions/fnc_change_target_slot.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Selects a target slot (A, B, C or D) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(currentTarget) = 0 max _this min 3; diff --git a/addons/atragmx/functions/fnc_clear_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_clear_c1_ballistic_coefficient_data.sqf index a795b74c70..22aa0ac3f8 100644 --- a/addons/atragmx/functions/fnc_clear_c1_ballistic_coefficient_data.sqf +++ b/addons/atragmx/functions/fnc_clear_c1_ballistic_coefficient_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Clears the c1 ballistic coefficient data fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Distances {ctrlSetText [_x, "0"]} forEach [170021, 170022, 170023, 170024, 170025, 170026, 170027]; diff --git a/addons/atragmx/functions/fnc_clear_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_clear_muzzle_velocity_data.sqf index 6f4472c550..4e686202e1 100644 --- a/addons/atragmx/functions/fnc_clear_muzzle_velocity_data.sqf +++ b/addons/atragmx/functions/fnc_clear_muzzle_velocity_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Clears the muzzle velocity data fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Temperatures {ctrlSetText [_x, "0"]} forEach [160021, 160022, 160023, 160024, 160025, 160026, 160027]; diff --git a/addons/atragmx/functions/fnc_clear_user_data.sqf b/addons/atragmx/functions/fnc_clear_user_data.sqf index 727c8da107..e166b56880 100644 --- a/addons/atragmx/functions/fnc_clear_user_data.sqf +++ b/addons/atragmx/functions/fnc_clear_user_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Removes all user data from the profileNamespace @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" profileNamespace setVariable ["ACE_ATragMX_gunList", nil]; diff --git a/addons/atragmx/functions/fnc_create_dialog.sqf b/addons/atragmx/functions/fnc_create_dialog.sqf index c342bb1eb0..2b1975b567 100644 --- a/addons/atragmx/functions/fnc_create_dialog.sqf +++ b/addons/atragmx/functions/fnc_create_dialog.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Creates the ATragMX dialog @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define __dsp (uiNamespace getVariable "ATragMX_Display") #define __ctrlBackground (__dsp displayCtrl 720000) diff --git a/addons/atragmx/functions/fnc_cycle_gun_list.sqf b/addons/atragmx/functions/fnc_cycle_gun_list.sqf index 550bc624f2..7d0c6b5ab4 100644 --- a/addons/atragmx/functions/fnc_cycle_gun_list.sqf +++ b/addons/atragmx/functions/fnc_cycle_gun_list.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Cycles through the gun list @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!(GVAR(showMainPage) || GVAR(showGunList))) exitWith {}; diff --git a/addons/atragmx/functions/fnc_cycle_image_size_units.sqf b/addons/atragmx/functions/fnc_cycle_image_size_units.sqf index 2981a9a73e..70b35ec58c 100644 --- a/addons/atragmx/functions/fnc_cycle_image_size_units.sqf +++ b/addons/atragmx/functions/fnc_cycle_image_size_units.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Cycles through the image size units @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(rangeAssistImageSizeUnit) = (GVAR(rangeAssistImageSizeUnit) + 1) % (count GVAR(rangeAssistImageSizeUnits)); ctrlSetText [7015, GVAR(rangeAssistImageSizeUnits) select GVAR(rangeAssistImageSizeUnit)]; diff --git a/addons/atragmx/functions/fnc_cycle_num_ticks_units.sqf b/addons/atragmx/functions/fnc_cycle_num_ticks_units.sqf index fc4746ee56..65361b9860 100644 --- a/addons/atragmx/functions/fnc_cycle_num_ticks_units.sqf +++ b/addons/atragmx/functions/fnc_cycle_num_ticks_units.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Cycles through the num ticks units @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(speedAssistNumTicksUnit) = (GVAR(speedAssistNumTicksUnit) + 1) % (count GVAR(speedAssistNumTicksUnits)); ctrlSetText [8009, GVAR(speedAssistNumTicksUnits) select GVAR(speedAssistNumTicksUnit)]; diff --git a/addons/atragmx/functions/fnc_cycle_range_card_columns.sqf b/addons/atragmx/functions/fnc_cycle_range_card_columns.sqf index dfba1f0574..b9432996cb 100644 --- a/addons/atragmx/functions/fnc_cycle_range_card_columns.sqf +++ b/addons/atragmx/functions/fnc_cycle_range_card_columns.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Cycles through the range card columns @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(rangeCardCurrentColumn) = (GVAR(rangeCardCurrentColumn) + 1) % (count GVAR(rangeCardLastColumns)); diff --git a/addons/atragmx/functions/fnc_cycle_scope_unit.sqf b/addons/atragmx/functions/fnc_cycle_scope_unit.sqf index a2020f4147..74c5a37dd4 100644 --- a/addons/atragmx/functions/fnc_cycle_scope_unit.sqf +++ b/addons/atragmx/functions/fnc_cycle_scope_unit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Cycles through the scope units @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(currentScopeUnit) = (GVAR(currentScopeUnit) + 1) % (count GVAR(scopeUnits)); GVAR(workingMemory) set [6, GVAR(currentScopeUnit)]; diff --git a/addons/atragmx/functions/fnc_cycle_target_size_units.sqf b/addons/atragmx/functions/fnc_cycle_target_size_units.sqf index 267d4d5772..36165ddae5 100644 --- a/addons/atragmx/functions/fnc_cycle_target_size_units.sqf +++ b/addons/atragmx/functions/fnc_cycle_target_size_units.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Cycles through the target size units @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(rangeAssistTargetSizeUnit) = (GVAR(rangeAssistTargetSizeUnit) + 1) % (count GVAR(rangeAssistTargetSizeUnits)); ctrlSetText [7014, GVAR(rangeAssistTargetSizeUnits) select GVAR(rangeAssistTargetSizeUnit)]; diff --git a/addons/atragmx/functions/fnc_cycle_target_speed_direction.sqf b/addons/atragmx/functions/fnc_cycle_target_speed_direction.sqf index e1e8282440..42d3232d54 100644 --- a/addons/atragmx/functions/fnc_cycle_target_speed_direction.sqf +++ b/addons/atragmx/functions/fnc_cycle_target_speed_direction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Cycles through the target directions left/right @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if ((ctrlText 140051) == ">") then { ctrlSetText [140051, "<"]; diff --git a/addons/atragmx/functions/fnc_delete_gun.sqf b/addons/atragmx/functions/fnc_delete_gun.sqf index 55548527f1..b5c209717d 100644 --- a/addons/atragmx/functions/fnc_delete_gun.sqf +++ b/addons/atragmx/functions/fnc_delete_gun.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Deletes the currently selected gun profile from the profileNamespace @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _index = lbCurSel 6000; diff --git a/addons/atragmx/functions/fnc_evaluate_option_menu_input.sqf b/addons/atragmx/functions/fnc_evaluate_option_menu_input.sqf index 2e4c9ef023..bcbd2b87c5 100644 --- a/addons/atragmx/functions/fnc_evaluate_option_menu_input.sqf +++ b/addons/atragmx/functions/fnc_evaluate_option_menu_input.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Evalutes input from the option menu @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_optionID"]; diff --git a/addons/atragmx/functions/fnc_init.sqf b/addons/atragmx/functions/fnc_init.sqf index 28b5202670..2dcd34d493 100644 --- a/addons/atragmx/functions/fnc_init.sqf +++ b/addons/atragmx/functions/fnc_init.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Inits all global variables with the default values @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(workingMemory) = +(GVAR(gunList) select 0); diff --git a/addons/atragmx/functions/fnc_initGunList.sqf b/addons/atragmx/functions/fnc_initGunList.sqf index 2e2bbd15bd..3ffcaf976c 100644 --- a/addons/atragmx/functions/fnc_initGunList.sqf +++ b/addons/atragmx/functions/fnc_initGunList.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Inits the gun list from user profile @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" LOG_2("Trying to load gunlist from profile [Version: %1][Count: %2]", profileNamespace getVariable [ARR_2(QGVAR(profileNamespaceVersion), 'none')], count (profileNamespace getVariable [ARR_2(QGVAR(gunList), [])])); diff --git a/addons/atragmx/functions/fnc_insert_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_insert_c1_ballistic_coefficient_data.sqf index ba5a781813..69d23b4e43 100644 --- a/addons/atragmx/functions/fnc_insert_c1_ballistic_coefficient_data.sqf +++ b/addons/atragmx/functions/fnc_insert_c1_ballistic_coefficient_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Inserts entry in the c1 ballistic coefficient vs. distance interpolation table @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_transonicRange", "_subsonicRange", "_c1"]; diff --git a/addons/atragmx/functions/fnc_insert_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_insert_muzzle_velocity_data.sqf index 43cd936beb..0e508e37e1 100644 --- a/addons/atragmx/functions/fnc_insert_muzzle_velocity_data.sqf +++ b/addons/atragmx/functions/fnc_insert_muzzle_velocity_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Inserts entry in the muzzle velocity vs. temperature interpolation table @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_temperature", "_muzzleVelocity"]; diff --git a/addons/atragmx/functions/fnc_lookup_c1_ballistic_coefficient.sqf b/addons/atragmx/functions/fnc_lookup_c1_ballistic_coefficient.sqf index 43b6da006f..3d0b348874 100644 --- a/addons/atragmx/functions/fnc_lookup_c1_ballistic_coefficient.sqf +++ b/addons/atragmx/functions/fnc_lookup_c1_ballistic_coefficient.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Lookup the correct C1 ballistic coefficient in the c1 ballistic coefficient vs. distance interpolation table @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_targetRange"]; diff --git a/addons/atragmx/functions/fnc_on_close_dialog.sqf b/addons/atragmx/functions/fnc_on_close_dialog.sqf index 1c96828b1a..d9ebf1cb00 100644 --- a/addons/atragmx/functions/fnc_on_close_dialog.sqf +++ b/addons/atragmx/functions/fnc_on_close_dialog.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * On close Dialog @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - uiNamespace setVariable ['ATragMX_Display', nil]; GVAR(active) = false; [GVAR(DialogPFH)] call CBA_fnc_removePerFrameHandler; diff --git a/addons/atragmx/functions/fnc_parse_input.sqf b/addons/atragmx/functions/fnc_parse_input.sqf index 3ff40bbbcc..d03b8bd186 100644 --- a/addons/atragmx/functions/fnc_parse_input.sqf +++ b/addons/atragmx/functions/fnc_parse_input.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Parses all input fields in the gun-, atmosphere- and target column, the result input fields and the muzzle velocity data input fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Muzzle velocity vs. temperature interpolation data { diff --git a/addons/atragmx/functions/fnc_read_gun_list_entries_from_config.sqf b/addons/atragmx/functions/fnc_read_gun_list_entries_from_config.sqf index 4d99a5637f..3ae566557b 100644 --- a/addons/atragmx/functions/fnc_read_gun_list_entries_from_config.sqf +++ b/addons/atragmx/functions/fnc_read_gun_list_entries_from_config.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Reads gun list entries from the config and appends them to the gun list @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _validate_preset = { private _valid = true; diff --git a/addons/atragmx/functions/fnc_recalculate_c1_ballistic_coefficient.sqf b/addons/atragmx/functions/fnc_recalculate_c1_ballistic_coefficient.sqf index e8bd219159..273d73a3e3 100644 --- a/addons/atragmx/functions/fnc_recalculate_c1_ballistic_coefficient.sqf +++ b/addons/atragmx/functions/fnc_recalculate_c1_ballistic_coefficient.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Recalculates the c1 ballistic coefficient based on the current target range @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_parseInput", "_updateDisplay"]; diff --git a/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf b/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf index aa1ab6d23f..c46cd9ab16 100644 --- a/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf +++ b/addons/atragmx/functions/fnc_recalculate_muzzle_velocity.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Recalculates the muzzle velocity based on the muzzle velocity vs. temperature interpolation input @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_parseInput", "_updateDisplay"]; diff --git a/addons/atragmx/functions/fnc_reset_relative_click_memory.sqf b/addons/atragmx/functions/fnc_reset_relative_click_memory.sqf index 85d8ff6bc6..4a847123df 100644 --- a/addons/atragmx/functions/fnc_reset_relative_click_memory.sqf +++ b/addons/atragmx/functions/fnc_reset_relative_click_memory.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Resets the relative click memory and updates the result input/output fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(workingMemory) set [10, 0]; GVAR(workingMemory) set [11, 0]; diff --git a/addons/atragmx/functions/fnc_restore_atmo_default.sqf b/addons/atragmx/functions/fnc_restore_atmo_default.sqf index d644f81630..9b03c337b2 100644 --- a/addons/atragmx/functions/fnc_restore_atmo_default.sqf +++ b/addons/atragmx/functions/fnc_restore_atmo_default.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Restores the atmospheric data defaults @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(atmosphereModeTBH) = true; GVAR(altitude) = 0; diff --git a/addons/atragmx/functions/fnc_restore_truing_drop.sqf b/addons/atragmx/functions/fnc_restore_truing_drop.sqf index a3fb516f23..301c94f7a8 100644 --- a/addons/atragmx/functions/fnc_restore_truing_drop.sqf +++ b/addons/atragmx/functions/fnc_restore_truing_drop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Restores the truing drop defaults @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _updateDisplay = _this; diff --git a/addons/atragmx/functions/fnc_restore_user_data.sqf b/addons/atragmx/functions/fnc_restore_user_data.sqf index a90c537f91..beb2c50c4d 100644 --- a/addons/atragmx/functions/fnc_restore_user_data.sqf +++ b/addons/atragmx/functions/fnc_restore_user_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Reads user data from profileNamespace @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(currentUnit) = 0 max (profileNamespace getVariable ["ACE_ATragMX_currentUnit", 2]) min 2; [(profileNamespace getVariable ["ACE_ATragMX_currentGun", 0]), true, false] call FUNC(change_gun); diff --git a/addons/atragmx/functions/fnc_save_gun.sqf b/addons/atragmx/functions/fnc_save_gun.sqf index 45558d3de3..2560dbd42b 100644 --- a/addons/atragmx/functions/fnc_save_gun.sqf +++ b/addons/atragmx/functions/fnc_save_gun.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Saves the currently select gun profile into the profileNamespace @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _index = 0 max (lbCurSel 6000); diff --git a/addons/atragmx/functions/fnc_shift_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_shift_c1_ballistic_coefficient_data.sqf index 89667e25b9..95ac59b705 100644 --- a/addons/atragmx/functions/fnc_shift_c1_ballistic_coefficient_data.sqf +++ b/addons/atragmx/functions/fnc_shift_c1_ballistic_coefficient_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shifts all c1 ballistic coefficient entries in the c1 ballistic coefficient vs. distance interpolation table @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (_this == 0) exitWith {}; diff --git a/addons/atragmx/functions/fnc_shift_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_shift_muzzle_velocity_data.sqf index 75fcc9c3a6..4d4e4d2b22 100644 --- a/addons/atragmx/functions/fnc_shift_muzzle_velocity_data.sqf +++ b/addons/atragmx/functions/fnc_shift_muzzle_velocity_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shifts all muzzle velocity entries in the muzzle velocity vs. temperature interpolation table @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (_this == 0) exitWith {}; diff --git a/addons/atragmx/functions/fnc_show_add_new_gun.sqf b/addons/atragmx/functions/fnc_show_add_new_gun.sqf index a5d4fd8b8b..a00860490b 100644 --- a/addons/atragmx/functions/fnc_show_add_new_gun.sqf +++ b/addons/atragmx/functions/fnc_show_add_new_gun.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides add new gun controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showAddNewGun) = _this; diff --git a/addons/atragmx/functions/fnc_show_atmo_env_data.sqf b/addons/atragmx/functions/fnc_show_atmo_env_data.sqf index 75dcaad502..b07843e18a 100644 --- a/addons/atragmx/functions/fnc_show_atmo_env_data.sqf +++ b/addons/atragmx/functions/fnc_show_atmo_env_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the atmosphere and environmental data controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showAtmoEnvData) = _this; diff --git a/addons/atragmx/functions/fnc_show_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_show_c1_ballistic_coefficient_data.sqf index 797f0498fe..34f598ac6c 100644 --- a/addons/atragmx/functions/fnc_show_c1_ballistic_coefficient_data.sqf +++ b/addons/atragmx/functions/fnc_show_c1_ballistic_coefficient_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the c1 ballistic coefficient data controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showC1BallisticCoefficientData) = _this; diff --git a/addons/atragmx/functions/fnc_show_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_show_gun_ammo_data.sqf index c6fb288acc..108108a14c 100644 --- a/addons/atragmx/functions/fnc_show_gun_ammo_data.sqf +++ b/addons/atragmx/functions/fnc_show_gun_ammo_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the gun ammo data controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showGunAmmoData) = _this; diff --git a/addons/atragmx/functions/fnc_show_gun_list.sqf b/addons/atragmx/functions/fnc_show_gun_list.sqf index e6c8156d26..714e9a0d12 100644 --- a/addons/atragmx/functions/fnc_show_gun_list.sqf +++ b/addons/atragmx/functions/fnc_show_gun_list.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the gun list controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showGunList) = _this; diff --git a/addons/atragmx/functions/fnc_show_main_page.sqf b/addons/atragmx/functions/fnc_show_main_page.sqf index 6b2259c72a..7b12af4439 100644 --- a/addons/atragmx/functions/fnc_show_main_page.sqf +++ b/addons/atragmx/functions/fnc_show_main_page.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the main menu controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showMainPage) = _this; diff --git a/addons/atragmx/functions/fnc_show_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_show_muzzle_velocity_data.sqf index 20c7bf1826..e12263d36f 100644 --- a/addons/atragmx/functions/fnc_show_muzzle_velocity_data.sqf +++ b/addons/atragmx/functions/fnc_show_muzzle_velocity_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the muzzle velocity data controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showMuzzleVelocityData) = _this; diff --git a/addons/atragmx/functions/fnc_show_range_card.sqf b/addons/atragmx/functions/fnc_show_range_card.sqf index d2dc368bb4..02f65164bb 100644 --- a/addons/atragmx/functions/fnc_show_range_card.sqf +++ b/addons/atragmx/functions/fnc_show_range_card.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the range card controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showRangeCard) = _this; diff --git a/addons/atragmx/functions/fnc_show_range_card_setup.sqf b/addons/atragmx/functions/fnc_show_range_card_setup.sqf index 6597e4ee7e..183e115b1b 100644 --- a/addons/atragmx/functions/fnc_show_range_card_setup.sqf +++ b/addons/atragmx/functions/fnc_show_range_card_setup.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the range card setup controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showRangeCardSetup) = _this; diff --git a/addons/atragmx/functions/fnc_show_solution_setup.sqf b/addons/atragmx/functions/fnc_show_solution_setup.sqf index 83476228f4..4eafd38a31 100644 --- a/addons/atragmx/functions/fnc_show_solution_setup.sqf +++ b/addons/atragmx/functions/fnc_show_solution_setup.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the solution setup controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showSolutionSetup) = _this; diff --git a/addons/atragmx/functions/fnc_show_target_data.sqf b/addons/atragmx/functions/fnc_show_target_data.sqf index 7a0845f862..6987047cbf 100644 --- a/addons/atragmx/functions/fnc_show_target_data.sqf +++ b/addons/atragmx/functions/fnc_show_target_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the target data controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showTargetData) = _this; diff --git a/addons/atragmx/functions/fnc_show_target_range_assist.sqf b/addons/atragmx/functions/fnc_show_target_range_assist.sqf index 0f6c7bad04..89453c9134 100644 --- a/addons/atragmx/functions/fnc_show_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_show_target_range_assist.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the target range assist controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showTargetRangeAssist) = _this; diff --git a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf index ac99a4e76e..267c3676b6 100644 --- a/addons/atragmx/functions/fnc_show_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_show_target_speed_assist.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the target speed assist controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showTargetSpeedAssist) = _this; diff --git a/addons/atragmx/functions/fnc_show_target_speed_assist_timer.sqf b/addons/atragmx/functions/fnc_show_target_speed_assist_timer.sqf index cb28390ff6..fca074547f 100644 --- a/addons/atragmx/functions/fnc_show_target_speed_assist_timer.sqf +++ b/addons/atragmx/functions/fnc_show_target_speed_assist_timer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the target speed assist timer controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showTargetSpeedAssistTimer) = _this; diff --git a/addons/atragmx/functions/fnc_show_truing_drop.sqf b/addons/atragmx/functions/fnc_show_truing_drop.sqf index 644fe834b6..ca69346c49 100644 --- a/addons/atragmx/functions/fnc_show_truing_drop.sqf +++ b/addons/atragmx/functions/fnc_show_truing_drop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows/Hides the truing drop controls @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showTruingDrop) = _this; diff --git a/addons/atragmx/functions/fnc_sord.sqf b/addons/atragmx/functions/fnc_sord.sqf index c6f77f748b..a6c3d2b5b8 100644 --- a/addons/atragmx/functions/fnc_sord.sqf +++ b/addons/atragmx/functions/fnc_sord.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Handles incoming data packets from the Vectronix Vector LRF @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" if (!GVAR(initialised)) exitWith {}; diff --git a/addons/atragmx/functions/fnc_store_gun_list.sqf b/addons/atragmx/functions/fnc_store_gun_list.sqf index b3969837d2..d5c3d7657d 100644 --- a/addons/atragmx/functions/fnc_store_gun_list.sqf +++ b/addons/atragmx/functions/fnc_store_gun_list.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Saves the persistent gun list entries into profileNamespace @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _gunList = []; { diff --git a/addons/atragmx/functions/fnc_store_user_data.sqf b/addons/atragmx/functions/fnc_store_user_data.sqf index 264ac07458..09b710e1d4 100644 --- a/addons/atragmx/functions/fnc_store_user_data.sqf +++ b/addons/atragmx/functions/fnc_store_user_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Saves user data into profileNamespace @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" profileNamespace setVariable ["ACE_ATragMX_profileNamespaceVersion", ATRAGMX_PROFILE_NAMESPACE_VERSION]; diff --git a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf index d9ae84e1ae..69be94dd8f 100644 --- a/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf +++ b/addons/atragmx/functions/fnc_target_speed_assist_timer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows and starts the target speed assist timer @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if !(ctrlVisible 9000) then { diff --git a/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf b/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf index 5e420b41f8..6f2fc11e27 100644 --- a/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf +++ b/addons/atragmx/functions/fnc_toggle_atmo_env_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the atmospheric data screen on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (ctrlVisible 13000) then { false call FUNC(show_atmo_env_data); diff --git a/addons/atragmx/functions/fnc_toggle_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_toggle_c1_ballistic_coefficient_data.sqf index c83e21a872..088658b747 100644 --- a/addons/atragmx/functions/fnc_toggle_c1_ballistic_coefficient_data.sqf +++ b/addons/atragmx/functions/fnc_toggle_c1_ballistic_coefficient_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the c1 ballistic coefficient data screen on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {}; diff --git a/addons/atragmx/functions/fnc_toggle_coriolis.sqf b/addons/atragmx/functions/fnc_toggle_coriolis.sqf index a711d2a55e..aad845ce35 100644 --- a/addons/atragmx/functions/fnc_toggle_coriolis.sqf +++ b/addons/atragmx/functions/fnc_toggle_coriolis.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the coriolis and spin drift output on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(showCoriolis) = !GVAR(showCoriolis); true call FUNC(show_main_page); diff --git a/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf index 332c0f1aba..1be813fec6 100644 --- a/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf +++ b/addons/atragmx/functions/fnc_toggle_gun_ammo_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the gun ammo data screen on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (ctrlVisible 12000) then { false call FUNC(show_gun_ammo_data); diff --git a/addons/atragmx/functions/fnc_toggle_gun_list.sqf b/addons/atragmx/functions/fnc_toggle_gun_list.sqf index 6ff6e3b6f4..291faf98a4 100644 --- a/addons/atragmx/functions/fnc_toggle_gun_list.sqf +++ b/addons/atragmx/functions/fnc_toggle_gun_list.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the gun list screen on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (ctrlVisible 6000) then { false call FUNC(show_gun_list); diff --git a/addons/atragmx/functions/fnc_toggle_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_toggle_muzzle_velocity_data.sqf index d00992d856..64aadc62cb 100644 --- a/addons/atragmx/functions/fnc_toggle_muzzle_velocity_data.sqf +++ b/addons/atragmx/functions/fnc_toggle_muzzle_velocity_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the muzzle velocity data screen on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {}; diff --git a/addons/atragmx/functions/fnc_toggle_option_menu.sqf b/addons/atragmx/functions/fnc_toggle_option_menu.sqf index f7d7f06a13..c39846f466 100644 --- a/addons/atragmx/functions/fnc_toggle_option_menu.sqf +++ b/addons/atragmx/functions/fnc_toggle_option_menu.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the option menu on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (ctrlVisible 3001) then { if (_this) then { diff --git a/addons/atragmx/functions/fnc_toggle_range_card.sqf b/addons/atragmx/functions/fnc_toggle_range_card.sqf index 4e7ea4d511..f34b60c146 100644 --- a/addons/atragmx/functions/fnc_toggle_range_card.sqf +++ b/addons/atragmx/functions/fnc_toggle_range_card.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the range card screen on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (ctrlVisible 5006) then { false call FUNC(show_range_card); diff --git a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf index e5d68c3933..fb98cfcb0e 100644 --- a/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf +++ b/addons/atragmx/functions/fnc_toggle_range_card_setup.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the range card setup screen on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (ctrlVisible 10000) then { false call FUNC(show_range_card_setup); diff --git a/addons/atragmx/functions/fnc_toggle_solution_setup.sqf b/addons/atragmx/functions/fnc_toggle_solution_setup.sqf index f548df689f..11c3c0f4bc 100644 --- a/addons/atragmx/functions/fnc_toggle_solution_setup.sqf +++ b/addons/atragmx/functions/fnc_toggle_solution_setup.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the solution setup screen on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (ctrlVisible 15000) then { false call FUNC(show_solution_setup); diff --git a/addons/atragmx/functions/fnc_toggle_target_data.sqf b/addons/atragmx/functions/fnc_toggle_target_data.sqf index 863af6511f..ecfcab2c41 100644 --- a/addons/atragmx/functions/fnc_toggle_target_data.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the target data screen on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (ctrlVisible 14000) then { false call FUNC(show_target_data); diff --git a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf index ad593830f9..ac1934ee3e 100644 --- a/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_range_assist.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the target range assist screen on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (ctrlVisible 7000) then { false call FUNC(show_target_range_assist); diff --git a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf index 7dadd8be03..47d14a32d9 100644 --- a/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf +++ b/addons/atragmx/functions/fnc_toggle_target_speed_assist.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the target speed assist screen on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (ctrlVisible 8000) then { false call FUNC(show_target_speed_assist); diff --git a/addons/atragmx/functions/fnc_toggle_truing_drop.sqf b/addons/atragmx/functions/fnc_toggle_truing_drop.sqf index 9865005c78..dbacceb52f 100644 --- a/addons/atragmx/functions/fnc_toggle_truing_drop.sqf +++ b/addons/atragmx/functions/fnc_toggle_truing_drop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Toggles the truing drop screen on/off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!(missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false])) exitWith {}; diff --git a/addons/atragmx/functions/fnc_trim_gun_name.sqf b/addons/atragmx/functions/fnc_trim_gun_name.sqf index 36344d6dfa..46f20bede6 100644 --- a/addons/atragmx/functions/fnc_trim_gun_name.sqf +++ b/addons/atragmx/functions/fnc_trim_gun_name.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Trims the gun name input field @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" ctrlSetText [11001, (ctrlText 11001) select [0, 14]]; diff --git a/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf b/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf index dfa41ea0b4..8a6046d1d8 100644 --- a/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf +++ b/addons/atragmx/functions/fnc_true_c1_ballistic_coefficient.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Trues the c1 ballistic coefficient @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _referenceDrop = GVAR(truingDropDropData) select 0; private _actualDrop = GVAR(truingDropDropData) select 2; diff --git a/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf b/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf index db907aa29d..cee3af2536 100644 --- a/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf +++ b/addons/atragmx/functions/fnc_true_muzzle_velocity.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Trues the muzzle velocity @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _referenceDrop = GVAR(truingDropDropData) select 0; private _actualDrop = GVAR(truingDropDropData) select 1; diff --git a/addons/atragmx/functions/fnc_update_atmo_env_data.sqf b/addons/atragmx/functions/fnc_update_atmo_env_data.sqf index e8e805c0ab..27a1e1510b 100644 --- a/addons/atragmx/functions/fnc_update_atmo_env_data.sqf +++ b/addons/atragmx/functions/fnc_update_atmo_env_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the atmospheric data fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 13007); diff --git a/addons/atragmx/functions/fnc_update_atmo_selection.sqf b/addons/atragmx/functions/fnc_update_atmo_selection.sqf index cd808326f8..caa7c206cc 100644 --- a/addons/atragmx/functions/fnc_update_atmo_selection.sqf +++ b/addons/atragmx/functions/fnc_update_atmo_selection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the atmospheric data input method @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" ((uiNamespace getVariable "ATragMX_Display") displayCtrl 13001) ctrlEnable true; ((uiNamespace getVariable "ATragMX_Display") displayCtrl 13002) ctrlEnable true; diff --git a/addons/atragmx/functions/fnc_update_atmosphere.sqf b/addons/atragmx/functions/fnc_update_atmosphere.sqf index d54daed532..438dfe04f2 100644 --- a/addons/atragmx/functions/fnc_update_atmosphere.sqf +++ b/addons/atragmx/functions/fnc_update_atmosphere.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates all atmosphere column input fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (GVAR(currentUnit) == 2) then { ctrlSetText [200, Str(Round(GVAR(temperature) * 10) / 10)]; diff --git a/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf b/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf index 5095ee0d96..a7a20d31df 100644 --- a/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf +++ b/addons/atragmx/functions/fnc_update_c1_ballistic_coefficient_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the c1 ballistic coefficient data fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Distances if (GVAR(currentUnit) != 1) then { diff --git a/addons/atragmx/functions/fnc_update_gun.sqf b/addons/atragmx/functions/fnc_update_gun.sqf index 5e081b47ee..2df4bbe1ee 100644 --- a/addons/atragmx/functions/fnc_update_gun.sqf +++ b/addons/atragmx/functions/fnc_update_gun.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates all gun column input fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" ctrlSetText [1000, GVAR(workingMemory) select 0]; if (GVAR(currentUnit) != 2) then { diff --git a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf index 4beaf53e0d..3a2c1a8106 100644 --- a/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf +++ b/addons/atragmx/functions/fnc_update_gun_ammo_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the gun ammo data fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 12008); diff --git a/addons/atragmx/functions/fnc_update_inclination_angle.sqf b/addons/atragmx/functions/fnc_update_inclination_angle.sqf index 82813282f7..f0150c1cfe 100644 --- a/addons/atragmx/functions/fnc_update_inclination_angle.sqf +++ b/addons/atragmx/functions/fnc_update_inclination_angle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the inclination angle input fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _inclinationAngleCosine = 0.5 max parseNumber(ctrlText 140041) min 1; private _inclinationAngleDegree = -60 max parseNumber(ctrlText 140040) min 60; diff --git a/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf b/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf index 466d83cc4c..55453ce6e9 100644 --- a/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf +++ b/addons/atragmx/functions/fnc_update_muzzle_velocity_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the muzzle velocity data fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (GVAR(currentUnit) == 2) then { // Temperatures diff --git a/addons/atragmx/functions/fnc_update_range_card.sqf b/addons/atragmx/functions/fnc_update_range_card.sqf index 2f4aa3c7a2..3af37cf3f6 100644 --- a/addons/atragmx/functions/fnc_update_range_card.sqf +++ b/addons/atragmx/functions/fnc_update_range_card.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the range card listbox content @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _lastColumnOutput = ""; diff --git a/addons/atragmx/functions/fnc_update_relative_click_memory.sqf b/addons/atragmx/functions/fnc_update_relative_click_memory.sqf index fe09d46cf7..ae847d6c13 100644 --- a/addons/atragmx/functions/fnc_update_relative_click_memory.sqf +++ b/addons/atragmx/functions/fnc_update_relative_click_memory.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the relative click memory @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(workingMemory) set [10, (GVAR(elevationOutput) select GVAR(currentTarget))]; GVAR(workingMemory) set [11, (GVAR(windage1Output) select GVAR(currentTarget))]; diff --git a/addons/atragmx/functions/fnc_update_result.sqf b/addons/atragmx/functions/fnc_update_result.sqf index 1dc2c6204e..21c192549c 100644 --- a/addons/atragmx/functions/fnc_update_result.sqf +++ b/addons/atragmx/functions/fnc_update_result.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the result input and output fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _elevationAbs = GVAR(elevationOutput) select GVAR(currentTarget); private _elevationRel = 0; diff --git a/addons/atragmx/functions/fnc_update_scope_unit.sqf b/addons/atragmx/functions/fnc_update_scope_unit.sqf index b66d0885bb..05f7f85b93 100644 --- a/addons/atragmx/functions/fnc_update_scope_unit.sqf +++ b/addons/atragmx/functions/fnc_update_scope_unit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the scope unit fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" ctrlSetText [2000, GVAR(scopeUnits) select GVAR(currentScopeUnit)]; ctrlSetText [2001, Str(GVAR(currentScopeClickNumber))]; diff --git a/addons/atragmx/functions/fnc_update_solution_setup.sqf b/addons/atragmx/functions/fnc_update_solution_setup.sqf index 8850c937a5..37ea36c069 100644 --- a/addons/atragmx/functions/fnc_update_solution_setup.sqf +++ b/addons/atragmx/functions/fnc_update_solution_setup.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates all solution setup input fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" {((uiNamespace getVariable "ATragMX_Display") displayCtrl _x) ctrlEnable true} forEach [15001, 15002, 15003, 15004, 15005, 15006, 15008, 15009, 15010]; diff --git a/addons/atragmx/functions/fnc_update_target.sqf b/addons/atragmx/functions/fnc_update_target.sqf index c457a5cc21..72e6e1f208 100644 --- a/addons/atragmx/functions/fnc_update_target.sqf +++ b/addons/atragmx/functions/fnc_update_target.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates all target column input fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (GVAR(showWind2)) then { if (GVAR(currentUnit) != 2) then { diff --git a/addons/atragmx/functions/fnc_update_target_data.sqf b/addons/atragmx/functions/fnc_update_target_data.sqf index 3cb6c24c9c..ce4b5cb924 100644 --- a/addons/atragmx/functions/fnc_update_target_data.sqf +++ b/addons/atragmx/functions/fnc_update_target_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates all target column input fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" ctrlSetText [140000, Str(Round((GVAR(latitude) select GVAR(currentTarget)) * 100) / 100)]; ctrlSetText [140010, Str(Round((GVAR(directionOfFire) select GVAR(currentTarget)) * 100) / 100)]; diff --git a/addons/atragmx/functions/fnc_update_target_selection.sqf b/addons/atragmx/functions/fnc_update_target_selection.sqf index 7ae6256f33..55f39c80fe 100644 --- a/addons/atragmx/functions/fnc_update_target_selection.sqf +++ b/addons/atragmx/functions/fnc_update_target_selection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates all input fields based on the currently selected target @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" {((uiNamespace getVariable "ATragMX_Display") displayCtrl _x) ctrlEnable true} forEach [500, 501, 502, 503]; diff --git a/addons/atragmx/functions/fnc_update_truing_drop_data.sqf b/addons/atragmx/functions/fnc_update_truing_drop_data.sqf index cd1fa9de68..d331523432 100644 --- a/addons/atragmx/functions/fnc_update_truing_drop_data.sqf +++ b/addons/atragmx/functions/fnc_update_truing_drop_data.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the truing drop data fields @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (GVAR(currentUnit) == 2) then { ctrlSetText [18011, Str(Round(GVAR(truingDropRangeData) select 0))]; diff --git a/addons/atragmx/functions/fnc_update_truing_drop_selection.sqf b/addons/atragmx/functions/fnc_update_truing_drop_selection.sqf index e00876e4a1..f2fffd8fe3 100644 --- a/addons/atragmx/functions/fnc_update_truing_drop_selection.sqf +++ b/addons/atragmx/functions/fnc_update_truing_drop_selection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the truing drop input method @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define __dsp (uiNamespace getVariable "ATragMX_Display") diff --git a/addons/atragmx/functions/fnc_update_unit_selection.sqf b/addons/atragmx/functions/fnc_update_unit_selection.sqf index 2fc5400e27..ab3edb9256 100644 --- a/addons/atragmx/functions/fnc_update_unit_selection.sqf +++ b/addons/atragmx/functions/fnc_update_unit_selection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates all input fields based on the currently selected unit @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" ((uiNamespace getVariable "ATragMX_Display") displayCtrl 600) ctrlEnable true; ((uiNamespace getVariable "ATragMX_Display") displayCtrl 601) ctrlEnable true; diff --git a/addons/atragmx/functions/fnc_update_zero_range.sqf b/addons/atragmx/functions/fnc_update_zero_range.sqf index 8a41e1c38e..4de6370591 100644 --- a/addons/atragmx/functions/fnc_update_zero_range.sqf +++ b/addons/atragmx/functions/fnc_update_zero_range.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the scope base angle based on the zero range input @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" [] call FUNC(parse_input); diff --git a/addons/attach/CfgVehicles.hpp b/addons/attach/CfgVehicles.hpp index 744a0db2ad..ce0d7df21a 100644 --- a/addons/attach/CfgVehicles.hpp +++ b/addons/attach/CfgVehicles.hpp @@ -77,17 +77,12 @@ class CfgVehicles { simulation = "nvmarker"; class NVGMarker { - diffuse[] = {0.006, 0.006, 0.006, 1}; - ambient[] = {0.005, 0.005, 0.005, 1}; - brightness = 0.1; + diffuse[]={0.015,0.015,0.015}; + ambient[]={0.001,0.001,0.001}; + brightness=0.45; name = "pozicni blik"; - drawLightSize = 0.1; - drawLightCenterSize = 0.003; activeLight = 0; blinking=1; - blinkingStartsOn=1; - blinkingPattern[] = {2,2}; - blinkingPatternGuarantee = false; dayLight = 0; onlyInNvg = 1; useFlare = 0; diff --git a/addons/attach/functions/fnc_attach.sqf b/addons/attach/functions/fnc_attach.sqf index 743b344c63..21652f296d 100644 --- a/addons/attach/functions/fnc_attach.sqf +++ b/addons/attach/functions/fnc_attach.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: eRazeri, esteldunedain, PabstMirror * Attach an item to the unit @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_attachToVehicle","_unit","_args", ["_silentScripted", false]]; _args params [["_itemClassname","", [""]]]; diff --git a/addons/attach/functions/fnc_canAttach.sqf b/addons/attach/functions/fnc_canAttach.sqf index d862088fcd..00e7b34e8a 100644 --- a/addons/attach/functions/fnc_canAttach.sqf +++ b/addons/attach/functions/fnc_canAttach.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if a unit can attach a specific item. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_attachToVehicle","_player","_args"]; _args params [["_itemClassname","", [""]]]; diff --git a/addons/attach/functions/fnc_canDetach.sqf b/addons/attach/functions/fnc_canDetach.sqf index bd9d7453cb..8ff4ef3249 100644 --- a/addons/attach/functions/fnc_canDetach.sqf +++ b/addons/attach/functions/fnc_canDetach.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if a unit has an item attached and if it can remove that item. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_attachToVehicle", "_unit"]; TRACE_2("params",_attachToVehicle,_unit); diff --git a/addons/attach/functions/fnc_detach.sqf b/addons/attach/functions/fnc_detach.sqf index 91763c0c4d..5ff12967ce 100644 --- a/addons/attach/functions/fnc_detach.sqf +++ b/addons/attach/functions/fnc_detach.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: eRazeri and esteldunedain * Detach an item from a unit @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_attachToVehicle","_unit"], TRACE_2("params",_attachToVehicle,_unit); diff --git a/addons/attach/functions/fnc_getChildrenActions.sqf b/addons/attach/functions/fnc_getChildrenActions.sqf index 050eec4021..22b4c28892 100644 --- a/addons/attach/functions/fnc_getChildrenActions.sqf +++ b/addons/attach/functions/fnc_getChildrenActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth de Wet (LH), PabstMirror, mharis001 * Returns children actions for attachable items. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "_player"]; TRACE_2("params",_target,_player); @@ -43,6 +43,6 @@ private _magazines = magazines _player; private _action = [_x, _displayName, _picture, {[{_this call FUNC(attach)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, _x] call EFUNC(interact_menu,createAction); _actions pushBack [_action, [], _target]; }; -} forEach ([_player, false] call CBA_fnc_uniqueUnitItems); +} forEach (_player call EFUNC(common,uniqueItems)); _actions diff --git a/addons/attach/functions/fnc_handleGetIn.sqf b/addons/attach/functions/fnc_handleGetIn.sqf index 0d39a00718..b2203958a0 100644 --- a/addons/attach/functions/fnc_handleGetIn.sqf +++ b/addons/attach/functions/fnc_handleGetIn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles when a unit gets in to a vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "", "_unit"]; TRACE_1("params",_unit); diff --git a/addons/attach/functions/fnc_handleGetOut.sqf b/addons/attach/functions/fnc_handleGetOut.sqf index 8eaebd6b21..4e1dac1e89 100644 --- a/addons/attach/functions/fnc_handleGetOut.sqf +++ b/addons/attach/functions/fnc_handleGetOut.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles when a unit gets in to a vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "", "_unit"]; TRACE_1("params",_unit); diff --git a/addons/attach/functions/fnc_handleKilled.sqf b/addons/attach/functions/fnc_handleKilled.sqf index 81c2d659d4..0aaf0b03cb 100644 --- a/addons/attach/functions/fnc_handleKilled.sqf +++ b/addons/attach/functions/fnc_handleKilled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles when vehicle or man is killed. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_deadUnit"]; TRACE_1("params",_deadUnit); diff --git a/addons/attach/functions/fnc_placeApprove.sqf b/addons/attach/functions/fnc_placeApprove.sqf index 9679e55ad2..d0101695b4 100644 --- a/addons/attach/functions/fnc_placeApprove.sqf +++ b/addons/attach/functions/fnc_placeApprove.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Pabst Mirror (based on Explosive attach by Garth de Wet (LH)) * Approves placement of the lightObject, scans for an appropriate location and attaches @@ -23,7 +24,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_attachToVehicle", "_itemClassname", "_itemVehClass", "_onAttachText", "_startingPosition"]; TRACE_6("params",_unit,_attachToVehicle,_itemClassname,_itemVehClass,_onAttachText,_startingPosition); diff --git a/addons/attach/stringtable.xml b/addons/attach/stringtable.xml index 04a93d53a6..252f25e4ed 100644 --- a/addons/attach/stringtable.xml +++ b/addons/attach/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/backpacks/functions/fnc_backpackOpened.sqf b/addons/backpacks/functions/fnc_backpackOpened.sqf index 0b94b391f0..92897d72f5 100644 --- a/addons/backpacks/functions/fnc_backpackOpened.sqf +++ b/addons/backpacks/functions/fnc_backpackOpened.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Someone opened your backpack. Play sound and camshake. Execute locally. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "_backpack"]; diff --git a/addons/backpacks/functions/fnc_isBackpack.sqf b/addons/backpacks/functions/fnc_isBackpack.sqf index 80550290f2..a101a514e9 100644 --- a/addons/backpacks/functions/fnc_isBackpack.sqf +++ b/addons/backpacks/functions/fnc_isBackpack.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if the given backpack is an actual backpack that can store items. Parachute, static weapon packs, etc. will return false. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_backpack", objNull, [objNull, ""]]]; diff --git a/addons/backpacks/functions/fnc_onOpenInventory.sqf b/addons/backpacks/functions/fnc_onOpenInventory.sqf index b229bbb111..bfb380efe2 100644 --- a/addons/backpacks/functions/fnc_onOpenInventory.sqf +++ b/addons/backpacks/functions/fnc_onOpenInventory.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle the open inventory event. Camshake and sound on target client. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_backpack"]; diff --git a/addons/ballistics/CfgMagazineWells.hpp b/addons/ballistics/CfgMagazineWells.hpp new file mode 100644 index 0000000000..39098f4c28 --- /dev/null +++ b/addons/ballistics/CfgMagazineWells.hpp @@ -0,0 +1,190 @@ +class CfgMagazineWells { + + class CBA_65x39_MX { + ADDON[] = { + "ACE_30Rnd_65x39_caseless_mag_Tracer_Dim", + "ACE_30Rnd_65x39_caseless_green_mag_Tracer_Dim" + }; + }; + class CBA_65x39_MX_XL { + ADDON[] = { + "ACE_100Rnd_65x39_caseless_mag_Tracer_Dim" + }; + }; + class CBA_65x39_Mk200 { + ADDON[] = { + "ACE_200Rnd_65x39_cased_Box_Tracer_Dim" + }; + }; + + class CBA_556x45_STANAG { + ADDON[] = { + "ACE_30Rnd_556x45_Stanag_M995_AP_mag", + "ACE_30Rnd_556x45_Stanag_Mk262_mag", + "ACE_30Rnd_556x45_Stanag_Mk318_mag", + "ACE_30Rnd_556x45_Stanag_Tracer_Dim" + }; + }; + class STANAG_556x45 { //Vanilla magwell + ADDON[] = { + "ACE_30Rnd_556x45_Stanag_M995_AP_mag", + "ACE_30Rnd_556x45_Stanag_Mk262_mag", + "ACE_30Rnd_556x45_Stanag_Mk318_mag", + "ACE_30Rnd_556x45_Stanag_Tracer_Dim" + }; + }; + + class CBA_762x51_M14 { + ADDON[] = { + "ACE_20Rnd_762x51_Mag_Tracer", + "ACE_20Rnd_762x51_Mag_Tracer_Dim", + "ACE_20Rnd_762x51_Mag_SD", + "ACE_10Rnd_762x51_M118LR_Mag", + "ACE_10Rnd_762x51_Mk316_Mod_0_Mag", + "ACE_10Rnd_762x51_Mk319_Mod_0_Mag", + "ACE_10Rnd_762x51_M993_AP_Mag", + "ACE_20Rnd_762x51_M118LR_Mag", + "ACE_20Rnd_762x51_Mk316_Mod_0_Mag", + "ACE_20Rnd_762x51_Mk319_Mod_0_Mag", + "ACE_20Rnd_762x51_M993_AP_Mag" + }; + }; + class CBA_762x51_HK417 { + ADDON[] = { + "ACE_20Rnd_762x51_Mag_Tracer", + "ACE_20Rnd_762x51_Mag_Tracer_Dim", + "ACE_20Rnd_762x51_Mag_SD", + "ACE_10Rnd_762x51_M118LR_Mag", + "ACE_10Rnd_762x51_Mk316_Mod_0_Mag", + "ACE_10Rnd_762x51_Mk319_Mod_0_Mag", + "ACE_10Rnd_762x51_M993_AP_Mag", + "ACE_20Rnd_762x51_M118LR_Mag", + "ACE_20Rnd_762x51_Mk316_Mod_0_Mag", + "ACE_20Rnd_762x51_Mk319_Mod_0_Mag", + "ACE_20Rnd_762x51_M993_AP_Mag" + }; + }; + class CBA_762x51_SR25 { + ADDON[] = { + "ACE_20Rnd_762x51_Mag_Tracer", + "ACE_20Rnd_762x51_Mag_Tracer_Dim", + "ACE_20Rnd_762x51_Mag_SD", + "ACE_10Rnd_762x51_M118LR_Mag", + "ACE_10Rnd_762x51_Mk316_Mod_0_Mag", + "ACE_10Rnd_762x51_Mk319_Mod_0_Mag", + "ACE_10Rnd_762x51_M993_AP_Mag", + "ACE_20Rnd_762x51_M118LR_Mag", + "ACE_20Rnd_762x51_Mk316_Mod_0_Mag", + "ACE_20Rnd_762x51_Mk319_Mod_0_Mag", + "ACE_20Rnd_762x51_M993_AP_Mag" + }; + }; + class CBA_762x51_G3 { + ADDON[] = { + "ACE_20Rnd_762x51_Mag_Tracer", + "ACE_20Rnd_762x51_Mag_Tracer_Dim", + "ACE_20Rnd_762x51_Mag_SD", + "ACE_10Rnd_762x51_M118LR_Mag", + "ACE_10Rnd_762x51_Mk316_Mod_0_Mag", + "ACE_10Rnd_762x51_Mk319_Mod_0_Mag", + "ACE_10Rnd_762x51_M993_AP_Mag", + "ACE_20Rnd_762x51_M118LR_Mag", + "ACE_20Rnd_762x51_Mk316_Mod_0_Mag", + "ACE_20Rnd_762x51_Mk319_Mod_0_Mag", + "ACE_20Rnd_762x51_M993_AP_Mag" + }; + }; + +//Missing in CBA +//ACE_20Rnd_762x67_Mk248_Mod_0_Mag +//ACE_20Rnd_762x67_Mk248_Mod_1_Mag +//ACE_20Rnd_762x67_Berger_Hybrid_OTM_Mag + + class CBA_65C_AR10 { + ADDON[] = { + "ACE_30Rnd_65_Creedmor_mag", + "ACE_20Rnd_65_Creedmor_mag", + "ACE_30Rnd_65x47_Scenar_mag", + "ACE_20Rnd_65x47_Scenar_mag" + }; + }; + + class CBA_338LM_AI { //338 Lapua Magnum Accuracy International + ADDON[] = { + "ACE_10Rnd_338_300gr_HPBT_Mag", + "ACE_10Rnd_338_API526_Mag" + }; + }; + + class CBA_408CT_Inter { + ADDON[] = { + "ACE_7Rnd_408_305gr_Mag" + }; + }; + + class CBA_50BMG_M107 { + ADDON[] = { + "ACE_5Rnd_127x99_Mag", + "ACE_5Rnd_127x99_API_Mag", + "ACE_5Rnd_127x99_AMAX_Mag" + }; + }; + + class CBA_9x19_P226 { // SIG P226 + ADDON[] = { + "ACE_16Rnd_9x19_mag" + }; + }; + class CBA_9x19_P228 { // SIG P228 + ADDON[] = { + "ACE_16Rnd_9x19_mag" + }; + }; + class CBA_9x19_P239 { // SIG P239 + ADDON[] = { + "ACE_16Rnd_9x19_mag" + }; + }; + class CBA_9x19_HiPower { + ADDON[] = { + "ACE_16Rnd_9x19_mag" + }; + }; + + class SVD_762x54R { //Vanilla + ADDON[] = { + "ACE_10Rnd_762x54_Tracer_mag" + }; + }; + class CBA_762x54R_SVD { + ADDON[] = { + "ACE_10Rnd_762x54_Tracer_mag" + }; + }; + class CBA_762x54R_Mosin { + ADDON[] = { + "ACE_10Rnd_762x54_Tracer_mag" + }; + }; + class CBA_762x54R_SVT { + ADDON[] = { + "ACE_10Rnd_762x54_Tracer_mag" + }; + }; + class CBA_762x54R_DPM { + ADDON[] = { + "ACE_10Rnd_762x54_Tracer_mag" + }; + }; + class CBA_762x54R_DT { + ADDON[] = { + "ACE_10Rnd_762x54_Tracer_mag" + }; + }; + class CBA_762x54R_Maxim { + ADDON[] = { + "ACE_10Rnd_762x54_Tracer_mag" + }; + }; + +}; diff --git a/addons/ballistics/config.cpp b/addons/ballistics/config.cpp index 0dc8289901..e78fb8f27f 100644 --- a/addons/ballistics/config.cpp +++ b/addons/ballistics/config.cpp @@ -17,6 +17,7 @@ class CfgPatches { #include "CfgEventHandlers.hpp" #include "CfgAmmo.hpp" #include "CfgMagazines.hpp" +#include "CfgMagazineWells.hpp" #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" #include "ACE_Arsenal_Stats.hpp" diff --git a/addons/ballistics/functions/fnc_statTextStatement_weaponMuzzleVelocity.sqf b/addons/ballistics/functions/fnc_statTextStatement_weaponMuzzleVelocity.sqf index 1fcc75d405..4d0f04b209 100644 --- a/addons/ballistics/functions/fnc_statTextStatement_weaponMuzzleVelocity.sqf +++ b/addons/ballistics/functions/fnc_statTextStatement_weaponMuzzleVelocity.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Alganthe * Text statement for the weapon muzzle velocity stat @@ -11,7 +12,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "_config"]; @@ -25,10 +25,8 @@ if (EGVAR(arsenal,currentLeftPanel) == 2002) then { [handgunWeapon EGVAR(arsenal,center), _primaryMag param [0, ""]] } params ["_weapon", "_magazine"]; -private _initSpeed = getNumber (_config >> "initSpeed"); - if (_magazine isEqualTo "") then { - _initSpeed + localize "str_empty"; } else { private _ammoCfg = (configFile >> "CfgAmmo" >> (getText (configFile >> "CfgMagazines" >> _magazine >> "ammo"))); private _barrelLength = getNumber (_config >> "ACE_barrelLength"); @@ -40,6 +38,6 @@ if (_magazine isEqualTo "") then { format ["%1 m/s (%2 ft/s)", _muzzleVelocity toFixed 0, (_muzzleVelocity * 3.28084) toFixed 0] } else { - _initSpeed + localize "str_empty"; }; }; diff --git a/addons/ballistics/stringtable.xml b/addons/ballistics/stringtable.xml index dbb54bf44a..a222c19779 100644 --- a/addons/ballistics/stringtable.xml +++ b/addons/ballistics/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -2286,6 +2286,7 @@ 銃身の転度 膛线缠距 膛線扭度 + Rigatura della canna Barrel length @@ -2293,6 +2294,7 @@ 銃身長 身管长度 槍管長度 + Lunghezza della canna Ballistic coefficient @@ -2300,6 +2302,7 @@ 弾道係数 弹道系数 彈道係數 + Coefficente balistico Bullet mass @@ -2307,6 +2310,7 @@ 弾丸重量 弹头重量 彈頭重量 + Massa del proiettile Muzzle velocity @@ -2314,6 +2318,7 @@ 銃口初速 枪口初速 槍口初速 + Velocità iniziale diff --git a/addons/captives/functions/fnc_addLoadCaptiveActions.sqf b/addons/captives/functions/fnc_addLoadCaptiveActions.sqf index 0c7adbda7a..81710f161d 100644 --- a/addons/captives/functions/fnc_addLoadCaptiveActions.sqf +++ b/addons/captives/functions/fnc_addLoadCaptiveActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Adds child actions to the "load captive" action for near vehicles. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/captives/functions/fnc_canApplyHandcuffs.sqf b/addons/captives/functions/fnc_canApplyHandcuffs.sqf index 231970255b..72ac745517 100644 --- a/addons/captives/functions/fnc_canApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_canApplyHandcuffs.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Checks the conditions for being able to apply handcuffs @@ -14,13 +15,12 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; //Check sides, Player has cableTie, target is alive and not already handcuffed (GVAR(allowHandcuffOwnSide) || {(side _unit) != (side _target)}) && -{"ACE_CableTie" in (items _unit)} && +{"ACE_CableTie" in (_unit call EFUNC(common,uniqueItems))} && {alive _target} && {!(_target getVariable [QGVAR(isHandcuffed), false])} && { diff --git a/addons/captives/functions/fnc_canEscortCaptive.sqf b/addons/captives/functions/fnc_canEscortCaptive.sqf index a7c799905e..cb5fdd4972 100644 --- a/addons/captives/functions/fnc_canEscortCaptive.sqf +++ b/addons/captives/functions/fnc_canEscortCaptive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Tests if can escort target (attach) @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; //Alive, handcuffed, not being escored, and not unconscious diff --git a/addons/captives/functions/fnc_canFriskPerson.sqf b/addons/captives/functions/fnc_canFriskPerson.sqf index d164f13ac3..c086afa0c7 100644 --- a/addons/captives/functions/fnc_canFriskPerson.sqf +++ b/addons/captives/functions/fnc_canFriskPerson.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Checks the conditions for being able to frisk a unit @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/captives/functions/fnc_canLoadCaptive.sqf b/addons/captives/functions/fnc_canLoadCaptive.sqf index 782661ea1c..2129b36f5a 100644 --- a/addons/captives/functions/fnc_canLoadCaptive.sqf +++ b/addons/captives/functions/fnc_canLoadCaptive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if the unit can load the target object into a vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target", "_vehicle"]; diff --git a/addons/captives/functions/fnc_canRemoveHandcuffs.sqf b/addons/captives/functions/fnc_canRemoveHandcuffs.sqf index e36ba5cd5b..37dc156bf0 100644 --- a/addons/captives/functions/fnc_canRemoveHandcuffs.sqf +++ b/addons/captives/functions/fnc_canRemoveHandcuffs.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Checks the conditions for being able to remove handcuffs @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/captives/functions/fnc_canStopEscorting.sqf b/addons/captives/functions/fnc_canStopEscorting.sqf index 181b16be94..01010c8f97 100644 --- a/addons/captives/functions/fnc_canStopEscorting.sqf +++ b/addons/captives/functions/fnc_canStopEscorting.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Tests if player can stop escorting. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", ["_target", objNull]]; diff --git a/addons/captives/functions/fnc_canSurrender.sqf b/addons/captives/functions/fnc_canSurrender.sqf index 2b58b54d2d..bec8edca04 100644 --- a/addons/captives/functions/fnc_canSurrender.sqf +++ b/addons/captives/functions/fnc_canSurrender.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Checks the conditions for being able switch surrender states @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_newSurrenderState"]; diff --git a/addons/captives/functions/fnc_canUnloadCaptive.sqf b/addons/captives/functions/fnc_canUnloadCaptive.sqf index 0d8ec81b07..3c5b302529 100644 --- a/addons/captives/functions/fnc_canUnloadCaptive.sqf +++ b/addons/captives/functions/fnc_canUnloadCaptive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if the unit can unload a captive from the vehicle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_unit"]; diff --git a/addons/captives/functions/fnc_doApplyHandcuffs.sqf b/addons/captives/functions/fnc_doApplyHandcuffs.sqf index d80ffc40a1..1731151ead 100644 --- a/addons/captives/functions/fnc_doApplyHandcuffs.sqf +++ b/addons/captives/functions/fnc_doApplyHandcuffs.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Checks the conditions for being able to apply handcuffs @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/captives/functions/fnc_doEscortCaptive.sqf b/addons/captives/functions/fnc_doEscortCaptive.sqf index b17a48f7b8..86d597aabe 100644 --- a/addons/captives/functions/fnc_doEscortCaptive.sqf +++ b/addons/captives/functions/fnc_doEscortCaptive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nic547 * Attaches a Captive to the _unit @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target","_state"]; diff --git a/addons/captives/functions/fnc_doFriskPerson.sqf b/addons/captives/functions/fnc_doFriskPerson.sqf index 700fba4ffb..58e7131e72 100644 --- a/addons/captives/functions/fnc_doFriskPerson.sqf +++ b/addons/captives/functions/fnc_doFriskPerson.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Open the select menu with the "personal" items of a frisked unit. It only shows "handgunWeapon", "uniformItems", "vestItems", "backpackItems" and "assignedItems" because every other item is visible on the character @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_unit"]; diff --git a/addons/captives/functions/fnc_doLoadCaptive.sqf b/addons/captives/functions/fnc_doLoadCaptive.sqf index c47cc389d4..e4e3b5f45b 100644 --- a/addons/captives/functions/fnc_doLoadCaptive.sqf +++ b/addons/captives/functions/fnc_doLoadCaptive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Unit loads the target object into a vehicle. (logic same as canLoadCaptive) @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target", "_vehicle"]; diff --git a/addons/captives/functions/fnc_doRemoveHandcuffs.sqf b/addons/captives/functions/fnc_doRemoveHandcuffs.sqf index 7f445440ba..a5623535d2 100644 --- a/addons/captives/functions/fnc_doRemoveHandcuffs.sqf +++ b/addons/captives/functions/fnc_doRemoveHandcuffs.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Remove handcuffs from a target @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/captives/functions/fnc_doUnloadCaptive.sqf b/addons/captives/functions/fnc_doUnloadCaptive.sqf index 93bdab114c..8f78b7b323 100644 --- a/addons/captives/functions/fnc_doUnloadCaptive.sqf +++ b/addons/captives/functions/fnc_doUnloadCaptive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Unit unloads a captive from a vehicle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf b/addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf index 91bb800c05..7c9daf1080 100644 --- a/addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf +++ b/addons/captives/functions/fnc_findEmptyNonFFVCargoSeat.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Finds a free cargo seat, searching non FFV first @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; TRACE_1("params", _vehicle); diff --git a/addons/captives/functions/fnc_handleAnimChangedHandcuffed.sqf b/addons/captives/functions/fnc_handleAnimChangedHandcuffed.sqf index f71a3f04a3..bdd61f6686 100644 --- a/addons/captives/functions/fnc_handleAnimChangedHandcuffed.sqf +++ b/addons/captives/functions/fnc_handleAnimChangedHandcuffed.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nic547, commy2 * Restart the handcuffing animation if it got interrupted. Called from a AnimChanged EH. @@ -15,9 +16,6 @@ * Public: No */ - -#include "script_component.hpp" - params ["_unit", "_newAnimation"]; TRACE_2("AnimChanged",_unit,_newAnimation); if (_unit == (vehicle _unit)) then { diff --git a/addons/captives/functions/fnc_handleAnimChangedSurrendered.sqf b/addons/captives/functions/fnc_handleAnimChangedSurrendered.sqf index 304926600f..08d6369ed6 100644 --- a/addons/captives/functions/fnc_handleAnimChangedSurrendered.sqf +++ b/addons/captives/functions/fnc_handleAnimChangedSurrendered.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nic547, commy2 * Restart the surrendering animation if it got interrupted. Called from a AnimChanged EH. @@ -15,9 +16,6 @@ * Public: No */ - -#include "script_component.hpp" - params ["_unit", "_newAnimation"]; TRACE_2("AnimChanged",_unit,_newAnimation); diff --git a/addons/captives/functions/fnc_handleGetIn.sqf b/addons/captives/functions/fnc_handleGetIn.sqf index 60f1ecf9b9..96a32031af 100644 --- a/addons/captives/functions/fnc_handleGetIn.sqf +++ b/addons/captives/functions/fnc_handleGetIn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handles when a unit gets in to a vehicle. Release escorted captive when entering a vehicle @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "","_unit"]; TRACE_2("params",_vehicle,_unit); diff --git a/addons/captives/functions/fnc_handleGetOut.sqf b/addons/captives/functions/fnc_handleGetOut.sqf index 7ec510dbf1..7f5de6f330 100644 --- a/addons/captives/functions/fnc_handleGetOut.sqf +++ b/addons/captives/functions/fnc_handleGetOut.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handles when a captive unit gets out of a vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "", "_unit"]; TRACE_2("params",_vehicle,_unit); diff --git a/addons/captives/functions/fnc_handleKilled.sqf b/addons/captives/functions/fnc_handleKilled.sqf index 27963e460d..39158ae662 100644 --- a/addons/captives/functions/fnc_handleKilled.sqf +++ b/addons/captives/functions/fnc_handleKilled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Called when a unit dies. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_1("handleKilled",_unit); diff --git a/addons/captives/functions/fnc_handleLocal.sqf b/addons/captives/functions/fnc_handleLocal.sqf index 49ee5f0010..be92b1c7dc 100644 --- a/addons/captives/functions/fnc_handleLocal.sqf +++ b/addons/captives/functions/fnc_handleLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Called when a unit switched locality @@ -15,9 +16,6 @@ * Public: No */ - -#include "script_component.hpp" - params ["_unit", "_local"]; // Make sure that if the unit is captive or surrendered it has a AnimChanged EH running ONLY on the machine that owns it diff --git a/addons/captives/functions/fnc_handleOnUnconscious.sqf b/addons/captives/functions/fnc_handleOnUnconscious.sqf index d89d18c506..745b651a0d 100644 --- a/addons/captives/functions/fnc_handleOnUnconscious.sqf +++ b/addons/captives/functions/fnc_handleOnUnconscious.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, PabstMirror * Handles the "ace_unconscious" event @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit","_isUnconc"]; diff --git a/addons/captives/functions/fnc_handlePlayerChanged.sqf b/addons/captives/functions/fnc_handlePlayerChanged.sqf index b15312be64..c6adce4f84 100644 --- a/addons/captives/functions/fnc_handlePlayerChanged.sqf +++ b/addons/captives/functions/fnc_handlePlayerChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handles playerChanged. Resets "showHUD" based on handcuff status @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_newUnit","_oldUnit"]; diff --git a/addons/captives/functions/fnc_handleRespawn.sqf b/addons/captives/functions/fnc_handleRespawn.sqf index 2d6618c6d1..3643eb4393 100644 --- a/addons/captives/functions/fnc_handleRespawn.sqf +++ b/addons/captives/functions/fnc_handleRespawn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 PabstMirror * Fix, because captiveNum doesn't reset properly on respawn @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit","_dead"]; TRACE_2("handleRespawn",_unit,_dead); diff --git a/addons/captives/functions/fnc_handleUnitInitPost.sqf b/addons/captives/functions/fnc_handleUnitInitPost.sqf index 52957acd68..2f189e2ffb 100644 --- a/addons/captives/functions/fnc_handleUnitInitPost.sqf +++ b/addons/captives/functions/fnc_handleUnitInitPost.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * handle captive and unconsciousness state and prevent grenades @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf b/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf index 2b7c55241d..df78c9773f 100644 --- a/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf +++ b/addons/captives/functions/fnc_handleZeusDisplayChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles ZeusDisplayChanged event @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" if ((ACE_player getVariable [QGVAR(isHandcuffed), false]) || {ACE_player getVariable [QGVAR(isSurrendering), false]}) then { TRACE_1("Player Change (showHUD false)",ACE_player); diff --git a/addons/captives/functions/fnc_moduleHandcuffed.sqf b/addons/captives/functions/fnc_moduleHandcuffed.sqf index 5b04696678..1cd50dd4ce 100644 --- a/addons/captives/functions/fnc_moduleHandcuffed.sqf +++ b/addons/captives/functions/fnc_moduleHandcuffed.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Module Function to make a unit handcuffed (can be called from editor) @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/captives/functions/fnc_moduleSettings.sqf b/addons/captives/functions/fnc_moduleSettings.sqf index 04ffc04f45..d31a57a43d 100644 --- a/addons/captives/functions/fnc_moduleSettings.sqf +++ b/addons/captives/functions/fnc_moduleSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Module for captivity settings @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic"]; [_logic, QGVAR(allowHandcuffOwnSide), "allowHandcuffOwnSide"] call EFUNC(common,readSettingFromModule); diff --git a/addons/captives/functions/fnc_moduleSurrender.sqf b/addons/captives/functions/fnc_moduleSurrender.sqf index 9f3bd8cdf9..ab31ea6bc9 100644 --- a/addons/captives/functions/fnc_moduleSurrender.sqf +++ b/addons/captives/functions/fnc_moduleSurrender.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Module Function to make a unit surrender (can be called from editor) @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/captives/functions/fnc_setHandcuffed.sqf b/addons/captives/functions/fnc_setHandcuffed.sqf index ad43137b18..5e0b634544 100644 --- a/addons/captives/functions/fnc_setHandcuffed.sqf +++ b/addons/captives/functions/fnc_setHandcuffed.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nic547, commy2 * Handcuffs a unit. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit","_state"]; TRACE_2("params",_unit,_state); diff --git a/addons/captives/functions/fnc_setSurrendered.sqf b/addons/captives/functions/fnc_setSurrendered.sqf index 2deec8cb84..a9b4ef85a7 100644 --- a/addons/captives/functions/fnc_setSurrendered.sqf +++ b/addons/captives/functions/fnc_setSurrendered.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 PabstMirror * Lets a unit surrender @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit","_state"]; TRACE_2("params",_unit,_state); diff --git a/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf b/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf index fa1d920a0d..6089625961 100644 --- a/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf +++ b/addons/captives/functions/fnc_vehicleCaptiveMoveIn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Loads a captive into a vehicle @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target","_vehicle"]; TRACE_2("params",_target,_vehicle); diff --git a/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf b/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf index 329adc1740..f26ff45370 100644 --- a/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf +++ b/addons/captives/functions/fnc_vehicleCaptiveMoveOut.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Unloads a captive from a vehicle. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_1("params",_unit); diff --git a/addons/captives/stringtable.xml b/addons/captives/stringtable.xml index f5d76f43e9..eb11930bcd 100644 --- a/addons/captives/stringtable.xml +++ b/addons/captives/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/cargo/functions/fnc_addCargoItem.sqf b/addons/cargo/functions/fnc_addCargoItem.sqf index 6e1b311098..8be00818c6 100644 --- a/addons/cargo/functions/fnc_addCargoItem.sqf +++ b/addons/cargo/functions/fnc_addCargoItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, Jonpas * Adds a cargo item to the vehicle. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_itemClass", "_vehicle", ["_amount", 1], ["_showHint", false, [false]]]; TRACE_3("params",_itemClass,_vehicle,_amount); diff --git a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf index e13cc65542..ab362e63f4 100644 --- a/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf +++ b/addons/cargo/functions/fnc_addCargoVehiclesActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * Create actions for nearest vehicles with cargo. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/cargo/functions/fnc_canLoadItemIn.sqf b/addons/cargo/functions/fnc_canLoadItemIn.sqf index 7d5d98dc0c..f7bc696d35 100644 --- a/addons/cargo/functions/fnc_canLoadItemIn.sqf +++ b/addons/cargo/functions/fnc_canLoadItemIn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if item can be loaded into other Object. @@ -5,7 +6,7 @@ * Arguments: * 0: Item * 1: Holder Object (Vehicle) - * 2: Ignore interaction distance + * 2: Ignore interaction distance and stability checks * * Return Value: * Can load in @@ -15,11 +16,10 @@ * * Public: No */ -#include "script_component.hpp" params [["_item", "", [objNull,""]], "_vehicle", ["_ignoreInteraction", false]]; -if (speed _vehicle > 1 || {((getPos _vehicle) select 2) > 3}) exitWith {TRACE_1("vehicle not stable",_vehicle); false}; +if ((!_ignoreInteraction) && {speed _vehicle > 1 || {((getPos _vehicle) select 2) > 3}}) exitWith {TRACE_1("vehicle not stable",_vehicle); false}; if (_item isEqualType objNull && {{alive _x && {getText (configFile >> "CfgVehicles" >> typeOf _x >> "simulation") != "UAVPilot"}} count crew _item > 0}) exitWith { TRACE_1("item is occupied",_item); diff --git a/addons/cargo/functions/fnc_canUnloadItem.sqf b/addons/cargo/functions/fnc_canUnloadItem.sqf index 9f1722ad08..311f3cb36d 100644 --- a/addons/cargo/functions/fnc_canUnloadItem.sqf +++ b/addons/cargo/functions/fnc_canUnloadItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, ViperMaul * Check if item can be unloaded. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_item", "_vehicle", ["_unloader", objNull]]; TRACE_2("params",_item,_vehicle); diff --git a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf index dc5f3ab073..d9452d4b01 100644 --- a/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf +++ b/addons/cargo/functions/fnc_getCargoSpaceLeft.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Get the cargo space left on object. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object"]; // TRACE_1("params",_object); diff --git a/addons/cargo/functions/fnc_getSizeItem.sqf b/addons/cargo/functions/fnc_getSizeItem.sqf index 32ec92a550..5d66e59b72 100644 --- a/addons/cargo/functions/fnc_getSizeItem.sqf +++ b/addons/cargo/functions/fnc_getSizeItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, SilentSpike * Get the cargo size of an object. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_item"]; diff --git a/addons/cargo/functions/fnc_handleDestroyed.sqf b/addons/cargo/functions/fnc_handleDestroyed.sqf index 88b3cb9351..2818e71e07 100644 --- a/addons/cargo/functions/fnc_handleDestroyed.sqf +++ b/addons/cargo/functions/fnc_handleDestroyed.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handle object being destroyed. Only runs on server. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; TRACE_1("params",_vehicle); diff --git a/addons/cargo/functions/fnc_initObject.sqf b/addons/cargo/functions/fnc_initObject.sqf index b5339e8b28..611e3e6391 100644 --- a/addons/cargo/functions/fnc_initObject.sqf +++ b/addons/cargo/functions/fnc_initObject.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, SilentSpike * Initializes variables for loadable objects. Called from init EH. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object"]; private _type = typeOf _object; diff --git a/addons/cargo/functions/fnc_initVehicle.sqf b/addons/cargo/functions/fnc_initVehicle.sqf index 2f6398d48b..60f204cb75 100644 --- a/addons/cargo/functions/fnc_initVehicle.sqf +++ b/addons/cargo/functions/fnc_initVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Initializes vehicle, adds open cargo menu action if available. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; TRACE_1("params", _vehicle); diff --git a/addons/cargo/functions/fnc_loadItem.sqf b/addons/cargo/functions/fnc_loadItem.sqf index cb4772b791..73056ef43f 100644 --- a/addons/cargo/functions/fnc_loadItem.sqf +++ b/addons/cargo/functions/fnc_loadItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Load object into vehicle. @@ -6,7 +7,7 @@ * Arguments: * 0: Item * 1: Vehicle - * 2: Ignore interaction distance + * 2: Ignore interaction distance and stability checks * * Return Value: * Object loaded @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_item","",[objNull,""]], ["_vehicle",objNull,[objNull]], ["_ignoreInteraction", false]]; TRACE_2("params",_item,_vehicle); diff --git a/addons/cargo/functions/fnc_moduleSettings.sqf b/addons/cargo/functions/fnc_moduleSettings.sqf index 6712d947fa..ce73678e9e 100644 --- a/addons/cargo/functions/fnc_moduleSettings.sqf +++ b/addons/cargo/functions/fnc_moduleSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Module for adjusting the cargo settings @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "", "_activated"]; diff --git a/addons/cargo/functions/fnc_onMenuOpen.sqf b/addons/cargo/functions/fnc_onMenuOpen.sqf index e08c7a478a..d611d18ff2 100644 --- a/addons/cargo/functions/fnc_onMenuOpen.sqf +++ b/addons/cargo/functions/fnc_onMenuOpen.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handle the UI data display. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; diff --git a/addons/cargo/functions/fnc_paradropItem.sqf b/addons/cargo/functions/fnc_paradropItem.sqf index ae9b192de4..961b2f7c36 100644 --- a/addons/cargo/functions/fnc_paradropItem.sqf +++ b/addons/cargo/functions/fnc_paradropItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: marc_book, commy2, CAA-Picard * Unload and paradrop object from plane or helicopter. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_item", "_vehicle"]; TRACE_2("params",_item,_vehicle); diff --git a/addons/cargo/functions/fnc_removeCargoItem.sqf b/addons/cargo/functions/fnc_removeCargoItem.sqf index 22d73866f8..ede9c68c94 100644 --- a/addons/cargo/functions/fnc_removeCargoItem.sqf +++ b/addons/cargo/functions/fnc_removeCargoItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Removes a cargo item from the vehicle. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_item", "_vehicle", ["_amount", 1]]; TRACE_3("params",_item,_vehicle,_amount); diff --git a/addons/cargo/functions/fnc_setSize.sqf b/addons/cargo/functions/fnc_setSize.sqf index 660131045a..9c9cc34f39 100644 --- a/addons/cargo/functions/fnc_setSize.sqf +++ b/addons/cargo/functions/fnc_setSize.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Set the cargo size of any object. Has global effect. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" // Only run this after the settings are initialized if !(EGVAR(common,settingsInitFinished)) exitWith { diff --git a/addons/cargo/functions/fnc_setSpace.sqf b/addons/cargo/functions/fnc_setSpace.sqf index 156b0aa085..1b3743cf9f 100644 --- a/addons/cargo/functions/fnc_setSpace.sqf +++ b/addons/cargo/functions/fnc_setSpace.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Set the cargo space of any object. Has global effect. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" // Only run this after the settings are initialized if !(EGVAR(common,settingsInitFinished)) exitWith { diff --git a/addons/cargo/functions/fnc_startLoadIn.sqf b/addons/cargo/functions/fnc_startLoadIn.sqf index 092440e5d4..d7b034f131 100644 --- a/addons/cargo/functions/fnc_startLoadIn.sqf +++ b/addons/cargo/functions/fnc_startLoadIn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Start load item. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_object", ["_cargoVehicle", objNull]]; TRACE_3("params",_player,_object,_cargoVehicle); @@ -39,7 +39,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then { private _size = [_object] call FUNC(getSizeItem); [ - 5 * _size, + GVAR(loadTimeCoefficient) * _size, [_object, _vehicle], { [objNull, _this select 0 select 0, true] call EFUNC(common,claim); @@ -54,7 +54,7 @@ if ([_object, _vehicle] call FUNC(canLoadItemIn)) then { } else { private _displayName = getText (configFile >> "CfgVehicles" >> typeOf _object >> "displayName"); - [[LSTRING(LoadingFailed), _displayName], 3.0] call EFUNC(common,displayTextStructured); + [[LSTRING(LoadingFailed), _displayName], 3] call EFUNC(common,displayTextStructured); }; _return diff --git a/addons/cargo/functions/fnc_startUnload.sqf b/addons/cargo/functions/fnc_startUnload.sqf index 27ebe9e952..f0edaf34f7 100644 --- a/addons/cargo/functions/fnc_startUnload.sqf +++ b/addons/cargo/functions/fnc_startUnload.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Start unload action. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; @@ -70,7 +70,7 @@ if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then private _size = [_item] call FUNC(getSizeItem); [ - 5 * _size, + GVAR(loadTimeCoefficient) * _size, [_item, GVAR(interactionVehicle), ACE_player], {["ace_unloadCargo", _this select 0] call CBA_fnc_localEvent}, {}, @@ -82,5 +82,5 @@ if ([_item, GVAR(interactionVehicle), ACE_player] call FUNC(canUnloadItem)) then private _itemClass = if (_item isEqualType "") then {_item} else {typeOf _item}; private _displayName = getText (configFile >> "CfgVehicles" >> _itemClass >> "displayName"); - [[LSTRING(UnloadingFailed), _displayName], 3.0] call EFUNC(common,displayTextStructured); + [[LSTRING(UnloadingFailed), _displayName], 3] call EFUNC(common,displayTextStructured); }; diff --git a/addons/cargo/functions/fnc_unloadItem.sqf b/addons/cargo/functions/fnc_unloadItem.sqf index f63e4367aa..6f0f97cb43 100644 --- a/addons/cargo/functions/fnc_unloadItem.sqf +++ b/addons/cargo/functions/fnc_unloadItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, ViperMaul * Unload object from vehicle. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_item", "_vehicle", ["_unloader", objNull]]; TRACE_3("params",_item,_vehicle,_unloader); diff --git a/addons/cargo/functions/fnc_validateCargoSpace.sqf b/addons/cargo/functions/fnc_validateCargoSpace.sqf index 6e3d79cf8d..b83ccfe93a 100644 --- a/addons/cargo/functions/fnc_validateCargoSpace.sqf +++ b/addons/cargo/functions/fnc_validateCargoSpace.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Validate the vehicle cargo space. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; TRACE_1("params",_vehicle); diff --git a/addons/cargo/initSettings.sqf b/addons/cargo/initSettings.sqf index 3a9f70070a..cbf0a121e5 100644 --- a/addons/cargo/initSettings.sqf +++ b/addons/cargo/initSettings.sqf @@ -1,19 +1,26 @@ -// CBA Settings [ADDON: ace_cargo]: - [ QGVAR(enable), "CHECKBOX", [LSTRING(ModuleSettings_enable), LSTRING(ModuleSettings_enable_Description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize LSTRING(openMenu)], - true, // default value - true, // isGlobal + [LELSTRING(OptionsMenu,CategoryLogistics), LLSTRING(openMenu)], + true, + true, {[QGVAR(enable), _this] call EFUNC(common,cbaSettings_settingChanged)} ] call CBA_settings_fnc_init; +[ + QGVAR(loadTimeCoefficient), "SLIDER", + [LSTRING(loadTimeCoefficient), LSTRING(loadTimeCoefficient_description)], + [LELSTRING(OptionsMenu,CategoryLogistics), LLSTRING(openMenu)], + [0, 10, 5, 1], + true, + {[QGVAR(loadTimeCoefficient), _this, true] call EFUNC(common,cbaSettings_settingChanged)} +] call CBA_settings_fnc_init; + [ QGVAR(paradropTimeCoefficent), "SLIDER", [LSTRING(paradropTimeCoefficent), LSTRING(paradropTimeCoefficent_description)], - [localize ELSTRING(OptionsMenu,CategoryLogistics), localize LSTRING(openMenu)], - [0,10,2.5,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] - true, // isGlobal - {[QGVAR(paradropTimeCoefficent), _this] call EFUNC(common,cbaSettings_settingChanged)} + [LELSTRING(OptionsMenu,CategoryLogistics), LLSTRING(openMenu)], + [0, 10, 2.5, 1], + true, + {[QGVAR(paradropTimeCoefficent), _this, true] call EFUNC(common,cbaSettings_settingChanged)} ] call CBA_settings_fnc_init; diff --git a/addons/cargo/stringtable.xml b/addons/cargo/stringtable.xml index 7acf7fc59c..61ddf34721 100644 --- a/addons/cargo/stringtable.xml +++ b/addons/cargo/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -291,7 +291,7 @@ 此架飞机并无保持水平飞行 - Paradrop Time Coffecient + Paradrop Time Coefficient Türlast Zeitfaktor 空中投下までの時間係数 Coefficente Tempo Lancio Paracadute @@ -312,5 +312,11 @@ Modyfikator wskazujący jak dużo czasu potrzeba by zrzucić przedmiot na spadochronie. 화물을 공중 투하 하는데 얼마나 걸리는 시간 설정 + + Load Time Coefficient + + + Modifies how long it takes to load/unload items.\nTime, in seconds, is the size of the item multiplied by this value. + diff --git a/addons/chemlights/CfgAmmo.hpp b/addons/chemlights/CfgAmmo.hpp index 0f51510006..696c39e724 100644 --- a/addons/chemlights/CfgAmmo.hpp +++ b/addons/chemlights/CfgAmmo.hpp @@ -4,23 +4,23 @@ class CfgAmmo { class Chemlight_base; class Chemlight_Blue: Chemlight_base { - timeToLive = 1500; + timeToLive = 28800; // 8h as per cyalume website }; class Chemlight_Red: Chemlight_base { - timeToLive = 1800; + timeToLive = 43200; // 12h as per cyalume website }; class Chemlight_Green: Chemlight_base { - timeToLive = 1800; + timeToLive = 43200; }; class Chemlight_Yellow: Chemlight_base { - timeToLive = 1800; + timeToLive = 43200; }; class ACE_G_Chemlight_Orange: Chemlight_base { - timeToLive = 1800; + timeToLive = 43200; effectsSmoke = "ACE_ChemlightEffect_Orange"; model = "\A3\Weapons_f\chemlight\chemlight_yellow_lit"; }; @@ -30,7 +30,7 @@ class CfgAmmo { }; class ACE_G_Chemlight_White: Chemlight_base { - timeToLive = 1500; + timeToLive = 28800; effectsSmoke = "ACE_ChemlightEffect_White"; model = "\A3\Weapons_f\chemlight\chemlight_yellow_lit"; }; @@ -41,7 +41,7 @@ class CfgAmmo { class ACE_G_Chemlight_HiRed: Chemlight_Red { effectsSmoke = "ACE_ChemlightEffect_HiRed"; - timeToLive = 300; + timeToLive = 1800; }; class ACE_G_Chemlight_HiRed_Infinite: ACE_G_Chemlight_HiRed { @@ -50,35 +50,53 @@ class CfgAmmo { class ACE_G_Chemlight_HiYellow: Chemlight_Yellow { effectsSmoke = "ACE_ChemlightEffect_HiYellow"; - timeToLive = 300; + timeToLive = 1800; }; class ACE_G_Chemlight_HiYellow_Infinite: ACE_G_Chemlight_HiYellow { timeToLive = 1e10; }; - - class ACE_G_Chemlight_HiOrange: ACE_G_Chemlight_Orange { - effectsSmoke = "ACE_ChemlightEffect_HiOrange"; - timeToLive = 300; - }; - - class ACE_G_Chemlight_HiOrange_Infinite: ACE_G_Chemlight_HiOrange { - timeToLive = 1e10; - }; - + class ACE_G_Chemlight_HiWhite: ACE_G_Chemlight_White { effectsSmoke = "ACE_ChemlightEffect_HiWhite"; + timeToLive = 1800; + }; + + class ACE_G_Chemlight_HiWhite_Infinite: ACE_G_Chemlight_HiWhite { + timeToLive = 1e10; + }; + + class ACE_G_Chemlight_HiBlue: Chemlight_Blue { + effectsSmoke = "ACE_ChemlightEffect_HiBlue"; + timeToLive = 1800; + }; + + class ACE_G_Chemlight_HiBlue_Infinite: ACE_G_Chemlight_HiBlue { + timeToLive = 1e10; + }; + + class ACE_G_Chemlight_HiGreen: Chemlight_Green { + effectsSmoke = "ACE_ChemlightEffect_HiGreen"; + timeToLive = 1800; + }; + + class ACE_G_Chemlight_HiGreen_Infinite: ACE_G_Chemlight_HiGreen { + timeToLive = 1e10; + }; + + class ACE_G_Chemlight_UltraHiOrange: ACE_G_Chemlight_Orange { + effectsSmoke = "ACE_ChemlightEffect_UltraHiOrange"; timeToLive = 300; }; - class ACE_G_Chemlight_HiWhite_Infinite: ACE_G_Chemlight_HiWhite { + class ACE_G_Chemlight_UltraHiOrange_Infinite: ACE_G_Chemlight_UltraHiOrange { timeToLive = 1e10; }; class ACE_G_Chemlight_IR: Chemlight_base { ACE_Chemlight_IR = "ACE_Chemlight_IR_Dummy"; effectsSmoke = "ACE_ChemlightEffect_IR"; - timeToLive = 1500; - model = "\A3\Weapons_f\chemlight\chemlight_blue_lit"; + timeToLive = 28800; + model = "\A3\Weapons_f\chemlight\chemlight_blue_lit"; }; }; diff --git a/addons/chemlights/CfgLights.hpp b/addons/chemlights/CfgLights.hpp index f669c9e6d4..1b9d445f30 100644 --- a/addons/chemlights/CfgLights.hpp +++ b/addons/chemlights/CfgLights.hpp @@ -9,6 +9,15 @@ }; #define HI_ATTENUATION \ + class Attenuation { \ + constant = 0; \ + linear = 0; \ + quadratic = 20; \ + hardLimitStart = 2.1; \ + hardLimitEnd = 2.8; \ + }; + +#define ULTRA_HI_ATTENUATION \ class Attenuation { \ constant = 0; \ linear = 0; \ @@ -27,65 +36,73 @@ class CfgLights { drawLight = 0; intensity = 4000; position[] = {0,0,0}; - + BASE_ATTENUATION }; class ChemLight_Blue: ChemLight_Green { color[] = {0,0.6,1,1}; diffuse[] = {0,0.6,1}; - + BASE_ATTENUATION }; - + class ChemLight_Red: ChemLight_Green { color[] = {1,0.1,0.1,1}; diffuse[] = {1,0.1,0.1}; - + BASE_ATTENUATION }; - + class ChemLight_Yellow: ChemLight_Green { color[] = {1,1,0.1,1}; diffuse[] = {1,1,0.1}; - + BASE_ATTENUATION }; - + class ACE_ChemlightLight_Orange: ChemLight_Green { color[] = {1,0.64,0,1}; diffuse[] = {1,0.4,0}; }; - + class ACE_ChemlightLight_White: ChemLight_Green { color[] = {1,1,1,1}; diffuse[] = {1,1,1}; }; - + class ACE_ChemlightLight_HiRed: ChemLight_Red { - intensity = 12000; - + intensity = 9000; + HI_ATTENUATION }; - class ACE_ChemlightLight_HiYellow: ChemLight_Yellow { - intensity = 12000; - + intensity = 9000; + HI_ATTENUATION }; - - class ACE_ChemlightLight_HiOrange: ACE_ChemlightLight_Orange { - intensity = 12000; - - HI_ATTENUATION - }; - class ACE_ChemlightLight_HiWhite: ACE_ChemlightLight_White { - intensity = 12000; - + intensity = 9000; + HI_ATTENUATION }; - + class ACE_ChemlightLight_HiBlue: ChemLight_Blue { + intensity = 9000; + + HI_ATTENUATION + }; + class ACE_ChemlightLight_HiGreen: ChemLight_Green { + intensity = 9000; + + HI_ATTENUATION + }; + + class ACE_ChemlightLight_UltraHiOrange: ACE_ChemlightLight_Orange { + intensity = 12000; + + ULTRA_HI_ATTENUATION + }; + class ACE_ChemlightLight_IR: ChemLight_Green { intensity = 0; }; diff --git a/addons/chemlights/CfgMagazines.hpp b/addons/chemlights/CfgMagazines.hpp index 14d96f7a82..042da2b920 100644 --- a/addons/chemlights/CfgMagazines.hpp +++ b/addons/chemlights/CfgMagazines.hpp @@ -1,24 +1,23 @@ class CfgMagazines { - + class SmokeShell; - class Chemlight_Green: Smokeshell { ACE_Chemlight_Shield = "ACE_Chemlight_Shield_Green"; }; - + class Chemlight_Blue: Chemlight_Green { ACE_Chemlight_Shield = "ACE_Chemlight_Shield_Blue"; }; - + class Chemlight_Red: Chemlight_Green { ACE_Chemlight_Shield = "ACE_Chemlight_Shield_Red"; }; - + class Chemlight_Yellow: Chemlight_Green { ACE_Chemlight_Shield = "ACE_Chemlight_Shield_Yellow"; }; - + class ACE_Chemlight_Orange: Chemlight_Green { ACE_Attachable = "ACE_G_Chemlight_Orange"; ACE_Chemlight_Shield = "ACE_Chemlight_Shield_Orange"; @@ -30,7 +29,7 @@ class CfgMagazines { model = "\A3\Weapons_f\chemlight\chemlight_yellow"; picture = QPATHTOF(UI\ace_chemlight_orange_x_ca.paa); }; - + class ACE_Chemlight_White: Chemlight_Green { ACE_Attachable = "ACE_G_Chemlight_White"; ACE_Chemlight_Shield = "ACE_Chemlight_Shield_White"; @@ -42,7 +41,7 @@ class CfgMagazines { model = "\A3\Weapons_f\chemlight\chemlight_yellow"; picture = QPATHTOF(UI\ace_chemlight_white_x_ca.paa); }; - + class ACE_Chemlight_HiRed: Chemlight_Red { ACE_Attachable = "ACE_G_Chemlight_HiRed"; ACE_Chemlight_Shield = ""; @@ -53,7 +52,7 @@ class CfgMagazines { descriptionShort = CSTRING(HiRed_DescriptionShort); picture = QPATHTOF(UI\ace_chemlight_hired_x_ca.paa); }; - + class ACE_Chemlight_HiYellow: Chemlight_Yellow { ACE_Attachable = "ACE_G_Chemlight_HiYellow"; ACE_Chemlight_Shield = ""; @@ -64,18 +63,7 @@ class CfgMagazines { descriptionShort = CSTRING(HiYellow_DescriptionShort); picture = QPATHTOF(UI\ace_chemlight_hiyellow_x_ca.paa); }; - - class ACE_Chemlight_HiOrange: ACE_Chemlight_Orange { - ACE_Attachable = "ACE_G_Chemlight_HiOrange"; - ACE_Chemlight_Shield = ""; - author = ECSTRING(common,ACETeam); - ammo = "ACE_G_Chemlight_HiOrange"; - displayName = CSTRING(HiOrange_DisplayName); - displayNameShort = CSTRING(HiOrange_DisplayNameShort); - descriptionShort = CSTRING(HiOrange_DescriptionShort); - picture = QPATHTOF(UI\ace_chemlight_hiorange_x_ca.paa); - }; - + class ACE_Chemlight_HiWhite: ACE_Chemlight_White { ACE_Attachable = "ACE_G_Chemlight_HiWhite"; ACE_Chemlight_Shield = ""; @@ -86,7 +74,41 @@ class CfgMagazines { descriptionShort = CSTRING(HiWhite_DescriptionShort); picture = QPATHTOF(UI\ace_chemlight_hiwhite_x_ca.paa); }; - + + class ACE_Chemlight_HiBlue: Chemlight_Blue { + ACE_Attachable = "ACE_G_Chemlight_HiBlue"; + ACE_Chemlight_Shield = ""; + author = ECSTRING(common,ACETeam); + ammo = "ACE_G_Chemlight_HiBlue"; + displayName = CSTRING(HiBlue_DisplayName); + displayNameShort = CSTRING(HiBlue_DisplayNameShort); + descriptionShort = CSTRING(HiBlue_DescriptionShort); + picture = QPATHTOF(UI\ace_chemlight_hiblue_x_ca.paa); + }; + + class ACE_Chemlight_HiGreen: Chemlight_Green { + ACE_Attachable = "ACE_G_Chemlight_HiGreen"; + ACE_Chemlight_Shield = ""; + author = ECSTRING(common,ACETeam); + ammo = "ACE_G_Chemlight_HiGreen"; + displayName = CSTRING(HiGreen_DisplayName); + displayNameShort = CSTRING(HiGreen_DisplayNameShort); + descriptionShort = CSTRING(HiGreen_DescriptionShort); + picture = QPATHTOF(UI\ace_chemlight_higreen_x_ca.paa); + }; + + class ACE_Chemlight_UltraHiOrange: ACE_Chemlight_Orange { + ACE_Attachable = "ACE_G_Chemlight_UltraHiOrange"; + ACE_Chemlight_Shield = ""; + author = ECSTRING(common,ACETeam); + ammo = "ACE_G_Chemlight_UltraHiOrange"; + displayName = CSTRING(UltraHiOrange_DisplayName); + displayNameShort = CSTRING(UltraHiOrange_DisplayNameShort); + descriptionShort = CSTRING(UltraHiOrange_DescriptionShort); + picture = QPATHTOF(UI\ace_chemlight_ultrahiorange_x_ca.paa); + }; + + class ACE_Chemlight_IR: Chemlight_Green { ACE_Attachable = "ACE_Chemlight_IR_Dummy"; ACE_Chemlight_Shield = ""; @@ -95,6 +117,6 @@ class CfgMagazines { displayName = CSTRING(IR_DisplayName); displayNameShort = CSTRING(IR_DisplayNameShort); descriptionShort = CSTRING(IR_DescriptionShort); - picture = QPATHTOF(UI\ace_chemlight_ir_x_ca.paa); + picture = QPATHTOF(UI\ace_chemlight_ir_x_ca.paa); }; }; diff --git a/addons/chemlights/CfgVehicles.hpp b/addons/chemlights/CfgVehicles.hpp index 9fd05d84b9..f22b03a7fe 100644 --- a/addons/chemlights/CfgVehicles.hpp +++ b/addons/chemlights/CfgVehicles.hpp @@ -33,9 +33,9 @@ class CfgVehicles { nvTarget = 1; brightness = 0.2; class NVGMarker { - diffuse[] = {0.1,0.1,0.1}; - ambient[] = {0.01,0.01,0.01}; - brightness = 0.015; + diffuse[] = {0.04,0.04,0.04}; + ambient[] = {0.0001,0.0001,0.0001}; + brightness = 0.12; name = "pozicni blik"; drawLight = 0; drawLightSize = 0; @@ -228,8 +228,10 @@ class CfgVehicles { MACRO_ADDMAGAZINE(ACE_Chemlight_White,20); MACRO_ADDMAGAZINE(ACE_Chemlight_HiRed,10); MACRO_ADDMAGAZINE(ACE_Chemlight_HiYellow,10); - MACRO_ADDMAGAZINE(ACE_Chemlight_HiOrange,10); + MACRO_ADDMAGAZINE(ACE_Chemlight_HiBlue,10); + MACRO_ADDMAGAZINE(ACE_Chemlight_HiGreen,10); MACRO_ADDMAGAZINE(ACE_Chemlight_HiWhite,10); + MACRO_ADDMAGAZINE(ACE_Chemlight_UltraHiOrange,10); MACRO_ADDMAGAZINE(ACE_Chemlight_IR,20); }; }; @@ -258,8 +260,10 @@ class CfgVehicles { MACRO_ADDMAGAZINE(ACE_Chemlight_White,20); MACRO_ADDMAGAZINE(ACE_Chemlight_HiRed,10); MACRO_ADDMAGAZINE(ACE_Chemlight_HiYellow,10); - MACRO_ADDMAGAZINE(ACE_Chemlight_HiOrange,10); + MACRO_ADDMAGAZINE(ACE_Chemlight_HiBlue,10); + MACRO_ADDMAGAZINE(ACE_Chemlight_HiGreen,10); MACRO_ADDMAGAZINE(ACE_Chemlight_HiWhite,10); + MACRO_ADDMAGAZINE(ACE_Chemlight_UltraHiOrange,10); MACRO_ADDMAGAZINE(ACE_Chemlight_IR,20); }; @@ -286,4 +290,104 @@ class CfgVehicles { }; }; }; + + class Module_F; + class ModuleChemlight_F: Module_F { + class Arguments { + class Type { + class values { + class Orange { + name= CSTRING(Orange_DisplayName); + value="ACE_G_Chemlight_Orange"; + }; + class White { + name= CSTRING(White_DisplayName); + value="ACE_G_Chemlight_White"; + }; + class HiRed { + name= CSTRING(HiRed_DisplayName); + value="ACE_G_Chemlight_HiRed"; + }; + class HiYellow { + name= CSTRING(HiYellow_DisplayName); + value="ACE_G_Chemlight_HiYellow"; + }; + class HiWhite { + name= CSTRING(HiWhite_DisplayName); + value="ACE_G_Chemlight_HiWhite"; + }; + class HiBlue { + name= CSTRING(HiBlue_DisplayName); + value="ACE_G_Chemlight_HiBlue"; + }; + class HiGreen { + name= CSTRING(HiGreen_DisplayName); + value="ACE_G_Chemlight_HiGreen"; + }; + class UltraHiOrange { + name= CSTRING(UltraHiOrange_DisplayName); + value="ACE_G_Chemlight_UltraHiOrange"; + }; + }; + }; + }; + }; + + class ModuleChemlightBlue_F; + class ModuleChemlightOrange: ModuleChemlightBlue_F { + author = ECSTRING(common,ACETeam); + _generalMacro = "ModuleChemlightOrange"; + displayName = CSTRING(Orange_DisplayName); + portrait = QPATHTOF(UI\ace_chemlight_orange_x_ca.paa); + ammo = "ACE_G_Chemlight_Orange"; + }; + class ModuleChemlightWhite: ModuleChemlightOrange { + author = ECSTRING(common,ACETeam); + _generalMacro = "ModuleChemlightWhite"; + displayName = CSTRING(White_DisplayName); + portrait = QPATHTOF(UI\ace_chemlight_white_x_ca.paa); + ammo = "ACE_G_Chemlight_White"; + }; + class ModuleChemlightHiRed: ModuleChemlightOrange { + author = ECSTRING(common,ACETeam); + _generalMacro = "ModuleChemlightHiRed"; + displayName = CSTRING(HiRed_DisplayName); + portrait = QPATHTOF(UI\ace_chemlight_hired_x_ca.paa); + ammo = "ACE_G_Chemlight_HiRed"; + }; + class ModuleChemlightHiYellow: ModuleChemlightOrange { + author = ECSTRING(common,ACETeam); + _generalMacro = "ModuleChemlightHiYellow"; + displayName = CSTRING(HiYellow_DisplayName); + portrait = QPATHTOF(UI\ace_chemlight_hiyellow_x_ca.paa); + ammo = "ACE_G_Chemlight_HiYellow"; + }; + class ModuleChemlightHiWhite: ModuleChemlightOrange { + author = ECSTRING(common,ACETeam); + _generalMacro = "ModuleChemlightHiWhite"; + displayName = CSTRING(HiWhite_DisplayName); + portrait = QPATHTOF(UI\ace_chemlight_hiwhite_x_ca.paa); + ammo = "ACE_G_Chemlight_HiWhite"; + }; + class ModuleChemlightHiBlue: ModuleChemlightOrange { + author = ECSTRING(common,ACETeam); + _generalMacro = "ModuleChemlightHiBlue"; + displayName = CSTRING(HiBlue_DisplayName); + portrait = QPATHTOF(UI\ace_chemlight_hiblue_x_ca.paa); + ammo = "ACE_G_Chemlight_HiBlue"; + }; + class ModuleChemlightHiGreen: ModuleChemlightOrange { + author = ECSTRING(common,ACETeam); + _generalMacro = "ModuleChemlightHiGreen"; + displayName = CSTRING(HiGreen_DisplayName); + portrait = QPATHTOF(UI\ace_chemlight_higreen_x_ca.paa); + ammo = "ACE_G_Chemlight_HiGreen"; + }; + class ModuleChemlightUltraHiOrange: ModuleChemlightOrange { + author = ECSTRING(common,ACETeam); + _generalMacro = "ModuleChemlightUltraHiOrange"; + displayName = CSTRING(UltraHiOrange_DisplayName); + portrait = QPATHTOF(UI\ace_chemlight_ultrahiorange_x_ca.paa); + ammo = "ACE_G_Chemlight_UltraHiOrange"; + }; }; diff --git a/addons/chemlights/CfgWeapons.hpp b/addons/chemlights/CfgWeapons.hpp index de6f3920f5..8ed9d73583 100644 --- a/addons/chemlights/CfgWeapons.hpp +++ b/addons/chemlights/CfgWeapons.hpp @@ -3,7 +3,7 @@ class CfgWeapons { class GrenadeLauncher; class Throw: GrenadeLauncher { - muzzles[] += {"ACE_Chemlight_OrangeMuzzle","ACE_Chemlight_WhiteMuzzle","ACE_Chemlight_HiRedMuzzle","ACE_Chemlight_HiYellowMuzzle","ACE_Chemlight_HiOrangeMuzzle","ACE_Chemlight_HiWhiteMuzzle","ACE_Chemlight_IRMuzzle"}; + muzzles[] += {"ACE_Chemlight_OrangeMuzzle","ACE_Chemlight_WhiteMuzzle","ACE_Chemlight_HiRedMuzzle","ACE_Chemlight_HiYellowMuzzle","ACE_Chemlight_HiWhiteMuzzle", "ACE_Chemlight_HiBlueMuzzle", "ACE_Chemlight_HiGreenMuzzle","ACE_Chemlight_UltraHiOrangeMuzzle","ACE_Chemlight_IRMuzzle"}; class ThrowMuzzle; @@ -23,13 +23,22 @@ class CfgWeapons { magazines[] = {"ACE_Chemlight_HiYellow"}; }; - class ACE_Chemlight_HiOrangeMuzzle: ThrowMuzzle { - magazines[] = {"ACE_Chemlight_HiOrange"}; - }; - class ACE_Chemlight_HiWhiteMuzzle: ThrowMuzzle { magazines[] = {"ACE_Chemlight_HiWhite"}; }; + + class ACE_Chemlight_HiBlueMuzzle: ThrowMuzzle { + magazines[] = {"ACE_Chemlight_HiBlue"}; + }; + + class ACE_Chemlight_HiGreenMuzzle: ThrowMuzzle { + magazines[] = {"ACE_Chemlight_HiGreen"}; + }; + + class ACE_Chemlight_UltraHiOrangeMuzzle: ThrowMuzzle { + magazines[] = {"ACE_Chemlight_UltraHiOrange"}; + }; + class ACE_Chemlight_IRMuzzle: ThrowMuzzle { magazines[] = {"ACE_Chemlight_IR"}; }; @@ -65,6 +74,7 @@ class CfgWeapons { ACE_Flashlight_Colour = "green"; ACE_Flashlight_Beam = QPATHTOF(UI\chemlight_shield_beam_green_ca.paa); ACE_Flashlight_Size = 0.8; + ACE_Flashlight_Sound = 0; }; }; }; @@ -74,12 +84,10 @@ class CfgWeapons { displayName = CSTRING(Shield_Red_DisplayName); descriptionShort = CSTRING(Shield_Red_DescriptionShort); picture = QPATHTOF(UI\ace_chemlight_shield_red_x_ca.paa); - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 1; - class FlashLight { + class ItemInfo: ItemInfo { + class FlashLight: FlashLight { ACE_Flashlight_Colour = "red"; ACE_Flashlight_Beam = QPATHTOF(UI\chemlight_shield_beam_red_ca.paa); - ACE_Flashlight_Size = 0.8; }; }; }; @@ -89,12 +97,10 @@ class CfgWeapons { displayName = CSTRING(Shield_Blue_DisplayName); descriptionShort = CSTRING(Shield_Blue_DescriptionShort); picture = QPATHTOF(UI\ace_chemlight_shield_blue_x_ca.paa); - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 1; - class FlashLight { + class ItemInfo: ItemInfo { + class FlashLight: FlashLight { ACE_Flashlight_Colour = "blue"; ACE_Flashlight_Beam = QPATHTOF(UI\chemlight_shield_beam_blue_ca.paa); - ACE_Flashlight_Size = 0.8; }; }; }; @@ -104,12 +110,10 @@ class CfgWeapons { displayName = CSTRING(Shield_Yellow_DisplayName); descriptionShort = CSTRING(Shield_Yellow_DescriptionShort); picture = QPATHTOF(UI\ace_chemlight_shield_yellow_x_ca.paa); - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 1; - class FlashLight { + class ItemInfo: ItemInfo { + class FlashLight: FlashLight { ACE_Flashlight_Colour = "yellow"; ACE_Flashlight_Beam = QPATHTOF(UI\chemlight_shield_beam_yellow_ca.paa); - ACE_Flashlight_Size = 0.8; }; }; }; @@ -119,12 +123,10 @@ class CfgWeapons { displayName = CSTRING(Shield_Orange_DisplayName); descriptionShort = CSTRING(Shield_Orange_DescriptionShort); picture = QPATHTOF(UI\ace_chemlight_shield_orange_x_ca.paa); - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 1; - class FlashLight { + class ItemInfo: ItemInfo { + class FlashLight: FlashLight { ACE_Flashlight_Colour = "orange"; ACE_Flashlight_Beam = QPATHTOF(UI\chemlight_shield_beam_orange_ca.paa); - ACE_Flashlight_Size = 0.8; }; }; }; @@ -134,12 +136,10 @@ class CfgWeapons { displayName = CSTRING(Shield_White_DisplayName); descriptionShort = CSTRING(Shield_White_DescriptionShort); picture = QPATHTOF(UI\ace_chemlight_shield_white_x_ca.paa); - class ItemInfo: CBA_MiscItem_ItemInfo { - mass = 1; - class FlashLight { + class ItemInfo: ItemInfo { + class FlashLight: FlashLight { ACE_Flashlight_Colour = "white"; ACE_Flashlight_Beam = QPATHTOF(UI\chemlight_shield_beam_white_ca.paa); - ACE_Flashlight_Size = 0.8; }; }; }; diff --git a/addons/chemlights/Effects.hpp b/addons/chemlights/Effects.hpp index cbe91144d8..210879c44e 100644 --- a/addons/chemlights/Effects.hpp +++ b/addons/chemlights/Effects.hpp @@ -27,13 +27,6 @@ class ACE_ChemlightEffect_HiYellow { }; }; -class ACE_ChemlightEffect_HiOrange { - class Light1 { - simulation = "light"; - type = "ACE_ChemlightLight_HiOrange"; - }; -}; - class ACE_ChemlightEffect_HiWhite { class Light1 { simulation = "light"; @@ -41,6 +34,27 @@ class ACE_ChemlightEffect_HiWhite { }; }; +class ACE_ChemlightEffect_HiBlue { + class Light1 { + simulation = "light"; + type = "ACE_ChemlightLight_HiBlue"; + }; +}; + +class ACE_ChemlightEffect_HiGreen { + class Light1 { + simulation = "light"; + type = "ACE_ChemlightLight_HiGreen"; + }; +}; + +class ACE_ChemlightEffect_UltraHiOrange { + class Light1 { + simulation = "light"; + type = "ACE_ChemlightLight_UltraHiOrange"; + }; +}; + class ACE_ChemlightEffect_IR { class Light1 { simulation = "light"; diff --git a/addons/chemlights/UI/ace_chemlight_hiblue_x_ca.paa b/addons/chemlights/UI/ace_chemlight_hiblue_x_ca.paa new file mode 100644 index 0000000000..9ee40d5a6e Binary files /dev/null and b/addons/chemlights/UI/ace_chemlight_hiblue_x_ca.paa differ diff --git a/addons/chemlights/UI/ace_chemlight_higreen_x_ca.paa b/addons/chemlights/UI/ace_chemlight_higreen_x_ca.paa new file mode 100644 index 0000000000..496fe59f66 Binary files /dev/null and b/addons/chemlights/UI/ace_chemlight_higreen_x_ca.paa differ diff --git a/addons/chemlights/UI/ace_chemlight_hiorange_x_ca.paa b/addons/chemlights/UI/ace_chemlight_ultrahiorange_x_ca.paa similarity index 100% rename from addons/chemlights/UI/ace_chemlight_hiorange_x_ca.paa rename to addons/chemlights/UI/ace_chemlight_ultrahiorange_x_ca.paa diff --git a/addons/chemlights/config.cpp b/addons/chemlights/config.cpp index ce9d34ed25..263fcb1a57 100644 --- a/addons/chemlights/config.cpp +++ b/addons/chemlights/config.cpp @@ -3,7 +3,7 @@ class CfgPatches { class ADDON { - units[] = {"ACE_Box_Chemlights","ACE_Item_Chemlight_Shield","ACE_Item_Chemlight_Shield_Green","ACE_Item_Chemlight_Shield_Red","ACE_Item_Chemlight_Shield_Blue","ACE_Item_Chemlight_Shield_Yellow","ACE_Item_Chemlight_Shield_Orange","ACE_Item_Chemlight_Shield_White"}; + units[] = {"ACE_Box_Chemlights","ACE_Item_Chemlight_Shield","ACE_Item_Chemlight_Shield_Green","ACE_Item_Chemlight_Shield_Red","ACE_Item_Chemlight_Shield_Blue","ACE_Item_Chemlight_Shield_Yellow","ACE_Item_Chemlight_Shield_Orange","ACE_Item_Chemlight_Shield_White","ModuleChemlightOrange","ModuleChemlightWhite","ModuleChemlightHiRed","ModuleChemlightHiYellow","ModuleChemlightHiWhite","ModuleChemlightHiBlue","ModuleChemlightHiGreen","ModuleChemlightUltraHiOrange"}; weapons[] = {"ACE_Chemlight_Shield", "ACE_Chemlight_Shield_Green","ACE_Chemlight_Shield_Red","ACE_Chemlight_Shield_Blue","ACE_Chemlight_Shield_Yellow","ACE_Chemlight_Shield_Orange","ACE_Chemlight_Shield_White"}; requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_common"}; diff --git a/addons/chemlights/functions/fnc_compileChemlightMenu.sqf b/addons/chemlights/functions/fnc_compileChemlightMenu.sqf index c87c4247ec..c8cccb88bd 100644 --- a/addons/chemlights/functions/fnc_compileChemlightMenu.sqf +++ b/addons/chemlights/functions/fnc_compileChemlightMenu.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: voiper * Compile list of chemlight classnames and add to the "Chemlight shield" parent menu. @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["", "_player", "_args"]; private _actions = []; diff --git a/addons/chemlights/functions/fnc_getShieldComponents.sqf b/addons/chemlights/functions/fnc_getShieldComponents.sqf index 6055070351..f372241599 100644 --- a/addons/chemlights/functions/fnc_getShieldComponents.sqf +++ b/addons/chemlights/functions/fnc_getShieldComponents.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: voiper * Check a unit for whether they're carrying a chemlight shield and a chemlight. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit"]; private _components = []; private _items = itemsWithMagazines _unit; diff --git a/addons/chemlights/functions/fnc_initIR.sqf b/addons/chemlights/functions/fnc_initIR.sqf index f2ff4b02d3..29532f41f1 100644 --- a/addons/chemlights/functions/fnc_initIR.sqf +++ b/addons/chemlights/functions/fnc_initIR.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: voiper * Spawn IR marker for dummy IR physX object. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_dummy"]; private _chemlightClass = getText (configFile >> "CfgVehicles" >> typeOf _dummy >> "ACE_Attachable"); diff --git a/addons/chemlights/functions/fnc_isIRClass.sqf b/addons/chemlights/functions/fnc_isIRClass.sqf index 69643a89fe..3d2021749e 100644 --- a/addons/chemlights/functions/fnc_isIRClass.sqf +++ b/addons/chemlights/functions/fnc_isIRClass.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: voiper * Check if an ammo classname is an IR chemlight. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params [["_input", "", ["", objNull]]]; private _class = if (typeName _input == "OBJECT") then {typeOf _input} else {_input}; diff --git a/addons/chemlights/functions/fnc_prepShield.sqf b/addons/chemlights/functions/fnc_prepShield.sqf index b4861da080..3f4f09d430 100644 --- a/addons/chemlights/functions/fnc_prepShield.sqf +++ b/addons/chemlights/functions/fnc_prepShield.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: voiper * Combine a chemlight shield item and a chemlight item into a light. @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_target", "_unit", "_args"]; _args params ["_chemlight", "_shieldClass"]; diff --git a/addons/chemlights/functions/fnc_removeIR.sqf b/addons/chemlights/functions/fnc_removeIR.sqf index b7f6a0001e..1c40a5b126 100644 --- a/addons/chemlights/functions/fnc_removeIR.sqf +++ b/addons/chemlights/functions/fnc_removeIR.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: voiper * Kill chemlight and any dummy objects attached to it. @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_chemlight", "_lightMarker"]; if (!isNull _lightMarker) then { diff --git a/addons/chemlights/functions/fnc_throwEH.sqf b/addons/chemlights/functions/fnc_throwEH.sqf index d99d83495b..2bedff7cb7 100644 --- a/addons/chemlights/functions/fnc_throwEH.sqf +++ b/addons/chemlights/functions/fnc_throwEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, voiper * Fired EH, for handling chemlight ThrowMuzzles. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_weapon", "", "", "_ammo", "", "_projectile"]; if ((_weapon != "Throw") || {!(_ammo isKindOf ["Chemlight_base", configFile >> "CfgAmmo"])}) exitWith {}; diff --git a/addons/chemlights/functions/fnc_throwIR.sqf b/addons/chemlights/functions/fnc_throwIR.sqf index 5d29ccde67..b507c8e5b1 100644 --- a/addons/chemlights/functions/fnc_throwIR.sqf +++ b/addons/chemlights/functions/fnc_throwIR.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: voiper * Create and throw IR chemlight. @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_projectile", "_ammo", ["_replaceAdvThrowable", false]]; private _config = configFile >> "CfgAmmo" >> _ammo; diff --git a/addons/chemlights/stringtable.xml b/addons/chemlights/stringtable.xml index 51f07a414b..0cac13a44b 100644 --- a/addons/chemlights/stringtable.xml +++ b/addons/chemlights/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -150,15 +150,15 @@ 超亮红色光 - Type: Light - Red Hi (5 minute)<br />Rounds: 1<br />Used in: Hand - 種類: 照明 - 高輝度 赤 (5分間)<br />装填数: 1<br />次で使用: 携帯 - Typ: Światło - jaskrawe czerwone (5 minut)<br/>Pociski: 1<br/>Używany w: ręce - Typ: Licht - rot, hell (5 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand - 종류: 밝은 빨간색 (5분)<br />수량: 1<br />사용처: 손 - Type: Lumière - rouge Hi (5 minutes)<br />Nbre: 1<br /> À main - Tipo: Luce - Rossa Hi (5 minuti)<br />Rimanenti: 1<br/>Usata in: Mano - 類型: 光 - 超亮紅色 (5分鐘)<br />發數: 1<br />使用於: 手 - 类型: 光 - 超亮红色 (5分钟)<br />发数: 1<br />使用于: 手 + Type: Light - Red Hi (30 minute)<br />Rounds: 1<br />Used in: Hand + 種類: 照明 - 高輝度 赤 (30分間)<br />装填数: 1<br />次で使用: 携帯 + Typ: Światło - jaskrawe czerwone (30 minut)<br/>Pociski: 1<br/>Używany w: ręce + Typ: Licht - rot, hell (30 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand + 종류: 밝은 빨간색 (30분)<br />수량: 1<br />사용처: 손 + Type: Lumière - rouge Hi (30 minutes)<br />Nbre: 1<br /> À main + Tipo: Luce - Rossa Hi (30 minuti)<br />Rimanenti: 1<br/>Usata in: Mano + 類型: 光 - 超亮紅色 (30分鐘)<br />發數: 1<br />使用於: 手 + 类型: 光 - 超亮红色 (30分钟)<br />发数: 1<br />使用于: 手 Chemlight (Hi Yellow) @@ -183,48 +183,15 @@ 超亮黄色光 - Type: Light - Yellow Hi (5 minute)<br />Rounds: 1<br />Used in: Hand - 種類: 照明 - 高輝度 黄 (5分間)<br />装填数: 1<br />次で使用: 携帯 - Typ: Światło - jaskrawe żółte (5 minut)<br/>Pociski: 1<br/>Używany w: ręce - Typ: Licht - gelb, hell (5 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand - 종류:밝은 노란색 (5분)<br />수량: 1<br />사용처: Hand - Type: Lumière - Jaune Hi (5 minutes)Nbre: 1<br /> À main - Tipo: Luce - Gialla Hi (5 minuti)<br />Rimanenti: 1<br/>Usata in: Mano - 類型: 光 - 超亮黃色 (5分鐘)<br />發數: 1<br />使用於: 手 - 类型: 光 - 超亮黄色 (5分钟)<br />发数: 1<br />使用于: 手 - - - Chemlight (Hi Orange) - ケミライト (高輝度 オレンジ) - Świetlik (jaskrawy pomarańczowy) - Knicklicht (orange, hell) - 켐라이트 (밝은 주황색) - Cyalume (Hi orange) - Luce chimica (Hi Arancione) - 螢光棒 (超亮橘色) - 萤光棒 (超亮橘色) - - - Orange Hi Light - 高輝度のオレンジ - Jaskrawe pomarańczowe światło - Helles, oranges Knicklicht - 밝은 주황색 - Lum. orange haute intensité - Luce Hi Arancione - 超亮橘色光 - 超亮橘色光 - - - Type: Light - Orange Hi (5 minute)<br />Rounds: 1<br />Used in: Hand - 種類: 照明 - 高輝度 オレンジ (5分間)<br />装填数: 1<br />次で使用: 携帯 - Typ: Światło - jaskrawe pomarańczowe (5 minut)<br/>Pociski: 1<br/>Używany w: ręce - Typ: Licht - orange, hell (5 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand - 종류: 밝은 주황색 (5분)<br />수량: 1<br />사용처: 손 - Type: Lumière - orange Hi (5 minutes)<br />Nbre: 1<br /> À main - Tipo: Luce - Arancione Hi (5 minuti)<br />Rimanenti: 1<br/>Usata in: Mano - 類型: 光 - 超亮橘色 (5分鐘)<br />發數: 1<br />使用於: 手 - 类型: 光 - 超亮橘色 (5分钟)<br />发数: 1<br />使用于: 手 + Type: Light - Yellow Hi (30 minute)<br />Rounds: 1<br />Used in: Hand + 種類: 照明 - 高輝度 黄 (30分間)<br />装填数: 1<br />次で使用: 携帯 + Typ: Światło - jaskrawe żółte (30 minut)<br/>Pociski: 1<br/>Używany w: ręce + Typ: Licht - gelb, hell (30 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand + 종류:밝은 노란색 (30분)<br />수량: 1<br />사용처: Hand + Type: Lumière - Jaune Hi (30 minutes)Nbre: 1<br /> À main + Tipo: Luce - Gialla Hi (30 minuti)<br />Rimanenti: 1<br/>Usata in: Mano + 類型: 光 - 超亮黃色 (30分鐘)<br />發數: 1<br />使用於: 手 + 类型: 光 - 超亮黄色 (30分钟)<br />发数: 1<br />使用于: 手 Chemlight (Hi White) @@ -249,15 +216,51 @@ 超亮白色光 - Type: Light - White Hi (5 minute)<br />Rounds: 1<br />Used in: Hand - 種類: 照明 - 高輝度 白 (5分間)<br />装填数: 1<br />次で使用: 携帯 - Typ: Światło - jaskrawe białe (5 minut)<br/>Pociski: 1<br/>Używany w: ręce - Typ: Licht - weiß, hell (5 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand - 종류: 밝은 하얀색 (5분)<br />수량: 1<br />사용처: 손 - Type: Lumière - blanche Hi (5 minutes)<br />Nbre: 1<br /> À main - Tipo: Luce - Bianca Hi (5 minuti)<br />Rimanenti: 1<br/>Usata in: Mano - 類型: 光 - 超亮白色 (5分鐘)<br />發數: 1<br />使用於: 手 - 类型: 光 - 超亮白色 (5分钟)<br />发数: 1<br />使用于: 手 + Type: Light - White Hi (30 minute)<br />Rounds: 1<br />Used in: Hand + 種類: 照明 - 高輝度 白 (30分間)<br />装填数: 1<br />次で使用: 携帯 + Typ: Światło - jaskrawe białe (30 minut)<br/>Pociski: 1<br/>Używany w: ręce + Typ: Licht - weiß, hell (30 Minuten)<br />Anzahl: 1<br />Benutzt in: Hand + 종류: 밝은 하얀색 (30분)<br />수량: 1<br />사용처: 손 + Type: Lumière - blanche Hi (30 minutes)<br />Nbre: 1<br /> À main + Tipo: Luce - Bianca Hi (30 minuti)<br />Rimanenti: 1<br/>Usata in: Mano + 類型: 光 - 超亮白色 (30分鐘)<br />發數: 1<br />使用於: 手 + 类型: 光 - 超亮白色 (30分钟)<br />发数: 1<br />使用于: 手 + + + Chemlight (Hi Blue) + Cyalume (Hi Bleu) + + + Blue Hi Light + Lum. bleue haute intensité + + + Type: Light - Blue Hi (30 minute)<br />Rounds: 1<br />Used in: Hand + Type: Lumière - bleue Hi (30 minutes)<br />Nbre: 1<br /> À main + + + Chemlight (Hi Green) + Cyalume (Hi Vert) + + + Green Hi Light + Lum. verte haute intensité + + + Type: Light - Green Hi (30 minute)<br />Rounds: 1<br />Used in: Hand + Type: Lumière - verte Hi (30 minutes)<br />Nbre: 1<br /> À main + + + Chemlight (Ultra-Hi Orange) + Cyalume (Ultra-Hi orange) + + + Orange Ultra-Hi Light + Lum. orange ultra haute intensité + + + Type: Light - Orange Ultra-Hi (5 minute)<br />Rounds: 1<br />Used in: Hand + Type: Lumière - Orange Ultra-Hi (5 minutes)<br />Nbre: 1<br /> À main Chemlight (IR) diff --git a/addons/common/XEH_PREP.hpp b/addons/common/XEH_PREP.hpp index 526c498cd9..c070623893 100644 --- a/addons/common/XEH_PREP.hpp +++ b/addons/common/XEH_PREP.hpp @@ -178,6 +178,7 @@ PREP(toHex); PREP(toNumber); PREP(unhideUnit); PREP(uniqueElements); +PREP(uniqueItems); PREP(unloadPerson); PREP(unloadPersonLocal); PREP(unmuteUnit); diff --git a/addons/common/XEH_postInit.sqf b/addons/common/XEH_postInit.sqf index 4299213e44..2ced174f30 100644 --- a/addons/common/XEH_postInit.sqf +++ b/addons/common/XEH_postInit.sqf @@ -261,21 +261,18 @@ TRACE_1("adding unit playerEH to set ace_player",isNull cba_events_oldUnit); ACE_player = (_this select 0); }, true] call CBA_fnc_addPlayerEventHandler; +// Clear uniqueItems cache on loadout change +["loadout", { + GVAR(uniqueItemsCache) = nil; +}] call CBA_fnc_addPlayerEventHandler; + +// Backwards compatiblity for old ace event GVAR(OldIsCamera) = false; - -[{ - BEGIN_COUNTER(stateChecker); - - // "activeCameraChanged" event - private _data = call FUNC(isfeatureCameraActive); - if !(_data isEqualTo GVAR(OldIsCamera)) then { - // Raise ACE event locally - GVAR(OldIsCamera) = _data; - ["ace_activeCameraChanged", [ACE_player, _data]] call CBA_fnc_localEvent; - }; - - END_COUNTER(stateChecker); -}, 0.5, []] call CBA_fnc_addPerFrameHandler; +["featureCamera", { + params ["_player", "_cameraName"]; + GVAR(OldIsCamera) = _cameraName != ""; + ["ace_activeCameraChanged", [_player, GVAR(OldIsCamera)]] call CBA_fnc_localEvent; +}, true] call CBA_fnc_addPlayerEventHandler; // Add event handler for UAV control change ACE_controlledUAV = [objNull, objNull, [], ""]; diff --git a/addons/common/functions/fnc_ASLToPosition.sqf b/addons/common/functions/fnc_ASLToPosition.sqf index 0f745cd2bb..81e99ef8c3 100644 --- a/addons/common/functions/fnc_ASLToPosition.sqf +++ b/addons/common/functions/fnc_ASLToPosition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Converts ASL to Arma "Position" @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" if (surfaceIsWater _this) then { _this diff --git a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf index e41436078c..dfdbe4db54 100644 --- a/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf +++ b/addons/common/functions/fnc__handleRequestAllSyncedEvents.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Handles a server-side request for synchronization ALL events on JIP to a client. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_client"]; diff --git a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf index 61711eb0b0..1e038c40bc 100644 --- a/addons/common/functions/fnc__handleRequestSyncedEvent.sqf +++ b/addons/common/functions/fnc__handleRequestSyncedEvent.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Receives either requests for synchronization from clients, or the synchronization data from the server. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" //SEH_s if (isServer) then { diff --git a/addons/common/functions/fnc__handleSyncedEvent.sqf b/addons/common/functions/fnc__handleSyncedEvent.sqf index f59c8a6535..a7fa657a5f 100644 --- a/addons/common/functions/fnc__handleSyncedEvent.sqf +++ b/addons/common/functions/fnc__handleSyncedEvent.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Handles synced events being received. Server will log them, and server/client will execute them. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_name", "_args", "_ttl"]; diff --git a/addons/common/functions/fnc_actionKeysNamesConverted.sqf b/addons/common/functions/fnc_actionKeysNamesConverted.sqf index fae1fb939e..53ebba0cd6 100644 --- a/addons/common/functions/fnc_actionKeysNamesConverted.sqf +++ b/addons/common/functions/fnc_actionKeysNamesConverted.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Reports same as actionKeysNames(Array) but in a format processable by "keyDown". @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define LAST_DIK 250 #define PLACEHOLDER_PLUS "" diff --git a/addons/common/functions/fnc_addActionEventHandler.sqf b/addons/common/functions/fnc_addActionEventHandler.sqf index 18d337225f..8fafef07cf 100644 --- a/addons/common/functions/fnc_addActionEventHandler.sqf +++ b/addons/common/functions/fnc_addActionEventHandler.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Add an addAction event to a unit. Used to handle multiple addAction events. Global arguments, local effects. Does only work for player controlled units. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_action", "_condition", "_statement"]; diff --git a/addons/common/functions/fnc_addActionMenuEventHandler.sqf b/addons/common/functions/fnc_addActionMenuEventHandler.sqf index 94028b9aea..67d531c22e 100644 --- a/addons/common/functions/fnc_addActionMenuEventHandler.sqf +++ b/addons/common/functions/fnc_addActionMenuEventHandler.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Add an addAction event to a unit. Used to handle multiple addAction events and add a action to the mouse wheel menu. Global arguments, local effects. Does only work for player controlled units. @@ -20,7 +21,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_displayName", "_action", "_condition", "_statement", "_condition2", "_statement2", ["_priority", 0]]; diff --git a/addons/common/functions/fnc_addCanInteractWithCondition.sqf b/addons/common/functions/fnc_addCanInteractWithCondition.sqf index 7c2bc3591b..5db1a79a3d 100644 --- a/addons/common/functions/fnc_addCanInteractWithCondition.sqf +++ b/addons/common/functions/fnc_addCanInteractWithCondition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Add a condition that gets checked by ace_common_fnc_canInteractWith. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_conditionName", "_conditionFunc"]; diff --git a/addons/common/functions/fnc_addLineToDebugDraw.sqf b/addons/common/functions/fnc_addLineToDebugDraw.sqf index 46f015c5e0..3056d750d6 100644 --- a/addons/common/functions/fnc_addLineToDebugDraw.sqf +++ b/addons/common/functions/fnc_addLineToDebugDraw.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Add line to draw on debug @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_startASL", "_endASL", "_color"]; diff --git a/addons/common/functions/fnc_addMapMarkerCreatedEventHandler.sqf b/addons/common/functions/fnc_addMapMarkerCreatedEventHandler.sqf index 1b82b9fedf..c698d30272 100644 --- a/addons/common/functions/fnc_addMapMarkerCreatedEventHandler.sqf +++ b/addons/common/functions/fnc_addMapMarkerCreatedEventHandler.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Add a map marker creation event handler. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_statement"]; diff --git a/addons/common/functions/fnc_addSyncedEventHandler.sqf b/addons/common/functions/fnc_addSyncedEventHandler.sqf index d46dcbe45c..3dd4f03152 100644 --- a/addons/common/functions/fnc_addSyncedEventHandler.sqf +++ b/addons/common/functions/fnc_addSyncedEventHandler.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Register an event handler for an ACE synced event @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_name", "_handler", ["_ttl", 0]]; diff --git a/addons/common/functions/fnc_addToInventory.sqf b/addons/common/functions/fnc_addToInventory.sqf index d7193cfd23..b8b5f93635 100644 --- a/addons/common/functions/fnc_addToInventory.sqf +++ b/addons/common/functions/fnc_addToInventory.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Adds an item, weapon, or magazine to the unit's inventory or places it in a weaponHolder if no space. @@ -17,7 +18,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_classname", ["_container", ""], ["_ammoCount", -1]]; diff --git a/addons/common/functions/fnc_ambientBrightness.sqf b/addons/common/functions/fnc_ambientBrightness.sqf index 276d7aa5c3..608c35dfef 100644 --- a/addons/common/functions/fnc_ambientBrightness.sqf +++ b/addons/common/functions/fnc_ambientBrightness.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, idea by Falke * Returns a brightness value depending on the sun and moon state. Ranges from 0 to 1 (dark ... bright). @@ -13,6 +14,5 @@ * * Public: Yes */ -#include "script_component.hpp" (sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity / 5) * (1 - overcast)) min 1 diff --git a/addons/common/functions/fnc_arithmeticGetResult.sqf b/addons/common/functions/fnc_arithmeticGetResult.sqf index 3dae9b23a0..418d510d66 100644 --- a/addons/common/functions/fnc_arithmeticGetResult.sqf +++ b/addons/common/functions/fnc_arithmeticGetResult.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Gets arithmetic result from a set. @@ -16,8 +17,6 @@ * * Public: Yes */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_namespace", "_setID", "_op"]; TRACE_3("params",_namespace,_setID,_op); diff --git a/addons/common/functions/fnc_arithmeticSetSource.sqf b/addons/common/functions/fnc_arithmeticSetSource.sqf index a11cb29527..0d7503aa90 100644 --- a/addons/common/functions/fnc_arithmeticSetSource.sqf +++ b/addons/common/functions/fnc_arithmeticSetSource.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Adds or removes a source to an arithmetic set. @@ -17,8 +18,6 @@ * * Public: Yes */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_namespace", "_setID", "_source", "_variable"]; TRACE_4("params",_namespace,_setID,_source,_variable); diff --git a/addons/common/functions/fnc_assignObjectsInList.sqf b/addons/common/functions/fnc_assignObjectsInList.sqf index 5724521a7b..764675fa5f 100644 --- a/addons/common/functions/fnc_assignObjectsInList.sqf +++ b/addons/common/functions/fnc_assignObjectsInList.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Loops through a string and filters out object names/variables to assign a value for given variable. @@ -18,7 +19,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_list", "_variable", "_setting", "_global", ["_vehicle", false]]; diff --git a/addons/common/functions/fnc_assignedItemFix.sqf b/addons/common/functions/fnc_assignedItemFix.sqf index 8e0c518c90..3f523f4a59 100644 --- a/addons/common/functions/fnc_assignedItemFix.sqf +++ b/addons/common/functions/fnc_assignedItemFix.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Initialized the assigned item fix. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" ACE_isMapEnabled = getMissionConfigValue ["showMap", 1] in [true, 1]; ACE_isCompassEnabled = getMissionConfigValue ["showCompass", 1] in [true, 1]; diff --git a/addons/common/functions/fnc_binarizeNumber.sqf b/addons/common/functions/fnc_binarizeNumber.sqf index 82494e39d6..780551756c 100644 --- a/addons/common/functions/fnc_binarizeNumber.sqf +++ b/addons/common/functions/fnc_binarizeNumber.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get a binary equivalent of a decimal number. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_number", ["_minLength", 8]]; diff --git a/addons/common/functions/fnc_blurScreen.sqf b/addons/common/functions/fnc_blurScreen.sqf index 0995c957d9..339a1138e6 100644 --- a/addons/common/functions/fnc_blurScreen.sqf +++ b/addons/common/functions/fnc_blurScreen.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Blurs screen. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!hasInterface) exitWith {}; diff --git a/addons/common/functions/fnc_cachedCall.sqf b/addons/common/functions/fnc_cachedCall.sqf index 086112b90d..728303d6cd 100644 --- a/addons/common/functions/fnc_cachedCall.sqf +++ b/addons/common/functions/fnc_cachedCall.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain, Jaynus * Returns the result of the function and caches it up to a given time or event @@ -18,7 +19,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_params", "_function", "_namespace", "_uid", "_duration", "_event"]; diff --git a/addons/common/functions/fnc_canDig.sqf b/addons/common/functions/fnc_canDig.sqf index 2b0412f730..e96b44a478 100644 --- a/addons/common/functions/fnc_canDig.sqf +++ b/addons/common/functions/fnc_canDig.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg, commy2 * Checks if the player can dig on the surface below (enough dust). @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_canGetInPosition.sqf b/addons/common/functions/fnc_canGetInPosition.sqf index c0379c861a..22d885b38c 100644 --- a/addons/common/functions/fnc_canGetInPosition.sqf +++ b/addons/common/functions/fnc_canGetInPosition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Is the unit able to enter the vehicle in the given position? @@ -17,7 +18,6 @@ * * Public: No */ -#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/common/functions/fnc_canInteractWith.sqf b/addons/common/functions/fnc_canInteractWith.sqf index a94ba6d9d1..b67e57964f 100644 --- a/addons/common/functions/fnc_canInteractWith.sqf +++ b/addons/common/functions/fnc_canInteractWith.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if the unit can interact. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_target", ["_exceptions", []]]; diff --git a/addons/common/functions/fnc_cbaSettings.sqf b/addons/common/functions/fnc_cbaSettings.sqf index 0441680dfd..4eb84d54da 100644 --- a/addons/common/functions/fnc_cbaSettings.sqf +++ b/addons/common/functions/fnc_cbaSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Called at pre-init: Loads all ace_settings and converts them to CBA Settings. @@ -13,8 +14,6 @@ * * Public: No */ -//#define DEBUG_MODE_FULL -#include "script_component.hpp" LOG("Adding ACE_Settings to CBA_settings"); diff --git a/addons/common/functions/fnc_cbaSettings_convertHelper.sqf b/addons/common/functions/fnc_cbaSettings_convertHelper.sqf index 6b6416e7df..4c64da8f0f 100644 --- a/addons/common/functions/fnc_cbaSettings_convertHelper.sqf +++ b/addons/common/functions/fnc_cbaSettings_convertHelper.sqf @@ -1,3 +1,5 @@ +#define DEBUG_MODE_FULL +#include "script_component.hpp" /* * Author: PabstMirror * Dev function: Converts ace_settings to code, outputs to clipboard @@ -13,8 +15,6 @@ * * Public: No */ -#define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_addon"]; @@ -43,6 +43,7 @@ private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x private _category = getText (_config >> "category"); private _cbaIsGlobal = (!_isClientSettable) || _isForced; + private _warnIfChangedMidMission = _cbaIsGlobal && {(getNumber (_config >> "canBeChanged")) == 0}; if (_isForced) then {GVAR(cbaSettings_forcedSettings) pushBack (toLower _varName);}; // Basic handling of setting types CBA doesn't support: @@ -117,10 +118,11 @@ private _settings = configProperties [configFile >> "ACE_Settings", "(isClass _x _output pushBack format [" %1, // %2", _cbaValueInfo, _cbaValueInfoHint]; _output pushBack format [" %1, // isGlobal", _cbaIsGlobal]; if ((_varName select [0, 4]) == "ACE_") then { - _output pushBack format [" {[QGVAR(%1), _this] call EFUNC(common,cbaSettings_settingChanged)}", _gvarName]; + _output pushBack format [" {[QGVAR(%1), _this] call EFUNC(common,cbaSettings_settingChanged)},", _gvarName]; } else { - _output pushBack format [" {[""%1"", _this] call ace_common_fnc_cbaSettings_settingChanged}", _varName]; + _output pushBack format [" {[""%1"", _this] call ace_common_fnc_cbaSettings_settingChanged},", _varName]; }; + _output pushBack format [" %1 // Needs mission restart", _warnIfChangedMidMission]; _output pushBack "] call CBA_settings_fnc_init;"; } forEach _settings; diff --git a/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf b/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf index 1382942732..7f6637f622 100644 --- a/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf +++ b/addons/common/functions/fnc_cbaSettings_loadFromConfig.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Converts a ace_setting config into a cba setting @@ -13,8 +14,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_config"]; @@ -33,6 +32,7 @@ private _isForced = (getNumber (_config >> "force")) > 0; private _category = getText (_config >> "category"); private _cbaIsGlobal = (!_isClientSettable) || _isForced; +private _warnIfChangedMidMission = _cbaIsGlobal && {(getNumber (_config >> "canBeChanged")) == 0}; if (_isForced) then {GVAR(cbaSettings_forcedSettings) pushBack (toLower _varName);}; // Basic handling of setting types CBA doesn't support: @@ -98,7 +98,7 @@ private _code = compile format ['["%1", _this] call FUNC(cbaSettings_settingChan TRACE_2("setting",_cbaSettingType,_cbaValueInfo); TRACE_4("",_isForced,_cbaIsGlobal,_category,_cbaValueInfo); -private _return = [_varName, _cbaSettingType, [_localizedName, _localizedDescription], _category, _cbaValueInfo, _cbaIsGlobal, _code] call CBA_settings_fnc_init; +private _return = [_varName, _cbaSettingType, [_localizedName, _localizedDescription], _category, _cbaValueInfo, _cbaIsGlobal, _code, _warnIfChangedMidMission] call CBA_settings_fnc_init; TRACE_1("returned",_return); if ((isNil "_return") || {_return != 0}) then {ERROR_1("Setting [%1] - CBA Error",_varName);}; _return diff --git a/addons/common/functions/fnc_cbaSettings_settingChanged.sqf b/addons/common/functions/fnc_cbaSettings_settingChanged.sqf index 6fa99e313d..055e9b9da6 100644 --- a/addons/common/functions/fnc_cbaSettings_settingChanged.sqf +++ b/addons/common/functions/fnc_cbaSettings_settingChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Function for handeling a cba setting being changed. @@ -16,18 +17,15 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_settingName", "_newValue", ["_canBeChanged", false]]; TRACE_2("",_settingName,_newValue); ["ace_settingChanged", [_settingName, _newValue]] call CBA_fnc_localEvent; -if (_canBeChanged) exitWith {}; +if (!((toLower _settingName) in CBA_settings_needRestart)) exitWith {}; +if (_canBeChanged) exitWith {WARNING_1("update cba setting [%1] to use correct Need Restart param",_settingName);}; if (!GVAR(settingsInitFinished)) exitWith {}; // Ignore changed event before CBA_settingsInitialized -if (CBA_settings_default getVariable [_settingName, []] param [7, 0] == 0) exitWith {}; // Ignore if not a global setting -if ((getNumber (configFile >> "ACE_settings" >> _settingName >> "canBeChanged")) == 1) exitWith {}; // Ignore if flagged as ok to change -WARNING_1("Global setting [%1] changed mid-mission",_settingName); -[QGVAR(displayTextStructured), [format ["Global setting %1 changed mid-mission. Mission restart may be required to prevent issues", _settingName], 4]] call CBA_fnc_localEvent; +WARNING_1("Setting [%1] changed mid-mission",_settingName); +[QGVAR(displayTextStructured), [format ["Setting %1 changed mid-mission. Mission restart may be required to prevent issues", _settingName], 4]] call CBA_fnc_localEvent; diff --git a/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf b/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf index 8d55f671b7..703e0263dc 100644 --- a/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf +++ b/addons/common/functions/fnc_cbaSettings_transferUserSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Transfers a client's old ace settings to cba @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!hasInterface) exitWith {}; diff --git a/addons/common/functions/fnc_changeProjectileDirection.sqf b/addons/common/functions/fnc_changeProjectileDirection.sqf index 6e42ee332a..f355662598 100644 --- a/addons/common/functions/fnc_changeProjectileDirection.sqf +++ b/addons/common/functions/fnc_changeProjectileDirection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Adjust a projectiles velocity and dir + up vector. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_projectile", "_adjustDir", "_adjustUp", ["_adjustSpeed",0]]; diff --git a/addons/common/functions/fnc_checkFiles.sqf b/addons/common/functions/fnc_checkFiles.sqf index 1a3d34bc86..62a344952f 100644 --- a/addons/common/functions/fnc_checkFiles.sqf +++ b/addons/common/functions/fnc_checkFiles.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Compares version numbers of PBOs and DLLs. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" /////////////// // check addons diff --git a/addons/common/functions/fnc_checkPBOs.sqf b/addons/common/functions/fnc_checkPBOs.sqf index 2504d73dc1..b45fae45d6 100644 --- a/addons/common/functions/fnc_checkPBOs.sqf +++ b/addons/common/functions/fnc_checkPBOs.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Used to execute the checkPBOs module without placing the module. Don't use this together with the module. @@ -19,7 +20,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_mode", ["_checkAll", false], ["_whitelist", "", [""]]]; TRACE_3("params",_mode,_checkAll,_whitelist); diff --git a/addons/common/functions/fnc_claim.sqf b/addons/common/functions/fnc_claim.sqf index 8df41cb241..5c291c78da 100644 --- a/addons/common/functions/fnc_claim.sqf +++ b/addons/common/functions/fnc_claim.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Unit claims the ownership over an object. This is used to prevent multiple players from draging the same ammo box or using up the same wheel when repairing etc. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target", ["_lockTarget", false]]; diff --git a/addons/common/functions/fnc_codeToString.sqf b/addons/common/functions/fnc_codeToString.sqf index ff4597f7bb..b938148220 100644 --- a/addons/common/functions/fnc_codeToString.sqf +++ b/addons/common/functions/fnc_codeToString.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * 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. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_code"]; if (_code isEqualType "") exitWith {_code}; diff --git a/addons/common/functions/fnc_createOrthonormalReference.sqf b/addons/common/functions/fnc_createOrthonormalReference.sqf index cb443de15b..d705086e85 100644 --- a/addons/common/functions/fnc_createOrthonormalReference.sqf +++ b/addons/common/functions/fnc_createOrthonormalReference.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Returns a orthonormal system of reference aligned with the supplied vector @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" [_this] params [["_vector", [0,0,1], [[]], 3]]; diff --git a/addons/common/functions/fnc_currentChannel.sqf b/addons/common/functions/fnc_currentChannel.sqf index 0844ebd881..350f91c9a2 100644 --- a/addons/common/functions/fnc_currentChannel.sqf +++ b/addons/common/functions/fnc_currentChannel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns the current radio / chat / marker channel. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" #define CHANNELS ["global", "side", "command", "group", "vehicle", "direct"] #define CHANNELS_LOCALIZED [localize "str_channel_global", localize "str_channel_side", localize "str_channel_command", localize "str_channel_group", localize "str_channel_vehicle", localize "str_channel_direct"] diff --git a/addons/common/functions/fnc_debug.sqf b/addons/common/functions/fnc_debug.sqf index a825c82523..2e08a19faf 100644 --- a/addons/common/functions/fnc_debug.sqf +++ b/addons/common/functions/fnc_debug.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Print logging messages through the ACE framework. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" #define DEFAULT_LOGGING_LEVEL -1 #define DEFAULT_TEXT_DISPLAY -1 diff --git a/addons/common/functions/fnc_debugModule.sqf b/addons/common/functions/fnc_debugModule.sqf index c4fa7b8547..90ad5ab6ba 100644 --- a/addons/common/functions/fnc_debugModule.sqf +++ b/addons/common/functions/fnc_debugModule.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * ? @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_entity"]; diff --git a/addons/common/functions/fnc_defineVariable.sqf b/addons/common/functions/fnc_defineVariable.sqf index 7c1a694aeb..ba12d1c426 100644 --- a/addons/common/functions/fnc_defineVariable.sqf +++ b/addons/common/functions/fnc_defineVariable.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Define a variable for the ACE variable framework @@ -18,7 +19,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_name", "_value", "_defaultGlobal", "_category", ["_code", 0], ["_persistent", false]]; diff --git a/addons/common/functions/fnc_deprecateComponent.sqf b/addons/common/functions/fnc_deprecateComponent.sqf index 6bf38559fc..a723b733ec 100644 --- a/addons/common/functions/fnc_deprecateComponent.sqf +++ b/addons/common/functions/fnc_deprecateComponent.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Mark a component as deprecated and switches it to a new component if that is available @@ -15,7 +16,6 @@ * Example: * [["ace_sitting", "ace_sitting_enabled"], ["acex_sitting", "acex_sitting_enabled"], "3.7.0"] call ace_common_fnc_deprecateComponent; */ -#include "script_component.hpp" params ["_oldComponent", "_newComponent", "_version"]; diff --git a/addons/common/functions/fnc_deviceKeyFindValidIndex.sqf b/addons/common/functions/fnc_deviceKeyFindValidIndex.sqf index aeacf940cc..1e8ea86a53 100644 --- a/addons/common/functions/fnc_deviceKeyFindValidIndex.sqf +++ b/addons/common/functions/fnc_deviceKeyFindValidIndex.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Finds next valid index for the device array. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_searchOffsetOrName", 0]]; diff --git a/addons/common/functions/fnc_deviceKeyRegisterNew.sqf b/addons/common/functions/fnc_deviceKeyRegisterNew.sqf index ce012fc3aa..2e6dbbee99 100644 --- a/addons/common/functions/fnc_deviceKeyRegisterNew.sqf +++ b/addons/common/functions/fnc_deviceKeyRegisterNew.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Finds next valid index for the device array. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_displayName", "_iconImage", "_conditionCode", "_toggleCode", "_closeCode"]; diff --git a/addons/common/functions/fnc_disableAI.sqf b/addons/common/functions/fnc_disableAI.sqf index 75c59d1a9a..88b6f2bd49 100644 --- a/addons/common/functions/fnc_disableAI.sqf +++ b/addons/common/functions/fnc_disableAI.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, KoffeinFlummi * Disables/Enables AI @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_disable", true, [false]]]; diff --git a/addons/common/functions/fnc_disableUserInput.sqf b/addons/common/functions/fnc_disableUserInput.sqf index 729da9b504..44468641f3 100644 --- a/addons/common/functions/fnc_disableUserInput.sqf +++ b/addons/common/functions/fnc_disableUserInput.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Disables key input. ESC can still be pressed to open the menu. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_state"]; diff --git a/addons/common/functions/fnc_displayIcon.sqf b/addons/common/functions/fnc_displayIcon.sqf index ff8598d056..11e9f5d6e7 100644 --- a/addons/common/functions/fnc_displayIcon.sqf +++ b/addons/common/functions/fnc_displayIcon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Draw progress bar and execute given function if succesful. @@ -18,7 +19,6 @@ * * Public: Yes */ -#include "script_component.hpp" // positions for the icon UI #define RIGHT_SIDE (safezoneW + safezoneX) diff --git a/addons/common/functions/fnc_displayText.sqf b/addons/common/functions/fnc_displayText.sqf index fdd1f960d5..f34a0cdfcd 100644 --- a/addons/common/functions/fnc_displayText.sqf +++ b/addons/common/functions/fnc_displayText.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Display a message. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_text", ["_sound", false], ["_delay", 2], ["_priority", 0]]; diff --git a/addons/common/functions/fnc_displayTextPicture.sqf b/addons/common/functions/fnc_displayTextPicture.sqf index b0c42824be..b25945382f 100644 --- a/addons/common/functions/fnc_displayTextPicture.sqf +++ b/addons/common/functions/fnc_displayTextPicture.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, Glowbal * Display a structured text with image. @@ -18,7 +19,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_text", ""], ["_image", "", [""]], ["_imageColor", [1,1,1], [[]]], ["_target", ACE_player, [objNull]], ["_size", 2, [0]]]; diff --git a/addons/common/functions/fnc_displayTextStructured.sqf b/addons/common/functions/fnc_displayTextStructured.sqf index b24b59ba81..e54e481b5a 100644 --- a/addons/common/functions/fnc_displayTextStructured.sqf +++ b/addons/common/functions/fnc_displayTextStructured.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, Glowbal, GitHawk * Display a structured text. @@ -17,7 +18,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_text", ""], ["_size", 1.5, [0]], ["_target", ACE_player, [objNull]], ["_width", 10, [0]]]; diff --git a/addons/common/functions/fnc_doAnimation.sqf b/addons/common/functions/fnc_doAnimation.sqf index 720518d003..678f4d4ef7 100644 --- a/addons/common/functions/fnc_doAnimation.sqf +++ b/addons/common/functions/fnc_doAnimation.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Execute an animation. This is used to not break things like the unconsciousness animation. @@ -19,7 +20,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_animation", ["_priority", 0], ["_force", false]]; TRACE_4("params",_unit,_animation,_priority,_force); diff --git a/addons/common/functions/fnc_doGesture.sqf b/addons/common/functions/fnc_doGesture.sqf index 9805beffc7..3aa4656cfd 100644 --- a/addons/common/functions/fnc_doGesture.sqf +++ b/addons/common/functions/fnc_doGesture.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Play a gesture. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_animation", ["_priority", 0]]; TRACE_3("params",_unit,_animation,_priority); diff --git a/addons/common/functions/fnc_dropBackpack.sqf b/addons/common/functions/fnc_dropBackpack.sqf index dcbb9a3f70..38f1be8a52 100644 --- a/addons/common/functions/fnc_dropBackpack.sqf +++ b/addons/common/functions/fnc_dropBackpack.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Drops a backback. Also returns the ground wepaon holder object of the dropped backpack. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_dumpArray.sqf b/addons/common/functions/fnc_dumpArray.sqf index 6c1caf7908..4997ad119a 100644 --- a/addons/common/functions/fnc_dumpArray.sqf +++ b/addons/common/functions/fnc_dumpArray.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ? * Dumps an array to the RPT, showing the depth of each element. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_var", ["_depth", 0, [0]]]; diff --git a/addons/common/functions/fnc_dumpPerformanceCounters.sqf b/addons/common/functions/fnc_dumpPerformanceCounters.sqf index a6bcc1d29c..2dad092a2c 100644 --- a/addons/common/functions/fnc_dumpPerformanceCounters.sqf +++ b/addons/common/functions/fnc_dumpPerformanceCounters.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ? * Dumps performance counter statistics into Logs. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" diag_log text format ["REGISTERED ACE PFH HANDLERS"]; diag_log text format ["-------------------------------------------"]; diff --git a/addons/common/functions/fnc_endRadioTransmission.sqf b/addons/common/functions/fnc_endRadioTransmission.sqf index 57099afe90..16985a8773 100644 --- a/addons/common/functions/fnc_endRadioTransmission.sqf +++ b/addons/common/functions/fnc_endRadioTransmission.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" ["ace_endRadioTransmissions"] call CBA_fnc_localEvent; diff --git a/addons/common/functions/fnc_eraseCache.sqf b/addons/common/functions/fnc_eraseCache.sqf index 0bcfab1dd4..79eb4444fa 100644 --- a/addons/common/functions/fnc_eraseCache.sqf +++ b/addons/common/functions/fnc_eraseCache.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Deletes a cached result @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_namespace", "_uid"]; diff --git a/addons/common/functions/fnc_errorMessage.sqf b/addons/common/functions/fnc_errorMessage.sqf index 1be21e0e58..c062c8836c 100644 --- a/addons/common/functions/fnc_errorMessage.sqf +++ b/addons/common/functions/fnc_errorMessage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, based on BIS_fnc_errorMsg and BIS_fnc_guiMessage by Karel Moricky (BI) * Stops simulation and opens a textbox with error message. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; endLoadingScreen; diff --git a/addons/common/functions/fnc_findUnloadPosition.sqf b/addons/common/functions/fnc_findUnloadPosition.sqf index 818b15a864..22e23c7f2b 100644 --- a/addons/common/functions/fnc_findUnloadPosition.sqf +++ b/addons/common/functions/fnc_findUnloadPosition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror, ViperMaul * Find a safe place near a vehicle to unload something. @@ -18,8 +19,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" //Number of tests run (effects performance in worst case scenarior where nothing is found VERSUES reliably finding a pos): #define MAX_TESTS 75 diff --git a/addons/common/functions/fnc_firedEH.sqf b/addons/common/functions/fnc_firedEH.sqf index cbf49f626b..22a64f5c23 100644 --- a/addons/common/functions/fnc_firedEH.sqf +++ b/addons/common/functions/fnc_firedEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Unfied handling of weapon fire @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" BEGIN_COUNTER(firedEH); diff --git a/addons/common/functions/fnc_fixCollision.sqf b/addons/common/functions/fnc_fixCollision.sqf index 569d7d1e87..ee61d83c35 100644 --- a/addons/common/functions/fnc_fixCollision.sqf +++ b/addons/common/functions/fnc_fixCollision.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Attempt to fix PhysX collisions causing unreasonable impact forces and damage. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // allowDamage requires local object if (!local _this) exitWith {}; diff --git a/addons/common/functions/fnc_fixFloating.sqf b/addons/common/functions/fnc_fixFloating.sqf index dc7608f9fe..03e7933e2e 100644 --- a/addons/common/functions/fnc_fixFloating.sqf +++ b/addons/common/functions/fnc_fixFloating.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Attempt to fix floating physx with disabled damage after setPosXXX commands. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object"]; diff --git a/addons/common/functions/fnc_fixLoweredRifleAnimation.sqf b/addons/common/functions/fnc_fixLoweredRifleAnimation.sqf index f804b087d2..d89a3978c6 100644 --- a/addons/common/functions/fnc_fixLoweredRifleAnimation.sqf +++ b/addons/common/functions/fnc_fixLoweredRifleAnimation.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Fixes the lowered rifle animation @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_fixPosition.sqf b/addons/common/functions/fnc_fixPosition.sqf index 700d47dc19..ac152cf5c9 100644 --- a/addons/common/functions/fnc_fixPosition.sqf +++ b/addons/common/functions/fnc_fixPosition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, Jonpas * Fixes position of an object. E.g. moves object above ground and adjusts to terrain slope. Requires local object. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // setVectorUp requires local object if (!local _this) exitWith {}; diff --git a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf index fd94ae8024..eeb96002d1 100644 --- a/addons/common/functions/fnc_getAllDefinedSetVariables.sqf +++ b/addons/common/functions/fnc_getAllDefinedSetVariables.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Returns an 2d array of all variables that have been set on the object @@ -19,7 +20,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_object", ["_category", ""]]; diff --git a/addons/common/functions/fnc_getChildren.sqf b/addons/common/functions/fnc_getChildren.sqf index 56bc5d779c..998d0b4399 100644 --- a/addons/common/functions/fnc_getChildren.sqf +++ b/addons/common/functions/fnc_getChildren.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Obtain children of a config entry @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_name", "_cfgClass"]; diff --git a/addons/common/functions/fnc_getConfigCommander.sqf b/addons/common/functions/fnc_getConfigCommander.sqf index 45d7d6389c..f3d011c57a 100644 --- a/addons/common/functions/fnc_getConfigCommander.sqf +++ b/addons/common/functions/fnc_getConfigCommander.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the commander config of a vehicles turret. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/common/functions/fnc_getConfigGunner.sqf b/addons/common/functions/fnc_getConfigGunner.sqf index c14eb85ed5..732256b8a1 100644 --- a/addons/common/functions/fnc_getConfigGunner.sqf +++ b/addons/common/functions/fnc_getConfigGunner.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the gunner config of a vehicles turret. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/common/functions/fnc_getDeathAnim.sqf b/addons/common/functions/fnc_getDeathAnim.sqf index 60aaf3bc0c..8fb72e0a21 100644 --- a/addons/common/functions/fnc_getDeathAnim.sqf +++ b/addons/common/functions/fnc_getDeathAnim.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, PabstMirror * Get the death animation for the unit at current time @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_getDefaultAnim.sqf b/addons/common/functions/fnc_getDefaultAnim.sqf index c2c0e1e7c4..9fea3e15df 100644 --- a/addons/common/functions/fnc_getDefaultAnim.sqf +++ b/addons/common/functions/fnc_getDefaultAnim.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the Defualt animation for the unit @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_getDefinedVariable.sqf b/addons/common/functions/fnc_getDefinedVariable.sqf index 98267ab18f..7e20570cc1 100644 --- a/addons/common/functions/fnc_getDefinedVariable.sqf +++ b/addons/common/functions/fnc_getDefinedVariable.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Grabs a variable. If variable has not been set, attempts to use default defined value @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_variable", "_defaultValue"]; diff --git a/addons/common/functions/fnc_getDefinedVariableDefault.sqf b/addons/common/functions/fnc_getDefinedVariableDefault.sqf index 88199f8ad3..edae4ef3ef 100644 --- a/addons/common/functions/fnc_getDefinedVariableDefault.sqf +++ b/addons/common/functions/fnc_getDefinedVariableDefault.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Get the variable default value @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_varName"]; diff --git a/addons/common/functions/fnc_getDefinedVariableInfo.sqf b/addons/common/functions/fnc_getDefinedVariableInfo.sqf index e22ba193f6..f6aeca0df9 100644 --- a/addons/common/functions/fnc_getDefinedVariableInfo.sqf +++ b/addons/common/functions/fnc_getDefinedVariableInfo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Get the variable Informations @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_varName"]; diff --git a/addons/common/functions/fnc_getDisplayConfigName.sqf b/addons/common/functions/fnc_getDisplayConfigName.sqf index d61800e5ce..f952d5c385 100644 --- a/addons/common/functions/fnc_getDisplayConfigName.sqf +++ b/addons/common/functions/fnc_getDisplayConfigName.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get display classnames from config with given idd. @@ -15,7 +16,6 @@ * * Note: Really slow due to iteration through whole config. Meant for debugging. */ -#include "script_component.hpp" params ["_idd"]; diff --git a/addons/common/functions/fnc_getDoorTurrets.sqf b/addons/common/functions/fnc_getDoorTurrets.sqf index cfb0369d63..93b0360042 100644 --- a/addons/common/functions/fnc_getDoorTurrets.sqf +++ b/addons/common/functions/fnc_getDoorTurrets.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Returns all turret indecies of door gunners. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/common/functions/fnc_getFirstObjectIntersection.sqf b/addons/common/functions/fnc_getFirstObjectIntersection.sqf index 951f48ad16..1120707b2b 100644 --- a/addons/common/functions/fnc_getFirstObjectIntersection.sqf +++ b/addons/common/functions/fnc_getFirstObjectIntersection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Returns the the first intersection with terrain between two positions. @todo rewrite using lineIntersectsSurfaces? @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_source", "_destination", "_accuracy"]; diff --git a/addons/common/functions/fnc_getFirstTerrainIntersection.sqf b/addons/common/functions/fnc_getFirstTerrainIntersection.sqf index cfb2397c95..989486b1ac 100644 --- a/addons/common/functions/fnc_getFirstTerrainIntersection.sqf +++ b/addons/common/functions/fnc_getFirstTerrainIntersection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Returns the the first intersection with an object between two positions. @todo rewrite using lineIntersectsSurfaces? @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_source", "_destination", "_accuracy"]; diff --git a/addons/common/functions/fnc_getGunner.sqf b/addons/common/functions/fnc_getGunner.sqf index 85f4cef199..bd65c49ed4 100644 --- a/addons/common/functions/fnc_getGunner.sqf +++ b/addons/common/functions/fnc_getGunner.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns gunner using specified weapon type in vehicle. Only works if all turrets have different weapons. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_vehicle", objNull, [objNull]], ["_weapon", "", [""]]]; diff --git a/addons/common/functions/fnc_getInPosition.sqf b/addons/common/functions/fnc_getInPosition.sqf index a19a150704..a45b5546a6 100644 --- a/addons/common/functions/fnc_getInPosition.sqf +++ b/addons/common/functions/fnc_getInPosition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Move unit into given vehicle position or switch to that position if the unit is already inside the vehicle. @@ -16,7 +17,6 @@ * * Public: Yes */ -#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/common/functions/fnc_getItemType.sqf b/addons/common/functions/fnc_getItemType.sqf index 33d9d267e4..5212c6d57e 100644 --- a/addons/common/functions/fnc_getItemType.sqf +++ b/addons/common/functions/fnc_getItemType.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns item type of given classname. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_item"]; @@ -38,35 +38,35 @@ private _default = ["item", "magazine"] select (_cfgType == "CfgMagazines"); switch (true) do { case (_type == 0): {[_default, "unknown"]}; - case (_type == 2^0): {["weapon", "primary"]}; - case (_type == 2^1): {["weapon", "handgun"]}; - case (_type == 2^2): {["weapon", "secondary"]}; - case (_type < 2^4): {["weapon", "unknown"]}; - case (_type == 2^4): {["magazine", "handgun"]}; // handgun - case (_type == 2^8): {["magazine", "primary"]}; // rifle - case (_type == 2^9): {["magazine", "secondary"]}; // rpg, mg, mines + case (_type == TYPE_WEAPON_PRIMARY): {["weapon", "primary"]}; + case (_type == TYPE_WEAPON_HANDGUN): {["weapon", "handgun"]}; + case (_type == TYPE_WEAPON_SECONDARY): {["weapon", "secondary"]}; + case (_type < TYPE_MAGAZINE_HANDGUN_AND_GL): {["weapon", "unknown"]}; + case (_type == TYPE_MAGAZINE_HANDGUN_AND_GL): {["magazine", "handgun"]}; // handgun + case (_type == TYPE_MAGAZINE_PRIMARY_AND_THROW): {["magazine", "primary"]}; // rifle + case (_type == TYPE_MAGAZINE_SECONDARY_AND_PUT): {["magazine", "secondary"]}; // rpg, mg, mines //case (_type < 2^11): {["magazine", "unknown"]}; - case (_type == 101): {["item", "muzzle"]}; - case (_type == 201): {["item", "optics"]}; - case (_type == 301): {["item", "flashlight"]}; - case (_type == 302): {["item", "under"]}; // czech for bipod item - case (_type == 401): {["item", "first_aid_kit"]}; - case (_type == 501): {["item", "fins"]}; // not implemented - case (_type == 601): {["item", "breathing_bomb"]}; // not implemented - case (_type == 603): {["item", "goggles"]}; - case (_type == 604): {["item", "scuba"]}; // not implemented - case (_type == 605): {["item", "headgear"]}; - case (_type == 611): {["item", "radio"]}; - case (_type == 616): {["item", "hmd"]}; - case (_type == 617): {["item", "binocular"]}; - case (_type == 619): {["item", "medikit"]}; - case (_type == 620): {["item", "toolkit"]}; - case (_type == 621): {["item", "uav_terminal"]}; - case (_type == 701): {["item", "vest"]}; - case (_type == 801): {["item", "uniform"]}; + case (_type == TYPE_MUZZLE): {["item", "muzzle"]}; + case (_type == TYPE_OPTICS): {["item", "optics"]}; + case (_type == TYPE_FLASHLIGHT): {["item", "flashlight"]}; + case (_type == TYPE_BIPOD): {["item", "under"]}; // czech for bipod item + case (_type == TYPE_FIRST_AID_KIT): {["item", "first_aid_kit"]}; + case (_type == TYPE_FINS): {["item", "fins"]}; // not implemented + case (_type == TYPE_BREATHING_BOMB): {["item", "breathing_bomb"]}; // not implemented + case (_type == TYPE_GOGGLE): {["item", "goggles"]}; + case (_type == TYPE_SCUBA): {["item", "scuba"]}; // not implemented + case (_type == TYPE_HEADGEAR): {["item", "headgear"]}; + case (_type == TYPE_RADIO): {["item", "radio"]}; + case (_type == TYPE_HMD): {["item", "hmd"]}; + case (_type == TYPE_BINOCULAR): {["item", "binocular"]}; + case (_type == TYPE_MEDIKIT): {["item", "medikit"]}; + case (_type == TYPE_TOOLKIT): {["item", "toolkit"]}; + case (_type == TYPE_UAV_TERMINAL): {["item", "uav_terminal"]}; + case (_type == TYPE_VEST): {["item", "vest"]}; + case (_type == TYPE_UNIFORM): {["item", "uniform"]}; - case (_type == 2^12): { + case (_type == TYPE_BINOCULAR_AND_NVG): { switch (toLower _simulation) do { case ("weapon"): {["weapon", "binocular"]}; case ("binocular"): {["weapon", "binocular"]}; @@ -76,8 +76,8 @@ switch (true) do { }; }; - case (_type == 2^16): {["weapon", "vehicle"]}; - case (_type == 2^17): { + case (_type == TYPE_WEAPON_VEHICLE): {["weapon", "vehicle"]}; + case (_type == TYPE_ITEM): { switch (toLower _simulation) do { case ("itemmap"): {["item", "map"]}; case ("itemgps"): {["item", "gps"]}; diff --git a/addons/common/functions/fnc_getLightProperties.sqf b/addons/common/functions/fnc_getLightProperties.sqf index ffaddfaf87..002868dd4e 100644 --- a/addons/common/functions/fnc_getLightProperties.sqf +++ b/addons/common/functions/fnc_getLightProperties.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Read properties of given vehicles light. @@ -18,7 +19,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_vehicle", "_light"]; diff --git a/addons/common/functions/fnc_getLightPropertiesWeapon.sqf b/addons/common/functions/fnc_getLightPropertiesWeapon.sqf index dfcd483304..fca17dd51f 100644 --- a/addons/common/functions/fnc_getLightPropertiesWeapon.sqf +++ b/addons/common/functions/fnc_getLightPropertiesWeapon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Read properties of given flashlight. @@ -17,7 +18,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_weapon"]; diff --git a/addons/common/functions/fnc_getMGRSdata.sqf b/addons/common/functions/fnc_getMGRSdata.sqf index 4b4906aba3..f6ca81175b 100644 --- a/addons/common/functions/fnc_getMGRSdata.sqf +++ b/addons/common/functions/fnc_getMGRSdata.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: VKing * Gets the current map's MGRS grid zone designator and 100km square. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_map", worldName]]; diff --git a/addons/common/functions/fnc_getMapGridData.sqf b/addons/common/functions/fnc_getMapGridData.sqf index a33e49e7d0..c329c0b3f9 100644 --- a/addons/common/functions/fnc_getMapGridData.sqf +++ b/addons/common/functions/fnc_getMapGridData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Finds real x/y offset and map step for a 10 digit grid @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(mapGridData) = []; diff --git a/addons/common/functions/fnc_getMapGridFromPos.sqf b/addons/common/functions/fnc_getMapGridFromPos.sqf index 8604d68fa6..defee04e57 100644 --- a/addons/common/functions/fnc_getMapGridFromPos.sqf +++ b/addons/common/functions/fnc_getMapGridFromPos.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: VKing, PabstMirror * Gets a 10-digit map grid for the given world position @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_pos", ["_returnSingleString", false]]; diff --git a/addons/common/functions/fnc_getMapPosFromGrid.sqf b/addons/common/functions/fnc_getMapPosFromGrid.sqf index 18599f4ef4..d4469b56cc 100644 --- a/addons/common/functions/fnc_getMapPosFromGrid.sqf +++ b/addons/common/functions/fnc_getMapPosFromGrid.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Gets position from grid cords @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_inputString", ["_getCenterOfGrid", true]]; diff --git a/addons/common/functions/fnc_getMarkerType.sqf b/addons/common/functions/fnc_getMarkerType.sqf index 3d5864cf08..ed551e4c1b 100644 --- a/addons/common/functions/fnc_getMarkerType.sqf +++ b/addons/common/functions/fnc_getMarkerType.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Get the apropriate marker for a group. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_group"]; diff --git a/addons/common/functions/fnc_getName.sqf b/addons/common/functions/fnc_getName.sqf index 4c49e8dc11..0bcce9d2c8 100644 --- a/addons/common/functions/fnc_getName.sqf +++ b/addons/common/functions/fnc_getName.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns the name of the object. Used to prevent issues with the name command. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", ["_showEffective", false], ["_useRaw", false]]; diff --git a/addons/common/functions/fnc_getNumberMagazinesIn.sqf b/addons/common/functions/fnc_getNumberMagazinesIn.sqf index dd02d055e0..7beaf3ee37 100644 --- a/addons/common/functions/fnc_getNumberMagazinesIn.sqf +++ b/addons/common/functions/fnc_getNumberMagazinesIn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Count magazines of unit. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_magazine"]; diff --git a/addons/common/functions/fnc_getPitchBankYaw.sqf b/addons/common/functions/fnc_getPitchBankYaw.sqf index 2a7a5c43e8..6cdec367de 100644 --- a/addons/common/functions/fnc_getPitchBankYaw.sqf +++ b/addons/common/functions/fnc_getPitchBankYaw.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Returns pitch, bank, yaw for given vehicle in degrees. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/common/functions/fnc_getPylonTurret.sqf b/addons/common/functions/fnc_getPylonTurret.sqf index ff343173dd..b27e6eb582 100644 --- a/addons/common/functions/fnc_getPylonTurret.sqf +++ b/addons/common/functions/fnc_getPylonTurret.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Finds turret owner of a pylon. @@ -14,8 +15,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_vehicle", "_pylonIndex"]; diff --git a/addons/common/functions/fnc_getReflectorsWithSelections.sqf b/addons/common/functions/fnc_getReflectorsWithSelections.sqf index d166818494..97feca6e19 100644 --- a/addons/common/functions/fnc_getReflectorsWithSelections.sqf +++ b/addons/common/functions/fnc_getReflectorsWithSelections.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -17,7 +18,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/common/functions/fnc_getSelectionsWithoutHitPoints.sqf b/addons/common/functions/fnc_getSelectionsWithoutHitPoints.sqf index 028024a94e..5c30245732 100644 --- a/addons/common/functions/fnc_getSelectionsWithoutHitPoints.sqf +++ b/addons/common/functions/fnc_getSelectionsWithoutHitPoints.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/common/functions/fnc_getSettingData.sqf b/addons/common/functions/fnc_getSettingData.sqf index 0eb76d9b7b..79ee4f3264 100644 --- a/addons/common/functions/fnc_getSettingData.sqf +++ b/addons/common/functions/fnc_getSettingData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Returns the metadata of a setting if it exists @@ -22,7 +23,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_name"]; diff --git a/addons/common/functions/fnc_getStaminaBarControl.sqf b/addons/common/functions/fnc_getStaminaBarControl.sqf index cfdef5bb35..a426a7f933 100644 --- a/addons/common/functions/fnc_getStaminaBarControl.sqf +++ b/addons/common/functions/fnc_getStaminaBarControl.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns the control of the Stamina Bar from Arma 1.54. @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" (uiNamespace getVariable [QGVAR(dlgStaminaBar), displayNull]) displayCtrl IDC_STAMINA_BAR diff --git a/addons/common/functions/fnc_getTargetAzimuthAndInclination.sqf b/addons/common/functions/fnc_getTargetAzimuthAndInclination.sqf index 98e7a5e3b2..3a4da0326f 100644 --- a/addons/common/functions/fnc_getTargetAzimuthAndInclination.sqf +++ b/addons/common/functions/fnc_getTargetAzimuthAndInclination.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get players viewing direction and slope. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" private _position = ATLToASL positionCameraToWorld [0, 0, 0]; private _direction = ATLToASL positionCameraToWorld [0, 0, 1]; diff --git a/addons/common/functions/fnc_getTargetDistance.sqf b/addons/common/functions/fnc_getTargetDistance.sqf index c93941eb12..ff6d2cc198 100644 --- a/addons/common/functions/fnc_getTargetDistance.sqf +++ b/addons/common/functions/fnc_getTargetDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: VKing * Get the distance to the next object the player is looking at. Used for laser distance measurements. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_accuracy",1], ["_maxDistance",5000], ["_minDistance",0]]; diff --git a/addons/common/functions/fnc_getTargetObject.sqf b/addons/common/functions/fnc_getTargetObject.sqf index 9ee1d26ff3..a15cd309be 100644 --- a/addons/common/functions/fnc_getTargetObject.sqf +++ b/addons/common/functions/fnc_getTargetObject.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the nearest object the player is looking at. Used for laser designator instead of cursorTarget. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_maxDistance"]; diff --git a/addons/common/functions/fnc_getTurnedOnLights.sqf b/addons/common/functions/fnc_getTurnedOnLights.sqf index f95a4bbf19..a40832d61d 100644 --- a/addons/common/functions/fnc_getTurnedOnLights.sqf +++ b/addons/common/functions/fnc_getTurnedOnLights.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns all turned on lights of any vehicle or streetlamp. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/common/functions/fnc_getTurretCommander.sqf b/addons/common/functions/fnc_getTurretCommander.sqf index 2f832438b5..49d0798d35 100644 --- a/addons/common/functions/fnc_getTurretCommander.sqf +++ b/addons/common/functions/fnc_getTurretCommander.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the turret index of a vehicles commander. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_vehicle", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_getTurretConfigPath.sqf b/addons/common/functions/fnc_getTurretConfigPath.sqf index 6af9aa62e3..aee865b3fb 100644 --- a/addons/common/functions/fnc_getTurretConfigPath.sqf +++ b/addons/common/functions/fnc_getTurretConfigPath.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the config path of a vehicles turret. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_config", "_turretIndex"]; diff --git a/addons/common/functions/fnc_getTurretCopilot.sqf b/addons/common/functions/fnc_getTurretCopilot.sqf index ef52200f6e..7207ac5b17 100644 --- a/addons/common/functions/fnc_getTurretCopilot.sqf +++ b/addons/common/functions/fnc_getTurretCopilot.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the turret index of a vehicles copilot. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_vehicle", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_getTurretDirection.sqf b/addons/common/functions/fnc_getTurretDirection.sqf index 7bec5cf3e6..78db8bc8e6 100644 --- a/addons/common/functions/fnc_getTurretDirection.sqf +++ b/addons/common/functions/fnc_getTurretDirection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Get the absolute turret direction for FOV/PIP turret. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_vehicle", "_position"]; diff --git a/addons/common/functions/fnc_getTurretGunner.sqf b/addons/common/functions/fnc_getTurretGunner.sqf index e1846f96de..180a10914e 100644 --- a/addons/common/functions/fnc_getTurretGunner.sqf +++ b/addons/common/functions/fnc_getTurretGunner.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the turret index of a vehicles gunner. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_vehicle", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_getTurretIndex.sqf b/addons/common/functions/fnc_getTurretIndex.sqf index df2d540873..423f2e6289 100644 --- a/addons/common/functions/fnc_getTurretIndex.sqf +++ b/addons/common/functions/fnc_getTurretIndex.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the turret index of a units current turret. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_getTurretsFFV.sqf b/addons/common/functions/fnc_getTurretsFFV.sqf index 885396b2bf..0ae04a3032 100644 --- a/addons/common/functions/fnc_getTurretsFFV.sqf +++ b/addons/common/functions/fnc_getTurretsFFV.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the turret indices of ffv turrets. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_vehicle", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_getTurretsOther.sqf b/addons/common/functions/fnc_getTurretsOther.sqf index 04750e98fd..c84b50d842 100644 --- a/addons/common/functions/fnc_getTurretsOther.sqf +++ b/addons/common/functions/fnc_getTurretsOther.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the turret indices of other turrets (not gunner, commander, copilot or ffv). @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_vehicle", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_getUavControlPosition.sqf b/addons/common/functions/fnc_getUavControlPosition.sqf index c98004c7e7..9d6f6de9f2 100644 --- a/addons/common/functions/fnc_getUavControlPosition.sqf +++ b/addons/common/functions/fnc_getUavControlPosition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Returns the seat position of a UAV that the unit is activly controling. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_getVehicleCargo.sqf b/addons/common/functions/fnc_getVehicleCargo.sqf index 5279825008..82442700a2 100644 --- a/addons/common/functions/fnc_getVehicleCargo.sqf +++ b/addons/common/functions/fnc_getVehicleCargo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the vehicle cargo positions. Codrivers and ffv positions are not listed. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_vehicle", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_getVehicleCodriver.sqf b/addons/common/functions/fnc_getVehicleCodriver.sqf index 8b0fd3be29..8deef3f9cd 100644 --- a/addons/common/functions/fnc_getVehicleCodriver.sqf +++ b/addons/common/functions/fnc_getVehicleCodriver.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the vehicle codriver positions. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_vehicle", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_getVehicleCrew.sqf b/addons/common/functions/fnc_getVehicleCrew.sqf index f0377671e9..af699d3b6b 100644 --- a/addons/common/functions/fnc_getVehicleCrew.sqf +++ b/addons/common/functions/fnc_getVehicleCrew.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns array of crew member objects. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_vehicle", ["_types", ["driver", "commander", "gunner", "turret", "cargo", "ffv"]]]; diff --git a/addons/common/functions/fnc_getVehicleIcon.sqf b/addons/common/functions/fnc_getVehicleIcon.sqf index fd556ed580..ce17a66bc2 100644 --- a/addons/common/functions/fnc_getVehicleIcon.sqf +++ b/addons/common/functions/fnc_getVehicleIcon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: AACO * Function used to get the vehicle icon for provided object (cached for repeat use) @@ -13,8 +14,6 @@ * * Public: Yes */ - -#include "script_component.hpp" #define DEFAULT_TEXTURE "\A3\ui_f\data\Map\VehicleIcons\iconVehicle_ca.paa" params [["_object", objNull, [objNull, ""]]]; diff --git a/addons/common/functions/fnc_getVehicleUAVCrew.sqf b/addons/common/functions/fnc_getVehicleUAVCrew.sqf index 9804a14b68..45d151bc30 100644 --- a/addons/common/functions/fnc_getVehicleUAVCrew.sqf +++ b/addons/common/functions/fnc_getVehicleUAVCrew.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns array of uav dummy ais. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_vehicle", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_getVersion.sqf b/addons/common/functions/fnc_getVersion.sqf index e0f2ab9f6d..8f9e39e360 100644 --- a/addons/common/functions/fnc_getVersion.sqf +++ b/addons/common/functions/fnc_getVersion.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Get the version number of the current ACE build. @@ -13,6 +14,5 @@ * * Public: Yes */ -#include "script_component.hpp" getText (configFile >> "CfgPatches" >> "ACE_main" >> "version") // return diff --git a/addons/common/functions/fnc_getWeaponAzimuthAndInclination.sqf b/addons/common/functions/fnc_getWeaponAzimuthAndInclination.sqf index 604a89b9f8..83df3782e4 100644 --- a/addons/common/functions/fnc_getWeaponAzimuthAndInclination.sqf +++ b/addons/common/functions/fnc_getWeaponAzimuthAndInclination.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get local players weapon direction and slope. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_weapon"]; diff --git a/addons/common/functions/fnc_getWeaponIndex.sqf b/addons/common/functions/fnc_getWeaponIndex.sqf index a881233469..b4e94e678f 100644 --- a/addons/common/functions/fnc_getWeaponIndex.sqf +++ b/addons/common/functions/fnc_getWeaponIndex.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the index of the weapon. @@ -18,7 +19,6 @@ * * Public: Yes */ - #include "script_component.hpp" params ["_unit", "_weapon"]; diff --git a/addons/common/functions/fnc_getWeaponModes.sqf b/addons/common/functions/fnc_getWeaponModes.sqf index ede86ac842..93a8614f7f 100644 --- a/addons/common/functions/fnc_getWeaponModes.sqf +++ b/addons/common/functions/fnc_getWeaponModes.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the available firing modes of a weapon. Will ignore the AI helper modes. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_weapon", "", [""]]]; diff --git a/addons/common/functions/fnc_getWeaponMuzzles.sqf b/addons/common/functions/fnc_getWeaponMuzzles.sqf index b0b0533721..264ad2b405 100644 --- a/addons/common/functions/fnc_getWeaponMuzzles.sqf +++ b/addons/common/functions/fnc_getWeaponMuzzles.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the muzzles of a weapon. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_weapon", "", [""]]]; diff --git a/addons/common/functions/fnc_getWeaponState.sqf b/addons/common/functions/fnc_getWeaponState.sqf index 772a5058b9..219f52d369 100644 --- a/addons/common/functions/fnc_getWeaponState.sqf +++ b/addons/common/functions/fnc_getWeaponState.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Return current state of the weapon. Attachments and magazines with ammo. @@ -17,7 +18,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_weapon", nil, [""]]]; diff --git a/addons/common/functions/fnc_getWeaponType.sqf b/addons/common/functions/fnc_getWeaponType.sqf index b53f23d514..1b3e8fd331 100644 --- a/addons/common/functions/fnc_getWeaponType.sqf +++ b/addons/common/functions/fnc_getWeaponType.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check what kind of weapon the given class name is. @@ -17,7 +18,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_weapon"]; diff --git a/addons/common/functions/fnc_getWeight.sqf b/addons/common/functions/fnc_getWeight.sqf index 6c3a224582..5fc92b7703 100644 --- a/addons/common/functions/fnc_getWeight.sqf +++ b/addons/common/functions/fnc_getWeight.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns the weight (from the loadAbs command) in lbs/kg (based on user option) @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", ["_useImperial", false, [false, 0]]]; diff --git a/addons/common/functions/fnc_getWindDirection.sqf b/addons/common/functions/fnc_getWindDirection.sqf index f35047fc30..cb10e18f85 100644 --- a/addons/common/functions/fnc_getWindDirection.sqf +++ b/addons/common/functions/fnc_getWindDirection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get the compass direction the wind is blowing from. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" localize ([ LSTRING(S), diff --git a/addons/common/functions/fnc_getZoom.sqf b/addons/common/functions/fnc_getZoom.sqf index 9c3f7987a4..26144da81e 100644 --- a/addons/common/functions/fnc_getZoom.sqf +++ b/addons/common/functions/fnc_getZoom.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns a value depending on current zoom level. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!hasInterface) exitWith {0}; diff --git a/addons/common/functions/fnc_goKneeling.sqf b/addons/common/functions/fnc_goKneeling.sqf index 5d45a3f400..e9317cc74e 100644 --- a/addons/common/functions/fnc_goKneeling.sqf +++ b/addons/common/functions/fnc_goKneeling.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Move unit to kneeling position (only if not yet prone and not underwater). @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_hadamardProduct.sqf b/addons/common/functions/fnc_hadamardProduct.sqf index 20173e7d0b..07295dcef9 100644 --- a/addons/common/functions/fnc_hadamardProduct.sqf +++ b/addons/common/functions/fnc_hadamardProduct.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Returns the Hadamard Product of two vectors. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_vector1", "_vector2"]; diff --git a/addons/common/functions/fnc_handleEngine.sqf b/addons/common/functions/fnc_handleEngine.sqf index 55696a679e..40574c69c6 100644 --- a/addons/common/functions/fnc_handleEngine.sqf +++ b/addons/common/functions/fnc_handleEngine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Blocks turning on the vehicles engine if set by the status effect handler. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_engineOn"]; if (local _vehicle && {_engineOn} && {_vehicle getVariable [QGVAR(blockEngine), false]}) then { diff --git a/addons/common/functions/fnc_handleModifierKey.sqf b/addons/common/functions/fnc_handleModifierKey.sqf index 094ec278f4..1440a7849e 100644 --- a/addons/common/functions/fnc_handleModifierKey.sqf +++ b/addons/common/functions/fnc_handleModifierKey.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handles key down event for modifier key. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (_this select 3) then {ACE_modifier = 1}; diff --git a/addons/common/functions/fnc_handleModifierKeyUp.sqf b/addons/common/functions/fnc_handleModifierKeyUp.sqf index 97df636050..9ab3cadf7d 100644 --- a/addons/common/functions/fnc_handleModifierKeyUp.sqf +++ b/addons/common/functions/fnc_handleModifierKeyUp.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handles key up event for modifier key. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" ACE_modifier = 0; diff --git a/addons/common/functions/fnc_hasHatch.sqf b/addons/common/functions/fnc_hasHatch.sqf index b750d01b85..90053f43d9 100644 --- a/addons/common/functions/fnc_hasHatch.sqf +++ b/addons/common/functions/fnc_hasHatch.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if unit is in a vehicle position where it can turn in or out. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_hasItem.sqf b/addons/common/functions/fnc_hasItem.sqf index 9d5d79b1a5..9ae4e7ec63 100644 --- a/addons/common/functions/fnc_hasItem.sqf +++ b/addons/common/functions/fnc_hasItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if unit has item. Note: case-sensitive. @@ -14,8 +15,7 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_item", "", [""]]]; -_item in items _unit +_item in (_unit call EFUNC(common,uniqueItems)) diff --git a/addons/common/functions/fnc_hasMagazine.sqf b/addons/common/functions/fnc_hasMagazine.sqf index 4ad40bf959..fceee87c11 100644 --- a/addons/common/functions/fnc_hasMagazine.sqf +++ b/addons/common/functions/fnc_hasMagazine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if given unit has a magazine of given classname @@ -16,7 +17,6 @@ * * Note: Case sensitive */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_magazine", "", [""]]]; diff --git a/addons/common/functions/fnc_headBugFix.sqf b/addons/common/functions/fnc_headBugFix.sqf index fca04c234b..edea791f24 100644 --- a/addons/common/functions/fnc_headBugFix.sqf +++ b/addons/common/functions/fnc_headBugFix.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: rocko * Fixes animation issues that may get you stuck @@ -15,7 +16,6 @@ * * Note: Has to be spawned not called */ -#include "script_component.hpp" private _unit = ACE_player; private _anim = animationState _unit; diff --git a/addons/common/functions/fnc_hideUnit.sqf b/addons/common/functions/fnc_hideUnit.sqf index 838bd4246e..e67f68dcc3 100644 --- a/addons/common/functions/fnc_hideUnit.sqf +++ b/addons/common/functions/fnc_hideUnit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike (based on muteUnit) * Globally hides a unit. This allows the handling of more than one reason to hide an object globally. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_reason"]; diff --git a/addons/common/functions/fnc_inTransitionAnim.sqf b/addons/common/functions/fnc_inTransitionAnim.sqf index a127fad005..5999bcbe27 100644 --- a/addons/common/functions/fnc_inTransitionAnim.sqf +++ b/addons/common/functions/fnc_inTransitionAnim.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if given unit is in a transitional animation @@ -13,6 +14,5 @@ * * Public: Yes */ -#include "script_component.hpp" getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState (_this select 0) >> "looped") == 0 // return diff --git a/addons/common/functions/fnc_interpolateFromArray.sqf b/addons/common/functions/fnc_interpolateFromArray.sqf index 9c63a9798c..851d368d37 100644 --- a/addons/common/functions/fnc_interpolateFromArray.sqf +++ b/addons/common/functions/fnc_interpolateFromArray.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Interpolates between two set points in a curve. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_array", "_value"]; diff --git a/addons/common/functions/fnc_isAwake.sqf b/addons/common/functions/fnc_isAwake.sqf index d7f0b79149..916f545685 100644 --- a/addons/common/functions/fnc_isAwake.sqf +++ b/addons/common/functions/fnc_isAwake.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if unit is awake. Will be false when death or unit is unconscious. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_isEOD.sqf b/addons/common/functions/fnc_isEOD.sqf index 2a6e04247c..226d315e36 100644 --- a/addons/common/functions/fnc_isEOD.sqf +++ b/addons/common/functions/fnc_isEOD.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth de Wet (LH) * Checks whether the passed unit is an explosive specialist. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_isEngineer.sqf b/addons/common/functions/fnc_isEngineer.sqf index 96a00970f6..1805bb50e5 100644 --- a/addons/common/functions/fnc_isEngineer.sqf +++ b/addons/common/functions/fnc_isEngineer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: marc_book, edited by commy2 * Checks if a unit is an engineer. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_isFeatureCameraActive.sqf b/addons/common/functions/fnc_isFeatureCameraActive.sqf index 1875b08681..24ea0667be 100644 --- a/addons/common/functions/fnc_isFeatureCameraActive.sqf +++ b/addons/common/functions/fnc_isFeatureCameraActive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Sniperwolf572 * Checks if one of the following common feature cameras is active: @@ -22,7 +23,8 @@ * * Public: Yes */ -#include "script_component.hpp" + +ACE_DEPRECATED(QFUNC(isFeatureCameraActive),"3.14.0","CBA_fnc_getActiveFeatureCamera"); !( isNull curatorCamera && // Curator diff --git a/addons/common/functions/fnc_isInBuilding.sqf b/addons/common/functions/fnc_isInBuilding.sqf index 98f092e762..4b843fcea4 100644 --- a/addons/common/functions/fnc_isInBuilding.sqf +++ b/addons/common/functions/fnc_isInBuilding.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if the unit is in a building. Will return true if the unit is sitting in a bush. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" #define CHECK_DISTANCE 10 diff --git a/addons/common/functions/fnc_isMedic.sqf b/addons/common/functions/fnc_isMedic.sqf index 2a0d0dc520..9618a15548 100644 --- a/addons/common/functions/fnc_isMedic.sqf +++ b/addons/common/functions/fnc_isMedic.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Check if a unit is a medic @@ -14,8 +15,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_unit"]; private _isMedic = _unit getVariable [QEGVAR(medical,medicClass), getNumber (configFile >> "CfgVehicles" >> typeOf _unit >> "attendant")]; diff --git a/addons/common/functions/fnc_isModLoaded.sqf b/addons/common/functions/fnc_isModLoaded.sqf index f740f58b0b..b69086e39d 100644 --- a/addons/common/functions/fnc_isModLoaded.sqf +++ b/addons/common/functions/fnc_isModLoaded.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check in cfgPatches if modification is loaded @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_modName", "", [""]]]; diff --git a/addons/common/functions/fnc_isPlayer.sqf b/addons/common/functions/fnc_isPlayer.sqf index fe265bd925..8aabbd3bc0 100644 --- a/addons/common/functions/fnc_isPlayer.sqf +++ b/addons/common/functions/fnc_isPlayer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578, commy2, akalegman * Checks if a unit is a player / curator controlled unit. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", ["_excludeRemoteControlled", false]]; diff --git a/addons/common/functions/fnc_isSwimming.sqf b/addons/common/functions/fnc_isSwimming.sqf index 8aee92ad81..c7b290a65c 100644 --- a/addons/common/functions/fnc_isSwimming.sqf +++ b/addons/common/functions/fnc_isSwimming.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: das attorney, Jonpas * Check if unit is swimming (surface swimming or diving). @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]]]; diff --git a/addons/common/functions/fnc_lightIntensityFromObject.sqf b/addons/common/functions/fnc_lightIntensityFromObject.sqf index 4991370f5d..246424ae4d 100644 --- a/addons/common/functions/fnc_lightIntensityFromObject.sqf +++ b/addons/common/functions/fnc_lightIntensityFromObject.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Calculate light intensity object 1 recieves from object 2 @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_lightSource"]; @@ -30,7 +30,7 @@ if (_lightSource isKindOf "CAManBase") then { private _flashlight = (_lightSource weaponAccessories _weapon) select 1; - if (getNumber (configFile >> "CfgWeapons" >> _flashlight >> "ACE_laserpointer") == 1) exitWith {_lightLevel = 0}; + if (getNumber (configFile >> "CfgWeapons" >> _flashlight >> "ACE_laserpointer") > 0) exitWith {}; // Red = 1, Green = 2 private _properties = [[_flashlight], FUNC(getLightPropertiesWeapon), uiNamespace, format [QEGVAR(cache,%1_%2), QUOTE(DFUNC(getLightPropertiesWeapon)), _flashlight], 1E11] call FUNC(cachedCall); //_properties = [_flashlight] call FUNC(getLightPropertiesWeapon); diff --git a/addons/common/functions/fnc_loadPerson.sqf b/addons/common/functions/fnc_loadPerson.sqf index 4fc6245b5a..466387cc72 100644 --- a/addons/common/functions/fnc_loadPerson.sqf +++ b/addons/common/functions/fnc_loadPerson.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Loads a specified unit into any nearby vehicle, or _vehicle parameter. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" #define GROUP_SWITCH_ID QFUNC(loadPerson) diff --git a/addons/common/functions/fnc_loadPersonLocal.sqf b/addons/common/functions/fnc_loadPersonLocal.sqf index f6a759add8..109e7e8e77 100644 --- a/addons/common/functions/fnc_loadPersonLocal.sqf +++ b/addons/common/functions/fnc_loadPersonLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Load a person, local @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_vehicle", "_caller"]; diff --git a/addons/common/functions/fnc_moduleCheckPBOs.sqf b/addons/common/functions/fnc_moduleCheckPBOs.sqf index 6cdfd0d811..583441d4d2 100644 --- a/addons/common/functions/fnc_moduleCheckPBOs.sqf +++ b/addons/common/functions/fnc_moduleCheckPBOs.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Initializes the check-PBOs module. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/common/functions/fnc_moduleLSDVehicles.sqf b/addons/common/functions/fnc_moduleLSDVehicles.sqf index cecc8983a1..97ce3833eb 100644 --- a/addons/common/functions/fnc_moduleLSDVehicles.sqf +++ b/addons/common/functions/fnc_moduleLSDVehicles.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, joko // Jonas * Nothing to see here, move along. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "_units", "_activated"]; diff --git a/addons/common/functions/fnc_monitor.sqf b/addons/common/functions/fnc_monitor.sqf index 591e923d1b..17d3087c53 100644 --- a/addons/common/functions/fnc_monitor.sqf +++ b/addons/common/functions/fnc_monitor.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * hint retun value of given function every frame @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!isNil QGVAR(MonitorFnc)) then { [GVAR(MonitorFnc)] call CBA_fnc_removePerFrameHandler; diff --git a/addons/common/functions/fnc_muteUnit.sqf b/addons/common/functions/fnc_muteUnit.sqf index 25106c979f..fe65a56492 100644 --- a/addons/common/functions/fnc_muteUnit.sqf +++ b/addons/common/functions/fnc_muteUnit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Mutes the unit. It won't trigger auto generated chat messages either. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_reason"]; diff --git a/addons/common/functions/fnc_muteUnitHandleInitPost.sqf b/addons/common/functions/fnc_muteUnitHandleInitPost.sqf index 4e6ac7cbaf..4681ca73aa 100644 --- a/addons/common/functions/fnc_muteUnitHandleInitPost.sqf +++ b/addons/common/functions/fnc_muteUnitHandleInitPost.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Applies speaker changes on init post. Used because setSpeaker is broken on init. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_muteUnitHandleRespawn.sqf b/addons/common/functions/fnc_muteUnitHandleRespawn.sqf index 6e93e40ef6..b507e7ec1d 100644 --- a/addons/common/functions/fnc_muteUnitHandleRespawn.sqf +++ b/addons/common/functions/fnc_muteUnitHandleRespawn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Applies speaker changes on respawn. Used because speaker is respawning breaks the speaker on non-local clients. Also resets the public object variable (broken for JIP clients, that join after respawn) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf b/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf index 080499d9cf..30b0594b30 100644 --- a/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf +++ b/addons/common/functions/fnc_nearestVehiclesFreeSeat.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Returns a list of vehicles near given unit that the unit can be a passenger in. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", ["_distance", 10]]; diff --git a/addons/common/functions/fnc_numberToDigits.sqf b/addons/common/functions/fnc_numberToDigits.sqf index 2cedb2a339..ff4cd23977 100644 --- a/addons/common/functions/fnc_numberToDigits.sqf +++ b/addons/common/functions/fnc_numberToDigits.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, SilentSpike * Transforms a number to an array of the correspondending digits. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_number", "_minLength"]; diff --git a/addons/common/functions/fnc_numberToDigitsString.sqf b/addons/common/functions/fnc_numberToDigitsString.sqf index 3b54a4cf0c..35b0d0fd9b 100644 --- a/addons/common/functions/fnc_numberToDigitsString.sqf +++ b/addons/common/functions/fnc_numberToDigitsString.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Transforms a number to an string of the correspondending digits. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" ACE_DEPRECATED(QFUNC(numberToDigitsString),"3.14.0","CBA_fnc_formatNumber"); diff --git a/addons/common/functions/fnc_numberToString.sqf b/addons/common/functions/fnc_numberToString.sqf index 8ca22bca88..8d5aaa09a1 100644 --- a/addons/common/functions/fnc_numberToString.sqf +++ b/addons/common/functions/fnc_numberToString.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Converts a number to a string without losing as much precission as str or format. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_number"]; diff --git a/addons/common/functions/fnc_onAnswerRequest.sqf b/addons/common/functions/fnc_onAnswerRequest.sqf index 38f35f1968..5613e5d1bc 100644 --- a/addons/common/functions/fnc_onAnswerRequest.sqf +++ b/addons/common/functions/fnc_onAnswerRequest.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * N/A @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_id", "_accepted"]; diff --git a/addons/common/functions/fnc_owned.sqf b/addons/common/functions/fnc_owned.sqf index a8c3f737e7..e216b10c39 100644 --- a/addons/common/functions/fnc_owned.sqf +++ b/addons/common/functions/fnc_owned.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Counterpart of ace_common_fnc_claim. Check if the given object is claimed by another unit. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/common/functions/fnc_parseList.sqf b/addons/common/functions/fnc_parseList.sqf index 40b16c1aa5..d3e2871f44 100644 --- a/addons/common/functions/fnc_parseList.sqf +++ b/addons/common/functions/fnc_parseList.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, Jonpas * Makes a list from a string using comma as a delimiter, optionally trim or remove whitespace and check each for object existence. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_list", ["_removeWhitespace", false], ["_checkNil", false]]; diff --git a/addons/common/functions/fnc_playConfigSound3D.sqf b/addons/common/functions/fnc_playConfigSound3D.sqf index fde3848cf8..ee8d81f2c9 100644 --- a/addons/common/functions/fnc_playConfigSound3D.sqf +++ b/addons/common/functions/fnc_playConfigSound3D.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Plays a sound defined in CfgSounds using playSound3D, with global effect. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_soundClass", "_posASL", "_volume", "_distance"]; diff --git a/addons/common/functions/fnc_player.sqf b/addons/common/functions/fnc_player.sqf index 54510be05e..d691741e53 100644 --- a/addons/common/functions/fnc_player.sqf +++ b/addons/common/functions/fnc_player.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578, commy2 * Returns the player or curator controlled unit. @@ -14,6 +15,5 @@ * * Public: Yes */ -#include "script_component.hpp" missionNamespace getVariable ["bis_fnc_moduleRemoteControl_unit", player] diff --git a/addons/common/functions/fnc_playerSide.sqf b/addons/common/functions/fnc_playerSide.sqf index dd6b7e8b2f..6d42df6511 100644 --- a/addons/common/functions/fnc_playerSide.sqf +++ b/addons/common/functions/fnc_playerSide.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Return the current side of the player @@ -13,6 +14,5 @@ * * Public: Yes */ -#include "script_component.hpp" side group ACE_player diff --git a/addons/common/functions/fnc_positionToASL.sqf b/addons/common/functions/fnc_positionToASL.sqf index 297e89ee2b..8d0586e097 100644 --- a/addons/common/functions/fnc_positionToASL.sqf +++ b/addons/common/functions/fnc_positionToASL.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Converts Arma "Position" to ASL @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (surfaceIsWater _this) then { _this diff --git a/addons/common/functions/fnc_progressBar.sqf b/addons/common/functions/fnc_progressBar.sqf index 37fb17190a..9b52796569 100644 --- a/addons/common/functions/fnc_progressBar.sqf +++ b/addons/common/functions/fnc_progressBar.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, Glowbal, PabstMirror * Draw progress bar and execute given function if succesful. @@ -20,7 +21,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_totalTime", "_args", "_onFinish", "_onFail", ["_localizedTitle", ""], ["_condition", {true}], ["_exceptions", []]]; diff --git a/addons/common/functions/fnc_readSettingFromModule.sqf b/addons/common/functions/fnc_readSettingFromModule.sqf index 0e40f55412..d61671d604 100644 --- a/addons/common/functions/fnc_readSettingFromModule.sqf +++ b/addons/common/functions/fnc_readSettingFromModule.sqf @@ -1,3 +1,5 @@ +#define DEBUG_MODE_FULL +#include "script_component.hpp" /* * Author: esteldunedain * Reads a setting value from a module, set it and force it. Logs if the setting is missing from the module. @@ -16,8 +18,6 @@ * * Public: No */ -#define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_logic", "_settingName", "_moduleVariable"]; diff --git a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf index d80bd92fb4..277ba23a5d 100644 --- a/addons/common/functions/fnc_readSettingsFromParamsArray.sqf +++ b/addons/common/functions/fnc_readSettingsFromParamsArray.sqf @@ -1,3 +1,5 @@ +#define DEBUG_MODE_FULL +#include "script_component.hpp" /* * Author: PabstMirror * Read settins from paramsArray that have a ACE_setting = 1. @@ -14,8 +16,6 @@ * * Public: No */ -#define DEBUG_MODE_FULL -#include "script_component.hpp" //paramsArray is a normal variable not a command private _paramsArray = missionnamespace getVariable ["paramsArray", []]; diff --git a/addons/common/functions/fnc_receiveRequest.sqf b/addons/common/functions/fnc_receiveRequest.sqf index a3f10550af..e2f25ed734 100644 --- a/addons/common/functions/fnc_receiveRequest.sqf +++ b/addons/common/functions/fnc_receiveRequest.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * N/A @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_caller", "_target", "_requestID", "_requestMessage", "_callBack"]; diff --git a/addons/common/functions/fnc_removeActionEventHandler.sqf b/addons/common/functions/fnc_removeActionEventHandler.sqf index db711b77f4..e536adc191 100644 --- a/addons/common/functions/fnc_removeActionEventHandler.sqf +++ b/addons/common/functions/fnc_removeActionEventHandler.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Remove an addAction event from a unit. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_action", "_id"]; diff --git a/addons/common/functions/fnc_removeActionMenuEventHandler.sqf b/addons/common/functions/fnc_removeActionMenuEventHandler.sqf index 9fb8ee6588..ed072db89a 100644 --- a/addons/common/functions/fnc_removeActionMenuEventHandler.sqf +++ b/addons/common/functions/fnc_removeActionMenuEventHandler.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Remove an addAction menu event from a unit. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_action", "_id"]; diff --git a/addons/common/functions/fnc_removeCanInteractWithCondition.sqf b/addons/common/functions/fnc_removeCanInteractWithCondition.sqf index 8c7c72d861..4538a67fb0 100644 --- a/addons/common/functions/fnc_removeCanInteractWithCondition.sqf +++ b/addons/common/functions/fnc_removeCanInteractWithCondition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Remove a condition that gets checked by ace_common_fnc_canInteractWith. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_conditionName"]; diff --git a/addons/common/functions/fnc_removeMapMarkerCreatedEventHandler.sqf b/addons/common/functions/fnc_removeMapMarkerCreatedEventHandler.sqf index bda7877a70..2a95b0f4d7 100644 --- a/addons/common/functions/fnc_removeMapMarkerCreatedEventHandler.sqf +++ b/addons/common/functions/fnc_removeMapMarkerCreatedEventHandler.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Remove a map marker creation event handler. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_id"]; diff --git a/addons/common/functions/fnc_removeSpecificMagazine.sqf b/addons/common/functions/fnc_removeSpecificMagazine.sqf index 73fe910673..141aa28526 100644 --- a/addons/common/functions/fnc_removeSpecificMagazine.sqf +++ b/addons/common/functions/fnc_removeSpecificMagazine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Removes a magazine from the unit that has an specific ammo count @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_magazineType", "", [""]], ["_ammoCount", 0, [0]]]; diff --git a/addons/common/functions/fnc_removeSyncedEventHandler.sqf b/addons/common/functions/fnc_removeSyncedEventHandler.sqf index f256c21203..5e9eb48aa7 100644 --- a/addons/common/functions/fnc_removeSyncedEventHandler.sqf +++ b/addons/common/functions/fnc_removeSyncedEventHandler.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Remove a synced event handler @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_name"]; diff --git a/addons/common/functions/fnc_requestCallback.sqf b/addons/common/functions/fnc_requestCallback.sqf index e28ff9439f..6729c19a6d 100644 --- a/addons/common/functions/fnc_requestCallback.sqf +++ b/addons/common/functions/fnc_requestCallback.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * N/A @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_info", "_accepted"]; diff --git a/addons/common/functions/fnc_requestSyncedEvent.sqf b/addons/common/functions/fnc_requestSyncedEvent.sqf index fd277c4b36..44b633b9de 100644 --- a/addons/common/functions/fnc_requestSyncedEvent.sqf +++ b/addons/common/functions/fnc_requestSyncedEvent.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Send a request to synchronize an event name from the client->server. Execute on client only. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_eventName"]; diff --git a/addons/common/functions/fnc_resetAllDefaults.sqf b/addons/common/functions/fnc_resetAllDefaults.sqf index 367c72d5e9..dc638e4947 100644 --- a/addons/common/functions/fnc_resetAllDefaults.sqf +++ b/addons/common/functions/fnc_resetAllDefaults.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * reset all variables that have been defined @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_restoreVariablesJIP.sqf b/addons/common/functions/fnc_restoreVariablesJIP.sqf index 921be28165..0c0617be77 100644 --- a/addons/common/functions/fnc_restoreVariablesJIP.sqf +++ b/addons/common/functions/fnc_restoreVariablesJIP.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Called from respawn eventhandler. Resets all public object namespace variables that are added via FUNC(setVariableJIP). @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_runAfterSettingsInit.sqf b/addons/common/functions/fnc_runAfterSettingsInit.sqf index 15631a626a..f989501dd5 100644 --- a/addons/common/functions/fnc_runAfterSettingsInit.sqf +++ b/addons/common/functions/fnc_runAfterSettingsInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Executes code after setting are initilized. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_func", "_params"]; diff --git a/addons/common/functions/fnc_runTests.sqf b/addons/common/functions/fnc_runTests.sqf index 538f321765..4e937d87b6 100644 --- a/addons/common/functions/fnc_runTests.sqf +++ b/addons/common/functions/fnc_runTests.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Run test functions. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_specificTest", "#all", [""]]]; diff --git a/addons/common/functions/fnc_sanitizeString.sqf b/addons/common/functions/fnc_sanitizeString.sqf index 6e0db2cda2..3517c5086a 100644 --- a/addons/common/functions/fnc_sanitizeString.sqf +++ b/addons/common/functions/fnc_sanitizeString.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain, based on Killzone-Kid code * Removes quotation marks to avoid exploits and optionally html tags from text to avoid conflicts with structured text. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_string", ["_removeTags", false]]; diff --git a/addons/common/functions/fnc_sendRequest.sqf b/addons/common/functions/fnc_sendRequest.sqf index 55a3da9873..cfa52de068 100644 --- a/addons/common/functions/fnc_sendRequest.sqf +++ b/addons/common/functions/fnc_sendRequest.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Send a request to an unit and execute code based upon results. @@ -17,7 +18,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_caller", "_target", "_requestID", "_requestMessage", "_callBack"]; diff --git a/addons/common/functions/fnc_serverLog.sqf b/addons/common/functions/fnc_serverLog.sqf index af7485c494..183e110071 100644 --- a/addons/common/functions/fnc_serverLog.sqf +++ b/addons/common/functions/fnc_serverLog.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Log a RPT messaged on just the server @@ -13,7 +14,6 @@ * * Public: no */ -#include "script_component.hpp" params [["_msg", "", [""]]]; diff --git a/addons/common/functions/fnc_setAimCoef.sqf b/addons/common/functions/fnc_setAimCoef.sqf index 7c9352c3be..5680918dfa 100644 --- a/addons/common/functions/fnc_setAimCoef.sqf +++ b/addons/common/functions/fnc_setAimCoef.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: xrufix, Glowbal * Handle set AimCoef calls. Will use the highest available setting. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_id", "_setting", ["_add", true]]; diff --git a/addons/common/functions/fnc_setApproximateVariablePublic.sqf b/addons/common/functions/fnc_setApproximateVariablePublic.sqf index e888efe3c2..562bdfd1c8 100644 --- a/addons/common/functions/fnc_setApproximateVariablePublic.sqf +++ b/addons/common/functions/fnc_setApproximateVariablePublic.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Publish a variable if it's different enough from the previously published value. @@ -16,8 +17,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_object", "_varName", "_value", "_tolerance"]; TRACE_4("params",_object,_varName,_value,_tolerance); diff --git a/addons/common/functions/fnc_setDefinedVariable.sqf b/addons/common/functions/fnc_setDefinedVariable.sqf index 70b8ef42e3..4800958048 100644 --- a/addons/common/functions/fnc_setDefinedVariable.sqf +++ b/addons/common/functions/fnc_setDefinedVariable.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * setVariable value @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_variable", "_value", "_global"]; diff --git a/addons/common/functions/fnc_setDisableUserInputStatus.sqf b/addons/common/functions/fnc_setDisableUserInputStatus.sqf index b217570dac..3fdc185325 100644 --- a/addons/common/functions/fnc_setDisableUserInputStatus.sqf +++ b/addons/common/functions/fnc_setDisableUserInputStatus.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Disables the user input. Works stacked. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_id", "_disable"]; diff --git a/addons/common/functions/fnc_setHearingCapability.sqf b/addons/common/functions/fnc_setHearingCapability.sqf index 98de3d0d32..5fdb5b1272 100644 --- a/addons/common/functions/fnc_setHearingCapability.sqf +++ b/addons/common/functions/fnc_setHearingCapability.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handle set volume calls. Will use the lowest available volume setting. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_id", "_setting", ["_add", true]]; diff --git a/addons/common/functions/fnc_setName.sqf b/addons/common/functions/fnc_setName.sqf index e93e09c0f0..d725dcc30d 100644 --- a/addons/common/functions/fnc_setName.sqf +++ b/addons/common/functions/fnc_setName.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Sets the name variable of the object. Used to prevent issues with the name command. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_3("setName",_unit,alive _unit,name _unit); diff --git a/addons/common/functions/fnc_setParameter.sqf b/addons/common/functions/fnc_setParameter.sqf index 723d49ea0c..f7b2ca579f 100644 --- a/addons/common/functions/fnc_setParameter.sqf +++ b/addons/common/functions/fnc_setParameter.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Sets the value of an ACE_Parameter and makes it public. @@ -16,7 +17,6 @@ * * Deprecated */ -#include "script_component.hpp" params ["_name", "_value"]; diff --git a/addons/common/functions/fnc_setPitchBankYaw.sqf b/addons/common/functions/fnc_setPitchBankYaw.sqf index 1b986c6445..debe133484 100644 --- a/addons/common/functions/fnc_setPitchBankYaw.sqf +++ b/addons/common/functions/fnc_setPitchBankYaw.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Bohemia Interactive edit by KoffeinFlummi * Sets the value of an ACE_Parameter and makes it public. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_object", "_aroundX", "_aroundY", "_aroundZ"]; diff --git a/addons/common/functions/fnc_setPlayerOwner.sqf b/addons/common/functions/fnc_setPlayerOwner.sqf index 5b21db0190..c15974098b 100644 --- a/addons/common/functions/fnc_setPlayerOwner.sqf +++ b/addons/common/functions/fnc_setPlayerOwner.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Sets the player's owner id as a variable on his player ojbect. @@ -16,9 +17,6 @@ * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - if (missionNameSpace getVariable [QGVAR(setPlayerOwnerRunning), false]) exitWith {}; GVAR(setPlayerOwnerRunning) = true; diff --git a/addons/common/functions/fnc_setProne.sqf b/addons/common/functions/fnc_setProne.sqf index 8df8a4d900..f12545290c 100644 --- a/addons/common/functions/fnc_setProne.sqf +++ b/addons/common/functions/fnc_setProne.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Force a unit to go prone @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/common/functions/fnc_setSetting.sqf b/addons/common/functions/fnc_setSetting.sqf index 1d98f613fd..a50cf89214 100644 --- a/addons/common/functions/fnc_setSetting.sqf +++ b/addons/common/functions/fnc_setSetting.sqf @@ -1,3 +1,5 @@ +#define DEBUG_MODE_FULL +#include "script_component.hpp" /* * Author: esteldunedain * Change the value of an existing setting if it was not previously forced. Force if neccesary. @@ -18,8 +20,6 @@ * * Public: No */ -#define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_name", "_value", ["_force", false], ["_broadcastChanges", false]]; TRACE_4("setSetting",_name,_value,_force,_broadcastChanges); diff --git a/addons/common/functions/fnc_setVariableJIP.sqf b/addons/common/functions/fnc_setVariableJIP.sqf index 151d7b9925..857bd1b9b9 100644 --- a/addons/common/functions/fnc_setVariableJIP.sqf +++ b/addons/common/functions/fnc_setVariableJIP.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Sets a public object namespace variable that gets reset with the same value after respawn, so JIP clients keep the value. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_varName", "_value"]; diff --git a/addons/common/functions/fnc_setVariablePublic.sqf b/addons/common/functions/fnc_setVariablePublic.sqf index 2eac69f6ce..067765fc27 100644 --- a/addons/common/functions/fnc_setVariablePublic.sqf +++ b/addons/common/functions/fnc_setVariablePublic.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 and CAA-Picard and joko and PabstMirror * Publish a variable, but wait a certain amount of time before allowing it to be published it again. @@ -16,8 +17,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_object", "_varName", "_value", ["_delay", 1]]; TRACE_4("params",_object,_varName,_value,_delay); diff --git a/addons/common/functions/fnc_setVolume.sqf b/addons/common/functions/fnc_setVolume.sqf index 5d7f349ce1..0ab00e26be 100644 --- a/addons/common/functions/fnc_setVolume.sqf +++ b/addons/common/functions/fnc_setVolume.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Sets the volume of the game, including third party radio modifications such as TFAR and ACRE. @@ -15,7 +16,6 @@ * * Note: Uses player */ -#include "script_component.hpp" #define MUTED_LEVEL 0.2 #define NORMAL_LEVEL 1 diff --git a/addons/common/functions/fnc_showHud.sqf b/addons/common/functions/fnc_showHud.sqf index 5cf2e876bd..86d9e3be8e 100644 --- a/addons/common/functions/fnc_showHud.sqf +++ b/addons/common/functions/fnc_showHud.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Allows multiple sources to not overwrite showHud command. @@ -27,7 +28,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!hasInterface) exitWith {[-1]}; diff --git a/addons/common/functions/fnc_showUser.sqf b/addons/common/functions/fnc_showUser.sqf index 6c78e03f97..a30c7cada3 100644 --- a/addons/common/functions/fnc_showUser.sqf +++ b/addons/common/functions/fnc_showUser.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * hint the Variable ACE_isUsedBy from the input Object every frame @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!isNil QGVAR(showUserPFH)) then { [GVAR(showUserPFH)] call CBA_fnc_removePerFrameHandler; diff --git a/addons/common/functions/fnc_statusEffect_addType.sqf b/addons/common/functions/fnc_statusEffect_addType.sqf index c423db2393..6be61967d9 100644 --- a/addons/common/functions/fnc_statusEffect_addType.sqf +++ b/addons/common/functions/fnc_statusEffect_addType.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Adds a status effect that will be handled. @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params [["_name", "", [""]], ["_isGlobal", false, [false]], ["_commonReasonsArray", [], [[]]]]; TRACE_3("params",_name,_isGlobal,_commonReasonsArray); diff --git a/addons/common/functions/fnc_statusEffect_get.sqf b/addons/common/functions/fnc_statusEffect_get.sqf index 2d7e17e0ec..683c235214 100644 --- a/addons/common/functions/fnc_statusEffect_get.sqf +++ b/addons/common/functions/fnc_statusEffect_get.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Retrives list of current status effects @@ -16,8 +17,6 @@ * * Public: Yes */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params [["_object", objNull, [objNull]], ["_effectName", "", [""]]]; TRACE_2("params",_object,_effectName); diff --git a/addons/common/functions/fnc_statusEffect_localEH.sqf b/addons/common/functions/fnc_statusEffect_localEH.sqf index 84f3e0e9a2..9f5cd7c42a 100644 --- a/addons/common/functions/fnc_statusEffect_localEH.sqf +++ b/addons/common/functions/fnc_statusEffect_localEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles locality switch, runs a respawn check and then reapplies all effect events. @@ -14,8 +15,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_object", "_isLocal"]; TRACE_2("params",_object,_isLocal); diff --git a/addons/common/functions/fnc_statusEffect_resetVariables.sqf b/addons/common/functions/fnc_statusEffect_resetVariables.sqf index 7f638bcbef..b819174753 100644 --- a/addons/common/functions/fnc_statusEffect_resetVariables.sqf +++ b/addons/common/functions/fnc_statusEffect_resetVariables.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Resets all effect numbers to 0 when an object respawns (but does not apply the effect event). @@ -13,8 +14,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params [["_object", objNull, [objNull]], ["_setObjectRef", false, [false]]]; TRACE_2("params",_object,_setObjectRef); diff --git a/addons/common/functions/fnc_statusEffect_respawnEH.sqf b/addons/common/functions/fnc_statusEffect_respawnEH.sqf index ba3058be19..56fe38b6a8 100644 --- a/addons/common/functions/fnc_statusEffect_respawnEH.sqf +++ b/addons/common/functions/fnc_statusEffect_respawnEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles the Respawn Event Handler to reset effects. @@ -13,8 +14,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_object"]; TRACE_1("params",_object); diff --git a/addons/common/functions/fnc_statusEffect_sendEffects.sqf b/addons/common/functions/fnc_statusEffect_sendEffects.sqf index 0945fc3424..dae88d35e4 100644 --- a/addons/common/functions/fnc_statusEffect_sendEffects.sqf +++ b/addons/common/functions/fnc_statusEffect_sendEffects.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Sends all status effects for an object (can be run on non-local objects) @@ -14,8 +15,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params [["_object", objNull, [objNull]], ["_effectName", "", [""]]]; TRACE_2("params",_object,_effectName); diff --git a/addons/common/functions/fnc_statusEffect_set.sqf b/addons/common/functions/fnc_statusEffect_set.sqf index 27824cfe2e..ff8fa8565a 100644 --- a/addons/common/functions/fnc_statusEffect_set.sqf +++ b/addons/common/functions/fnc_statusEffect_set.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Adds or removes an id to a status effect and will send an event to apply. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_object", objNull, [objNull]], ["_effectName", "", [""]], ["_ID", "", [""]], ["_set", true, [false]]]; TRACE_4("params",_object,_effectName,_ID,_set); diff --git a/addons/common/functions/fnc_stringCompare.sqf b/addons/common/functions/fnc_stringCompare.sqf index b14eedb653..9a0955b27a 100644 --- a/addons/common/functions/fnc_stringCompare.sqf +++ b/addons/common/functions/fnc_stringCompare.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bovine3dom * Determines whether one string matches another and how many characters match. Case insensitive. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_string", "_searchTerm"]; diff --git a/addons/common/functions/fnc_stringToColoredText.sqf b/addons/common/functions/fnc_stringToColoredText.sqf index 33d2fb5dcc..c7eaaaecb3 100644 --- a/addons/common/functions/fnc_stringToColoredText.sqf +++ b/addons/common/functions/fnc_stringToColoredText.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Create a centered, colored text. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_string", "_color"]; diff --git a/addons/common/functions/fnc_switchPersistentLaser.sqf b/addons/common/functions/fnc_switchPersistentLaser.sqf index 0a186d8076..2e2fb7505b 100644 --- a/addons/common/functions/fnc_switchPersistentLaser.sqf +++ b/addons/common/functions/fnc_switchPersistentLaser.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * Controls persistent laser state. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_enabled"]; diff --git a/addons/common/functions/fnc_switchToGroupSide.sqf b/addons/common/functions/fnc_switchToGroupSide.sqf index 914c12034f..842bdffabd 100644 --- a/addons/common/functions/fnc_switchToGroupSide.sqf +++ b/addons/common/functions/fnc_switchToGroupSide.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Stack group switches. Will always trace back to original group. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_unit", objNull], ["_switch", false], ["_id", ""], ["_side", sideUnknown]]; diff --git a/addons/common/functions/fnc_syncedEvent.sqf b/addons/common/functions/fnc_syncedEvent.sqf index a6a7fb30e3..9ddb071dac 100644 --- a/addons/common/functions/fnc_syncedEvent.sqf +++ b/addons/common/functions/fnc_syncedEvent.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Call and propegate a synced event @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_name", "_args", ["_ttl", 0]]; diff --git a/addons/common/functions/fnc_syncedEventPFH.sqf b/addons/common/functions/fnc_syncedEventPFH.sqf index c35be73d5c..6d5d2ea12c 100644 --- a/addons/common/functions/fnc_syncedEventPFH.sqf +++ b/addons/common/functions/fnc_syncedEventPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" if (!isServer) exitWith {false}; diff --git a/addons/common/functions/fnc_throttledPublicVariable.sqf b/addons/common/functions/fnc_throttledPublicVariable.sqf index 7d86a75a29..abfcfc8c8c 100644 --- a/addons/common/functions/fnc_throttledPublicVariable.sqf +++ b/addons/common/functions/fnc_throttledPublicVariable.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Schedules the publishment of an object variable to reduce network overhead @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_varName", "_maxDelay"]; diff --git a/addons/common/functions/fnc_toBin.sqf b/addons/common/functions/fnc_toBin.sqf index f3e08711a7..c5da7ece8e 100644 --- a/addons/common/functions/fnc_toBin.sqf +++ b/addons/common/functions/fnc_toBin.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Converts number to binary number @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_number", ["_minLength", 1]]; diff --git a/addons/common/functions/fnc_toBitmask.sqf b/addons/common/functions/fnc_toBitmask.sqf index ac5b7f056e..2d46811c6b 100644 --- a/addons/common/functions/fnc_toBitmask.sqf +++ b/addons/common/functions/fnc_toBitmask.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Convert an array of booleans into a number. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" private _result = 0; diff --git a/addons/common/functions/fnc_toHex.sqf b/addons/common/functions/fnc_toHex.sqf index 2c82c1c4a3..f9c82be373 100644 --- a/addons/common/functions/fnc_toHex.sqf +++ b/addons/common/functions/fnc_toHex.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, esteldunedain * Converts number to hexadecimal number @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_number"]; diff --git a/addons/common/functions/fnc_toNumber.sqf b/addons/common/functions/fnc_toNumber.sqf index eeede0813b..14e8179a63 100644 --- a/addons/common/functions/fnc_toNumber.sqf +++ b/addons/common/functions/fnc_toNumber.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth de Wet (LH) * Takes a string/number and returns the number. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_value"]; diff --git a/addons/common/functions/fnc_translateToModelSpace.sqf b/addons/common/functions/fnc_translateToModelSpace.sqf index 0d7a5551fc..843c710c8d 100644 --- a/addons/common/functions/fnc_translateToModelSpace.sqf +++ b/addons/common/functions/fnc_translateToModelSpace.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * ? @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object", "_matrix", "_offset"]; diff --git a/addons/common/functions/fnc_translateToWeaponSpace.sqf b/addons/common/functions/fnc_translateToWeaponSpace.sqf index af3abddb74..4f4bbeae3b 100644 --- a/addons/common/functions/fnc_translateToWeaponSpace.sqf +++ b/addons/common/functions/fnc_translateToWeaponSpace.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * ? @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object", "_matrix", "_offset"]; diff --git a/addons/common/functions/fnc_unhideUnit.sqf b/addons/common/functions/fnc_unhideUnit.sqf index cb988cde1b..b6d669366e 100644 --- a/addons/common/functions/fnc_unhideUnit.sqf +++ b/addons/common/functions/fnc_unhideUnit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike (based on unmuteUnit) * Globally unhides a unit. Only unhides if the last reason was removed. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_reason"]; diff --git a/addons/common/functions/fnc_uniqueElements.sqf b/addons/common/functions/fnc_uniqueElements.sqf index 62a68a71ff..5aad721d48 100644 --- a/addons/common/functions/fnc_uniqueElements.sqf +++ b/addons/common/functions/fnc_uniqueElements.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Make a copy of an array with only the unique elements. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_array", [], [[]]]]; diff --git a/addons/common/functions/fnc_uniqueItems.sqf b/addons/common/functions/fnc_uniqueItems.sqf new file mode 100644 index 0000000000..48f91831b9 --- /dev/null +++ b/addons/common/functions/fnc_uniqueItems.sqf @@ -0,0 +1,39 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Returns list of unique items in a unit's inventory. + * Items are cached if unit is ACE_player. + * + * Arguments: + * 0: Unit + * + * Return Value: + * Items + * + * Example: + * [_player] call ace_common_fnc_uniqueItems + * + * Public: No + */ + +params ["_unit"]; + +private _fnc_getItems = { + private _items = (getItemCargo uniformContainer _unit) select 0; + _items append ((getItemCargo vestContainer _unit) select 0); + _items append ((getItemCargo backpackContainer _unit) select 0); + + _items arrayIntersect _items +}; + +// Use cached items list if unit is ACE_player +if (_unit isEqualTo ACE_player) then { + private _items = GVAR(uniqueItemsCache); + if (isNil "_items") then { + _items = call _fnc_getItems; + GVAR(uniqueItemsCache) = _items; + }; + +_items +} else { + call _fnc_getItems; +}; diff --git a/addons/common/functions/fnc_unloadPerson.sqf b/addons/common/functions/fnc_unloadPerson.sqf index 716f46dc8e..b744cbc272 100644 --- a/addons/common/functions/fnc_unloadPerson.sqf +++ b/addons/common/functions/fnc_unloadPerson.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Unload a person from a vehicle @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define GROUP_SWITCH_ID QFUNC(loadPerson) diff --git a/addons/common/functions/fnc_unloadPersonLocal.sqf b/addons/common/functions/fnc_unloadPersonLocal.sqf index 762b643bc1..74b8b8c39e 100644 --- a/addons/common/functions/fnc_unloadPersonLocal.sqf +++ b/addons/common/functions/fnc_unloadPersonLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ViperMaul * Unload a person from a vehicle, local @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" #define GROUP_SWITCH_ID QFUNC(loadPerson) diff --git a/addons/common/functions/fnc_unmuteUnit.sqf b/addons/common/functions/fnc_unmuteUnit.sqf index 7d81ae7346..03a7a33e23 100644 --- a/addons/common/functions/fnc_unmuteUnit.sqf +++ b/addons/common/functions/fnc_unmuteUnit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Unmutes the unit. Only unmutes if the last reason was removed. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_reason"]; diff --git a/addons/common/functions/fnc_useItem.sqf b/addons/common/functions/fnc_useItem.sqf index 3accecc429..ba4e668792 100644 --- a/addons/common/functions/fnc_useItem.sqf +++ b/addons/common/functions/fnc_useItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Use item @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_item", ["_vehicleUsage", false]]; @@ -22,7 +22,7 @@ private _return = false; if !(_vehicleUsage) then { if (_item != "") then { - if (_item in items _unit) then { + if (_item in (_unit call EFUNC(common,uniqueItems))) then { _unit removeItem _item; _return = true; } else { diff --git a/addons/common/functions/fnc_useMagazine.sqf b/addons/common/functions/fnc_useMagazine.sqf index 646d461d21..109f01f996 100644 --- a/addons/common/functions/fnc_useMagazine.sqf +++ b/addons/common/functions/fnc_useMagazine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Use magazine @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_magazine", ["_vehicleUsage", false]]; diff --git a/addons/common/functions/fnc_watchVariable.sqf b/addons/common/functions/fnc_watchVariable.sqf index 012a726a6c..6fa86dc9bc 100644 --- a/addons/common/functions/fnc_watchVariable.sqf +++ b/addons/common/functions/fnc_watchVariable.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Shows multiple watched variables on the main display (for easy debugging). @@ -25,8 +26,6 @@ * * Public: Yes */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" #define TEXT_HEIGHT 16 diff --git a/addons/common/functions/fnc_waveHeightAt.sqf b/addons/common/functions/fnc_waveHeightAt.sqf index 1a9049b491..969f4fc87e 100644 --- a/addons/common/functions/fnc_waveHeightAt.sqf +++ b/addons/common/functions/fnc_waveHeightAt.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Gets the wave height at a specific location. Uses a logic, so may be performance iffy @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_position"]; diff --git a/addons/common/functions/fnc_worldToScreenBounds.sqf b/addons/common/functions/fnc_worldToScreenBounds.sqf index 42ffa27317..74c19d0b4e 100644 --- a/addons/common/functions/fnc_worldToScreenBounds.sqf +++ b/addons/common/functions/fnc_worldToScreenBounds.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: zGuba 2011 * Function helper for framing objects on screen. @@ -24,7 +25,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object", "_margins", "_offsets"]; diff --git a/addons/common/init_handleModifierKey.sqf b/addons/common/init_handleModifierKey.sqf index 7fe2be6476..364146c551 100644 --- a/addons/common/init_handleModifierKey.sqf +++ b/addons/common/init_handleModifierKey.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Initializes the modifier key handler. @@ -10,7 +11,6 @@ * * Public : No */ -#include "script_component.hpp" _this spawn {// waitUntil {!isNull findDisplay 46};// diff --git a/addons/common/stringtable.xml b/addons/common/stringtable.xml index ceabe0d60b..ce2e76344e 100644 --- a/addons/common/stringtable.xml +++ b/addons/common/stringtable.xml @@ -1,10 +1,10 @@ - + Common Allgemein - Comuni + Comune 全般 通用 通用 @@ -1186,12 +1186,14 @@ 旗帜(ACE-黑色): 旗幟(ACE-黑色) Bandiera (ACE - Nera) + 旗 (ACE - 黒) Flag (ACE - White) 旗帜(ACE-白色): 旗幟(ACE-白色) Bandiera (ACE - Bianca) + 旗 (ACE - 白) diff --git a/addons/concertina_wire/functions/fnc_deploy.sqf b/addons/concertina_wire/functions/fnc_deploy.sqf index 6782f64342..6ff782fb8e 100644 --- a/addons/concertina_wire/functions/fnc_deploy.sqf +++ b/addons/concertina_wire/functions/fnc_deploy.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko, Ruthberg * @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_wirecoil", "_unit"]; diff --git a/addons/concertina_wire/functions/fnc_dismount.sqf b/addons/concertina_wire/functions/fnc_dismount.sqf index ef32431292..487c5685a4 100644 --- a/addons/concertina_wire/functions/fnc_dismount.sqf +++ b/addons/concertina_wire/functions/fnc_dismount.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" // If the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine if (uiNamespace getVariable [QEGVAR(interact_menu,cursorMenuOpened),false]) exitWith { diff --git a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf index 76ee768504..4611aea0f3 100644 --- a/addons/concertina_wire/functions/fnc_dismountSuccess.sqf +++ b/addons/concertina_wire/functions/fnc_dismountSuccess.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko, Ruthberg * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_wire"]; diff --git a/addons/concertina_wire/functions/fnc_handleDamage.sqf b/addons/concertina_wire/functions/fnc_handleDamage.sqf index d4f2555546..958354250b 100644 --- a/addons/concertina_wire/functions/fnc_handleDamage.sqf +++ b/addons/concertina_wire/functions/fnc_handleDamage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * @@ -18,7 +19,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_wire", "", "_damage", "_source", ""]; if (_damage < 0.5) exitWith { 0 }; diff --git a/addons/concertina_wire/functions/fnc_handleInit.sqf b/addons/concertina_wire/functions/fnc_handleInit.sqf index d547a09463..a602281af1 100644 --- a/addons/concertina_wire/functions/fnc_handleInit.sqf +++ b/addons/concertina_wire/functions/fnc_handleInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko * Handles wire Init @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" params ["_wire"]; _wire addEventHandler ["HandleDamage", {call FUNC(handleDamage)}]; diff --git a/addons/concertina_wire/functions/fnc_handleKilled.sqf b/addons/concertina_wire/functions/fnc_handleKilled.sqf index 6649f5c3b6..33f00ebe13 100644 --- a/addons/concertina_wire/functions/fnc_handleKilled.sqf +++ b/addons/concertina_wire/functions/fnc_handleKilled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko * @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_wire", "_killer"]; TRACE_2("params",_wire,_killer); diff --git a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf index dd3504f031..6482ea718a 100644 --- a/addons/concertina_wire/functions/fnc_vehicleDamage.sqf +++ b/addons/concertina_wire/functions/fnc_vehicleDamage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko * Handles vehicle damage from hitting wire @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_wire", "_vehicle"]; private _type = typeOf _wire; diff --git a/addons/concertina_wire/stringtable.xml b/addons/concertina_wire/stringtable.xml index 6c510c56b7..d4e4f78c96 100644 --- a/addons/concertina_wire/stringtable.xml +++ b/addons/concertina_wire/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -9,7 +9,7 @@ Alambre de espino Fill barbelé Ostnatý drát - Filo spinato di concertina + Filo a concertina Concertina wire Arame farpado 鉄条網 @@ -25,7 +25,7 @@ Bobina de alambre de espino Bobine de fil barbelé Svitek ostnatého drátu - Bobina di concertina + Bobina di filo a concertina Concertina wire coil Bobina de arame farpado 鉄条網コイル @@ -41,7 +41,7 @@ Desmontar alambre de espino Démonter le fil barbelé Svinout ostnatý drát - Smonta la concertina + Smonta il filo a concertina Dismount Concertina wire Desmontar arame farpado 鉄条網をほどく @@ -57,7 +57,7 @@ Desplegar alambre de espino Mettre en place le fil barbelé Rozvinout ostnatý drát - Posa il filo di concertina + Piazza il filo a concertina Deploy Concertina wire Colocar arame farpado 鉄条網を置く diff --git a/addons/cookoff/functions/fnc_blowOffTurret.sqf b/addons/cookoff/functions/fnc_blowOffTurret.sqf index fed5afc188..2d76463e8d 100644 --- a/addons/cookoff/functions/fnc_blowOffTurret.sqf +++ b/addons/cookoff/functions/fnc_blowOffTurret.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Blow off turret effect. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // delayed so the object is spawned after the model changes to a wreck // the sudden change in the model would cause nearby physx objects to get stuck diff --git a/addons/cookoff/functions/fnc_cookOff.sqf b/addons/cookoff/functions/fnc_cookOff.sqf index a86564e74d..c19f968c47 100644 --- a/addons/cookoff/functions/fnc_cookOff.sqf +++ b/addons/cookoff/functions/fnc_cookOff.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, commy2 * Start a cook-off in the given vehicle. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/cookoff/functions/fnc_cookOffBox.sqf b/addons/cookoff/functions/fnc_cookOffBox.sqf index 1f2c0b3b90..8f6ef7f2f0 100644 --- a/addons/cookoff/functions/fnc_cookOffBox.sqf +++ b/addons/cookoff/functions/fnc_cookOffBox.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, commy2, SilentSpike * Start a cook-off in the given ammo box. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_box"]; diff --git a/addons/cookoff/functions/fnc_detonateAmmunition.sqf b/addons/cookoff/functions/fnc_detonateAmmunition.sqf index c5c0a64549..f77a2755fd 100644 --- a/addons/cookoff/functions/fnc_detonateAmmunition.sqf +++ b/addons/cookoff/functions/fnc_detonateAmmunition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Detonates ammunition from a vehicle until no ammo left @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" #define MAX_TIME_BETWEEN_AMMO_DET 25 params ["_vehicle", "_magazines", "_totalAmmo"]; diff --git a/addons/cookoff/functions/fnc_engineFire.sqf b/addons/cookoff/functions/fnc_engineFire.sqf index 580bd5d54d..6ed6920b7c 100644 --- a/addons/cookoff/functions/fnc_engineFire.sqf +++ b/addons/cookoff/functions/fnc_engineFire.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, commy2 * Start fire in engine block of a car. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/cookoff/functions/fnc_getVehicleAmmo.sqf b/addons/cookoff/functions/fnc_getVehicleAmmo.sqf index 78d13ee301..810084fe71 100644 --- a/addons/cookoff/functions/fnc_getVehicleAmmo.sqf +++ b/addons/cookoff/functions/fnc_getVehicleAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Gets all magazines inside of a vehicle. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; TRACE_1("getVehicleAmmo",_vehicle); diff --git a/addons/cookoff/functions/fnc_handleDamage.sqf b/addons/cookoff/functions/fnc_handleDamage.sqf index d9fbaf4cef..e9765805cb 100644 --- a/addons/cookoff/functions/fnc_handleDamage.sqf +++ b/addons/cookoff/functions/fnc_handleDamage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, commy2 * Handles all incoming damage for tanks (including wheeled APCs). @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_simulationType", "_thisHandleDamage"]; _thisHandleDamage params ["_vehicle", "", "_damage", "_source", "_ammo", "_hitIndex", "_shooter"]; diff --git a/addons/cookoff/stringtable.xml b/addons/cookoff/stringtable.xml index 653631c410..f81283ff8f 100644 --- a/addons/cookoff/stringtable.xml +++ b/addons/cookoff/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -9,6 +9,7 @@ 誘爆 쿡오프 Durchzündung + Cook off Enable cook off @@ -18,7 +19,7 @@ 誘爆を有効化 쿡오프 현상 활성화 Aktywuj efekty samozapłonu amunicji - Active le cook-off + Activer le cook off Abilita Esplosione 開啟殉爆效果 开启殉爆效果 @@ -58,7 +59,7 @@ Durchzündung für Munitionskisten ermöglichen 탄약 상자 쿡오프 현상 활성화 Aktywuj samozapłon skrzyń z amunicją - Cook-off caisses de munitions + Cook off de caisses de munitions Abilita esplosione cassa munizioni 開啟彈藥箱殉爆效果 开启弹药箱殉爆效果 @@ -69,7 +70,7 @@ Ermöglicht Durchzündung von Munitionskisten. 탄약 상자에 쿡오프 현상을 적용합니다. Aktywuje samozapłon skrzyń z amunicją - Active le cook-off sur toutes les caisses de munitions. + Active le cook off sur toutes les caisses de munitions. Abilita l'esplosione della cassa di munizioni. 開啟彈藥箱殉爆效果 开启弹药箱殉爆效果 @@ -80,7 +81,7 @@ Durchzündung für Munition ermöglichen 탄약 쿡오프 현상 활성화 Aktywuj samozapłon amunicji - Active le cook-off des munitions + Activer le cook off des munitions Abilita Esplosione munizioni 開啟彈藥殉爆效果 开启弹药殉爆效果 @@ -101,7 +102,7 @@ Munitionsdurchzündungsdauer Czas trwania samozapłonu amunicji 弾薬の誘爆持続時間 - Durée cook-off des munitions + Durée de cook off des munitions Durata esplosione munizioni 彈藥殉爆效果持續時間 弹药殉爆效果持续时间 @@ -110,7 +111,7 @@ Multiplier for how long cook off lasts [Setting to 0 will disable ammo cookoff] Faktor für die Munitionsdurchzündungsdauer [0 zum Deaktivieren] - Multiplicateur de la durée du cook-off des munitions [Une valeur de 0 désactive l'effet] + Multiplicateur de la durée du cook off des munitions [Une valeur de 0 désactive l'effet] Mnożnik decydujący jak długo ma trwać samozapłon amunicji [Ustawienie na 0 spowoduje wyłącznie samozapłonu] 誘爆の持続時間を乗数で設定します。[0 に設定で誘爆を無効化] Moltiplicatore della durata dell'esplosione [Impostare 0 disabiliterà l'esplosione delle munizioni] @@ -125,6 +126,7 @@ Faktor für Wahrscheinlichkeit der Durchzündung 殉爆發生機率係數 殉爆发生机率系数 + Coefficient de probabilité du cook off Multiplier for cook-off probability. Higher value results in higher cook-off probability @@ -133,6 +135,7 @@ Faktor für Wahrscheinlichkeit der Durchzündung. Ein höherer Wert führt zu höherer Durchzündungswahrscheinlichkeit. 調整殉爆發生機率係數。值越高代表越容易發生殉爆 调整殉爆发生机率系数。值越高代表越容易发生殉爆。 + Multiplicateur pour la probabilité du cook off. Plus la valeur est élevée, plus la probabilité de cook off est haute. diff --git a/addons/dagr/functions/fnc_handleRangeFinderData.sqf b/addons/dagr/functions/fnc_handleRangeFinderData.sqf index 6d932e5e0d..4d9447240b 100644 --- a/addons/dagr/functions/fnc_handleRangeFinderData.sqf +++ b/addons/dagr/functions/fnc_handleRangeFinderData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rosuto, Ruthberg * Handles incoming data packets from the Vectronix Vector LRF @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" #define EMP_RF_ACC 5 // Rangefinder Accuracy diff --git a/addons/dagr/functions/fnc_menuInit.sqf b/addons/dagr/functions/fnc_menuInit.sqf index b061717c58..0425f1f4d2 100644 --- a/addons/dagr/functions/fnc_menuInit.sqf +++ b/addons/dagr/functions/fnc_menuInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rosuto, Ruthberg * Creates the DAGR menu dialog @@ -12,7 +13,6 @@ * * Public: No */ -#include "script_component.hpp" #define __dsp (uiNamespace getVariable "DAGR_MENU") #define __F1 266874 diff --git a/addons/dagr/functions/fnc_outputData.sqf b/addons/dagr/functions/fnc_outputData.sqf index edabf6209c..a5816e472d 100644 --- a/addons/dagr/functions/fnc_outputData.sqf +++ b/addons/dagr/functions/fnc_outputData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rosuto * DAGR data output loop @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" 135471 cutRsc ["DAGR_DISPLAY", "plain down"]; diff --git a/addons/dagr/functions/fnc_outputVector.sqf b/addons/dagr/functions/fnc_outputVector.sqf index 12716f0e5b..ce2ca2a04c 100644 --- a/addons/dagr/functions/fnc_outputVector.sqf +++ b/addons/dagr/functions/fnc_outputVector.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rosuto * DAGR vector output loop @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - 135471 cutRsc ["DAGR_DISPLAY", "plain down"]; #define __display (uiNameSpace getVariable "DAGR_DISPLAY") diff --git a/addons/dagr/functions/fnc_outputWP.sqf b/addons/dagr/functions/fnc_outputWP.sqf index 0b6a77db7d..41518a0560 100644 --- a/addons/dagr/functions/fnc_outputWP.sqf +++ b/addons/dagr/functions/fnc_outputWP.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rosuto * DAGR waypoint output loop @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" 135471 cutRsc ["DAGR_DISPLAY", "plain down"]; diff --git a/addons/dagr/functions/fnc_toggleOverlay.sqf b/addons/dagr/functions/fnc_toggleOverlay.sqf index af9909efda..c0e229d745 100644 --- a/addons/dagr/functions/fnc_toggleOverlay.sqf +++ b/addons/dagr/functions/fnc_toggleOverlay.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rosuto, Ruthberg * Toggles the DAGR overlay @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(run) = !GVAR(run); diff --git a/addons/disarming/functions/fnc_canBeDisarmed.sqf b/addons/disarming/functions/fnc_canBeDisarmed.sqf index 7e45c42ce0..ab41729f6a 100644 --- a/addons/disarming/functions/fnc_canBeDisarmed.sqf +++ b/addons/disarming/functions/fnc_canBeDisarmed.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/disarming/functions/fnc_canPlayerDisarmUnit.sqf b/addons/disarming/functions/fnc_canPlayerDisarmUnit.sqf index 3c375c8ddf..2468e454fd 100644 --- a/addons/disarming/functions/fnc_canPlayerDisarmUnit.sqf +++ b/addons/disarming/functions/fnc_canPlayerDisarmUnit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_target"]; diff --git a/addons/disarming/functions/fnc_disarmDropItems.sqf b/addons/disarming/functions/fnc_disarmDropItems.sqf index fe362aedd0..4c8fb3bf2d 100644 --- a/addons/disarming/functions/fnc_disarmDropItems.sqf +++ b/addons/disarming/functions/fnc_disarmDropItems.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" #define TIME_MAX_WAIT 5 diff --git a/addons/disarming/functions/fnc_eventCallerFinish.sqf b/addons/disarming/functions/fnc_eventCallerFinish.sqf index 48a7191a5f..60629b221f 100644 --- a/addons/disarming/functions/fnc_eventCallerFinish.sqf +++ b/addons/disarming/functions/fnc_eventCallerFinish.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_caller", "_target", "_errorMsg"]; diff --git a/addons/disarming/functions/fnc_eventTargetFinish.sqf b/addons/disarming/functions/fnc_eventTargetFinish.sqf index f700cb6f79..b750fd51b1 100644 --- a/addons/disarming/functions/fnc_eventTargetFinish.sqf +++ b/addons/disarming/functions/fnc_eventTargetFinish.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_caller", "_target", "_errorMsg"]; diff --git a/addons/disarming/functions/fnc_eventTargetStart.sqf b/addons/disarming/functions/fnc_eventTargetStart.sqf index 8490c17be1..e63289cf20 100644 --- a/addons/disarming/functions/fnc_eventTargetStart.sqf +++ b/addons/disarming/functions/fnc_eventTargetStart.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_caller", "_target", "_listOfObjectsToRemove"]; diff --git a/addons/disarming/functions/fnc_getAllGearContainer.sqf b/addons/disarming/functions/fnc_getAllGearContainer.sqf index 105be91a9e..be46d66e5e 100644 --- a/addons/disarming/functions/fnc_getAllGearContainer.sqf +++ b/addons/disarming/functions/fnc_getAllGearContainer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/disarming/functions/fnc_getAllGearUnit.sqf b/addons/disarming/functions/fnc_getAllGearUnit.sqf index 30d263fd27..db066ad5d8 100644 --- a/addons/disarming/functions/fnc_getAllGearUnit.sqf +++ b/addons/disarming/functions/fnc_getAllGearUnit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/disarming/functions/fnc_openDisarmDialog.sqf b/addons/disarming/functions/fnc_openDisarmDialog.sqf index 0490598231..0b66009949 100644 --- a/addons/disarming/functions/fnc_openDisarmDialog.sqf +++ b/addons/disarming/functions/fnc_openDisarmDialog.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_caller", "_target"]; #define DEFUALTPATH "\A3\Ui_f\data\GUI\Cfg\Ranks\%1_gs.paa" //Sanity Checks diff --git a/addons/disarming/functions/fnc_showItemsInListbox.sqf b/addons/disarming/functions/fnc_showItemsInListbox.sqf index 741a67aa6c..fadbb2d914 100644 --- a/addons/disarming/functions/fnc_showItemsInListbox.sqf +++ b/addons/disarming/functions/fnc_showItemsInListbox.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; diff --git a/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf b/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf index 5dddec5339..60d851b973 100644 --- a/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf +++ b/addons/disarming/functions/fnc_verifyMagazinesMoved.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_startA", "_endA", "_startB", "_endB"]; diff --git a/addons/disposable/functions/fnc_replaceATWeapon.sqf b/addons/disposable/functions/fnc_replaceATWeapon.sqf index d94944bfde..a5ad1196f2 100644 --- a/addons/disposable/functions/fnc_replaceATWeapon.sqf +++ b/addons/disposable/functions/fnc_replaceATWeapon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux, commy2 * Replace the disposable launcher with the used dummy. Called from the unified fired EH. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf b/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf index bd6dec057c..3f12d610d3 100644 --- a/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf +++ b/addons/disposable/functions/fnc_takeLoadedATWeapon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle the take event. Add a dummy magazine if a disposable rocket launcher is taken. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_1("params",_unit); diff --git a/addons/disposable/functions/fnc_updateInventoryDisplay.sqf b/addons/disposable/functions/fnc_updateInventoryDisplay.sqf index 9908c86186..7ab2d18d75 100644 --- a/addons/disposable/functions/fnc_updateInventoryDisplay.sqf +++ b/addons/disposable/functions/fnc_updateInventoryDisplay.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux, commy2 * Hide or show the secondary weapon magazine inventory slot to prevent unloading of dummy magazines. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; params ["_player", ["_display",(findDisplay 602),[displayNull]]]; diff --git a/addons/dogtags/CfgVehicles.hpp b/addons/dogtags/CfgVehicles.hpp index af8cfb1442..cc56410699 100644 --- a/addons/dogtags/CfgVehicles.hpp +++ b/addons/dogtags/CfgVehicles.hpp @@ -36,7 +36,7 @@ class CfgVehicles { condition = "true"; statement = ""; exceptions[] = {"isNotSwimming", "isNotInside", "isNotSitting"}; - insertChildren = QUOTE(_this call DFUNC(addDogtagActions)); + insertChildren = QUOTE(_player call DFUNC(addDogtagActions)); }; }; }; diff --git a/addons/dogtags/functions/fnc_addDogtagActions.sqf b/addons/dogtags/functions/fnc_addDogtagActions.sqf index 988f909775..2911b27a92 100644 --- a/addons/dogtags/functions/fnc_addDogtagActions.sqf +++ b/addons/dogtags/functions/fnc_addDogtagActions.sqf @@ -1,42 +1,38 @@ +#include "script_component.hpp" /* - * Author: SzwedzikPL - * Creates one action per dogtag. + * Author: SzwedzikPL, mharis001 + * Returns children actions for checking dogtags in player's inventory. * * Arguments: - * 0: Target - * 1: Player + * 0: Player * * Return Value: - * Children actions + * Actions * * Example: - * _childrenActions = [unit, player] call ace_dogtags_fnc_addDogtagActions + * [_player] call ace_dogtags_fnc_addDogtagActions * * Public: No */ -#include "script_component.hpp" -params ["_target", "_player"]; +params ["_player"]; -//Get all dogtags and their ids -private _unitDogtags = []; -private _unitDogtagIDs = []; -{ - private _id = getNumber (configFile >> "CfgWeapons" >> _x >> QGVAR(tagID)); - if (_id > 0) then { - _unitDogtags pushBack _x; - _unitDogtagIDs pushBack _id; - }; -} forEach items _player; +private _fnc_getActions = { + private _actions = []; + private _cfgWeapons = configFile >> "CfgWeapons"; -//Create action children for all dogtags -private _actions = []; -{ - private _displayName = getText (configFile >> "CfgWeapons" >> _x >> "displayName"); - private _picture = getText (configFile >> "CfgWeapons" >> _x >> "picture"); + { + private _config = _cfgWeapons >> _x; + if (getNumber (_config >> QGVAR(tagID)) > 0) then { + private _displayName = getText (_config >> "displayName"); + private _picture = getText (_config >> "picture"); - private _action = [_x, _displayName, _picture, {_this call FUNC(checkDogtagItem)}, {true}, {}, _x] call EFUNC(interact_menu,createAction); - _actions pushBack [_action, [], _player]; -} forEach _unitDogtags; + private _action = [_x, _displayName, _picture, FUNC(checkDogtagItem), {true}, {}, _x] call EFUNC(interact_menu,createAction); + _actions pushBack [_action, [], _player]; + }; + } forEach (_player call EFUNC(common,uniqueItems)); -_actions + _actions +}; + +[[], _fnc_getActions, _player, QGVAR(actionsCache), 9999, "cba_events_loadoutEvent"] call EFUNC(common,cachedCall); diff --git a/addons/dogtags/functions/fnc_addDogtagItem.sqf b/addons/dogtags/functions/fnc_addDogtagItem.sqf index 09d07f1d13..acecd6b252 100644 --- a/addons/dogtags/functions/fnc_addDogtagItem.sqf +++ b/addons/dogtags/functions/fnc_addDogtagItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SzwedzikPL * Adds dogtag item to unit (triggered by server). @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_item", "_dogtagData"]; diff --git a/addons/dogtags/functions/fnc_bloodType.sqf b/addons/dogtags/functions/fnc_bloodType.sqf index a7cafbd1fd..46e75ee7f9 100644 --- a/addons/dogtags/functions/fnc_bloodType.sqf +++ b/addons/dogtags/functions/fnc_bloodType.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Reports a blood type depending on the units name. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define BLOOD_TYPES ["O POS", "O NEG", "A POS", "A NEG", "B POS", "B NEG", "AB POS", "AB NEG"] diff --git a/addons/dogtags/functions/fnc_canCheckDogtag.sqf b/addons/dogtags/functions/fnc_canCheckDogtag.sqf index b31911a0c6..8abbf8858d 100644 --- a/addons/dogtags/functions/fnc_canCheckDogtag.sqf +++ b/addons/dogtags/functions/fnc_canCheckDogtag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SzwedzikPL * Checks if dogtag can be checked. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_target"]; diff --git a/addons/dogtags/functions/fnc_canTakeDogtag.sqf b/addons/dogtags/functions/fnc_canTakeDogtag.sqf index 37163f68c7..8bcad4a73d 100644 --- a/addons/dogtags/functions/fnc_canTakeDogtag.sqf +++ b/addons/dogtags/functions/fnc_canTakeDogtag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SzwedzikPL * Checks if dogtag can be taken. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_target"]; diff --git a/addons/dogtags/functions/fnc_checkDogtag.sqf b/addons/dogtags/functions/fnc_checkDogtag.sqf index 7c032259c1..fb722361a4 100644 --- a/addons/dogtags/functions/fnc_checkDogtag.sqf +++ b/addons/dogtags/functions/fnc_checkDogtag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SzwedzikPL * Checks unit dogtag. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_target"]; diff --git a/addons/dogtags/functions/fnc_checkDogtagItem.sqf b/addons/dogtags/functions/fnc_checkDogtagItem.sqf index 237c4cf4b1..8ce7864774 100644 --- a/addons/dogtags/functions/fnc_checkDogtagItem.sqf +++ b/addons/dogtags/functions/fnc_checkDogtagItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SzwedzikPL * Check dogtag self menu action. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_target", "_item"]; diff --git a/addons/dogtags/functions/fnc_disableFactionDogtags.sqf b/addons/dogtags/functions/fnc_disableFactionDogtags.sqf index 2418b31f4e..c299af3a7d 100644 --- a/addons/dogtags/functions/fnc_disableFactionDogtags.sqf +++ b/addons/dogtags/functions/fnc_disableFactionDogtags.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Disable this faction from using dogtags. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_faction", "", [""]]]; diff --git a/addons/dogtags/functions/fnc_getDogtagData.sqf b/addons/dogtags/functions/fnc_getDogtagData.sqf index 607426fda4..d566daf64b 100644 --- a/addons/dogtags/functions/fnc_getDogtagData.sqf +++ b/addons/dogtags/functions/fnc_getDogtagData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Get unit dogtag data. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/dogtags/functions/fnc_getDogtagItem.sqf b/addons/dogtags/functions/fnc_getDogtagItem.sqf index 43897ac9fc..22a0561937 100644 --- a/addons/dogtags/functions/fnc_getDogtagItem.sqf +++ b/addons/dogtags/functions/fnc_getDogtagItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SzwedzikPL * Server: creates new dogtag item and send it to client. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" if(!isServer) exitWith {}; diff --git a/addons/dogtags/functions/fnc_sendDogtagData.sqf b/addons/dogtags/functions/fnc_sendDogtagData.sqf index 34665fdfee..c43cf04dab 100644 --- a/addons/dogtags/functions/fnc_sendDogtagData.sqf +++ b/addons/dogtags/functions/fnc_sendDogtagData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SzwedzikPL * Server: returns to client data on given dogtag. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" if (!isServer) exitWith {}; diff --git a/addons/dogtags/functions/fnc_showDogtag.sqf b/addons/dogtags/functions/fnc_showDogtag.sqf index aac4557f64..8e7bec620c 100644 --- a/addons/dogtags/functions/fnc_showDogtag.sqf +++ b/addons/dogtags/functions/fnc_showDogtag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SzwedzikPL * Shows dogtag. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; diff --git a/addons/dogtags/functions/fnc_ssn.sqf b/addons/dogtags/functions/fnc_ssn.sqf index 257f47a790..3da972ecd8 100644 --- a/addons/dogtags/functions/fnc_ssn.sqf +++ b/addons/dogtags/functions/fnc_ssn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Reports a social security number generated from the units name. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_name"]; diff --git a/addons/dogtags/functions/fnc_takeDogtag.sqf b/addons/dogtags/functions/fnc_takeDogtag.sqf index 5073ff73f7..464f282334 100644 --- a/addons/dogtags/functions/fnc_takeDogtag.sqf +++ b/addons/dogtags/functions/fnc_takeDogtag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SzwedzikPL * If dogtag is not already taken triggers event on server. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_target"]; diff --git a/addons/dogtags/stringtable.xml b/addons/dogtags/stringtable.xml index 216ece6f78..e0ef31163a 100644 --- a/addons/dogtags/stringtable.xml +++ b/addons/dogtags/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -82,6 +82,8 @@ Onscreen display for checking dogtags 在畫面中顯示檢查兵籍牌 + 確認中のドッグタグを画面上で表示します + Display su schermo per il controllo delle piastrine diff --git a/addons/dragging/functions/fnc_canCarry.sqf b/addons/dragging/functions/fnc_canCarry.sqf index 381940a9df..4e09cedbdc 100644 --- a/addons/dragging/functions/fnc_canCarry.sqf +++ b/addons/dragging/functions/fnc_canCarry.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if unit can carry the object. Doesn't check weight. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/dragging/functions/fnc_canDrag.sqf b/addons/dragging/functions/fnc_canDrag.sqf index 31c9810aba..81a8537586 100644 --- a/addons/dragging/functions/fnc_canDrag.sqf +++ b/addons/dragging/functions/fnc_canDrag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if unit can drag the object. Doesn't check weight. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/dragging/functions/fnc_canDrop.sqf b/addons/dragging/functions/fnc_canDrop.sqf index 286f6de3a9..2d42ae6244 100644 --- a/addons/dragging/functions/fnc_canDrop.sqf +++ b/addons/dragging/functions/fnc_canDrop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if unit can drop the object. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/dragging/functions/fnc_canDrop_carry.sqf b/addons/dragging/functions/fnc_canDrop_carry.sqf index 3d3732f62d..89be866ea6 100644 --- a/addons/dragging/functions/fnc_canDrop_carry.sqf +++ b/addons/dragging/functions/fnc_canDrop_carry.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if unit can drop the carried object. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/dragging/functions/fnc_carryObject.sqf b/addons/dragging/functions/fnc_carryObject.sqf index 985f3ddab6..f7976079b3 100644 --- a/addons/dragging/functions/fnc_carryObject.sqf +++ b/addons/dragging/functions/fnc_carryObject.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Carry an object. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; TRACE_2("params",_unit,_target); diff --git a/addons/dragging/functions/fnc_carryObjectPFH.sqf b/addons/dragging/functions/fnc_carryObjectPFH.sqf index 963921efa7..6361dcc66d 100644 --- a/addons/dragging/functions/fnc_carryObjectPFH.sqf +++ b/addons/dragging/functions/fnc_carryObjectPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * PFH for Carry Object @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" #ifdef DEBUG_ENABLED_DRAGGING systemChat format ["%1 carryObjectPFH running", CBA_missionTime]; diff --git a/addons/dragging/functions/fnc_dragObject.sqf b/addons/dragging/functions/fnc_dragObject.sqf index 77b4fc703b..347eb857db 100644 --- a/addons/dragging/functions/fnc_dragObject.sqf +++ b/addons/dragging/functions/fnc_dragObject.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Drag an object. Called from ace_dragging_fnc_startDrag @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; TRACE_2("params",_unit,_target); diff --git a/addons/dragging/functions/fnc_dragObjectPFH.sqf b/addons/dragging/functions/fnc_dragObjectPFH.sqf index 08aeba738b..dd18e0c825 100644 --- a/addons/dragging/functions/fnc_dragObjectPFH.sqf +++ b/addons/dragging/functions/fnc_dragObjectPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * PFH for Drag Object @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" #ifdef DEBUG_ENABLED_DRAGGING systemChat format ["%1 dragObjectPFH running", CBA_missionTime]; diff --git a/addons/dragging/functions/fnc_dropObject.sqf b/addons/dragging/functions/fnc_dropObject.sqf index 6553c84929..fde2a7f6d7 100644 --- a/addons/dragging/functions/fnc_dropObject.sqf +++ b/addons/dragging/functions/fnc_dropObject.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Drop a dragged object. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; TRACE_2("params",_unit,_target); diff --git a/addons/dragging/functions/fnc_dropObject_carry.sqf b/addons/dragging/functions/fnc_dropObject_carry.sqf index 857e64bb7a..ae7bd3598e 100644 --- a/addons/dragging/functions/fnc_dropObject_carry.sqf +++ b/addons/dragging/functions/fnc_dropObject_carry.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Drop a carried object. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; TRACE_2("params",_unit,_target); diff --git a/addons/dragging/functions/fnc_getWeight.sqf b/addons/dragging/functions/fnc_getWeight.sqf index 2c63d220fa..cd06b8a884 100644 --- a/addons/dragging/functions/fnc_getWeight.sqf +++ b/addons/dragging/functions/fnc_getWeight.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: L-H, edited by commy2, rewritten by joko // Jonas * Returns the weight of a crate. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object"]; diff --git a/addons/dragging/functions/fnc_handleAnimChanged.sqf b/addons/dragging/functions/fnc_handleAnimChanged.sqf index 2a531ea67c..7fa242ae16 100644 --- a/addons/dragging/functions/fnc_handleAnimChanged.sqf +++ b/addons/dragging/functions/fnc_handleAnimChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle the animaion for a Unit for Dragging Module @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_thisArgs", "_thisID"]; // From CBA_fnc_addBISEventHandler; diff --git a/addons/dragging/functions/fnc_handleKilled.sqf b/addons/dragging/functions/fnc_handleKilled.sqf index 36bda60b78..672869d3c9 100644 --- a/addons/dragging/functions/fnc_handleKilled.sqf +++ b/addons/dragging/functions/fnc_handleKilled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle death of the dragger @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_1("params",_unit); diff --git a/addons/dragging/functions/fnc_handlePlayerChanged.sqf b/addons/dragging/functions/fnc_handlePlayerChanged.sqf index a0d9e63449..a404660106 100644 --- a/addons/dragging/functions/fnc_handlePlayerChanged.sqf +++ b/addons/dragging/functions/fnc_handlePlayerChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle player changes. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_newPlayer", "_oldPlayer"]; TRACE_2("params",_newPlayer,_oldPlayer); diff --git a/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf b/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf index a8df6b5b7d..7d07583ddf 100644 --- a/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf +++ b/addons/dragging/functions/fnc_handlePlayerWeaponChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle the Weapon Changed Event @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_weapon"]; TRACE_2("params",_unit,_weapon); diff --git a/addons/dragging/functions/fnc_handleScrollWheel.sqf b/addons/dragging/functions/fnc_handleScrollWheel.sqf index 22a19627c0..9c444add21 100644 --- a/addons/dragging/functions/fnc_handleScrollWheel.sqf +++ b/addons/dragging/functions/fnc_handleScrollWheel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: L-H, commy2 * Handles raising and lowering the dragged weapon to be able to place it on top of objects. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_scrollAmount"]; diff --git a/addons/dragging/functions/fnc_handleUnconscious.sqf b/addons/dragging/functions/fnc_handleUnconscious.sqf index 2e891b01c6..ba399aee49 100644 --- a/addons/dragging/functions/fnc_handleUnconscious.sqf +++ b/addons/dragging/functions/fnc_handleUnconscious.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle the Unconscious of a Unit while Dragging @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/dragging/functions/fnc_initObject.sqf b/addons/dragging/functions/fnc_initObject.sqf index d36ffe9339..8e352a00bb 100644 --- a/addons/dragging/functions/fnc_initObject.sqf +++ b/addons/dragging/functions/fnc_initObject.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Initialize variables for drag or carryable objects. Called from init EH. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object"]; diff --git a/addons/dragging/functions/fnc_initPerson.sqf b/addons/dragging/functions/fnc_initPerson.sqf index c8c26a4f8c..c9365710dd 100644 --- a/addons/dragging/functions/fnc_initPerson.sqf +++ b/addons/dragging/functions/fnc_initPerson.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Initialize variables for drag or carryable persons. Called from init EH. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/dragging/functions/fnc_setCarryable.sqf b/addons/dragging/functions/fnc_setCarryable.sqf index 4de52e7bd8..12e2b74a8c 100644 --- a/addons/dragging/functions/fnc_setCarryable.sqf +++ b/addons/dragging/functions/fnc_setCarryable.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Enable the object to be carried. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_object", "_enableCarry", "_position", "_direction"]; diff --git a/addons/dragging/functions/fnc_setDraggable.sqf b/addons/dragging/functions/fnc_setDraggable.sqf index ce47f8a829..36f42dd9f6 100644 --- a/addons/dragging/functions/fnc_setDraggable.sqf +++ b/addons/dragging/functions/fnc_setDraggable.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Enable the object to be dragged. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_player", "_target"]; params ["_object", "_enableDrag", "_position", "_direction"]; diff --git a/addons/dragging/functions/fnc_startCarry.sqf b/addons/dragging/functions/fnc_startCarry.sqf index 1a53a06994..5d7bc86815 100644 --- a/addons/dragging/functions/fnc_startCarry.sqf +++ b/addons/dragging/functions/fnc_startCarry.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Start the carrying process. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; TRACE_2("params",_unit,_target); diff --git a/addons/dragging/functions/fnc_startCarryPFH.sqf b/addons/dragging/functions/fnc_startCarryPFH.sqf index 007469d960..89f9f232ed 100644 --- a/addons/dragging/functions/fnc_startCarryPFH.sqf +++ b/addons/dragging/functions/fnc_startCarryPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Carry PFH @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" #ifdef DEBUG_ENABLED_DRAGGING systemChat format ["%1 startCarryPFH running", CBA_missionTime]; diff --git a/addons/dragging/functions/fnc_startDrag.sqf b/addons/dragging/functions/fnc_startDrag.sqf index 8cf552e3d1..b926a972ce 100644 --- a/addons/dragging/functions/fnc_startDrag.sqf +++ b/addons/dragging/functions/fnc_startDrag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Start the dragging process. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; TRACE_2("params",_unit,_target); diff --git a/addons/dragging/functions/fnc_startDragPFH.sqf b/addons/dragging/functions/fnc_startDragPFH.sqf index a5bab835b7..614b6a8741 100644 --- a/addons/dragging/functions/fnc_startDragPFH.sqf +++ b/addons/dragging/functions/fnc_startDragPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Drag PFH @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" #ifdef DEBUG_ENABLED_DRAGGING systemChat format ["%1 startDragPFH running", CBA_missionTime]; diff --git a/addons/explosives/ACE_Arsenal_Stats.hpp b/addons/explosives/ACE_Arsenal_Stats.hpp index 61534b0f9d..cde27f3bde 100644 --- a/addons/explosives/ACE_Arsenal_Stats.hpp +++ b/addons/explosives/ACE_Arsenal_Stats.hpp @@ -4,7 +4,7 @@ class EGVAR(arsenal,stats) { scope = 2; priority = 1; stats[] = {QGVAR(Range)}; - displayName= CSTRING(statExploRange); + displayName = CSTRING(statExploRange); showText = 1; textStatement = QUOTE(params [ARR_2('_stat', '_config')]; private _exploRangeStat = getNumber (_config >> _stat select 0); format [ARR_3('%1m (%2ft)', _exploRangeStat, (_exploRangeStat / 0.3048) toFixed 1)]); condition = QUOTE(params [ARR_2('', '_config')]; (getNumber (_config >> QQGVAR(Detonator))) > 0); diff --git a/addons/explosives/ACE_Triggers.hpp b/addons/explosives/ACE_Triggers.hpp index b62e593261..e9c717504e 100644 --- a/addons/explosives/ACE_Triggers.hpp +++ b/addons/explosives/ACE_Triggers.hpp @@ -1,13 +1,19 @@ class ACE_Triggers { - /* onPlace parameters: -0: OBJECT - unit placing -1: OBJECT - Placed explosive -2: STRING - Magazine classname -3: ARRAY - vars -Last Index: ACE_Triggers config of trigger type. -onSetup parameters: -0: STRING - Magazine Classname - */ + /* onPlace Parameters: + * 0: Unit placing + * 1: Explosive + * 2: Magazine classname + * 3: Additional arguments + * - Same as those passed to FUNC(placeExplosive) for specific trigger type + * - Last element is ACE_Triggers config of the trigger type + * + * onSetup Parameters: + * 0: Explosive + * 1: Magazine classname + * + * For both, expected return type is BOOL. + * True indicates manual handling of explosive setup/placement. + */ class Command { isAttachable = 1; displayName = CSTRING(clacker_displayName); @@ -50,8 +56,8 @@ onSetup parameters: isAttachable = 1; displayName = CSTRING(timerName); picture = QPATHTOF(data\UI\Timer.paa); - onPlace = QUOTE([ARR_2(_this select 1,(_this select 3) select 0)] call FUNC(startTimer);false); - onSetup = QUOTE(_this call FUNC(openTimerSetUI);true); + onPlace = QUOTE([ARR_2(_this select 1, _this select 3 select 0)] call FUNC(startTimer); false); + onSetup = QUOTE(_this call FUNC(openTimerUI)); }; class Tripwire { isAttachable = 0; diff --git a/addons/explosives/CfgEventHandlers.hpp b/addons/explosives/CfgEventHandlers.hpp index 37df24577d..d2137371ec 100644 --- a/addons/explosives/CfgEventHandlers.hpp +++ b/addons/explosives/CfgEventHandlers.hpp @@ -1,4 +1,3 @@ - class Extended_PreStart_EventHandlers { class ADDON { init = QUOTE(call COMPILE_FILE(XEH_preStart)); @@ -38,3 +37,9 @@ class Extended_DisplayLoad_EventHandlers { ADDON = QUOTE(_this call COMPILE_FILE(XEH_missionDisplayLoad)); }; }; + +class Extended_Init_EventHandlers { + class ACE_Explosives_Place_SLAM { + ADDON = QUOTE(params ['_mine']; if (local _mine) then {_mine setCenterOfMass [ARR_3(0,-0.035,0.05)]; _mine setMass 5}); + }; +}; diff --git a/addons/explosives/CfgVehicles.hpp b/addons/explosives/CfgVehicles.hpp index c183720386..97562dc836 100644 --- a/addons/explosives/CfgVehicles.hpp +++ b/addons/explosives/CfgVehicles.hpp @@ -1,4 +1,3 @@ - class CBA_Extended_EventHandlers; class CfgVehicles { @@ -15,12 +14,11 @@ class CfgVehicles { insertChildren = QUOTE([_player] call FUNC(addTransmitterActions);); class ACE_Place { displayName = CSTRING(Place); - condition = QUOTE((vehicle _player == _player) and {[_player] call FUNC(hasExplosives)}); statement = ""; - insertChildren = QUOTE([_player] call FUNC(addExplosiveActions);); + condition = "true"; exceptions[] = {"isNotSwimming"}; - showDisabled = 1; icon = QPATHTOF(UI\Place_Explosive_ca.paa); + insertChildren = QUOTE(_player call FUNC(addExplosiveActions)); }; class ACE_Cellphone { displayName = CSTRING(cellphone_displayName); diff --git a/addons/explosives/CfgWeapons.hpp b/addons/explosives/CfgWeapons.hpp index 9296813ee5..56ef154661 100644 --- a/addons/explosives/CfgWeapons.hpp +++ b/addons/explosives/CfgWeapons.hpp @@ -12,7 +12,7 @@ class CfgWeapons { class CBA_MiscItem_ItemInfo; class ACE_ExplosiveItem: CBA_MiscItem_ItemInfo { - allowedSlots[] = {801,701,901}; + allowedSlots[] = {TYPE_UNIFORM,TYPE_VEST,TYPE_BACKPACK}; //type = 201; }; diff --git a/addons/explosives/ExplosivesUI.hpp b/addons/explosives/ExplosivesUI.hpp index 7b0b2c6629..cd06abff5b 100644 --- a/addons/explosives/ExplosivesUI.hpp +++ b/addons/explosives/ExplosivesUI.hpp @@ -1,19 +1,4 @@ -#define GUI_GRID_X (0) -#define GUI_GRID_Y (0) -#define GUI_GRID_W (0.025) -#define GUI_GRID_H (0.04) - -#define ST_CENTER 0x02 -#define X_OFFSET 0.25 - -class RscText; -class RscButton; -class RscXSliderH; -class IGUIBack; -class RscPicture; -class RscEdit; - -class Rsc_ACE_CallScreen_Edit:RscEdit { +class Rsc_ACE_CallScreen_Edit: RscEdit { canModify = 1; colorBackground[] = {0,0,0,0}; colorText[] = {0,0,0,1}; @@ -32,7 +17,7 @@ class Rsc_ACE_CallScreen_Edit:RscEdit { w = 0.0825 * safezoneW; h = 0.044 * safezoneH; }; -class Rsc_ACE_HiddenButton:RscButton { +class Rsc_ACE_HiddenButton: RscButton { colorText[] = {0, 0, 0, 0}; colorDisabled[] = {0, 0, 0, 0}; colorBackground[] = {0, 0, 0, 0}; @@ -46,66 +31,7 @@ class Rsc_ACE_HiddenButton:RscButton { shadow = 0; }; -class Rsc_ACE_Timer_Slider:RscXSliderH { - x = 0.4; - y = 0.2; - w = 0.3; - h = "1*((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - colorBackground[] = {0,0,0,0.5}; -}; - -class RscACE_SelectTimeUI { - idd = 8854; - movingEnable = 0; - class controls { - class back:IGUIBack { - x = X_OFFSET; - y = 0; - w = 0.5; - h = 0.2; - colorBackground[] = {0, 0, 0, 0.5}; - }; - class header: RscText{ - idc = 8870; - x = X_OFFSET + 0.005; - y = 0.005; - w = 0.49; - h = 0.05; - style = ST_CENTER; - text = ""; - }; - class slider: Rsc_ACE_Timer_Slider { - idc = 8845; - x = X_OFFSET + 0.005; - y = 0.06; - w = 0.49; - h = 0.025; - onSliderPosChanged = "_mins = floor((_this select 1)/60);_secs=floor((_this select 1) - (_mins*60));ctrlSetText [8870, format[localize 'STR_ACE_Explosives_TimerMenu',_mins, _secs]];"; - }; - class cancelBtn: RscButton { - idc = 8855; - x = X_OFFSET + 0.005; - w = 0.15; - h = 0.1; - y = 0.09; - style = ST_CENTER; - text = CSTRING(Cancel); - action = "closeDialog 0;"; - }; - class approveBtn: RscButton { - idc = 8860; - x = X_OFFSET + 0.345; - y = 0.09; - h = 0.1; - w = 0.15; - style = ST_CENTER; - text = CSTRING(SetTime); - action = "closeDialog 0;"; - }; - }; -}; - -class Rsc_ACE_NumKeyButton: Rsc_ACE_HiddenButton{}; +class Rsc_ACE_NumKeyButton: Rsc_ACE_HiddenButton {}; class Rsc_ACE_PhoneInterface { idd = 8855; movingEnable = 1; diff --git a/addons/explosives/TimerDialog.hpp b/addons/explosives/TimerDialog.hpp new file mode 100644 index 0000000000..a3ab96af06 --- /dev/null +++ b/addons/explosives/TimerDialog.hpp @@ -0,0 +1,97 @@ +class GVAR(timerUI) { + idd = -1; + movingEnable = 1; + enableSimulation = 1; + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(timerDisplay), _this select 0)]); + class controlsBackground { + class Header: RscText { + idc = -1; + text = CSTRING(ExplosiveTimer); + x = 13.5 * GUI_GRID_W + GUI_GRID_CENTER_X; + y = 5 * GUI_GRID_H + GUI_GRID_CENTER_Y; + w = 13 * GUI_GRID_W; + h = GUI_GRID_H; + colorBackground[] = GUI_BCG_COLOR; + moving = 1; + }; + class Background: RscText { + idd = -1; + x = 13.5 * GUI_GRID_W + GUI_GRID_CENTER_X; + y = 6.1 * GUI_GRID_H + GUI_GRID_CENTER_Y; + w = 13 * GUI_GRID_W; + h = 6.5 * GUI_GRID_H; + colorBackground[] = {0, 0, 0, 0.8}; + }; + }; + class controls { + class DigitBackground_1: RscPicture { + idc = -1; + text = QPATHTOF(UI\seven_segment_8.paa); + x = 14 * GUI_GRID_W + GUI_GRID_CENTER_X; + y = 6.6 * GUI_GRID_H + GUI_GRID_CENTER_Y; + w = 4 * GUI_GRID_W; + h = 4 * GUI_GRID_H; + colorText[] = {0.3, 0.3, 0.3, 0.5}; + }; + class DigitBackground_2: DigitBackground_1 { + x = 16.4 * GUI_GRID_W + GUI_GRID_CENTER_X; + }; + class DigitBackground_3: DigitBackground_1 { + x = 19.7 * GUI_GRID_W + GUI_GRID_CENTER_X; + }; + class DigitBackground_4: DigitBackground_1 { + x = 22.1 * GUI_GRID_W + GUI_GRID_CENTER_X; + }; + class DigitSeparator: DigitBackground_1 { + text = QPATHTOF(UI\seven_segment_separator.paa); + x = 18.025 * GUI_GRID_W + GUI_GRID_CENTER_X; + colorText[] = {1, 0.05, 0.05, 1}; + }; + class Digit_1: DigitBackground_1 { + idc = IDC_TIMER_DIGIT_1; + text = QPATHTOF(UI\seven_segment_0.paa); + colorText[] = {1, 0.05, 0.05, 1}; + }; + class Digit_2: Digit_1 { + idc = IDC_TIMER_DIGIT_2; + x = 16.4 * GUI_GRID_W + GUI_GRID_CENTER_X; + }; + class Digit_3: Digit_1 { + idc = IDC_TIMER_DIGIT_3; + x = 19.7 * GUI_GRID_W + GUI_GRID_CENTER_X; + }; + class Digit_4: Digit_1 { + idc = IDC_TIMER_DIGIT_4; + x = 22.1 * GUI_GRID_W + GUI_GRID_CENTER_X; + }; + class Slider: ctrlXSliderH { + idc = IDC_TIMER_SLIDER; + x = 14 * GUI_GRID_W + GUI_GRID_CENTER_X; + y = 11.1 * GUI_GRID_H + GUI_GRID_CENTER_Y; + w = 12 * GUI_GRID_W; + h = GUI_GRID_H; + color[] = {0.3, 0.3, 0.3, 0.7}; + colorActive[] = {0.3, 0.3, 0.3, 0.7}; + sliderRange[] = {TIMER_VALUE_MIN, TIMER_VALUE_MAX}; + sliderPosition = TIMER_VALUE_DEFAULT; + }; + class CancelButton: RscButton { + idc = -1; + text = CSTRING(Cancel); + onButtonClick = QUOTE(closeDialog 0); + x = 13.5 * GUI_GRID_W + GUI_GRID_CENTER_X; + y = 12.7 * GUI_GRID_H + GUI_GRID_CENTER_Y; + w = 5 * GUI_GRID_W; + h = GUI_GRID_H; + colorActive[] = {0, 0, 0, 1}; + colorBackground[] = {0, 0, 0, 0.8}; + colorFocused[] = {0, 0, 0, 0.8}; + }; + class ConfirmButton: CancelButton { + idc = IDC_TIMER_CONFIRM; + text = CSTRING(SetTime); + onButtonClick = ""; + x = 21.5 * GUI_GRID_W + GUI_GRID_CENTER_X; + }; + }; +}; diff --git a/addons/explosives/UI/seven_segment_0.paa b/addons/explosives/UI/seven_segment_0.paa new file mode 100644 index 0000000000..39c56516b0 Binary files /dev/null and b/addons/explosives/UI/seven_segment_0.paa differ diff --git a/addons/explosives/UI/seven_segment_1.paa b/addons/explosives/UI/seven_segment_1.paa new file mode 100644 index 0000000000..d88e20c28b Binary files /dev/null and b/addons/explosives/UI/seven_segment_1.paa differ diff --git a/addons/explosives/UI/seven_segment_2.paa b/addons/explosives/UI/seven_segment_2.paa new file mode 100644 index 0000000000..dd1e6bd383 Binary files /dev/null and b/addons/explosives/UI/seven_segment_2.paa differ diff --git a/addons/explosives/UI/seven_segment_3.paa b/addons/explosives/UI/seven_segment_3.paa new file mode 100644 index 0000000000..71da8743c0 Binary files /dev/null and b/addons/explosives/UI/seven_segment_3.paa differ diff --git a/addons/explosives/UI/seven_segment_4.paa b/addons/explosives/UI/seven_segment_4.paa new file mode 100644 index 0000000000..3a054e3c48 Binary files /dev/null and b/addons/explosives/UI/seven_segment_4.paa differ diff --git a/addons/explosives/UI/seven_segment_5.paa b/addons/explosives/UI/seven_segment_5.paa new file mode 100644 index 0000000000..7622645c24 Binary files /dev/null and b/addons/explosives/UI/seven_segment_5.paa differ diff --git a/addons/explosives/UI/seven_segment_6.paa b/addons/explosives/UI/seven_segment_6.paa new file mode 100644 index 0000000000..d805a028d5 Binary files /dev/null and b/addons/explosives/UI/seven_segment_6.paa differ diff --git a/addons/explosives/UI/seven_segment_7.paa b/addons/explosives/UI/seven_segment_7.paa new file mode 100644 index 0000000000..f9070da7a7 Binary files /dev/null and b/addons/explosives/UI/seven_segment_7.paa differ diff --git a/addons/explosives/UI/seven_segment_8.paa b/addons/explosives/UI/seven_segment_8.paa new file mode 100644 index 0000000000..f09be85074 Binary files /dev/null and b/addons/explosives/UI/seven_segment_8.paa differ diff --git a/addons/explosives/UI/seven_segment_9.paa b/addons/explosives/UI/seven_segment_9.paa new file mode 100644 index 0000000000..9139d4ea17 Binary files /dev/null and b/addons/explosives/UI/seven_segment_9.paa differ diff --git a/addons/explosives/UI/seven_segment_separator.paa b/addons/explosives/UI/seven_segment_separator.paa new file mode 100644 index 0000000000..aa5bb0a159 Binary files /dev/null and b/addons/explosives/UI/seven_segment_separator.paa differ diff --git a/addons/explosives/XEH_PREP.hpp b/addons/explosives/XEH_PREP.hpp index 17558ee54c..c04e0d3133 100644 --- a/addons/explosives/XEH_PREP.hpp +++ b/addons/explosives/XEH_PREP.hpp @@ -1,4 +1,3 @@ - PREP(addCellphoneIED); PREP(addClacker); PREP(addDetonateActions); @@ -16,28 +15,19 @@ PREP(detonateExplosive); PREP(detonateExplosiveAll); PREP(dialPhone); PREP(dialingPhone); - PREP(handleScrollWheel); - PREP(hasExplosives); PREP(hasPlacedExplosives); - PREP(interactEH); - PREP(getDetonators); PREP(getPlacedExplosives); PREP(getSpeedDialExplosive); - PREP(module); - PREP(onIncapacitated); PREP(onInventoryChanged); - -PREP(openTimerSetUI); - +PREP(openTimerUI); PREP(placeExplosive); PREP(removeFromSpeedDial); - PREP(scriptedExplosive); PREP(selectTrigger); PREP(setupExplosive); diff --git a/addons/explosives/XEH_postInit.sqf b/addons/explosives/XEH_postInit.sqf index d98064cfe1..76d3e44bd1 100644 --- a/addons/explosives/XEH_postInit.sqf +++ b/addons/explosives/XEH_postInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Initialises the player object for the explosive system. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //Event for setting explosive placement angle/pitch: [QGVAR(place), {_this call FUNC(setPosition)}] call CBA_fnc_addEventHandler; diff --git a/addons/explosives/XEH_preInit.sqf b/addons/explosives/XEH_preInit.sqf index 969b00e784..d9a8d39ff4 100644 --- a/addons/explosives/XEH_preInit.sqf +++ b/addons/explosives/XEH_preInit.sqf @@ -1,19 +1,6 @@ -/* - * Author: Garth 'L-H' de Wet - * Initialises the explosives system - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * None - * - * Public: No - */ #include "script_component.hpp" +// Author: Garth 'L-H' de Wet +// Initialises the explosives system ADDON = false; diff --git a/addons/explosives/config.cpp b/addons/explosives/config.cpp index a35137733e..3d2077ff1d 100644 --- a/addons/explosives/config.cpp +++ b/addons/explosives/config.cpp @@ -8,16 +8,14 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"ace_interaction"}; author = ECSTRING(common,ACETeam); - authors[] = {"Garth 'L-H' de Wet"}; + authors[] = {"Garth 'L-H' de Wet", "mharis001"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "ACE_Settings.hpp" - #include "CfgEventHandlers.hpp" - #include "CfgAmmo.hpp" #include "CfgMagazines.hpp" #include "CfgWeapons.hpp" @@ -25,10 +23,18 @@ class CfgPatches { #include "CfgCloudlets.hpp" #include "ACE_Triggers.hpp" -#include "ExplosivesUI.hpp" -#include "GUI_VirtualAmmo.hpp" #include "ACE_Arsenal_Stats.hpp" +// UI stuff +class RscText; +class RscEdit; +class RscPicture; +class RscButton; +class ctrlXSliderH; +#include "ExplosivesUI.hpp" +#include "TimerDialog.hpp" +#include "GUI_VirtualAmmo.hpp" + class CfgActions { class None; class ActivateMine: None { diff --git a/addons/explosives/functions/fnc_addCellphoneIED.sqf b/addons/explosives/functions/fnc_addCellphoneIED.sqf index f577490933..d9ae19892c 100644 --- a/addons/explosives/functions/fnc_addCellphoneIED.sqf +++ b/addons/explosives/functions/fnc_addCellphoneIED.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Adds an IED to the cellphone list @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_explosive", "_magazineClass", "_extra"]; TRACE_4("params",_unit,_explosive,_magazineClass,_extra); diff --git a/addons/explosives/functions/fnc_addClacker.sqf b/addons/explosives/functions/fnc_addClacker.sqf index 49915dc836..684161d7ee 100644 --- a/addons/explosives/functions/fnc_addClacker.sqf +++ b/addons/explosives/functions/fnc_addClacker.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Adds an explosive as a clacker item to the passed unit if the unit has the required item. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_explosive", "_magazineClass"]; TRACE_3("params",_unit,_explosive,_magazineClass); diff --git a/addons/explosives/functions/fnc_addDetonateActions.sqf b/addons/explosives/functions/fnc_addDetonateActions.sqf index 9c8d632253..f1dff4fc9f 100644 --- a/addons/explosives/functions/fnc_addDetonateActions.sqf +++ b/addons/explosives/functions/fnc_addDetonateActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Opens the UI for explosive detonation selection @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_detonator"]; TRACE_2("params",_unit,_detonator); diff --git a/addons/explosives/functions/fnc_addDetonateHandler.sqf b/addons/explosives/functions/fnc_addDetonateHandler.sqf index 2058b24502..b227b96d07 100644 --- a/addons/explosives/functions/fnc_addDetonateHandler.sqf +++ b/addons/explosives/functions/fnc_addDetonateHandler.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Add a explosive detonation handler. @@ -17,7 +18,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_code", {true}, [{}]]]; diff --git a/addons/explosives/functions/fnc_addExplosiveActions.sqf b/addons/explosives/functions/fnc_addExplosiveActions.sqf index 9ef789345a..281aebf048 100644 --- a/addons/explosives/functions/fnc_addExplosiveActions.sqf +++ b/addons/explosives/functions/fnc_addExplosiveActions.sqf @@ -1,61 +1,42 @@ +#include "script_component.hpp" /* - * Author: Garth 'L-H' de Wet and CAA-Picard - * Adds sub actions for all explosive magazines (from insertChildren) + * Author: Garth 'L-H' de Wet, CAA-Picard, mharis001 + * Returns children actions for explosive magazines in the player's inventory. * * Arguments: - * 0: Unit + * 0: Player * * Return Value: * Actions * * Example: - * [bob] call ace_explosives_fnc_addExplosiveActions + * [_player] call ace_explosives_fnc_addExplosiveActions * * Public: No */ -#include "script_component.hpp" -params ["_unit"]; -TRACE_1("params",_unit); +[_this, { + params ["_player"]; + TRACE_1("Creating explosive actions",_player); -private _mags = magazines _unit; -private _list = []; -private _itemCount = []; -{ - private _item = ConfigFile >> "CfgMagazines" >> _x; - if (getNumber(_item >> QGVAR(Placeable)) == 1) then { - private _index = _list find _item; - if (_index != -1) then { - _itemCount set [_index, (_itemCount select _index) + 1]; - } else { - _list pushBack _item; - _itemCount pushBack 1; + private _cfgMagazines = configFile >> "CfgMagazines"; + private _magazines = magazines _player; + private _totalCount = count _magazines; + + private _actions = []; + { + private _config = _cfgMagazines >> _x; + if (getNumber (_config >> QGVAR(Placeable)) == 1) then { + private _name = getText (_config >> "displayNameShort"); + private _picture = getText (_config >> "picture"); + if (_name isEqualTo "") then { + _name = getText (_config >> "displayName"); + }; + + private _action = [_x, format ["%1 (%2)", _name, _totalCount - count (_magazines - [_x])], _picture, {[{_this call FUNC(setupExplosive)}, _this] call CBA_fnc_execNextFrame}, {true}, {}, _x] call EFUNC(interact_menu,createAction); + _actions pushBack [_action, [], _player]; }; - }; -} forEach _mags; + } forEach (_magazines arrayIntersect _magazines); -private _children = []; - -{ - private _name = getText (_x >> "displayNameShort"); - if (_name isEqualTo "") then { - _name = getText (_x >> "displayName"); - }; - - _children pushBack - [ - [ - format ["Explosive_%1", _forEachIndex], - format [_name + " (%1)", _itemCount select _forEachIndex], - getText(_x >> "picture"), - {[{_this call FUNC(setupExplosive)}, _this] call CBA_fnc_execNextFrame}, - {true}, - {}, - (configName _x) - ] call EFUNC(interact_menu,createAction), - [], - _unit - ]; -} forEach _list; - -_children + _actions +}, ACE_player, QGVAR(explosiveActions), 3600, "cba_events_loadoutEvent"] call EFUNC(common,cachedCall); diff --git a/addons/explosives/functions/fnc_addToSpeedDial.sqf b/addons/explosives/functions/fnc_addToSpeedDial.sqf index db0a1c0ca5..5b7d828d53 100644 --- a/addons/explosives/functions/fnc_addToSpeedDial.sqf +++ b/addons/explosives/functions/fnc_addToSpeedDial.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Sets the speed dial for the UI. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_name", "_code"]; TRACE_2("params",_name,_code); diff --git a/addons/explosives/functions/fnc_addTransmitterActions.sqf b/addons/explosives/functions/fnc_addTransmitterActions.sqf index f23d7005a6..d39b9fd731 100644 --- a/addons/explosives/functions/fnc_addTransmitterActions.sqf +++ b/addons/explosives/functions/fnc_addTransmitterActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Opens the UI for selecting the transmitter @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_1("params",_unit); diff --git a/addons/explosives/functions/fnc_addTriggerActions.sqf b/addons/explosives/functions/fnc_addTriggerActions.sqf index cdee713ecb..6e534a19ae 100644 --- a/addons/explosives/functions/fnc_addTriggerActions.sqf +++ b/addons/explosives/functions/fnc_addTriggerActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Opens the UI for explosive trigger selection @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_magazine", "_explosive"]; TRACE_2("params",_magazine,_explosive); diff --git a/addons/explosives/functions/fnc_canDefuse.sqf b/addons/explosives/functions/fnc_canDefuse.sqf index be114bf072..f42764ee38 100644 --- a/addons/explosives/functions/fnc_canDefuse.sqf +++ b/addons/explosives/functions/fnc_canDefuse.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Whether a unit can perform the defuse action @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_target"]; TRACE_2("params",_unit,_target); @@ -24,7 +24,7 @@ if (isNull _explosive) exitWith { deleteVehicle _target; false }; -if (vehicle _unit != _unit || {!("ACE_DefusalKit" in (items _unit))}) exitWith {false}; +if (vehicle _unit != _unit || {!("ACE_DefusalKit" in (_unit call EFUNC(common,uniqueItems)))}) exitWith {false}; if (GVAR(RequireSpecialist) && {!([_unit] call EFUNC(Common,isEOD))}) exitWith {false}; diff --git a/addons/explosives/functions/fnc_canDetonate.sqf b/addons/explosives/functions/fnc_canDetonate.sqf index 73ca3c4e70..a81103ce13 100644 --- a/addons/explosives/functions/fnc_canDetonate.sqf +++ b/addons/explosives/functions/fnc_canDetonate.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Whether the unit is able to detonate explosives @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/explosives/functions/fnc_cancelPlacement.sqf b/addons/explosives/functions/fnc_cancelPlacement.sqf index e6bd60f637..eaefcfcc07 100644 --- a/addons/explosives/functions/fnc_cancelPlacement.sqf +++ b/addons/explosives/functions/fnc_cancelPlacement.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Cancels explosives placement. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_key"]; diff --git a/addons/explosives/functions/fnc_connectExplosive.sqf b/addons/explosives/functions/fnc_connectExplosive.sqf index aab7ca2c4d..964966f224 100644 --- a/addons/explosives/functions/fnc_connectExplosive.sqf +++ b/addons/explosives/functions/fnc_connectExplosive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: VKing * Add preplaced explosives to a unit's detonator. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_object", "_detonator"]; TRACE_3("Params",_unit,_object,_detonator); diff --git a/addons/explosives/functions/fnc_defuseExplosive.sqf b/addons/explosives/functions/fnc_defuseExplosive.sqf index a6d0e82a6b..24f74a580e 100644 --- a/addons/explosives/functions/fnc_defuseExplosive.sqf +++ b/addons/explosives/functions/fnc_defuseExplosive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Causes the unit to defuse the passed explosive. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_explosive"]; TRACE_2("params",_unit,_explosive); diff --git a/addons/explosives/functions/fnc_detonateExplosive.sqf b/addons/explosives/functions/fnc_detonateExplosive.sqf index 3e0f3bdf6f..8edc83f0ff 100644 --- a/addons/explosives/functions/fnc_detonateExplosive.sqf +++ b/addons/explosives/functions/fnc_detonateExplosive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Causes the unit to detonate the passed explosive. @@ -19,7 +20,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_range", "_item", ["_triggerClassname", "#unknown", [""]]]; TRACE_4("detonateExplosive",_unit,_range,_item,_triggerClassname); diff --git a/addons/explosives/functions/fnc_detonateExplosiveAll.sqf b/addons/explosives/functions/fnc_detonateExplosiveAll.sqf index 468183a003..ec1f1e661a 100644 --- a/addons/explosives/functions/fnc_detonateExplosiveAll.sqf +++ b/addons/explosives/functions/fnc_detonateExplosiveAll.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: VKing * Causes the unit to detonate all passed explosives. @@ -18,7 +19,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_range", "_explosivesList", "_triggerClassname"]; TRACE_4("Params",_unit,_range,_explosivesList,_triggerClassname); diff --git a/addons/explosives/functions/fnc_dialPhone.sqf b/addons/explosives/functions/fnc_dialPhone.sqf index f4bdd68279..c7b5848e52 100644 --- a/addons/explosives/functions/fnc_dialPhone.sqf +++ b/addons/explosives/functions/fnc_dialPhone.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Dials the number passed and detonates the explosive. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_code"]; TRACE_2("params",_unit,_code); diff --git a/addons/explosives/functions/fnc_dialingPhone.sqf b/addons/explosives/functions/fnc_dialingPhone.sqf index 9cafa01a5e..9fd1184150 100644 --- a/addons/explosives/functions/fnc_dialingPhone.sqf +++ b/addons/explosives/functions/fnc_dialingPhone.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Performs the dial tones and detonation of explosive. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_args", "_pfID"]; _args params ["_unit", "_i", "_arr", "_code"]; diff --git a/addons/explosives/functions/fnc_getDetonators.sqf b/addons/explosives/functions/fnc_getDetonators.sqf index d8c095e6f0..3c4d3085ce 100644 --- a/addons/explosives/functions/fnc_getDetonators.sqf +++ b/addons/explosives/functions/fnc_getDetonators.sqf @@ -1,25 +1,22 @@ +#include "script_component.hpp" /* - * Author: Garth 'L-H' de Wet - * Returns all the detonators of the unit + * Author: Garth 'L-H' de Wet, mharis001 + * Returns all detonators the given unit has. * * Arguments: * 0: Unit * * Return Value: - * Configs of all detonators + * Config names of detonators * * Example: - * _detonators = [player] call ACE_Explosives_fnc_getDetonators; + * [_player] call ace_explosives_fnc_getDetonators * * Public: Yes */ -#include "script_component.hpp" -// IGNORE_PRIVATE_WARNING(_detonators); params ["_unit"]; -TRACE_1("params",_unit); +TRACE_1("Getting detonators",_unit); -private _result = (items _unit) select {getNumber (ConfigFile >> "CfgWeapons" >> _x >> QGVAR(Detonator)) == 1}; -_result = _result arrayIntersect _result; - -_result +private _cfgWeapons = configFile >> "CfgWeapons"; +(_unit call EFUNC(common,uniqueItems)) select {getNumber (_cfgWeapons >> _x >> QGVAR(Detonator)) == 1}; diff --git a/addons/explosives/functions/fnc_getPlacedExplosives.sqf b/addons/explosives/functions/fnc_getPlacedExplosives.sqf index beb24d559d..8b1135717d 100644 --- a/addons/explosives/functions/fnc_getPlacedExplosives.sqf +++ b/addons/explosives/functions/fnc_getPlacedExplosives.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Gets all placed explosives by unit, optionally filtered by specific trigger type. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" // IGNORE_PRIVATE_WARNING(_allExplosives,_deadmanExplosives); params ["_unit"]; diff --git a/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf b/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf index 1c98ca853d..84e2ab6ad8 100644 --- a/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf +++ b/addons/explosives/functions/fnc_getSpeedDialExplosive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Gets the explosive from the speed dial entry. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_code"]; TRACE_1("params",_code); diff --git a/addons/explosives/functions/fnc_handleScrollWheel.sqf b/addons/explosives/functions/fnc_handleScrollWheel.sqf index 36530afb08..674769a496 100644 --- a/addons/explosives/functions/fnc_handleScrollWheel.sqf +++ b/addons/explosives/functions/fnc_handleScrollWheel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Handles rotating of Explosives @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!GVAR(pfeh_running)) exitWith {false}; diff --git a/addons/explosives/functions/fnc_hasExplosives.sqf b/addons/explosives/functions/fnc_hasExplosives.sqf index f86c928ca3..0c824a87b2 100644 --- a/addons/explosives/functions/fnc_hasExplosives.sqf +++ b/addons/explosives/functions/fnc_hasExplosives.sqf @@ -1,29 +1,24 @@ +#include "script_component.hpp" /* - * Author: Garth 'L-H' de Wet - * Whether the passed unit has any explosives on them. + * Author: Garth 'L-H' de Wet, mharis001 + * Checks if given unit has any placeable explosives on them. * * Arguments: * 0: Unit * * Return Value: - * The unit has explosives + * Has explosives * * Example: - * hasExplosives = [player] call ACE_Explosives_fnc_hasExplosives; + * [player] call ace_explosives_fnc_hasExplosives * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; TRACE_1("params",_unit); -private _result = false; +private _cfgMagazines = configFile >> "CfgMagazines"; private _magazines = magazines _unit; -{ - if (getNumber (ConfigFile >> "CfgMagazines" >> _x >> QGVAR(Placeable)) == 1) exitWith { - _result = true; - }; -} count _magazines; -_result +((_magazines arrayIntersect _magazines) findIf {getNumber (_cfgMagazines >> _x >> QGVAR(Placeable)) == 1}) > -1 diff --git a/addons/explosives/functions/fnc_hasPlacedExplosives.sqf b/addons/explosives/functions/fnc_hasPlacedExplosives.sqf index 174bc07fbc..3bb3f03340 100644 --- a/addons/explosives/functions/fnc_hasPlacedExplosives.sqf +++ b/addons/explosives/functions/fnc_hasPlacedExplosives.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Whether the passed unit has placed any explosives or has a clacker that was used when explosives were placed. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" // IGNORE_PRIVATE_WARNING(_hasPlacedExplosives); (count (_this call FUNC(getPlacedExplosives)) > 0) diff --git a/addons/explosives/functions/fnc_interactEH.sqf b/addons/explosives/functions/fnc_interactEH.sqf index f391e4fa62..59ddaff432 100644 --- a/addons/explosives/functions/fnc_interactEH.sqf +++ b/addons/explosives/functions/fnc_interactEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror, mharis001 * Dynamically adds "Defuse" actions to nearby mines when interact_menu is opened. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_interactionType"]; TRACE_1("Explosives interactEH",_interactionType); @@ -25,7 +25,7 @@ TRACE_1("Explosives interactEH",_interactionType); if ( _interactionType != 0 || {vehicle ACE_player != ACE_player} - || {!("ACE_DefusalKit" in ([ACE_player, false, true, true, true, false] call CBA_fnc_uniqueUnitItems))} + || {!("ACE_DefusalKit" in (ACE_player call EFUNC(common,uniqueItems)))} ) exitWith {}; [{ @@ -38,7 +38,7 @@ if ( {deleteVehicle _x} forEach _addedHelpers; [_pfhID] call CBA_fnc_removePerFrameHandler; } else { - // Prevent Rare Error when ending mission with interact key down: + // Prevent Rare Error when ending mission with interact key down private _player = ACE_player; if (isNull _player) exitWith {}; private _playerPos = getPosASL _player; diff --git a/addons/explosives/functions/fnc_module.sqf b/addons/explosives/functions/fnc_module.sqf index f6a486591a..6fa61b401a 100644 --- a/addons/explosives/functions/fnc_module.sqf +++ b/addons/explosives/functions/fnc_module.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Initialises the explosives module @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/explosives/functions/fnc_onIncapacitated.sqf b/addons/explosives/functions/fnc_onIncapacitated.sqf index b134cdb45e..74d99d2faa 100644 --- a/addons/explosives/functions/fnc_onIncapacitated.sqf +++ b/addons/explosives/functions/fnc_onIncapacitated.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Detonates all attached deadman's switched triggered explosives. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //NOTE: Extended_Killed_EventHandlers runs only where _unit is local params ["_unit"]; @@ -25,7 +25,7 @@ if (_unit == ace_player) then { }; // Exit if no item -if (({_x == "ACE_DeadManSwitch"} count (items _unit)) == 0) exitWith {}; +if !("ACE_DeadManSwitch" in (_unit call EFUNC(common,uniqueItems))) exitWith {}; private _range = getNumber (configFile >> "CfgWeapons" >> "ACE_DeadManSwitch" >> QGVAR(range)); private _deadman = [_unit, "DeadManSwitch"] call FUNC(getPlacedExplosives); diff --git a/addons/explosives/functions/fnc_onInventoryChanged.sqf b/addons/explosives/functions/fnc_onInventoryChanged.sqf index 185fdef6c3..874ae3394f 100644 --- a/addons/explosives/functions/fnc_onInventoryChanged.sqf +++ b/addons/explosives/functions/fnc_onInventoryChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * When a take/put event handler fires and a detonator is changed hands. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_receiver", "_giver", "_item"]; TRACE_3("params",_receiver,_giver,_item); diff --git a/addons/explosives/functions/fnc_openTimerSetUI.sqf b/addons/explosives/functions/fnc_openTimerSetUI.sqf deleted file mode 100644 index 7175f425d4..0000000000 --- a/addons/explosives/functions/fnc_openTimerSetUI.sqf +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Author: Garth 'L-H' de Wet - * Opens the UI for timer setting of an explosive - * - * Arguments: - * 0: Explosive - * 1: Magazine - * - * Return Value: - * None - * - * Example: - * [_explosive, "SatchelCharge_Remote_Mag"] call ACE_Explosives_fnc_openTimerSetUI; - * - * Public: No - */ -#include "script_component.hpp" - -params ["_explosive", "_mag"]; -TRACE_2("params",_explosive,_mag); - -createDialog "RscACE_SelectTimeUI"; -sliderSetRange [8845, 5, 900]; // 5seconds - 15minutes -sliderSetPosition [8845, 30]; - -GVAR(explosive) = _explosive; - -DFUNC(SetTimer) = { - [ - ACE_player, - getPosATL GVAR(explosive), - GVAR(explosive) getVariable QGVAR(Direction), - GVAR(explosive) getVariable QGVAR(class), - "Timer", - [floor sliderPosition 8845], - GVAR(explosive) - ] call FUNC(placeExplosive); - closeDialog 0; -}; - -buttonSetAction [8860, QUOTE(call DFUNC(SetTimer);)]; -buttonSetAction [8855, QUOTE(closeDialog 0;)]; - -ctrlSetText [8870, format[localize LSTRING(TimerMenu),0, 30]]; diff --git a/addons/explosives/functions/fnc_openTimerUI.sqf b/addons/explosives/functions/fnc_openTimerUI.sqf new file mode 100644 index 0000000000..05d340e8dd --- /dev/null +++ b/addons/explosives/functions/fnc_openTimerUI.sqf @@ -0,0 +1,84 @@ +#include "script_component.hpp" +/* + * Author: mharis001 + * Opens the Explosive Timer UI for given explosive. + * + * Arguments: + * 0: Explosive + * + * Return Value: + * True + * + * Example: + * [_explosive] call ace_explosives_fnc_openTimerUI + * + * Public: No + */ + +params ["_explosive"]; +TRACE_1("Opening timer UI",_explosive); + +createDialog QGVAR(timerUI); +private _display = uiNamespace getVariable [QGVAR(timerDisplay), displayNull]; + +// Update slider speed to 1s +(_display displayCtrl IDC_TIMER_SLIDER) sliderSetSpeed [1, 1]; + +// Add confirm button action +GVAR(explosive) = _explosive; +(_display displayCtrl IDC_TIMER_CONFIRM) ctrlAddEventHandler ["ButtonClick", { + params ["_button"]; + + private _slider = ctrlParent _button displayCtrl IDC_TIMER_SLIDER; + private _time = floor sliderPosition _slider; + private _explosive = GVAR(explosive); + [ + ACE_player, + getPosATL _explosive, + _explosive getVariable QGVAR(Direction), + _explosive getVariable QGVAR(class), + "Timer", + [_time], + _explosive + ] call FUNC(placeExplosive); + closeDialog 0; +}]; + +// Add EH to allow for changing values by scrolling +_display displayAddEventHandler ["MouseZChanged", { + params ["_display", "_scroll"]; + + private _change = round _scroll; + if (cba_events_control) then {_change = _change * 10}; + + private _slider = _display displayCtrl IDC_TIMER_SLIDER; + private _value = (sliderPosition _slider + _change) max TIMER_VALUE_MIN min TIMER_VALUE_MAX; + _slider sliderSetPosition _value; +}]; + +// Add PFH to update the digit display (delay of 0.1s) +// Done like this to avoid flicker that would happen when rapidly changing values through EH method +[{ + params ["_display", "_pfhID"]; + + // Make sure explosive still exists and is near player + if ((!isNull _display) && {!alive ACE_player} || {!alive GVAR(explosive)} || {(ACE_player distance GVAR(explosive)) > 5}) exitWith { + INFO_2("explosive became invalid",ACE_player,GVAR(explosive)); + closeDialog 0; + _pfhID call CBA_fnc_removePerFrameHandler; + }; + + if (isNull _display) exitWith { + _pfhID call CBA_fnc_removePerFrameHandler; + }; + + private _value = sliderPosition (_display displayCtrl IDC_TIMER_SLIDER); + private _minutes = floor (_value / 60); + private _seconds = floor (_value % 60); + private _digitArray = [floor (_minutes / 10), _minutes mod 10, floor (_seconds / 10), _seconds mod 10]; + { + (_display displayCtrl _x) ctrlSetText format [QPATHTOF(UI\seven_segment_%1.paa), _digitArray select _forEachIndex]; + } forEach TIMER_DIGIT_IDCs; +}, 0.1, _display] call CBA_fnc_addPerFrameHandler; + +true diff --git a/addons/explosives/functions/fnc_placeExplosive.sqf b/addons/explosives/functions/fnc_placeExplosive.sqf index d0d93df4c1..df8f3ab89c 100644 --- a/addons/explosives/functions/fnc_placeExplosive.sqf +++ b/addons/explosives/functions/fnc_placeExplosive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Places an explosive at the requested position. @@ -19,7 +20,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_pos", "_dir", "_magazineClass", "_triggerConfig", "_triggerSpecificVars", ["_setupPlaceholderObject", objNull]]; TRACE_7("params",_unit,_pos,_dir,_magazineClass,_triggerConfig,_triggerSpecificVars,_setupPlaceholderObject); diff --git a/addons/explosives/functions/fnc_removeFromSpeedDial.sqf b/addons/explosives/functions/fnc_removeFromSpeedDial.sqf index d15b1b34c7..998bc492d0 100644 --- a/addons/explosives/functions/fnc_removeFromSpeedDial.sqf +++ b/addons/explosives/functions/fnc_removeFromSpeedDial.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Removes the specified speed dial from unit's speed dial. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" private _speedDial = ace_player getVariable [QGVAR(SpeedDial), []]; if (count _speedDial == 0) exitWith {}; diff --git a/addons/explosives/functions/fnc_scriptedExplosive.sqf b/addons/explosives/functions/fnc_scriptedExplosive.sqf index 5c27e35e60..6b4aedd6a3 100644 --- a/addons/explosives/functions/fnc_scriptedExplosive.sqf +++ b/addons/explosives/functions/fnc_scriptedExplosive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: VKing * Detonate explosives via script, for use in triggers or mission scripts to detonate editor-placed explosives. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_explosiveArr", [], [[], objNull]], ["_fuzeTime", 0, [0]], ["_triggerClassname", "#scripted", [""]]]; diff --git a/addons/explosives/functions/fnc_selectTrigger.sqf b/addons/explosives/functions/fnc_selectTrigger.sqf index 77018ea587..549754aab2 100644 --- a/addons/explosives/functions/fnc_selectTrigger.sqf +++ b/addons/explosives/functions/fnc_selectTrigger.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Selects a trigger for an explosive. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_explosive", "_magazine", "_trigger"]; TRACE_3("params",_explosive,_magazine,_trigger); diff --git a/addons/explosives/functions/fnc_setPosition.sqf b/addons/explosives/functions/fnc_setPosition.sqf index b19e63ff5a..7d4235b8d2 100644 --- a/addons/explosives/functions/fnc_setPosition.sqf +++ b/addons/explosives/functions/fnc_setPosition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Sets the Dir and pitch of passed object @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_explosive", "_direction", "_pitch"]; TRACE_3("params",_explosive,_direction,_pitch); diff --git a/addons/explosives/functions/fnc_setSpeedDial.sqf b/addons/explosives/functions/fnc_setSpeedDial.sqf index 1876a50103..7d836015a4 100644 --- a/addons/explosives/functions/fnc_setSpeedDial.sqf +++ b/addons/explosives/functions/fnc_setSpeedDial.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Sets the speed dial for the UI. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" private _speedDial = ace_player getVariable [QGVAR(SpeedDial), []]; if (_speedDial isEqualTo []) exitWith {}; diff --git a/addons/explosives/functions/fnc_setupExplosive.sqf b/addons/explosives/functions/fnc_setupExplosive.sqf index b69f7eb40b..a85580f672 100644 --- a/addons/explosives/functions/fnc_setupExplosive.sqf +++ b/addons/explosives/functions/fnc_setupExplosive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Starts the setup process for the passed explosive. Player only. @@ -15,8 +16,6 @@ * * Public: Yes */ -// #define ENABLE_PERFORMANCE_COUNTERS -#include "script_component.hpp" #define PLACE_RANGE_MAX 1 #define PLACE_RANGE_MIN 0.025 @@ -119,14 +118,15 @@ GVAR(TweakedAngle) = 0; private _virtualPosASL = _basePosASL vectorAdd (_lookDirVector vectorMultiply _distanceFromBase); - //Update mouse hint: + // Update mouse hint + private _ctrlTextLMB = (uiNamespace getVariable [QEGVAR(interaction,mouseHint), displayNull]) displayCtrl 2420; if (_badPosition) then { - ((uiNamespace getVariable ["ACE_Helper_Display", objNull]) displayCtrl 1000) ctrlSetText localize LSTRING(BlockedAction); + _ctrlTextLMB ctrlSetText localize LSTRING(BlockedAction); } else { if (isNull _attachVehicle) then { - ((uiNamespace getVariable ["ACE_Helper_Display", objNull]) displayCtrl 1000) ctrlSetText localize LSTRING(PlaceAction); + _ctrlTextLMB ctrlSetText localize LSTRING(PlaceAction); } else { - ((uiNamespace getVariable ["ACE_Helper_Display", objNull]) displayCtrl 1000) ctrlSetText localize LSTRING(AttachAction); + _ctrlTextLMB ctrlSetText localize LSTRING(AttachAction); }; }; diff --git a/addons/explosives/functions/fnc_spawnFlare.sqf b/addons/explosives/functions/fnc_spawnFlare.sqf index 79f105b67b..5c6038c2e2 100644 --- a/addons/explosives/functions/fnc_spawnFlare.sqf +++ b/addons/explosives/functions/fnc_spawnFlare.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: VKing * Spawns a flare on the ground for tripflare trigger @@ -13,7 +14,6 @@ * * Public: no */ -#include "script_component.hpp" params ["_posX","_posY","_posZ"]; TRACE_3("Params",_posX,_posY,_posZ); @@ -22,4 +22,6 @@ private _flare = "ACE_TripFlare_FlareEffect" createVehicle [_posX,_posY,_posZ]; TRACE_1("",_flare); +["ace_tripflareTriggered", [_flare, [_posX,_posY,_posZ]]] call CBA_fnc_globalEvent; + nil diff --git a/addons/explosives/functions/fnc_startDefuse.sqf b/addons/explosives/functions/fnc_startDefuse.sqf index ebc290f4ab..96b3b3eac2 100644 --- a/addons/explosives/functions/fnc_startDefuse.sqf +++ b/addons/explosives/functions/fnc_startDefuse.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Starts defusing an explosive @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_target"]; TRACE_2("params",_unit,_target); diff --git a/addons/explosives/functions/fnc_startTimer.sqf b/addons/explosives/functions/fnc_startTimer.sqf index 737e6a6586..484171ec6e 100644 --- a/addons/explosives/functions/fnc_startTimer.sqf +++ b/addons/explosives/functions/fnc_startTimer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Starts a timer for an explosive. @@ -5,7 +6,7 @@ * Arguments: * 0: Explosive * 1: Time till detonate - * 2: Trigger Item Classname (default: "#timer") + * 2: Trigger classname (default: "#timer") * * Return Value: * None @@ -15,15 +16,14 @@ * * Public: Yes */ -#include "script_component.hpp" -params ["_explosive", "_delay", ["_triggerClassname", "#timer", [""]]]; -TRACE_3("startTimer",_explosive,_delay,_triggerClassname); +params ["_explosive", "_delay", ["_trigger", "#timer", [""]]]; +TRACE_3("Starting timer",_explosive,_delay,_trigger); [{ - params ["_explosive", "_triggerClassname"]; - TRACE_1("Explosive Going Boom",_explosive); + params ["_explosive", "_trigger"]; + TRACE_1("Explosive detonating from timer",_explosive); if (!isNull _explosive) then { - [_explosive, -1, [_explosive, 0], _triggerClassname] call FUNC(detonateExplosive); + [_explosive, -1, [_explosive, 0], _trigger] call FUNC(detonateExplosive); }; -}, [_explosive, _triggerClassname], _delay] call CBA_fnc_waitAndExecute; +}, [_explosive, _trigger], _delay] call CBA_fnc_waitAndExecute; diff --git a/addons/explosives/functions/fnc_triggerType.sqf b/addons/explosives/functions/fnc_triggerType.sqf index b704e56466..6bcbf775d3 100644 --- a/addons/explosives/functions/fnc_triggerType.sqf +++ b/addons/explosives/functions/fnc_triggerType.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Gets the types of triggers associated with the explosive @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_magazineClassname"]; TRACE_1("params",_magazineClassname); diff --git a/addons/explosives/script_component.hpp b/addons/explosives/script_component.hpp index b276fc8356..77ca89d32e 100644 --- a/addons/explosives/script_component.hpp +++ b/addons/explosives/script_component.hpp @@ -16,6 +16,21 @@ #include "\z\ace\addons\main\script_macros.hpp" +#include "\a3\ui_f\hpp\defineCommonGrids.inc" +#include "\a3\ui_f\hpp\defineCommonColors.inc" + +#define IDC_TIMER_DIGIT_1 8501 +#define IDC_TIMER_DIGIT_2 8502 +#define IDC_TIMER_DIGIT_3 8503 +#define IDC_TIMER_DIGIT_4 8504 +#define IDC_TIMER_SLIDER 8505 +#define IDC_TIMER_CONFIRM 8506 +#define TIMER_DIGIT_IDCs [IDC_TIMER_DIGIT_1, IDC_TIMER_DIGIT_2, IDC_TIMER_DIGIT_3, IDC_TIMER_DIGIT_4] + +#define TIMER_VALUE_MIN 5 +#define TIMER_VALUE_MAX 900 +#define TIMER_VALUE_DEFAULT 30 + #define PLACE_WAITING -1 #define PLACE_CANCEL 0 #define PLACE_APPROVE 1 diff --git a/addons/explosives/stringtable.xml b/addons/explosives/stringtable.xml index eed77e702a..7c877c7535 100644 --- a/addons/explosives/stringtable.xml +++ b/addons/explosives/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -1027,5 +1027,9 @@ 爆炸範圍 Raggio di detonazione + + Explosive Timer + Timer di detonazione + diff --git a/addons/fastroping/CfgVehicles.hpp b/addons/fastroping/CfgVehicles.hpp index 05ef487325..efd32d1ac6 100644 --- a/addons/fastroping/CfgVehicles.hpp +++ b/addons/fastroping/CfgVehicles.hpp @@ -7,7 +7,7 @@ expression = QUOTE(if (_value) then {[_this] call FUNC(equipFRIES)}); \ typeName = "BOOL"; \ condition = "objectVehicle"; \ - defaultValue = false; \ + defaultValue = "(false)"; \ }; \ } diff --git a/addons/fastroping/functions/fnc_canCloseRamp.sqf b/addons/fastroping/functions/fnc_canCloseRamp.sqf index 253cb241b5..969d719796 100644 --- a/addons/fastroping/functions/fnc_canCloseRamp.sqf +++ b/addons/fastroping/functions/fnc_canCloseRamp.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if the player can close the ramp of the given helo. @@ -15,8 +16,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle", "_door", "_turretPaths"]; (_vehicle doorPhase _door > 0.5) && diff --git a/addons/fastroping/functions/fnc_canCutRopes.sqf b/addons/fastroping/functions/fnc_canCutRopes.sqf index 84239db671..8107b8066b 100644 --- a/addons/fastroping/functions/fnc_canCutRopes.sqf +++ b/addons/fastroping/functions/fnc_canCutRopes.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if the unit can cut deployed ropes. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; diff --git a/addons/fastroping/functions/fnc_canDeployRopes.sqf b/addons/fastroping/functions/fnc_canDeployRopes.sqf index cfc2aecc8a..5bc770c01d 100644 --- a/addons/fastroping/functions/fnc_canDeployRopes.sqf +++ b/addons/fastroping/functions/fnc_canDeployRopes.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if the unit can deploy ropes from the helicopter. @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_unit", "_vehicle"]; private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; diff --git a/addons/fastroping/functions/fnc_canFastRope.sqf b/addons/fastroping/functions/fnc_canFastRope.sqf index 4fe38cca93..b4f5e20474 100644 --- a/addons/fastroping/functions/fnc_canFastRope.sqf +++ b/addons/fastroping/functions/fnc_canFastRope.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if the unit can fast rope from the helicopter. @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_unit", "_vehicle"]; private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; diff --git a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf index 67e2165c3f..881996b5a1 100644 --- a/addons/fastroping/functions/fnc_canPrepareFRIES.sqf +++ b/addons/fastroping/functions/fnc_canPrepareFRIES.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if the unit can prepare the helicopters FRIES. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; diff --git a/addons/fastroping/functions/fnc_canStowFRIES.sqf b/addons/fastroping/functions/fnc_canStowFRIES.sqf index 655d5776b8..6f26fc1ed5 100644 --- a/addons/fastroping/functions/fnc_canStowFRIES.sqf +++ b/addons/fastroping/functions/fnc_canStowFRIES.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if the unit can stow the helicopters FRIES. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; diff --git a/addons/fastroping/functions/fnc_checkVehicleThread.sqf b/addons/fastroping/functions/fnc_checkVehicleThread.sqf index 38a2cad8c6..7889cdb268 100644 --- a/addons/fastroping/functions/fnc_checkVehicleThread.sqf +++ b/addons/fastroping/functions/fnc_checkVehicleThread.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if the given helicopter still exits, and if not, destroys the FRIES. @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle", "_fries"]; if (isNull _vehicle) then { diff --git a/addons/fastroping/functions/fnc_cutRopes.sqf b/addons/fastroping/functions/fnc_cutRopes.sqf index 2b3aaa8a8d..ae1b58638a 100644 --- a/addons/fastroping/functions/fnc_cutRopes.sqf +++ b/addons/fastroping/functions/fnc_cutRopes.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Cut deployed ropes. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; @@ -39,4 +38,7 @@ private _deployedRopes = _vehicle getVariable [QGVAR(deployedRopes), []]; } count _deployedRopes; _vehicle setVariable [QGVAR(deployedRopes), [], true]; -_vehicle setVariable [QGVAR(deploymentStage), 2, true]; + +// Set new state (0 if no FRIES, 2 if FRIES for manual stowing) +private _newState = [0, 2] select (isText (configFile >> "CfgVehicles" >> typeOf _vehicle >> QGVAR(onCut))); +_vehicle setVariable [QGVAR(deploymentStage), _newState, true]; diff --git a/addons/fastroping/functions/fnc_deployAI.sqf b/addons/fastroping/functions/fnc_deployAI.sqf index d88e07929e..f6f3915181 100644 --- a/addons/fastroping/functions/fnc_deployAI.sqf +++ b/addons/fastroping/functions/fnc_deployAI.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Auomatically deploy a helicopter filled with AI units. @@ -15,8 +16,6 @@ * * Public: Yes */ - -#include "script_component.hpp" params [["_vehicle", objNull, [objNull]], ["_deploySpecial", false, [true]], ["_createDeploymentGroup", true, [true]]]; if (isNull _vehicle || {!(_vehicle isKindOf "Helicopter")}) exitWith { diff --git a/addons/fastroping/functions/fnc_deployAIWaypoint.sqf b/addons/fastroping/functions/fnc_deployAIWaypoint.sqf index 4df221c80e..20e3f704f6 100644 --- a/addons/fastroping/functions/fnc_deployAIWaypoint.sqf +++ b/addons/fastroping/functions/fnc_deployAIWaypoint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Waypoint function for the fast rope waypoint. @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" params [["_group", grpNull, [grpNull]], ["_position", [0, 0, 0], [[]], 3]]; private _vehicle = vehicle leader _group; diff --git a/addons/fastroping/functions/fnc_deployRopes.sqf b/addons/fastroping/functions/fnc_deployRopes.sqf index c6ed9dc9b6..bd286fb08d 100644 --- a/addons/fastroping/functions/fnc_deployRopes.sqf +++ b/addons/fastroping/functions/fnc_deployRopes.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Deploy ropes from the helicopter. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; diff --git a/addons/fastroping/functions/fnc_equipFRIES.sqf b/addons/fastroping/functions/fnc_equipFRIES.sqf index 1cc3202619..a6dc469749 100644 --- a/addons/fastroping/functions/fnc_equipFRIES.sqf +++ b/addons/fastroping/functions/fnc_equipFRIES.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Equips the given helicopter with a FRIES. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; private _config = configFile >> "CfgVehicles" >> typeOf _vehicle; diff --git a/addons/fastroping/functions/fnc_fastRope.sqf b/addons/fastroping/functions/fnc_fastRope.sqf index a4ce39e7ad..9deb95b1a6 100644 --- a/addons/fastroping/functions/fnc_fastRope.sqf +++ b/addons/fastroping/functions/fnc_fastRope.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Lets the unit fast rope. @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_unit", "_vehicle"]; //Select unoccupied rope diff --git a/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf b/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf index d7d49dd11f..c46e919bc5 100644 --- a/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf +++ b/addons/fastroping/functions/fnc_fastRopeLocalPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Local PerFrameHandler during fast roping. @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_arguments", "_pfhHandle"]; _arguments params ["_unit", "", "_rope", "", "_timeToPlayRopeSound"]; _rope params ["", "", "", "_dummy", "_hook"]; diff --git a/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf index c8be61fb6f..ed9cad2255 100644 --- a/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf +++ b/addons/fastroping/functions/fnc_fastRopeServerPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Server PerFrameHandler during fast roping. @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_arguments", "_pfhHandle"]; _arguments params ["_unit", "_vehicle", "_rope", "_ropeIndex", "_hasBeenAttached"]; _rope params ["_attachmentPoint", "_ropeTop", "_ropeBottom", "_dummy", "_hook"]; diff --git a/addons/fastroping/functions/fnc_moduleEquipFRIES.sqf b/addons/fastroping/functions/fnc_moduleEquipFRIES.sqf index 9bde56debe..33975168a6 100644 --- a/addons/fastroping/functions/fnc_moduleEquipFRIES.sqf +++ b/addons/fastroping/functions/fnc_moduleEquipFRIES.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Equips synched helicopters with a FRIES. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_module"]; private _synchedUnits = synchronizedObjects _module; diff --git a/addons/fastroping/functions/fnc_onCutCommon.sqf b/addons/fastroping/functions/fnc_onCutCommon.sqf index 1c074a1e01..1a32739eaa 100644 --- a/addons/fastroping/functions/fnc_onCutCommon.sqf +++ b/addons/fastroping/functions/fnc_onCutCommon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Function for closing doors and retracting the hook for most vanilla and older Arma helos. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; private _fries = _vehicle getVariable [QGVAR(FRIES), objNull]; diff --git a/addons/fastroping/functions/fnc_onPrepareCommon.sqf b/addons/fastroping/functions/fnc_onPrepareCommon.sqf index 40603a6527..76665dea71 100644 --- a/addons/fastroping/functions/fnc_onPrepareCommon.sqf +++ b/addons/fastroping/functions/fnc_onPrepareCommon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Function for opening doors and extending the hook for most vanilla and older Arma helos. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; private _waitTime = 2; diff --git a/addons/fastroping/functions/fnc_onRopeBreak.sqf b/addons/fastroping/functions/fnc_onRopeBreak.sqf index 29937217cf..023e53f762 100644 --- a/addons/fastroping/functions/fnc_onRopeBreak.sqf +++ b/addons/fastroping/functions/fnc_onRopeBreak.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Handles ropes breaking when deployed. @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_ehArgs", "_part"]; _ehArgs params ["_rope", "_helper1", "_helper2"]; diff --git a/addons/fastroping/functions/fnc_prepareFRIES.sqf b/addons/fastroping/functions/fnc_prepareFRIES.sqf index 7b98b5ff63..c5bac4deb1 100644 --- a/addons/fastroping/functions/fnc_prepareFRIES.sqf +++ b/addons/fastroping/functions/fnc_prepareFRIES.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Prepares the helicopters FRIES. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; //Stage indicator: 0 - travel mode; 1 - preparing/stowing FRIES; 2 - FRIES ready; 3 - ropes deployed diff --git a/addons/fastroping/functions/fnc_stowFRIES.sqf b/addons/fastroping/functions/fnc_stowFRIES.sqf index 18813295d8..3b18a6dbe1 100644 --- a/addons/fastroping/functions/fnc_stowFRIES.sqf +++ b/addons/fastroping/functions/fnc_stowFRIES.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Stows the helicopters FRIES. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; //Stage indicator: 0 - travel mode; 1 - preparing/stowing FRIES; 2 - FRIES ready; 3 - ropes deployed diff --git a/addons/fastroping/stringtable.xml b/addons/fastroping/stringtable.xml index 8c8e4ee600..085291ea19 100644 --- a/addons/fastroping/stringtable.xml +++ b/addons/fastroping/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/fcs/functions/fnc_adjustRange.sqf b/addons/fcs/functions/fnc_adjustRange.sqf index 0f400a50fb..cb0e00c9c1 100644 --- a/addons/fcs/functions/fnc_adjustRange.sqf +++ b/addons/fcs/functions/fnc_adjustRange.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Adjusts the currently zeroed distance. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_turret", "_delta"]; diff --git a/addons/fcs/functions/fnc_calculateSolution.sqf b/addons/fcs/functions/fnc_calculateSolution.sqf index f28a1c7048..8ceb0c62cf 100644 --- a/addons/fcs/functions/fnc_calculateSolution.sqf +++ b/addons/fcs/functions/fnc_calculateSolution.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: VKing * Calculate FCS solution @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle","_turret","_distance","_angleTarget"]; TRACE_4("params",_vehicle,_turret,_distance,_angleTarget); diff --git a/addons/fcs/functions/fnc_canResetFCS.sqf b/addons/fcs/functions/fnc_canResetFCS.sqf index 8713357f3d..21811d9fd3 100644 --- a/addons/fcs/functions/fnc_canResetFCS.sqf +++ b/addons/fcs/functions/fnc_canResetFCS.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Called from config. Can player reset FCS? @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/fcs/functions/fnc_canUseFCS.sqf b/addons/fcs/functions/fnc_canUseFCS.sqf index de4af99d7a..a246d51f0c 100644 --- a/addons/fcs/functions/fnc_canUseFCS.sqf +++ b/addons/fcs/functions/fnc_canUseFCS.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Called from config. Returns true if the player is a gunner and the players current vehicle has a FCS. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" getNumber ([configFile >> "CfgVehicles" >> typeOf vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call EFUNC(common,getTurretConfigPath) >> QGVAR(Enabled)) == 1 && {cameraView == "GUNNER"} diff --git a/addons/fcs/functions/fnc_canUseRangefinder.sqf b/addons/fcs/functions/fnc_canUseRangefinder.sqf index a8b8239097..b558240363 100644 --- a/addons/fcs/functions/fnc_canUseRangefinder.sqf +++ b/addons/fcs/functions/fnc_canUseRangefinder.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns true if the laser distance measurement can be read from the engine. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" !isNull ((uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]) displayCtrl 1713151) && {cameraView == "GUNNER"} // return diff --git a/addons/fcs/functions/fnc_firedEH.sqf b/addons/fcs/functions/fnc_firedEH.sqf index 097722c958..0959708bb0 100644 --- a/addons/fcs/functions/fnc_firedEH.sqf +++ b/addons/fcs/functions/fnc_firedEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Adjusts the direction of a shell. Called from the unified fired EH only if the gunner is a player. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/fcs/functions/fnc_getAngle.sqf b/addons/fcs/functions/fnc_getAngle.sqf index d9e14a343b..05add960fb 100644 --- a/addons/fcs/functions/fnc_getAngle.sqf +++ b/addons/fcs/functions/fnc_getAngle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Calculates the angle offset necessary to hit the current target. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" #define PRECISION 0.1 diff --git a/addons/fcs/functions/fnc_getRange.sqf b/addons/fcs/functions/fnc_getRange.sqf index 829e4c9072..0512359d1e 100644 --- a/addons/fcs/functions/fnc_getRange.sqf +++ b/addons/fcs/functions/fnc_getRange.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Read laser distance measurement from engine. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_accuracy",1], ["_maxDistance",5000], ["_minDistance",0], ["_blank",false]]; diff --git a/addons/fcs/functions/fnc_handleAirBurstAmmunitionPFH.sqf b/addons/fcs/functions/fnc_handleAirBurstAmmunitionPFH.sqf index 4c1c210994..a2fe8a2b7f 100644 --- a/addons/fcs/functions/fnc_handleAirBurstAmmunitionPFH.sqf +++ b/addons/fcs/functions/fnc_handleAirBurstAmmunitionPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle Air burst ammunition. Called from per frame handler. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" (_this select 0) params ["_vehicle", "_projectile", "_zeroing"]; diff --git a/addons/fcs/functions/fnc_keyDown.sqf b/addons/fcs/functions/fnc_keyDown.sqf index 01795ce280..0e141c0968 100644 --- a/addons/fcs/functions/fnc_keyDown.sqf +++ b/addons/fcs/functions/fnc_keyDown.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Starts watching the target for sideways correction. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_turret"]; diff --git a/addons/fcs/functions/fnc_keyUp.sqf b/addons/fcs/functions/fnc_keyUp.sqf index d35174a198..fb3ce99974 100644 --- a/addons/fcs/functions/fnc_keyUp.sqf +++ b/addons/fcs/functions/fnc_keyUp.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Calculates the offsets for all weapons needed to hit the current target. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_turret", "_distance", ["_showHint", false], ["_playSound", true]]; TRACE_5("params",_vehicle,_turret,_distance,_showHint,_playSound); diff --git a/addons/fcs/functions/fnc_onForceUpdate.sqf b/addons/fcs/functions/fnc_onForceUpdate.sqf index 1bbaee5b58..ddf426d293 100644 --- a/addons/fcs/functions/fnc_onForceUpdate.sqf +++ b/addons/fcs/functions/fnc_onForceUpdate.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit"]; private _vehicle = vehicle _unit; diff --git a/addons/fcs/functions/fnc_reset.sqf b/addons/fcs/functions/fnc_reset.sqf index 9d4a5f65a0..4cbc4ee7b2 100644 --- a/addons/fcs/functions/fnc_reset.sqf +++ b/addons/fcs/functions/fnc_reset.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Resets the FCS to default. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_turret"]; diff --git a/addons/fcs/functions/fnc_updateRangeHUD.sqf b/addons/fcs/functions/fnc_updateRangeHUD.sqf index 2e415b3f49..a00de5fc67 100644 --- a/addons/fcs/functions/fnc_updateRangeHUD.sqf +++ b/addons/fcs/functions/fnc_updateRangeHUD.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Update compatible info elements. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; private _dlgRangefinder = uiNamespace getVariable ["ACE_dlgRangefinder", displayNull]; diff --git a/addons/fcs/functions/fnc_vehicleInit.sqf b/addons/fcs/functions/fnc_vehicleInit.sqf index 8a60f31e2e..7117a12112 100644 --- a/addons/fcs/functions/fnc_vehicleInit.sqf +++ b/addons/fcs/functions/fnc_vehicleInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, commy2 * Checks if a vehicle is equipped with an FCS and if so, adds the fired event handler. Execute on server. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/finger/functions/fnc_incomingFinger.sqf b/addons/finger/functions/fnc_incomingFinger.sqf index 5a970aa372..4706798f40 100644 --- a/addons/finger/functions/fnc_incomingFinger.sqf +++ b/addons/finger/functions/fnc_incomingFinger.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: TheDrill, PabstMirror * Recieve an finger event, adds to the array (or updates if already present) and starts PFEH if not already running @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_sourceUnit", "_fingerPosPrecise", "_distance"]; diff --git a/addons/finger/functions/fnc_keyPress.sqf b/addons/finger/functions/fnc_keyPress.sqf index 44ee8b6474..5308c44e6c 100644 --- a/addons/finger/functions/fnc_keyPress.sqf +++ b/addons/finger/functions/fnc_keyPress.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: TheDrill, PabstMirror * On keypress, point and send position to nearby players @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!alive ACE_player) exitWith {false}; diff --git a/addons/finger/functions/fnc_moduleSettings.sqf b/addons/finger/functions/fnc_moduleSettings.sqf index 678b51ac5f..7dd93ee7ae 100644 --- a/addons/finger/functions/fnc_moduleSettings.sqf +++ b/addons/finger/functions/fnc_moduleSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Module for fingering settings @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic"]; [_logic, QGVAR(enabled), "enabled"] call EFUNC(common,readSettingFromModule); diff --git a/addons/finger/functions/fnc_perFrameEH.sqf b/addons/finger/functions/fnc_perFrameEH.sqf index 3c0d4a586f..bfb9995720 100644 --- a/addons/finger/functions/fnc_perFrameEH.sqf +++ b/addons/finger/functions/fnc_perFrameEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: TheDrill, PabstMirror * The perFrameEventHandler to draw the icons @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!alive ACE_player) then {GVAR(fingersHash) = [] call CBA_fnc_hashCreate;}; // Conditions: canInteract diff --git a/addons/finger/stringtable.xml b/addons/finger/stringtable.xml index 96bab972cf..2224a2f057 100644 --- a/addons/finger/stringtable.xml +++ b/addons/finger/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -9,6 +9,7 @@ 指向标记器 指差し 가리키기 + Pointage Show pointing indicator to self diff --git a/addons/flashlights/CfgWeapons.hpp b/addons/flashlights/CfgWeapons.hpp index 9623b4d069..41bfd4a8bb 100644 --- a/addons/flashlights/CfgWeapons.hpp +++ b/addons/flashlights/CfgWeapons.hpp @@ -16,7 +16,6 @@ class CfgWeapons { ACE_Flashlight_Colour = "red"; ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_red_ca.paa); ACE_Flashlight_Size = 1.75; - ACE_Flashlight_Sound = 1; }; }; }; @@ -34,7 +33,6 @@ class CfgWeapons { ACE_Flashlight_Colour = "red"; ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_red_ca.paa); ACE_Flashlight_Size = 1.5; - ACE_Flashlight_Sound = 1; }; }; }; @@ -52,7 +50,6 @@ class CfgWeapons { ACE_Flashlight_Colour = "white"; ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_white_ca.paa); ACE_Flashlight_Size = 2.15; - ACE_Flashlight_Sound = 1; }; }; }; diff --git a/addons/flashlights/stringtable.xml b/addons/flashlights/stringtable.xml index 0a14c18735..e4764d097a 100644 --- a/addons/flashlights/stringtable.xml +++ b/addons/flashlights/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/frag/functions/fnc_addBlackList.sqf b/addons/frag/functions/fnc_addBlackList.sqf index cfa96c9784..71452b9814 100644 --- a/addons/frag/functions/fnc_addBlackList.sqf +++ b/addons/frag/functions/fnc_addBlackList.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jaynus, NouberNou * Adds a round to the blacklist (will be ignored). @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_round"]; TRACE_1("addBlackList",_round); diff --git a/addons/frag/functions/fnc_addPfhRound.sqf b/addons/frag/functions/fnc_addPfhRound.sqf index f97d868b9d..35b927e687 100644 --- a/addons/frag/functions/fnc_addPfhRound.sqf +++ b/addons/frag/functions/fnc_addPfhRound.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jaynus, NouberNou * Starts tracking a round that will frag. @@ -16,8 +17,6 @@ * * Public: No */ -//#define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_gun", "_type", "_round"]; TRACE_3("addPfhRound",_gun,_type,_round); diff --git a/addons/frag/functions/fnc_dev_addTrack.sqf b/addons/frag/functions/fnc_dev_addTrack.sqf index fd180eacfe..ce459008f6 100644 --- a/addons/frag/functions/fnc_dev_addTrack.sqf +++ b/addons/frag/functions/fnc_dev_addTrack.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_origin", "_obj", ["_color", [1, 0, 0, 1]]]; private _positions = []; diff --git a/addons/frag/functions/fnc_dev_debugAmmo.sqf b/addons/frag/functions/fnc_dev_debugAmmo.sqf index 8eec5f04f5..42debf3d61 100644 --- a/addons/frag/functions/fnc_dev_debugAmmo.sqf +++ b/addons/frag/functions/fnc_dev_debugAmmo.sqf @@ -1,3 +1,5 @@ +#define DEBUG_MODE_FULL +#include "script_component.hpp" /* * Author: ACE-Team * @@ -14,9 +16,6 @@ * Public: No */ -#define DEBUG_MODE_FULL -#include "script_component.hpp" - params [ ["_debugMissing", true, [false]], ["_debugForce", false, [false]], diff --git a/addons/frag/functions/fnc_dev_drawTraces.sqf b/addons/frag/functions/fnc_dev_drawTraces.sqf index f7d36b4f02..76e729ed7f 100644 --- a/addons/frag/functions/fnc_dev_drawTraces.sqf +++ b/addons/frag/functions/fnc_dev_drawTraces.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - { _x params ["", "", "", "", "_positions", "_color"]; private _index = 0; diff --git a/addons/frag/functions/fnc_dev_startTracing.sqf b/addons/frag/functions/fnc_dev_startTracing.sqf index e58445ec83..d709255a73 100644 --- a/addons/frag/functions/fnc_dev_startTracing.sqf +++ b/addons/frag/functions/fnc_dev_startTracing.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - if (GVAR(tracesStarted)) exitWith {}; INFO("Starting Trace Drawing"); diff --git a/addons/frag/functions/fnc_dev_stopTracing.sqf b/addons/frag/functions/fnc_dev_stopTracing.sqf index f3b8fa234b..75cf38b6d9 100644 --- a/addons/frag/functions/fnc_dev_stopTracing.sqf +++ b/addons/frag/functions/fnc_dev_stopTracing.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * Dev things @@ -13,8 +14,6 @@ * Public: No */ -#include "script_component.hpp" - if (!GVAR(tracesStarted)) exitWith {}; INFO("Ending Trace Drawing"); diff --git a/addons/frag/functions/fnc_dev_trackTrace.sqf b/addons/frag/functions/fnc_dev_trackTrace.sqf index b71f1982ff..6481b89310 100644 --- a/addons/frag/functions/fnc_dev_trackTrace.sqf +++ b/addons/frag/functions/fnc_dev_trackTrace.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * Dev things @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_args", "_pfhID"]; _args params ["_tracerObj", "_index"]; diff --git a/addons/frag/functions/fnc_doExplosions.sqf b/addons/frag/functions/fnc_doExplosions.sqf index 25302cca7c..1f5c37597a 100644 --- a/addons/frag/functions/fnc_doExplosions.sqf +++ b/addons/frag/functions/fnc_doExplosions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * @@ -14,9 +15,6 @@ * Public: No */ -//fnc_doExplosions.sqf -#include "script_component.hpp" - params ["_args", "_pfhID"]; _args params ["_explosions", "_index"]; diff --git a/addons/frag/functions/fnc_doReflections.sqf b/addons/frag/functions/fnc_doReflections.sqf index 622c4c57f4..7b16385d75 100644 --- a/addons/frag/functions/fnc_doReflections.sqf +++ b/addons/frag/functions/fnc_doReflections.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * Dev things @@ -14,9 +15,6 @@ * Public: No */ -//fnc_doReflections.sqf -#include "script_component.hpp" - params ["_pos", "_ammo", ["_depth", 1]]; // TEST_ICONS pushBack [_pos, format ["EXP!", _hit, _range, _hitFactor]]; diff --git a/addons/frag/functions/fnc_doSpall.sqf b/addons/frag/functions/fnc_doSpall.sqf index 03a2df121b..eb97875570 100644 --- a/addons/frag/functions/fnc_doSpall.sqf +++ b/addons/frag/functions/fnc_doSpall.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * Dev things @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define WEIGHTED_SIZE [QGVAR(spall_small), 4, QGVAR(spall_medium), 3, QGVAR(spall_large), 2, QGVAR(spall_huge), 1] diff --git a/addons/frag/functions/fnc_findReflections.sqf b/addons/frag/functions/fnc_findReflections.sqf index 774e1764ea..8b4a5922a5 100644 --- a/addons/frag/functions/fnc_findReflections.sqf +++ b/addons/frag/functions/fnc_findReflections.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * @@ -14,9 +15,6 @@ * Public: No */ -//fnc_findReflections.sqf -#include "script_component.hpp" - BEGIN_COUNTER(fnc_findReflections); params ["_args", "_pfhID"]; _args params ["_pos", "_explosiveInfo", "_los", "_nlos", "_zIndex", "_depth", "_rand"]; diff --git a/addons/frag/functions/fnc_fired.sqf b/addons/frag/functions/fnc_fired.sqf index 8dc9be4307..a61a2d14c7 100644 --- a/addons/frag/functions/fnc_fired.sqf +++ b/addons/frag/functions/fnc_fired.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: nou, jaynus, PabstMirror * Called from the unified fired EH for all. @@ -14,8 +15,6 @@ * * Public: No */ -// #define DEBUG_ENABLED_FRAG -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/frag/functions/fnc_frago.sqf b/addons/frag/functions/fnc_frago.sqf index a21e92d4b3..8c90445411 100644 --- a/addons/frag/functions/fnc_frago.sqf +++ b/addons/frag/functions/fnc_frago.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jaynus, NouberNou * Server func to create the fragmentation for a round. @@ -15,8 +16,6 @@ * * Public: No */ -//#define DEBUG_MODE_FULL -#include "script_component.hpp" #define FRAG_VEC_VAR 0.004 #define MAX_FRAG_COUNT 50 diff --git a/addons/frag/functions/fnc_masterPFH.sqf b/addons/frag/functions/fnc_masterPFH.sqf index 638a91ee63..06baaad17f 100644 --- a/addons/frag/functions/fnc_masterPFH.sqf +++ b/addons/frag/functions/fnc_masterPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Master single PFH abstraction for all rounds being tracked by frag/spall. @@ -14,9 +15,6 @@ * Public: No */ -//#define DEBUG_MODE_FULL -#include "script_component.hpp" - BEGIN_COUNTER(PFH); // Fast exit if nothing to do diff --git a/addons/frag/functions/fnc_pfhRound.sqf b/addons/frag/functions/fnc_pfhRound.sqf index 9d63df3f2a..4d5e9b2e99 100644 --- a/addons/frag/functions/fnc_pfhRound.sqf +++ b/addons/frag/functions/fnc_pfhRound.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_round", "_lastPos", "_lastVel", "_shellType", "_firedFrame", "_gun", "_doSpall", "_spallTrack", "_foundObjectHPIds", "_skip", "_explosive", "_indirectRange", "_force", "_fragPower"]; if (_round in GVAR(blackList)) exitWith { diff --git a/addons/frag/functions/fnc_spallHP.sqf b/addons/frag/functions/fnc_spallHP.sqf index bc38c5c0fa..9a1e144f44 100644 --- a/addons/frag/functions/fnc_spallHP.sqf +++ b/addons/frag/functions/fnc_spallHP.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * Handles the HitPart event @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - //player sideChat format ["f: %1 c: %2", (_this select 0), (count GVAR(spallHPData))]; params ["_index", "_hitPartData"]; diff --git a/addons/frag/functions/fnc_spallTrack.sqf b/addons/frag/functions/fnc_spallTrack.sqf index ef1d7f77a8..8e1bf2f804 100644 --- a/addons/frag/functions/fnc_spallTrack.sqf +++ b/addons/frag/functions/fnc_spallTrack.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * Add HitPart EventHandler to objects in the projectile's path @@ -14,9 +15,6 @@ * Public: No */ -//fnc_spallTrack.sqf -#include "script_component.hpp" - params ["_round", "_multiplier", "_foundObjects", "_foundObjectHPIds"]; private _delta = (1 / diag_fps) * _multiplier; diff --git a/addons/frag/stringtable.xml b/addons/frag/stringtable.xml index 427ae9fbee..d5a3091969 100644 --- a/addons/frag/stringtable.xml +++ b/addons/frag/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/gestures/functions/fnc_playSignal.sqf b/addons/gestures/functions/fnc_playSignal.sqf index 68a3c1c044..3dcae0d2e3 100644 --- a/addons/gestures/functions/fnc_playSignal.sqf +++ b/addons/gestures/functions/fnc_playSignal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: joko // Jonas, Emperias, Zigomarvin * Detect if the player and play the Gesture Animation @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" TRACE_1("params",_this); diff --git a/addons/gestures/stringtable.xml b/addons/gestures/stringtable.xml index 0677b435e1..6e61d5cac0 100644 --- a/addons/gestures/stringtable.xml +++ b/addons/gestures/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/gforces/functions/fnc_addPFEH.sqf b/addons/gforces/functions/fnc_addPFEH.sqf index 2464575fdc..55dd8dcd12 100644 --- a/addons/gforces/functions/fnc_addPFEH.sqf +++ b/addons/gforces/functions/fnc_addPFEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi and esteldunedain * Adds the PFEH @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //Reset forces array GVAR(GForces) = []; diff --git a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf index 98e633f500..a5aee2d18e 100644 --- a/addons/gforces/functions/fnc_pfhUpdateGForces.sqf +++ b/addons/gforces/functions/fnc_pfhUpdateGForces.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi and esteldunedain * Calculates average g-forces and triggers g-effects @@ -14,7 +15,6 @@ * * Public: No */ - #include "script_component.hpp" // Update the g-forces at constant mission time intervals (taking accTime into account) if ((CBA_missionTime - GVAR(lastUpdateTime)) < INTERVAL) exitWith {}; diff --git a/addons/gforces/stringtable.xml b/addons/gforces/stringtable.xml index 3a887c175a..6e8b90e230 100644 --- a/addons/gforces/stringtable.xml +++ b/addons/gforces/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/goggles/XEH_postInit.sqf b/addons/goggles/XEH_postInit.sqf index 9927a165f1..a1a7c53460 100644 --- a/addons/goggles/XEH_postInit.sqf +++ b/addons/goggles/XEH_postInit.sqf @@ -80,7 +80,7 @@ if (!hasInterface) exitWith {}; }; ["cameraView", _fnc_checkGoggles] call CBA_fnc_addPlayerEventHandler; - ["ace_activeCameraChanged", _fnc_checkGoggles] call CBA_fnc_addEventHandler; + ["featureCamera", _fnc_checkGoggles] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/goggles/functions/fnc_applyDirtEffect.sqf b/addons/goggles/functions/fnc_applyDirtEffect.sqf index 2c50595e86..df73bd5bec 100644 --- a/addons/goggles/functions/fnc_applyDirtEffect.sqf +++ b/addons/goggles/functions/fnc_applyDirtEffect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Adds dirt effect to the glasses. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (call FUNC(externalCamera)) exitWith {false}; diff --git a/addons/goggles/functions/fnc_applyDustEffect.sqf b/addons/goggles/functions/fnc_applyDustEffect.sqf index 3568137a1f..d8c6e1c07a 100644 --- a/addons/goggles/functions/fnc_applyDustEffect.sqf +++ b/addons/goggles/functions/fnc_applyDustEffect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Applies dust to screen. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (call FUNC(ExternalCamera)) exitWith {}; diff --git a/addons/goggles/functions/fnc_applyGlassesEffect.sqf b/addons/goggles/functions/fnc_applyGlassesEffect.sqf index ccefe45541..096673ea3a 100644 --- a/addons/goggles/functions/fnc_applyGlassesEffect.sqf +++ b/addons/goggles/functions/fnc_applyGlassesEffect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Sets screen tint for glasses. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_glasses"]; TRACE_2("applyGlassesEffect",_player,_glasses); diff --git a/addons/goggles/functions/fnc_applyRainEffect.sqf b/addons/goggles/functions/fnc_applyRainEffect.sqf index 183335740f..845490f95f 100644 --- a/addons/goggles/functions/fnc_applyRainEffect.sqf +++ b/addons/goggles/functions/fnc_applyRainEffect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Handles rain effects being created on glasses. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _unit = ACE_player; diff --git a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf index ffe75f808e..ab71f01d51 100644 --- a/addons/goggles/functions/fnc_applyRotorWashEffect.sqf +++ b/addons/goggles/functions/fnc_applyRotorWashEffect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, commy2 * Handles the rotor wash effects. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _unit = ACE_player; diff --git a/addons/goggles/functions/fnc_clearGlasses.sqf b/addons/goggles/functions/fnc_clearGlasses.sqf index c75d94ae1c..5efc547c10 100644 --- a/addons/goggles/functions/fnc_clearGlasses.sqf +++ b/addons/goggles/functions/fnc_clearGlasses.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Clears all dirt, rain, dust from glasses. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" private _unit = ACE_player; diff --git a/addons/goggles/functions/fnc_externalCamera.sqf b/addons/goggles/functions/fnc_externalCamera.sqf index 9e7eed3efe..0cd06fdcd6 100644 --- a/addons/goggles/functions/fnc_externalCamera.sqf +++ b/addons/goggles/functions/fnc_externalCamera.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Returns if the camera is external or not. @@ -13,13 +14,13 @@ * * Public: Yes */ -#include "script_component.hpp" // Handle the ThreeDen Editor Camera if (is3DEN) exitWith {true}; +private _isFeatureCamera = call CBA_fnc_getActiveFeatureCamera != ""; if (GVAR(showInThirdPerson)) then { - cameraView in ["GROUP"] || EFUNC(common,isFeatureCameraActive) + cameraView in ["GROUP"] || _isFeatureCamera } else { - cameraView in ["EXTERNAL", "GROUP"] || EFUNC(common,isFeatureCameraActive) + cameraView in ["EXTERNAL", "GROUP"] || _isFeatureCamera }; diff --git a/addons/goggles/functions/fnc_getExplosionIndex.sqf b/addons/goggles/functions/fnc_getExplosionIndex.sqf index 9d7c4004c7..33f0668bef 100644 --- a/addons/goggles/functions/fnc_getExplosionIndex.sqf +++ b/addons/goggles/functions/fnc_getExplosionIndex.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, commy2 * Turns 0-1 damage of explosion Event into a rating system of 0-3 @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_damage"]; diff --git a/addons/goggles/functions/fnc_handleExplosion.sqf b/addons/goggles/functions/fnc_handleExplosion.sqf index 129cd6fc36..db38e9ab20 100644 --- a/addons/goggles/functions/fnc_handleExplosion.sqf +++ b/addons/goggles/functions/fnc_handleExplosion.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, commy2 * Handles explosions. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/goggles/functions/fnc_handleFired.sqf b/addons/goggles/functions/fnc_handleFired.sqf index 95a22d0a03..434a61ee5f 100644 --- a/addons/goggles/functions/fnc_handleFired.sqf +++ b/addons/goggles/functions/fnc_handleFired.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, commy2 * Determines whether to place dust on the goggles, based on calibre of weapon fired and other requirements. Called from the unified fired EH only for the local player. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/goggles/functions/fnc_handleKilled.sqf b/addons/goggles/functions/fnc_handleKilled.sqf index 001a4041b8..db7364492d 100644 --- a/addons/goggles/functions/fnc_handleKilled.sqf +++ b/addons/goggles/functions/fnc_handleKilled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, commy2 * Handles the player dying. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/goggles/functions/fnc_isDivingGoggles.sqf b/addons/goggles/functions/fnc_isDivingGoggles.sqf index ac86a09d2b..cc173f6dc3 100644 --- a/addons/goggles/functions/fnc_isDivingGoggles.sqf +++ b/addons/goggles/functions/fnc_isDivingGoggles.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Determines whether passed goggles is diving goggles or a variant of them. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_glasses"]; diff --git a/addons/goggles/functions/fnc_isGogglesVisible.sqf b/addons/goggles/functions/fnc_isGogglesVisible.sqf index f1205b5df6..3ad5085a57 100644 --- a/addons/goggles/functions/fnc_isGogglesVisible.sqf +++ b/addons/goggles/functions/fnc_isGogglesVisible.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Determines if goggles are visible on passed unit. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/goggles/functions/fnc_isInRotorWash.sqf b/addons/goggles/functions/fnc_isInRotorWash.sqf index 80e1bdd8e8..d978cde0ce 100644 --- a/addons/goggles/functions/fnc_isInRotorWash.sqf +++ b/addons/goggles/functions/fnc_isInRotorWash.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, commy2 * Checks for nearby running helicopters (within 15m) @@ -17,7 +18,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", ["_radius", 15]]; diff --git a/addons/goggles/functions/fnc_removeDirtEffect.sqf b/addons/goggles/functions/fnc_removeDirtEffect.sqf index a6d5a232cc..732cbb5c23 100644 --- a/addons/goggles/functions/fnc_removeDirtEffect.sqf +++ b/addons/goggles/functions/fnc_removeDirtEffect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Removes dirt from the glasses. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!isNull (GETUVAR(GVAR(DisplayEffects),displayNull))) then { (GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10660) ctrlSetText ""; diff --git a/addons/goggles/functions/fnc_removeDustEffect.sqf b/addons/goggles/functions/fnc_removeDustEffect.sqf index a04121e8ba..00031084b2 100644 --- a/addons/goggles/functions/fnc_removeDustEffect.sqf +++ b/addons/goggles/functions/fnc_removeDustEffect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Removes dust from the glasses. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!isNull (GETUVAR(GVAR(DisplayEffects),displayNull))) then { (GETUVAR(GVAR(DisplayEffects),displayNull) displayCtrl 10662) ctrlSetText ""; diff --git a/addons/goggles/functions/fnc_removeGlassesEffect.sqf b/addons/goggles/functions/fnc_removeGlassesEffect.sqf index c27d8684e8..ab19570594 100644 --- a/addons/goggles/functions/fnc_removeGlassesEffect.sqf +++ b/addons/goggles/functions/fnc_removeGlassesEffect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Removes the glasses effect from the screen, removes dirt effect, removes rain effect, removes dust effect. Does not reset array (glasses will still be broken, dirty, ect.) @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" GVAR(EffectsActive) = false; GVAR(PostProcess) ppEffectEnable false; diff --git a/addons/goggles/functions/fnc_removeRainEffect.sqf b/addons/goggles/functions/fnc_removeRainEffect.sqf index fb7f3e5e2e..53de0721b1 100644 --- a/addons/goggles/functions/fnc_removeRainEffect.sqf +++ b/addons/goggles/functions/fnc_removeRainEffect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Removes rain effects from the screen. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!isNull GVAR(RainDrops)) then { deleteVehicle GVAR(RainDrops); diff --git a/addons/goggles/stringtable.xml b/addons/goggles/stringtable.xml index 4c796c6ecc..86fb2e4558 100644 --- a/addons/goggles/stringtable.xml +++ b/addons/goggles/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/grenades/functions/fnc_flare.sqf b/addons/grenades/functions/fnc_flare.sqf index a0e8e1ff40..9ad3348f6b 100644 --- a/addons/grenades/functions/fnc_flare.sqf +++ b/addons/grenades/functions/fnc_flare.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Makes flare shine. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_projectile", "_color", "_intensity", "_timeToLive"]; diff --git a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf index 0d0779ccef..37e9a10845 100644 --- a/addons/grenades/functions/fnc_flashbangExplosionEH.sqf +++ b/addons/grenades/functions/fnc_flashbangExplosionEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Creates the flashbang effect and knock out AI units. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_grenadePosASL"]; TRACE_1("params",_grenadePosASL); diff --git a/addons/grenades/functions/fnc_flashbangThrownFuze.sqf b/addons/grenades/functions/fnc_flashbangThrownFuze.sqf index 5c05abc9a3..46ff41171d 100644 --- a/addons/grenades/functions/fnc_flashbangThrownFuze.sqf +++ b/addons/grenades/functions/fnc_flashbangThrownFuze.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Waits for the flashbang grenade fuze to trigger and 'explode' @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_projectile"]; TRACE_1("params",_projectile); diff --git a/addons/grenades/functions/fnc_incendiary.sqf b/addons/grenades/functions/fnc_incendiary.sqf index 5b0384da3b..b07ed48fb3 100644 --- a/addons/grenades/functions/fnc_incendiary.sqf +++ b/addons/grenades/functions/fnc_incendiary.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Makes incendiary burn. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" #define ALERT_NEAR_ENEMY_RANGE 60 diff --git a/addons/grenades/functions/fnc_nextMode.sqf b/addons/grenades/functions/fnc_nextMode.sqf index 99149f5185..839fbd5786 100644 --- a/addons/grenades/functions/fnc_nextMode.sqf +++ b/addons/grenades/functions/fnc_nextMode.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Select the next throwing mode and display message. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _mode = missionNamespace getVariable [QGVAR(currentThrowMode), 0]; diff --git a/addons/grenades/functions/fnc_throwGrenade.sqf b/addons/grenades/functions/fnc_throwGrenade.sqf index 92c2639826..0fe0c483d9 100644 --- a/addons/grenades/functions/fnc_throwGrenade.sqf +++ b/addons/grenades/functions/fnc_throwGrenade.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Adjust the grenades throwing direction and speed to the selected throwing mode. Called from the unified fired EH only for CAManBase @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/grenades/stringtable.xml b/addons/grenades/stringtable.xml index 2f695f8a40..d89ff53044 100644 --- a/addons/grenades/stringtable.xml +++ b/addons/grenades/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/gunbag/functions/fnc_calculateMass.sqf b/addons/gunbag/functions/fnc_calculateMass.sqf index d55ac3a8ee..8f845dc4ee 100644 --- a/addons/gunbag/functions/fnc_calculateMass.sqf +++ b/addons/gunbag/functions/fnc_calculateMass.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ir0n1E * Calculate mass of weapon an items. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_weapon", "_items", "_magazines"]; diff --git a/addons/gunbag/functions/fnc_canInteract.sqf b/addons/gunbag/functions/fnc_canInteract.sqf index 556ea1f700..46451b50d5 100644 --- a/addons/gunbag/functions/fnc_canInteract.sqf +++ b/addons/gunbag/functions/fnc_canInteract.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ir0n1E * Check if client able to interact with gunbag. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/gunbag/functions/fnc_hasGunbag.sqf b/addons/gunbag/functions/fnc_hasGunbag.sqf index 8c8fdd6147..5fa90c7b9c 100644 --- a/addons/gunbag/functions/fnc_hasGunbag.sqf +++ b/addons/gunbag/functions/fnc_hasGunbag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ir0n1E * Switches gunbag full/empty for mass calculation. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/gunbag/functions/fnc_isMachineGun.sqf b/addons/gunbag/functions/fnc_isMachineGun.sqf index a6191c1cca..76cf64d443 100644 --- a/addons/gunbag/functions/fnc_isMachineGun.sqf +++ b/addons/gunbag/functions/fnc_isMachineGun.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Reports true if a weapon is a machine gun. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_weapon"]; diff --git a/addons/gunbag/functions/fnc_offGunbag.sqf b/addons/gunbag/functions/fnc_offGunbag.sqf index a46d49675d..751402fa0f 100644 --- a/addons/gunbag/functions/fnc_offGunbag.sqf +++ b/addons/gunbag/functions/fnc_offGunbag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ir0n1E * Get weapon out of gunbag. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/gunbag/functions/fnc_offGunbagCallback.sqf b/addons/gunbag/functions/fnc_offGunbagCallback.sqf index 580103b021..794ea2e709 100644 --- a/addons/gunbag/functions/fnc_offGunbagCallback.sqf +++ b/addons/gunbag/functions/fnc_offGunbagCallback.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ir0n1E * Get weapon out of gunbag. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/gunbag/functions/fnc_status.sqf b/addons/gunbag/functions/fnc_status.sqf index 33c30ec0e1..730e992dcb 100644 --- a/addons/gunbag/functions/fnc_status.sqf +++ b/addons/gunbag/functions/fnc_status.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ir0n1E * Check gunbag status full/empty. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/gunbag/functions/fnc_toGunbag.sqf b/addons/gunbag/functions/fnc_toGunbag.sqf index 8851e5610b..1f52eb6baf 100644 --- a/addons/gunbag/functions/fnc_toGunbag.sqf +++ b/addons/gunbag/functions/fnc_toGunbag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ir0n1E * Put weapon into gunbag. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/gunbag/functions/fnc_toGunbagCallback.sqf b/addons/gunbag/functions/fnc_toGunbagCallback.sqf index 3587c9e6b8..e47c817979 100644 --- a/addons/gunbag/functions/fnc_toGunbagCallback.sqf +++ b/addons/gunbag/functions/fnc_toGunbagCallback.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ir0n1E * Put weapon into gunbag. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/hearing/data/ace_earplugs.p3d b/addons/hearing/data/ace_earplugs.p3d index c6d4295212..ecdcb076a2 100644 Binary files a/addons/hearing/data/ace_earplugs.p3d and b/addons/hearing/data/ace_earplugs.p3d differ diff --git a/addons/hearing/functions/fnc_addEarPlugs.sqf b/addons/hearing/functions/fnc_addEarPlugs.sqf index 9e6bd0cab2..2fcfdab75d 100644 --- a/addons/hearing/functions/fnc_addEarPlugs.sqf +++ b/addons/hearing/functions/fnc_addEarPlugs.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Called on unit initialization. Adds earplugs if the unit is equipped with either a really loud primary weapon or a rocket launcher. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_2("params",_unit,typeOf _unit); diff --git a/addons/hearing/functions/fnc_earRinging.sqf b/addons/hearing/functions/fnc_earRinging.sqf index 273fad8107..ae830e09a2 100644 --- a/addons/hearing/functions/fnc_earRinging.sqf +++ b/addons/hearing/functions/fnc_earRinging.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, commy2, Rocko, Rommel, Ruthberg * Handle new sound souce near ace_player and apply hearing damage @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_strength"]; if (_strength < 0.05) exitWith {}; diff --git a/addons/hearing/functions/fnc_explosionNear.sqf b/addons/hearing/functions/fnc_explosionNear.sqf index 4917ac009b..799002b3f7 100644 --- a/addons/hearing/functions/fnc_explosionNear.sqf +++ b/addons/hearing/functions/fnc_explosionNear.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, commy2, Ruthberg * Handles deafness due to explosions going off near the player. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_damage"]; diff --git a/addons/hearing/functions/fnc_firedNear.sqf b/addons/hearing/functions/fnc_firedNear.sqf index 9a5e65b774..4dd8c759a3 100644 --- a/addons/hearing/functions/fnc_firedNear.sqf +++ b/addons/hearing/functions/fnc_firedNear.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, commy2 * Handles deafness due to large-caliber weapons going off near the player. @@ -20,7 +21,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object", "_firer", "_distance", "_weapon", "", "", "_ammo"]; diff --git a/addons/hearing/functions/fnc_handleRespawn.sqf b/addons/hearing/functions/fnc_handleRespawn.sqf index 58500f1c3d..74dee65b04 100644 --- a/addons/hearing/functions/fnc_handleRespawn.sqf +++ b/addons/hearing/functions/fnc_handleRespawn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Reset earplugs on respawn, and then re-add if appropriate @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_2("params",_unit,typeOf _unit); diff --git a/addons/hearing/functions/fnc_hasEarPlugsIn.sqf b/addons/hearing/functions/fnc_hasEarPlugsIn.sqf index ce697ab295..f24b17737e 100644 --- a/addons/hearing/functions/fnc_hasEarPlugsIn.sqf +++ b/addons/hearing/functions/fnc_hasEarPlugsIn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if the unit has earplugs put in. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; _unit getVariable ["ACE_hasEarPlugsin", false] diff --git a/addons/hearing/functions/fnc_moduleHearing.sqf b/addons/hearing/functions/fnc_moduleHearing.sqf index 8c04d9b8a4..d36579c4c0 100644 --- a/addons/hearing/functions/fnc_moduleHearing.sqf +++ b/addons/hearing/functions/fnc_moduleHearing.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Initializes the Hearing module. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/hearing/functions/fnc_putInEarplugs.sqf b/addons/hearing/functions/fnc_putInEarplugs.sqf index 4471ec1aba..7292c86f85 100644 --- a/addons/hearing/functions/fnc_putInEarplugs.sqf +++ b/addons/hearing/functions/fnc_putInEarplugs.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Hope Johnson and commy2 * Puts in earplugs. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player"]; diff --git a/addons/hearing/functions/fnc_removeEarplugs.sqf b/addons/hearing/functions/fnc_removeEarplugs.sqf index a46febefb2..9af41f6d8b 100644 --- a/addons/hearing/functions/fnc_removeEarplugs.sqf +++ b/addons/hearing/functions/fnc_removeEarplugs.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Hope Johnson and commy2 * Takes out earplugs. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player"]; diff --git a/addons/hearing/functions/fnc_updateHearingProtection.sqf b/addons/hearing/functions/fnc_updateHearingProtection.sqf index fe0ca867ff..e010165f8a 100644 --- a/addons/hearing/functions/fnc_updateHearingProtection.sqf +++ b/addons/hearing/functions/fnc_updateHearingProtection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Updates the hearing protection and volume attenuation for player on earbuds/helmet change @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" TRACE_1("params",_this); diff --git a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf index b077487c79..8d42ca1c0c 100644 --- a/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf +++ b/addons/hearing/functions/fnc_updatePlayerVehAttenuation.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Gets the sound attenuation of a player to the outside. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _vehicle = vehicle ACE_player; diff --git a/addons/hearing/functions/fnc_updateVolume.sqf b/addons/hearing/functions/fnc_updateVolume.sqf index 7d0f875414..4cf1a6b117 100644 --- a/addons/hearing/functions/fnc_updateVolume.sqf +++ b/addons/hearing/functions/fnc_updateVolume.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 and esteldunedain and Ruthberg * Updates and applies the current deafness. Called every 1 sec from a PFEH. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" if (!alive ACE_player) exitWith { if (missionNameSpace getVariable [QGVAR(disableVolumeUpdate), false]) exitWith {}; diff --git a/addons/hearing/stringtable.xml b/addons/hearing/stringtable.xml index 1bf1ccad07..a30970f77f 100644 --- a/addons/hearing/stringtable.xml +++ b/addons/hearing/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/hellfire/functions/fnc_attackProfile.sqf b/addons/hellfire/functions/fnc_attackProfile.sqf index 84f1c39f0a..8904d57978 100644 --- a/addons/hellfire/functions/fnc_attackProfile.sqf +++ b/addons/hellfire/functions/fnc_attackProfile.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Hellfire attack profile. Handles all 4 modes LOBL, LOAL-DIR, LOAL-HI, LOAL-LO @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; _args params ["_firedEH", "_launchParams"]; diff --git a/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf b/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf index a4854faa55..066d280d65 100644 --- a/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf +++ b/addons/hellfire/functions/fnc_getAttackProfileSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Gets attack profile parameters for first run of hellfire attack profile function @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; _args params ["_firedEH", "_launchParams"]; diff --git a/addons/hellfire/functions/fnc_setupVehicle.sqf b/addons/hellfire/functions/fnc_setupVehicle.sqf index 36b724d8a6..e824542021 100644 --- a/addons/hellfire/functions/fnc_setupVehicle.sqf +++ b/addons/hellfire/functions/fnc_setupVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Adds interaction menu actions to switch the firemode to a vehicle. @@ -14,8 +15,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_player"]; diff --git a/addons/hellfire/stringtable.xml b/addons/hellfire/stringtable.xml index 34ed9555ed..990e5a5b84 100644 --- a/addons/hellfire/stringtable.xml +++ b/addons/hellfire/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/hitreactions/functions/fnc_fallDown.sqf b/addons/hitreactions/functions/fnc_fallDown.sqf index c67f3fd0f8..08c7282ab7 100644 --- a/addons/hitreactions/functions/fnc_fallDown.sqf +++ b/addons/hitreactions/functions/fnc_fallDown.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Adds reactions to a unit that was hit. EH only runs where to unit is local. Adds screams, falling down, falling from ladders, ejecting from static weapons and camshake for players @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_firer", "_damage"]; diff --git a/addons/hitreactions/functions/fnc_getRandomAnimation.sqf b/addons/hitreactions/functions/fnc_getRandomAnimation.sqf index 10b64b5eae..bfdfd9646f 100644 --- a/addons/hitreactions/functions/fnc_getRandomAnimation.sqf +++ b/addons/hitreactions/functions/fnc_getRandomAnimation.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Get a random fall animation for the unit. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/hitreactions/stringtable.xml b/addons/hitreactions/stringtable.xml index 3b26084538..3440ae06bf 100644 --- a/addons/hitreactions/stringtable.xml +++ b/addons/hitreactions/stringtable.xml @@ -1,9 +1,9 @@ - + Min Damage to trigger falling - Danno Minimo da caduta se colpiti + Danno Minimo da caduta 觸發倒下前最低需受到多少傷害 触发倒下前最低需受到多少伤害 崩れ落ちるまでの最低損傷値 diff --git a/addons/huntir/CfgMagazineWells.hpp b/addons/huntir/CfgMagazineWells.hpp new file mode 100644 index 0000000000..2d9b87897c --- /dev/null +++ b/addons/huntir/CfgMagazineWells.hpp @@ -0,0 +1,8 @@ +class CfgMagazineWells { + class CBA_40mm_M203 { + ADDON[] = {"ACE_HuntIR_M203"}; + }; + class UGL_40x36 { //Vanilla + ADDON[] = {"ACE_HuntIR_M203"}; + }; +}; diff --git a/addons/huntir/XEH_postInit.sqf b/addons/huntir/XEH_postInit.sqf index 5ad798a62d..1f6a39056b 100644 --- a/addons/huntir/XEH_postInit.sqf +++ b/addons/huntir/XEH_postInit.sqf @@ -11,3 +11,5 @@ GVAR(ELEVAT) = 0.01; // Register fire event handler // Don't run for non players, as they are too dumb to launch huntirs anyway ["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler; + +["ace_huntir", {!GETMVAR(GVAR(stop),true)}] call CBA_fnc_registerFeatureCamera; diff --git a/addons/huntir/config.cpp b/addons/huntir/config.cpp index 0adf9670a0..89992d5f52 100644 --- a/addons/huntir/config.cpp +++ b/addons/huntir/config.cpp @@ -18,6 +18,7 @@ class CfgPatches { #include "CfgCloudlets.hpp" #include "CfgAmmo.hpp" #include "CfgMagazines.hpp" +#include "CfgMagazineWells.hpp" #include "CfgVehicles.hpp" #include "CfgWeapons.hpp" #include "Dialog.hpp" diff --git a/addons/huntir/functions/fnc_cam.sqf b/addons/huntir/functions/fnc_cam.sqf index 867420f8e1..ca027b23ab 100644 --- a/addons/huntir/functions/fnc_cam.sqf +++ b/addons/huntir/functions/fnc_cam.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Norrin, Rocko, Ruthberg * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" if (!hasInterface) exitWith {}; params ["_huntIR"]; diff --git a/addons/huntir/functions/fnc_handleFired.sqf b/addons/huntir/functions/fnc_handleFired.sqf index 85e228f958..42c6bf3c84 100644 --- a/addons/huntir/functions/fnc_handleFired.sqf +++ b/addons/huntir/functions/fnc_handleFired.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Norrin, Rocko, Ruthberg * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/huntir/functions/fnc_huntir.sqf b/addons/huntir/functions/fnc_huntir.sqf index 075e2a9e6a..221bc5ccec 100644 --- a/addons/huntir/functions/fnc_huntir.sqf +++ b/addons/huntir/functions/fnc_huntir.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Norrin, Rocko, Ruthberg * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" #define __TYPE_WRITER_DELAY 0.05 diff --git a/addons/huntir/functions/fnc_huntirCompass.sqf b/addons/huntir/functions/fnc_huntirCompass.sqf index d6fc417353..9a7882f45c 100644 --- a/addons/huntir/functions/fnc_huntirCompass.sqf +++ b/addons/huntir/functions/fnc_huntirCompass.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Norrin, Rocko, Ruthberg * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; diff --git a/addons/huntir/functions/fnc_keyPressed.sqf b/addons/huntir/functions/fnc_keyPressed.sqf index 90f74415a3..edfa39c534 100644 --- a/addons/huntir/functions/fnc_keyPressed.sqf +++ b/addons/huntir/functions/fnc_keyPressed.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Norrin, Rocko * Handles the HuntIR monitor key interaction @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" private _ret = false; diff --git a/addons/huntir/stringtable.xml b/addons/huntir/stringtable.xml index f8211753e6..b9ec98a378 100644 --- a/addons/huntir/stringtable.xml +++ b/addons/huntir/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -7,7 +7,7 @@ Caja de transporte de HuntIR Transportní bedna HuntIR Ящик с HuntIR - HuntIR Transport Box + Cassa di Trasporto HuntIR Skrzynia HuntIR Boite de transport HuntIR HuntIR Transport Box @@ -23,7 +23,7 @@ Proyectil HuntIR HuntIR náboj HuntIR снаряд - HuntIR Round + Colpo HuntIR Nabój HuntIR Munition HuntIR HuntIR lövedék @@ -39,7 +39,7 @@ Monitor HuntIR HuntIR monitor HuntIR монитор - HuntIR monitor + Monitor HuntIR Odbiornik HuntIR Ecran HuntIR HuntIR monitor @@ -55,7 +55,7 @@ Activar monitor HuntIR Zapnout HuntIR monitor Включить HuntIR монитор - Activate HuntIR monitor + Attiva il monitor HuntIR Włącz odbiornik HuntIR Allumer l'écran du HuntIR HuntIR monitor aktiválása @@ -71,7 +71,7 @@ Camara: Kamera: Камера: - Camera: + Telecamera: Kamera: Caméra : Kamera: @@ -87,7 +87,7 @@ Altitud: Výška: Высота: - Altitude: + Altitudine: Wysokość: Altitude : Magasság: @@ -103,7 +103,7 @@ Tiempo de grabación: Čas nahrávání: Время записи: - Recording Time: + Tempo di Registrazione: Czas nagrywania: Temps d'enregistrement : Felvételi idő: @@ -119,7 +119,7 @@ Pulsar ESC para salir de la camara Stiskni ESC pro opustění kamery Нажмите ESC чтобы выйти из режима камеры - Press ESC to quit camera + Premi ESC per uscire dalla telecamera Wciśnij ESC by wyjść z widoku kamery Appuyer sur ESC pour quitter la camera Nyomj ESC-ket a kamerából való kilépéshez @@ -135,7 +135,7 @@ Ayuda Nápověda Помощь - Help + Aiuto Pomoc Aide Súgó @@ -151,7 +151,7 @@ A/D - Cambiar zoom A/D - Změna přiblížení A/D - Приближение - A/D - Cycle zoom + A/D - Cambia zoom A/D - powiększenie Q/D - Changement de zoom A/D - Nagyítás @@ -167,7 +167,7 @@ W/S - Seleccionar camara W/S - Výběr kamery W/S - Выбрать камеру - W/S - Select camera + W/S - Seleziona telecamera W/S - wybór kamery Z/S - Sélectionner la caméra W/S - Kamera váltás @@ -183,7 +183,7 @@ Left/Right - Rotar camara Levá/Pravá - Rotace kamery Влево/Вправо - Вращать камеру - Left/Right - Rotate camera + Left/Right - Ruota telecamera Lewo/Prawo - obrót kamery w poziomie Gauche/Droite - Rotation de la caméra Jobb/Bal - Kamera forgatás @@ -199,7 +199,7 @@ Up/Down - Subir/bajar camara Nahoru/Dolu - Zvýšít/snížit úhel pohledu kamery Вверх/Вниз - Поднять/Опустить камеру - Up/Down - Elevate/lower camera + Up/Down - Alza/abbassa telecamera Góra/Dół - obrót kamery w pionie Haut/Bas - Monter/descendre la caméra Fel/Le - Kamera döntése/süllyesztése @@ -215,7 +215,7 @@ N - Cambiar modos de IT N - Změna režimů kamery N - Режимы камеры - N - Cycle IT modes + N - Cambia modalità IT N - wybór trybu IT N - Changement de modes IT N - Hőkép módok @@ -231,7 +231,7 @@ R - Reiniciar camara R - Reset kamery R - Сбросить настройки камеры - R - Reset camera + R - Azzera telecamera R - resetuj kamerę R - Reset de la caméra R - Kamera visszaállítása @@ -247,7 +247,7 @@ Esc - Salit de ayuda Esc - Ukončit pomoc Esc - Выйти из помощи - Esc - Exit help + Esc - Chiudi aiuto Esc - wyjście z ekranu Pomocy Esc - Sortir de l'aide Exit - Kilépés a súgóból diff --git a/addons/interact_menu/functions/fnc_addActionToClass.sqf b/addons/interact_menu/functions/fnc_addActionToClass.sqf index 03838234ec..558c497667 100644 --- a/addons/interact_menu/functions/fnc_addActionToClass.sqf +++ b/addons/interact_menu/functions/fnc_addActionToClass.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Insert an ACE action to a class, under a certain path @@ -18,7 +19,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!params [["_objectType", "", [""]], ["_typeNum", 0, [0]], ["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith { ERROR("Bad Params"); diff --git a/addons/interact_menu/functions/fnc_addActionToObject.sqf b/addons/interact_menu/functions/fnc_addActionToObject.sqf index 4b993f9971..3ee7c5c332 100644 --- a/addons/interact_menu/functions/fnc_addActionToObject.sqf +++ b/addons/interact_menu/functions/fnc_addActionToObject.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Insert an ACE action to an object, under a certain config path @@ -17,7 +18,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!params [["_object", objNull, [objNull]], ["_typeNum", 0, [0]], ["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith { ERROR("Bad Params"); diff --git a/addons/interact_menu/functions/fnc_addActionToZeus.sqf b/addons/interact_menu/functions/fnc_addActionToZeus.sqf index 66c1f29d08..65ef178fb0 100644 --- a/addons/interact_menu/functions/fnc_addActionToZeus.sqf +++ b/addons/interact_menu/functions/fnc_addActionToZeus.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Insert an ACE action to zeus. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!params [["_parentPath", [], [[]]], ["_action", [], [[]], 11]]) exitWith {ERROR("Bad Params"); []}; if ((_parentPath param [0, ""]) != "ACE_ZeusActions") exitWith {ERROR_1("Bad path %1 - should have ACE_ZeusActions as base", _parentPath); []}; diff --git a/addons/interact_menu/functions/fnc_addMainAction.sqf b/addons/interact_menu/functions/fnc_addMainAction.sqf index 43273ef967..d00cd2b60e 100644 --- a/addons/interact_menu/functions/fnc_addMainAction.sqf +++ b/addons/interact_menu/functions/fnc_addMainAction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas, PabstMirror * Makes sure there is a ACE_MainActions on the object type @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_objectType", "_typeNum"]; diff --git a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf index 08e1608990..e7fecfcac8 100644 --- a/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf +++ b/addons/interact_menu/functions/fnc_collectActiveActionTree.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Collect a entire tree of active actions @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object", "_origAction", "_parentPath", "_distanceToBasePoint"]; _origAction params ["_origActionData", "_origActionChildren"]; diff --git a/addons/interact_menu/functions/fnc_compileMenu.sqf b/addons/interact_menu/functions/fnc_compileMenu.sqf index 816d06ef72..94c63795ff 100644 --- a/addons/interact_menu/functions/fnc_compileMenu.sqf +++ b/addons/interact_menu/functions/fnc_compileMenu.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: NouberNou and esteldunedain * Compile the action menu from config for an object's class @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf index 54f5867e0d..8a79fe99e1 100644 --- a/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuSelfAction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: NouberNou and esteldunedain * Compile the self action menu from config for an object's class @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf index b2a95c510e..af28bf2284 100644 --- a/addons/interact_menu/functions/fnc_compileMenuZeus.sqf +++ b/addons/interact_menu/functions/fnc_compileMenuZeus.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Compile the zeus action menu (only to be done once) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Exit if the action menu is already compiled for zeus if !(isNil {missionNamespace getVariable [QGVAR(ZeusActions), nil]}) exitWith {}; diff --git a/addons/interact_menu/functions/fnc_createAction.sqf b/addons/interact_menu/functions/fnc_createAction.sqf index 5129482771..f8c61c3842 100644 --- a/addons/interact_menu/functions/fnc_createAction.sqf +++ b/addons/interact_menu/functions/fnc_createAction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Creates an isolated ACE action @@ -24,7 +25,6 @@ * * Public: Yes */ -#include "script_component.hpp" // IGNORE_PRIVATE_WARNING(_actionName,_displayName,_icon,_statement,_condition,_insertChildren,_customParams,_position,_distance,_params,_modifierFunction); diff --git a/addons/interact_menu/functions/fnc_createVehiclesActions.sqf b/addons/interact_menu/functions/fnc_createVehiclesActions.sqf index 4f29b9e65b..8218242aab 100644 --- a/addons/interact_menu/functions/fnc_createVehiclesActions.sqf +++ b/addons/interact_menu/functions/fnc_createVehiclesActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * Creates child actions for vehicle list. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicles", "_statement", "_target"]; diff --git a/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf b/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf index 98408f58f9..deed10e293 100644 --- a/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf +++ b/addons/interact_menu/functions/fnc_ctrlSetParsedTextCached.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Sets the controls structured text if it isn't already set. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_ctrl", "_index", "_text"]; diff --git a/addons/interact_menu/functions/fnc_findActionNode.sqf b/addons/interact_menu/functions/fnc_findActionNode.sqf index c328e03f39..c2807a3e9c 100644 --- a/addons/interact_menu/functions/fnc_findActionNode.sqf +++ b/addons/interact_menu/functions/fnc_findActionNode.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Return action point from path @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_actionTreeList", "_parentPath"]; diff --git a/addons/interact_menu/functions/fnc_handleEscapeMenu.sqf b/addons/interact_menu/functions/fnc_handleEscapeMenu.sqf index d390d23d94..d915f57999 100644 --- a/addons/interact_menu/functions/fnc_handleEscapeMenu.sqf +++ b/addons/interact_menu/functions/fnc_handleEscapeMenu.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handle the escape key being pressed. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (GVAR(openedMenuType) < 0) exitWith {}; diff --git a/addons/interact_menu/functions/fnc_isSubPath.sqf b/addons/interact_menu/functions/fnc_isSubPath.sqf index 2c8244b081..72857f3070 100644 --- a/addons/interact_menu/functions/fnc_isSubPath.sqf +++ b/addons/interact_menu/functions/fnc_isSubPath.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Check if the first path is a subpath of the other @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_longPath", "_shortPath"]; diff --git a/addons/interact_menu/functions/fnc_keyDown.sqf b/addons/interact_menu/functions/fnc_keyDown.sqf index 5d19434c79..54a9f070ce 100644 --- a/addons/interact_menu/functions/fnc_keyDown.sqf +++ b/addons/interact_menu/functions/fnc_keyDown.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: NouberNou and esteldunedain * Handle interactions key down @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_menuType"]; diff --git a/addons/interact_menu/functions/fnc_keyUp.sqf b/addons/interact_menu/functions/fnc_keyUp.sqf index dc1fcf3fe6..be98452177 100644 --- a/addons/interact_menu/functions/fnc_keyUp.sqf +++ b/addons/interact_menu/functions/fnc_keyUp.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: NouberNou and esteldunedain * Handle interactions key up @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_menuType", "_calledByClicking"]; diff --git a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf index f3db5fc8c3..92de6b872a 100644 --- a/addons/interact_menu/functions/fnc_removeActionFromClass.sqf +++ b/addons/interact_menu/functions/fnc_removeActionFromClass.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Removes an action from a class @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_objectType", "_typeNum", "_fullPath"]; diff --git a/addons/interact_menu/functions/fnc_removeActionFromObject.sqf b/addons/interact_menu/functions/fnc_removeActionFromObject.sqf index fd59e0eb4a..64c96ec949 100644 --- a/addons/interact_menu/functions/fnc_removeActionFromObject.sqf +++ b/addons/interact_menu/functions/fnc_removeActionFromObject.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, NouberNou and esteldunedain * Removes an action from an object @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object", "_typeNum", "_fullPath"]; diff --git a/addons/interact_menu/functions/fnc_render.sqf b/addons/interact_menu/functions/fnc_render.sqf index 47ddcf938d..687498e7cd 100644 --- a/addons/interact_menu/functions/fnc_render.sqf +++ b/addons/interact_menu/functions/fnc_render.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: NouberNou and esteldunedain * Render all available nearby interactions @@ -13,8 +14,6 @@ * * Public: No */ -// #define ENABLE_PERFORMANCE_COUNTERS -#include "script_component.hpp" BEGIN_COUNTER(fnc_render); diff --git a/addons/interact_menu/functions/fnc_renderActionPoints.sqf b/addons/interact_menu/functions/fnc_renderActionPoints.sqf index 8d0e2de397..f4aa8927f6 100644 --- a/addons/interact_menu/functions/fnc_renderActionPoints.sqf +++ b/addons/interact_menu/functions/fnc_renderActionPoints.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: NouberNou and esteldunedain * Render all action points @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(currentOptions) = []; diff --git a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf index fefab99721..45c30696f3 100644 --- a/addons/interact_menu/functions/fnc_renderBaseMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderBaseMenu.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: NouberNou and esteldunedain * Render the interaction menu for a base action @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" BEGIN_COUNTER(fnc_renderBaseMenu) diff --git a/addons/interact_menu/functions/fnc_renderIcon.sqf b/addons/interact_menu/functions/fnc_renderIcon.sqf index 6c97f96693..21f1962180 100644 --- a/addons/interact_menu/functions/fnc_renderIcon.sqf +++ b/addons/interact_menu/functions/fnc_renderIcon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: NouberNou, esteldunedain, mharis001 * Render a single interaction icon. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" #define DEFAULT_ICON QUOTE(\z\ace\addons\interaction\ui\dot_ca.paa) params ["_text", "_icon", "_sPos", "_textSettings"]; diff --git a/addons/interact_menu/functions/fnc_renderMenu.sqf b/addons/interact_menu/functions/fnc_renderMenu.sqf index 70bf02fe9a..5801f4602f 100644 --- a/addons/interact_menu/functions/fnc_renderMenu.sqf +++ b/addons/interact_menu/functions/fnc_renderMenu.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: NouberNou and esteldunedain * Render an interaction menu and it's children recursively @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_parentPath", "_action", "_sPos", "_angles"]; _action params ["_actionData", "_activeChildren", "_actionObject"]; diff --git a/addons/interact_menu/functions/fnc_renderSelector.sqf b/addons/interact_menu/functions/fnc_renderSelector.sqf index 2acc66c8eb..0449f9c922 100644 --- a/addons/interact_menu/functions/fnc_renderSelector.sqf +++ b/addons/interact_menu/functions/fnc_renderSelector.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Render a single interaction icon @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_sPos", "_icon"]; diff --git a/addons/interact_menu/functions/fnc_setupTextColors.sqf b/addons/interact_menu/functions/fnc_setupTextColors.sqf index e51d39e533..3d0a369c60 100644 --- a/addons/interact_menu/functions/fnc_setupTextColors.sqf +++ b/addons/interact_menu/functions/fnc_setupTextColors.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Builds color strings needed for displaying interaction text @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //Mixes 2 colors (number arrays) and makes a color string "#AARRGGBB" for structured text private _mixColor = { diff --git a/addons/interact_menu/functions/fnc_splitPath.sqf b/addons/interact_menu/functions/fnc_splitPath.sqf index 93dea35d7c..bd59a39d33 100644 --- a/addons/interact_menu/functions/fnc_splitPath.sqf +++ b/addons/interact_menu/functions/fnc_splitPath.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Take full path and split it between parent path and action name @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" private _parentPath = []; for [{private _i = 0},{_i < (count _this) - 1},{_i = _i + 1}] do { diff --git a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf index 7fa9ffdac5..2497021e00 100644 --- a/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_addHouseActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Scans for nearby "Static" objects (buildings) and adds the UserActions to them. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_interactionType"]; diff --git a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf index 99eafc0392..46667857f5 100644 --- a/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf +++ b/addons/interact_menu/functions/fnc_userActions_getHouseActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Scans the buidling type for UserActions and Ladder mount points. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_typeOfBuilding"]; diff --git a/addons/interact_menu/stringtable.xml b/addons/interact_menu/stringtable.xml index c27932f214..2c56624e36 100644 --- a/addons/interact_menu/stringtable.xml +++ b/addons/interact_menu/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/interaction/ACE_ZeusActions.hpp b/addons/interaction/ACE_ZeusActions.hpp index af6b4504e1..d548ab372a 100644 --- a/addons/interaction/ACE_ZeusActions.hpp +++ b/addons/interaction/ACE_ZeusActions.hpp @@ -3,10 +3,11 @@ class ACE_ZeusActions { class ZeusUnits { displayName = "$STR_A3_RscDisplayCurator_ModeUnits_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeUnits_ca.paa"; - condition = QUOTE((count (curatorSelected select 0)) > 0); + condition = QUOTE(!([] isEqualTo (curatorSelected select 0))); class stance { displayName = "$STR_A3_RscAttributeUnitPos_Title"; + condition = QUOTE(ZEUS_ACTION_CONDITION && {-1 < (curatorSelected select 0) findIf {_x isKindOf 'CAManBase'}}); class prone { displayName = "$STR_Pos_Down"; @@ -33,17 +34,37 @@ class ACE_ZeusActions { class remoteControl { displayName = "$STR_A3_CfgVehicles_ModuleRemoteControl_F"; icon = "\A3\Modules_F_Curator\Data\portraitRemoteControl_ca.paa"; - statement = "_unit = objNull; { if ((side _x in [east,west,resistance,civilian]) && !(isPlayer _x)) exitWith { _unit = _x; }; } forEach (curatorSelected select 0); bis_fnc_curatorObjectPlaced_mouseOver = ['OBJECT',_unit]; (group _target) createUnit ['ModuleRemoteControl_F',[0,0,0],[],0,'NONE'];"; + condition = QUOTE(ZEUS_ACTION_CONDITION && {-1 < (curatorSelected select 0) findIf {_x isKindOf 'CAManBase'}}); + statement = QUOTE( \ + private _units = curatorSelected select 0; \ + private _unit = _units param [ARR_2( \ + _units findIf { \ + side _x in [ARR_4(east,west,resistance,civilian)] \ + && !(isPlayer _x) \ + }, \ + objNull \ + )]; \ + bis_fnc_curatorObjectPlaced_mouseOver = [ARR_2('OBJECT',_unit)]; \ + group _target createUnit [ARR_5('ModuleRemoteControl_F',[ARR_3(0,0,0)],[],0,'NONE')]; \ + ); + }; + + class GVAR(repair) { + displayName = "$STR_repair"; + icon = "\A3\ui_f\data\igui\cfg\actions\repair_ca.paa"; + condition = QUOTE(ZEUS_ACTION_CONDITION && {-1 < (curatorSelected select 0) findIf {_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}}}); + statement = QUOTE({if (_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}) then {_x setDamage 0}} forEach (curatorSelected select 0)); }; }; class ZeusGroups { displayName = "$STR_A3_RscDisplayCurator_ModeGroups_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeGroups_ca.paa"; - condition = QUOTE((count (curatorSelected select 1)) > 0); + condition = QUOTE(!([] isEqualTo (curatorSelected select 1))); class behaviour { displayName = "$STR_Combat_Mode"; + condition = QUOTE(ZEUS_ACTION_CONDITION); class careless { displayName = "$STR_Combat_Careless"; @@ -73,6 +94,7 @@ class ACE_ZeusActions { class speed { displayName = "$STR_HC_Menu_Speed"; + condition = QUOTE(ZEUS_ACTION_CONDITION); class limited { displayName = "$STR_Speed_Limited"; @@ -93,6 +115,7 @@ class ACE_ZeusActions { class formation { displayName = "$STR_Formation"; + condition = QUOTE(ZEUS_ACTION_CONDITION); class wedge { displayName = "$STR_Wedge"; @@ -145,10 +168,11 @@ class ACE_ZeusActions { class ZeusWaypoints { displayName = "Waypoints"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeRecent_ca.paa"; - condition = QUOTE((count (curatorSelected select 2)) > 0); + condition = QUOTE(!([] isEqualTo (curatorSelected select 2))); class behaviour { displayName = "$STR_Combat_Mode"; + condition = QUOTE(ZEUS_ACTION_CONDITION); class careless { displayName = "$STR_Combat_Careless"; @@ -178,6 +202,7 @@ class ACE_ZeusActions { class speed { displayName = "$STR_HC_Menu_Speed"; + condition = QUOTE(ZEUS_ACTION_CONDITION); class limited { displayName = "$STR_Speed_Limited"; @@ -198,6 +223,7 @@ class ACE_ZeusActions { class formation { displayName = "$STR_Formation"; + condition = QUOTE(ZEUS_ACTION_CONDITION); class wedge { displayName = "$STR_Wedge"; @@ -250,6 +276,6 @@ class ACE_ZeusActions { class ZeusMarkers { displayName = "$STR_A3_RscDisplayCurator_ModeMarkers_tooltip"; icon = "\A3\UI_F_Curator\Data\Displays\RscDisplayCurator\modeMarkers_ca.paa"; - condition = QUOTE((count (curatorSelected select 3)) > 0); + condition = QUOTE(!([] isEqualTo (curatorSelected select 3))); }; }; diff --git a/addons/interaction/CfgVehicles.hpp b/addons/interaction/CfgVehicles.hpp index 06cf266b78..558a0779fe 100644 --- a/addons/interaction/CfgVehicles.hpp +++ b/addons/interaction/CfgVehicles.hpp @@ -342,6 +342,11 @@ class CfgVehicles { statement = ""; insertChildren = QUOTE(_this call DFUNC(addPassengersActions)); }; + class GVAR(smashWindshield) { + displayName = CSTRING(SmashWindshield); + condition = QUOTE(_player == driver _target && {private _damage = _target getHitPointDamage 'HitGlass1'; _damage > 0.5 && {_damage < 1}}); + statement = QUOTE(playSound3D [ARR_2('A3\Sounds_F\weapons\hits\glass_2.wss',_target)]; _target setHitPointDamage [ARR_2('HitGlass1',1)];); + }; }; }; @@ -665,14 +670,14 @@ class CfgVehicles { class GVAR(TurnOn) { displayName = CSTRING(TurnOn); icon = "\A3\Ui_f\data\IGUI\Cfg\VehicleToggles\LightsIconOn_ca.paa"; - condition = QUOTE(alive _target && !(_target getVariable [ARR_2('ACE_lampOn',true)])); - statement = QUOTE(_target call DFUNC(switchLamp)); + condition = QUOTE(alive _target && !(_target getVariable [ARR_2(QQGVAR(isLightOn),true)])); + statement = QUOTE([ARR_3(QQGVAR(setLight),[ARR_2(_target,true)],_target)] call CBA_fnc_targetEvent); }; class GVAR(TurnOff) { displayName = CSTRING(TurnOff); icon = "\A3\ui_f\data\igui\cfg\actions\ico_cpt_land_OFF_ca.paa"; - condition = QUOTE(alive _target && _target getVariable [ARR_2('ACE_lampOn',true)]); - statement = QUOTE(_target call DFUNC(switchLamp)); + condition = QUOTE(alive _target && _target getVariable [ARR_2(QQGVAR(isLightOn),true)]); + statement = QUOTE([ARR_3(QQGVAR(setLight),[ARR_2(_target,false)],_target)] call CBA_fnc_targetEvent); }; }; }; diff --git a/addons/interaction/RscTitles.hpp b/addons/interaction/RscTitles.hpp index ee4783da30..b619ed594c 100644 --- a/addons/interaction/RscTitles.hpp +++ b/addons/interaction/RscTitles.hpp @@ -1,7 +1,3 @@ - -#define HSPACE 0.5-2.0/16/2 -#define VSPACE 0.5-0.3/9/2 - class ACE_Interaction_Button_Base { tooltip = ""; //action = "ACE_Interaction_isMousePressed = true;(findDisplay 1713999) closeDisplay 1;_action = ACE_Interaction_Buttons select ACE_Interaction_SelectedButton;ACE_Interaction_SelectedButton = -1; if (call (_action select 2)) then {call (_action select 1)};"; @@ -41,9 +37,11 @@ class ACE_Interaction_Button_Base { soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1}; }; -class RscListbox; class IGUIBack; +class RscListbox; class RscText; +class RscPicture; +class RscControlsGroupNoScrollbars; #define X_OFFSET 0.2 @@ -131,75 +129,78 @@ class RscACE_SelectAnItem { }; }; -#define GUI_GRID_W (0.025) -#define GUI_GRID_H (0.04) - -class RscPicture; -class RscInteractionIcon: RscPicture { - x = 19.25 * GUI_GRID_W; - y = 15.75 * GUI_GRID_H; - w = 2*GUI_GRID_H; - h = 2*GUI_GRID_H; -}; - -class RscInteractionHelperIcon: RscInteractionIcon { - x = 20 * GUI_GRID_W; - y = 16 * GUI_GRID_H; - w = GUI_GRID_H; - h = GUI_GRID_H; -}; - -class RscInteractionText: RscText{ - x = 21 * GUI_GRID_W; - y = 16 * GUI_GRID_H; - w = 24 * GUI_GRID_W; - h = 1.5 * GUI_GRID_H; -}; -class RscInteractionText_right: RscText{ - style = 1; // right aligned text -}; - class RscTitles { - class GVAR(InteractionHelper) { - idd = 9930; + class GVAR(RscMouseHint) { + idd = IDD_MOUSEHINT; + fadeIn = 0; + fadeOut = 0; + duration = 999999; enableSimulation = 1; - movingEnable = 0; - fadeIn=0.5; - fadeOut=0.5; - duration = 10e10; - onLoad = "uiNamespace setVariable ['ACE_Helper_Display', _this select 0];"; - + onLoad = QUOTE(uiNamespace setVariable [ARR_2(QQGVAR(mouseHint),_this select 0)]); class controls { - class SelectIcon: RscInteractionHelperIcon{ - idc = 1200; + class IconLMB: RscPicture { + idc = IDC_MOUSEHINT_LMB; text = QPATHTOF(UI\mouse_left_ca.paa); + x = 20 * GUI_GRID_W + GUI_GRID_CENTER_X; y = 17.5 * GUI_GRID_H; + w = GUI_GRID_H; + h = GUI_GRID_H; }; - class SelectText: RscInteractionText{ - idc = 1000; - y = 17 * GUI_GRID_H; - text = CSTRING(MakeSelection); + class TextLMB: RscText { + idc = IDC_MOUSEHINT_LMB_TEXT; + text = ""; + x = 21.1 * GUI_GRID_W + GUI_GRID_CENTER_X; + y = 17.45 * GUI_GRID_H; + w = 24 * GUI_GRID_W; + h = GUI_GRID_H; + sizeEx = GUI_GRID_H; }; - class GoBackIcon: RscInteractionHelperIcon{ - idc = 1201; - text = QPATHTOF(UI\mouse_right_ca.paa); - y = 19.5 * GUI_GRID_H; - }; - class GoBackText: RscInteractionText{ - idc = 1001; - y = 19 * GUI_GRID_H; - text = CSTRING(Back); - }; - class ScrollIcon: RscInteractionHelperIcon{ - idc = 1202; + class IconMMB: IconLMB { + idc = IDC_MOUSEHINT_MMB; text = QPATHTOF(UI\mouse_scroll_ca.paa); + y = 18.55 * GUI_GRID_H; + }; + class TextMMB: TextLMB { + idc = IDC_MOUSEHINT_MMB_TEXT; y = 18.5 * GUI_GRID_H; }; - class ScrollText: RscInteractionText{ - idc = 1002; - y = 18 * GUI_GRID_H; - text = CSTRING(ScrollHint); + class IconRMB: IconLMB { + idc = IDC_MOUSEHINT_RMB; + text = QPATHTOF(UI\mouse_right_ca.paa); + y = 19.6 * GUI_GRID_H; + }; + class TextRMB: TextLMB { + idc = IDC_MOUSEHINT_RMB_TEXT; + y = 19.55 * GUI_GRID_H; }; }; }; }; + +class GVAR(RscExtraKey): RscControlsGroupNoScrollbars { + idc = IDC_MOUSEHINT_EXTRA; + x = 0; + y = 0; + w = 40 * GUI_GRID_W; + h = GUI_GRID_H; + class controls { + class Name: RscText { + idc = IDC_MOUSEHINT_EXTRA_NAME; + style = 1; + x = 0; + y = 0; + w = 21.5 * GUI_GRID_W + GUI_GRID_CENTER_X; + h = GUI_GRID_H; + sizeEx = GUI_GRID_H; + font = "EtelkaMonospaceProBold"; + }; + class Text: RscText { + idc = IDC_MOUSEHINT_EXTRA_TEXT; + x = 21.1 * GUI_GRID_W + GUI_GRID_CENTER_X; + y = 0; + w = 24 * GUI_GRID_W; + h = GUI_GRID_H; + sizeEx = GUI_GRID_H; + }; + }; +}; diff --git a/addons/interaction/XEH_PREP.hpp b/addons/interaction/XEH_PREP.hpp index 06dd7acbe0..ea6c275f36 100644 --- a/addons/interaction/XEH_PREP.hpp +++ b/addons/interaction/XEH_PREP.hpp @@ -43,4 +43,3 @@ PREP(canPush); PREP(push); PREP(canFlip); -PREP(switchLamp); diff --git a/addons/interaction/XEH_postInit.sqf b/addons/interaction/XEH_postInit.sqf index 3604f94511..4b97c408aa 100644 --- a/addons/interaction/XEH_postInit.sqf +++ b/addons/interaction/XEH_postInit.sqf @@ -18,17 +18,6 @@ ACE_Modifier = 0; _unit doMove _position; }] call CBA_fnc_addEventHandler; -[QGVAR(setLampOn), { - params ["_lamp", "_hitPointsDamage", "_disabledLampDMG"]; - {if((_x select 1) == _disabledLampDMG) then {_lamp setHit [_x select 0, 0];};nil} count _hitPointsDamage; -}] call CBA_fnc_addEventHandler; - -[QGVAR(setLampOff), { - params ["_lamp", "_hitPointsDamage", "_disabledLampDMG"]; - {_lamp setHit [_x select 0, (_x select 1) max _disabledLampDMG];nil} count _hitPointsDamage; -}] call CBA_fnc_addEventHandler; - - [QGVAR(flip), { params ["_vehicle"]; private _position = getPosATL _vehicle; @@ -36,6 +25,24 @@ ACE_Modifier = 0; _vehicle setPosATL _position; }] call CBA_fnc_addEventHandler; +[QGVAR(setLight), { + params ["_lamp", "_state"]; + private _hitpoints = _lamp call EFUNC(common,getReflectorsWithSelections) select 1; + { + private _damage = _lamp getHit _x; + if (_state) then { + if (_damage == DISABLED_LAMP_DAMAGE) then { + _lamp setHit [_x, 0]; + }; + } else { + if (_damage < DISABLED_LAMP_DAMAGE) then { + _lamp setHit [_x, DISABLED_LAMP_DAMAGE]; + }; + }; + } forEach _hitpoints; + _lamp setVariable [QGVAR(isLightOn), _state, true]; +}] call CBA_fnc_addEventHandler; + [QGVAR(setCollisionLight), { (_this select 0) setCollisionLight (_this select 1); }] call CBA_fnc_addEventHandler; diff --git a/addons/interaction/functions/fnc_addPassengerActions.sqf b/addons/interaction/functions/fnc_addPassengerActions.sqf index ca87542172..673fb3ad00 100644 --- a/addons/interaction/functions/fnc_addPassengerActions.sqf +++ b/addons/interaction/functions/fnc_addPassengerActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Mount unit actions inside passenger submenu. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "", "_parameters"]; _parameters params ["_unit"]; diff --git a/addons/interaction/functions/fnc_addPassengersActions.sqf b/addons/interaction/functions/fnc_addPassengersActions.sqf index 65fecebbdc..05e5ebfd55 100644 --- a/addons/interaction/functions/fnc_addPassengersActions.sqf +++ b/addons/interaction/functions/fnc_addPassengersActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Create one action per passenger. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_player"]; diff --git a/addons/interaction/functions/fnc_canBecomeLeader.sqf b/addons/interaction/functions/fnc_canBecomeLeader.sqf index 3978306fec..af50c081a0 100644 --- a/addons/interaction/functions/fnc_canBecomeLeader.sqf +++ b/addons/interaction/functions/fnc_canBecomeLeader.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Test if can Become Leader of group. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/interaction/functions/fnc_canFlip.sqf b/addons/interaction/functions/fnc_canFlip.sqf index 70c004920c..b00164415c 100644 --- a/addons/interaction/functions/fnc_canFlip.sqf +++ b/addons/interaction/functions/fnc_canFlip.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * Checks if vehicle can be flipped. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/interaction/functions/fnc_canInteractWithCivilian.sqf b/addons/interaction/functions/fnc_canInteractWithCivilian.sqf index add66740e5..7b98ba4972 100644 --- a/addons/interaction/functions/fnc_canInteractWithCivilian.sqf +++ b/addons/interaction/functions/fnc_canInteractWithCivilian.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Checks if the unit can interact with civilian @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target", ["_isCivilian", true]]; alive _target && [side _target != side _unit, side group _target == civilian] select _isCivilian // return diff --git a/addons/interaction/functions/fnc_canJoinGroup.sqf b/addons/interaction/functions/fnc_canJoinGroup.sqf index 6a3220181d..bc21e9d162 100644 --- a/addons/interaction/functions/fnc_canJoinGroup.sqf +++ b/addons/interaction/functions/fnc_canJoinGroup.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Checks if the unit can join a group @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/interaction/functions/fnc_canJoinTeam.sqf b/addons/interaction/functions/fnc_canJoinTeam.sqf index ee99723d77..424b3be982 100644 --- a/addons/interaction/functions/fnc_canJoinTeam.sqf +++ b/addons/interaction/functions/fnc_canJoinTeam.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Checks if the player can join a team @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/interaction/functions/fnc_canPardon.sqf b/addons/interaction/functions/fnc_canPardon.sqf index 892647640e..81319afb3b 100644 --- a/addons/interaction/functions/fnc_canPardon.sqf +++ b/addons/interaction/functions/fnc_canPardon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Checks if the unit can pardon the target. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/interaction/functions/fnc_canPassMagazine.sqf b/addons/interaction/functions/fnc_canPassMagazine.sqf index 66c560c271..f25e5da164 100644 --- a/addons/interaction/functions/fnc_canPassMagazine.sqf +++ b/addons/interaction/functions/fnc_canPassMagazine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if unit has a spare magazine for the specified weapon. @@ -15,8 +16,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_player", "_target", "_weapon"]; if (!GVAR(enableMagazinePassing)) exitWith {false}; diff --git a/addons/interaction/functions/fnc_canPullOutBody.sqf b/addons/interaction/functions/fnc_canPullOutBody.sqf index f0f8f32db9..bb61cb2545 100644 --- a/addons/interaction/functions/fnc_canPullOutBody.sqf +++ b/addons/interaction/functions/fnc_canPullOutBody.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * Checks if unit can pull target body out of vehicle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_body", "_unit"]; diff --git a/addons/interaction/functions/fnc_canPush.sqf b/addons/interaction/functions/fnc_canPush.sqf index 478c89ca45..0032296a50 100644 --- a/addons/interaction/functions/fnc_canPush.sqf +++ b/addons/interaction/functions/fnc_canPush.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Checks if the boat can be pushed. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/interaction/functions/fnc_canTapShoulder.sqf b/addons/interaction/functions/fnc_canTapShoulder.sqf index 514ac0301b..0c3551051d 100644 --- a/addons/interaction/functions/fnc_canTapShoulder.sqf +++ b/addons/interaction/functions/fnc_canTapShoulder.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Checks if the player can tap a shoulder. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; diff --git a/addons/interaction/functions/fnc_doBecomeLeader.sqf b/addons/interaction/functions/fnc_doBecomeLeader.sqf index cc96de5611..8bf1b23e30 100644 --- a/addons/interaction/functions/fnc_doBecomeLeader.sqf +++ b/addons/interaction/functions/fnc_doBecomeLeader.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Become Leader of group. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit"]; [QEGVAR(common,selectLeader), [group _unit, _unit], units group _unit] call CBA_fnc_targetEvent; diff --git a/addons/interaction/functions/fnc_getDoor.sqf b/addons/interaction/functions/fnc_getDoor.sqf index 8570d2a7c8..6503d1e9e9 100644 --- a/addons/interaction/functions/fnc_getDoor.sqf +++ b/addons/interaction/functions/fnc_getDoor.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, Phyma * Find door. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_distance"]; diff --git a/addons/interaction/functions/fnc_getDoorAnimations.sqf b/addons/interaction/functions/fnc_getDoorAnimations.sqf index 0d40d066be..003cce7664 100644 --- a/addons/interaction/functions/fnc_getDoorAnimations.sqf +++ b/addons/interaction/functions/fnc_getDoorAnimations.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, Phyma * Get door animations. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_house", "_door"]; diff --git a/addons/interaction/functions/fnc_getDown.sqf b/addons/interaction/functions/fnc_getDown.sqf index 125af18e09..4291a00f0d 100644 --- a/addons/interaction/functions/fnc_getDown.sqf +++ b/addons/interaction/functions/fnc_getDown.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, commy2 * Forces a civilian to the ground with a chance of failure. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" #define SEND_RADIUS 10 diff --git a/addons/interaction/functions/fnc_getGlassDoor.sqf b/addons/interaction/functions/fnc_getGlassDoor.sqf index 2731f82888..5febe67067 100644 --- a/addons/interaction/functions/fnc_getGlassDoor.sqf +++ b/addons/interaction/functions/fnc_getGlassDoor.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Phyma * Find glass door. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_distance", "_house", "_door"]; diff --git a/addons/interaction/functions/fnc_getInteractionDistance.sqf b/addons/interaction/functions/fnc_getInteractionDistance.sqf index c731c6e7d1..fa15577ed2 100644 --- a/addons/interaction/functions/fnc_getInteractionDistance.sqf +++ b/addons/interaction/functions/fnc_getInteractionDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Gets effective interaction distance (handles very large vehicles) @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target"]; TRACE_3("getInteractionDistance",_unit,_target,typeOf _target); diff --git a/addons/interaction/functions/fnc_getVehiclePos.sqf b/addons/interaction/functions/fnc_getVehiclePos.sqf index 6d32519bd5..2da5a31820 100644 --- a/addons/interaction/functions/fnc_getVehiclePos.sqf +++ b/addons/interaction/functions/fnc_getVehiclePos.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Return a suitable position for the action point for the given target vehicle @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // IGNORE_PRIVATE_WARNING(_target); private _bb = boundingBoxReal _target; diff --git a/addons/interaction/functions/fnc_getVehiclePosComplex.sqf b/addons/interaction/functions/fnc_getVehiclePosComplex.sqf index be22134ffa..186d424956 100644 --- a/addons/interaction/functions/fnc_getVehiclePosComplex.sqf +++ b/addons/interaction/functions/fnc_getVehiclePosComplex.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain, PabstMirror * Return a suitable position for the action point for the given target vehicle @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "_cameraPosASL"]; TRACE_2("params",_target,_cameraPosASL); diff --git a/addons/interaction/functions/fnc_getWeaponPos.sqf b/addons/interaction/functions/fnc_getWeaponPos.sqf index 8f2d63713a..9cd526c12c 100644 --- a/addons/interaction/functions/fnc_getWeaponPos.sqf +++ b/addons/interaction/functions/fnc_getWeaponPos.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Return a suitable position for the action point for the current weapon @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // IGNORE_PRIVATE_WARNING(_target); private _weaponDir = _target weaponDirection currentWeapon _target; diff --git a/addons/interaction/functions/fnc_handleScrollWheel.sqf b/addons/interaction/functions/fnc_handleScrollWheel.sqf index 48716a05c3..769995d0a6 100644 --- a/addons/interaction/functions/fnc_handleScrollWheel.sqf +++ b/addons/interaction/functions/fnc_handleScrollWheel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handles incremental door opening @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_scroll"]; diff --git a/addons/interaction/functions/fnc_hideMouseHint.sqf b/addons/interaction/functions/fnc_hideMouseHint.sqf index bb9fc9440a..8daa6d6e09 100644 --- a/addons/interaction/functions/fnc_hideMouseHint.sqf +++ b/addons/interaction/functions/fnc_hideMouseHint.sqf @@ -1,6 +1,7 @@ +#include "script_component.hpp" /* * Author: Garth de Wet (LH) - * Hides the interaction helper text with the mouse buttons at the bottom middle of the screen + * Hides the interaction hint for mouse buttons. * * Arguments: * None @@ -9,15 +10,12 @@ * None * * Example: - * call ace_interaction_fnc_hideMouseHint + * [] call ace_interaction_fnc_hideMouseHint * * Public: No */ -#include "script_component.hpp" -if (isNull (uiNamespace getVariable ["ACE_Helper_Display", objNull])) exitWith {}; - -(QGVAR(InteractionHelper) call BIS_fnc_rscLayer) cutText ["", "PLAIN"]; +(QGVAR(RscMouseHint) call BIS_fnc_rscLayer) cutFadeOut 0.2; // Re-enable action menu inGameUISetEventHandler ["PrevAction", "false"]; diff --git a/addons/interaction/functions/fnc_joinTeam.sqf b/addons/interaction/functions/fnc_joinTeam.sqf index 311c45b1a5..92e06b4217 100644 --- a/addons/interaction/functions/fnc_joinTeam.sqf +++ b/addons/interaction/functions/fnc_joinTeam.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Unit joins a fire team. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_team"]; diff --git a/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf b/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf index 3ac493aa54..480cdaea40 100644 --- a/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf +++ b/addons/interaction/functions/fnc_modifyJoinGroupAction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Modifies the ACE_JoinGroup action to show group name. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "_player", "", "_actionData"]; diff --git a/addons/interaction/functions/fnc_moduleInteraction.sqf b/addons/interaction/functions/fnc_moduleInteraction.sqf index e4f5418fda..7dd5baa464 100644 --- a/addons/interaction/functions/fnc_moduleInteraction.sqf +++ b/addons/interaction/functions/fnc_moduleInteraction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Initializes the Interaction module. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "", "_activated"]; diff --git a/addons/interaction/functions/fnc_openDoor.sqf b/addons/interaction/functions/fnc_openDoor.sqf index 2457bc1f39..d27ac52f44 100644 --- a/addons/interaction/functions/fnc_openDoor.sqf +++ b/addons/interaction/functions/fnc_openDoor.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Open door. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" private _info = [MACRO_DOOR_REACH_DISTANCE] call FUNC(getDoor); diff --git a/addons/interaction/functions/fnc_pardon.sqf b/addons/interaction/functions/fnc_pardon.sqf index 7b6085bcf4..4a64771e81 100644 --- a/addons/interaction/functions/fnc_pardon.sqf +++ b/addons/interaction/functions/fnc_pardon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Unit pardons target unit. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "_target"]; diff --git a/addons/interaction/functions/fnc_passMagazine.sqf b/addons/interaction/functions/fnc_passMagazine.sqf index 231d26b217..c52e40e88f 100644 --- a/addons/interaction/functions/fnc_passMagazine.sqf +++ b/addons/interaction/functions/fnc_passMagazine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Pass spare magazine for the specified weapon. @@ -15,8 +16,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_player", "_target", "_weapon"]; private _compatibleMags = getArray (configfile >> "CfgWeapons" >> _weapon >> "magazines"); diff --git a/addons/interaction/functions/fnc_pullOutBody.sqf b/addons/interaction/functions/fnc_pullOutBody.sqf index bab54a0805..6f754eae67 100644 --- a/addons/interaction/functions/fnc_pullOutBody.sqf +++ b/addons/interaction/functions/fnc_pullOutBody.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * Makes unit pull target body out of vehicle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_body", "_unit"]; diff --git a/addons/interaction/functions/fnc_push.sqf b/addons/interaction/functions/fnc_push.sqf index 97534e2c68..abed6be396 100644 --- a/addons/interaction/functions/fnc_push.sqf +++ b/addons/interaction/functions/fnc_push.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Pushes a boat away from the player @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_boat", "_unit"]; diff --git a/addons/interaction/functions/fnc_sendAway.sqf b/addons/interaction/functions/fnc_sendAway.sqf index 6bc70b7445..4831fb7e3f 100644 --- a/addons/interaction/functions/fnc_sendAway.sqf +++ b/addons/interaction/functions/fnc_sendAway.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, commy2 * Sends a near civilian crowd away with a chance of failure. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define SEND_DISTANCE 50 #define SEND_RADIUS 10 diff --git a/addons/interaction/functions/fnc_showMouseHint.sqf b/addons/interaction/functions/fnc_showMouseHint.sqf index 815aa09f41..b56d053eaa 100644 --- a/addons/interaction/functions/fnc_showMouseHint.sqf +++ b/addons/interaction/functions/fnc_showMouseHint.sqf @@ -1,12 +1,14 @@ +#include "script_component.hpp" /* - * Author: Garth de Wet (LH) - * Shows the interaction helper text with the mouse buttons at the bottom middle of the screen. + * Author: Garth de Wet (LH), mharis001 + * Shows an interaction hint for mouse buttons. + * Empty strings will hide their respective button. * * Arguments: - * 0: Left Click Text - * 1: Right Click Text - * 2: Scroll Text (default: "") - * 2: Extra Icon/Text pairs (default: []) + * 0: Left click text + * 1: Right click text + * 2: Scroll text (default: "") + * 2: Extra icon/text pairs (default: []) * * Return Value: * None @@ -16,65 +18,78 @@ * * Public: No */ -#include "script_component.hpp" -#define GUI_GRID_W (0.025) -#define GUI_GRID_H (0.04) +params ["_textLMB", "_textRMB", ["_textMMB", ""], ["_extraIconSets", []]]; -params ["_leftClick", "_rightClick", ["_scroll", ""], ["_extraIconSets", []]]; +(QGVAR(RscMouseHint) call BIS_fnc_rscLayer) cutRsc [QGVAR(RscMouseHint), "PLAIN", -1, false]; +private _display = uiNamespace getVariable [QGVAR(mouseHint), displayNull]; -(QGVAR(InteractionHelper) call BIS_fnc_rscLayer) cutRsc [QGVAR(InteractionHelper), "PLAIN", 0.5, false]; +// Set text for buttons, hide if empty string +{ + _x params ["_buttonText", "_iconIDC", "_textIDC"]; -disableSerialization; + if (_buttonText == "") then { + private _ctrlIcon = _display displayCtrl _iconIDC; + _ctrlIcon ctrlShow false; + } else { + private _ctrlText = _display displayCtrl _textIDC; + _ctrlText ctrlSetText _buttonText; + }; +} forEach [ + [_textLMB, IDC_MOUSEHINT_LMB, IDC_MOUSEHINT_LMB_TEXT], + [_textMMB, IDC_MOUSEHINT_MMB, IDC_MOUSEHINT_MMB_TEXT], + [_textRMB, IDC_MOUSEHINT_RMB, IDC_MOUSEHINT_RMB_TEXT] +]; -private _display = uiNamespace getVariable ["ACE_Helper_Display", objNull]; +// Y offset for extra icon sets +private _yOffset = 19.5; -if (isNull _display) exitWith {WARNING("Display was null");}; +if (_textMMB == "") then { + // Move RMB up if MMB inactive + { + private _ctrl = _display displayCtrl _x; + private _ctrlPos = ctrlPosition _ctrl; + _ctrlPos set [1, (_ctrlPos select 1) - 1.05 * GUI_GRID_H]; + _ctrl ctrlSetPosition _ctrlPos; + _ctrl ctrlCommit 0; + } forEach [IDC_MOUSEHINT_RMB, IDC_MOUSEHINT_RMB_TEXT]; -(_display displayCtrl 1000) ctrlSetText _leftClick; -(_display displayCtrl 1001) ctrlSetText _rightClick; - -(_display displayCtrl 1000) ctrlShow (_leftClick != ""); -(_display displayCtrl 1200) ctrlShow (_leftClick != ""); -(_display displayCtrl 1001) ctrlShow (_rightClick != ""); -(_display displayCtrl 1201) ctrlShow (_rightClick != ""); - -private _offset = 19; - -if (_scroll == "") then { - (_display displayCtrl 1002) ctrlShow false; - (_display displayCtrl 1202) ctrlShow false; - (_display displayCtrl 1001) ctrlSetPosition [21 * GUI_GRID_W, 18 * GUI_GRID_H, 24 * GUI_GRID_W, 1.5 * GUI_GRID_H]; - (_display displayCtrl 1201) ctrlSetPosition [20 * GUI_GRID_W, 18.5 * GUI_GRID_H, 1.5 * GUI_GRID_W, 1 * GUI_GRID_H]; - (_display displayCtrl 1001) ctrlCommit 0; - (_display displayCtrl 1201) ctrlCommit 0; } else { - _offset = _offset + 1; - (_display displayCtrl 1002) ctrlSetText _scroll; - // Disable action menu inGameUISetEventHandler ["PrevAction", "true"]; inGameUISetEventHandler ["NextAction", "true"]; inGameUISetEventHandler ["Action", "true"]; + + // Increase offset since MMB active + _yOffset = 20.55; }; +// Create extra icon sets { - _x params [["_xKeyName", "", [""]], ["_xText", "", [""]]]; - switch (toLower _xKeyName) do { - case ("alt"): {_xKeyName = format ["<%1>", toUpper localize "str_dik_alt"];}; - case ("control"); - case ("ctrl"): {_xKeyName = format ["<%1>", toUpper localize "str_dik_control"];}; - case ("shift"): {_xKeyName = format ["<%1>", toUpper localize "str_dik_shift"];}; + _x params [["_keyName", "", [""]], ["_keyText", "", [""]]]; + + // Only create extra key if both name and text are valid + if (_keyName != "" && {_keyText != ""}) then { + // Localize Ctrl, Shift, or Alt keys + switch (toLower _keyName) do { + case "ctrl"; + case "control": {_keyName = format ["<%1>", toUpper localize "STR_dik_control"]}; + case "shift": {_keyName = format ["<%1>", toUpper localize "STR_dik_shift"]}; + case "alt": {_keyName = format ["<%1>", toUpper localize "STR_dik_alt"]}; + }; + + // Create extra key group and update position + private _ctrlGroup = _display ctrlCreate [QGVAR(RscExtraKey), IDC_MOUSEHINT_EXTRA]; + _ctrlGroup ctrlSetPosition [0, _yOffset * GUI_GRID_H]; + _ctrlGroup ctrlCommit 0; + + // Set name and text + private _ctrlName = _ctrlGroup controlsGroupCtrl IDC_MOUSEHINT_EXTRA_NAME; + _ctrlName ctrlSetText _keyName; + + private _ctrlText = _ctrlGroup controlsGroupCtrl IDC_MOUSEHINT_EXTRA_TEXT; + _ctrlText ctrlSetText _keyText; + + _yOffset = _yOffset + 1; }; - - private _keyNameCtrl = _display ctrlCreate ["RscInteractionText_right", -1]; - private _textCtrl = _display ctrlCreate ["RscInteractionText", -1]; - _keyNameCtrl ctrlSetText _xKeyName; - _textCtrl ctrlSetText _xText; - _keyNameCtrl ctrlSetPosition [0 * GUI_GRID_W, _offset * GUI_GRID_H, 21.4 * GUI_GRID_W, 1.5 * GUI_GRID_H]; - _textCtrl ctrlSetPosition [21 * GUI_GRID_W, _offset * GUI_GRID_H, 24 * GUI_GRID_W, 1.5 * GUI_GRID_H]; - _keyNameCtrl ctrlCommit 0; - _textCtrl ctrlCommit 0; - _offset = _offset + 1; } forEach _extraIconSets; - diff --git a/addons/interaction/functions/fnc_switchLamp.sqf b/addons/interaction/functions/fnc_switchLamp.sqf deleted file mode 100644 index f1d9509de8..0000000000 --- a/addons/interaction/functions/fnc_switchLamp.sqf +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Author: SzwedzikPL - * Turn on/off lamp - * - * Arguments: - * 0: Lamp - * - * Return Value: - * None - * - * Example: - * lamp call ace_interaction_fnc_switchLamp - * - * Public: No - */ -#include "script_component.hpp" - -#define DISABLED_LAMP_DMG 0.95 - -params ["_lamp"]; - -_isOn = _lamp getVariable ["ACE_lampOn", true]; -private _reflectors = "true" configClasses (configfile >> "CfgVehicles" >> (typeof _lamp) >> "Reflectors"); -private _hitPointsDamage = []; -{ - private _hitPoint = getText (_x >> "hitpoint"); - _hitPointsDamage pushback [_hitPoint, _lamp getHit _hitPoint]; - nil -} count _reflectors; - -//if lamp is on turn it off -private _eventName = [QGVAR(setLampOn), QGVAR(setLampOff)] select _isOn; -[_eventName, [_lamp, _hitPointsDamage, DISABLED_LAMP_DMG], [_lamp]] call CBA_fnc_targetEvent; - -_lamp setVariable ["ACE_lampOn", !_isOn, true]; diff --git a/addons/interaction/functions/fnc_tapShoulder.sqf b/addons/interaction/functions/fnc_tapShoulder.sqf index 483498329d..c55f3b65d4 100644 --- a/addons/interaction/functions/fnc_tapShoulder.sqf +++ b/addons/interaction/functions/fnc_tapShoulder.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Taps a shoulder @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target", "_shoulderNum"]; diff --git a/addons/interaction/script_component.hpp b/addons/interaction/script_component.hpp index bd5484992f..8114dc37a2 100644 --- a/addons/interaction/script_component.hpp +++ b/addons/interaction/script_component.hpp @@ -16,4 +16,20 @@ #include "\z\ace\addons\main\script_macros.hpp" +#include "\a3\ui_f\hpp\defineCommonGrids.inc" + +#define IDD_MOUSEHINT 2400 +#define IDC_MOUSEHINT_LMB 2410 +#define IDC_MOUSEHINT_LMB_TEXT 2420 +#define IDC_MOUSEHINT_MMB 2430 +#define IDC_MOUSEHINT_MMB_TEXT 2450 +#define IDC_MOUSEHINT_RMB 2460 +#define IDC_MOUSEHINT_RMB_TEXT 2470 + +#define IDC_MOUSEHINT_EXTRA 2500 +#define IDC_MOUSEHINT_EXTRA_NAME 2510 +#define IDC_MOUSEHINT_EXTRA_TEXT 2520 + #define MACRO_DOOR_REACH_DISTANCE (AGLToASL positionCameraToWorld [0,0,0] vectorDistance AGLToASL (ACE_player modelToWorld (ACE_player selectionPosition "Head"))) + 2 + +#define DISABLED_LAMP_DAMAGE 0.95 diff --git a/addons/interaction/stringtable.xml b/addons/interaction/stringtable.xml index 53cd04e133..12af6f0408 100644 --- a/addons/interaction/stringtable.xml +++ b/addons/interaction/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -1091,5 +1091,14 @@ 拿出屍體 拿出尸体 + + Smash windshield + Frontscheibe einschlagen + Dégager le pare-brise + Vyrazit čelní sklo + Выбить лобовое стекло + Wyłam szybę + Szélvédő széttörése + diff --git a/addons/inventory/functions/fnc_addCustomFilter.sqf b/addons/inventory/functions/fnc_addCustomFilter.sqf index 0dd80c2e74..6d7ab4796f 100644 --- a/addons/inventory/functions/fnc_addCustomFilter.sqf +++ b/addons/inventory/functions/fnc_addCustomFilter.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Adds a custom filter list to the inventory display. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_filterName", "ERROR: No Name", [""]], ["_fncName", "", [""]]]; diff --git a/addons/inventory/functions/fnc_currentItemListBox.sqf b/addons/inventory/functions/fnc_currentItemListBox.sqf index 670efeb044..3a0889865c 100644 --- a/addons/inventory/functions/fnc_currentItemListBox.sqf +++ b/addons/inventory/functions/fnc_currentItemListBox.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns the current item list box of given inventory display. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_display"]; diff --git a/addons/inventory/functions/fnc_filterBackpacks.sqf b/addons/inventory/functions/fnc_filterBackpacks.sqf index 082dbd6501..66f33ec105 100644 --- a/addons/inventory/functions/fnc_filterBackpacks.sqf +++ b/addons/inventory/functions/fnc_filterBackpacks.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Filter condition for the Backpacks filter list @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_config"]; diff --git a/addons/inventory/functions/fnc_filterGrenades.sqf b/addons/inventory/functions/fnc_filterGrenades.sqf index 6a869849fc..777f8c01cb 100644 --- a/addons/inventory/functions/fnc_filterGrenades.sqf +++ b/addons/inventory/functions/fnc_filterGrenades.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Filter condition for the Grenades filter list @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_config"]; diff --git a/addons/inventory/functions/fnc_filterHeadgear.sqf b/addons/inventory/functions/fnc_filterHeadgear.sqf index ac787fc35a..e75898849e 100644 --- a/addons/inventory/functions/fnc_filterHeadgear.sqf +++ b/addons/inventory/functions/fnc_filterHeadgear.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Filter condition for the Headgear filter list @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_config"]; diff --git a/addons/inventory/functions/fnc_filterItems.sqf b/addons/inventory/functions/fnc_filterItems.sqf index 1aaba46497..78343127af 100644 --- a/addons/inventory/functions/fnc_filterItems.sqf +++ b/addons/inventory/functions/fnc_filterItems.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Remove uniforms, vests and backpacks from Items filter. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_config"]; diff --git a/addons/inventory/functions/fnc_filterMagazines.sqf b/addons/inventory/functions/fnc_filterMagazines.sqf index e0d67e3c7e..0e23872d73 100644 --- a/addons/inventory/functions/fnc_filterMagazines.sqf +++ b/addons/inventory/functions/fnc_filterMagazines.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Remove backpacks and grenades from Magazines filter. @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" !(_this call FUNC(filterBackpacks)) && {!(_this call FUNC(filterGrenades))} diff --git a/addons/inventory/functions/fnc_filterMedical.sqf b/addons/inventory/functions/fnc_filterMedical.sqf index 567aa528a3..6e04ddc3de 100644 --- a/addons/inventory/functions/fnc_filterMedical.sqf +++ b/addons/inventory/functions/fnc_filterMedical.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Filter condition for the Medical filter list @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_config"]; diff --git a/addons/inventory/functions/fnc_filterUniforms.sqf b/addons/inventory/functions/fnc_filterUniforms.sqf index 74773c3ad0..39529121a5 100644 --- a/addons/inventory/functions/fnc_filterUniforms.sqf +++ b/addons/inventory/functions/fnc_filterUniforms.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Filter condition for the Uniforms filter list @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_config"]; diff --git a/addons/inventory/functions/fnc_filterVests.sqf b/addons/inventory/functions/fnc_filterVests.sqf index a0ce281bda..99115ac84f 100644 --- a/addons/inventory/functions/fnc_filterVests.sqf +++ b/addons/inventory/functions/fnc_filterVests.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Filter condition for the Vests filter list @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_config"]; diff --git a/addons/inventory/functions/fnc_filterWeapons.sqf b/addons/inventory/functions/fnc_filterWeapons.sqf index 65b3d7cdea..60065069bb 100644 --- a/addons/inventory/functions/fnc_filterWeapons.sqf +++ b/addons/inventory/functions/fnc_filterWeapons.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Remove backpacks from Weapons filter. @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" !(_this call FUNC(filterBackpacks)) diff --git a/addons/inventory/functions/fnc_forceItemListUpdate.sqf b/addons/inventory/functions/fnc_forceItemListUpdate.sqf index 03bf667504..e162aeee6c 100644 --- a/addons/inventory/functions/fnc_forceItemListUpdate.sqf +++ b/addons/inventory/functions/fnc_forceItemListUpdate.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Updates item list and removes every entry that does not fit in the currently selected filter list. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; params ["_display"]; diff --git a/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf b/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf index 09d2b6fb9b..8657d212cd 100644 --- a/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf +++ b/addons/inventory/functions/fnc_inventoryDisplayLoad.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Executed every time an inventory display is opened. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; params ["_display"]; diff --git a/addons/inventory/functions/fnc_onLBSelChanged.sqf b/addons/inventory/functions/fnc_onLBSelChanged.sqf index 86ecfa0087..7f20e48fdf 100644 --- a/addons/inventory/functions/fnc_onLBSelChanged.sqf +++ b/addons/inventory/functions/fnc_onLBSelChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Executed when the filter list box is changed. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; params ["_filter", "_index"]; diff --git a/addons/inventory/stringtable.xml b/addons/inventory/stringtable.xml index 713c8b082b..ca09417810 100644 --- a/addons/inventory/stringtable.xml +++ b/addons/inventory/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -26,7 +26,7 @@ Ekwipunek skalowany jest poprzez rozmiar UI. Ta opcja pozwala powiększyć rozmiar UI ekwipunku, lecz nie zwiększa rozmiaru fontu pozwalając na wyświetlanie większej ilości wierszy. L'inventaire est normalement affiché en fonction de la taille de l'UI. Cette option permet d'agrandir l'affichage de l'inventaire, mais n'a aucun effet sur la taille des polices permettant d'afficher plus de lignes. Alaphelyzetben a kezelőfelület mérete skálázza a felszerelési menüt. Ez az opció engedélyezi a menü felskálázását, de megtartja a betűméreteket, így növelve a láthatóságot. - Normalmente il menù inventario è scalato in base alle dimensioni interfaccia. Questa opzione di permette di ingrandirlo ulteriormente ma senza aumentare la dimensione del testo. + Normalmente il menù inventario è scalato in base alle dimensioni dell'interfaccia. Questa opzione permette di ingrandirlo ulteriormente ma senza aumentare la dimensione del testo. Normalmente o tamanho da tela do inventário é ditada pelo tamanho da UI. Isso permite aumentar o tamanho da tela de inventário, mas não aumenta o tamanho da fonte, permitindo que mais linhas sejam visualizadas. 通常、インベントリは UI の大きさにより調整して表示されます。これはインベントリ UI を大きくできますが、文字は大きくできません。 보통 소지품 화면은 사용자 인터페이스 크기에 비례합니다. 이 항목은 소지품의 사용자 인터페이스를 확대를 가능케하면서 글씨는 그대로 냅두게 해줍니다. @@ -98,7 +98,7 @@ Westen Vesty Kamizelki - Vests + Giubbotti Chalecos Vestes Coletes diff --git a/addons/javelin/functions/fnc_getTarget.sqf b/addons/javelin/functions/fnc_getTarget.sqf index 49748e2883..7230aae64a 100644 --- a/addons/javelin/functions/fnc_getTarget.sqf +++ b/addons/javelin/functions/fnc_getTarget.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Find a target within the optic range @@ -14,8 +15,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_lastTarget", "_maxRange"]; diff --git a/addons/javelin/functions/fnc_mapHelperDraw.sqf b/addons/javelin/functions/fnc_mapHelperDraw.sqf index 20ec3ab349..1b81fc7dd5 100644 --- a/addons/javelin/functions/fnc_mapHelperDraw.sqf +++ b/addons/javelin/functions/fnc_mapHelperDraw.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles the map helper's draw event @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" if (isNil QGVAR(arguments)) then { TRACE_1("Starting optic draw", _this); diff --git a/addons/javelin/functions/fnc_onOpticDraw.sqf b/addons/javelin/functions/fnc_onOpticDraw.sqf index 8a473669f9..ab47556d4c 100644 --- a/addons/javelin/functions/fnc_onOpticDraw.sqf +++ b/addons/javelin/functions/fnc_onOpticDraw.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus, PabstMirror * Main loop, handles scaning for targets and drawing the javelin optic @@ -17,8 +18,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" // TRACE_1("onOpticDraw",diag_frameno); diff --git a/addons/javelin/functions/fnc_showFireMode.sqf b/addons/javelin/functions/fnc_showFireMode.sqf index 525289d031..e7a8f80ade 100644 --- a/addons/javelin/functions/fnc_showFireMode.sqf +++ b/addons/javelin/functions/fnc_showFireMode.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Updates fire mode on javelin display (top/dir) @@ -13,8 +14,6 @@ * * Public: No */ -//#define DEBUG_MODE_FULL -#include "script_component.hpp" private _currentShooter = if (ACE_player call CBA_fnc_canUseWeapon) then {ACE_player} else {vehicle ACE_player}; private _currentFireMode = _currentShooter getVariable ["ace_missileguidance_attackProfile", "JAV_TOP"]; diff --git a/addons/kestrel4500/functions/fnc_buttonPressed.sqf b/addons/kestrel4500/functions/fnc_buttonPressed.sqf index 788b7d72e0..2edd9d17b8 100644 --- a/addons/kestrel4500/functions/fnc_buttonPressed.sqf +++ b/addons/kestrel4500/functions/fnc_buttonPressed.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Handles the Kestrel 4500 dialog button actions @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" switch (_this) do { case 0: { // Enter diff --git a/addons/kestrel4500/functions/fnc_canShow.sqf b/addons/kestrel4500/functions/fnc_canShow.sqf index f563138f5c..d577cfd4d1 100644 --- a/addons/kestrel4500/functions/fnc_canShow.sqf +++ b/addons/kestrel4500/functions/fnc_canShow.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Authors: Ruthberg * Tests if the Kestrel 4500 can be shown @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" ("ACE_Kestrel4500" in (uniformItems ACE_player)) || ("ACE_Kestrel4500" in (vestItems ACE_player)) diff --git a/addons/kestrel4500/functions/fnc_collectData.sqf b/addons/kestrel4500/functions/fnc_collectData.sqf index 703c07797e..a05aac2667 100644 --- a/addons/kestrel4500/functions/fnc_collectData.sqf +++ b/addons/kestrel4500/functions/fnc_collectData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Gathers the weather data for the Kestrel 4500 @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _playerDir = getDir ACE_player; private _playerAltitude = (getPosASL ACE_player) select 2; diff --git a/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf b/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf index a11982968c..445c6cc789 100644 --- a/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf +++ b/addons/kestrel4500/functions/fnc_createKestrelDialog.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Opens the Kestrel 4500 dialog @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (GVAR(Kestrel4500)) exitWith { false }; if (underwater ACE_player) exitWith { false }; diff --git a/addons/kestrel4500/functions/fnc_dayOfWeek.sqf b/addons/kestrel4500/functions/fnc_dayOfWeek.sqf index 356b10da63..932f0a72aa 100644 --- a/addons/kestrel4500/functions/fnc_dayOfWeek.sqf +++ b/addons/kestrel4500/functions/fnc_dayOfWeek.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculate Current Day in the Week @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_year", "_month", "_day"]; private _table = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]; diff --git a/addons/kestrel4500/functions/fnc_displayKestrel.sqf b/addons/kestrel4500/functions/fnc_displayKestrel.sqf index 0cf3234d1e..c93de715ed 100644 --- a/addons/kestrel4500/functions/fnc_displayKestrel.sqf +++ b/addons/kestrel4500/functions/fnc_displayKestrel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows the Kestrel 4500 as rsc title @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define __dsp (uiNamespace getVariable "RscKestrel4500") #define __ctrlKestrel4500 (__dsp displayCtrl 75000) diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index 240862b4f2..9a9d0551fe 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Generates the Kestrel 4500 output text. @@ -29,7 +30,6 @@ * * Public: No */ -#include "script_component.hpp" if (diag_tickTime - GVAR(headingSetDisplayTimer) < 0.8) exitWith {["", "", " Heading Set", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]}; diff --git a/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf b/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf index c023d8ec8d..5dcbf681d2 100644 --- a/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf +++ b/addons/kestrel4500/functions/fnc_measureWindSpeed.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Measures the wind speed, stores the information in GVAR(MeasuredWindSpeed) and updates GVAR(ImpellerState) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _playerDir = getDir ACE_player; private _windSpeed = vectorMagnitude wind; diff --git a/addons/kestrel4500/functions/fnc_onCloseDialog.sqf b/addons/kestrel4500/functions/fnc_onCloseDialog.sqf index f8531f0e39..8b8a88f46b 100644 --- a/addons/kestrel4500/functions/fnc_onCloseDialog.sqf +++ b/addons/kestrel4500/functions/fnc_onCloseDialog.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Called if Kestrel Dialog is closed @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" uiNamespace setVariable ['Kestrel4500_Display', nil]; GVAR(Kestrel4500) = false; diff --git a/addons/kestrel4500/functions/fnc_onCloseDisplay.sqf b/addons/kestrel4500/functions/fnc_onCloseDisplay.sqf index 549c22e275..09e5941a77 100644 --- a/addons/kestrel4500/functions/fnc_onCloseDisplay.sqf +++ b/addons/kestrel4500/functions/fnc_onCloseDisplay.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Called if Kestrel Display is closed @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" uiNamespace setVariable ['RscKestrel4500', nil]; GVAR(Overlay) = false; diff --git a/addons/kestrel4500/functions/fnc_restoreUserData.sqf b/addons/kestrel4500/functions/fnc_restoreUserData.sqf index c1d9c0ebb3..ca90f8bbcc 100644 --- a/addons/kestrel4500/functions/fnc_restoreUserData.sqf +++ b/addons/kestrel4500/functions/fnc_restoreUserData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Reads user data from profileNamespace @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(Menu) = 0 max (profileNamespace getVariable ["ACE_Kestrel4500_menu", 0]) min ((count GVAR(Menus)) - 1); GVAR(RefHeading) = 0 max (profileNamespace getVariable ["ACE_Kestrel4500_RefHeading", 0]) min 359; diff --git a/addons/kestrel4500/functions/fnc_storeUserData.sqf b/addons/kestrel4500/functions/fnc_storeUserData.sqf index 80fa219a3c..71338984ff 100644 --- a/addons/kestrel4500/functions/fnc_storeUserData.sqf +++ b/addons/kestrel4500/functions/fnc_storeUserData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Saves user data into profileNamespace @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" profileNamespace setVariable ["ACE_Kestrel4500_menu", GVAR(menu)]; profileNamespace setVariable ["ACE_Kestrel4500_RefHeading", GVAR(RefHeading)]; diff --git a/addons/kestrel4500/functions/fnc_updateDisplay.sqf b/addons/kestrel4500/functions/fnc_updateDisplay.sqf index a307e9fcd1..94255115db 100644 --- a/addons/kestrel4500/functions/fnc_updateDisplay.sqf +++ b/addons/kestrel4500/functions/fnc_updateDisplay.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the Kestrel 4500 dialog text boxes. @@ -12,7 +13,6 @@ * * Public: No */ -#include "script_component.hpp" #define __dsp (uiNamespace getVariable "Kestrel4500_Display") #define __ctrlCenterLine3 (__dsp displayCtrl 74602) diff --git a/addons/kestrel4500/functions/fnc_updateImpellerState.sqf b/addons/kestrel4500/functions/fnc_updateImpellerState.sqf index a746a98835..5692f0d276 100644 --- a/addons/kestrel4500/functions/fnc_updateImpellerState.sqf +++ b/addons/kestrel4500/functions/fnc_updateImpellerState.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Updates the Kestrel 4500 Impeller state @@ -12,7 +13,6 @@ * * Public: No */ -#include "script_component.hpp" private _windSpeed = call FUNC(measureWindSpeed); diff --git a/addons/kestrel4500/functions/fnc_updateMemory.sqf b/addons/kestrel4500/functions/fnc_updateMemory.sqf index c393aee14f..2eff1c5a9a 100644 --- a/addons/kestrel4500/functions/fnc_updateMemory.sqf +++ b/addons/kestrel4500/functions/fnc_updateMemory.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Update Memory of Kestrel @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_slot", "_value"]; GVAR(MIN) set [_slot, (GVAR(MIN) select _slot) min _value]; GVAR(MAX) set [_slot, _value max (GVAR(MAX) select _slot)]; diff --git a/addons/laser/functions/fnc_addLaserTarget.sqf b/addons/laser/functions/fnc_addLaserTarget.sqf index 9addb8ed93..48a98353e9 100644 --- a/addons/laser/functions/fnc_addLaserTarget.sqf +++ b/addons/laser/functions/fnc_addLaserTarget.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Adds a vanilla laser target to the tracker PFH and globaly turns it on @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_targetObject", "_vehicle"]; TRACE_2("params",_targetObject,_vehicle); diff --git a/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf b/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf index 42931db29d..4613f510ef 100644 --- a/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf +++ b/addons/laser/functions/fnc_dev_drawVisibleLaserTargets.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" + /* * Author: ACE-Team * @@ -23,8 +25,6 @@ // Green - Rays // Blue - Seeker Locks -#include "script_component.hpp" - // Try searching for lasers from a given vehicle position [BLUE]: private _seekerVehicle = vehicle ace_player; private _testSeekerPosASL = AGLtoASL (_seekerVehicle modelToWorldVisual [0,0,1]); diff --git a/addons/laser/functions/fnc_findLaserSource.sqf b/addons/laser/functions/fnc_findLaserSource.sqf index 585faf3023..dcb137fb69 100644 --- a/addons/laser/functions/fnc_findLaserSource.sqf +++ b/addons/laser/functions/fnc_findLaserSource.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Handler function for finding position and direction of a vanilla laser. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "", "", "", "", "", "_methodArgs"]; _methodArgs params ["_ownerSelection"]; diff --git a/addons/laser/functions/fnc_handleLaserTargetCreation.sqf b/addons/laser/functions/fnc_handleLaserTargetCreation.sqf index c4ac9d3967..c619024ed4 100644 --- a/addons/laser/functions/fnc_handleLaserTargetCreation.sqf +++ b/addons/laser/functions/fnc_handleLaserTargetCreation.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Associates a newly created laser target to it's owner @@ -13,8 +14,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" TRACE_1("params",_this); [{ diff --git a/addons/laser/functions/fnc_keyLaserCodeChange.sqf b/addons/laser/functions/fnc_keyLaserCodeChange.sqf index 14c6ab70b6..32d9151083 100644 --- a/addons/laser/functions/fnc_keyLaserCodeChange.sqf +++ b/addons/laser/functions/fnc_keyLaserCodeChange.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Change the laser key code (both seeker and transmitter) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_codeChange", 0, [0]]]; diff --git a/addons/laser/functions/fnc_laserOff.sqf b/addons/laser/functions/fnc_laserOff.sqf index 64188a62f1..bb207f2781 100644 --- a/addons/laser/functions/fnc_laserOff.sqf +++ b/addons/laser/functions/fnc_laserOff.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nou * Turn a laser designator off. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_uuid"]; diff --git a/addons/laser/functions/fnc_laserOn.sqf b/addons/laser/functions/fnc_laserOn.sqf index baa7e9c1c3..4038e065ef 100644 --- a/addons/laser/functions/fnc_laserOn.sqf +++ b/addons/laser/functions/fnc_laserOn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nou * Turn a laser designator on. @@ -21,8 +22,6 @@ * Public: No */ -#include "script_component.hpp" - // params [["_emitter", objNull, [objNull]],["_owner", objNull, [objNull]],["_method", "", ["", {}, []]],["_wavelength", 0, [0]],["_code", 0, [0]],["_beamSpread", 0, [0]],"_methodArgs"]; private _uuid = format["%1%2%3", floor diag_tickTime, floor random 1000, floor random 10000]; diff --git a/addons/laser/functions/fnc_laserTargetPFH.sqf b/addons/laser/functions/fnc_laserTargetPFH.sqf index 8ee3396d94..c833aa5254 100644 --- a/addons/laser/functions/fnc_laserTargetPFH.sqf +++ b/addons/laser/functions/fnc_laserTargetPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Maintains the tracked lasers, deleting any laser that is turned off @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "_pfhuid"]; diff --git a/addons/laser/functions/fnc_onLaserDesignatorDraw.sqf b/addons/laser/functions/fnc_onLaserDesignatorDraw.sqf index 1b5a3e36ca..e7a4994ce2 100644 --- a/addons/laser/functions/fnc_onLaserDesignatorDraw.sqf +++ b/addons/laser/functions/fnc_onLaserDesignatorDraw.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nou * Update distance when rangefinder laser is on @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _laserCode = ACE_player getVariable[QGVAR(code), ACE_DEFAULT_LASER_CODE]; if (!isNil "_laserCode") then { diff --git a/addons/laser/functions/fnc_rotateVectLine.sqf b/addons/laser/functions/fnc_rotateVectLine.sqf index 17b771debe..990234c62c 100644 --- a/addons/laser/functions/fnc_rotateVectLine.sqf +++ b/addons/laser/functions/fnc_rotateVectLine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_map", "_theta"]; _map params ["_p", "_p1", "_p2", "_q1", "_q2", "_u", "_d"]; _q1 = +_q1; diff --git a/addons/laser/functions/fnc_rotateVectLineGetMap.sqf b/addons/laser/functions/fnc_rotateVectLineGetMap.sqf index 8d7f0a7f2e..f87aa21376 100644 --- a/addons/laser/functions/fnc_rotateVectLineGetMap.sqf +++ b/addons/laser/functions/fnc_rotateVectLineGetMap.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_p", "_p1", "_p2"]; private _q2 = []; diff --git a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf index 200e00acae..7fa64665ab 100644 --- a/addons/laser/functions/fnc_seekerFindLaserSpot.sqf +++ b/addons/laser/functions/fnc_seekerFindLaserSpot.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nou * Searches for a laser spot given a seekers params. @@ -20,8 +21,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" BEGIN_COUNTER(seekerFindLaserSpot); diff --git a/addons/laser/functions/fnc_shootCone.sqf b/addons/laser/functions/fnc_shootCone.sqf index 9cde6f2139..b9d64a42fa 100644 --- a/addons/laser/functions/fnc_shootCone.sqf +++ b/addons/laser/functions/fnc_shootCone.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nou * Shoots multiple rays in a dispersion pattern. @@ -17,8 +18,6 @@ * * Public: No */ -//#define DEBUG_MODE_FULL -#include "script_component.hpp" BEGIN_COUNTER(shootCone); diff --git a/addons/laser/functions/fnc_shootRay.sqf b/addons/laser/functions/fnc_shootRay.sqf index 12a3cf64bf..ecd16fc0d4 100644 --- a/addons/laser/functions/fnc_shootRay.sqf +++ b/addons/laser/functions/fnc_shootRay.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nou, PabstMirror * Shoots a ray from a source to a direction and finds first intersction and distance. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" BEGIN_COUNTER(shootRay); diff --git a/addons/laser/functions/fnc_showVehicleHud.sqf b/addons/laser/functions/fnc_showVehicleHud.sqf index b4a5bcb519..3b9f0adc2f 100644 --- a/addons/laser/functions/fnc_showVehicleHud.sqf +++ b/addons/laser/functions/fnc_showVehicleHud.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Shows the laser hud when vehicle is equiped with the weapon. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player"]; TRACE_1("showHud",_player); diff --git a/addons/laser/stringtable.xml b/addons/laser/stringtable.xml index aa09f5de0e..9d28f10f9e 100644 --- a/addons/laser/stringtable.xml +++ b/addons/laser/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -8,7 +8,7 @@ 레이저 분산 시뮬레이션 수 Wskaźnik poziomu rozproszenia wiązki lasera Compte de la simulation de la dispersion du laser - Contatore Simulazione Dispersione Laser + Contatore di Simulazione della Dispersione del Laser 雷射散射模拟计算 雷射散射模擬計算 @@ -38,7 +38,7 @@ Lézer - kódciklus növelése Láser - Aumentar código Laser - Kód + - Codice laser + + Laser - Cambia codice + レーザ - コードの数値を増やす 레이저 - 코드 순환 위 雷射 - 循环切换雷射码 上 @@ -54,7 +54,7 @@ Lézer - kódciklus csökkentése Láser - Reducir código Laser - Kód - - Codice laser - + Laser - Cambia codice - レーザ - コードの数値を減らす 레이저 - 코드 순환 아래 雷射 - 循环切换雷射码 下 diff --git a/addons/laserpointer/CfgWeapons.hpp b/addons/laserpointer/CfgWeapons.hpp index c86887e1c3..6afa29a344 100644 --- a/addons/laserpointer/CfgWeapons.hpp +++ b/addons/laserpointer/CfgWeapons.hpp @@ -36,7 +36,11 @@ class CfgWeapons { class ItemInfo: InventoryFlashLightItem_Base_F { mass = 6; - class Pointer {}; + class Pointer { + irLaserPos = "laser pos"; + irLaserEnd = "laser dir"; + irDistance = 5; + }; class FlashLight { color[] = {0,0,0}; diff --git a/addons/laserpointer/functions/fnc_drawLaserpoint.sqf b/addons/laserpointer/functions/fnc_drawLaserpoint.sqf index f5320d2c63..ab7724fda5 100644 --- a/addons/laserpointer/functions/fnc_drawLaserpoint.sqf +++ b/addons/laserpointer/functions/fnc_drawLaserpoint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 and esteldunedain * Draw a Laser Point @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "_range", "_isGreen", "_brightness"]; diff --git a/addons/laserpointer/functions/fnc_getNearUnits.sqf b/addons/laserpointer/functions/fnc_getNearUnits.sqf index baeb07c86e..38b1a32ed9 100644 --- a/addons/laserpointer/functions/fnc_getNearUnits.sqf +++ b/addons/laserpointer/functions/fnc_getNearUnits.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Reports near units. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _camPosAGL = positionCameraToWorld [0, 0, 0]; diff --git a/addons/laserpointer/functions/fnc_onDraw.sqf b/addons/laserpointer/functions/fnc_onDraw.sqf index 4c614064e7..bfee8a7ea6 100644 --- a/addons/laserpointer/functions/fnc_onDraw.sqf +++ b/addons/laserpointer/functions/fnc_onDraw.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Draw the visible laser beams of all cached units. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (count GVAR(redLaserUnits) + count GVAR(greenLaserUnits) > 0 && {!GVAR(isTI)}) then { private _brightness = 2 - call EFUNC(common,ambientBrightness); diff --git a/addons/logistics_uavbattery/CfgVehicles.hpp b/addons/logistics_uavbattery/CfgVehicles.hpp index f36736fac9..6af24e7474 100644 --- a/addons/logistics_uavbattery/CfgVehicles.hpp +++ b/addons/logistics_uavbattery/CfgVehicles.hpp @@ -11,6 +11,7 @@ class CfgVehicles { }; }; class UAV_01_base_F: Helicopter_Base_F { + fuelCapacity = 19; // Around 30 minutes hovering class ACE_Actions: ACE_Actions{ class ACE_MainActions: ACE_MainActions { class GVAR(RefuelUAV) { @@ -23,6 +24,7 @@ class CfgVehicles { }; }; class UAV_06_base_F: Helicopter_Base_F { + fuelCapacity = 16; // Around 25 minutes hovering class ACE_Actions: ACE_Actions{ class ACE_MainActions: ACE_MainActions { class GVAR(RefuelUAV) { diff --git a/addons/logistics_uavbattery/functions/fnc_canRefuelUAV.sqf b/addons/logistics_uavbattery/functions/fnc_canRefuelUAV.sqf index 451753a9e2..d4e62afa15 100644 --- a/addons/logistics_uavbattery/functions/fnc_canRefuelUAV.sqf +++ b/addons/logistics_uavbattery/functions/fnc_canRefuelUAV.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: marc_book * Tests if unit can refuel the target UAV @@ -14,8 +15,7 @@ * * Public: No */ -#include "script_component.hpp" params ["_caller", "_target"]; -("ACE_UAVBattery" in (items _caller)) && {(fuel _target) < 1} && {(speed _target) < 1} && {!(isEngineOn _target)} && {(_target distance _caller) <= 4} +("ACE_UAVBattery" in (_caller call EFUNC(common,uniqueItems))) && {(fuel _target) < 1} && {(speed _target) < 1} && {!(isEngineOn _target)} && {(_target distance _caller) <= 4} diff --git a/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf b/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf index 2e83043d00..c29be7636a 100644 --- a/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf +++ b/addons/logistics_uavbattery/functions/fnc_refuelUAV.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: marc_book * Starts refueling/recharging the 'Dartar' UAVs @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_caller", "_target"]; if (!(_this call FUNC(canRefuelUAV))) exitWith {}; diff --git a/addons/logistics_uavbattery/stringtable.xml b/addons/logistics_uavbattery/stringtable.xml index bd3ea82684..412e000d9b 100644 --- a/addons/logistics_uavbattery/stringtable.xml +++ b/addons/logistics_uavbattery/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf index 3f31a7e841..79da93cf79 100644 --- a/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_cutDownFence.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: gpgpgpgp, commy2, PabstMirror, mharis001 * Starts cutting down a fence. Triggers global "ace_wireCuttingStarted" event. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_fence"]; TRACE_2("Fence cutting started",_unit,_fence); diff --git a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf index 9e64f9edb4..87b2a84016 100644 --- a/addons/logistics_wirecutter/functions/fnc_interactEH.sqf +++ b/addons/logistics_wirecutter/functions/fnc_interactEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror, mharis001 * Dynamically adds "Cut Fence" actions to nearby fences when interact_menu is opened. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_interactionType"]; diff --git a/addons/logistics_wirecutter/functions/fnc_isFence.sqf b/addons/logistics_wirecutter/functions/fnc_isFence.sqf index ab06fcd934..38610f30fb 100644 --- a/addons/logistics_wirecutter/functions/fnc_isFence.sqf +++ b/addons/logistics_wirecutter/functions/fnc_isFence.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Checks if object is a fence. Should work on any fence type, even when (typeOf == ""). @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object"]; TRACE_1("Checking if fence",_object); diff --git a/addons/logistics_wirecutter/script_component.hpp b/addons/logistics_wirecutter/script_component.hpp index f971acd88f..53efa5908d 100644 --- a/addons/logistics_wirecutter/script_component.hpp +++ b/addons/logistics_wirecutter/script_component.hpp @@ -50,7 +50,10 @@ "wall_fen1_5.p3d",\ "plot_provizorni.p3d",\ "plp_ctm_partitioningfencegrey.p3d",\ - "fence.p3d"\ + "fence.p3d",\ + "fort_razorwire.p3d",\ + "barbedwire.pd3",\ + "plot_green_draty.p3d"\ ] #define SOUND_CLIP_TIME_SPACING 1.5 @@ -58,7 +61,7 @@ #define CUT_TIME_ENGINEER 7.5 #define HAS_WIRECUTTER(unit) (\ - "ACE_wirecutter" in ([ARR_6(unit, false, true, true, true, false)] call CBA_fnc_uniqueUnitItems) \ + "ACE_wirecutter" in (unit call EFUNC(common,uniqueItems)) \ || {1 == getNumber (configFile >> "CfgVehicles" >> (backpack unit) >> QGVAR(hasWirecutter))} \ || {1 == getNumber (configFile >> "CfgWeapons" >> (vest unit) >> QGVAR(hasWirecutter))} \ ) diff --git a/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf b/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf index f8403d81e5..b1cdef9829 100644 --- a/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf +++ b/addons/magazinerepack/functions/fnc_getMagazineChildren.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror, commy2, esteldunedain, Ruthberg * Gets magazine children for interaciton menu. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "_player"]; diff --git a/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf b/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf index 286db1389b..d70899ba56 100644 --- a/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf +++ b/addons/magazinerepack/functions/fnc_magazineRepackFinish.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror (based on repack from commy2, esteldunedain, Ruthberg) * Simulates repacking a set of magazines. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_args", "_elapsedTime", "_totalTime", "_errorCode"]; _args params ["_magazineClassname", "_lastAmmoCount"]; diff --git a/addons/magazinerepack/functions/fnc_magazineRepackProgress.sqf b/addons/magazinerepack/functions/fnc_magazineRepackProgress.sqf index ddc7ca4fa8..f48d0029fa 100644 --- a/addons/magazinerepack/functions/fnc_magazineRepackProgress.sqf +++ b/addons/magazinerepack/functions/fnc_magazineRepackProgress.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror (based on repack from commy2, esteldunedain, Ruthberg) * Handles each frame durring the repack progressBar. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_args", "_elapsedTime", "_totalTime"]; _args params ["_magazineClassname", "_lastAmmoCount", "_simEvents"]; diff --git a/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf b/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf index a96fa2dead..bd7d4dae2a 100644 --- a/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf +++ b/addons/magazinerepack/functions/fnc_simulateRepackEvents.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Simulates repacking a set of magazines. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_fullMagazineCount", "_arrayOfAmmoCounts", "_isBelt"]; diff --git a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf index e87fc5f221..cd9df9b2a9 100644 --- a/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf +++ b/addons/magazinerepack/functions/fnc_startRepackingMagazine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror (based on repack from commy2, esteldunedain, Ruthberg) * Starts repacking a specific magazine classname. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "_player", "_magazineClassname"]; diff --git a/addons/magazinerepack/stringtable.xml b/addons/magazinerepack/stringtable.xml index 74bd413b49..ac4334f5b5 100644 --- a/addons/magazinerepack/stringtable.xml +++ b/addons/magazinerepack/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/main/script_macros.hpp b/addons/main/script_macros.hpp index 16a33583a0..4414ad1f44 100644 --- a/addons/main/script_macros.hpp +++ b/addons/main/script_macros.hpp @@ -60,6 +60,18 @@ count = COUNT; \ } +// weapon types +#define TYPE_WEAPON_PRIMARY 1 +#define TYPE_WEAPON_HANDGUN 2 +#define TYPE_WEAPON_SECONDARY 4 +// magazine types +#define TYPE_MAGAZINE_HANDGUN_AND_GL 16 // mainly +#define TYPE_MAGAZINE_PRIMARY_AND_THROW 256 +#define TYPE_MAGAZINE_SECONDARY_AND_PUT 512 // mainly +// more types +#define TYPE_BINOCULAR_AND_NVG 4096 +#define TYPE_WEAPON_VEHICLE 65536 +#define TYPE_ITEM 131072 // item types #define TYPE_DEFAULT 0 #define TYPE_MUZZLE 101 @@ -122,4 +134,6 @@ #define MRAD_TO_DEG(d) ((d) / 17.45329252) // Conversion factor: 9 / (50 * PI) #define MOA_TO_RAD(d) ((d) * 0.00029088) // Conversion factor: PI / 10800 +#define ZEUS_ACTION_CONDITION ([_target, {QUOTE(QUOTE(ADDON)) in curatorAddons _this}, missionNamespace, QUOTE(QGVAR(zeusCheck)), 1E11, 'ace_interactMenuClosed'] call EFUNC(common,cachedCall)) + #include "script_debug.hpp" diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index d24e2f7d9f..372be82530 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -9,8 +9,8 @@ #define VERSION_AR MAJOR,MINOR,PATCHLVL,BUILD // MINIMAL required version for the Mod. Components can specify others.. -#define REQUIRED_VERSION 1.82 -#define REQUIRED_CBA_VERSION {3,6,0} +#define REQUIRED_VERSION 1.84 +#define REQUIRED_CBA_VERSION {3,9,0} #ifdef COMPONENT_BEAUTIFIED #define COMPONENT_NAME QUOTE(ACE3 - COMPONENT_BEAUTIFIED) diff --git a/addons/main/script_version.hpp b/addons/main/script_version.hpp index 4f432970c0..54f90d76f7 100644 --- a/addons/main/script_version.hpp +++ b/addons/main/script_version.hpp @@ -1,4 +1,4 @@ #define MAJOR 3 #define MINOR 12 -#define PATCHLVL 2 -#define BUILD 33 +#define PATCHLVL 3 +#define BUILD 36 diff --git a/addons/main/stringtable.xml b/addons/main/stringtable.xml index 7e6a6fb76a..9f1a9d6b8d 100644 --- a/addons/main/stringtable.xml +++ b/addons/main/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/map/CfgEventHandlers.hpp b/addons/map/CfgEventHandlers.hpp index 0a9f567e49..6764ab5e7d 100644 --- a/addons/map/CfgEventHandlers.hpp +++ b/addons/map/CfgEventHandlers.hpp @@ -17,3 +17,9 @@ class Extended_PostInit_EventHandlers { serverInit = QUOTE(call COMPILE_FILE(XEH_postInitServer)); }; }; + +class Extended_DisplayLoad_EventHandlers { + class RscDiary { + GVAR(initMainMap) = QUOTE((_this select 0) call (uiNamespace getVariable 'FUNC(initMainMap)')); + }; +}; diff --git a/addons/map/CfgVehicles.hpp b/addons/map/CfgVehicles.hpp index 16c03bd225..3da69a1216 100644 --- a/addons/map/CfgVehicles.hpp +++ b/addons/map/CfgVehicles.hpp @@ -5,7 +5,7 @@ class CfgVehicles { class ACE_MapFlashlight { displayName = CSTRING(Action_Flashlights); icon = QUOTE(\a3\ui_f\data\IGUI\Cfg\VehicleToggles\lightsiconon_ca.paa); - condition = QUOTE(GVAR(mapIllumination) && visibleMap && {count ([ACE_player] call FUNC(getUnitFlashlights)) > 0}); + condition = QUOTE(GVAR(mapIllumination) && visibleMap && {!([] isEqualTo (_player call FUNC(getUnitFlashlights)))}); statement = "true"; exceptions[] = {"isNotDragging", "notOnMap", "isNotInside", "isNotSitting"}; insertChildren = QUOTE(_this call DFUNC(compileFlashlightMenu)); diff --git a/addons/map/CfgWeapons.hpp b/addons/map/CfgWeapons.hpp index 5831428c6c..a9188159a3 100644 --- a/addons/map/CfgWeapons.hpp +++ b/addons/map/CfgWeapons.hpp @@ -8,7 +8,7 @@ class CfgWeapons { class FlashLight { ACE_Flashlight_Colour = "white"; ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_white_ca.paa); - ACE_Flashlight_Size = 2.75; + ACE_Flashlight_Size = DEFAULT_FLASHLIGHT_SIZE; ACE_Flashlight_Sound = 1; }; }; @@ -18,7 +18,7 @@ class CfgWeapons { class FlashLight { ACE_Flashlight_Colour = "white"; ACE_Flashlight_Beam = QPATHTOF(UI\Flashlight_beam_white_ca.paa); - ACE_Flashlight_Size = 2.75; + ACE_Flashlight_Size = DEFAULT_FLASHLIGHT_SIZE; ACE_Flashlight_Sound = 1; }; }; diff --git a/addons/map/XEH_PREP.hpp b/addons/map/XEH_PREP.hpp index 6737249165..af6e815fd7 100644 --- a/addons/map/XEH_PREP.hpp +++ b/addons/map/XEH_PREP.hpp @@ -7,7 +7,9 @@ PREP(determineZoom); PREP(flashlightGlow); PREP(getUnitFlashlights); PREP(moduleMap); +PREP(needPlaySound); PREP(onDrawMap); PREP(simulateMapLight); PREP(switchFlashlight); PREP(updateMapEffects); +PREP(initMainMap); diff --git a/addons/map/XEH_postInitClient.sqf b/addons/map/XEH_postInitClient.sqf index 6f2f60fc0c..f439c4db55 100644 --- a/addons/map/XEH_postInitClient.sqf +++ b/addons/map/XEH_postInitClient.sqf @@ -8,52 +8,6 @@ LOG(MSG_INIT); // Calculate the maximum zoom allowed for this map call FUNC(determineZoom); -[{ - if (isNull findDisplay 12) exitWith {}; - - GVAR(lastStillPosition) = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5]; - GVAR(lastStillTime) = CBA_missionTime; - GVAR(isShaking) = false; - - //map sizes are multiples of 1280 - GVAR(worldSize) = worldSize / 1280; - GVAR(mousePos) = [0.5,0.5]; - - //Allow panning the lastStillPosition while mapShake is active - GVAR(rightMouseButtonLastPos) = []; - ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["Draw", {_this call FUNC(updateMapEffects)}]; - ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseMoving", { - if (GVAR(isShaking) && {(count GVAR(rightMouseButtonLastPos)) == 2}) then { - private _lastPos = (_this select 0) ctrlMapScreenToWorld GVAR(rightMouseButtonLastPos); - private _newPos = (_this select 0) ctrlMapScreenToWorld (_this select [1,2]); - GVAR(lastStillPosition) set [0, (GVAR(lastStillPosition) select 0) + (_lastPos select 0) - (_newPos select 0)]; - GVAR(lastStillPosition) set [1, (GVAR(lastStillPosition) select 1) + (_lastPos select 1) - (_newPos select 1)]; - GVAR(rightMouseButtonLastPos) = _this select [1,2]; - TRACE_3("Mouse Move",_lastPos,_newPos,GVAR(rightMouseButtonLastPos)); - }; - }]; - ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseButtonDown", { - if ((_this select 1) == 1) then { - GVAR(rightMouseButtonLastPos) = _this select [2,2]; - }; - }]; - ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseButtonUp", { - if ((_this select 1) == 1) then { - GVAR(rightMouseButtonLastPos) = []; - }; - }]; - - //get mouse position on map - ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseMoving", { - GVAR(mousePos) = (_this select 0) ctrlMapScreenToWorld [_this select 1, _this select 2]; - }]; - ((findDisplay 12) displayCtrl 51) ctrlAddEventHandler ["MouseHolding", { - GVAR(mousePos) = (_this select 0) ctrlMapScreenToWorld [_this select 1, _this select 2]; - }]; - - [_this select 1] call CBA_fnc_removePerFrameHandler; -}, 0] call CBA_fnc_addPerFrameHandler; - ["ace_settingsInitialized", { if (isMultiplayer && {GVAR(DefaultChannel) != -1}) then { //Set the chat channel once the map has finished loading @@ -96,15 +50,15 @@ call FUNC(determineZoom); params ["_player", "_mapOn"]; private _unitLight = _player getVariable [QGVAR(flashlight), ["", objNull]]; _unitLight params ["_flashlight", "_glow"]; - private _flashlightOn = !(_flashlight isEqualTo ""); if (_mapOn) then { - if (_flashlightOn && {isNull _glow}) then { + if (!(_flashlight isEqualTo "") && {isNull _glow}) then { [_player, _flashlight] call FUNC(flashlightGlow); - playSound QGVAR(flashlightClick); + if ([_player, _flashlight] call FUNC(needPlaySound)) then {playSound QGVAR(flashlightClick)}; }; } else { if (!isNull _glow) then { [_player, ""] call FUNC(flashlightGlow); + if ([_player, _flashlight] call FUNC(needPlaySound)) then {playSound QGVAR(flashlightClick)}; }; }; }] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/map/functions/fnc_blueForceTrackingModule.sqf b/addons/map/functions/fnc_blueForceTrackingModule.sqf index f19fc84e57..6569fabc35 100644 --- a/addons/map/functions/fnc_blueForceTrackingModule.sqf +++ b/addons/map/functions/fnc_blueForceTrackingModule.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Initializes the blue force tracking module. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic"]; [_logic, QGVAR(BFT_Enabled), "Enabled"] call EFUNC(common,readSettingFromModule); diff --git a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf index 46e7833cc1..9b8e288ac4 100644 --- a/addons/map/functions/fnc_blueForceTrackingUpdate.sqf +++ b/addons/map/functions/fnc_blueForceTrackingUpdate.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * Update the blue force tracking. @@ -14,9 +15,6 @@ * Public: No */ - -// #define ENABLE_PERFORMANCE_COUNTERS -#include "script_component.hpp" // BEGIN_COUNTER(blueForceTrackingUpdate); // Delete last set of markers (always) diff --git a/addons/map/functions/fnc_compileFlashlightMenu.sqf b/addons/map/functions/fnc_compileFlashlightMenu.sqf index f271cd723f..c6af389a0a 100644 --- a/addons/map/functions/fnc_compileFlashlightMenu.sqf +++ b/addons/map/functions/fnc_compileFlashlightMenu.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: voiper * Compile list of flashlight classnames and add to the "Flashlight" parent menu. @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["", "_player"]; private _actions = []; diff --git a/addons/map/functions/fnc_determineMapLight.sqf b/addons/map/functions/fnc_determineMapLight.sqf index 55ca51fbd8..d6a0f09a08 100644 --- a/addons/map/functions/fnc_determineMapLight.sqf +++ b/addons/map/functions/fnc_determineMapLight.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko and esteldunedain * Calculates the current map illumination for a given unit @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit"]; // Blend two colors diff --git a/addons/map/functions/fnc_determineZoom.sqf b/addons/map/functions/fnc_determineZoom.sqf index fd9cc24264..45a6faeaf2 100644 --- a/addons/map/functions/fnc_determineZoom.sqf +++ b/addons/map/functions/fnc_determineZoom.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko * Calculate the maximum zoom level allowed for the current map @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - private _grids = (configFile >> "CfgWorlds" >> worldName >> "Grid"); private _fourSize = -1; private _sixSize = -1; diff --git a/addons/map/functions/fnc_flashlightGlow.sqf b/addons/map/functions/fnc_flashlightGlow.sqf index 5d743193df..32615d014b 100644 --- a/addons/map/functions/fnc_flashlightGlow.sqf +++ b/addons/map/functions/fnc_flashlightGlow.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: voiper * Add or remove global flashlight glow for when player is looking at map. @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_flashlightType", ["_set", true]]; private _unitLight = _unit getVariable [QGVAR(flashlight), ["", objNull]]; diff --git a/addons/map/functions/fnc_getUnitFlashlights.sqf b/addons/map/functions/fnc_getUnitFlashlights.sqf index 86eeed006d..d8f537380d 100644 --- a/addons/map/functions/fnc_getUnitFlashlights.sqf +++ b/addons/map/functions/fnc_getUnitFlashlights.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: voiper * Check a unit for any flashlights that can be used on map. @@ -9,21 +10,29 @@ * Flashlight classnames (empty for none) * * Example: - * [unit] call ace_map_fnc_getUnitFlashlights; + * player call ace_map_fnc_getUnitFlashlights * * Public: No */ -#include "script_component.hpp" - params ["_unit"]; private _flashlights = []; +private _cfgWeapons = configFile >> "CfgWeapons"; { - if (isText (configFile >> "CfgWeapons" >> _x >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Colour")) then { - _flashlights pushBackUnique _x; + private _weaponConfig = _cfgWeapons >> _x; + if ( + -1 < [ + _weaponConfig >> "ItemInfo" >> "FlashLight", + _weaponConfig >> "FlashLight" + ] findIf { + isText (_x >> "ACE_Flashlight_Colour") + || {!(getArray (_x >> "ambient") in [[], [0,0,0]])} + } + ) then { + _flashlights pushBack _x; }; -} forEach (items _unit); +} forEach ([_unit, true] call CBA_fnc_uniqueUnitItems); _flashlights diff --git a/addons/map/functions/fnc_initMainMap.sqf b/addons/map/functions/fnc_initMainMap.sqf new file mode 100644 index 0000000000..bebfcbd999 --- /dev/null +++ b/addons/map/functions/fnc_initMainMap.sqf @@ -0,0 +1,56 @@ +#include "script_component.hpp" +#include "\a3\ui_f\hpp\defineResincl.inc" + +params ["_display"]; +if (ctrlIDD _display != IDD_MAIN_MAP) exitWith {}; + +private _control = _display displayCtrl IDC_MAP; + +GVAR(lastStillPosition) = _control ctrlMapScreenToWorld [0.5, 0.5]; +GVAR(lastStillTime) = CBA_missionTime; +GVAR(isShaking) = false; + +//map sizes are multiples of 1280 +GVAR(worldSize) = worldSize / 1280; +GVAR(mousePos) = [0.5, 0.5]; + +//Allow panning the lastStillPosition while mapShake is active +GVAR(rightMouseButtonLastPos) = []; + +_control ctrlAddEventHandler ["Draw", {_this call FUNC(updateMapEffects)}]; +_control ctrlAddEventHandler ["MouseMoving", { + params ["_control", "_x", "_y"]; + if (GVAR(isShaking) && {count GVAR(rightMouseButtonLastPos) == 2}) then { + private _lastPos = _control ctrlMapScreenToWorld GVAR(rightMouseButtonLastPos); + private _newPos = _control ctrlMapScreenToWorld [_x, _y]; + GVAR(lastStillPosition) set [0, (GVAR(lastStillPosition) select 0) + (_lastPos select 0) - (_newPos select 0)]; + GVAR(lastStillPosition) set [1, (GVAR(lastStillPosition) select 1) + (_lastPos select 1) - (_newPos select 1)]; + GVAR(rightMouseButtonLastPos) = [_x, _y]; + TRACE_3("Mouse Move",_lastPos,_newPos,GVAR(rightMouseButtonLastPos)); + }; +}]; + +_control ctrlAddEventHandler ["MouseButtonDown", { + params ["", "_button", "_x", "_y"]; + if (_button == 1) then { + GVAR(rightMouseButtonLastPos) = [_x, _y]; + }; +}]; + +_control ctrlAddEventHandler ["MouseButtonUp", { + params ["", "_button"]; + if (_button == 1) then { + GVAR(rightMouseButtonLastPos) = []; + }; +}]; + +//get mouse position on map +_control ctrlAddEventHandler ["MouseMoving", { + params ["_control", "_x", "_y"]; + GVAR(mousePos) = _control ctrlMapScreenToWorld [_x, _y]; +}]; + +_control ctrlAddEventHandler ["MouseHolding", { + params ["_control", "_x", "_y"]; + GVAR(mousePos) = _control ctrlMapScreenToWorld [_x, _y]; +}]; diff --git a/addons/map/functions/fnc_moduleMap.sqf b/addons/map/functions/fnc_moduleMap.sqf index 077106eabe..e5747d5955 100644 --- a/addons/map/functions/fnc_moduleMap.sqf +++ b/addons/map/functions/fnc_moduleMap.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Initializes the Map module. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/map/functions/fnc_needPlaySound.sqf b/addons/map/functions/fnc_needPlaySound.sqf new file mode 100644 index 0000000000..0c0d34f42e --- /dev/null +++ b/addons/map/functions/fnc_needPlaySound.sqf @@ -0,0 +1,42 @@ +#include "script_component.hpp" +/* + * Author: Dystopian + * Checks if sound needs to be played when flashlight is toggled. + * + * Arguments: + * 0: Unit + * 1: Flashlight + * + * Return Value: + * Need to play sound + * + * Example: + * [player, "acc_flashlight"] call ace_map_fnc_needPlaySound + * + * Public: No + */ + +params ["_unit", "_flashlight"]; + +if (_flashlight isEqualTo "") exitWith { + LOG("empty flashlight"); + false +}; + +private _currentWeapon = currentWeapon _unit; +if ( + _unit isFlashlightOn _currentWeapon + // _currentWeapon==_flashlight should be checked here but it's not supported by isFlashlightOn + && {_flashlight isEqualTo ((weaponsItems _unit select {(_x select 0) isEqualTo _currentWeapon}) select 0 select 2)} +) exitWith { + TRACE_1("weapon flashlight is on",_flashlight); + false +}; + +private _config = configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight"; +if (!isClass _config) exitWith { + TRACE_1("weapon with unmountable flashlight",_flashlight); + true +}; + +0 < [_config >> "ACE_Flashlight_Sound", "number", 1] call CBA_fnc_getConfigEntry diff --git a/addons/map/functions/fnc_onDrawMap.sqf b/addons/map/functions/fnc_onDrawMap.sqf index dff79d694a..5ad3d42fe0 100644 --- a/addons/map/functions/fnc_onDrawMap.sqf +++ b/addons/map/functions/fnc_onDrawMap.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - ((_this select 0) displayCtrl 1016) ctrlShow GVAR(mapShowCursorCoordinates); // hide clock when no watch in inventory, or whatever never ever diff --git a/addons/map/functions/fnc_simulateMapLight.sqf b/addons/map/functions/fnc_simulateMapLight.sqf index 538b49a37a..7ec9d573a2 100644 --- a/addons/map/functions/fnc_simulateMapLight.sqf +++ b/addons/map/functions/fnc_simulateMapLight.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: voiper * Draw nearby lighting and sexy flashlight beams on main map. @@ -17,8 +18,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_mapCtrl", "_mapScale", "_mapCentre", "_lightLevel"]; private _unitLight = ACE_player getVariable [QGVAR(flashlight), ["", objNull]]; @@ -56,9 +55,9 @@ if (_flashlight == "") then { private _mousePos = GVAR(mousePos); //flashlight settings - private _cfg = (configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight"); - private _size = getNumber (_cfg >> "ACE_Flashlight_Size"); - private _flashTex = getText (_cfg >> "ACE_Flashlight_Beam"); + private _cfg = configFile >> "CfgWeapons" >> _flashlight >> "ItemInfo" >> "FlashLight"; + private _size = [_cfg >> "ACE_Flashlight_Size", "number", DEFAULT_FLASHLIGHT_SIZE] call CBA_fnc_getConfigEntry; + private _flashTex = [_cfg >> "ACE_Flashlight_Beam", "text", QPATHTOF(UI\Flashlight_beam_white_ca.paa)] call CBA_fnc_getConfigEntry; private _beamSize = (safeZoneW/safeZoneWAbs) * _screenSize / _size; //after 5x zoom, it's simulated to be fixed (it actually gets bigger relative to zoom) diff --git a/addons/map/functions/fnc_switchFlashlight.sqf b/addons/map/functions/fnc_switchFlashlight.sqf index cda4380d08..5d4ed9de0a 100644 --- a/addons/map/functions/fnc_switchFlashlight.sqf +++ b/addons/map/functions/fnc_switchFlashlight.sqf @@ -1,5 +1,6 @@ +#include "script_component.hpp" /* - * Author: voioper + * Author: voiper * Switch flashlight on/off. * * Arguments: @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_newFlashlight"]; private _unitLight = _unit getVariable [QGVAR(flashlight), ["", objNull]]; @@ -27,12 +26,7 @@ if (GVAR(mapGlow)) then { _glow = [_unit, _newFlashlight, false] call FUNC(flashlightGlow); }; -private _config = (configFile >> "CfgWeapons"); - -if ( - (getNumber (_config >> _newFlashlight >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Sound") > 0) || - {getNumber (_config >> _flashlight >> "ItemInfo" >> "FlashLight" >> "ACE_Flashlight_Sound") > 0} -) then { +if (-1 < [_newFlashlight, _flashlight] findIf {[_unit, _x] call FUNC(needPlaySound)}) then { playSound QGVAR(flashlightClick); }; diff --git a/addons/map/functions/fnc_updateMapEffects.sqf b/addons/map/functions/fnc_updateMapEffects.sqf index 2c0f3c128c..4e8d65bee2 100644 --- a/addons/map/functions/fnc_updateMapEffects.sqf +++ b/addons/map/functions/fnc_updateMapEffects.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko and esteldunedain * On map draw, updates the effects @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_mapCtrl"]; private _mapScale = ctrlMapScale _mapCtrl; private _mapCentre = _mapCtrl ctrlMapScreenToWorld [0.5, 0.5]; diff --git a/addons/map/initSettings.sqf b/addons/map/initSettings.sqf index ae0e31b0ae..d184c5c1ac 100644 --- a/addons/map/initSettings.sqf +++ b/addons/map/initSettings.sqf @@ -4,7 +4,9 @@ [localize LSTRING(MapIllumination_DisplayName), localize LSTRING(MapIllumination_Description)], format["ACE %1", localize LSTRING(Module_DisplayName)], true, - true + true, + {[QGVAR(mapIllumination), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_settings_fnc_init; [ @@ -13,7 +15,9 @@ [localize LSTRING(MapGlow_DisplayName), localize LSTRING(MapGlow_Description)], format["ACE %1", localize LSTRING(Module_DisplayName)], true, - true + true, + {[QGVAR(mapGlow), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_settings_fnc_init; [ @@ -49,7 +53,9 @@ [localize LSTRING(DefaultChannel_DisplayName), localize LSTRING(DefaultChannel_Description)], format["ACE %1", localize LSTRING(Module_DisplayName)], [[-1, 0, 1, 2, 3, 4, 5], [ELSTRING(common,Disabled), "STR_channel_global", "STR_channel_side", "STR_channel_command", "STR_channel_group", "STR_channel_vehicle", "STR_channel_direct"], 0], - true + true, + {[QGVAR(DefaultChannel), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_settings_fnc_init; // Blue Force Tracking @@ -59,7 +65,9 @@ [localize LSTRING(BFT_Enabled_DisplayName), localize LSTRING(BFT_Enabled_Description)], [format ["ACE %1", localize LSTRING(Module_DisplayName)], localize LSTRING(BFT_Module_DisplayName)], false, - true + true, + {[QGVAR(BFT_Enabled), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_settings_fnc_init; [ @@ -68,7 +76,9 @@ [localize LSTRING(BFT_Interval_DisplayName), localize LSTRING(BFT_Interval_Description)], [format ["ACE %1", localize LSTRING(Module_DisplayName)], localize LSTRING(BFT_Module_DisplayName)], [0, 30, 1, 1], - true + true, + {[QGVAR(BFT_Interval), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_settings_fnc_init; [ @@ -77,7 +87,9 @@ [localize LSTRING(BFT_ShowPlayerNames_DisplayName), localize LSTRING(BFT_ShowPlayerNames_Description)], [format ["ACE %1", localize LSTRING(Module_DisplayName)], localize LSTRING(BFT_Module_DisplayName)], false, - true + true, + {[QGVAR(BFT_ShowPlayerNames), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_settings_fnc_init; [ @@ -86,5 +98,7 @@ [localize LSTRING(BFT_HideAiGroups_DisplayName), localize LSTRING(BFT_HideAiGroups_Description)], [format ["ACE %1", localize LSTRING(Module_DisplayName)], localize LSTRING(BFT_Module_DisplayName)], false, - true + true, + {[QGVAR(BFT_HideAiGroups), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_settings_fnc_init; diff --git a/addons/map/script_component.hpp b/addons/map/script_component.hpp index 172a0fe838..432622f632 100644 --- a/addons/map/script_component.hpp +++ b/addons/map/script_component.hpp @@ -16,7 +16,8 @@ #include "\z\ace\addons\main\script_macros.hpp" - #define MARKERNAME_MAPTOOL_FIXED "ACE_MapToolFixed" #define MARKERNAME_MAPTOOL_ROTATINGNORMAL "ACE_MapToolRotatingNormal" #define MARKERNAME_MAPTOOL_ROTATINGSMALL "ACE_MapToolRotatingSmall" + +#define DEFAULT_FLASHLIGHT_SIZE 2.75 diff --git a/addons/map/stringtable.xml b/addons/map/stringtable.xml index e4ba587864..d2cc5e90d0 100644 --- a/addons/map/stringtable.xml +++ b/addons/map/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf b/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf index e02403b323..eaf319bc90 100644 --- a/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf +++ b/addons/map_gestures/functions/fnc_addGroupColorMapping.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, MikeMatrix, PabstMirror * Adds a group id color mapping. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!params [["_group", "", [grpNull, ""]], ["_leadColor", [1,1,1,1], [[]], 4], ["_unitColor", [1,1,1,1], [[]], 4]]) exitWith { ERROR_1("Bad Params: %1",_this); diff --git a/addons/map_gestures/functions/fnc_drawMapGestures.sqf b/addons/map_gestures/functions/fnc_drawMapGestures.sqf index 237d0537f5..2aecd2388f 100644 --- a/addons/map_gestures/functions/fnc_drawMapGestures.sqf +++ b/addons/map_gestures/functions/fnc_drawMapGestures.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, MikeMatrix * Receives and draws map gestures from nearby players. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" BEGIN_COUNTER(draw); diff --git a/addons/map_gestures/functions/fnc_endTransmit.sqf b/addons/map_gestures/functions/fnc_endTransmit.sqf index fc3e0e81e1..e591cd39ba 100644 --- a/addons/map_gestures/functions/fnc_endTransmit.sqf +++ b/addons/map_gestures/functions/fnc_endTransmit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, MikeMatrix * Ensure that all variables used to indicate transmission are disabled. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!GVAR(enabled)) exitWith {}; diff --git a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf index ea058f0f7e..9718095b01 100644 --- a/addons/map_gestures/functions/fnc_getProximityPlayers.sqf +++ b/addons/map_gestures/functions/fnc_getProximityPlayers.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, MikeMatrix * Returns all players in a given range and in the units vehicle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_range"]; diff --git a/addons/map_gestures/functions/fnc_initTransmit.sqf b/addons/map_gestures/functions/fnc_initTransmit.sqf index 604bf9e233..782b4c9666 100644 --- a/addons/map_gestures/functions/fnc_initTransmit.sqf +++ b/addons/map_gestures/functions/fnc_initTransmit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, MikeMatrix * Initializes transmitting map gestures. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!GVAR(enabled)) exitWith {}; diff --git a/addons/map_gestures/functions/fnc_isValidColorArray.sqf b/addons/map_gestures/functions/fnc_isValidColorArray.sqf index fdf89a46d6..8abaf4f375 100644 --- a/addons/map_gestures/functions/fnc_isValidColorArray.sqf +++ b/addons/map_gestures/functions/fnc_isValidColorArray.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: MikeMatrix * Validate if an array is in the propper color format. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" scopeName "main"; diff --git a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf index 8f44cf5732..fb87822a30 100644 --- a/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleGroupSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, MikeMatrix * Initializes Settings for the groups modules and transcodes settings to a useable format. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_units", "_activated"]; TRACE_3("params",_logic,_units,_activated); diff --git a/addons/map_gestures/functions/fnc_moduleSettings.sqf b/addons/map_gestures/functions/fnc_moduleSettings.sqf index f49e1d4525..93525226ea 100644 --- a/addons/map_gestures/functions/fnc_moduleSettings.sqf +++ b/addons/map_gestures/functions/fnc_moduleSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, MikeMatrix * Initializes Settings for the module and transcodes settings to a useable format. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "", "_activated"]; diff --git a/addons/map_gestures/functions/fnc_receiverInit.sqf b/addons/map_gestures/functions/fnc_receiverInit.sqf index 9386523340..0effb9a7d5 100644 --- a/addons/map_gestures/functions/fnc_receiverInit.sqf +++ b/addons/map_gestures/functions/fnc_receiverInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, MikeMatrix * Initializes the receiver and hooks it to the Draw event of the map. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" ACE_player setVariable [QGVAR(Transmit), false, true]; GVAR(EnableTransmit) = false; diff --git a/addons/map_gestures/functions/fnc_transmit.sqf b/addons/map_gestures/functions/fnc_transmit.sqf index 166b1cb375..1b1f462f01 100644 --- a/addons/map_gestures/functions/fnc_transmit.sqf +++ b/addons/map_gestures/functions/fnc_transmit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, MikeMatrix * Transmit PFH @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" BEGIN_COUNTER(transmit); diff --git a/addons/map_gestures/functions/fnc_transmitterInit.sqf b/addons/map_gestures/functions/fnc_transmitterInit.sqf index 6a031e419b..a081ef5b14 100644 --- a/addons/map_gestures/functions/fnc_transmitterInit.sqf +++ b/addons/map_gestures/functions/fnc_transmitterInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, MikeMatrix * Initializes the transmitting event handlers. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; diff --git a/addons/map_gestures/stringtable.xml b/addons/map_gestures/stringtable.xml index 2aa187797b..feb98f2091 100644 --- a/addons/map_gestures/stringtable.xml +++ b/addons/map_gestures/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/maptools/functions/fnc_calculateMapScale.sqf b/addons/maptools/functions/fnc_calculateMapScale.sqf index d5148893d5..035946aea5 100644 --- a/addons/maptools/functions/fnc_calculateMapScale.sqf +++ b/addons/maptools/functions/fnc_calculateMapScale.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Returns the equivalent of 100m in screen coordinates @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _pos = ((findDisplay 12) displayCtrl 51) ctrlMapScreenToWorld [0.5, 0.5]; private _screenOffset = ((findDisplay 12) displayCtrl 51) posWorldToScreen [(_pos select 0) + 100, (_pos select 1)]; diff --git a/addons/maptools/functions/fnc_canUseMapGPS.sqf b/addons/maptools/functions/fnc_canUseMapGPS.sqf index 7333c1f9e0..80f2541cab 100644 --- a/addons/maptools/functions/fnc_canUseMapGPS.sqf +++ b/addons/maptools/functions/fnc_canUseMapGPS.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * canUseMapGPS @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" visibleMap && {alive ACE_player} && diff --git a/addons/maptools/functions/fnc_canUseMapTools.sqf b/addons/maptools/functions/fnc_canUseMapTools.sqf index bc3c7fbb8a..e09a450031 100644 --- a/addons/maptools/functions/fnc_canUseMapTools.sqf +++ b/addons/maptools/functions/fnc_canUseMapTools.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * canUseMapTools @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" visibleMap && {alive ACE_player} && @@ -24,6 +24,6 @@ visibleMap && } forEach (assignedItems ACE_player); false } && -{"ACE_MapTools" in (items ACE_player)} && +{"ACE_MapTools" in (ACE_player call EFUNC(common,uniqueItems))} && {!GVAR(mapTool_isDragging)} && {!GVAR(mapTool_isRotating)} diff --git a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf index ef354f0798..a2ec5bfe78 100644 --- a/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf +++ b/addons/maptools/functions/fnc_drawLinesOnRoamer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Prevents the cursor from entering the roamer when drawing lines and records the positions @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" if (!GVAR(drawStraightLines)) exitWith {}; diff --git a/addons/maptools/functions/fnc_handleMouseButton.sqf b/addons/maptools/functions/fnc_handleMouseButton.sqf index 143289447e..36639a02d7 100644 --- a/addons/maptools/functions/fnc_handleMouseButton.sqf +++ b/addons/maptools/functions/fnc_handleMouseButton.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Handle mouse buttons. @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_dir", "_params"]; _params params ["_control", "_button", "_screenPosX", "_screenPosY", "_shiftKey", "_ctrlKey", "_altKey"]; TRACE_2("params",_dir,_params); diff --git a/addons/maptools/functions/fnc_handleMouseMove.sqf b/addons/maptools/functions/fnc_handleMouseMove.sqf index a7c48cfed4..6ba8e1938c 100644 --- a/addons/maptools/functions/fnc_handleMouseMove.sqf +++ b/addons/maptools/functions/fnc_handleMouseMove.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Handle mouse movement over the map tool. @@ -15,13 +16,11 @@ * Public: No */ -#include "script_component.hpp" - params ["_control", "_mousePosX", "_mousePosY"]; TRACE_3("params",_control,_mousePosX,_mousePosY); // If have no map tools, then exit -if (((isNull ACE_player) || {!("ACE_MapTools" in items ACE_player)})) exitWith { +if (((isNull ACE_player) || {!("ACE_MapTools" in (ACE_player call EFUNC(common,uniqueItems)))})) exitWith { false }; diff --git a/addons/maptools/functions/fnc_isInsideMapTool.sqf b/addons/maptools/functions/fnc_isInsideMapTool.sqf index c54f831e8f..97eedf85f3 100644 --- a/addons/maptools/functions/fnc_isInsideMapTool.sqf +++ b/addons/maptools/functions/fnc_isInsideMapTool.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Return true if the position is inside the map marker (to allow dragging). @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - if (GVAR(mapTool_Shown) == 0) exitWith {false}; private _textureWidth = [TEXTURE_WIDTH_IN_M, TEXTURE_WIDTH_IN_M / 2] select (GVAR(mapTool_Shown) - 1); diff --git a/addons/maptools/functions/fnc_openMapGps.sqf b/addons/maptools/functions/fnc_openMapGps.sqf index 7e8d923661..96be3f6bd2 100644 --- a/addons/maptools/functions/fnc_openMapGps.sqf +++ b/addons/maptools/functions/fnc_openMapGps.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Opens or closes the gps on the map screen, showing coordinates @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_shouldOpenGps"]; diff --git a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf index 63ecae81ec..84cb3f17a4 100644 --- a/addons/maptools/functions/fnc_openMapGpsUpdate.sqf +++ b/addons/maptools/functions/fnc_openMapGpsUpdate.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * update gps display @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - if ((!("ItemGPS" in assigneditems ACE_player)) || {isNull (uiNamespace getVariable [QGVAR(ui_mapGpsDisplay), displayNull])}) exitWith { ("RscACE_MapGps" call BIS_fnc_rscLayer) cutText ["","PLAIN"]; // Close GPS RSC [(_this select 1)] call CBA_fnc_removePerFrameHandler; // Remove frameHandler diff --git a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf index 026a4037d1..e9cb14d7ed 100644 --- a/addons/maptools/functions/fnc_updateMapToolMarkers.sqf +++ b/addons/maptools/functions/fnc_updateMapToolMarkers.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Update the map tool markers, position, size, rotation and visibility. @@ -13,11 +14,10 @@ * * Public: No */ -#include "script_component.hpp" params ["_theMap"]; -if ((GVAR(mapTool_Shown) == 0) || {!("ACE_MapTools" in items ACE_player)}) exitWith {}; +if ((GVAR(mapTool_Shown) == 0) || {!("ACE_MapTools" in (ACE_player call EFUNC(common,uniqueItems)))}) exitWith {}; private _rotatingTexture = ""; private _textureWidth = 0; diff --git a/addons/maptools/stringtable.xml b/addons/maptools/stringtable.xml index f55d0b6c9d..f0fdd8f186 100644 --- a/addons/maptools/stringtable.xml +++ b/addons/maptools/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/markers/XEH_preInit.sqf b/addons/markers/XEH_preInit.sqf index abf28d6e8b..885a0a3068 100644 --- a/addons/markers/XEH_preInit.sqf +++ b/addons/markers/XEH_preInit.sqf @@ -17,11 +17,12 @@ if (isNil QGVAR(MarkersCache)) then { for "_a" from 0 to (count _config - 1) do { private _marker = _config select _a; - if (getNumber (_marker >> "scope") == 2) then { + if (getNumber (_marker >> "scope") isEqualTo 2) then { + private _class = configName _marker; private _name = getText (_marker >> "name"); private _icon = getText (_marker >> "icon"); - GVAR(MarkersCache) pushBack [_name, _a, _icon]; + GVAR(MarkersCache) pushBack [_name, _a, _icon, _class]; }; }; }; @@ -35,7 +36,8 @@ if (isNil QGVAR(MarkerColorsCache)) then { for "_a" from 0 to (count _config - 1) do { private _marker = _config select _a; - if (getNumber (_marker >> "scope") == 2) then { + if (getNumber (_marker >> "scope") isEqualTo 2) then { + private _class = configName _marker; private _name = getText (_marker >> "name"); private _rgba = getArray (_marker >> "color"); @@ -48,7 +50,7 @@ if (isNil QGVAR(MarkerColorsCache)) then { _rgba params ["_red", "_green", "_blue", "_alpha"]; private _icon = format ["#(argb,8,8,3)color(%1,%2,%3,%4)", _red, _green, _blue, _alpha]; - GVAR(MarkerColorsCache) pushBack [_name, _a, _icon]; + GVAR(MarkerColorsCache) pushBack [_name, _a, _icon, _class]; }; }; }; diff --git a/addons/markers/functions/fnc_canMove.sqf b/addons/markers/functions/fnc_canMove.sqf index c97aafe07a..7b19385d26 100644 --- a/addons/markers/functions/fnc_canMove.sqf +++ b/addons/markers/functions/fnc_canMove.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: chris579 * Checks whether the player can move markers. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" switch (GVAR(moveRestriction)) do { case MOVE_RESTRICTION_NOBODY: {false}; diff --git a/addons/markers/functions/fnc_getEnabledChannels.sqf b/addons/markers/functions/fnc_getEnabledChannels.sqf index eb4bcfd5ce..bc665cf69c 100644 --- a/addons/markers/functions/fnc_getEnabledChannels.sqf +++ b/addons/markers/functions/fnc_getEnabledChannels.sqf @@ -1,5 +1,6 @@ +#include "script_component.hpp" /* - * Author: commy2 + * Author: commy2, Timi007 * Return enabled channels. * * Arguments: @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_localize", false, [false]]]; @@ -40,12 +40,8 @@ if (_localize) then { if (setCurrentChannel 4) then { _enabledChannels pushBack localize "str_channel_vehicle"; }; - - if (setCurrentChannel 5) then { - _enabledChannels pushBack localize "str_channel_direct"; - }; } else { - for "_i" from 0 to 5 do { + for "_i" from 0 to 4 do { if (setCurrentChannel _i) then { _enabledChannels pushBack _i; }; diff --git a/addons/markers/functions/fnc_initInsertMarker.sqf b/addons/markers/functions/fnc_initInsertMarker.sqf index 549a89730d..8a7a5f21fb 100644 --- a/addons/markers/functions/fnc_initInsertMarker.sqf +++ b/addons/markers/functions/fnc_initInsertMarker.sqf @@ -1,5 +1,6 @@ +#include "script_component.hpp" /* - * Author: BIS, commy2 + * Author: BIS, commy2, Timi007 * Sets up the marker placement * Run instead of \a3\ui_f\scripts\GUI\RscDisplayInsertMarker.sqf * @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" #define BORDER 0.005 @@ -46,32 +46,39 @@ private _aceAngleSlider = _display displayctrl 1220; private _aceAngleSliderText = _display displayctrl 1221; - //////////////////// - // Install MapDrawEH on current map - private _mapIDD = -1; + private _mapDisplay = displayParent _display; + if (isNull _mapDisplay) exitWith {ERROR("No Map");}; + private _mapCtrl = _mapDisplay displayCtrl 51; - { - if (!isNull (findDisplay _x)) exitWith { - _mapIDD = _x; + GVAR(editingMarker) = ""; + (ctrlMapMouseOver _mapCtrl) params ["_mouseOverType", "_marker"]; + + //check if entity under mouse is a user marker + if (_mouseOverType isEqualTo "marker") then { + if (!((_marker find "_USER_DEFINED") isEqualTo -1) && ((markerShape _marker) isEqualTo "ICON")) then { + GVAR(editingMarker) = _marker; + //hide marker which is being edited because if the user cancels editing, it will still exist unchanged + GVAR(editingMarker) setMarkerAlphaLocal 0; }; - false - } count [12, 37, 52, 53, 160]; - - if (_mapIDD == -1) exitWith { - ERROR("No Map?"); }; - if !(_mapIDD in GVAR(mapDisplaysWithDrawEHs)) then { - GVAR(mapDisplaysWithDrawEHs) pushBack _mapIDD; - ((finddisplay _mapIDD) displayctrl 51) ctrlAddEventHandler ["Draw", {_this call FUNC(mapDrawEH)}]; // @todo check if persistent + //////////////////// + // Install MapDrawEH on current map + if !((ctrlIDD _mapDisplay) in GVAR(mapDisplaysWithDrawEHs)) then { + GVAR(mapDisplaysWithDrawEHs) pushBack (ctrlIDD _mapDisplay); + _mapCtrl ctrlAddEventHandler ["Draw", {_this call FUNC(mapDrawEH)}]; // @todo check if persistent }; //////////////////// // Calculate center position of the marker placement ctrl - private _pos = ctrlPosition _picture; - _pos = [(_pos select 0) + (_pos select 2) / 2, (_pos select 1) + (_pos select 3) / 2]; - - GVAR(currentMarkerPosition) = ((findDisplay _mapIDD) displayCtrl 51) ctrlMapScreenToWorld _pos; + if !(GVAR(editingMarker) isEqualTo "") then { + //prevent changing the original marker position + GVAR(currentMarkerPosition) = markerPos GVAR(editingMarker); + } else { + private _pos = ctrlPosition _picture; + _pos = [(_pos select 0) + (_pos select 2) / 2, (_pos select 1) + (_pos select 3) / 2]; + GVAR(currentMarkerPosition) = _mapCtrl ctrlMapScreenToWorld _pos; + }; //Hide the bis picture: _picture ctrlShow false; @@ -79,12 +86,16 @@ // prevent vanilla key input _display displayAddEventHandler ["KeyDown", {(_this select 1) in [200, 208]}]; + if !((markerText GVAR(editingMarker)) isEqualTo "") then { + //fill text input with text from marker which is being edited + _text ctrlSetText (markerText GVAR(editingMarker)); + }; //Focus on the text input ctrlSetFocus _text; //--- Background - _pos = ctrlposition _text; + private _pos = ctrlposition _text; _pos params ["_posX", "_posY", "_posW", "_posH"]; _posX = _posX + 0.01; _posY = _posY min ((safeZoneH + safeZoneY) - (8 * _posH + 8 * BORDER)); //prevent buttons being placed below bottom edge of screen @@ -161,12 +172,20 @@ }; }; - private _currentChannelName = CHANNEL_NAMES param [currentChannel, localize "str_channel_group"]; + private _selectChannel = if !(GVAR(editingMarker) isEqualTo "") then { + //get the channel where the marker was placed in + parseNumber ((GVAR(editingMarker) splitString "/") param [2, "3"]) + } else { + currentChannel + }; + + private _currentChannelName = CHANNEL_NAMES param [_selectChannel, localize "str_channel_group"]; // select current channel in list box, must be done after lbDelete for "_j" from 0 to (lbSize _channel - 1) do { if (_channel lbText _j == _currentChannelName) then { _channel lbSetCurSel _j; + setCurrentChannel (CHANNEL_NAMES find _currentChannelName); }; }; @@ -198,10 +217,15 @@ // init marker shape lb lbClear _aceShapeLB; { - _x params ["_add", "_set", "_pic"]; + _x params ["_add", "_set", "_pic", "_classname"]; _aceShapeLB lbAdd _add; _aceShapeLB lbSetValue [_forEachIndex, _set]; _aceShapeLB lbSetPicture [_forEachIndex, _pic]; + + if ((markerType GVAR(editingMarker)) isEqualTo _classname) then { + //if the marker is being edited then get the original shape + GVAR(curSelMarkerShape) = _forEachIndex; + }; } forEach GVAR(MarkersCache); private _curSelShape = GETGVAR(curSelMarkerShape,0); @@ -215,10 +239,15 @@ // init marker color lb lbClear _aceColorLB; { - _x params ["_add", "_set", "_pic"]; + _x params ["_add", "_set", "_pic", "_classname"]; _aceColorLB lbAdd _add; _aceColorLB lbSetValue [_forEachIndex, _set]; _aceColorLB lbSetPicture [_forEachIndex, _pic]; + + if ((markerColor GVAR(editingMarker)) isEqualTo _classname) then { + //if the marker is being edited then get the original color + GVAR(curSelMarkerColor) = _forEachIndex; + }; } forEach GVAR(MarkerColorsCache); private _curSelColor = GETGVAR(curSelMarkerColor,0); @@ -232,6 +261,11 @@ // init marker angle slider _aceAngleSlider sliderSetRange [-180, 180]; + if !(GVAR(editingMarker) isEqualTo "") then { + //get the original direction + GVAR(currentMarkerAngle) = markerDir GVAR(editingMarker); + }; + private _curSelAngle = GETGVAR(currentMarkerAngle,0); _aceAngleSlider sliderSetPosition _curSelAngle; diff --git a/addons/markers/functions/fnc_mapDisplayInitEH.sqf b/addons/markers/functions/fnc_mapDisplayInitEH.sqf index 4a740f0424..3ab874c445 100644 --- a/addons/markers/functions/fnc_mapDisplayInitEH.sqf +++ b/addons/markers/functions/fnc_mapDisplayInitEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles XEH DisplayLoad for the various map displays (RscDiary) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_display"]; TRACE_1("params",_display); diff --git a/addons/markers/functions/fnc_mapDrawEH.sqf b/addons/markers/functions/fnc_mapDrawEH.sqf index 7197c90cc7..5f3c6aed15 100644 --- a/addons/markers/functions/fnc_mapDrawEH.sqf +++ b/addons/markers/functions/fnc_mapDrawEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Draws the current temp marker. Allows rotation. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_theMap"]; // TRACE_1("params",_theMap); diff --git a/addons/markers/functions/fnc_movePFH.sqf b/addons/markers/functions/fnc_movePFH.sqf index 6167b820af..144fce6ff0 100644 --- a/addons/markers/functions/fnc_movePFH.sqf +++ b/addons/markers/functions/fnc_movePFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: chris579 * When the marker is being moved. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" (_this select 0) params ["_marker", "_ctrlMap", "_originalPos", "_originalAlpha"]; diff --git a/addons/markers/functions/fnc_onLBSelChangedChannel.sqf b/addons/markers/functions/fnc_onLBSelChangedChannel.sqf index 8c7ac11046..954e90470c 100644 --- a/addons/markers/functions/fnc_onLBSelChangedChannel.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedChannel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * When the channel list box is changed. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_ctrl", "_index"]; TRACE_2("params",_ctrl,_index); diff --git a/addons/markers/functions/fnc_onLBSelChangedColor.sqf b/addons/markers/functions/fnc_onLBSelChangedColor.sqf index dc186a6c61..a141f7e72d 100644 --- a/addons/markers/functions/fnc_onLBSelChangedColor.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedColor.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * When the color list box is changed. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_ctrl", "_index"]; TRACE_2("params",_ctrl,_index); diff --git a/addons/markers/functions/fnc_onLBSelChangedShape.sqf b/addons/markers/functions/fnc_onLBSelChangedShape.sqf index 6fd9aabd89..52a85e5c8d 100644 --- a/addons/markers/functions/fnc_onLBSelChangedShape.sqf +++ b/addons/markers/functions/fnc_onLBSelChangedShape.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * When the shape list box is changed. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_ctrl", "_index"]; TRACE_2("params",_ctrl,_index); diff --git a/addons/markers/functions/fnc_onMouseButtonDown.sqf b/addons/markers/functions/fnc_onMouseButtonDown.sqf index dee5cab7ed..afdacfb521 100644 --- a/addons/markers/functions/fnc_onMouseButtonDown.sqf +++ b/addons/markers/functions/fnc_onMouseButtonDown.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: chris579 * Triggered when a mouse button is pressed on the map. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_ctrlMap", "_button", "_x", "_y", "_shift", "_ctrl", "_alt"]; diff --git a/addons/markers/functions/fnc_onMouseButtonUp.sqf b/addons/markers/functions/fnc_onMouseButtonUp.sqf index 62b4cd5af7..ffe0ed000f 100644 --- a/addons/markers/functions/fnc_onMouseButtonUp.sqf +++ b/addons/markers/functions/fnc_onMouseButtonUp.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: chris579 * Triggered when a mouse button is released on the map. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_ctrlMap", "_button", "_x", "_y", "_shift", "_ctrl", "_alt"]; diff --git a/addons/markers/functions/fnc_onSliderPosChangedAngle.sqf b/addons/markers/functions/fnc_onSliderPosChangedAngle.sqf index 030e2314ab..c334d0a8f0 100644 --- a/addons/markers/functions/fnc_onSliderPosChangedAngle.sqf +++ b/addons/markers/functions/fnc_onSliderPosChangedAngle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Angle Slider Pos changed @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_ctrl", "_data"]; TRACE_2("params",_ctrl,_data); diff --git a/addons/markers/functions/fnc_placeMarker.sqf b/addons/markers/functions/fnc_placeMarker.sqf index 281953e104..af905d71f1 100644 --- a/addons/markers/functions/fnc_placeMarker.sqf +++ b/addons/markers/functions/fnc_placeMarker.sqf @@ -1,5 +1,6 @@ +#include "script_component.hpp" /* - * Author: commy2 + * Author: commy2, Timi007 * MarkerPlacement closed * * Arguments: @@ -14,13 +15,16 @@ * * Public: No */ -#include "script_component.hpp" disableserialization; params ["_display", "_closeNum"]; TRACE_2("params",_display,_closeNum); -if (_closeNum == 1) then { +if (_closeNum isEqualTo 1) then { + if !(GVAR(editingMarker) isEqualTo "") then { + //delete "old" marker + deleteMarker GVAR(editingMarker); + }; // set and send marker data the next frame. the actual marker isn't created yet [{ [QGVAR(setMarkerNetwork), [ @@ -33,4 +37,11 @@ if (_closeNum == 1) then { ]] call CBA_fnc_globalEvent; }, []] call CBA_fnc_execNextFrame; +} else { + if !(GVAR(editingMarker) isEqualTo "") then { + //editing was canceled show the original marker again + GVAR(editingMarker) setMarkerAlphaLocal 1; + }; }; + +GVAR(editingMarker) = ""; diff --git a/addons/markers/functions/fnc_sendMarkersJIP.sqf b/addons/markers/functions/fnc_sendMarkersJIP.sqf index 1eee39560c..08b36181b1 100644 --- a/addons/markers/functions/fnc_sendMarkersJIP.sqf +++ b/addons/markers/functions/fnc_sendMarkersJIP.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Server: Recives a dummy logic, sends marker data back to the owner. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_owner"]; TRACE_1("params",_owner); diff --git a/addons/markers/functions/fnc_setMarkerJIP.sqf b/addons/markers/functions/fnc_setMarkerJIP.sqf index 1acd758556..ba7dc68a5b 100644 --- a/addons/markers/functions/fnc_setMarkerJIP.sqf +++ b/addons/markers/functions/fnc_setMarkerJIP.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Client: Recives a marker data from server. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_allMapMarkers", "_allMapMarkersProperties"]; TRACE_3("params",_allMapMarkers,_allMapMarkersProperties); diff --git a/addons/markers/functions/fnc_setMarkerNetwork.sqf b/addons/markers/functions/fnc_setMarkerNetwork.sqf index 9d6d2d8ecf..b59338e7d2 100644 --- a/addons/markers/functions/fnc_setMarkerNetwork.sqf +++ b/addons/markers/functions/fnc_setMarkerNetwork.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Sets newly placed marker @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_marker", "_data"]; TRACE_2("params",_marker,_data); diff --git a/addons/markers/script_component.hpp b/addons/markers/script_component.hpp index c081cbcc39..fdb5f1614e 100644 --- a/addons/markers/script_component.hpp +++ b/addons/markers/script_component.hpp @@ -21,8 +21,7 @@ localize "str_channel_side", \ localize "str_channel_command", \ localize "str_channel_group", \ - localize "str_channel_vehicle", \ - localize "str_channel_direct" \ + localize "str_channel_vehicle" \ ] #define MOVE_RESTRICTION_NOBODY -1 diff --git a/addons/markers/stringtable.xml b/addons/markers/stringtable.xml index eddb7014dd..9eb3925c73 100644 --- a/addons/markers/stringtable.xml +++ b/addons/markers/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/maverick/stringtable.xml b/addons/maverick/stringtable.xml index 0ab905b1f0..57c7f85101 100644 --- a/addons/maverick/stringtable.xml +++ b/addons/maverick/stringtable.xml @@ -1,11 +1,11 @@ - + AGM-65 Maverick L, Laser Guided Anti-Ground-Missile AGM-65 Maverick L, lasergelenkte Luft-Boden-Rakete - AGM-65 Maverick L, Guida Laser Missile-Anti-Terra + AGM-65 Maverick L, Guida Laser Missile Anti-Terra AGM-65 マーベリック L、レーザー誘導対地ミサイル AGM-65"小牛"飛彈L型,雷射導引對地導彈 AGM-65"小牛"空地L型,雷射导引对地导弹 @@ -54,6 +54,7 @@ Kh-25ML,雷射導引對地導彈 Kh-25ML,镭射导引空地导弹 Kh-25ML、レーザー誘導対地ミサイル + Kh-25ML, a Guida Laser Missile Aria-Terra 1x Kh-25ML [ACE] @@ -63,6 +64,7 @@ 1x Kh-25ML [ACE] 1x Kh-25ML镭射空地导弹 [ACE] 1x Kh-25ML [ACE] + 1x Kh-25ML [ACE] @@ -83,6 +85,7 @@ Kh-25ML Kh-25ML镭射空地导弹 Kh-25ML + Kh-25ML diff --git a/addons/medical/ACE_Medical_Treatments.hpp b/addons/medical/ACE_Medical_Treatments.hpp index cbe2e48b1e..2056b042cc 100644 --- a/addons/medical/ACE_Medical_Treatments.hpp +++ b/addons/medical/ACE_Medical_Treatments.hpp @@ -64,7 +64,7 @@ class ACE_Medical_Actions { allowSelfTreatment = 0; category = "advanced"; requiredMedic = 1; - treatmentTime = 20; + treatmentTime = 7; items[] = {"ACE_bloodIV"}; // callbackSuccess = QUOTE(DFUNC(treatmentBasic_bloodbag)); callbackSuccess = QUOTE(DFUNC(treatmentIV)); diff --git a/addons/medical/functions/fnc_actionCheckBloodPressure.sqf b/addons/medical/functions/fnc_actionCheckBloodPressure.sqf index 207e2bb90d..dfd930451f 100644 --- a/addons/medical/functions/fnc_actionCheckBloodPressure.sqf +++ b/addons/medical/functions/fnc_actionCheckBloodPressure.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Action for checking the blood pressure of the patient @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller", "_target", "_selectionName"]; if (local _target) then { [QGVAR(actionCheckBloodPressureLocal), [_caller, _target, _selectionName]] call CBA_fnc_localEvent; diff --git a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf index 0497b559b8..aa87f4889d 100644 --- a/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Local callback for checking the blood pressure of a patient @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller", "_target", "_selectionName"]; private _bloodPressure = if (!alive _target) then { diff --git a/addons/medical/functions/fnc_actionCheckPulse.sqf b/addons/medical/functions/fnc_actionCheckPulse.sqf index 7654f24d78..da0711d280 100644 --- a/addons/medical/functions/fnc_actionCheckPulse.sqf +++ b/addons/medical/functions/fnc_actionCheckPulse.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Action for checking the pulse or heart rate of the patient @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller","_target", "_selectionName"]; if (local _target) then { [QGVAR(actionCheckPulseLocal), [_caller, _target, _selectionName]] call CBA_fnc_localEvent; diff --git a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf index 7f4fe176da..6e8989acc3 100644 --- a/addons/medical/functions/fnc_actionCheckPulseLocal.sqf +++ b/addons/medical/functions/fnc_actionCheckPulseLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Local callback for checking the pulse of a patient @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller", "_unit", "_selectionName"]; private _heartRate = _unit getVariable [QGVAR(heartRate), 80]; diff --git a/addons/medical/functions/fnc_actionCheckResponse.sqf b/addons/medical/functions/fnc_actionCheckResponse.sqf index a56c8191c6..58e8219be9 100644 --- a/addons/medical/functions/fnc_actionCheckResponse.sqf +++ b/addons/medical/functions/fnc_actionCheckResponse.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Action for checking the response status of the patient @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller", "_target"]; private _output = [LSTRING(Check_Response_Unresponsive), LSTRING(Check_Response_Responsive)] select ([_target] call EFUNC(common,isAwake)); diff --git a/addons/medical/functions/fnc_actionDiagnose.sqf b/addons/medical/functions/fnc_actionDiagnose.sqf index 81e73699a8..bd51233ddd 100644 --- a/addons/medical/functions/fnc_actionDiagnose.sqf +++ b/addons/medical/functions/fnc_actionDiagnose.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Action for diagnosing in basic medical @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller", "_target"]; private _genericMessages = [LSTRING(diagnoseMessage), [_target] call EFUNC(common,getName)]; diff --git a/addons/medical/functions/fnc_actionLoadUnit.sqf b/addons/medical/functions/fnc_actionLoadUnit.sqf index 264fb72a4b..95b7cbf8a3 100644 --- a/addons/medical/functions/fnc_actionLoadUnit.sqf +++ b/addons/medical/functions/fnc_actionLoadUnit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Action for loading an unconscious or dead unit in the nearest vehicle, or _vehicle if given. @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller", "_target", ["_vehicle", objNull]]; if ([_target] call EFUNC(common,isAwake)) exitWith { diff --git a/addons/medical/functions/fnc_actionPlaceInBodyBag.sqf b/addons/medical/functions/fnc_actionPlaceInBodyBag.sqf index 3f329d3dbb..b4f53370aa 100644 --- a/addons/medical/functions/fnc_actionPlaceInBodyBag.sqf +++ b/addons/medical/functions/fnc_actionPlaceInBodyBag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Replace a (dead) body by a body bag @@ -15,8 +16,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_caller", "_target"]; TRACE_2("params",_caller,_target); diff --git a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf index e32fd09f69..0e7d668b3a 100644 --- a/addons/medical/functions/fnc_actionRemoveTourniquet.sqf +++ b/addons/medical/functions/fnc_actionRemoveTourniquet.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Action for removing the tourniquet on specified selection @@ -16,8 +17,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_caller", "_target", "_selectionName"]; TRACE_3("params",_caller,_target,_selectionName); diff --git a/addons/medical/functions/fnc_actionUnloadUnit.sqf b/addons/medical/functions/fnc_actionUnloadUnit.sqf index 061355fdc8..e98c01fd2b 100644 --- a/addons/medical/functions/fnc_actionUnloadUnit.sqf +++ b/addons/medical/functions/fnc_actionUnloadUnit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Action for unloading an unconscious or dead unit from a vechile @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller", "_target", ["_drag", false]]; // cannot unload a unit not in a vehicle. diff --git a/addons/medical/functions/fnc_addDamageToUnit.sqf b/addons/medical/functions/fnc_addDamageToUnit.sqf index 1c3d06d215..609c636bfa 100644 --- a/addons/medical/functions/fnc_addDamageToUnit.sqf +++ b/addons/medical/functions/fnc_addDamageToUnit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Manually Apply Damage to a unit (can cause lethal damage) @@ -18,9 +19,7 @@ * * Public: Yes */ -// #define DEBUG_MODE_FULL // #define DEBUG_TESTRESULTS -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_damageToAdd", -1, [0]], ["_selection", "", [""]], ["_typeOfDamage", "", [""]]]; TRACE_4("params",_unit,_damageToAdd,_selection,_typeOfDamage); diff --git a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf index de3d2c4204..6c932bb2ef 100644 --- a/addons/medical/functions/fnc_addHeartRateAdjustment.sqf +++ b/addons/medical/functions/fnc_addHeartRateAdjustment.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, KoffeinFlummi * Increase the Heart Rate of a local unit by given number within given amount of seconds. @@ -17,8 +18,6 @@ * Public: Yes */ -#include "script_component.hpp" - params [["_unit", objNull, [objNull]], ["_value", 0, [0]], ["_time", 1, [0]], ["_callBack", {}, [{}]]]; private _adjustment = _unit getVariable [QGVAR(heartRateAdjustments), []]; diff --git a/addons/medical/functions/fnc_addLoadPatientActions.sqf b/addons/medical/functions/fnc_addLoadPatientActions.sqf index b00ff72472..0b0b64fb69 100644 --- a/addons/medical/functions/fnc_addLoadPatientActions.sqf +++ b/addons/medical/functions/fnc_addLoadPatientActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Adds child actions to the "load patient" action for near vehicles. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/medical/functions/fnc_addToLog.sqf b/addons/medical/functions/fnc_addToLog.sqf index 2a5e77fd1b..dadab94a2a 100644 --- a/addons/medical/functions/fnc_addToLog.sqf +++ b/addons/medical/functions/fnc_addToLog.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Add an entry to the specified log @@ -17,8 +18,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_unit", "_type", "_message", "_arguments"]; if (!local _unit) exitWith { diff --git a/addons/medical/functions/fnc_addToTriageCard.sqf b/addons/medical/functions/fnc_addToTriageCard.sqf index 720a435d68..9b240846bc 100644 --- a/addons/medical/functions/fnc_addToTriageCard.sqf +++ b/addons/medical/functions/fnc_addToTriageCard.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Add an entry to the triage card @@ -15,8 +16,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_unit", "_newItem"]; if (!local _unit) exitWith { diff --git a/addons/medical/functions/fnc_addUnconsciousCondition.sqf b/addons/medical/functions/fnc_addUnconsciousCondition.sqf index b3b7f7747b..f31e5045fd 100644 --- a/addons/medical/functions/fnc_addUnconsciousCondition.sqf +++ b/addons/medical/functions/fnc_addUnconsciousCondition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Adds new condition for the unconscious state. Conditions are not actively checked for units unless unit is in unconscious state. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (isnil QGVAR(unconsciousConditions)) then { GVAR(unconsciousConditions) = []; diff --git a/addons/medical/functions/fnc_addUnloadPatientActions.sqf b/addons/medical/functions/fnc_addUnloadPatientActions.sqf index 20399c67c1..bb73dab4e8 100644 --- a/addons/medical/functions/fnc_addUnloadPatientActions.sqf +++ b/addons/medical/functions/fnc_addUnloadPatientActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Create one unload action per unconscious passenger @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_player", "_parameters"]; private _actions = []; diff --git a/addons/medical/functions/fnc_addVitalLoop.sqf b/addons/medical/functions/fnc_addVitalLoop.sqf index 4045c188f5..a1a01a5a61 100644 --- a/addons/medical/functions/fnc_addVitalLoop.sqf +++ b/addons/medical/functions/fnc_addVitalLoop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Enabled the vitals loop for a unit. @@ -14,8 +15,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_unit", ["_force", false]]; if !([_unit] call FUNC(hasMedicalEnabled) || _force) exitWith {}; diff --git a/addons/medical/functions/fnc_adjustPainLevel.sqf b/addons/medical/functions/fnc_adjustPainLevel.sqf index b935041faf..97bc9389a0 100644 --- a/addons/medical/functions/fnc_adjustPainLevel.sqf +++ b/addons/medical/functions/fnc_adjustPainLevel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Interface to allow external modules to safely adjust pain levels. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_addedPain"]; //Only run on local units: diff --git a/addons/medical/functions/fnc_bodyCleanupLoop.sqf b/addons/medical/functions/fnc_bodyCleanupLoop.sqf index 9f59f32a25..31d1ef8b92 100644 --- a/addons/medical/functions/fnc_bodyCleanupLoop.sqf +++ b/addons/medical/functions/fnc_bodyCleanupLoop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, esteldunedain * Loop that cleans up litter @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - { TRACE_2("body",_x,isPlayer _x); if ((!isNull _x) && {!isPlayer _x}) then {deleteVehicle _x}; diff --git a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf index d31c03db1d..d73a70f657 100644 --- a/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf +++ b/addons/medical/functions/fnc_canAccessMedicalEquipment.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if caller can access targets medical equipment, based upon accessLevel. @@ -15,8 +16,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_caller", "_target"]; private _accessLevel = _target getVariable [QGVAR(allowSharedEquipmentAccess), -1]; diff --git a/addons/medical/functions/fnc_canTreat.sqf b/addons/medical/functions/fnc_canTreat.sqf index 765df301c7..913cc4c30e 100644 --- a/addons/medical/functions/fnc_canTreat.sqf +++ b/addons/medical/functions/fnc_canTreat.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if the treatment action can be performed. @@ -17,8 +18,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_caller", "_target", "_selectionName", "_className"]; if !(_target isKindOf "CAManBase") exitWith { false }; diff --git a/addons/medical/functions/fnc_canTreatCached.sqf b/addons/medical/functions/fnc_canTreatCached.sqf index dd7711936f..35fc3ada22 100644 --- a/addons/medical/functions/fnc_canTreatCached.sqf +++ b/addons/medical/functions/fnc_canTreatCached.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Cached Check if the treatment action can be performed. @@ -17,8 +18,6 @@ * Public: No */ -#include "script_component.hpp" - #define MAX_DURATION_CACHE 2 params ["", "_target", "_selection", "_classname"]; diff --git a/addons/medical/functions/fnc_copyDeadBody.sqf b/addons/medical/functions/fnc_copyDeadBody.sqf index 7bed7f39ec..56687988e4 100644 --- a/addons/medical/functions/fnc_copyDeadBody.sqf +++ b/addons/medical/functions/fnc_copyDeadBody.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Makes a copy of a dead body. For handling dead bodies for actions such as load and carry. @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_oldBody", "_caller"]; if (alive _oldBody) exitWith {_oldBody}; // we only want to do this for dead bodies diff --git a/addons/medical/functions/fnc_createLitter.sqf b/addons/medical/functions/fnc_createLitter.sqf index 85e852d927..349f6252d9 100644 --- a/addons/medical/functions/fnc_createLitter.sqf +++ b/addons/medical/functions/fnc_createLitter.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Spawns litter for the treatment action on the ground around the target @@ -20,8 +21,6 @@ * Public: No */ -#include "script_component.hpp" - #define MIN_ENTRIES_LITTER_CONFIG 3 params ["_caller", "_target", "_selectionName", "_className", "", "_usersOfItems", "_bloodLossOnSelection"]; diff --git a/addons/medical/functions/fnc_determineIfFatal.sqf b/addons/medical/functions/fnc_determineIfFatal.sqf index 9d1940a80a..1cf30acc75 100644 --- a/addons/medical/functions/fnc_determineIfFatal.sqf +++ b/addons/medical/functions/fnc_determineIfFatal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Determine If Fatal @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" #define INCREASE_CHANCE_HEAD 0.05 #define INCREASE_CHANCE_TORSO 0.03 diff --git a/addons/medical/functions/fnc_displayPatientInformation.sqf b/addons/medical/functions/fnc_displayPatientInformation.sqf index fdc87da8b5..3058dd82bf 100644 --- a/addons/medical/functions/fnc_displayPatientInformation.sqf +++ b/addons/medical/functions/fnc_displayPatientInformation.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Displays the patient information for given unit. @@ -15,8 +16,6 @@ * * Public: No */ - -#include "script_component.hpp" #define MAX_DISTANCE 10 // Exit for basic medical diff --git a/addons/medical/functions/fnc_displayTriageCard.sqf b/addons/medical/functions/fnc_displayTriageCard.sqf index c273b1d0f0..1a84b98e87 100644 --- a/addons/medical/functions/fnc_displayTriageCard.sqf +++ b/addons/medical/functions/fnc_displayTriageCard.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Display triage card for a unit @@ -15,8 +16,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_target", ["_show", true]]; GVAR(TriageCardTarget) = if (_show) then {_target} else {ObjNull}; diff --git a/addons/medical/functions/fnc_dropDownTriageCard.sqf b/addons/medical/functions/fnc_dropDownTriageCard.sqf index 3e52d3efc5..c409e39ac0 100644 --- a/addons/medical/functions/fnc_dropDownTriageCard.sqf +++ b/addons/medical/functions/fnc_dropDownTriageCard.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Display triage card for a unit @@ -14,8 +15,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_show"]; disableSerialization; diff --git a/addons/medical/functions/fnc_getBloodLoss.sqf b/addons/medical/functions/fnc_getBloodLoss.sqf index e584b4cd0d..1caff24527 100644 --- a/addons/medical/functions/fnc_getBloodLoss.sqf +++ b/addons/medical/functions/fnc_getBloodLoss.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Calculate the total blood loss of a unit. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - #define BLOODLOSSRATE_BASIC 0.2 // TODO Only use this calculation if medium or higher, otherwise use vanilla calculations (for basic medical). diff --git a/addons/medical/functions/fnc_getBloodPressure.sqf b/addons/medical/functions/fnc_getBloodPressure.sqf index 076d42c286..7a582df5e1 100644 --- a/addons/medical/functions/fnc_getBloodPressure.sqf +++ b/addons/medical/functions/fnc_getBloodPressure.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Calculates the blood volume change and decreases the IVs given to the unit. @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - // Value is taken because with cardic output and resistance at default values, it will put blood pressure High at 120. #define MODIFIER_BP_HIGH 0.229 diff --git a/addons/medical/functions/fnc_getBloodVolumeChange.sqf b/addons/medical/functions/fnc_getBloodVolumeChange.sqf index fcabcd53cf..32bcfb23ed 100644 --- a/addons/medical/functions/fnc_getBloodVolumeChange.sqf +++ b/addons/medical/functions/fnc_getBloodVolumeChange.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Calculates the blood volume change and decreases the IVs given to the unit. @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - /* IV Change per second calculation: 250ml should take 60 seconds to fill. 250/60 = 4.166. diff --git a/addons/medical/functions/fnc_getCardiacOutput.sqf b/addons/medical/functions/fnc_getCardiacOutput.sqf index ef6e75cde4..9fcaad8731 100644 --- a/addons/medical/functions/fnc_getCardiacOutput.sqf +++ b/addons/medical/functions/fnc_getCardiacOutput.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Get the cardiac output from the Heart, based on current Heart Rate and Blood Volume. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - /* Cardiac output (Q or or CO ) is the volume of blood being pumped by the heart, in particular by a left or right ventricle in the CBA_missionTime interval of one minute. CO may be measured in many ways, for example dm3/min (1 dm3 equals 1 litre). diff --git a/addons/medical/functions/fnc_getHeartRateChange.sqf b/addons/medical/functions/fnc_getHeartRateChange.sqf index ac659622b8..dcd35ed476 100644 --- a/addons/medical/functions/fnc_getHeartRateChange.sqf +++ b/addons/medical/functions/fnc_getHeartRateChange.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Get the change in the heart rate. Used for the vitals calculations. Calculated in one seconds. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - #define HEART_RATE_MODIFIER 0.02 params ["_unit"]; diff --git a/addons/medical/functions/fnc_getTriageStatus.sqf b/addons/medical/functions/fnc_getTriageStatus.sqf index ac1ad4aa9a..2b502b563b 100644 --- a/addons/medical/functions/fnc_getTriageStatus.sqf +++ b/addons/medical/functions/fnc_getTriageStatus.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Get the triage status and information from a unit @@ -16,8 +17,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_unit"]; private _status = _unit getVariable [QGVAR(triageLevel), -1]; diff --git a/addons/medical/functions/fnc_getTypeOfDamage.sqf b/addons/medical/functions/fnc_getTypeOfDamage.sqf index b026f41ded..c65f5d78e7 100644 --- a/addons/medical/functions/fnc_getTypeOfDamage.sqf +++ b/addons/medical/functions/fnc_getTypeOfDamage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Get the type of damage based upon the projectile. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_typeOfProjectile"]; diff --git a/addons/medical/functions/fnc_getUnconsciousCondition.sqf b/addons/medical/functions/fnc_getUnconsciousCondition.sqf index f5cb4444bc..436365cc91 100644 --- a/addons/medical/functions/fnc_getUnconsciousCondition.sqf +++ b/addons/medical/functions/fnc_getUnconsciousCondition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Get whatever or not a unit should be or stay unconscious. @@ -14,8 +15,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_unit"]; if (isnil QGVAR(unconsciousConditions)) then { diff --git a/addons/medical/functions/fnc_handleBandageOpening.sqf b/addons/medical/functions/fnc_handleBandageOpening.sqf index 4884b43757..1e80a727df 100644 --- a/addons/medical/functions/fnc_handleBandageOpening.sqf +++ b/addons/medical/functions/fnc_handleBandageOpening.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handles the bandage of a patient. @@ -19,8 +20,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_target", "_impact", "_part", "_injuryIndex", "_injury", "_bandage"]; private _classID = _injury select 1; diff --git a/addons/medical/functions/fnc_handleCollisionDamage.sqf b/addons/medical/functions/fnc_handleCollisionDamage.sqf index e5b553bc15..aaaa3f894b 100644 --- a/addons/medical/functions/fnc_handleCollisionDamage.sqf +++ b/addons/medical/functions/fnc_handleCollisionDamage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_newDamage"]; private _selection = "body"; diff --git a/addons/medical/functions/fnc_handleCreateLitter.sqf b/addons/medical/functions/fnc_handleCreateLitter.sqf index 45ea452782..7a39fe767a 100644 --- a/addons/medical/functions/fnc_handleCreateLitter.sqf +++ b/addons/medical/functions/fnc_handleCreateLitter.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * handle Litter Create @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_litterClass", "_position", "_direction"]; TRACE_3("params",_litterClass,_position,_direction); diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index 242b9a7997..ea4c5d9611 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Glowbal, commy2 * Main HandleDamage EH function. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" _this = _this select [0, 7]; params ["_unit", "_selection", "_damage", "_shooter", "_projectile", "_hitPointIndex"]; diff --git a/addons/medical/functions/fnc_handleDamage_advanced.sqf b/addons/medical/functions/fnc_handleDamage_advanced.sqf index 77d78b94dd..049b6a004c 100644 --- a/addons/medical/functions/fnc_handleDamage_advanced.sqf +++ b/addons/medical/functions/fnc_handleDamage_advanced.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Advanced HandleDamage EH function. @@ -21,8 +22,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfProjectile", "_hitPointNumber", "", "_newDamage"]; // For burning damage we will get a ton of very small hits of damage; they are too small to create any wounds diff --git a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf index 561a929133..8bf6d8f8e0 100644 --- a/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Sets the hitpoint damage for au nit to the correct values @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit"]; if (!local _unit) exitWith {}; diff --git a/addons/medical/functions/fnc_handleDamage_airway.sqf b/addons/medical/functions/fnc_handleDamage_airway.sqf index 7ff2610de3..6b033dee36 100644 --- a/addons/medical/functions/fnc_handleDamage_airway.sqf +++ b/addons/medical/functions/fnc_handleDamage_airway.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handling of the airway injuries upon the handleDamage eventhandler. @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfDamage"]; private _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber); diff --git a/addons/medical/functions/fnc_handleDamage_caching.sqf b/addons/medical/functions/fnc_handleDamage_caching.sqf index c9499361a4..42cb8c3e05 100644 --- a/addons/medical/functions/fnc_handleDamage_caching.sqf +++ b/addons/medical/functions/fnc_handleDamage_caching.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Glowbal * Cache a handleDamage call to execute it 3 frames later @@ -18,7 +19,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_selectionName", "_damage", "_source", "_projectile", "_hitPointIndex"]; @@ -78,11 +78,10 @@ if (_unit getVariable [QGVAR(isFalling), false]) then { if (diag_frameno > (_unit getVariable [QGVAR(frameNo_damageCaching), -3]) + 2) then { _unit setVariable [QGVAR(frameNo_damageCaching), diag_frameno]; - // handle the cached damages 3 frames later + // handle the cached damages 2 frames later [{ - params ["_args", "_idPFH"]; - _args params ["_unit", "_frameno"]; - if (diag_frameno >= _frameno + 2) then { + [{ + params ["_unit"]; _unit setDamage 0; private _cache_params = _unit getVariable [QGVAR(cachedHandleDamageParams), []]; private _cache_damages = _unit getVariable QGVAR(cachedDamages); @@ -90,9 +89,8 @@ if (diag_frameno > (_unit getVariable [QGVAR(frameNo_damageCaching), -3]) + 2) t (_x + [_cache_damages select _forEachIndex]) call FUNC(handleDamage_advanced); } forEach _cache_params; [_unit] call FUNC(handleDamage_advancedSetDamage); - [_idPFH] call CBA_fnc_removePerFrameHandler; - }; - }, 0, [_unit, diag_frameno] ] call CBA_fnc_addPerFrameHandler; + }, _this] call CBA_fnc_execNextFrame; + }, _unit] call CBA_fnc_execNextFrame; _unit setVariable [QGVAR(cachedProjectiles), []]; _unit setVariable [QGVAR(cachedHitPoints), []]; diff --git a/addons/medical/functions/fnc_handleDamage_fractures.sqf b/addons/medical/functions/fnc_handleDamage_fractures.sqf index 546d6623ac..cc36b698c2 100644 --- a/addons/medical/functions/fnc_handleDamage_fractures.sqf +++ b/addons/medical/functions/fnc_handleDamage_fractures.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handling of the fracture injuries upon the handleDamage eventhandler. @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfDamage"]; private _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber); diff --git a/addons/medical/functions/fnc_handleDamage_internalInjuries.sqf b/addons/medical/functions/fnc_handleDamage_internalInjuries.sqf index 97499c53c6..6f96b138c2 100644 --- a/addons/medical/functions/fnc_handleDamage_internalInjuries.sqf +++ b/addons/medical/functions/fnc_handleDamage_internalInjuries.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handling of the internal injuries upon the handleDamage eventhandler. @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_selectionName", "_amountOfDamage", "_sourceOfDamage", "_typeOfDamage"]; private _bodyPartn = [_selectionName] call FUNC(selectionNameToNumber); diff --git a/addons/medical/functions/fnc_handleDamage_wounds.sqf b/addons/medical/functions/fnc_handleDamage_wounds.sqf index 1ab223d14a..fdc06621c5 100644 --- a/addons/medical/functions/fnc_handleDamage_wounds.sqf +++ b/addons/medical/functions/fnc_handleDamage_wounds.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handling of the open wounds & injuries upon the handleDamage eventhandler. @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamage"]; TRACE_6("ACE_DEBUG: HandleDamage Called",_unit, _selectionName, _damage, _shooter, _typeOfProjectile,_typeOfDamage); diff --git a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf index 376d50ff8c..4cc51ce38f 100644 --- a/addons/medical/functions/fnc_handleDamage_woundsOld.sqf +++ b/addons/medical/functions/fnc_handleDamage_woundsOld.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handling of the open wounds & injuries upon the handleDamage eventhandler. @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_selectionName", "_damage", "_typeOfProjectile", "_typeOfDamage"]; TRACE_6("ACE_DEBUG: HandleDamage_WoundsOLD Called",_unit, _selectionName, _damage, _shooter, _typeOfProjectile,_typeOfDamage); diff --git a/addons/medical/functions/fnc_handleInit.sqf b/addons/medical/functions/fnc_handleInit.sqf index 7094219aae..3431713d5d 100644 --- a/addons/medical/functions/fnc_handleInit.sqf +++ b/addons/medical/functions/fnc_handleInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Called when a unit is initialized via XEH_init @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/medical/functions/fnc_handleKilled.sqf b/addons/medical/functions/fnc_handleKilled.sqf index 52b79f8760..9a2e8d2f63 100644 --- a/addons/medical/functions/fnc_handleKilled.sqf +++ b/addons/medical/functions/fnc_handleKilled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Called when a unit is killed @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit"]; if (!local _unit) exitWith {}; diff --git a/addons/medical/functions/fnc_handleLocal.sqf b/addons/medical/functions/fnc_handleLocal.sqf index b9282ef9ee..06047f5545 100644 --- a/addons/medical/functions/fnc_handleLocal.sqf +++ b/addons/medical/functions/fnc_handleLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Called when a unit switched locality @@ -15,9 +16,6 @@ * Public: No */ - -#include "script_component.hpp" - params ["_unit", "_local"]; if (_local) then { // If the unit had a loop tracking its vitals, restart it locally diff --git a/addons/medical/functions/fnc_handleRespawn.sqf b/addons/medical/functions/fnc_handleRespawn.sqf index 99efcaaac1..be8f5f4f29 100644 --- a/addons/medical/functions/fnc_handleRespawn.sqf +++ b/addons/medical/functions/fnc_handleRespawn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Called when a unit is Respawned @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/medical/functions/fnc_handleUnitVitals.sqf b/addons/medical/functions/fnc_handleUnitVitals.sqf index 3bb40dd134..a593c8e579 100644 --- a/addons/medical/functions/fnc_handleUnitVitals.sqf +++ b/addons/medical/functions/fnc_handleUnitVitals.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Updates the vitals. Is expected to be called every second. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_interval"]; TRACE_3("ACE_DEBUG",_unit,_interval,_unit); if (_interval == 0) exitWith {}; diff --git a/addons/medical/functions/fnc_hasItem.sqf b/addons/medical/functions/fnc_hasItem.sqf index c1b84a940a..1174563dfc 100644 --- a/addons/medical/functions/fnc_hasItem.sqf +++ b/addons/medical/functions/fnc_hasItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if the item is present between the patient and the medic @@ -16,8 +17,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_medic", "_patient", "_item"]; if (isNil QGVAR(setting_allowSharedEquipment)) then { diff --git a/addons/medical/functions/fnc_hasItems.sqf b/addons/medical/functions/fnc_hasItems.sqf index e251f22174..1ea0f15b65 100644 --- a/addons/medical/functions/fnc_hasItems.sqf +++ b/addons/medical/functions/fnc_hasItems.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if all items are present between the patient and the medic. @@ -16,8 +17,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_medic", "_patient", "_items"]; private _return = true; diff --git a/addons/medical/functions/fnc_hasMedicalEnabled.sqf b/addons/medical/functions/fnc_hasMedicalEnabled.sqf index d6150e13a1..c034648c33 100644 --- a/addons/medical/functions/fnc_hasMedicalEnabled.sqf +++ b/addons/medical/functions/fnc_hasMedicalEnabled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if unit has CMS enabled @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit"]; private _medicalEnabled = _unit getVariable QGVAR(enableMedical); diff --git a/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf b/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf index ba4aecefa3..852bddfa12 100644 --- a/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf +++ b/addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if unit has a tourniquet applied to the specified bodypart @@ -15,8 +16,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_target", "_selectionName"]; (((_target getVariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select ([_selectionName] call FUNC(selectionNameToNumber))) > 0); diff --git a/addons/medical/functions/fnc_init.sqf b/addons/medical/functions/fnc_init.sqf index f5f484106e..a9f164eb0f 100644 --- a/addons/medical/functions/fnc_init.sqf +++ b/addons/medical/functions/fnc_init.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, commy2 * Initializes unit variables. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/medical/functions/fnc_isBeingCarried.sqf b/addons/medical/functions/fnc_isBeingCarried.sqf index 26ce932901..79a0f4ce9d 100644 --- a/addons/medical/functions/fnc_isBeingCarried.sqf +++ b/addons/medical/functions/fnc_isBeingCarried.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Returns if a target is being carried. (from ace_dragging) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/medical/functions/fnc_isBeingDragged.sqf b/addons/medical/functions/fnc_isBeingDragged.sqf index b0297c0049..e10ba60b8f 100644 --- a/addons/medical/functions/fnc_isBeingDragged.sqf +++ b/addons/medical/functions/fnc_isBeingDragged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Returns if a target is being dragged. (from ace_dragging) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target"]; diff --git a/addons/medical/functions/fnc_isInMedicalFacility.sqf b/addons/medical/functions/fnc_isInMedicalFacility.sqf index 12e52ada19..9d12bd9640 100644 --- a/addons/medical/functions/fnc_isInMedicalFacility.sqf +++ b/addons/medical/functions/fnc_isInMedicalFacility.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Checks if a unit is in a designated medical facility @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/medical/functions/fnc_isInMedicalVehicle.sqf b/addons/medical/functions/fnc_isInMedicalVehicle.sqf index 4182003bad..77b36caa25 100644 --- a/addons/medical/functions/fnc_isInMedicalVehicle.sqf +++ b/addons/medical/functions/fnc_isInMedicalVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Checks if a unit is in a medical vehicle. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; private _vehicle = vehicle _unit; diff --git a/addons/medical/functions/fnc_isInStableCondition.sqf b/addons/medical/functions/fnc_isInStableCondition.sqf index 078079e46e..da56ea402e 100644 --- a/addons/medical/functions/fnc_isInStableCondition.sqf +++ b/addons/medical/functions/fnc_isInStableCondition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if a unit is in a stable condition @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit"]; private _totalBloodLoss = 0; diff --git a/addons/medical/functions/fnc_isMedic.sqf b/addons/medical/functions/fnc_isMedic.sqf index f09fe88dbb..580733b4d5 100644 --- a/addons/medical/functions/fnc_isMedic.sqf +++ b/addons/medical/functions/fnc_isMedic.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, KoffeinFlummi * Check if a unit is any medical class @@ -15,8 +16,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_unit", ["_medicN", 1]]; private _class = _unit getVariable [QGVAR(medicClass), [0, 1] select (_unit getUnitTrait "medic")]; diff --git a/addons/medical/functions/fnc_isMedicalVehicle.sqf b/addons/medical/functions/fnc_isMedicalVehicle.sqf index 66ecf84a07..26f2bd6850 100644 --- a/addons/medical/functions/fnc_isMedicalVehicle.sqf +++ b/addons/medical/functions/fnc_isMedicalVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if vehicle is a medical vehicle @@ -14,8 +15,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_vehicle"]; (_vehicle getVariable [QGVAR(medicClass), getNumber (configFile >> "CfgVehicles" >> typeOf _vehicle >> "attendant")]) > 0 diff --git a/addons/medical/functions/fnc_itemCheck.sqf b/addons/medical/functions/fnc_itemCheck.sqf index 6ab1e490c3..0290deeea8 100644 --- a/addons/medical/functions/fnc_itemCheck.sqf +++ b/addons/medical/functions/fnc_itemCheck.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Replaces vanilla items with ACE ones. @@ -14,8 +15,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_unit"]; while {({_x == "FirstAidKit"} count items _unit) > 0} do { diff --git a/addons/medical/functions/fnc_litterCleanupLoop.sqf b/addons/medical/functions/fnc_litterCleanupLoop.sqf index 6f546b47ed..539ca74e26 100644 --- a/addons/medical/functions/fnc_litterCleanupLoop.sqf +++ b/addons/medical/functions/fnc_litterCleanupLoop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, esteldunedain * Loop that cleans up litter @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - { _x params ["_time", "_objects"]; //Older elements are always at the begining of the array: diff --git a/addons/medical/functions/fnc_medicationEffectLoop.sqf b/addons/medical/functions/fnc_medicationEffectLoop.sqf index c1690806fe..efef65ece9 100644 --- a/addons/medical/functions/fnc_medicationEffectLoop.sqf +++ b/addons/medical/functions/fnc_medicationEffectLoop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, esteldunedain * Medication effect loop for an injection. @@ -19,8 +20,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_variableName", "_amountDecreased","_decreaseRate", "_viscosityAdjustmentRate", "_painReduceRate"]; // If the unit died the loop is finished diff --git a/addons/medical/functions/fnc_modifyMedicalAction.sqf b/addons/medical/functions/fnc_modifyMedicalAction.sqf index 1da4ed20c0..16ea718d72 100644 --- a/addons/medical/functions/fnc_modifyMedicalAction.sqf +++ b/addons/medical/functions/fnc_modifyMedicalAction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Modify the visuals of a medical action point. @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_target", "_player", "_partNumber", "_actionData"]; private _bloodLossOnSelection = 0; diff --git a/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf b/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf index b884e8b82d..e19f670b3a 100644 --- a/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf +++ b/addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Module for adjusting the medical treatment settings @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf b/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf index 51a4be7461..d65afdf7cb 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicRoles.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Assign a medical role to a unit. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf index 61e140d0fd..a1b6303b45 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Register synchronized objects from passed object as a medical facility @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params [["_logic", objNull, [objNull]]]; if (!isNull _logic) then { private _setting = _logic getVariable ["class",0]; diff --git a/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf b/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf index 4d7576f2c2..3eda8f0106 100644 --- a/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf +++ b/addons/medical/functions/fnc_moduleAssignMedicalVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Assign vehicle as a medical vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf b/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf index c73d49458b..6d27cfe803 100644 --- a/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf +++ b/addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Module for adjusting the medical treatment settings @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/medical/functions/fnc_moduleMedicalSettings.sqf b/addons/medical/functions/fnc_moduleMedicalSettings.sqf index 148183ea22..a843d8c1c1 100644 --- a/addons/medical/functions/fnc_moduleMedicalSettings.sqf +++ b/addons/medical/functions/fnc_moduleMedicalSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Module for adjusting the medical damage settings @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/medical/functions/fnc_moduleReviveSettings.sqf b/addons/medical/functions/fnc_moduleReviveSettings.sqf index de9e53820c..d7f54583cf 100644 --- a/addons/medical/functions/fnc_moduleReviveSettings.sqf +++ b/addons/medical/functions/fnc_moduleReviveSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Module for adjusting the medical revive settings @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/medical/functions/fnc_onMedicationUsage.sqf b/addons/medical/functions/fnc_onMedicationUsage.sqf index 95e7d0bf5e..ee45d60a39 100644 --- a/addons/medical/functions/fnc_onMedicationUsage.sqf +++ b/addons/medical/functions/fnc_onMedicationUsage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handles the medication given to a patient. @@ -19,8 +20,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_target", "_className", "_variable", "_maxDosage", "_timeInSystem", "_incompatabileMeds", "_viscosityChange", "_painReduce"]; TRACE_8("params",_target,_className,_variable,_maxDosage,_timeInSystem,_incompatabileMeds,_viscosityChange,_painReduce); diff --git a/addons/medical/functions/fnc_parseConfigForInjuries.sqf b/addons/medical/functions/fnc_parseConfigForInjuries.sqf index 07bd69fa52..c94a4f898f 100644 --- a/addons/medical/functions/fnc_parseConfigForInjuries.sqf +++ b/addons/medical/functions/fnc_parseConfigForInjuries.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Parse the ACE_Medical_Advanced config for all injury types. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _injuriesRootConfig = (configFile >> "ACE_Medical_Advanced" >> "Injuries"); private _allFoundDamageTypes = []; diff --git a/addons/medical/functions/fnc_playInjuredSound.sqf b/addons/medical/functions/fnc_playInjuredSound.sqf index 629b600d49..6955886659 100644 --- a/addons/medical/functions/fnc_playInjuredSound.sqf +++ b/addons/medical/functions/fnc_playInjuredSound.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Play the injured sound for a unit if the unit is damaged. The sound broadcasted across MP. @@ -17,8 +18,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_pain"]; if (!local _unit || !GVAR(enableScreams)) exitWith{}; diff --git a/addons/medical/functions/fnc_reviveStateLoop.sqf b/addons/medical/functions/fnc_reviveStateLoop.sqf index 0ec5f78c85..7e662bdbb1 100644 --- a/addons/medical/functions/fnc_reviveStateLoop.sqf +++ b/addons/medical/functions/fnc_reviveStateLoop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, esteldunedain * Loop that handles a unit in the revive state. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit"]; // If locality changed finish the local loop diff --git a/addons/medical/functions/fnc_selectionNameToNumber.sqf b/addons/medical/functions/fnc_selectionNameToNumber.sqf index 441f4bb31e..c5c0ceb2ed 100644 --- a/addons/medical/functions/fnc_selectionNameToNumber.sqf +++ b/addons/medical/functions/fnc_selectionNameToNumber.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Get the number representation of a selection name. @@ -14,6 +15,4 @@ * Public: yes */ -#include "script_component.hpp" - (["head","body","hand_l","hand_r","leg_l","leg_r"] find (_this select 0)); diff --git a/addons/medical/functions/fnc_serverRemoveBody.sqf b/addons/medical/functions/fnc_serverRemoveBody.sqf index 3c1bfe90a1..3b85fb06a3 100644 --- a/addons/medical/functions/fnc_serverRemoveBody.sqf +++ b/addons/medical/functions/fnc_serverRemoveBody.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Removes corpse. Idealy it is just deleted the next frame, @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_target"]; TRACE_2("",_target,isPlayer _target); diff --git a/addons/medical/functions/fnc_setCardiacArrest.sqf b/addons/medical/functions/fnc_setCardiacArrest.sqf index 5b97b3d50b..a8676c7342 100644 --- a/addons/medical/functions/fnc_setCardiacArrest.sqf +++ b/addons/medical/functions/fnc_setCardiacArrest.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Triggers a unit into the Cardiac Arrest state from CMS. Will put the unit in an unconscious state and run a countdown timer until unit dies. @@ -15,8 +16,6 @@ * Public: yes */ -#include "script_component.hpp" - params ["_unit"]; if (_unit getVariable [QGVAR(inCardiacArrest),false]) exitWith {}; diff --git a/addons/medical/functions/fnc_setDead.sqf b/addons/medical/functions/fnc_setDead.sqf index 3949f2cfd9..ce15a0b548 100644 --- a/addons/medical/functions/fnc_setDead.sqf +++ b/addons/medical/functions/fnc_setDead.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Either kills a unit or puts the unit in a revivable state, depending on the settings. @@ -16,8 +17,6 @@ * Public: yes */ -#include "script_component.hpp" - params ["_unit", ["_force", false], ["_delaySetDamage", false]]; if ((!alive _unit) || {_unit getVariable ["ACE_isDead", false]}) exitWith {true}; diff --git a/addons/medical/functions/fnc_setHitPointDamage.sqf b/addons/medical/functions/fnc_setHitPointDamage.sqf index eb93b6740e..c68feb83c8 100644 --- a/addons/medical/functions/fnc_setHitPointDamage.sqf +++ b/addons/medical/functions/fnc_setHitPointDamage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * My very own setHitPointDamage since BIS' one is buggy when affecting a remote unit. @@ -17,8 +18,6 @@ * * Public: Yes */ - -#include "script_component.hpp" #define LEGDAMAGETRESHOLD1 1 #define LEGDAMAGETRESHOLD2 1.7 #define ARMDAMAGETRESHOLD1 1 diff --git a/addons/medical/functions/fnc_setUnconscious.sqf b/addons/medical/functions/fnc_setUnconscious.sqf index 61d831f533..c2e43e702d 100644 --- a/addons/medical/functions/fnc_setUnconscious.sqf +++ b/addons/medical/functions/fnc_setUnconscious.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Sets a unit in the unconscious state. @@ -17,8 +18,6 @@ * Public: yes */ -#include "script_component.hpp" - #define DEFAULT_DELAY (round(random(10)+5)) // only run this after the settings are initialized @@ -76,7 +75,10 @@ if (vehicle _unit == _unit) then { if (primaryWeapon _unit == "") then { _unit addWeapon "ACE_FakePrimaryWeapon"; }; - _unit selectWeapon (primaryWeapon _unit); + + if (currentWeapon _unit != primaryWeapon _unit) then { + _unit selectWeapon primaryWeapon _unit; + }; }; // We are storing the current animation, so we can use it later on when waking the unit up inside a vehicle diff --git a/addons/medical/functions/fnc_showBloodEffect.sqf b/addons/medical/functions/fnc_showBloodEffect.sqf index 61cd6fe464..47abf0536c 100644 --- a/addons/medical/functions/fnc_showBloodEffect.sqf +++ b/addons/medical/functions/fnc_showBloodEffect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Glowbal * Does the blood screen effect, just like BIS_fnc_bloodeffect, but in non-sheduled environment. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_bloodRemaining"]; diff --git a/addons/medical/functions/fnc_translateSelections.sqf b/addons/medical/functions/fnc_translateSelections.sqf index e6624507d1..3990429e91 100644 --- a/addons/medical/functions/fnc_translateSelections.sqf +++ b/addons/medical/functions/fnc_translateSelections.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Translate selection names into medical usable hit selection names. @@ -20,7 +21,6 @@ * * Public: No */ -#include "script_component.hpp" #define HEAD_SELECTIONS ["face_hub", "neck", "head"] #define HEAD_HITPOINTS ["hitface", "hitneck", "hithead"] diff --git a/addons/medical/functions/fnc_treatment.sqf b/addons/medical/functions/fnc_treatment.sqf index 80f097fee4..0ed4694c2f 100644 --- a/addons/medical/functions/fnc_treatment.sqf +++ b/addons/medical/functions/fnc_treatment.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, KoffeinFlummi * Starts the treatment process @@ -17,8 +18,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_caller", "_target", "_selectionName", "_className"]; // If the cursorMenu is open, the loading bar will fail. If we execute the function one frame later, it will work fine diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf index aedcffdb49..5c673c080a 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Callback for the CPR treatment action on success. @@ -17,8 +18,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_caller", "_target", "_selectionName", "_className", "_items"]; if (alive _target && {(_target getVariable [QGVAR(inCardiacArrest), false] || _target getVariable [QGVAR(inReviveState), false])}) then { diff --git a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf index a893feedef..9659ee7481 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * local Callback for the CPR treatment action on success. @@ -15,8 +16,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_caller","_target"]; if (_target getVariable [QGVAR(inReviveState), false]) then { diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf index 0dd9742c08..9cb4ac423b 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * IV Treatment callback @@ -19,8 +20,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_caller", "_target", "_selectionName", "_className", "_items", "", ["_specificSpot", -1]]; [_target, "activity", LSTRING(Activity_bandagedPatient), [[_caller, false, true] call EFUNC(common,getName)]] call FUNC(addToLog); diff --git a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf index c581d4ddbe..ba94eb2d01 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handles the bandage of a patient. @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_target", "_bandage", "_selectionName", ["_specificClass", -1]]; // Ensure it is a valid bodypart diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf index 5b20863338..d5c6427aa8 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller", "_target", "_selectionName", "_className", "_items"]; if (local _target) then { diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf index bd31e58ba9..d2435e0ee0 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller", "_target"]; if (alive _target) exitWith { diff --git a/addons/medical/functions/fnc_treatmentAdvanced_fullHealTreatmentTime.sqf b/addons/medical/functions/fnc_treatmentAdvanced_fullHealTreatmentTime.sqf index b2b222e601..35c9c5133f 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_fullHealTreatmentTime.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_fullHealTreatmentTime.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the personal aid kit treatment time based on amount of damage to heal @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _totalDamage = 0; diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf index a58ded3de3..b48e2bb2da 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medication.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * IV Treatment callback @@ -18,8 +19,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_caller", "_target", "_selectionName", "_className", "_items"]; TRACE_5("params",_caller,_target,_selectionName,_className,_items); diff --git a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf index 32b7e9d2c1..4435ae4f48 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handles the medication given to a patient. @@ -16,8 +17,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_target", "_className", "_partNumber"]; TRACE_3("params",_target,_className,_partNumber); diff --git a/addons/medical/functions/fnc_treatmentAdvanced_surgicalKit_onProgress.sqf b/addons/medical/functions/fnc_treatmentAdvanced_surgicalKit_onProgress.sqf index a73661ac77..7f7cb481aa 100644 --- a/addons/medical/functions/fnc_treatmentAdvanced_surgicalKit_onProgress.sqf +++ b/addons/medical/functions/fnc_treatmentAdvanced_surgicalKit_onProgress.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Handles treatment via surgical kit per frame @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_args", "_elapsedTime", "_totalTime"]; _args params ["_caller", "_target"]; diff --git a/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf b/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf index 5ef368922d..297e5a5e43 100644 --- a/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Callback when the bloodbag treatment is complete @@ -17,8 +18,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller", "_target", "_treatmentClassname"]; if (local _target) then { diff --git a/addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf index 1e56eb3d88..91626095b5 100644 --- a/addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Local callback when the bloodbag treatment is complete @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" #define BLOODBAGHEAL 70 params ["_target", "_treatmentClassname"]; diff --git a/addons/medical/functions/fnc_treatmentBasic_epipen.sqf b/addons/medical/functions/fnc_treatmentBasic_epipen.sqf index 161626bb41..4e67cfe697 100644 --- a/addons/medical/functions/fnc_treatmentBasic_epipen.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_epipen.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Callback when the epipen treatment is complete @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_caller", "_target","_className"]; diff --git a/addons/medical/functions/fnc_treatmentBasic_morphine.sqf b/addons/medical/functions/fnc_treatmentBasic_morphine.sqf index f011ab41a2..dbfbecab7f 100644 --- a/addons/medical/functions/fnc_treatmentBasic_morphine.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_morphine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Callback when the morphine treatment is complete @@ -16,8 +17,6 @@ * * Public: No */ - -#include "script_component.hpp" #define MORPHINEHEAL 0.4 params ["_caller", "_target"]; diff --git a/addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf b/addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf index f24719d352..2a2c4358d5 100644 --- a/addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf +++ b/addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Local callback when the morphine treatment is complete @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" #define MORPHINEHEAL 0.4 params ["_target"]; diff --git a/addons/medical/functions/fnc_treatmentIV.sqf b/addons/medical/functions/fnc_treatmentIV.sqf index a393acbb13..8da7a3bcf6 100644 --- a/addons/medical/functions/fnc_treatmentIV.sqf +++ b/addons/medical/functions/fnc_treatmentIV.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Patient IV Treatment callback @@ -17,8 +18,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_caller", "_target", "_selectionName", "_className", "_items"]; if (_items isEqualTo []) exitWith {false}; diff --git a/addons/medical/functions/fnc_treatmentIVLocal.sqf b/addons/medical/functions/fnc_treatmentIVLocal.sqf index 63d8292b0f..1f59edbc35 100644 --- a/addons/medical/functions/fnc_treatmentIVLocal.sqf +++ b/addons/medical/functions/fnc_treatmentIVLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * IV Treatment local callback @@ -16,8 +17,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_target", "_treatmentClassname"]; private _bloodVolume = _target getVariable [QGVAR(bloodVolume), 100]; diff --git a/addons/medical/functions/fnc_treatmentTourniquet.sqf b/addons/medical/functions/fnc_treatmentTourniquet.sqf index cb7e6d21d0..23de5f177a 100644 --- a/addons/medical/functions/fnc_treatmentTourniquet.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquet.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Apply a tourniquet to the patient @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller", "_target", "_selectionName", "_className", "_items"]; if (count _items == 0) exitWith {false}; diff --git a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf index e7e9ff7ca1..dc05d6ce5f 100644 --- a/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf +++ b/addons/medical/functions/fnc_treatmentTourniquetLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Apply a tourniquet to the patient, local callback. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "_tourniquetItem", "_selectionName"]; diff --git a/addons/medical/functions/fnc_treatment_failure.sqf b/addons/medical/functions/fnc_treatment_failure.sqf index fbd69dde5b..02d3153271 100644 --- a/addons/medical/functions/fnc_treatment_failure.sqf +++ b/addons/medical/functions/fnc_treatment_failure.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Glowbal * Callback when the treatment fails @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_args"]; _args params ["_caller", "_target", "_selectionName", "_className", "_items", "_usersOfItems"]; diff --git a/addons/medical/functions/fnc_treatment_success.sqf b/addons/medical/functions/fnc_treatment_success.sqf index 37b5f8a51d..17c9de62ba 100644 --- a/addons/medical/functions/fnc_treatment_success.sqf +++ b/addons/medical/functions/fnc_treatment_success.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Glowbal * Callback when the treatment is completed @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_args"]; _args params ["_caller", "_target", "_selectionName", "_className", "_items", "_usersOfItems"]; diff --git a/addons/medical/functions/fnc_unconsciousPFH.sqf b/addons/medical/functions/fnc_unconsciousPFH.sqf index d63e78db61..31f4d60d4b 100644 --- a/addons/medical/functions/fnc_unconsciousPFH.sqf +++ b/addons/medical/functions/fnc_unconsciousPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * PFH logic for unconscious state @@ -21,8 +22,6 @@ * Public: yes */ -#include "script_component.hpp" - params ["_args", "_idPFH"]; _args params ["_unit", "_originalPos", "_startingTime", "_minWaitingTime", "_hasMovedOut", "_parachuteCheck"]; diff --git a/addons/medical/functions/fnc_useItem.sqf b/addons/medical/functions/fnc_useItem.sqf index ec032a279f..49efceac05 100644 --- a/addons/medical/functions/fnc_useItem.sqf +++ b/addons/medical/functions/fnc_useItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Use Equipment if any is available. Priority: 1) Medic, 2) Patient. If in vehicle: 3) Crew @@ -17,8 +18,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_medic", "_patient", "_item"]; if (isNil QGVAR(setting_allowSharedEquipment)) then { diff --git a/addons/medical/functions/fnc_useItems.sqf b/addons/medical/functions/fnc_useItems.sqf index f898ea72f5..ef3dc78ab3 100644 --- a/addons/medical/functions/fnc_useItems.sqf +++ b/addons/medical/functions/fnc_useItems.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Use Equipment items if any is available. Priority: 1) Medic, 2) Patient. If in vehicle: 3) Crew @@ -16,8 +17,6 @@ * Public: Yes */ -#include "script_component.hpp" - params ["_medic", "_patient", "_items"]; private _itemsUsedBy = []; diff --git a/addons/medical/functions/fnc_vitalLoop.sqf b/addons/medical/functions/fnc_vitalLoop.sqf index a9efa81719..44cd1e4d17 100644 --- a/addons/medical/functions/fnc_vitalLoop.sqf +++ b/addons/medical/functions/fnc_vitalLoop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, esteldunedain * Vital loop for a unit. @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_lastTime"]; // If the unit died the loop is finished diff --git a/addons/medical/stringtable.xml b/addons/medical/stringtable.xml index 03a7033bf4..afbdc7ebdc 100644 --- a/addons/medical/stringtable.xml +++ b/addons/medical/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/medical_ai/functions/fnc_canRequestMedic.sqf b/addons/medical_ai/functions/fnc_canRequestMedic.sqf index 39a5063f24..ab03042899 100644 --- a/addons/medical_ai/functions/fnc_canRequestMedic.sqf +++ b/addons/medical_ai/functions/fnc_canRequestMedic.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if there is a medic available in the unit's group. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Note: Although an unconscious unit cannot call for a medic itself, // we ignore this here. We need to "notice" the medic that he should diff --git a/addons/medical_ai/functions/fnc_healSelf.sqf b/addons/medical_ai/functions/fnc_healSelf.sqf index 253dcd2a45..6cb0c3257f 100644 --- a/addons/medical_ai/functions/fnc_healSelf.sqf +++ b/addons/medical_ai/functions/fnc_healSelf.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Makes the unit heal itself. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Player will have to do this manually of course if ([_this] call EFUNC(common,isPlayer)) exitWith {}; diff --git a/addons/medical_ai/functions/fnc_healUnit.sqf b/addons/medical_ai/functions/fnc_healUnit.sqf index 78471469da..2d9116be4f 100644 --- a/addons/medical_ai/functions/fnc_healUnit.sqf +++ b/addons/medical_ai/functions/fnc_healUnit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Makes a medic heal the next unit that needs treatment. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Can't heal other units when unconscious if (_this getVariable ["ACE_isUnconscious", false]) exitWith {}; diff --git a/addons/medical_ai/functions/fnc_isInjured.sqf b/addons/medical_ai/functions/fnc_isInjured.sqf index e91802f912..8cbe280914 100644 --- a/addons/medical_ai/functions/fnc_isInjured.sqf +++ b/addons/medical_ai/functions/fnc_isInjured.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if a unit needs treatment. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if !(alive _this) exitWith {false}; diff --git a/addons/medical_ai/functions/fnc_isSafe.sqf b/addons/medical_ai/functions/fnc_isSafe.sqf index de7d9667cc..b18adbdc1c 100644 --- a/addons/medical_ai/functions/fnc_isSafe.sqf +++ b/addons/medical_ai/functions/fnc_isSafe.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if a unit is currently considered safe enough to treat itself. @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" (getSuppression _this == 0) && {CBA_missionTime - (_this getVariable [QGVAR(lastFired), -30]) > 30} diff --git a/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf b/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf index de2c0ee30e..92d5460daf 100644 --- a/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf +++ b/addons/medical_ai/functions/fnc_playTreatmentAnim.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Plays the corresponding treatment animation. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_isBandage", "_isSelfTreatment"]; if (vehicle _unit != _unit) exitWith {}; diff --git a/addons/medical_ai/functions/fnc_requestMedic.sqf b/addons/medical_ai/functions/fnc_requestMedic.sqf index 6bb3229e9a..450911c801 100644 --- a/addons/medical_ai/functions/fnc_requestMedic.sqf +++ b/addons/medical_ai/functions/fnc_requestMedic.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Sends a request to the units assigned medic to heal it. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _assignedMedic = _this getVariable QGVAR(assignedMedic); private _healQueue = _assignedMedic getVariable [QGVAR(healQueue), []]; diff --git a/addons/medical_ai/functions/fnc_wasRequested.sqf b/addons/medical_ai/functions/fnc_wasRequested.sqf index c340ff7b9e..479dc0c880 100644 --- a/addons/medical_ai/functions/fnc_wasRequested.sqf +++ b/addons/medical_ai/functions/fnc_wasRequested.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if the unit was requested to treat another unit. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _healQueue = _this getVariable [QGVAR(healQueue), []]; !(_healQueue isEqualTo []) diff --git a/addons/medical_ai/stringtable.xml b/addons/medical_ai/stringtable.xml index 21027747a5..9519a273c2 100644 --- a/addons/medical_ai/stringtable.xml +++ b/addons/medical_ai/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -6,7 +6,7 @@ 次に AI 治療を有効 AI医疗启用 AI醫療啟用 - AI medica per: + AI medica abilitata per: Enable AI units to heal themselves and each other. diff --git a/addons/medical_blood/functions/fnc_createBlood.sqf b/addons/medical_blood/functions/fnc_createBlood.sqf index 88d35ca7a6..8d3fbc8776 100644 --- a/addons/medical_blood/functions/fnc_createBlood.sqf +++ b/addons/medical_blood/functions/fnc_createBlood.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Spawn a blood drop. @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_type", "_pos"]; TRACE_2("creating blood",_type,_pos); diff --git a/addons/medical_blood/functions/fnc_hit.sqf b/addons/medical_blood/functions/fnc_hit.sqf index 3c0251a437..17df627f1f 100644 --- a/addons/medical_blood/functions/fnc_hit.sqf +++ b/addons/medical_blood/functions/fnc_hit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handle unit hit eventhandler @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_causedBy", "_damage"]; diff --git a/addons/medical_blood/functions/fnc_isBleeding.sqf b/addons/medical_blood/functions/fnc_isBleeding.sqf index 57f68c7c8d..73e5c10e6f 100644 --- a/addons/medical_blood/functions/fnc_isBleeding.sqf +++ b/addons/medical_blood/functions/fnc_isBleeding.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if is bleeding @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/medical_blood/functions/fnc_onBleeding.sqf b/addons/medical_blood/functions/fnc_onBleeding.sqf index 4357bc382a..e21f68f02f 100644 --- a/addons/medical_blood/functions/fnc_onBleeding.sqf +++ b/addons/medical_blood/functions/fnc_onBleeding.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * handle bleeding state (state machine) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/medical_blood/functions/fnc_spurt.sqf b/addons/medical_blood/functions/fnc_spurt.sqf index aaaa75894e..6f1dbaaa1d 100644 --- a/addons/medical_blood/functions/fnc_spurt.sqf +++ b/addons/medical_blood/functions/fnc_spurt.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Sickboy * Spurt blood on the ground @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - #define MAXIMUM_DROPS 4 #define DISTANCE_BETWEEN_DROPS 0.20 #define OFFSET 0.25 diff --git a/addons/medical_blood/stringtable.xml b/addons/medical_blood/stringtable.xml index 0464d661b7..d58f41bfc4 100644 --- a/addons/medical_blood/stringtable.xml +++ b/addons/medical_blood/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/medical_menu/functions/fnc_canOpenMenu.sqf b/addons/medical_menu/functions/fnc_canOpenMenu.sqf index 1ef7dccf5b..f69cf80d12 100644 --- a/addons/medical_menu/functions/fnc_canOpenMenu.sqf +++ b/addons/medical_menu/functions/fnc_canOpenMenu.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if ACE_player can Open the medical menu @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_caller", "_target"]; diff --git a/addons/medical_menu/functions/fnc_collectActions.sqf b/addons/medical_menu/functions/fnc_collectActions.sqf index af6742188e..5353582fb2 100644 --- a/addons/medical_menu/functions/fnc_collectActions.sqf +++ b/addons/medical_menu/functions/fnc_collectActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Collect treatment actions from medical config @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _configBasic = (configFile >> "ACE_Medical_Actions" >> "Basic"); private _configAdvanced = (configFile >> "ACE_Medical_Actions" >> "Advanced"); diff --git a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf index 293eb07836..eac639c4d5 100644 --- a/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf +++ b/addons/medical_menu/functions/fnc_getTreatmentOptions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Grab available treatment options for given category @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_target", "_name"]; diff --git a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf index 4cb8f4ceab..55de1339d0 100644 --- a/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf +++ b/addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Display the available treatment options in category @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define START_IDC 20 #define END_IDC 27 diff --git a/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf b/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf index 946ee2d0ef..988022d7a6 100644 --- a/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf +++ b/addons/medical_menu/functions/fnc_handleUI_dropDownTriageCard.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handle the triage card display @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; diff --git a/addons/medical_menu/functions/fnc_module.sqf b/addons/medical_menu/functions/fnc_module.sqf index f056082743..bdb6f33086 100644 --- a/addons/medical_menu/functions/fnc_module.sqf +++ b/addons/medical_menu/functions/fnc_module.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Module for adjusting the medical menu settings @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/medical_menu/functions/fnc_onMenuClose.sqf b/addons/medical_menu/functions/fnc_onMenuClose.sqf index 656336eb4e..f6318263dd 100644 --- a/addons/medical_menu/functions/fnc_onMenuClose.sqf +++ b/addons/medical_menu/functions/fnc_onMenuClose.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: joko // Jonas * Handle medical menu closed @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (EGVAR(interact_menu,menuBackground)==1) then {[QGVAR(id), false] call EFUNC(common,blurScreen);}; if (EGVAR(interact_menu,menuBackground)==2) then {(uiNamespace getVariable [QEGVAR(interact_menu,menuBackground), displayNull]) closeDisplay 0;}; diff --git a/addons/medical_menu/functions/fnc_onMenuOpen.sqf b/addons/medical_menu/functions/fnc_onMenuOpen.sqf index 3b933d1862..991529712a 100644 --- a/addons/medical_menu/functions/fnc_onMenuOpen.sqf +++ b/addons/medical_menu/functions/fnc_onMenuOpen.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handle medical menu opened @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define MAX_DISTANCE 10 params ["_display"]; diff --git a/addons/medical_menu/functions/fnc_openMenu.sqf b/addons/medical_menu/functions/fnc_openMenu.sqf index e0de46dba8..a492da8c43 100644 --- a/addons/medical_menu/functions/fnc_openMenu.sqf +++ b/addons/medical_menu/functions/fnc_openMenu.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Open the medical menu for target @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_interactionTarget"]; diff --git a/addons/medical_menu/functions/fnc_setTriageStatus.sqf b/addons/medical_menu/functions/fnc_setTriageStatus.sqf index 66efd6ac0c..9580a051e8 100644 --- a/addons/medical_menu/functions/fnc_setTriageStatus.sqf +++ b/addons/medical_menu/functions/fnc_setTriageStatus.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Set the triage status of object @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "_status"]; diff --git a/addons/medical_menu/functions/fnc_updateActivityLog.sqf b/addons/medical_menu/functions/fnc_updateActivityLog.sqf index 7406e25f33..c99bc1ef4f 100644 --- a/addons/medical_menu/functions/fnc_updateActivityLog.sqf +++ b/addons/medical_menu/functions/fnc_updateActivityLog.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Update the activity log @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_display", "_logs"]; diff --git a/addons/medical_menu/functions/fnc_updateBodyImage.sqf b/addons/medical_menu/functions/fnc_updateBodyImage.sqf index 1d83b54372..234556a969 100644 --- a/addons/medical_menu/functions/fnc_updateBodyImage.sqf +++ b/addons/medical_menu/functions/fnc_updateBodyImage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Update the body image on the menu @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_selectionBloodLoss", "_damaged", "_display"]; diff --git a/addons/medical_menu/functions/fnc_updateIcons.sqf b/addons/medical_menu/functions/fnc_updateIcons.sqf index 37508bd2b0..2d437612d7 100644 --- a/addons/medical_menu/functions/fnc_updateIcons.sqf +++ b/addons/medical_menu/functions/fnc_updateIcons.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Update the category icons @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define START_IDC 111 #define END_IDC 118 diff --git a/addons/medical_menu/functions/fnc_updateInformationLists.sqf b/addons/medical_menu/functions/fnc_updateInformationLists.sqf index d6ff631df8..25f457503c 100644 --- a/addons/medical_menu/functions/fnc_updateInformationLists.sqf +++ b/addons/medical_menu/functions/fnc_updateInformationLists.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Update the treatment information list @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_display", "_genericMessages", "_allInjuryTexts"]; diff --git a/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf b/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf index 836ebafca2..c398faaf14 100644 --- a/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf +++ b/addons/medical_menu/functions/fnc_updateQuickViewLog.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Update the quick view log @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_display", "_logs"]; diff --git a/addons/medical_menu/functions/fnc_updateUIInfo.sqf b/addons/medical_menu/functions/fnc_updateUIInfo.sqf index 5fef1ff2a4..3c54cd71f0 100644 --- a/addons/medical_menu/functions/fnc_updateUIInfo.sqf +++ b/addons/medical_menu/functions/fnc_updateUIInfo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Update all UI information in the medical menu @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "_display"]; diff --git a/addons/medical_menu/stringtable.xml b/addons/medical_menu/stringtable.xml index 8398a96a01..a935197300 100644 --- a/addons/medical_menu/stringtable.xml +++ b/addons/medical_menu/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/microdagr/ACE_Settings.hpp b/addons/microdagr/ACE_Settings.hpp index f1e7595b74..fa51a6535d 100644 --- a/addons/microdagr/ACE_Settings.hpp +++ b/addons/microdagr/ACE_Settings.hpp @@ -1,10 +1,5 @@ class ACE_Settings { class GVAR(mapDataAvailable) { - displayName = CSTRING(MapDataAvailable_DisplayName); - description = CSTRING(MapDataAvailable_Description); - value = 2; - typeName = "SCALAR"; - isClientSettable = 0; - values[] = {CSTRING(MapFill_None), CSTRING(MapFill_OnlyRoads), CSTRING(MapFill_Full)}; + movedToSQF = 1; }; }; diff --git a/addons/microdagr/XEH_clientInit.sqf b/addons/microdagr/XEH_clientInit.sqf index d82721e697..7a8d775a05 100644 --- a/addons/microdagr/XEH_clientInit.sqf +++ b/addons/microdagr/XEH_clientInit.sqf @@ -5,7 +5,7 @@ if (!hasInterface) exitWith {}; //Add deviceKey entry: private _conditonCode = { - ("ACE_microDAGR" in (items ACE_player)) + "ACE_microDAGR" in (ACE_player call EFUNC(common,uniqueItems)) }; private _toggleCode = { if !([ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)) exitWith {}; diff --git a/addons/microdagr/XEH_preInit.sqf b/addons/microdagr/XEH_preInit.sqf index c6cdd0bbef..b46948b0bb 100644 --- a/addons/microdagr/XEH_preInit.sqf +++ b/addons/microdagr/XEH_preInit.sqf @@ -9,4 +9,6 @@ PREP_RECOMPILE_END; //Functions that are called for each draw of the map: GVAR(miniMapDrawHandlers) = []; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf b/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf index 7e0049d007..ece62c22e9 100644 --- a/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf +++ b/addons/microdagr/functions/fnc_appMarkKeypadEntry.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles the keypad entries from the "Mark" Application @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_keypadButton"]; diff --git a/addons/microdagr/functions/fnc_appMenuButtonConnectRangefinder.sqf b/addons/microdagr/functions/fnc_appMenuButtonConnectRangefinder.sqf index 589ec096fb..4aa01155ca 100644 --- a/addons/microdagr/functions/fnc_appMenuButtonConnectRangefinder.sqf +++ b/addons/microdagr/functions/fnc_appMenuButtonConnectRangefinder.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles the "Connect To" button from the menu application @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(currentWaypoint) = [-2, -1] select (GVAR(currentWaypoint) == -2); GVAR(rangeFinderPositionASL) = []; diff --git a/addons/microdagr/functions/fnc_appSettingsLBClick.sqf b/addons/microdagr/functions/fnc_appSettingsLBClick.sqf index 9e808559b2..5c5c511ca6 100644 --- a/addons/microdagr/functions/fnc_appSettingsLBClick.sqf +++ b/addons/microdagr/functions/fnc_appSettingsLBClick.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles double clicking on the setting listbox @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; params ["", "_itemClicked"]; diff --git a/addons/microdagr/functions/fnc_appWaypointsButtonDeleteWP.sqf b/addons/microdagr/functions/fnc_appWaypointsButtonDeleteWP.sqf index c03ff06265..61508a1553 100644 --- a/addons/microdagr/functions/fnc_appWaypointsButtonDeleteWP.sqf +++ b/addons/microdagr/functions/fnc_appWaypointsButtonDeleteWP.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles clicking the delete button from the waypoint application @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; private _display = uiNamespace getVariable [[QGVAR(RscTitleDisplay), QGVAR(DialogDisplay)] select (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG), displayNull]; diff --git a/addons/microdagr/functions/fnc_appWaypointsButtonSetWP.sqf b/addons/microdagr/functions/fnc_appWaypointsButtonSetWP.sqf index b0d10667a0..80d5cfaef6 100644 --- a/addons/microdagr/functions/fnc_appWaypointsButtonSetWP.sqf +++ b/addons/microdagr/functions/fnc_appWaypointsButtonSetWP.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles clicking the setWP button from the waypoint application @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; params ["_wpButton"]; diff --git a/addons/microdagr/functions/fnc_canShow.sqf b/addons/microdagr/functions/fnc_canShow.sqf index cb652b9214..0c80896661 100644 --- a/addons/microdagr/functions/fnc_canShow.sqf +++ b/addons/microdagr/functions/fnc_canShow.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Tests if the dagr can be shown in a mode @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_showType"]; private _returnValue = false; @@ -22,12 +22,12 @@ _returnValue = switch (_showType) do { case (DISPLAY_MODE_CLOSED): { true }; //Can always close case (DISPLAY_MODE_HIDDEN): { true }; //Can always hide case (DISPLAY_MODE_DIALOG): { - ("ACE_microDAGR" in (items ACE_player)) && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)} + ("ACE_microDAGR" in (ACE_player call EFUNC(common,uniqueItems))) && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)} }; case (DISPLAY_MODE_DISPLAY): { //Can't have minimap up while zoomed in on foot, but allow drivers to use while in "Gunner" to handle non-3d vehicles like most tanks ((cameraView != "GUNNER") || {(vehicle ACE_player != ACE_player) && {driver vehicle ACE_player == ACE_player}}) && - {"ACE_microDAGR" in (items ACE_player)} && + {"ACE_microDAGR" in (ACE_player call EFUNC(common,uniqueItems))} && {[ACE_player, objNull, ["notOnMap", "isNotInside", "isNotSitting"]] call EFUNC(common,canInteractWith)} }; default { false }; diff --git a/addons/microdagr/functions/fnc_deviceAddWaypoint.sqf b/addons/microdagr/functions/fnc_deviceAddWaypoint.sqf index ded268299c..443ab193e4 100644 --- a/addons/microdagr/functions/fnc_deviceAddWaypoint.sqf +++ b/addons/microdagr/functions/fnc_deviceAddWaypoint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Adds a waypoint to the "device" @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_waypointName","_waypointPosASL"]; diff --git a/addons/microdagr/functions/fnc_deviceDeleteWaypoint.sqf b/addons/microdagr/functions/fnc_deviceDeleteWaypoint.sqf index b2e4f13d06..895b64bb38 100644 --- a/addons/microdagr/functions/fnc_deviceDeleteWaypoint.sqf +++ b/addons/microdagr/functions/fnc_deviceDeleteWaypoint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Deletes a waypoint from the "device" @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_wpIndex"]; diff --git a/addons/microdagr/functions/fnc_deviceGetWaypoints.sqf b/addons/microdagr/functions/fnc_deviceGetWaypoints.sqf index da3484ceb0..c231b583b4 100644 --- a/addons/microdagr/functions/fnc_deviceGetWaypoints.sqf +++ b/addons/microdagr/functions/fnc_deviceGetWaypoints.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Gets all waypoints from the "device" @@ -14,6 +15,5 @@ * * Public: No */ -#include "script_component.hpp" (ACE_player getVariable [QGVAR(waypoints), []]) diff --git a/addons/microdagr/functions/fnc_dialogClosedEH.sqf b/addons/microdagr/functions/fnc_dialogClosedEH.sqf index 5180734644..fc94b101f5 100644 --- a/addons/microdagr/functions/fnc_dialogClosedEH.sqf +++ b/addons/microdagr/functions/fnc_dialogClosedEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles the dialog closeing, switches back to display mode @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG) then { [-1] call FUNC(saveCurrentAndSetNewMode); diff --git a/addons/microdagr/functions/fnc_mapButtonDownEH.sqf b/addons/microdagr/functions/fnc_mapButtonDownEH.sqf index 566f08dc66..9ca55bc5ab 100644 --- a/addons/microdagr/functions/fnc_mapButtonDownEH.sqf +++ b/addons/microdagr/functions/fnc_mapButtonDownEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles right clicking on the map ('dragging' the map) @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "_mouseButton"]; diff --git a/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf b/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf index 02e111929d..aeb73414f5 100644 --- a/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf +++ b/addons/microdagr/functions/fnc_mapDoubleTapEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles the double tapping either of the 2 mini-maps @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_theMap", "_mouseButton", "_xPos", "_yPos"]; diff --git a/addons/microdagr/functions/fnc_mapOnDrawEH.sqf b/addons/microdagr/functions/fnc_mapOnDrawEH.sqf index 0c1925f1f8..15c1b0a59c 100644 --- a/addons/microdagr/functions/fnc_mapOnDrawEH.sqf +++ b/addons/microdagr/functions/fnc_mapOnDrawEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles the draw event from all 3 maps (compass + 2 minimaps) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_theMap"]; diff --git a/addons/microdagr/functions/fnc_modeMapButtons.sqf b/addons/microdagr/functions/fnc_modeMapButtons.sqf index a0d74bec49..8ed8171535 100644 --- a/addons/microdagr/functions/fnc_modeMapButtons.sqf +++ b/addons/microdagr/functions/fnc_modeMapButtons.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Takes some arguments and returns something or other. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_mode"]; diff --git a/addons/microdagr/functions/fnc_moduleMapFill.sqf b/addons/microdagr/functions/fnc_moduleMapFill.sqf index 46b071122a..01e6af799f 100644 --- a/addons/microdagr/functions/fnc_moduleMapFill.sqf +++ b/addons/microdagr/functions/fnc_moduleMapFill.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Function for the module (handles the map fill level) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/microdagr/functions/fnc_openDisplay.sqf b/addons/microdagr/functions/fnc_openDisplay.sqf index 0f407138f5..775378a533 100644 --- a/addons/microdagr/functions/fnc_openDisplay.sqf +++ b/addons/microdagr/functions/fnc_openDisplay.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Changes the display mode of the MicroDAGR. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_newDisplayShowMode", -1, [-1]]]; private _oldShowMode = GVAR(currentShowMode); @@ -73,7 +73,7 @@ if ((_oldShowMode == DISPLAY_MODE_CLOSED) && {GVAR(currentShowMode) != DISPLAY_M [{ params ["_args", "_idPFH"]; _args params ["_player"]; - if ((isNull ACE_player) || {!alive ACE_player} || {ACE_player != _player} || {!("ACE_microDAGR" in (items ACE_player))} || {GVAR(currentShowMode) == DISPLAY_MODE_CLOSED}) then { + if ((isNull ACE_player) || {!alive ACE_player} || {ACE_player != _player} || {!("ACE_microDAGR" in (ACE_player call EFUNC(common,uniqueItems)))} || {GVAR(currentShowMode) == DISPLAY_MODE_CLOSED}) then { //Close Display if still open: if (GVAR(currentShowMode) != DISPLAY_MODE_CLOSED) then { [DISPLAY_MODE_CLOSED] call FUNC(openDisplay); diff --git a/addons/microdagr/functions/fnc_recieveRangefinderData.sqf b/addons/microdagr/functions/fnc_recieveRangefinderData.sqf index 9d9bec33ef..640c42cfe4 100644 --- a/addons/microdagr/functions/fnc_recieveRangefinderData.sqf +++ b/addons/microdagr/functions/fnc_recieveRangefinderData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Recieves the data packet from the vector rangefinder @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_slopeDistance", "_azimuth", "_inclination"]; if (GVAR(currentWaypoint) != -2) exitWith {}; //Only take waypoint when "connected" diff --git a/addons/microdagr/functions/fnc_saveCurrentAndSetNewMode.sqf b/addons/microdagr/functions/fnc_saveCurrentAndSetNewMode.sqf index 9c98f2f7dc..973e0ac7fb 100644 --- a/addons/microdagr/functions/fnc_saveCurrentAndSetNewMode.sqf +++ b/addons/microdagr/functions/fnc_saveCurrentAndSetNewMode.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Saves the current mode and sets a new mode @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_newMode"]; disableSerialization; diff --git a/addons/microdagr/functions/fnc_showApplicationPage.sqf b/addons/microdagr/functions/fnc_showApplicationPage.sqf index c944aa6546..1ba8a36d45 100644 --- a/addons/microdagr/functions/fnc_showApplicationPage.sqf +++ b/addons/microdagr/functions/fnc_showApplicationPage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Changes the "application page" shown on the microDAGR @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; diff --git a/addons/microdagr/functions/fnc_updateDisplay.sqf b/addons/microdagr/functions/fnc_updateDisplay.sqf index f60db3bb0f..a78f369d56 100644 --- a/addons/microdagr/functions/fnc_updateDisplay.sqf +++ b/addons/microdagr/functions/fnc_updateDisplay.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Updates the display (several times a second) called from the pfeh @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; private _display = uiNamespace getVariable [[QGVAR(RscTitleDisplay), QGVAR(DialogDisplay)] select (GVAR(currentShowMode) == DISPLAY_MODE_DIALOG), displayNull]; @@ -89,7 +89,7 @@ case (APP_MODE_INFODISPLAY): { ([_bearing, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8 }; private _2dDistanceKm = ((getPosASL ACE_player) distance2D _targetPosLocationASL) / 1000; - _rangeText = format ["%1km", _2dDistanceKm toFixed 3]; + _rangeText = format ["%1km", _2dDistanceKm toFixed GVAR(waypointPrecision)]; private _numASL = (_targetPosLocationASL select 2) + EGVAR(common,mapAltitude); _aboveSeaLevelText = [_numASL, 5, 0] call CBA_fnc_formatNumber; _aboveSeaLevelText = if (_numASL > 0) then {"+" + _aboveSeaLevelText + " MSL"} else {_aboveSeaLevelText + " MSL"}; @@ -145,7 +145,7 @@ case (APP_MODE_COMPASS): { ([_bearing, 3, 1] call CBA_fnc_formatNumber) + "°" //degree symbol is in UTF-8 }; private _2dDistanceKm = ((getPosASL ACE_player) distance2D _targetPosLocationASL) / 1000; - _rangeText = format ["%1km", _2dDistanceKm toFixed 3]; + _rangeText = format ["%1km", _2dDistanceKm toFixed GVAR(waypointPrecision)]; }; (_display displayCtrl IDC_MODECOMPASS_BEARING) ctrlSetText _bearingText; @@ -163,7 +163,7 @@ case (APP_MODE_WAYPOINTS): { _x params ["_wpName", "_wpPos"]; _wpListBox lbAdd _wpName; private _2dDistanceKm = ((getPosASL ACE_player) distance2D _wpPos) / 1000; - _wpListBox lbSetTextRight [_forEachIndex, (format ["%1km", _2dDistanceKm toFixed 3])]; + _wpListBox lbSetTextRight [_forEachIndex, (format ["%1km", _2dDistanceKm toFixed GVAR(waypointPrecision)])]; } forEach _waypoints; _currentIndex = (_currentIndex max 0) min (count _waypoints); diff --git a/addons/microdagr/initSettings.sqf b/addons/microdagr/initSettings.sqf new file mode 100644 index 0000000000..5138637645 --- /dev/null +++ b/addons/microdagr/initSettings.sqf @@ -0,0 +1,21 @@ +// CBA Settings [ADDON: ace_microdagr]: + +[ + QGVAR(mapDataAvailable), "LIST", + [LSTRING(MapDataAvailable_DisplayName), LSTRING(MapDataAvailable_Description)], + ["ACE Uncategorized", "MicroDAGR"], + [[0,1,2],[LSTRING(MapFill_None), LSTRING(MapFill_OnlyRoads), LSTRING(MapFill_Full)],2], // [values, titles, defaultIndex] + true, // isGlobal + {[QGVAR(mapDataAvailable), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // require mission restart +] call CBA_settings_fnc_init; + +[ + QGVAR(waypointPrecision), "LIST", + [LSTRING(WaypointPrecision_DisplayName), LSTRING(WaypointPrecision_Description)], + ["ACE Uncategorized", "MicroDAGR"], + [[1, 2, 3], [LSTRING(WaypointPrecision_medium), LSTRING(WaypointPrecision_close), LSTRING(WaypointPrecision_exact)], 2], // [values, titles, defaultIndex] + true, // isGlobal + {[QGVAR(waypointPrecision), _this] call EFUNC(common,cbaSettings_settingChanged)}, + false // require mission restart +] call cba_settings_fnc_init; diff --git a/addons/microdagr/stringtable.xml b/addons/microdagr/stringtable.xml index 1d393606f3..dc0f506cc9 100644 --- a/addons/microdagr/stringtable.xml +++ b/addons/microdagr/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -497,6 +497,31 @@ 无 (无法检视地图) 無 (無法檢視地圖) + + MicroDAGR - Waypoint Precision + MicroDAGR - Wegpunkt Genauigkeit + MicroDAGR - Precisione del Waypoint + + + Controls how precise the waypointdistance can be displayed + Legt die Genauigkeit der Entfernung von Wegpunkten fest + Controlla quanto precisamente può essere visualizzato il waypoint a distanza + + + 100m + 100m + 100m + + + 10m + 10m + 10m + + + 1m + 1m + 1m + Controls how much data is filled on the microDAGR items. Less data restricts the map view to show less on the minimap. Moduł ten pozwala kontrolować jak duża ilość informacji jest załadowana do przedmiotów MicroDAGR. Mniejsza ilość danych ogranicza widok mapy pokazując mniej rzeczy na minimapie. @@ -511,7 +536,7 @@ アイテム上で表示されるデータ量を決定します。設定を減らすと地図上での情報が少なくなります。 MicroDAGR에 얼마나 많은 데이터가 들어있는지 정합니다. 적을 수록 지도상에도 비춰지는게 적어집니다. 设定有多少数据会显示在微型军用GPS接收器上。这些资料的多寡会反映在迷你地图的显示上。 - 設定有多少數據會顯示在微型軍用GPS接收器上。這些資料的多寡會反映在迷你地圖的顯示上 + 設定有多少數據會顯示在微型軍用GPS接收器上。這些資料的多寡會反映在迷你地圖的顯示上。 diff --git a/addons/minedetector/functions/fnc_activateDetector.sqf b/addons/minedetector/functions/fnc_activateDetector.sqf index f22dae1ee9..5ce236250b 100644 --- a/addons/minedetector/functions/fnc_activateDetector.sqf +++ b/addons/minedetector/functions/fnc_activateDetector.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Activate the mine detector @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - if (call FUNC(canActivateDetector)) then { [ACE_player, currentWeapon ACE_player] call FUNC(enableDetector); }; diff --git a/addons/minedetector/functions/fnc_canActivateDetector.sqf b/addons/minedetector/functions/fnc_canActivateDetector.sqf index 93089df063..8a5d795b49 100644 --- a/addons/minedetector/functions/fnc_canActivateDetector.sqf +++ b/addons/minedetector/functions/fnc_canActivateDetector.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if the mine detector can be activated @@ -14,7 +15,5 @@ * Public: No */ -#include "script_component.hpp" - ([ACE_player] call FUNC(hasDetector)) && !([ACE_player, currentWeapon ACE_player] call FUNC(isDetectorEnabled)); diff --git a/addons/minedetector/functions/fnc_canConnectHeadphones.sqf b/addons/minedetector/functions/fnc_canConnectHeadphones.sqf index dfaf9699d8..4266f6e065 100644 --- a/addons/minedetector/functions/fnc_canConnectHeadphones.sqf +++ b/addons/minedetector/functions/fnc_canConnectHeadphones.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Check if headphones can be connected to the mine detector @@ -14,7 +15,5 @@ * Public: No */ -#include "script_component.hpp" - !(ACE_player getVariable [QGVAR(isUsingHeadphones), false]) && {[ACE_player] call FUNC(hasDetector)}; diff --git a/addons/minedetector/functions/fnc_canDeactivateDetector.sqf b/addons/minedetector/functions/fnc_canDeactivateDetector.sqf index e308ba3789..8c38363288 100644 --- a/addons/minedetector/functions/fnc_canDeactivateDetector.sqf +++ b/addons/minedetector/functions/fnc_canDeactivateDetector.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if the mine detector can be deactivated @@ -14,7 +15,5 @@ * Public: No */ -#include "script_component.hpp" - ([ACE_player] call FUNC(hasDetector)) && {[ACE_player, currentWeapon ACE_player] call FUNC(isDetectorEnabled)}; diff --git a/addons/minedetector/functions/fnc_canDisconnectHeadphones.sqf b/addons/minedetector/functions/fnc_canDisconnectHeadphones.sqf index f58fe6617d..b55338b641 100644 --- a/addons/minedetector/functions/fnc_canDisconnectHeadphones.sqf +++ b/addons/minedetector/functions/fnc_canDisconnectHeadphones.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Check if headphones can be disconnected from the mine detector @@ -14,7 +15,5 @@ * Public: No */ -#include "script_component.hpp" - (ACE_player getVariable [QGVAR(isUsingHeadphones), false]) && {[ACE_player] call FUNC(hasDetector)}; diff --git a/addons/minedetector/functions/fnc_connectHeadphones.sqf b/addons/minedetector/functions/fnc_connectHeadphones.sqf index 2a715a66a0..3bf76a4d23 100644 --- a/addons/minedetector/functions/fnc_connectHeadphones.sqf +++ b/addons/minedetector/functions/fnc_connectHeadphones.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Connect/disconnect headphones to the mine detector @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_state"]; _unit setVariable [QGVAR(isUsingHeadphones), _state]; diff --git a/addons/minedetector/functions/fnc_deactivateDetector.sqf b/addons/minedetector/functions/fnc_deactivateDetector.sqf index 05ce00d978..7ed0713846 100644 --- a/addons/minedetector/functions/fnc_deactivateDetector.sqf +++ b/addons/minedetector/functions/fnc_deactivateDetector.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Deactivate the mine detector @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - if (call FUNC(canDeactivateDetector)) then { [ACE_player, currentWeapon ACE_player] call FUNC(disableDetector); }; diff --git a/addons/minedetector/functions/fnc_detectorLoop.sqf b/addons/minedetector/functions/fnc_detectorLoop.sqf index ef05046881..3895ab8193 100644 --- a/addons/minedetector/functions/fnc_detectorLoop.sqf +++ b/addons/minedetector/functions/fnc_detectorLoop.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Handle mine detection in a PFH loop @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_args", "_idPFH"]; _args params ["_unit", "_type", "_detectorConfig", "_lastPlayed"]; diff --git a/addons/minedetector/functions/fnc_disableDetector.sqf b/addons/minedetector/functions/fnc_disableDetector.sqf index e2fbb55798..be0c57117d 100644 --- a/addons/minedetector/functions/fnc_disableDetector.sqf +++ b/addons/minedetector/functions/fnc_disableDetector.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Disables the mine detector @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_detectorType"]; if !(local _unit) then { diff --git a/addons/minedetector/functions/fnc_enableDetector.sqf b/addons/minedetector/functions/fnc_enableDetector.sqf index 8ed31433d1..2bb663d977 100644 --- a/addons/minedetector/functions/fnc_enableDetector.sqf +++ b/addons/minedetector/functions/fnc_enableDetector.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Enables the mine detector @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_detectorType"]; if !(local _unit) then { diff --git a/addons/minedetector/functions/fnc_getDetectedObject.sqf b/addons/minedetector/functions/fnc_getDetectedObject.sqf index ea7698dce7..9bcfcf2cc7 100644 --- a/addons/minedetector/functions/fnc_getDetectedObject.sqf +++ b/addons/minedetector/functions/fnc_getDetectedObject.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Get the distance to the nearest detectable object @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_detectorConfig"]; _detectorConfig params ["", "_radius"]; diff --git a/addons/minedetector/functions/fnc_getDetectorConfig.sqf b/addons/minedetector/functions/fnc_getDetectorConfig.sqf index 8b78a0b9ee..313cc30142 100644 --- a/addons/minedetector/functions/fnc_getDetectorConfig.sqf +++ b/addons/minedetector/functions/fnc_getDetectorConfig.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Get the mine detector configuration from the cache or config file @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_detectorType"]; if (_detectorType isEqualTo "") exitWith {[]}; diff --git a/addons/minedetector/functions/fnc_hasDetector.sqf b/addons/minedetector/functions/fnc_hasDetector.sqf index fcd6eb1c19..4752284196 100644 --- a/addons/minedetector/functions/fnc_hasDetector.sqf +++ b/addons/minedetector/functions/fnc_hasDetector.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if unit has a mine detector in hands @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit"]; !(([currentWeapon _unit] call FUNC(getDetectorConfig)) isEqualTo []); diff --git a/addons/minedetector/functions/fnc_isDetectorEnabled.sqf b/addons/minedetector/functions/fnc_isDetectorEnabled.sqf index 9e75788794..95ff89fa65 100644 --- a/addons/minedetector/functions/fnc_isDetectorEnabled.sqf +++ b/addons/minedetector/functions/fnc_isDetectorEnabled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if the mine detector is enabled @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_detectorType"]; alive _unit && {(_unit getVariable [format[QGVAR(enable_%1), _detectorType], false])}; diff --git a/addons/minedetector/functions/fnc_playDetectorSound.sqf b/addons/minedetector/functions/fnc_playDetectorSound.sqf index 3c7a9aaf45..8e47508209 100644 --- a/addons/minedetector/functions/fnc_playDetectorSound.sqf +++ b/addons/minedetector/functions/fnc_playDetectorSound.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Play the detector sound @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit", "_soundClass"]; if (isNull _unit) exitWith { diff --git a/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf index 3d2b5f36b8..823e85efaa 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_AIR.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Attack profile: AIR @@ -16,7 +17,5 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" _this call FUNC(attackProfile_LIN); diff --git a/addons/missileguidance/functions/fnc_attackProfile_DIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_DIR.sqf index 8e049a9fe2..cddd70807e 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_DIR.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_DIR.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Attack profile: DIR @@ -16,7 +17,5 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" _this call FUNC(attackProfile_LIN); diff --git a/addons/missileguidance/functions/fnc_attackProfile_HI.sqf b/addons/missileguidance/functions/fnc_attackProfile_HI.sqf index 279196a888..6f1fbe67d3 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_HI.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_HI.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Attack profile: HI @@ -16,7 +17,5 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" _this call FUNC(attackProfile_LIN); diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf index e709aed112..f277c1bc68 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_DIR.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Attack profile: Javelin Dir @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" #define STAGE_LAUNCH 1 #define STAGE_CLIMB 2 diff --git a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf index 34871cba8e..08219ea24a 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_JAV_TOP.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Attack profile: Javelin Top @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" #define STAGE_LAUNCH 1 #define STAGE_CLIMB 2 diff --git a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf index 2d25340622..464ee9e36b 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_LIN.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Attack profile: Linear (used by DAGR) @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_seekerTargetPos", "_args"]; _args params ["_firedEH"]; diff --git a/addons/missileguidance/functions/fnc_attackProfile_MID.sqf b/addons/missileguidance/functions/fnc_attackProfile_MID.sqf index 0349a101e4..f66088844c 100644 --- a/addons/missileguidance/functions/fnc_attackProfile_MID.sqf +++ b/addons/missileguidance/functions/fnc_attackProfile_MID.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Attack profile: MID @@ -16,7 +17,5 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" _this call FUNC(attackProfile_LIN); diff --git a/addons/missileguidance/functions/fnc_changeMissileDirection.sqf b/addons/missileguidance/functions/fnc_changeMissileDirection.sqf index 28fb46fe28..d560f05e2a 100644 --- a/addons/missileguidance/functions/fnc_changeMissileDirection.sqf +++ b/addons/missileguidance/functions/fnc_changeMissileDirection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Change a projectile's direction, maintaing speed @@ -14,8 +15,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_projectile", "_v"]; diff --git a/addons/missileguidance/functions/fnc_checkLos.sqf b/addons/missileguidance/functions/fnc_checkLos.sqf index 1e1d3c7d3e..205ff3d4ef 100644 --- a/addons/missileguidance/functions/fnc_checkLos.sqf +++ b/addons/missileguidance/functions/fnc_checkLos.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Returns whether the seeker object can see the target position with lineIntersect @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_seeker", "_target"]; diff --git a/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf b/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf index 8ddc848594..d8b3b858b3 100644 --- a/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf +++ b/addons/missileguidance/functions/fnc_checkSeekerAngle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus * Returns whether the target position is within the maximum angle FOV of the provided seeker @@ -16,8 +17,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_seeker", "_targetPos", "_seekerMaxAngle"]; diff --git a/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf b/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf index 97531eb1e5..45e2c4f900 100644 --- a/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf +++ b/addons/missileguidance/functions/fnc_cycleAttackProfileKeyDown.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Cycles fire mode for any missileGuidance enabled ammo that has multiple attack profiles @@ -14,9 +15,6 @@ * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" - TRACE_1("cycle fire mode",_this); if (!alive ACE_player) exitWith {}; diff --git a/addons/missileguidance/functions/fnc_doAttackProfile.sqf b/addons/missileguidance/functions/fnc_doAttackProfile.sqf index 0d8de543ee..53d43883d3 100644 --- a/addons/missileguidance/functions/fnc_doAttackProfile.sqf +++ b/addons/missileguidance/functions/fnc_doAttackProfile.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou, PabstMirror * Do attack profile with a valid seeker target location @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_seekerTargetPos", "_args"]; _args params ["", "_launchParams"]; diff --git a/addons/missileguidance/functions/fnc_doHandoff.sqf b/addons/missileguidance/functions/fnc_doHandoff.sqf index 56abc8fbf0..569a827173 100644 --- a/addons/missileguidance/functions/fnc_doHandoff.sqf +++ b/addons/missileguidance/functions/fnc_doHandoff.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE * Not currently used @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_target", "_args"]; [QGVAR(handoff), [_target, _args]] call CBA_fnc_globalEvent; diff --git a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf index 8dd70f0163..feb13481a5 100644 --- a/addons/missileguidance/functions/fnc_doSeekerSearch.sqf +++ b/addons/missileguidance/functions/fnc_doSeekerSearch.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou, PabstMirror * Do seeker search @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["", "_args", "", "_lastKnownPosState"]; _args params ["", "_launchParams"]; diff --git a/addons/missileguidance/functions/fnc_guidancePFH.sqf b/addons/missileguidance/functions/fnc_guidancePFH.sqf index 5ecb9c6dfe..8196de8057 100644 --- a/addons/missileguidance/functions/fnc_guidancePFH.sqf +++ b/addons/missileguidance/functions/fnc_guidancePFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Guidance Per Frame Handler @@ -14,8 +15,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" BEGIN_COUNTER(guidancePFH); diff --git a/addons/missileguidance/functions/fnc_handleHandoff.sqf b/addons/missileguidance/functions/fnc_handleHandoff.sqf index e2122a56a4..b4bb0052ae 100644 --- a/addons/missileguidance/functions/fnc_handleHandoff.sqf +++ b/addons/missileguidance/functions/fnc_handleHandoff.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE-Team * Not currently used @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_target", "_args"]; if (isNil "_target" || {isNull _target} || {!local _target} ) exitWith { false }; diff --git a/addons/missileguidance/functions/fnc_onFired.sqf b/addons/missileguidance/functions/fnc_onFired.sqf index bf256cbba0..eb4d2051cf 100644 --- a/addons/missileguidance/functions/fnc_onFired.sqf +++ b/addons/missileguidance/functions/fnc_onFired.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Fired event handler, starts guidance if enabled for ammo @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_shooter","","","","_ammo","","_projectile"]; diff --git a/addons/missileguidance/functions/fnc_onIncomingMissile.sqf b/addons/missileguidance/functions/fnc_onIncomingMissile.sqf index 2dcc93b793..04ad0c79b7 100644 --- a/addons/missileguidance/functions/fnc_onIncomingMissile.sqf +++ b/addons/missileguidance/functions/fnc_onIncomingMissile.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Handles AI shooting a locking missile @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_target", "_ammo", "_shooter"]; diff --git a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf index 173b6ba708..356ad5c2f1 100644 --- a/addons/missileguidance/functions/fnc_seekerType_Optic.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_Optic.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Seeker Type: Optic @@ -14,8 +15,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["", "_args"]; _args params ["_firedEH", "_launchParams", "", "_seekerParams", "_stateParams"]; diff --git a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf index 3f78f5d3c5..09e20e7887 100644 --- a/addons/missileguidance/functions/fnc_seekerType_SALH.sqf +++ b/addons/missileguidance/functions/fnc_seekerType_SALH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: jaynus / nou * Seeker Type: SALH (Laser) @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["", "_args"]; _args params ["_firedEH", "_launchParams", "", "_seekerParams"]; diff --git a/addons/missileguidance/stringtable.xml b/addons/missileguidance/stringtable.xml index cb3cf6ac03..1758dea3e3 100644 --- a/addons/missileguidance/stringtable.xml +++ b/addons/missileguidance/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -72,7 +72,7 @@ Laserowo naprowadzana rakieta Hydra-70 DAGR Hydra-70 DAGR lasergelenkte Rakete Hydra-70 DAGR laserem naváděná střela - Hydra-70 DAGR missile guida laser + Hydra-70 DAGR Missile a Guida Laser Míssil guiado a laser Hydra-70 DAGR Hydra-70 DAGR lézer-irányított rakéta Управляемая ракета лазерного наведения Hydra-70 DAGR @@ -120,7 +120,7 @@ Laserowo naprowadzana rakieta Hellfire II AGM-114K Hellfire II AGM-114K Lasergelenkte Rakete Hellfire II AGM-114K laserem naváděná střela - Missile guida laser Hellfire II AGM-114K + Missile a Guida Laser Hellfire II AGM-114K Míssil guiado a laser Hellfire II AGM-114K Hellfire II AGM-114K lézer-irányított rakéta Управляемая ракета лазерного наведения Hellfire II AGM-114K diff --git a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf index f01aa8017a..ba20ac0b8d 100644 --- a/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf +++ b/addons/missionmodules/functions/fnc_moduleAmbianceSound.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Plays synchronized ambiance sounds while the module is alive. @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "_units", "_activated"]; // We only play this on the locality of the logic, since the sounds are broadcasted across the network diff --git a/addons/missionmodules/stringtable.xml b/addons/missionmodules/stringtable.xml index 90142f9795..cb28cb3d7e 100644 --- a/addons/missionmodules/stringtable.xml +++ b/addons/missionmodules/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/mk6mortar/functions/fnc_canLoadMagazine.sqf b/addons/mk6mortar/functions/fnc_canLoadMagazine.sqf index 7c0bb69374..67bcf4d522 100644 --- a/addons/mk6mortar/functions/fnc_canLoadMagazine.sqf +++ b/addons/mk6mortar/functions/fnc_canLoadMagazine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Grey * Checks whether magazine can be loaded into static weapon @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_static","_unit",["_magazineClassOptional","",[""]]]; diff --git a/addons/mk6mortar/functions/fnc_canUnloadMagazine.sqf b/addons/mk6mortar/functions/fnc_canUnloadMagazine.sqf index 959e8a05f4..a296d56c32 100644 --- a/addons/mk6mortar/functions/fnc_canUnloadMagazine.sqf +++ b/addons/mk6mortar/functions/fnc_canUnloadMagazine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Grey * Checks whether magazine can be unloaded from static weapon @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_static","_unit"]; diff --git a/addons/mk6mortar/functions/fnc_dev_buildTable.sqf b/addons/mk6mortar/functions/fnc_dev_buildTable.sqf index 6af83c27f2..6141314eea 100644 --- a/addons/mk6mortar/functions/fnc_dev_buildTable.sqf +++ b/addons/mk6mortar/functions/fnc_dev_buildTable.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * DEV function to build mortar tables, very cpu intensive (never used durring normal gameplay) @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" private _muzzleVelocity = _this select 0; private _airFriction = _this select 1; diff --git a/addons/mk6mortar/functions/fnc_dev_formatNumber.sqf b/addons/mk6mortar/functions/fnc_dev_formatNumber.sqf index 713daefbed..a24f456037 100644 --- a/addons/mk6mortar/functions/fnc_dev_formatNumber.sqf +++ b/addons/mk6mortar/functions/fnc_dev_formatNumber.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Pabst Mirror * Converts numbers into nicely formated strings. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_theNumber", "_inputType", "_convertToMils"]; diff --git a/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf b/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf index 5d83913c3c..2bdfe56c22 100644 --- a/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf +++ b/addons/mk6mortar/functions/fnc_dev_simulateCalcRangeTableLine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Pabst Mirror * Builds a rangeTable line for a certian range, given muzzle velocity and air friction, returns [] if out of range. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" #define TIME_STEP (1/50) diff --git a/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf b/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf index 3a91b3cf4a..3c509d5a19 100644 --- a/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf +++ b/addons/mk6mortar/functions/fnc_dev_simulateFindSolution.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * DEV to find a firing solution for a given range @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" #define MAX_ATTEMPTS 22 params ["_rangeToHit", "_heightToHit", "_muzzleVelocity", "_airFriction","_timeStep"]; diff --git a/addons/mk6mortar/functions/fnc_dev_simulateShot.sqf b/addons/mk6mortar/functions/fnc_dev_simulateShot.sqf index fa74c842e1..7974526ff6 100644 --- a/addons/mk6mortar/functions/fnc_dev_simulateShot.sqf +++ b/addons/mk6mortar/functions/fnc_dev_simulateShot.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * DEV function to build mortar tables, very cpu intensive (never used durring normal gameplay) @@ -21,7 +22,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_angleDeg", "_muzzleVelocity", "_airFriction", "_temp", "_relDensity", "_tailWind", "_crosswind", "_heightOfTarget", "_timeStep"]; diff --git a/addons/mk6mortar/functions/fnc_handleFired.sqf b/addons/mk6mortar/functions/fnc_handleFired.sqf index b6cdac2b03..02a8e51ce0 100644 --- a/addons/mk6mortar/functions/fnc_handleFired.sqf +++ b/addons/mk6mortar/functions/fnc_handleFired.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Called when the mortar is fired. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"]; diff --git a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf index 568a1a326e..fd53bcf3d4 100644 --- a/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf +++ b/addons/mk6mortar/functions/fnc_handlePlayerVehicleChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles player getting into new vehicle. Loads PFEG for mortar display if it is a mortar. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_newVehicle"]; diff --git a/addons/mk6mortar/functions/fnc_loadMagazine.sqf b/addons/mk6mortar/functions/fnc_loadMagazine.sqf index df92c820cd..297fb2a969 100644 --- a/addons/mk6mortar/functions/fnc_loadMagazine.sqf +++ b/addons/mk6mortar/functions/fnc_loadMagazine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Grey * Loads Magazine into static weapon @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_static","_unit",["_magazineClassOptional","",[""]]]; diff --git a/addons/mk6mortar/functions/fnc_loadMagazineTimer.sqf b/addons/mk6mortar/functions/fnc_loadMagazineTimer.sqf index e71dc9cacb..cfc6adff08 100644 --- a/addons/mk6mortar/functions/fnc_loadMagazineTimer.sqf +++ b/addons/mk6mortar/functions/fnc_loadMagazineTimer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Grey * Loads Magazine into static weapon using a timer. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_static","_unit","_timeToLoad",["_magazineClassOptional","",[""]]]; diff --git a/addons/mk6mortar/functions/fnc_moduleInit.sqf b/addons/mk6mortar/functions/fnc_moduleInit.sqf index 4fef320117..3158236859 100644 --- a/addons/mk6mortar/functions/fnc_moduleInit.sqf +++ b/addons/mk6mortar/functions/fnc_moduleInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Loads settings from the module. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_syncedUnits", "_activated"]; diff --git a/addons/mk6mortar/functions/fnc_mortarInit.sqf b/addons/mk6mortar/functions/fnc_mortarInit.sqf index 65d0ff74db..46c16738bf 100644 --- a/addons/mk6mortar/functions/fnc_mortarInit.sqf +++ b/addons/mk6mortar/functions/fnc_mortarInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: VKing * Initializes mortar for use with ammunition handling magazines. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_mortar"]; diff --git a/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf b/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf index b98ee543f5..1a5d5bf9a6 100644 --- a/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf +++ b/addons/mk6mortar/functions/fnc_rangeTableCanUse.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Can player open 82mm rangetable. @@ -14,8 +15,7 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_player"]; -"ACE_RangeTable_82mm" in (items _player); +"ACE_RangeTable_82mm" in (_player call EFUNC(common,uniqueItems)); diff --git a/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf b/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf index 688253038c..f55e2bcd99 100644 --- a/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf +++ b/addons/mk6mortar/functions/fnc_rangeTableOpen.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Opens the rangetable and fills the charge listbox. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define LIST_CHARGE ((uiNamespace getVariable "ACE_82mm_RangeTable_Dialog") displayCtrl 1501) diff --git a/addons/mk6mortar/functions/fnc_rangeTablePageChange.sqf b/addons/mk6mortar/functions/fnc_rangeTablePageChange.sqf index e78fc40574..84bb2fba05 100644 --- a/addons/mk6mortar/functions/fnc_rangeTablePageChange.sqf +++ b/addons/mk6mortar/functions/fnc_rangeTablePageChange.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Called when listbox selection changes. Updates the rangetable with new values. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define RANGE_TABLE ((uiNamespace getVariable "ACE_82mm_RangeTable_Dialog") displayCtrl 20001) #define LIST_CHARGE ((uiNamespace getVariable "ACE_82mm_RangeTable_Dialog") displayCtrl 1501) diff --git a/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf b/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf index a288ee03f9..7a219e5535 100644 --- a/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf +++ b/addons/mk6mortar/functions/fnc_rangeTablePreCalculatedValues.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Simple Lookup Table for various muzzle velocities and air frictions. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_muzzleVelocity", "_airFriction"]; diff --git a/addons/mk6mortar/functions/fnc_toggleMils.sqf b/addons/mk6mortar/functions/fnc_toggleMils.sqf index cd2c7cf76f..a2c2a29789 100644 --- a/addons/mk6mortar/functions/fnc_toggleMils.sqf +++ b/addons/mk6mortar/functions/fnc_toggleMils.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Toggles the mortart to show mils or degrees @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_mortarVeh", "_unit"]; diff --git a/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf b/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf index 924b00a90e..aa2e9f2823 100644 --- a/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf +++ b/addons/mk6mortar/functions/fnc_turretDisplayLoaded.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Called when the mk6's in game UI is loaded. Hides rangefinder data if it is disabled. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; diff --git a/addons/mk6mortar/functions/fnc_unloadMagazine.sqf b/addons/mk6mortar/functions/fnc_unloadMagazine.sqf index 9aa0fa0437..4da21b3e8f 100644 --- a/addons/mk6mortar/functions/fnc_unloadMagazine.sqf +++ b/addons/mk6mortar/functions/fnc_unloadMagazine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Grey * @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_static","_unit"]; diff --git a/addons/mk6mortar/functions/fnc_unloadMagazineTimer.sqf b/addons/mk6mortar/functions/fnc_unloadMagazineTimer.sqf index 8ee4590f02..4c152bc7d1 100644 --- a/addons/mk6mortar/functions/fnc_unloadMagazineTimer.sqf +++ b/addons/mk6mortar/functions/fnc_unloadMagazineTimer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Grey * @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_static","_unit","_timeToUnload"]; diff --git a/addons/mk6mortar/stringtable.xml b/addons/mk6mortar/stringtable.xml index b6dbbc2db5..de635fcd09 100644 --- a/addons/mk6mortar/stringtable.xml +++ b/addons/mk6mortar/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -72,6 +72,7 @@ MK6迫擊炮 MK6迫击炮 Mk6 迫撃砲 + Mortier Mk6 Mk6 Settings diff --git a/addons/modules/functions/fnc_moduleInit.sqf b/addons/modules/functions/fnc_moduleInit.sqf index e4ab737db3..5e03aad13c 100644 --- a/addons/modules/functions/fnc_moduleInit.sqf +++ b/addons/modules/functions/fnc_moduleInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * IV Treatment local callback @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - if ((_this select 0) isKindOf "Module_F") then { GVAR(moduleInitCollection) pushBack (_this select 0); }; diff --git a/addons/movement/functions/fnc_addLoadToUnitContainer.sqf b/addons/movement/functions/fnc_addLoadToUnitContainer.sqf index fa788c92a2..5910f6c186 100644 --- a/addons/movement/functions/fnc_addLoadToUnitContainer.sqf +++ b/addons/movement/functions/fnc_addLoadToUnitContainer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Add (negative numbers to subtract) a virtual mass to a units container. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_container", objNull, [objNull]], ["_virtualLoadToAdd", 0, [0]]]; diff --git a/addons/movement/functions/fnc_canClimb.sqf b/addons/movement/functions/fnc_canClimb.sqf index 260f76105b..808a81d582 100644 --- a/addons/movement/functions/fnc_canClimb.sqf +++ b/addons/movement/functions/fnc_canClimb.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Tests the the player can climb. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/movement/functions/fnc_climb.sqf b/addons/movement/functions/fnc_climb.sqf index 1f2ecf72f4..2d5eb88786 100644 --- a/addons/movement/functions/fnc_climb.sqf +++ b/addons/movement/functions/fnc_climb.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Make the player climb over short walls. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/movement/functions/fnc_handleClimb.sqf b/addons/movement/functions/fnc_handleClimb.sqf index 84f78cfcc0..6f6c7b536b 100644 --- a/addons/movement/functions/fnc_handleClimb.sqf +++ b/addons/movement/functions/fnc_handleClimb.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handles the climb animation finishing. Called from "AnimDone" event handler. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_anim"]; diff --git a/addons/movement/functions/fnc_handleVirtualMass.sqf b/addons/movement/functions/fnc_handleVirtualMass.sqf index 814a0eeecb..8f035cc5ad 100644 --- a/addons/movement/functions/fnc_handleVirtualMass.sqf +++ b/addons/movement/functions/fnc_handleVirtualMass.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Recalculate the units loadCoef to emulate a mass added to uniform, vest or backpack. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/movement/functions/fnc_inventoryDisplayLoad.sqf b/addons/movement/functions/fnc_inventoryDisplayLoad.sqf index f7c240f332..d107bd70b1 100644 --- a/addons/movement/functions/fnc_inventoryDisplayLoad.sqf +++ b/addons/movement/functions/fnc_inventoryDisplayLoad.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Executed every time an inventory display is opened. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_display"]; diff --git a/addons/movement/stringtable.xml b/addons/movement/stringtable.xml index 1e8caf3a5f..45a3bf65c3 100644 --- a/addons/movement/stringtable.xml +++ b/addons/movement/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/nametags/functions/fnc_canShow.sqf b/addons/nametags/functions/fnc_canShow.sqf index 5bccc8f91d..9cc83cfd91 100644 --- a/addons/nametags/functions/fnc_canShow.sqf +++ b/addons/nametags/functions/fnc_canShow.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: aeroson * Checks if crew info can be shown. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" ((vehicle ACE_player) != ACE_player) && {GVAR(ShowCrewInfo)} && diff --git a/addons/nametags/functions/fnc_doShow.sqf b/addons/nametags/functions/fnc_doShow.sqf index 08ab633f28..12ac1a04cb 100644 --- a/addons/nametags/functions/fnc_doShow.sqf +++ b/addons/nametags/functions/fnc_doShow.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "common.hpp" /* * Author: aeroson * Shows the actual text and sets text the crew info. @@ -13,8 +15,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "common.hpp" private _player = ACE_player; private _vehicle = vehicle _player; diff --git a/addons/nametags/functions/fnc_drawNameTagIcon.sqf b/addons/nametags/functions/fnc_drawNameTagIcon.sqf index bfe065cf30..093496cfb8 100644 --- a/addons/nametags/functions/fnc_drawNameTagIcon.sqf +++ b/addons/nametags/functions/fnc_drawNameTagIcon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, esteldunedain * Draw the nametag and rank icon. @@ -20,8 +21,6 @@ * Public: No */ -#include "script_component.hpp" - TRACE_1("drawName:", _this); params ["", "_target", "", "_heightOffset"]; diff --git a/addons/nametags/functions/fnc_getCachedFlags.sqf b/addons/nametags/functions/fnc_getCachedFlags.sqf index 6e1223c8be..3fc13256e0 100644 --- a/addons/nametags/functions/fnc_getCachedFlags.sqf +++ b/addons/nametags/functions/fnc_getCachedFlags.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: * Get's flags used for onDraw3D that can be cached @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Determine flags from current settings private _drawName = true; diff --git a/addons/nametags/functions/fnc_getVehicleData.sqf b/addons/nametags/functions/fnc_getVehicleData.sqf index 59f5284faf..55dc758081 100644 --- a/addons/nametags/functions/fnc_getVehicleData.sqf +++ b/addons/nametags/functions/fnc_getVehicleData.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "common.hpp" /* * Author: aeroson * Gathers and caches data needed by ace_nametags_fnc_doShow. @@ -17,8 +19,6 @@ * * Public: No */ -#include "script_component.hpp" -#include "common.hpp" params ["_type"]; diff --git a/addons/nametags/functions/fnc_initIsSpeaking.sqf b/addons/nametags/functions/fnc_initIsSpeaking.sqf index 6624f59485..b400e2d6fa 100644 --- a/addons/nametags/functions/fnc_initIsSpeaking.sqf +++ b/addons/nametags/functions/fnc_initIsSpeaking.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, PabstMirror * Starts up a PFEH to monitor the when players are talking. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" if (isServer) then { //If someone disconnects while speaking, reset their variable @@ -44,7 +44,7 @@ if (isClass (configFile >> "CfgPatches" >> "acre_api")) then { }; } else { if (isClass (configFile >> "CfgPatches" >> "task_force_radio")) then { - INFO("TFR Detected."); + INFO("TFAR Detected."); DFUNC(isSpeaking) = { params ["_unit"]; (_unit getVariable ["tf_isSpeaking", false]) && {!(_unit getVariable ["ACE_isUnconscious", false])} diff --git a/addons/nametags/functions/fnc_moduleNameTags.sqf b/addons/nametags/functions/fnc_moduleNameTags.sqf index c2d0cf8c79..03ced478be 100644 --- a/addons/nametags/functions/fnc_moduleNameTags.sqf +++ b/addons/nametags/functions/fnc_moduleNameTags.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Initializes the name tags module. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/nametags/functions/fnc_onDraw3d.sqf b/addons/nametags/functions/fnc_onDraw3d.sqf index f937b230b3..fb5d29807a 100644 --- a/addons/nametags/functions/fnc_onDraw3d.sqf +++ b/addons/nametags/functions/fnc_onDraw3d.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: * Draws names and icons. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" BEGIN_COUNTER(GVAR(onDraw3d)); diff --git a/addons/nametags/functions/fnc_setFactionRankIcons.sqf b/addons/nametags/functions/fnc_setFactionRankIcons.sqf index c0a315636b..fa7975d5e5 100644 --- a/addons/nametags/functions/fnc_setFactionRankIcons.sqf +++ b/addons/nametags/functions/fnc_setFactionRankIcons.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Sets a custom set of icons for a specified faction. @@ -22,7 +23,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (isNil QGVAR(factionRanks)) then { GVAR(factionRanks) = [] call CBA_fnc_createNamespace; diff --git a/addons/nametags/functions/fnc_setText.sqf b/addons/nametags/functions/fnc_setText.sqf index 688ecabc4a..543b4fc913 100644 --- a/addons/nametags/functions/fnc_setText.sqf +++ b/addons/nametags/functions/fnc_setText.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: aeroson * Sets the text on the dialog. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define TextIDC 11123 diff --git a/addons/nametags/functions/fnc_updateSettings.sqf b/addons/nametags/functions/fnc_updateSettings.sqf index 76110b4f79..56ba016064 100644 --- a/addons/nametags/functions/fnc_updateSettings.sqf +++ b/addons/nametags/functions/fnc_updateSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Dynamically adds and removes Draw3D based on settings on run-time. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (isNil QGVAR(drawHandler) && {GVAR(showPlayerNames) != 0}) then { GVAR(drawHandler) = addMissionEventHandler ["Draw3D", {_this call FUNC(onDraw3d);}]; diff --git a/addons/nametags/stringtable.xml b/addons/nametags/stringtable.xml index 5cc0d8872d..aa0cca2b18 100644 --- a/addons/nametags/stringtable.xml +++ b/addons/nametags/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/nightvision/CfgWeapons.hpp b/addons/nightvision/CfgWeapons.hpp index 5d87b0170c..a81835996f 100644 --- a/addons/nightvision/CfgWeapons.hpp +++ b/addons/nightvision/CfgWeapons.hpp @@ -12,7 +12,10 @@ class CfgWeapons { GVAR(bluRadius) = 0.26; }; class NVGogglesB_grn_F: NVGoggles { // APEX NVG/Thermal - modelOptics = "\A3\weapons_f\reticle\optics_night"; // use vanilla modelOptics so it will show in IR mode + modelOptics = "\A3\weapons_f_exp\reticle\ENVG.p3d"; // use vanilla modelOptics so it will show in IR mode + }; + class NVGogglesB_gry_F: NVGoggles { + modelOptics = "\A3\weapons_f_exp\reticle\ENVG.p3d"; }; class NVGoggles_OPFOR: NVGoggles { modelOptics = ""; diff --git a/addons/nightvision/functions/fnc_changeNVGBrightness.sqf b/addons/nightvision/functions/fnc_changeNVGBrightness.sqf index 8bc6521ebc..ffbdc45dea 100644 --- a/addons/nightvision/functions/fnc_changeNVGBrightness.sqf +++ b/addons/nightvision/functions/fnc_changeNVGBrightness.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Change the brightness of the unit's NVG. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_changeInBrightness"]; TRACE_2("changeNVGBrightness",_player,_changeInBrightness); diff --git a/addons/nightvision/functions/fnc_initModule.sqf b/addons/nightvision/functions/fnc_initModule.sqf index 50f8785e91..4118360ccc 100644 --- a/addons/nightvision/functions/fnc_initModule.sqf +++ b/addons/nightvision/functions/fnc_initModule.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Initializes the settings for the disable NVGs in sight module. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_module"]; TRACE_1("initModule",_module); diff --git a/addons/nightvision/functions/fnc_nonDedicatedFix.sqf b/addons/nightvision/functions/fnc_nonDedicatedFix.sqf index 2a5178a595..578099846d 100644 --- a/addons/nightvision/functions/fnc_nonDedicatedFix.sqf +++ b/addons/nightvision/functions/fnc_nonDedicatedFix.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles the client who is the non-dedicated server turning on the fog effects. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" TRACE_1("Starting PFEH to handling non-dedicated server running effect",GVAR(serverPriorFog)); diff --git a/addons/nightvision/functions/fnc_onCameraViewChanged.sqf b/addons/nightvision/functions/fnc_onCameraViewChanged.sqf index 08ec3afcec..09eb8e247f 100644 --- a/addons/nightvision/functions/fnc_onCameraViewChanged.sqf +++ b/addons/nightvision/functions/fnc_onCameraViewChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Disables/re-enables NVGs when the player starts/stops aiming down his sight. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_cameraView"]; TRACE_2("onCameraViewChanged",_unit,_cameraView); diff --git a/addons/nightvision/functions/fnc_onFiredPlayer.sqf b/addons/nightvision/functions/fnc_onFiredPlayer.sqf index efd01e1fd4..19750891c9 100644 --- a/addons/nightvision/functions/fnc_onFiredPlayer.sqf +++ b/addons/nightvision/functions/fnc_onFiredPlayer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, Dslyecxi, PabstMirror * Change the blending when the player fires. Called from the unified fired EH only for the local player and his vehicle. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile"]; TRACE_7("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile); diff --git a/addons/nightvision/functions/fnc_onLoadoutChanged.sqf b/addons/nightvision/functions/fnc_onLoadoutChanged.sqf index 32f1914bfa..59be659f53 100644 --- a/addons/nightvision/functions/fnc_onLoadoutChanged.sqf +++ b/addons/nightvision/functions/fnc_onLoadoutChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, PabstMirror * Refreshes nvg effect if switching NVG goggles. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player"]; TRACE_1("onLoadoutChange",_player); diff --git a/addons/nightvision/functions/fnc_onVisionModeChanged.sqf b/addons/nightvision/functions/fnc_onVisionModeChanged.sqf index f28e39b964..b4bdc7f4f9 100644 --- a/addons/nightvision/functions/fnc_onVisionModeChanged.sqf +++ b/addons/nightvision/functions/fnc_onVisionModeChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut, Dslyecxi, PabstMirror * Disables turning on NVGs while the player aims down his sight. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_visionMode"]; TRACE_2("onVisionModeChanged",_unit,_visionMode); diff --git a/addons/nightvision/functions/fnc_pfeh.sqf b/addons/nightvision/functions/fnc_pfeh.sqf index 0784b4f88a..c889b59a47 100644 --- a/addons/nightvision/functions/fnc_pfeh.sqf +++ b/addons/nightvision/functions/fnc_pfeh.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, PabstMirror * PFEH to handle refreshing effects. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" if ((currentVisionMode ACE_player) != 1) exitWith { GVAR(running) = false; diff --git a/addons/nightvision/functions/fnc_refreshGoggleType.sqf b/addons/nightvision/functions/fnc_refreshGoggleType.sqf index 1ebadf56ae..8943784646 100644 --- a/addons/nightvision/functions/fnc_refreshGoggleType.sqf +++ b/addons/nightvision/functions/fnc_refreshGoggleType.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, PabstMirror * Determines night vision source (player/vehicle) - Updates UI based on type. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" TRACE_1("refreshGoggleType",_this); diff --git a/addons/nightvision/functions/fnc_scaleCtrl.sqf b/addons/nightvision/functions/fnc_scaleCtrl.sqf index b5bb80715d..e01a798580 100644 --- a/addons/nightvision/functions/fnc_scaleCtrl.sqf +++ b/addons/nightvision/functions/fnc_scaleCtrl.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, PabstMirror * Determines night vision source (player/vehicle) - Updates UI based on type. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_ctrl", "_default_pos", "_scale"]; diff --git a/addons/nightvision/functions/fnc_setupDisplayEffects.sqf b/addons/nightvision/functions/fnc_setupDisplayEffects.sqf index 8201b9a0f5..9137419202 100644 --- a/addons/nightvision/functions/fnc_setupDisplayEffects.sqf +++ b/addons/nightvision/functions/fnc_setupDisplayEffects.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dslyecxi, PabstMirror * Handles setting up the effects: fog, ppEffects and the RscTittle. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_activated"]; TRACE_1("setupDisplayEffects",_activated); diff --git a/addons/nightvision/initSettings.sqf b/addons/nightvision/initSettings.sqf index 884c53055a..5b6492a2cb 100644 --- a/addons/nightvision/initSettings.sqf +++ b/addons/nightvision/initSettings.sqf @@ -6,7 +6,8 @@ localize LSTRING(Category), [0,2,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal - {[QGVAR(effectScaling), _this] call EFUNC(common,cbaSettings_settingChanged)} + {[QGVAR(effectScaling), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_settings_fnc_init; [ QGVAR(fogScaling), "SLIDER", @@ -14,7 +15,8 @@ localize LSTRING(Category), [0,2,1,1], // [min, max, default value, trailing decimals (-1 for whole numbers only)] true, // isGlobal - {[QGVAR(fogScaling), _this] call EFUNC(common,cbaSettings_settingChanged)} + {[QGVAR(fogScaling), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_settings_fnc_init; [ diff --git a/addons/nightvision/stringtable.xml b/addons/nightvision/stringtable.xml index b91eff3b09..0a1ec67f06 100644 --- a/addons/nightvision/stringtable.xml +++ b/addons/nightvision/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -8,6 +8,7 @@ ACE-Nachtsicht ACE夜視鏡 ACE夜视镜 + ACE Vision Nocturne NV Goggles (Gen1) @@ -252,6 +253,7 @@ Nebel in Nachtsicht 夜視鏡霧氣程度 夜视镜雾气程度 + Épaisseur du brouillard (JVN) Fog is used to limit visibility. @@ -260,6 +262,7 @@ Nebel wird genutzt, um die Sichtbarkeit einzuschränken. 透過霧氣來縮減夜視鏡的可視距離 透过雾气来缩减夜视镜的可视距离。 + Le brouillard est utilisé pour limiter la visibilité NVG Effect Scale @@ -268,6 +271,7 @@ Nachtsichteffekte 夜視鏡效果程度 夜视镜效果程度 + Intensité des effets Blur and brightness effects [Setting to 0 will disable ALL nightvision effects] @@ -276,6 +280,7 @@ Unschärfe und Helligkeitseffekte [Dies auf 0 zu setzen deaktiviert SÄMTLICHE Nachtsichteffekte] 調整模糊與亮度的效果。[設值為0會關閉所有夜視鏡的特殊效果] 调整模糊与亮度的效果。[设值为0会关闭所有夜视镜的特殊效果] + Effets de flou et de luminosité [Règler cette option sur 0 désactivera TOUS les effets de vision nocturne] Aim Down Sights Blur @@ -283,6 +288,8 @@ Visierunschärfe 瞄準具模糊程度 瞄准具模糊程度 + Flou de visée + Blur durante la mira NVG Noise Scale @@ -290,6 +297,8 @@ 夜視鏡雜訊程度 夜视镜杂讯程度 暗視装置のノイズ度 + Intensité du bruit (JVN) + Fattore di Disturbo del NVG Image noise intensity when wearing NVGs @@ -297,18 +306,24 @@ 調整配戴夜視鏡時畫面雜訊的多寡。 调整配戴夜视镜时画面杂讯的多寡。 暗視装置を使用時に起きる画像ノイズの強度です + Intensité du bruit de l'image lorsque vous portez des JVN + Intensità del disturbo dell'immagine quando i NVG sono equipaggiati Shutter Effects シャッター効果 快门效果 快門效果 + Effets d'obturateur + Effetti lampeggianti Rolling shutter effect from muzzle flashes 発射炎が作るローリング シャッター効果です 枪械开火时产生瞬间快门效果 槍開火時瞬間產生快門效果 + Effets d'obturateur à rideau dû aux flashs du canon + Effetto lampeggiante dato dal lampo dello sparo diff --git a/addons/nlaw/functions/fnc_attackProfile.sqf b/addons/nlaw/functions/fnc_attackProfile.sqf index 778a1924b3..acc4330083 100644 --- a/addons/nlaw/functions/fnc_attackProfile.sqf +++ b/addons/nlaw/functions/fnc_attackProfile.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * NLAW missile guidance attack profile. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_seekerTargetPos", "_args", "_attackProfileStateParams"]; _args params ["_firedEH", "_launchParams"]; diff --git a/addons/nlaw/functions/fnc_keyDown.sqf b/addons/nlaw/functions/fnc_keyDown.sqf index 82dfbbcc2e..fcc320360c 100644 --- a/addons/nlaw/functions/fnc_keyDown.sqf +++ b/addons/nlaw/functions/fnc_keyDown.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles the track key being held down. @@ -14,8 +15,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" TRACE_1("lock key down",GVAR(isLockKeyDown)); diff --git a/addons/nlaw/functions/fnc_onFired.sqf b/addons/nlaw/functions/fnc_onFired.sqf index 7049dfb918..0552afcd86 100644 --- a/addons/nlaw/functions/fnc_onFired.sqf +++ b/addons/nlaw/functions/fnc_onFired.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Sets up missile guidance state arrays (called from missileGuidance's onFired). @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_firedEH", "_launchParams", "_flightParams", "_seekerParams", "_stateParams"]; _firedEH params ["_shooter","","","","","","_projectile"]; diff --git a/addons/nlaw/functions/fnc_seeker.sqf b/addons/nlaw/functions/fnc_seeker.sqf index 850c966f56..eeb2e0794c 100644 --- a/addons/nlaw/functions/fnc_seeker.sqf +++ b/addons/nlaw/functions/fnc_seeker.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles the top down attack seeker for missile guidance. @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["", "_args", "_seekerStateParams"]; _args params ["_firedEH", "_launchParams", "", "_seekerParams", "_stateParams"]; diff --git a/addons/nlaw/stringtable.xml b/addons/nlaw/stringtable.xml index 8292cba0b9..c986467887 100644 --- a/addons/nlaw/stringtable.xml +++ b/addons/nlaw/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/noradio/XEH_preInit.sqf b/addons/noradio/XEH_preInit.sqf index 5be74ddf1b..61492aa36d 100644 --- a/addons/noradio/XEH_preInit.sqf +++ b/addons/noradio/XEH_preInit.sqf @@ -35,4 +35,5 @@ if (hasInterface) then { } else { [ACE_player, "isPlayer"] call EFUNC(common,unmuteUnit); }; -}] call CBA_settings_fnc_init; +}, true // Needs mission restart +] call CBA_settings_fnc_init; diff --git a/addons/noradio/stringtable.xml b/addons/noradio/stringtable.xml index 3bb0fbc0da..4e55b58236 100644 --- a/addons/noradio/stringtable.xml +++ b/addons/noradio/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/optics/XEH_postInit.sqf b/addons/optics/XEH_postInit.sqf index 2c02e72638..abb97e5b5d 100644 --- a/addons/optics/XEH_postInit.sqf +++ b/addons/optics/XEH_postInit.sqf @@ -13,11 +13,11 @@ GVAR(camera) = objNull; }; }] call CBA_fnc_addEventHandler; -// camera has to be re-created every time another camera is created. Otherwise r2t is either black or transparent. @todo Add popular custom cameras to the event in ACE_common. -["ace_activeCameraChanged", { - params ["", "_isfeatureCameraActive"]; - TRACE_1("ace_activeCameraChanged",_isfeatureCameraActive); - if (!_isfeatureCameraActive) then { +// camera has to be re-created every time another camera is created. Otherwise r2t is either black or transparent.. +["featureCamera", { + params ["_player", "_featureCamera"]; + TRACE_1("featureCamera",_featureCamera); + if (_featureCamera isEqualTo "") then { // Destroy the camera, and it will be re-created in the onDrawScope2d helper if (!isNull GVAR(camera)) then { GVAR(camera) cameraEffect ["TERMINATE", "BACK"]; @@ -25,7 +25,7 @@ GVAR(camera) = objNull; TRACE_1("destroying pip camera for restart",GVAR(camera)); }; }; -}] call CBA_fnc_addEventHandler; +}] call CBA_fnc_addPlayerEventHandler; // Register fire event handler ["ace_firedPlayer", DFUNC(handleFired)] call CBA_fnc_addEventHandler; diff --git a/addons/optics/functions/fnc_handleFired.sqf b/addons/optics/functions/fnc_handleFired.sqf index 435e7e8e7c..fbcb177f2e 100644 --- a/addons/optics/functions/fnc_handleFired.sqf +++ b/addons/optics/functions/fnc_handleFired.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Taosenai * Adapted By: KoffeinFlummi, commy2 @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - // IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/optics/functions/fnc_onDrawScope.sqf b/addons/optics/functions/fnc_onDrawScope.sqf index 1f2f86e21a..22b9ddc2b2 100644 --- a/addons/optics/functions/fnc_onDrawScope.sqf +++ b/addons/optics/functions/fnc_onDrawScope.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - disableSerialization; params ["_display"]; diff --git a/addons/optics/functions/fnc_onDrawScope2D.sqf b/addons/optics/functions/fnc_onDrawScope2D.sqf index cdfcca6b00..9031ca8ba7 100644 --- a/addons/optics/functions/fnc_onDrawScope2D.sqf +++ b/addons/optics/functions/fnc_onDrawScope2D.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Helper function for updating the 2d and 3d scope controls @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; diff --git a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf index a502934f50..3b662eb121 100644 --- a/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf +++ b/addons/optionsmenu/functions/fnc_debugDumpToClipboard.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Dumps debug info to clipboard. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define MIN_ARRAY_SIZE 50 diff --git a/addons/optionsmenu/init_loadMainMenuBox.sqf b/addons/optionsmenu/init_loadMainMenuBox.sqf index 894bd45124..5b21d7aabb 100644 --- a/addons/optionsmenu/init_loadMainMenuBox.sqf +++ b/addons/optionsmenu/init_loadMainMenuBox.sqf @@ -1,3 +1,5 @@ +#include "\a3\ui_f\hpp\defineResinclDesign.inc" +#include "script_component.hpp" /* * Author: PabstMirror * Loads the version info HTML box from main menu @@ -13,8 +15,6 @@ * * Public: No */ -#include "\a3\ui_f\hpp\defineResinclDesign.inc" -#include "script_component.hpp" params ["_display"]; private _controlsGroup = _display displayCtrl IDC_MAIN_INFO; diff --git a/addons/optionsmenu/stringtable.xml b/addons/optionsmenu/stringtable.xml index bd0c93016a..4d5846dced 100644 --- a/addons/optionsmenu/stringtable.xml +++ b/addons/optionsmenu/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/overheating/functions/fnc_calculateCooling.sqf b/addons/overheating/functions/fnc_calculateCooling.sqf index 2986bcb9c7..01983814f5 100644 --- a/addons/overheating/functions/fnc_calculateCooling.sqf +++ b/addons/overheating/functions/fnc_calculateCooling.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Calculate the cooling down of a weapon over a time interval. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_temperature", "_barrelMass", "_totalTime"]; diff --git a/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf b/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf index ae0dc760d3..ca4d76e77b 100644 --- a/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf +++ b/addons/overheating/functions/fnc_canCheckSpareBarrelsTemperatures.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Grey-Soldierman * Return true if player can check temperatures of spare barrels @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player"]; diff --git a/addons/overheating/functions/fnc_canSwapBarrel.sqf b/addons/overheating/functions/fnc_canSwapBarrel.sqf index 8d261db408..53104e19d5 100644 --- a/addons/overheating/functions/fnc_canSwapBarrel.sqf +++ b/addons/overheating/functions/fnc_canSwapBarrel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Grey-Soldierman * Return true if player can swap barrel @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit","_weapon"]; //Check if weapon can have its barrel swapped. If not exit out of function diff --git a/addons/overheating/functions/fnc_canUnjam.sqf b/addons/overheating/functions/fnc_canUnjam.sqf index f2ab7e8cc6..06511f79cd 100644 --- a/addons/overheating/functions/fnc_canUnjam.sqf +++ b/addons/overheating/functions/fnc_canUnjam.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Commy2 and esteldunedain * Return true if the unit can unjam it's current weapon @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_1("_unit",_unit); diff --git a/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf b/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf index 8f4280b261..4c7eba2919 100644 --- a/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf +++ b/addons/overheating/functions/fnc_checkSpareBarrelsTemperatures.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Make the player check the temperature of his spare barrels @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player"]; diff --git a/addons/overheating/functions/fnc_checkTemperature.sqf b/addons/overheating/functions/fnc_checkTemperature.sqf index c58d14a29d..b7be4f4c13 100644 --- a/addons/overheating/functions/fnc_checkTemperature.sqf +++ b/addons/overheating/functions/fnc_checkTemperature.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Commy2 and esteldunedain * Make the player check the temperature of his weapon @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_assistant", "_gunner", "_weapon"]; TRACE_3("params",_assistant,_gunner,_weapon); diff --git a/addons/overheating/functions/fnc_clearJam.sqf b/addons/overheating/functions/fnc_clearJam.sqf index 4dcdaa0caf..44b219fda2 100644 --- a/addons/overheating/functions/fnc_clearJam.sqf +++ b/addons/overheating/functions/fnc_clearJam.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Commy2 * Make the unit clear the jam from a weapon @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_weapon", ["_skipAnim", false]]; TRACE_3("params",_unit,_weapon,_skipAnim); diff --git a/addons/overheating/functions/fnc_displayTemperature.sqf b/addons/overheating/functions/fnc_displayTemperature.sqf index b02a555bd4..006d81f8f5 100644 --- a/addons/overheating/functions/fnc_displayTemperature.sqf +++ b/addons/overheating/functions/fnc_displayTemperature.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Commy2 and esteldunedain * Displays the weapon temperature @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_weapon"]; TRACE_2("params",_unit,_weapon); diff --git a/addons/overheating/functions/fnc_firedEH.sqf b/addons/overheating/functions/fnc_firedEH.sqf index e9bf89eef7..dd6b408a21 100644 --- a/addons/overheating/functions/fnc_firedEH.sqf +++ b/addons/overheating/functions/fnc_firedEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Commy2 and esteldunedain * Handle weapon fire. Called from the unified fired EH 1- always for the local player 2- and for non local players if dispersion is simulated. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/overheating/functions/fnc_getWeaponData.sqf b/addons/overheating/functions/fnc_getWeaponData.sqf index 21f6f156b8..a055f65b1e 100644 --- a/addons/overheating/functions/fnc_getWeaponData.sqf +++ b/addons/overheating/functions/fnc_getWeaponData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror and esteldunedain * Get weapon data with caching @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_weapon"]; diff --git a/addons/overheating/functions/fnc_handleTakeEH.sqf b/addons/overheating/functions/fnc_handleTakeEH.sqf index 0196629a45..d347e5f071 100644 --- a/addons/overheating/functions/fnc_handleTakeEH.sqf +++ b/addons/overheating/functions/fnc_handleTakeEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Commy2 * Handle "take" event @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" if !(GVAR(unJamOnreload)) exitWith {}; diff --git a/addons/overheating/functions/fnc_jamWeapon.sqf b/addons/overheating/functions/fnc_jamWeapon.sqf index 02966d0067..f8518add8e 100644 --- a/addons/overheating/functions/fnc_jamWeapon.sqf +++ b/addons/overheating/functions/fnc_jamWeapon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Commy2, based on KK_fnc_playerWeaponMulfunction from KillzoneKid * Jam the weapon @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_weapon"]; TRACE_2("params",_unit,_weapon); diff --git a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf index 6a155a29b7..5b7ce31571 100644 --- a/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf +++ b/addons/overheating/functions/fnc_loadCoolestSpareBarrel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Collect the temperature of all the spare barrels a unit has and load the @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_assistant", "_gunner", "_weapon", "_weaponTemp", "_barrelMass"]; TRACE_5("loadCoolestSpareBarrel1",_assistant,_gunner,_weapon,_weaponTemp,_barrelMass); diff --git a/addons/overheating/functions/fnc_overheat.sqf b/addons/overheating/functions/fnc_overheat.sqf index cc30e2ad22..cff8807003 100644 --- a/addons/overheating/functions/fnc_overheat.sqf +++ b/addons/overheating/functions/fnc_overheat.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Commy2 and esteldunedain * Handle weapon fire, heat up the weapon @@ -18,7 +19,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_weapon", "", "", "_ammo", "", "_projectile"]; TRACE_4("params",_unit,_weapon,_ammo,_projectile); diff --git a/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf b/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf index 0486dd5208..ff71814ea8 100644 --- a/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf +++ b/addons/overheating/functions/fnc_sendSpareBarrelsTemperaturesHint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Collect the temperature of all the spare barrels a unit has and send a hint @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player","_unit"]; diff --git a/addons/overheating/functions/fnc_swapBarrel.sqf b/addons/overheating/functions/fnc_swapBarrel.sqf index 40e4f193b8..b24ac39f3c 100644 --- a/addons/overheating/functions/fnc_swapBarrel.sqf +++ b/addons/overheating/functions/fnc_swapBarrel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Commy2 * Make a unit start swapping it's barrel @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_assistant", "_gunner", "_weapon"]; TRACE_3("params",_assistant,_gunner,_weapon); diff --git a/addons/overheating/functions/fnc_swapBarrelAssistant.sqf b/addons/overheating/functions/fnc_swapBarrelAssistant.sqf index fd75130be3..c8fbba6e3c 100644 --- a/addons/overheating/functions/fnc_swapBarrelAssistant.sqf +++ b/addons/overheating/functions/fnc_swapBarrelAssistant.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain, Commy2 * Make a unit start swapping the barrel of another unit @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_assistant", "_gunner", "_weapon"]; TRACE_3("params",_assistant,_gunner,_weapon); diff --git a/addons/overheating/functions/fnc_swapBarrelCallback.sqf b/addons/overheating/functions/fnc_swapBarrelCallback.sqf index 99cf8298f5..0b0dec4916 100644 --- a/addons/overheating/functions/fnc_swapBarrelCallback.sqf +++ b/addons/overheating/functions/fnc_swapBarrelCallback.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Commy2, esteldunedain * Swap barrel callback @@ -15,8 +16,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" params ["_assistant", "_gunner", "_weapon"]; TRACE_3("params",_assistant,_gunner,_weapon); diff --git a/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf index aaefe4f037..d2a499fb94 100644 --- a/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf +++ b/addons/overheating/functions/fnc_updateSpareBarrelsTemperaturesThread.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Calculate cooldown of all the stored spare barrels. @@ -13,8 +14,6 @@ * * Public: No */ -// #define DEBUG_MODE_FULL -#include "script_component.hpp" private _pairs = []; TRACE_1("updateSpareBarrelsTemperaturesThread1",GVAR(storedSpareBarrels)); diff --git a/addons/overheating/functions/fnc_updateTemperature.sqf b/addons/overheating/functions/fnc_updateTemperature.sqf index f56fc05e92..475f0454f9 100644 --- a/addons/overheating/functions/fnc_updateTemperature.sqf +++ b/addons/overheating/functions/fnc_updateTemperature.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Update temperature of a weapon. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_weapon", "_heatIncrement"]; TRACE_3("params",_unit,_weapon,_heatIncrement); diff --git a/addons/overheating/functions/fnc_updateTemperatureThread.sqf b/addons/overheating/functions/fnc_updateTemperatureThread.sqf index 1d1574b1ed..03f2bee53f 100644 --- a/addons/overheating/functions/fnc_updateTemperatureThread.sqf +++ b/addons/overheating/functions/fnc_updateTemperatureThread.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Update cooldown calculation of all player weapons at regular intervals. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - private _currentWeapon = currentWeapon ACE_player; if ((_currentWeapon != "") && {_currentWeapon == primaryWeapon ACE_player || {_currentWeapon == handgunWeapon ACE_player}}) then { [ACE_player, _currentWeapon, 0] call FUNC(updateTemperature); diff --git a/addons/overheating/stringtable.xml b/addons/overheating/stringtable.xml index e3995047a0..d54a9250d5 100644 --- a/addons/overheating/stringtable.xml +++ b/addons/overheating/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf b/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf index 96d45ffe04..7e984f993c 100644 --- a/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf +++ b/addons/overpressure/functions/fnc_cacheOverPressureValues.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: joko // Jonas * Cache the shot data for a given weapon/mag/ammo combination. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_weapon", "_ammo", "_magazine"]; TRACE_3("Parameter",_weapon,_magazine,_ammo); diff --git a/addons/overpressure/functions/fnc_firedEHBB.sqf b/addons/overpressure/functions/fnc_firedEHBB.sqf index e1370f0e9e..3c65ca813c 100644 --- a/addons/overpressure/functions/fnc_firedEHBB.sqf +++ b/addons/overpressure/functions/fnc_firedEHBB.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: joko // Jonas * Handle fire of local launchers. Called from the unified fired EH only for the local player. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/overpressure/functions/fnc_firedEHOP.sqf b/addons/overpressure/functions/fnc_firedEHOP.sqf index 0c02526928..5871fae9b8 100644 --- a/addons/overpressure/functions/fnc_firedEHOP.sqf +++ b/addons/overpressure/functions/fnc_firedEHOP.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: joko // Jonas * Handle fire of Vehicle Weapons. Called from the unified fired EH only for the local player vehicle. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/overpressure/functions/fnc_getDistance.sqf b/addons/overpressure/functions/fnc_getDistance.sqf index 5f76c12d1a..3e36a3ea78 100644 --- a/addons/overpressure/functions/fnc_getDistance.sqf +++ b/addons/overpressure/functions/fnc_getDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 and esteldunedain * Calculate the distance to the first intersection of a line @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_posASL", "_direction", "_maxDistance", "_shooter"]; TRACE_4("params",_posASL,_direction,_maxDistance, _shooter); diff --git a/addons/overpressure/functions/fnc_overpressureDamage.sqf b/addons/overpressure/functions/fnc_overpressureDamage.sqf index b8e4054e95..53b02fe10d 100644 --- a/addons/overpressure/functions/fnc_overpressureDamage.sqf +++ b/addons/overpressure/functions/fnc_overpressureDamage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 and esteldunedain * Calculate and apply backblast damage to potentially affected local units @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_firer", "_posASL", "_direction", "_weapon", "_magazine", "_ammo"]; diff --git a/addons/overpressure/stringtable.xml b/addons/overpressure/stringtable.xml index fc29bb24ba..1d64ebc0d3 100644 --- a/addons/overpressure/stringtable.xml +++ b/addons/overpressure/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -28,12 +28,14 @@ 後方噴射の範囲 向后喷射的范围 後方尾焰的範圍 + Raggio della fiammata [lanciarazzi] Backblast angle 後方噴射の角度 向后喷射的角度 後方尾焰的角度 + Angolo della fiammata [lanciarazzi] diff --git a/addons/parachute/XEH_postInit.sqf b/addons/parachute/XEH_postInit.sqf index 73ea9276a1..06e02f0757 100644 --- a/addons/parachute/XEH_postInit.sqf +++ b/addons/parachute/XEH_postInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Initialises the parachute system. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!hasInterface) exitWith {}; diff --git a/addons/parachute/XEH_preInit.sqf b/addons/parachute/XEH_preInit.sqf index e5fa52644b..5a10c0bd83 100644 --- a/addons/parachute/XEH_preInit.sqf +++ b/addons/parachute/XEH_preInit.sqf @@ -1,19 +1,6 @@ -/* - * Author: Garth 'L-H' de Wet - * Initialises the parachute system. - * - * Arguments: - * None - * - * Return Value: - * None - * - * Example: - * None - * - * Public: No - */ #include "script_component.hpp" +// Author: Garth 'L-H' de Wet +// Initialises the parachute system. ADDON = false; diff --git a/addons/parachute/functions/fnc_cutParachute.sqf b/addons/parachute/functions/fnc_cutParachute.sqf index af56235ba0..286673af41 100644 --- a/addons/parachute/functions/fnc_cutParachute.sqf +++ b/addons/parachute/functions/fnc_cutParachute.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: joko, Jonas, SilentSpike * Perform the cut parachute action (move unit out and delete) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_parachute"]; _unit action ["GetOut", _parachute]; deleteVehicle _parachute; diff --git a/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf b/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf index 644bd29c94..280765d8a2 100644 --- a/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf +++ b/addons/parachute/functions/fnc_handleInfoDisplayChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Hides the height and velocity display while freefalling or parachuting on higher difficulties. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_dialog", "_type"]; diff --git a/addons/parachute/functions/fnc_handleReserve.sqf b/addons/parachute/functions/fnc_handleReserve.sqf index 7b92d8e9f4..3df8d6607e 100644 --- a/addons/parachute/functions/fnc_handleReserve.sqf +++ b/addons/parachute/functions/fnc_handleReserve.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: joko, Jonas, SilentSpike * Cache reserve parachute on player unit when their inventory changes and add it when they open their parachute @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_unit"]; private _backpack = backpack _unit; diff --git a/addons/parachute/functions/fnc_hideAltimeter.sqf b/addons/parachute/functions/fnc_hideAltimeter.sqf index 50f1eac503..280ee286b4 100644 --- a/addons/parachute/functions/fnc_hideAltimeter.sqf +++ b/addons/parachute/functions/fnc_hideAltimeter.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Removes the altimeter from the screen. @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" GVAR(AltimeterActive) = false; "ACE_Altimeter" cutText ["","PLAIN",0,true]; diff --git a/addons/parachute/functions/fnc_showAltimeter.sqf b/addons/parachute/functions/fnc_showAltimeter.sqf index c93775e135..d4aa11f883 100644 --- a/addons/parachute/functions/fnc_showAltimeter.sqf +++ b/addons/parachute/functions/fnc_showAltimeter.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet * Displays the altimeter on screen. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/parachute/stringtable.xml b/addons/parachute/stringtable.xml index f1321d54bb..293506b4d5 100644 --- a/addons/parachute/stringtable.xml +++ b/addons/parachute/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/pylons/XEH_postInit.sqf b/addons/pylons/XEH_postInit.sqf index 6a8f781469..0fdcaee056 100644 --- a/addons/pylons/XEH_postInit.sqf +++ b/addons/pylons/XEH_postInit.sqf @@ -15,10 +15,14 @@ GVAR(aircraftWithPylons) = (_filter configClasses (configFile >> "CfgVehicles")) if (!GVAR(enabledFromAmmoTrucks)) exitWith {false}; private _vehicles = nearestObjects [_target, ["Air", "LandVehicle", "Slingload_base_F", "ReammoBox_F"], GVAR(searchDistance) + 10]; - private _filter = ["transportAmmo", QEGVAR(rearm,defaultSupply)] select (["ace_rearm"] call EFUNC(common,isModLoaded)); - private _rearmVehicles = {(getNumber (configFile >> "CfgVehicles" >> typeOf _x >> _filter)) > 0} count _vehicles; - - (_rearmVehicles > 0 && {[ace_player, _target] call FUNC(canConfigurePylons)}) + private _isRearmVehicle = if (["ace_rearm"] call EFUNC(common,isModLoaded)) then { + _vehicles findIf {[_x] call EFUNC(rearm,isSource)} != -1; + } else { + private _cfgVehicle = configFile >> "CfgVehicles"; + _vehicles findIf {getNumber (_cfgVehicle >> typeOf _x >> "transportAmmo") > 0} != -1; + }; + + (_isRearmVehicle && {[ace_player, _target] call FUNC(canConfigurePylons)}) } ] call EFUNC(interact_menu,createAction); diff --git a/addons/pylons/functions/fnc_canConfigurePylons.sqf b/addons/pylons/functions/fnc_canConfigurePylons.sqf index c679b9592d..546d3e6766 100644 --- a/addons/pylons/functions/fnc_canConfigurePylons.sqf +++ b/addons/pylons/functions/fnc_canConfigurePylons.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Checks if given unit can access the pylon configuration dialog for the given aircraft. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_aircraft"]; diff --git a/addons/pylons/functions/fnc_configurePylons.sqf b/addons/pylons/functions/fnc_configurePylons.sqf index 401063f8a9..81313ce61e 100644 --- a/addons/pylons/functions/fnc_configurePylons.sqf +++ b/addons/pylons/functions/fnc_configurePylons.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Recursively shows the progress bar for each configured pylon. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_pylonsToConfigure", "_currentPylon"]; diff --git a/addons/pylons/functions/fnc_handleDisconnect.sqf b/addons/pylons/functions/fnc_handleDisconnect.sqf index f255b36535..9ad646eb31 100644 --- a/addons/pylons/functions/fnc_handleDisconnect.sqf +++ b/addons/pylons/functions/fnc_handleDisconnect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Cleans up pylons on client disconnect. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "", "_uid"]; diff --git a/addons/pylons/functions/fnc_onButtonApply.sqf b/addons/pylons/functions/fnc_onButtonApply.sqf index ae27e98d4c..5603ed8d94 100644 --- a/addons/pylons/functions/fnc_onButtonApply.sqf +++ b/addons/pylons/functions/fnc_onButtonApply.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Starts the pylon configuration. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Check for FRIES change private _checkbox = CONTROL(ID_DIALOG) ID_CHECKBOX_FRIES; diff --git a/addons/pylons/functions/fnc_onButtonClose.sqf b/addons/pylons/functions/fnc_onButtonClose.sqf index fa06f3d506..c0f51e634a 100644 --- a/addons/pylons/functions/fnc_onButtonClose.sqf +++ b/addons/pylons/functions/fnc_onButtonClose.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Handles the closing of the dialog. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" GVAR(currentAircraft) setVariable [QGVAR(currentUser), objNull, true]; GVAR(currentAircraftNamespace) setVariable [getPlayerUID ace_player, nil, true]; // Remove var from namespace, no need to keep objNull diff --git a/addons/pylons/functions/fnc_onButtonDelete.sqf b/addons/pylons/functions/fnc_onButtonDelete.sqf index 8d1fdee6de..eaf16cd99a 100644 --- a/addons/pylons/functions/fnc_onButtonDelete.sqf +++ b/addons/pylons/functions/fnc_onButtonDelete.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Deletes the selected pylon configuration from profileNamespace. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _loadoutName = lbText [ID_LIST_LOADOUTS, lbCurSel ID_LIST_LOADOUTS]; diff --git a/addons/pylons/functions/fnc_onButtonLoad.sqf b/addons/pylons/functions/fnc_onButtonLoad.sqf index 9092d0a910..af3183073a 100644 --- a/addons/pylons/functions/fnc_onButtonLoad.sqf +++ b/addons/pylons/functions/fnc_onButtonLoad.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Loads selected pylon configuration from either config or profileNamespace. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" [false] call FUNC(onPylonMirror); (CONTROL(ID_DIALOG) ID_CHECKBOX_MIRROR) cbSetChecked false; diff --git a/addons/pylons/functions/fnc_onButtonSave.sqf b/addons/pylons/functions/fnc_onButtonSave.sqf index c20c8928ec..8f30ad1a58 100644 --- a/addons/pylons/functions/fnc_onButtonSave.sqf +++ b/addons/pylons/functions/fnc_onButtonSave.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Saves the selected pylon configuration to profileNamespace. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _loadoutName = ctrlText ID_EDIT_LOADOUTNAME; private _aircraftLoadouts = profileNamespace getVariable [QGVAR(aircraftLoadouts), []]; diff --git a/addons/pylons/functions/fnc_onButtonTurret.sqf b/addons/pylons/functions/fnc_onButtonTurret.sqf index 4554075c37..e6828bab99 100644 --- a/addons/pylons/functions/fnc_onButtonTurret.sqf +++ b/addons/pylons/functions/fnc_onButtonTurret.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Handles init and click events of turret switch buttons. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_ctrl", "_switch", "_turret"]; diff --git a/addons/pylons/functions/fnc_onComboSelChange.sqf b/addons/pylons/functions/fnc_onComboSelChange.sqf index 97130ea54d..aa71c65099 100644 --- a/addons/pylons/functions/fnc_onComboSelChange.sqf +++ b/addons/pylons/functions/fnc_onComboSelChange.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Handles various UI changes when a combobox' selection changes. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_ctrl", "_index"]; diff --git a/addons/pylons/functions/fnc_onNameChange.sqf b/addons/pylons/functions/fnc_onNameChange.sqf index 9915aeee70..70344baa80 100644 --- a/addons/pylons/functions/fnc_onNameChange.sqf +++ b/addons/pylons/functions/fnc_onNameChange.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Called when current loadout name is changed. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" if ((ctrlText ID_EDIT_LOADOUTNAME) in GVAR(defaultLoadoutNames)) then { ctrlEnable [ID_BUTTON_SAVE, false]; diff --git a/addons/pylons/functions/fnc_onPylonMirror.sqf b/addons/pylons/functions/fnc_onPylonMirror.sqf index 55987b2b94..949668ceb8 100644 --- a/addons/pylons/functions/fnc_onPylonMirror.sqf +++ b/addons/pylons/functions/fnc_onPylonMirror.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Called when the "mirror" checkbox on the loadout dialog is checked. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_checked"]; diff --git a/addons/pylons/functions/fnc_showDialog.sqf b/addons/pylons/functions/fnc_showDialog.sqf index c7836c07b1..2ce438e0ab 100644 --- a/addons/pylons/functions/fnc_showDialog.sqf +++ b/addons/pylons/functions/fnc_showDialog.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Shows the aircraft loadout dialog for given aircraft. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_aircraft", ["_isCurator", false]]; diff --git a/addons/pylons/stringtable.xml b/addons/pylons/stringtable.xml index f40af57651..737b17efd3 100644 --- a/addons/pylons/stringtable.xml +++ b/addons/pylons/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -9,6 +9,7 @@ 飞机武器配置 항공기 무장 AUSRÜSTUNG DES FLUGGERÄTS + ÉQUIPEMENTS DE L'AÉRONEF Loadouts for %1 @@ -18,6 +19,7 @@ %1用的武器配置 %1 무장 Ausrüstung für %1 + Équipements pour %1 Configure Pylons @@ -27,6 +29,7 @@ 设定导弹挂架 파일런 설정 Konfiguriere Außenlaststationen + Configurer les pylônes ACE Pylons @@ -36,6 +39,7 @@ ACE 导弹挂架 ACE 파일런 ACE Außenlaststationen + ACE Pylônes <empty> @@ -45,6 +49,7 @@ <空> <비어있음> <leer> + <vide> Pylons that are colored red will have to be manually rearmed. @@ -54,6 +59,7 @@ 以红色标记出的导弹挂架必须以手动方式进行弹药整补。 붉은색의 파일런은 수동으로 재무장해야 합니다. Außenlaststationen, die rot markiert sind, müssen manuell aufmunitioniert werden. + Les pylônes colorés en rouge devront être réarmés manuellement. %1 is already configuring this aircraft! @@ -63,6 +69,7 @@ %1已经正在定义此飞机的武器配置! 이미 이 항공기에 장착되어 있음 (%1) %1 konfiguriert dieses Fluggerät bereits! + %1 est déjà en train de configurer cet aéronef ! Replacing pylon %1 out of %2... @@ -72,6 +79,7 @@ 共有%2个发射架,正在整装%1号挂架中... 교체중 (%2 -> %1) Ersetze Außenlaststation %1 von insgesamt %2 + Remplacement du pylône %1 sur %2 ... Stopped at pylon %1! @@ -81,6 +89,7 @@ 已停止在%1号挂架! %1 파일런이 멈춤 Gestoppt bei Außenlaststation %1 + Arrêté au pylône %1 ! Vehicle too far @@ -90,42 +99,55 @@ 载具过远 車両が遠すぎます Fahrzeug zu weit entfernt + Véhicule trop éloigné Enable Pylons Menu for Zeus 启用宙斯导弹挂架菜单 啟用派龍架選單給宙斯 Abilita Menù Piloni da Zeus + Zeus でパイロン メニューを有効化 + Activer le menu des pylônes (Zeus) Enables use of the zeus module. 允许启用宙斯模组 允啟使用宙斯模塊 Abilita l'uso dal modulo di Zeus + Zeus モジュールでパイロン メニューを利用できます。 + Autorise l'utilisation des modules Zeus Enable Pylons Menu from Ammo Trucks 启用弹药车导弹挂架菜单 啟用從彈藥卡車使用派龍架選單 Abilita Menù Piloni da mezzi rifornimento munizioni + 弾薬トラックからパイロン メニューを有効化 + Activer le menu des pylônes (camion de munitions) Enables use of pylons menu from ammo trucks. 允许在弹药车上启用导弹挂架菜单 允許從彈藥卡車使用派龍架選單 Abilita l'uso del Menù Piloni da mezzi rifornimento munizioni + 弾薬給弾トラックからパイロン メニューを利用できます。 + Autorise l'utilisation du menu des pylônes depuis les camions de munitions. This aircraft doesn't have pylons 这架飞机没有导弹挂架 這架飛機沒有派龍架 Questo aereo non ha piloni + 航空機にパイロンがありません + Cet aéronef n'a pas de pylônes Configure pylons module is disabled for zeus 宙斯模组的导弹挂架已禁用 宙斯模塊的派龍架設定已被禁用 Il modulo per configurare i piloni da Zeus è disabilitato + Zeus のパイロン モジュールを無効化 + La configuration de pylônes est désactivé pour Zeus Rearm New Pylons @@ -135,6 +157,7 @@ 重新武装新的派龙架 새파일런 재무장 Neue Außenlaststationen. aufmunitionieren + Réarmer les nouveaux pylônes Automatically rearm new pylons from the nearest rearm vehicle. @@ -144,6 +167,7 @@ 自动从附近的整装载具中为导弹挂架进行弹药整装。 근처의 재무장 차량에서 빈 파일런을 자동으로 재무장 합니다. Neue Außenlaststationen. automatisch vom nächsten Munitionsfahrzeug aufmunitionieren + Réarmer automatiquement tout les nouveau pylônes depuis le véhicule de munitions le plus proche. Time Per Pylon @@ -153,6 +177,7 @@ 导弹挂架整装所需时间(个别) 파일런당 시간 Zeit pro Außenlaststation + Durée par pylône The time it takes to replace each pylon (in seconds). @@ -162,6 +187,7 @@ 每个挂架需花多久时间进行整装单位为秒)。 파일런을 재설정 하는데 걸리는 시간 (초) Die benötigte Zeit, um einzelne Außenlaststationen zu ersetzen (in Sekunden). + Le temps nécessaire pour remplacer chaque pylône (en secondes). Search Distance @@ -171,15 +197,17 @@ 搜索距离 검색 반경 Suchdistanz + Distance de recherche The distance an aircraft needs to be from a rearm vehicle. - 補給車両から航空機までの必要な距離。 + 航空機と補給車両との間に必要な距離です。 La distanza necessaria per un aereo da un veicolo di riarmo. 設定飛機必須距離整補載具多少公尺才能進行彈藥整補 设定飞机必须距离整装载具多少公尺才能进行弹药整装。 항공기에서 재보급 가능한 재무장 차량을 찾습니다. Die Distanz, die ein Fahrzeug von einem Munitionsfahrzeug entfernt sein darf. + La distance à laquelle un aéronef doit être d'un véhicule de munitions. Require Engineer @@ -189,6 +217,7 @@ 必须是工兵 정비병 요구 Benötigt Pionier + Requiert ingénieur Require an engineer. @@ -198,6 +227,7 @@ 必须是工兵才能进行弹药整装。 정비병이 필요합니다. Benötigt einen Pionier. + Requiert un ingénieur. Require Toolkit @@ -207,6 +237,7 @@ 需要工具包 툴킷 요구 Benötigt Werkzeugkasten + Requiert trousse à outils Require a toolkit in inventory. @@ -216,6 +247,7 @@ 需要工具包才能进行弹药整装。 툴킷이 필요합니다. Benötigt einen Werkzeugkasten im Inventar. + Requiert une trousse à outils dans l'inventaire. diff --git a/addons/quickmount/ACE_Settings.hpp b/addons/quickmount/ACE_Settings.hpp index b4e07be4b4..e494789d92 100644 --- a/addons/quickmount/ACE_Settings.hpp +++ b/addons/quickmount/ACE_Settings.hpp @@ -1,41 +1,14 @@ class ACE_Settings { class GVAR(enabled) { - value = 0; - typeName = "BOOL"; - category = CSTRING(Category); - displayName = ECSTRING(common,Enabled); - description = CSTRING(KeybindDescription); - isClientSettable = 1; - force = 0; + movedToSQF = 1; }; class GVAR(distance) { - value = DEFAULT_DISTANCE; - typeName = "SCALAR"; - category = CSTRING(Category); - displayName = CSTRING(Distance); - description = CSTRING(DistanceDescription); - isClientSettable = 0; - force = 0; - values[] = {"0m", "1m", "2m", "3m", "4m", "5m", "6m", "7m", "8m", "9m", "10m"}; + movedToSQF = 1; }; class GVAR(speed) { - value = DEFAULT_SPEED; - typeName = "SCALAR"; - category = CSTRING(Category); - displayName = CSTRING(Speed); - description = CSTRING(SpeedDescription); - isClientSettable = 0; - force = 0; - values[] = {"0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"}; + movedToSQF = 1; }; class GVAR(priority) { - value = DEFAULT_PRIORITY; - typeName = "SCALAR"; - category = CSTRING(Category); - displayName = CSTRING(Priority); - description = CSTRING(PriorityDescription); - isClientSettable = 1; - force = 0; - values[] = {"$str_getin_pos_driver", "$str_getin_pos_gunn", "$str_getin_pos_comm", "$STR_GETIN_POS_PASSENGER"}; + movedToSQF = 1; }; }; diff --git a/addons/quickmount/XEH_preInit.sqf b/addons/quickmount/XEH_preInit.sqf index b47cf6628d..9361d05015 100644 --- a/addons/quickmount/XEH_preInit.sqf +++ b/addons/quickmount/XEH_preInit.sqf @@ -6,4 +6,6 @@ PREP_RECOMPILE_START; #include "XEH_PREP.hpp" PREP_RECOMPILE_END; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/quickmount/functions/fnc_getInNearest.sqf b/addons/quickmount/functions/fnc_getInNearest.sqf index 49f1f3521c..8e8d77fe8d 100644 --- a/addons/quickmount/functions/fnc_getInNearest.sqf +++ b/addons/quickmount/functions/fnc_getInNearest.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Kingsley * Mount the player in the vehicle they are directly looking at based on their distance. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!GVAR(enabled) || {isNull ACE_player} || @@ -70,13 +70,17 @@ if (!isNull _target && if ((!(_turretPath isEqualTo [])) && {_target lockedTurret _turretPath}) exitWith {TRACE_1("lockedTurret",_x);}; if (_effectiveRole == "turret") then { - if ((getNumber (([_target, _turretPath] call CBA_fnc_getTurret) >> "isCopilot")) == 1) exitWith { + private _turretConfig = [_target, _turretPath] call CBA_fnc_getTurret; + if (getNumber (_turretConfig >> "isCopilot") == 1) exitWith { _effectiveRole = "driver"; }; - if (_cargoIndex < 0) exitWith { - _effectiveRole = "gunner"; // door gunners / 2nd turret + if ( + _cargoIndex >= 0 // FFV + || {"" isEqualTo getText (_turretConfig >> "gun")} // turret without weapon + ) exitWith { + _effectiveRole = "cargo"; }; - _effectiveRole = "cargo"; // probably a FFV + _effectiveRole = "gunner"; // door gunners / 2nd turret }; TRACE_2("",_effectiveRole,_x); if (_effectiveRole != _desiredRole) exitWith {}; @@ -93,7 +97,7 @@ if (!isNull _target && { if ((_x select 2) == _cargoIndex) exitWith {_cargoActionIndex = _forEachIndex}; } forEach (fullCrew [_target, "cargo", true]); - + ACE_player action ["GetInCargo", _target, _cargoActionIndex]; TRACE_4("Geting In Cargo",_x,_role,_cargoActionIndex,_cargoIndex); } else { diff --git a/addons/quickmount/functions/fnc_moduleInit.sqf b/addons/quickmount/functions/fnc_moduleInit.sqf index 92df787737..216cda90c0 100644 --- a/addons/quickmount/functions/fnc_moduleInit.sqf +++ b/addons/quickmount/functions/fnc_moduleInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Kingsley * Initializes the quick-mount module. @@ -12,7 +13,6 @@ * * Public: No */ -#include "script_component.hpp" if (!isServer) exitWith {}; diff --git a/addons/quickmount/initSettings.sqf b/addons/quickmount/initSettings.sqf new file mode 100644 index 0000000000..e8049aafc2 --- /dev/null +++ b/addons/quickmount/initSettings.sqf @@ -0,0 +1,36 @@ +[ + QGVAR(enabled), + "CHECKBOX", + localize ELSTRING(common,Enabled), + format ["ACE %1", localize LSTRING(Category)], + true, + true +] call CBA_settings_fnc_init; + +[ + QGVAR(distance), + "SLIDER", + [localize LSTRING(Distance), localize LSTRING(DistanceDescription)], + format ["ACE %1", localize LSTRING(Category)], + [0, 10, DEFAULT_DISTANCE, 0], + true +] call CBA_settings_fnc_init; + +[ + QGVAR(speed), + "SLIDER", + [localize LSTRING(Speed), localize LSTRING(SpeedDescription)], + format ["ACE %1", localize LSTRING(Category)], + [0, 30, DEFAULT_SPEED, 0], + true +] call CBA_settings_fnc_init; + +[ + QGVAR(priority), + "LIST", + [localize LSTRING(Priority), localize LSTRING(PriorityDescription)], + format ["ACE %1", localize LSTRING(Category)], + [[0, 1, 2, 3], [localize "str_getin_pos_driver", localize "str_getin_pos_gunn", localize "str_getin_pos_comm", localize "str_getin_pos_passenger"], DEFAULT_PRIORITY], + false +] call CBA_settings_fnc_init; + diff --git a/addons/quickmount/stringtable.xml b/addons/quickmount/stringtable.xml index e928380c26..2e1a6b9743 100644 --- a/addons/quickmount/stringtable.xml +++ b/addons/quickmount/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/rangecard/functions/fnc_calculateRangeCard.sqf b/addons/rangecard/functions/fnc_calculateRangeCard.sqf index 5bb12e220a..ebeadf6b7e 100644 --- a/addons/rangecard/functions/fnc_calculateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_calculateRangeCard.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the range card data @@ -29,7 +30,6 @@ * * Public: No */ -#include "script_component.hpp" params [ "_scopeBaseAngle", "_boreHeight", "_airFriction", "_muzzleVelocity", "_temperature", "_barometricPressure", "_relativeHumidity", "_simSteps", diff --git a/addons/rangecard/functions/fnc_canCopy.sqf b/addons/rangecard/functions/fnc_canCopy.sqf index 8984192669..ee85bcf096 100644 --- a/addons/rangecard/functions/fnc_canCopy.sqf +++ b/addons/rangecard/functions/fnc_canCopy.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Authors: Ruthberg * Checks if the target has a copyable range card @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" ((primaryWeapon _this) != "" && [_this] call EFUNC(common,isPlayer) && [_this, "ACE_RangeCard"] call EFUNC(common,hasItem)) diff --git a/addons/rangecard/functions/fnc_canShow.sqf b/addons/rangecard/functions/fnc_canShow.sqf index d81bba9485..6b3cf6997a 100644 --- a/addons/rangecard/functions/fnc_canShow.sqf +++ b/addons/rangecard/functions/fnc_canShow.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Authors: Ruthberg * Tests if the Range Card can be shown @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" (GVAR(ammoClass) != "" && GVAR(magazineClass) != "" && GVAR(weaponClass) != "" && !GVAR(RangeCardOpened) && ("ACE_RangeCard" in (uniformItems ACE_player)) || ("ACE_RangeCard" in (vestItems ACE_player))) diff --git a/addons/rangecard/functions/fnc_canShowCopy.sqf b/addons/rangecard/functions/fnc_canShowCopy.sqf index b6e2d8d68d..e4eb28b60b 100644 --- a/addons/rangecard/functions/fnc_canShowCopy.sqf +++ b/addons/rangecard/functions/fnc_canShowCopy.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Authors: Ruthberg * Tests if the Range Card copy can be shown @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" (GVAR(ammoClassCopy) != "" && GVAR(magazineClassCopy) != "" && GVAR(weaponClassCopy) != "" && !GVAR(RangeCardOpened) && ("ACE_RangeCard" in (uniformItems ACE_player)) || ("ACE_RangeCard" in (vestItems ACE_player))) diff --git a/addons/rangecard/functions/fnc_onCloseDialog.sqf b/addons/rangecard/functions/fnc_onCloseDialog.sqf index 68d12c8c84..0a93eb897c 100644 --- a/addons/rangecard/functions/fnc_onCloseDialog.sqf +++ b/addons/rangecard/functions/fnc_onCloseDialog.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: joko // Jonas * Add the Reserve Parachute to Units or Save Backpack if is a Parachute in Unit @@ -14,7 +15,5 @@ * Public: No */ -#include "script_component.hpp" - uiNamespace setVariable ['RangleCard_Display', nil]; GVAR(RangeCardOpened) = false; diff --git a/addons/rangecard/functions/fnc_openRangeCard.sqf b/addons/rangecard/functions/fnc_openRangeCard.sqf index 5801b594be..ed2bb9e241 100644 --- a/addons/rangecard/functions/fnc_openRangeCard.sqf +++ b/addons/rangecard/functions/fnc_openRangeCard.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Authors: Ruthberg * Opens the range card dialog @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (GVAR(RangeCardOpened)) exitWith {}; diff --git a/addons/rangecard/functions/fnc_updateClassNames.sqf b/addons/rangecard/functions/fnc_updateClassNames.sqf index 8af70eb02b..e13198bcfc 100644 --- a/addons/rangecard/functions/fnc_updateClassNames.sqf +++ b/addons/rangecard/functions/fnc_updateClassNames.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Authors: Ruthberg * Updates the ammo and weapon class names @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _unit = _this; diff --git a/addons/rangecard/functions/fnc_updateRangeCard.sqf b/addons/rangecard/functions/fnc_updateRangeCard.sqf index 9ab6fc6341..9fc2c9ebab 100644 --- a/addons/rangecard/functions/fnc_updateRangeCard.sqf +++ b/addons/rangecard/functions/fnc_updateRangeCard.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Authors: Ruthberg * Updates the range card data @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; #define __dsp (uiNamespace getVariable "RangleCard_Display") diff --git a/addons/realisticnames/CfgMagazines.hpp b/addons/realisticnames/CfgMagazines.hpp index 65d6e3d05e..bc84947798 100644 --- a/addons/realisticnames/CfgMagazines.hpp +++ b/addons/realisticnames/CfgMagazines.hpp @@ -396,6 +396,10 @@ class CfgMagazines { displayName = CSTRING(HandGrenade_Name); displayNameShort = "M67"; }; + class MiniGrenade: CA_Magazine { + displayName = CSTRING(MiniGrenade_Name); + displayNameShort = "V40"; + }; class SmokeShell: HandGrenade { displayName = CSTRING(SmokeShell_Name); }; diff --git a/addons/realisticnames/CfgWeapons.hpp b/addons/realisticnames/CfgWeapons.hpp index 6959334fb6..259074925f 100644 --- a/addons/realisticnames/CfgWeapons.hpp +++ b/addons/realisticnames/CfgWeapons.hpp @@ -675,7 +675,32 @@ class CfgWeapons { class optic_LRPS_tna_F : optic_LRPS { displayName = CSTRING(optic_lrps_tna); }; - + + class optic_AMS_base; + class optic_AMS: optic_AMS_base { + displayName = CSTRING(optic_ams); + }; + class optic_AMS_khk: optic_AMS { + displayName = CSTRING(optic_ams_khk); + }; + class optic_AMS_snd: optic_AMS { + displayName = CSTRING(optic_ams_snd); + }; + + class optic_KHS_base; + class optic_KHS_blk: optic_KHS_base { + displayName = CSTRING(optic_khs_blk); + }; + class optic_KHS_hex: optic_KHS_blk { + displayName = CSTRING(optic_khs_hex); + }; + class optic_KHS_old: ItemCore { + displayName = CSTRING(optic_khs_old); + }; + class optic_KHS_tan: optic_KHS_blk { + displayName = CSTRING(optic_khs_tan); + }; + class optic_DMS : ItemCore { displayName = CSTRING(optic_dms); }; diff --git a/addons/realisticnames/stringtable.xml b/addons/realisticnames/stringtable.xml index 25f9d749f9..7bbcc0a1b0 100644 --- a/addons/realisticnames/stringtable.xml +++ b/addons/realisticnames/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -395,7 +395,7 @@ HEMTT Контейнер HEMTT Contêiner HEMTT (konténer) - HEMTT portacontainer + HEMTT portacontainer HEMTT コンテナ型 HEMTT 컨테이너 重型增程機動戰術卡車 (貨櫃) @@ -662,6 +662,7 @@ KamAS MRL "卡瑪斯"卡車 (多管火箭) "卡玛斯"卡车 (多管火箭) + KamAZ MRL Karatel @@ -1242,12 +1243,12 @@ M112 Sprengladung Bloque de demolición M112 Ładunek burzący M112 - Výbušná nálož M112 + Výbušná nálož M112 M112 Block de Démolition M112 подрывной заряд M112 Carga de Demolição M112 romboló tömb - M112 Demolition Block + M112 da Demolizione M112 爆薬ブロック M112 폭파 블럭 M112塑性炸藥 @@ -1258,7 +1259,7 @@ M67 Splittergranate Granada de fragmentación M67 Granat obronny M67 - Granát M67 + Granát M67 M67 Grenade à fragmentation M67 ручная осколочная граната M67 Granada de fragmentação @@ -1269,6 +1270,11 @@ M67破片手榴彈 M67破片手榴弹 + + V40 Mini-Grenade + V40 Minigranate + Mini Granata V40 + M83 Smoke Grenade (White) M83 Rauchgranate (Weiß) @@ -1386,7 +1392,7 @@ M15 Panzerabwehrmine Mina antitanque M15 Mina przeciwpancerna M15 - M15 Protitanková mina + M15 Protitanková mina M15 Mine antichar M15 противотанковая мина M15 Mina anticarro @@ -1612,6 +1618,7 @@ Метис-М "麥士蒂索人"-M型反坦克導彈 "麦士蒂索人"-M型反坦克导弹 + Metis-M Metis-M (Brown) @@ -1620,6 +1627,7 @@ Метис-М (Кори́чневый) "麥士蒂索人"-M型反坦克導彈(棕色) "麦士蒂索人"-M型反坦克导弹(棕色) + Metis-M (Marrone) Metis-M (Green) @@ -1628,6 +1636,7 @@ Метис-М (Зелёный) "麥士蒂索人"-M型反坦克導彈(綠色) "麦士蒂索人"-M型反坦克导弹(绿色) + Metis-M (Verde) MX @@ -2626,12 +2635,16 @@ Jeep Wrangler (SPG-9) "牧马人"吉普车(SPG-9火箭筒) "牧馬人"吉普車 (SPG-9火箭筒) + ジープ ラングラー (SPG-9) + Jeep Wrangler (SPG-9) Jeep Wrangler (LMG) Jeep Wrangler (LMG) "牧马人"吉普车(轻机枪) "牧馬人"吉普車 (輕機槍) + ジープ ラングラー (LMG) + Jeep Wrangler (LMG) Cessna TTx @@ -3183,12 +3196,14 @@ ポラリス DAGOR (XM312) "北極星"先進佈署越野車 (XM312重機槍) "北极星"先进布署越野车 (XM312重机枪) + Polaris DAGOR (XM312) Polaris DAGOR (Mini-Spike AT) Polaris DAGOR (Mini-Spike PzAbw) "北极星"先进布署越野车("迷你长钉"反坦克导弹发射器) "北極星"先進佈署越野車("迷你長釘"反坦克導彈發射器) + Polaris DAGOR (Mini-Spike AT) Polaris DAGOR @@ -3196,6 +3211,7 @@ ポラリス DAGOR "北極星"先進佈署越野車 "北极星"先进布署越野车 + Polaris DAGOR Polaris DAGOR (light) @@ -3203,38 +3219,47 @@ ポラリス DAGOR (軽) "北極星"先進佈署越野車 (輕型) "北极星"先进布署越野车 (轻型) + Polaris DAGOR (leggero) LSV Mk. II (M134) LSV Mk. II (M134) - LSV Mk. II (M134) 輕型突擊車2式 (M134迷你機炮) 轻型突击车2式 (M134迷你机炮) + LSV Mk. II (M134) + LSV Mk. II (M134) LSV Mk. II (Metis-M) LSV Mk. II (Metis-M) 轻型突击车2式 ("麦士蒂索人"-M型反坦克导弹) 輕型突擊車2式 ("麥士蒂索人"-M型反坦克導彈) + LSV Mk. II (メチス-M) + LSV Mk. II (Metis-M) LSV Mk. II LSV Mk. II - LSV Mk. II 輕型突擊車2式 轻型突击车2式 + LSV Mk. II + LSV Mk. II Rooikat 120 Rooikat 120 "狞猫"120主炮轮式装甲车 "獰貓"120主炮輪式裝甲車 + ルーイカット 120 + Rooikat 120 Rooikat 120 UP Rooikat 120 UP "狞猫"120主炮轮式装甲车 (城市版) "獰貓"120主炮輪式裝甲車 (城市版) + ルーイカット 120 UP + Rooikat 120 UP T-14 Armata @@ -3242,6 +3267,8 @@ Т-14 Армата T-14"阿玛塔"主战坦克 T-14"阿瑪塔"主戰坦克 + T-14 アルマータ + T-14 Armata T-14K Armata @@ -3249,173 +3276,275 @@ Т-14К Армата T-14K"阿玛塔"主战坦克 T-14K"阿瑪塔"主戰坦克 + T-14K アルマータ + T-14K Armata Wiesel 2 Ozelot (AA) Wiesel 2 Ozelot (FlaRaWaTrg) "鼬鼠"2装甲车 (防空) "鼬鼠"2裝甲車 (防空) + ウィーゼル 2 オゼロット (対空) + Wiesel 2 Ozelot (AA) Wiesel 2 (ATGM) Wiesel 2 (PzAbw) "鼬鼠"2装甲车 (反坦导弹) "鼬鼠"2裝甲車 (反坦導彈) + ウィーゼル 2 (ATGM) + Wiesel 2 (ATGM) Wiesel 2 (MK20) Wiesel 2 (MK20) "鼬鼠"2装甲车 (MK20机炮) "鼬鼠"2裝甲車 (MK20機炮) + ウィーゼル 2 (MK20) + Wiesel 2 (MK20) Wiesel 2 RFCV (Radar) Wiesel 2 AFF (Radar) "鼬鼠"2装甲车 (雷达) "鼬鼠"2裝甲車 (雷達) + ウィーゼル 2 (レーダー) + Wiesel 2 RFCV (Radar) Leupold Mark 4 HAMR Leupold Mark 4 HAMR Leupold Mark 4 HAMR Leupold Mark 4 HAMR + Leupold Mark 4 HAMR + Leupold Mark 4 HAMR Leupold Mark 4 HAMR (Khaki) Leupold Mark 4 HAMR (Khaki) Leupold Mark 4 HAMR (卡其色) Leupold Mark 4 HAMR (卡其色) + Leupold Mark 4 HAMR (土埃) + Leupold Mark 4 HAMR (Khaki) ELCAN SpecterOS (Tan) ELCAN SpecterOS (Beige) ELCAN SpecterOS (黃褐色) ELCAN SpecterOS (黄褐色) + ELCAN SpecterOS (黄褐) + ELCAN SpecterOS (Tan) ELCAN SpecterOS (Black) ELCAN SpecterOS (Schwarz) ELCAN SpecterOS (黑色) ELCAN SpecterOS (黑色) + ELCAN SpecterOS (黒) + ELCAN SpecterOS (Nero) ELCAN SpecterOS (Green Hex) ELCAN SpecterOS (綠色數位蜂巢迷彩) ELCAN SpecterOS (绿色数位蜂巢迷彩) + ELCAN SpecterOS (緑蜂巣) + ELCAN SpecterOS (Verde Hex) SIG BRAVO4 / ROMEO3 (Black) SIG BRAVO4 / ROMEO3 (Schwarz) SIG BRAVO4 / ROMEO3 (黑色) SIG BRAVO4 / ROMEO3 (黑色) + SIG BRAVO4 / ROMEO3 (黒) + SIG BRAVO4 / ROMEO3 (Nero) SIG BRAVO4 / ROMEO3 (Khaki) SIG BRAVO4 / ROMEO3 (Khaki) SIG BRAVO4 / ROMEO3 (卡其色) SIG BRAVO4 / ROMEO3 (卡其色) + SIG BRAVO4 / ROMEO3 (土埃) + SIG BRAVO4 / ROMEO3 (Khaki) SIG BRAVO4 / ROMEO3 (Sand) SIG BRAVO4 / ROMEO3 (Beige) SIG BRAVO4 / ROMEO3 (沙色) SIG BRAVO4 / ROMEO3 (沙色) + SIG BRAVO4 / ROMEO3 (砂地) + SIG BRAVO4 / ROMEO3 (Sabbia) Nightforce NXS Nightforce NXS Nightforce NXS + Nightforce NXS + Nightforce NXS Nightforce NXS (Green Hex) Nightforce NXS (綠色數位蜂巢迷彩) Nightforce NXS (绿色数位蜂巢迷彩) + Nightforce NXS (緑蜂巣) + Nightforce NXS (Verde Hex) Nightforce NXS (Jungle) Nightforce NXS (Dschungel) Nightforce NXS (叢林色) Nightforce NXS (丛林色) + Nightforce NXS (熱帯) + Nightforce NXS (Giungla) + + + US Optics MR-10 (Black) + US Optics MR-10 (Black) + US Optics MR-10 (Black) + US Optics MR-10 (Black) + + + US Optics MR-10 (Khaki) + US Optics MR-10 (Khaki) + US Optics MR-10 (Khaki) + US Optics MR-10 (Khaki) + + + US Optics MR-10 (Sand) + US Optics MR-10 (Sand) + US Optics MR-10 (Sand) + US Optics MR-10 (Sand) + + + KAHLES Helia (Black) + KAHLES Helia (Black) + KAHLES Helia (Black) + KAHLES Helia (Black) + + + KAHLES Helia (Hex) + KAHLES Helia (Hex) + KAHLES Helia (Hex) + KAHLES Helia (Hex) + + + KAHLES Helia (Old) + KAHLES Helia (Old) + KAHLES Helia (Old) + KAHLES Helia (Old) + + + KAHLES Helia (Tan) + KAHLES Helia (Tan) + KAHLES Helia (Tan) + KAHLES Helia (Tan) Burris XTR II Burris XTR II Burris XTR II + Burris XTR II + Burris XTR II Burris XTR II (Green Hex) Burris XTR II (綠色數位蜂巢迷彩) Burris XTR II (绿色数位蜂巢迷彩) + Burris XTR II (緑蜂巣) + Burris XTR II (Green Hex) EOTech XPS3 (Tan) EOTech XPS3 (Beige) EOTech XPS3 (黃褐色) EOTech XPS3 (黄褐色) + EOTech XPS3 (黄褐) + EOTech XPS3 (Tan) EOTech XPS3 (Black) EOTech XPS3 (Schwarz) EOTech XPS3 (黑色) EOTech XPS3 (黑色) + EOTech XPS3 (黒) + EOTech XPS3 (Black) EOTech XPS3 (Khaki) EOTech XPS3 (Khaki) EOTech XPS3 (卡其色) EOTech XPS3 (卡其色) + EOTech XPS3 (土埃) + EOTech XPS3 (Khaki) EOTech XPS3 SMG (Tan) EOTech XPS3 SMG (Beige) EOTech XPS3 SMG (黃褐色) EOTech XPS3 SMG (黄褐色) + EOTech XPS3 SMG (黄褐) + EOTech XPS3 SMG (Tan) EOTech XPS3 SMG (Black) EOTech XPS3 SMG (Schwarz) EOTech XPS3 SMG (黑色) EOTech XPS3 SMG (黑色) + EOTech XPS3 SMG (黒) + EOTech XPS3 SMG (Nero) EOTech XPS3 SMG (Khaki) EOTech XPS3 SMG (Khaki) EOTech XPS3 SMG (卡其色) EOTech XPS3 SMG (卡其色) + EOTech XPS3 SMG (土埃) + EOTech XPS3 SMG (Khaki) IOR-Valdada Pitbull 2 IOR-Valdada Pitbull 2 IOR-Valdada Pitbull 2 + IOR-Valdada ピットブル 2 + IOR-Valdada Pitbull 2 Burris FastFire 2 Burris FastFire 2 Burris FastFire 2 + Burris ファストファイア 2 + Burris FastFire 2 C-More Railway (Red) C-More Railway (Rot) C-More Railway (紅色) C-More Railway (红色) + C-More レイルウェイ (赤) + C-More Railway (Rosso) C-More Railway (Green) C-More Railway (Grün) C-More Railway (綠色) C-More Railway (绿色) + C-More レイルウェイ (緑) + C-More Railway (Verde) C-More Railway SMG (Red) C-More Railway SMG (Rot) C-More Railway SMG (紅色) C-More Railway SMG (红色) + C-More レイルウェイ SMG (赤) + C-More Railway SMG (Rosso) C-More Railway SMG (Green) C-More Railway SMG (Grün) C-More Railway SMG (綠色) C-More Railway SMG (绿色) + C-More レイルウェイ SMG (緑) + C-More Railway SMG (Verde) diff --git a/addons/rearm/ACE_ZeusActions.hpp b/addons/rearm/ACE_ZeusActions.hpp new file mode 100644 index 0000000000..89fd4a6537 --- /dev/null +++ b/addons/rearm/ACE_ZeusActions.hpp @@ -0,0 +1,16 @@ +class ACE_ZeusActions { + class ZeusUnits { + class GVAR(rearm) { + displayName = CSTRING(Rearm); + icon = QPATHTOF(ui\icon_rearm_interact.paa); + condition = QUOTE(ZEUS_ACTION_CONDITION && {-1 < (curatorSelected select 0) findIf {_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}}}); + statement = QUOTE( \ + { \ + if (_x isKindOf 'AllVehicles' && {!(_x isKindOf 'Man')}) then { \ + [ARR_2(objNull,_x)] call ace_rearm_fnc_rearmEntireVehicleSuccess; \ + }; \ + } forEach (curatorSelected select 0); \ + ); + }; + }; +}; diff --git a/addons/rearm/Cfg3DEN.hpp b/addons/rearm/Cfg3DEN.hpp new file mode 100644 index 0000000000..05eb3c05ff --- /dev/null +++ b/addons/rearm/Cfg3DEN.hpp @@ -0,0 +1,25 @@ +#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) +#define DEFAULT_REARMCARGO GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(defaultSupply),-1) + + +class Cfg3DEN { + class Object { + class AttributeCategories { + class ace_attributes { + class Attributes { + class GVAR(rearmCargo) { + displayName = CSTRING(rearmCargo_edenName); + tooltip = CSTRING(rearmCargo_edenDesc); + property = QGVAR(rearmCargo); + control = "EditShort"; + expression = QUOTE(if (_value != DEFAULT_REARMCARGO) then {[ARR_2(_this,_value)] call DFUNC(makeSource)}); + defaultValue = QUOTE(DEFAULT_REARMCARGO); + validate = "number"; + condition = "(1-objectBrain)*(1-objectAgent)"; + typeName = "NUMBER"; + }; + }; + }; + }; + }; +}; diff --git a/addons/rearm/XEH_PREP.hpp b/addons/rearm/XEH_PREP.hpp index dc34fbd9e9..9ce5329144 100644 --- a/addons/rearm/XEH_PREP.hpp +++ b/addons/rearm/XEH_PREP.hpp @@ -21,7 +21,9 @@ PREP(handleRespawn); PREP(handleUnconscious); PREP(hasEnoughSupply); PREP(initSupplyVehicle); +PREP(isSource); PREP(makeDummy); +PREP(makeSource); PREP(moduleRearmSettings); PREP(pickUpAmmo); PREP(readSupplyCounter); diff --git a/addons/rearm/XEH_postInit.sqf b/addons/rearm/XEH_postInit.sqf index 1fd9462df8..e78f12e9f7 100644 --- a/addons/rearm/XEH_postInit.sqf +++ b/addons/rearm/XEH_postInit.sqf @@ -9,6 +9,11 @@ GVAR(configTypesAdded) = []; }] call CBA_fnc_addEventHandler; ["ace_unconscious", LINKFUNC(handleUnconscious)] call CBA_fnc_addEventHandler; +[QGVAR(initSupplyVehicle), { + TRACE_1("initSupplyVehicle EH",_this); // Warning: this can run before settings are init + [FUNC(initSupplyVehicle), _this] call EFUNC(common,runAfterSettingsInit); +}] call CBA_fnc_addEventHandler; + ["vehicle", { params ["_unit"]; [_unit] call FUNC(dropAmmo); diff --git a/addons/rearm/config.cpp b/addons/rearm/config.cpp index 348ca8751b..0a250d0ff9 100644 --- a/addons/rearm/config.cpp +++ b/addons/rearm/config.cpp @@ -15,8 +15,9 @@ class CfgPatches { }; #include "ACE_Settings.hpp" +#include "ACE_ZeusActions.hpp" #include "CfgEventHandlers.hpp" - +#include "Cfg3DEN.hpp" #include "CfgAmmo.hpp" #include "CfgMagazines.hpp" #include "CfgVehicles.hpp" diff --git a/addons/rearm/functions/fnc_addMagazineToSupply.sqf b/addons/rearm/functions/fnc_addMagazineToSupply.sqf index 0a3be574f8..1f646e3598 100644 --- a/addons/rearm/functions/fnc_addMagazineToSupply.sqf +++ b/addons/rearm/functions/fnc_addMagazineToSupply.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Adds magazines to the supply. [Global Effects] @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" if !(EGVAR(common,settingsInitFinished)) exitWith { // only run this after the settings are initialized EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addMagazineToSupply), _this]; diff --git a/addons/rearm/functions/fnc_addRearmActions.sqf b/addons/rearm/functions/fnc_addRearmActions.sqf index b164449575..fdf1fe7e02 100644 --- a/addons/rearm/functions/fnc_addRearmActions.sqf +++ b/addons/rearm/functions/fnc_addRearmActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Show the resupplyable ammunition of all surrounding vehicles. @@ -13,13 +14,16 @@ * * Public: No */ -#include "script_component.hpp" params ["_truck"]; private _vehicles = nearestObjects [_truck, ["AllVehicles"], 20]; _vehicles = _vehicles select {(_x != _truck) && {!(_x isKindOf "CAManBase")} && {!(_x getVariable [QGVAR(disabled), false])}}; +if (missionNamespace getVariable [QEGVAR(mk6mortar,useAmmoHandling), false]) then { + _vehicles = _vehicles select {!(_x isKindOf "Mortar_01_base_F")}; +}; + private _vehicleActions = []; { private _vehicle = _x; diff --git a/addons/rearm/functions/fnc_addVehicleMagazinesToSupply.sqf b/addons/rearm/functions/fnc_addVehicleMagazinesToSupply.sqf index 2a8f9fed14..1ab5377aad 100644 --- a/addons/rearm/functions/fnc_addVehicleMagazinesToSupply.sqf +++ b/addons/rearm/functions/fnc_addVehicleMagazinesToSupply.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Adds all magazines of a vehicle to the supply. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" if !(EGVAR(common,settingsInitFinished)) exitWith { // only run this after the settings are initialized EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(addVehicleMagazinesToSupply), _this]; diff --git a/addons/rearm/functions/fnc_canReadSupplyCounter.sqf b/addons/rearm/functions/fnc_canReadSupplyCounter.sqf index 60ca21b3f5..824eb07f78 100644 --- a/addons/rearm/functions/fnc_canReadSupplyCounter.sqf +++ b/addons/rearm/functions/fnc_canReadSupplyCounter.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Checks if unit can read supply counter. [Only for GVAR(supply) > 0] @@ -14,15 +15,12 @@ * * Public: No */ -#include "script_component.hpp" params ["_truck", "_unit"]; (alive _unit) -&& {_unit isKindOf "CAManBase"} -&& {local _unit} && {alive _truck} && {(_truck distance _unit) < REARM_ACTION_DISTANCE} && {GVAR(supply) > 0} && {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this - +&& {(_truck getVariable [QGVAR(currentSupply), 0]) >= 0} diff --git a/addons/rearm/functions/fnc_canRearm.sqf b/addons/rearm/functions/fnc_canRearm.sqf index 236f23e233..bda5d8088c 100644 --- a/addons/rearm/functions/fnc_canRearm.sqf +++ b/addons/rearm/functions/fnc_canRearm.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk, Jonpas * Check if a unit can rearm. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_unit"]; diff --git a/addons/rearm/functions/fnc_canStoreAmmo.sqf b/addons/rearm/functions/fnc_canStoreAmmo.sqf index 4c4989b1d7..b0f22b6e07 100644 --- a/addons/rearm/functions/fnc_canStoreAmmo.sqf +++ b/addons/rearm/functions/fnc_canStoreAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Check if a unit can store ammo in an ammo truck. @@ -14,14 +15,12 @@ * * Public: No */ -#include "script_component.hpp" params ["_truck", "_unit"]; (alive _unit) -&& {_unit isKindOf "CAManBase"} -&& {local _unit} && {!isNull (_unit getVariable [QGVAR(dummy), objNull])} && {alive _truck} && {(_truck distance _unit) < REARM_ACTION_DISTANCE} && {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this +&& {(_truck getVariable [QGVAR(currentSupply), 0]) >= 0} diff --git a/addons/rearm/functions/fnc_canTakeAmmo.sqf b/addons/rearm/functions/fnc_canTakeAmmo.sqf index c508df378d..5b0a41f9b2 100644 --- a/addons/rearm/functions/fnc_canTakeAmmo.sqf +++ b/addons/rearm/functions/fnc_canTakeAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Check if a unit can pick up ammo. @@ -14,14 +15,12 @@ * * Public: No */ -#include "script_component.hpp" params ["_truck", "_unit"]; (alive _unit) -&& {_unit isKindOf "CAManBase"} -&& {local _unit} && {alive _truck} && {(_truck distance _unit) < REARM_ACTION_DISTANCE} && {isNull (_unit getVariable [QGVAR(dummy), objNull])} && {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this +&& {(_truck getVariable [QGVAR(currentSupply), 0]) >= 0} diff --git a/addons/rearm/functions/fnc_createDummy.sqf b/addons/rearm/functions/fnc_createDummy.sqf index afca11935f..05f6f3505b 100644 --- a/addons/rearm/functions/fnc_createDummy.sqf +++ b/addons/rearm/functions/fnc_createDummy.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Creates a carryable ammunition dummy object. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_magazineClass"]; diff --git a/addons/rearm/functions/fnc_disable.sqf b/addons/rearm/functions/fnc_disable.sqf index 0bfe9f2b3d..4812c34cfb 100644 --- a/addons/rearm/functions/fnc_disable.sqf +++ b/addons/rearm/functions/fnc_disable.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Disables being able to rearm a vehicle's turrets. [Global Effects] @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [ ["_vehicle", objNull, [objNull]], diff --git a/addons/rearm/functions/fnc_dropAmmo.sqf b/addons/rearm/functions/fnc_dropAmmo.sqf index 30b8b9d67d..d4c68ea34b 100644 --- a/addons/rearm/functions/fnc_dropAmmo.sqf +++ b/addons/rearm/functions/fnc_dropAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Drops a magazine, optionally deletes it and optionally unholsters the wepaon. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params [ "_unit", diff --git a/addons/rearm/functions/fnc_getAllRearmTurrets.sqf b/addons/rearm/functions/fnc_getAllRearmTurrets.sqf index db1f4599ce..95f773e1bb 100644 --- a/addons/rearm/functions/fnc_getAllRearmTurrets.sqf +++ b/addons/rearm/functions/fnc_getAllRearmTurrets.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Tuupertunut * Returns all turrets in a vehicle. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/rearm/functions/fnc_getCaliber.sqf b/addons/rearm/functions/fnc_getCaliber.sqf index 87f7b6cd88..6c37deb938 100644 --- a/addons/rearm/functions/fnc_getCaliber.sqf +++ b/addons/rearm/functions/fnc_getCaliber.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Get the caliber of the ammo in a magazine and return its parameters. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params [ ["_magazineClass", ""] diff --git a/addons/rearm/functions/fnc_getMaxMagazines.sqf b/addons/rearm/functions/fnc_getMaxMagazines.sqf index 6eba4e0ecc..45f90d6579 100644 --- a/addons/rearm/functions/fnc_getMaxMagazines.sqf +++ b/addons/rearm/functions/fnc_getMaxMagazines.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk, Jonpas * Calculates the maximum number of magazines a turret can hold according to config. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_turretPath", "_magazineClass"]; diff --git a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf index b4195bb966..e2a06075d5 100644 --- a/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf +++ b/addons/rearm/functions/fnc_getNeedRearmMagazines.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Tuupertunut * Returns information about every magazine that can be rearmed in the vehicle. Multiple mags of @@ -23,7 +24,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/rearm/functions/fnc_getSupplyCount.sqf b/addons/rearm/functions/fnc_getSupplyCount.sqf index 082ad7ab5c..892764b76f 100644 --- a/addons/rearm/functions/fnc_getSupplyCount.sqf +++ b/addons/rearm/functions/fnc_getSupplyCount.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Get the supply count. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_truck", objNull, [objNull]]]; diff --git a/addons/rearm/functions/fnc_getTurretConfigMagazines.sqf b/addons/rearm/functions/fnc_getTurretConfigMagazines.sqf index 0421e1ed1a..56a2fbdf05 100644 --- a/addons/rearm/functions/fnc_getTurretConfigMagazines.sqf +++ b/addons/rearm/functions/fnc_getTurretConfigMagazines.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk, Jonpas * Returns all magazines a turret of a vehicle object can hold according to config. @@ -14,6 +15,5 @@ * * Public: No */ -#include "script_component.hpp" getArray ((_this call CBA_fnc_getTurret) >> "magazines") diff --git a/addons/rearm/functions/fnc_getTurretMagazineAmmo.sqf b/addons/rearm/functions/fnc_getTurretMagazineAmmo.sqf index 53107dd7b0..2e914f3e7a 100644 --- a/addons/rearm/functions/fnc_getTurretMagazineAmmo.sqf +++ b/addons/rearm/functions/fnc_getTurretMagazineAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Tuupertunut * Returns the current ammo counts in all magazines of given class in turret. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_turretPath", "_magazineClass"]; diff --git a/addons/rearm/functions/fnc_grabAmmo.sqf b/addons/rearm/functions/fnc_grabAmmo.sqf index 13159987f2..8a72ec2cf1 100644 --- a/addons/rearm/functions/fnc_grabAmmo.sqf +++ b/addons/rearm/functions/fnc_grabAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Grabs an dummy ammo. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_dummy", "_unit"]; diff --git a/addons/rearm/functions/fnc_handleKilled.sqf b/addons/rearm/functions/fnc_handleKilled.sqf index b0cdabaed5..6ba6e4f4ee 100644 --- a/addons/rearm/functions/fnc_handleKilled.sqf +++ b/addons/rearm/functions/fnc_handleKilled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk, Jonpas * Handles medical on set dead event. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/rearm/functions/fnc_handleRespawn.sqf b/addons/rearm/functions/fnc_handleRespawn.sqf index 26cb918c0e..a1ddd97301 100644 --- a/addons/rearm/functions/fnc_handleRespawn.sqf +++ b/addons/rearm/functions/fnc_handleRespawn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: unknown * Called when a unit is Respawned @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; if !(local _unit) exitWith {}; diff --git a/addons/rearm/functions/fnc_handleUnconscious.sqf b/addons/rearm/functions/fnc_handleUnconscious.sqf index f9d703f4ec..18a8af4b56 100644 --- a/addons/rearm/functions/fnc_handleUnconscious.sqf +++ b/addons/rearm/functions/fnc_handleUnconscious.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk, Jonpas * Handles medical on unconscious event. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_isUnconscious"]; diff --git a/addons/rearm/functions/fnc_hasEnoughSupply.sqf b/addons/rearm/functions/fnc_hasEnoughSupply.sqf index 93f1f9ea3a..232d6776ad 100644 --- a/addons/rearm/functions/fnc_hasEnoughSupply.sqf +++ b/addons/rearm/functions/fnc_hasEnoughSupply.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Check whether enough supply is left to take the magazine. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_truck", "_magazineClass"]; diff --git a/addons/rearm/functions/fnc_initSupplyVehicle.sqf b/addons/rearm/functions/fnc_initSupplyVehicle.sqf index ad1b914328..72b807d810 100644 --- a/addons/rearm/functions/fnc_initSupplyVehicle.sqf +++ b/addons/rearm/functions/fnc_initSupplyVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Githawk, PabstMirror * Adds rearm supply actions to a vehicle or ammo container. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!hasInterface) exitWith {}; // For now we just add actions, so no need non-clients @@ -68,6 +68,8 @@ if (_oldRearmConfig || {_configSupply > 0}) then { WARNING_1("Actions already present on [%1]. Old Compat PBO?",_typeOf); }; } else { + if (_vehicle getVariable [QGVAR(objectActionsAdded), false]) exitWith {TRACE_1("Actions already added to object",_vehicle);}; + _vehicle setVariable [QGVAR(objectActionsAdded), true]; TRACE_1("Adding Object Actions",_typeOf); [_vehicle, 0, ["ACE_MainActions"], _actionReadSupplyCounter] call EFUNC(interact_menu,addActionToObject); [_vehicle, 0, ["ACE_MainActions"], _actionTakeAmmo] call EFUNC(interact_menu,addActionToObject); diff --git a/addons/rearm/functions/fnc_isSource.sqf b/addons/rearm/functions/fnc_isSource.sqf new file mode 100644 index 0000000000..175ab60f8e --- /dev/null +++ b/addons/rearm/functions/fnc_isSource.sqf @@ -0,0 +1,30 @@ +#include "script_component.hpp" +/* + * Author: shukari + * Returns if vehicle or object is a rearm source. + * + * Arguments: + * 0: target + * 1: check for vanilla rearm vehicle (default: false) + * + * Return Value: + * None + * + * Example: + * [cursorObject] call ace_rearm_fnc_isSource + * + * Public: Yes + */ +params [ + ["_target", objNull, [objNull]], + ["_testVanillaRearm", false, [false]] + ]; + +if ((_target getVariable [QGVAR(currentSupply), 0]) < 0) exitWith {false}; + +private _vehCfg = configFile >> "CfgVehicles" >> typeOf _target; +private _vanillaCargoConfig = getNumber (_vehCfg >> "transportAmmo"); +private _rearmCargoConfig = getNumber (_vehCfg >> QGVAR(defaultSupply)); +private _supplyVehicle = _target getVariable [QGVAR(isSupplyVehicle), false]; + +_rearmCargoConfig > 0 || {_supplyVehicle} || {_testVanillaRearm && _vanillaCargoConfig > 0} diff --git a/addons/rearm/functions/fnc_makeDummy.sqf b/addons/rearm/functions/fnc_makeDummy.sqf index 574944a974..d319d3587e 100644 --- a/addons/rearm/functions/fnc_makeDummy.sqf +++ b/addons/rearm/functions/fnc_makeDummy.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Make a dummy object by disabling collision and turning it. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_obj", "_dirAndUp"]; diff --git a/addons/rearm/functions/fnc_makeSource.sqf b/addons/rearm/functions/fnc_makeSource.sqf new file mode 100644 index 0000000000..c96c3a214a --- /dev/null +++ b/addons/rearm/functions/fnc_makeSource.sqf @@ -0,0 +1,56 @@ +#include "script_component.hpp" +/* + * Author: shukari (template from refuel makeSource) + * Makes an object into a rearm source. + * Run on server only. + * + * Arguments: + * 0: Rearm Source + * 1: Rearm amount (default: 0) + * 2: add rearm amount instead of set (default: false) + * + * Return Value: + * None + * + * Example: + * [cursorObject, 1200] call ace_rearm_fnc_makeSource + * + * Public: Yes + */ +if (!isServer) exitWith {}; + +// Only run this after the settings are initialized +if !(EGVAR(common,settingsInitFinished)) exitWith { + EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(makeSource), _this]; +}; + +params [ + ["_source", objNull, [objNull]], + ["_rearmCargo", 0, [0]], + ["_addToCurrent", false, [false]] + ]; +TRACE_3("makeSource",_source,_rearmCargo,_addToCurrent); + +if (isNull _source) exitWith {}; + +private _currentSupply = if (_addToCurrent) then { + _source getVariable [QGVAR(currentSupply), 0] +} else { + 0 +}; + +_source setVariable [QGVAR(currentSupply), _currentSupply + _rearmCargo, true]; + +private _rearmCargoConfig = getNumber (configFile >> "CfgVehicles" >> typeOf _source >> QGVAR(defaultSupply)); + +// already initialized because this is a config rearm vehicle +if (_rearmCargoConfig > 0 || _source getVariable [QGVAR(isSupplyVehicle), false]) exitWith {}; + +_source setVariable [QGVAR(isSupplyVehicle), true, true]; + +// check if menu already exists +if (!isNil {_source getVariable QGVAR(initSupplyVehicle_jipID)}) exitWith {}; + +private _jipID = [QGVAR(initSupplyVehicle), [_source]] call CBA_fnc_globalEventJIP; +[_jipID, _source] call CBA_fnc_removeGlobalEventJIP; +_source setVariable [QGVAR(initSupplyVehicle_jipID), _jipID]; diff --git a/addons/rearm/functions/fnc_moduleRearmSettings.sqf b/addons/rearm/functions/fnc_moduleRearmSettings.sqf index 61b6016c9d..4b61cfa2ee 100644 --- a/addons/rearm/functions/fnc_moduleRearmSettings.sqf +++ b/addons/rearm/functions/fnc_moduleRearmSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Module for adjusting the rearm settings. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params [ "_logic", diff --git a/addons/rearm/functions/fnc_pickUpAmmo.sqf b/addons/rearm/functions/fnc_pickUpAmmo.sqf index 0f47325a13..a47885e716 100644 --- a/addons/rearm/functions/fnc_pickUpAmmo.sqf +++ b/addons/rearm/functions/fnc_pickUpAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Starts progress bar for picking up a specific kind of magazine from the ground. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_dummy", "_unit"]; diff --git a/addons/rearm/functions/fnc_readSupplyCounter.sqf b/addons/rearm/functions/fnc_readSupplyCounter.sqf index a1b46862b9..31edaa2684 100644 --- a/addons/rearm/functions/fnc_readSupplyCounter.sqf +++ b/addons/rearm/functions/fnc_readSupplyCounter.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Get the remaining ammunition amount. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_truck", "_unit"]; TRACE_2("readSupplyCounter",_truck,_unit); diff --git a/addons/rearm/functions/fnc_rearm.sqf b/addons/rearm/functions/fnc_rearm.sqf index e9d65c43b4..bf703e9b6b 100644 --- a/addons/rearm/functions/fnc_rearm.sqf +++ b/addons/rearm/functions/fnc_rearm.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Starts progress bar for rearming a vehicle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "_unit"]; TRACE_2("rearm",_target,_unit); diff --git a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf index a388b80c32..b3147f976c 100644 --- a/addons/rearm/functions/fnc_rearmEntireVehicle.sqf +++ b/addons/rearm/functions/fnc_rearmEntireVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Starts progress bar for rearming an entire vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_truck", "_player", "_vehicle"]; TRACE_3("rearmEntireVehicle",_truck,_player,_vehicle); @@ -23,7 +23,7 @@ TRACE_3("rearmEntireVehicle",_truck,_player,_vehicle); [ TIME_PROGRESSBAR(10), [_truck, _vehicle, _player], - FUNC(rearmEntireVehicleSuccess), + {(_this select 0) call FUNC(rearmEntireVehicleSuccess)}, "", format [localize LSTRING(BasicRearmAction), getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], { diff --git a/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf b/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf index 2ad70f9626..699b37ed40 100644 --- a/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf +++ b/addons/rearm/functions/fnc_rearmEntireVehicleSuccess.sqf @@ -1,24 +1,22 @@ +#include "script_component.hpp" /* * Author: GitHawk * Rearm an entire vehicle. * * Arguments: - * 0: Rearm information - * 0: Ammo Truck - * 1: Vehicle + * 0: Ammo Truck + * 1: Vehicle * * Return Value: * None * * Example: - * [[ammo_truck, tank]] call ace_rearm_fnc_rearmEntireVehicleSuccess + * [ammo_truck, tank] call ace_rearm_fnc_rearmEntireVehicleSuccess * * Public: No */ -#include "script_component.hpp" -params ["_args"]; -_args params ["_truck", "_vehicle"]; +params ["_truck", "_vehicle"]; TRACE_2("rearmEntireVehicleSuccess",_truck,_vehicle); if (isServer) then { diff --git a/addons/rearm/functions/fnc_rearmEntireVehicleSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmEntireVehicleSuccessLocal.sqf index 031c1d1f4d..6d48cd338f 100644 --- a/addons/rearm/functions/fnc_rearmEntireVehicleSuccessLocal.sqf +++ b/addons/rearm/functions/fnc_rearmEntireVehicleSuccessLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Tuupertunut * Rearm an entire turret locally. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_truck", "_vehicle", "_turretPath"]; TRACE_3("rearmEntireVehicleSuccessLocal",_truck,_vehicle,_turretPath); @@ -24,30 +24,38 @@ TRACE_3("rearmEntireVehicleSuccessLocal",_truck,_vehicle,_turretPath); private _magazines = ([_vehicle] call FUNC(getNeedRearmMagazines)) select {(_x select 1) isEqualTo _turretPath}; { _x params ["_magazineClass", "_magTurretPath", "_isPylonMag", "_pylonIndex", "_maxMagazines", "_currentMagazines", "_maxRoundsPerMag", "_currentRounds"]; - + // Array of planned ammo counts in every magazine after the rearm is complete private _plannedRounds = +_currentRounds; - + // Trying to fill all existing magazines. { if (_x < _maxRoundsPerMag) then { - if ((GVAR(supply) == 0) || {[_truck, _magazineClass, (_maxRoundsPerMag - _x)] call FUNC(removeMagazineFromSupply)}) then { + if ( + GVAR(supply) == 0 + || {isNull _truck} // zeus rearm + || {[_truck, _magazineClass, (_maxRoundsPerMag - _x)] call FUNC(removeMagazineFromSupply)} + ) then { _plannedRounds set [_forEachIndex, _maxRoundsPerMag]; }; }; } forEach _currentRounds; - + // Trying to add new full magazines, if there is space left. if (_currentMagazines < _maxMagazines) then { for "_idx" from 1 to (_maxMagazines - _currentMagazines) do { - if ((GVAR(supply) == 0) || {[_truck, _magazineClass, _maxRoundsPerMag] call FUNC(removeMagazineFromSupply)}) then { + if ( + GVAR(supply) == 0 + || {isNull _truck} // zeus rearm + || {[_truck, _magazineClass, _maxRoundsPerMag] call FUNC(removeMagazineFromSupply)} + ) then { _plannedRounds pushBack _maxRoundsPerMag; }; }; }; - + TRACE_2("rearming",_x,_plannedRounds); - + // Updating new ammo counts to vehicle. if (_isPylonMag) then { _vehicle setAmmoOnPylon [_pylonIndex, (_plannedRounds select 0)]; diff --git a/addons/rearm/functions/fnc_rearmSuccess.sqf b/addons/rearm/functions/fnc_rearmSuccess.sqf index 0fc8219180..d0610dbb5a 100644 --- a/addons/rearm/functions/fnc_rearmSuccess.sqf +++ b/addons/rearm/functions/fnc_rearmSuccess.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Rearms a vehicle, after progress bar finishes, pass args to machine where turret is local. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_unit", "_turretPath", "_numMagazines", "_magazineClass", "_numRounds", "_pylon"]; TRACE_7("rearmSuccess",_vehicle,_unit,_turretPath,_numMagazines,_magazineClass,_numRounds,_pylon); diff --git a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf index 0a2255272b..d141ca4a64 100644 --- a/addons/rearm/functions/fnc_rearmSuccessLocal.sqf +++ b/addons/rearm/functions/fnc_rearmSuccessLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Rearms a vehicle on the turret owner. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_unit", "_turretPath", "_numMagazines", "_magazineClass", "_numRounds", "_pylon"]; TRACE_7("rearmSuccessLocal",_vehicle,_unit,_turretPath,_numMagazines,_magazineClass,_numRounds,_pylon); diff --git a/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf b/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf index 056ed26f48..b6e6c4d0d2 100644 --- a/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf +++ b/addons/rearm/functions/fnc_removeMagazineFromSupply.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Removes a magazine from the supply. @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_truck", objNull, [objNull]], ["_magazineClass", "", [""]], ["_numRounds", -1, [0]]]; TRACE_3("removeMagazineFromSupply",_truck,_magazineClass,_numRounds); diff --git a/addons/rearm/functions/fnc_setSupplyCount.sqf b/addons/rearm/functions/fnc_setSupplyCount.sqf index ef99a78416..41b3016dba 100644 --- a/addons/rearm/functions/fnc_setSupplyCount.sqf +++ b/addons/rearm/functions/fnc_setSupplyCount.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Sets the supply count. [Global Effects] @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" if !(EGVAR(common,settingsInitFinished)) exitWith { // only run this after the settings are initialized EGVAR(common,runAtSettingsInitialized) pushBack [FUNC(setSupplyCount), _this]; diff --git a/addons/rearm/functions/fnc_setTurretMagazineAmmo.sqf b/addons/rearm/functions/fnc_setTurretMagazineAmmo.sqf index 2cc5e156d5..984d382e08 100644 --- a/addons/rearm/functions/fnc_setTurretMagazineAmmo.sqf +++ b/addons/rearm/functions/fnc_setTurretMagazineAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Tuupertunut * Sets the ammo counts of all magazines of given class in turret. @@ -21,7 +22,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_turretPath", "_magazineClass", "_ammoCounts"]; diff --git a/addons/rearm/functions/fnc_storeAmmo.sqf b/addons/rearm/functions/fnc_storeAmmo.sqf index 0da99c081a..7d4427e1a2 100644 --- a/addons/rearm/functions/fnc_storeAmmo.sqf +++ b/addons/rearm/functions/fnc_storeAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Stores ammo in an ammo truck. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_truck", "_unit"]; diff --git a/addons/rearm/functions/fnc_takeAmmo.sqf b/addons/rearm/functions/fnc_takeAmmo.sqf index 69db94729d..1576044eb1 100644 --- a/addons/rearm/functions/fnc_takeAmmo.sqf +++ b/addons/rearm/functions/fnc_takeAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Starts progress bar for picking up a specific kind of magazine from an ammo truck. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_truck", "_unit", "_args"]; _args params ["_magazineClass", "_vehicle"]; diff --git a/addons/rearm/functions/fnc_takeSuccess.sqf b/addons/rearm/functions/fnc_takeSuccess.sqf index 9e6be0fe1c..3986b21484 100644 --- a/addons/rearm/functions/fnc_takeSuccess.sqf +++ b/addons/rearm/functions/fnc_takeSuccess.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Takes a magazine from an ammo truck. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_args"]; _args params ["_unit", "_magazineClass", "_truck"]; diff --git a/addons/rearm/stringtable.xml b/addons/rearm/stringtable.xml index 086ed40eaf..1a5c9f218f 100644 --- a/addons/rearm/stringtable.xml +++ b/addons/rearm/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -8,6 +8,7 @@ 整裝 整装 再武装 + Réarmement Rearm Settings @@ -123,6 +124,7 @@ 彈藥補給 Zapas amunicji 탄약 보급 + Approvisionnement en munitions How much ammunition does an ammo truck carry? @@ -133,6 +135,7 @@ 彈藥卡車會攜帶多少的彈藥? Ile amunicji przewozi ciężarówka? 탄약 차량은 얼마나 많은 양의 탄약을 가질 수 있음? + Quelle quantité de munitions un camion doit-il transporter ? Unlimited ammo supply @@ -143,6 +146,7 @@ 無限彈藥 Nielimitowany zapas amunicji 무한의 탄약 + Approvisionnement en munitions illimité Limited ammo supply based on caliber @@ -153,6 +157,7 @@ 基於口徑限制彈藥數量 Zapas amunicji zależny od kalibru 구경에 따라 제한된 탄약 + Approvisionnement en munitions limité basé sur le calibre. Only specific Magazines @@ -163,6 +168,7 @@ 只有指定的彈藥 Tylko konkretne magazynki 특정 탄약만 + Seulement des chargeurs spécifiques Check remaining ammunition @@ -173,6 +179,7 @@ 檢查剩餘的彈藥 Sprawdź ilość amunicji 남은 탄약 확인 + Vérifier les munitions restantes Checking remaining ammunition... @@ -183,6 +190,7 @@ 正在檢查剩餘的彈藥中... Sprawdzanie ilości amunicji... 남은 탄약 확인중... + Vérification des munitions restantes... There is ammunition worth %1 points left. @@ -193,6 +201,7 @@ 還剩下%1多的彈藥. Pozostało %1 punktów amunicji. 여기에는 최소 %1 포인트의 탄약이 남았습니다. + Il reste des munitions d'une valeur de %1 points. The following ammunition is left:%1 @@ -203,6 +212,7 @@ 以下剩餘的彈藥:%1 Pozostała amunicja: %1 다음의 탄약이 남음 : %1 + Il reste les munitions suivantes %1 There is no ammunition left. @@ -213,6 +223,7 @@ 已經沒有剩餘的彈藥了. Brak amunicji w zapasie. 여기에는 탄약이 남지 않았습니다. + Il n'y a plus de munitions Rearm @@ -283,7 +294,7 @@ Vít munici Prendi munizioni Tomar munición - Prendre la munition + Prendre des munitions 弾薬を取る 탄약 가지기 取得弹药 @@ -298,7 +309,7 @@ Sebrat munici Raccogli munizioni Levantar munición - Ramasser la munition + Ramasser les munitions 弾薬を拾得する 탄약 줍기 捡起弹药 @@ -313,7 +324,7 @@ Uskladnit munici Riponi munizioni Guardar munición - Stocker la munition + Stocker les munitions 弾薬を格納する 탄약 보관하기 储存弹药 @@ -573,5 +584,13 @@ FAB-250M-54 FAB-250M-54 + + Rearm Cargo + Munitionsvorrat + + + The cargo for rearming (-1 disable) + Der Munitionsvorrat, zum Aufmunitionieren von Fahrzeugen (-1 deaktiviert) + diff --git a/addons/recoil/functions/fnc_camshake.sqf b/addons/recoil/functions/fnc_camshake.sqf index 8b600f41ae..fff9fecd6c 100644 --- a/addons/recoil/functions/fnc_camshake.sqf +++ b/addons/recoil/functions/fnc_camshake.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Orginal by Ryan Schultz, edited by KoffeinFlummi, commy2 * Adds camera shake when firing. Called from the unified fired EH only for the local player. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/refuel/functions/fnc_canCheckFuel.sqf b/addons/refuel/functions/fnc_canCheckFuel.sqf index 6e86092652..f7bb8a4aa8 100644 --- a/addons/refuel/functions/fnc_canCheckFuel.sqf +++ b/addons/refuel/functions/fnc_canCheckFuel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas, GitHawk * Checks if unit can check fuel. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_source", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_canDisconnect.sqf b/addons/refuel/functions/fnc_canDisconnect.sqf index 8ded3f3fb9..1288d9f103 100644 --- a/addons/refuel/functions/fnc_canDisconnect.sqf +++ b/addons/refuel/functions/fnc_canDisconnect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Check if a unit can disconnect a fuel nozzle @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_canReturnNozzle.sqf b/addons/refuel/functions/fnc_canReturnNozzle.sqf index 226576be0d..aef2e96fa0 100644 --- a/addons/refuel/functions/fnc_canReturnNozzle.sqf +++ b/addons/refuel/functions/fnc_canReturnNozzle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Check if a unit can return a fuel nozzle @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_source", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_canTakeNozzle.sqf b/addons/refuel/functions/fnc_canTakeNozzle.sqf index 8847675058..82ca8452bc 100644 --- a/addons/refuel/functions/fnc_canTakeNozzle.sqf +++ b/addons/refuel/functions/fnc_canTakeNozzle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Check if a unit can take a fuel nozzle @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_object", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_canTurnOff.sqf b/addons/refuel/functions/fnc_canTurnOff.sqf index e44e1fc669..624cfde552 100644 --- a/addons/refuel/functions/fnc_canTurnOff.sqf +++ b/addons/refuel/functions/fnc_canTurnOff.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Check if a unit can turn off a fuel nozzle @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_canTurnOn.sqf b/addons/refuel/functions/fnc_canTurnOn.sqf index 98173e0fa4..855837d97c 100644 --- a/addons/refuel/functions/fnc_canTurnOn.sqf +++ b/addons/refuel/functions/fnc_canTurnOn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Check if a unit can turn on a fuel nozzle @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_checkFuel.sqf b/addons/refuel/functions/fnc_checkFuel.sqf index fdb4a525d2..275ad7999b 100644 --- a/addons/refuel/functions/fnc_checkFuel.sqf +++ b/addons/refuel/functions/fnc_checkFuel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Get the remaining fuel amount @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_source", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_connectNozzleAction.sqf b/addons/refuel/functions/fnc_connectNozzleAction.sqf index 7a99ce8d6e..7c626c2359 100644 --- a/addons/refuel/functions/fnc_connectNozzleAction.sqf +++ b/addons/refuel/functions/fnc_connectNozzleAction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk et.al. * Calculates a connection for refueling. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_sink", objNull, [objNull]], ["_startingPosASL", [0,0,0], [[]], 3], ["_nozzle", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_disconnect.sqf b/addons/refuel/functions/fnc_disconnect.sqf index 793eefbb93..b227b9fcc9 100644 --- a/addons/refuel/functions/fnc_disconnect.sqf +++ b/addons/refuel/functions/fnc_disconnect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Disconnect a fuel nozzle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_dropNozzle.sqf b/addons/refuel/functions/fnc_dropNozzle.sqf index fac88d6591..e49872a279 100644 --- a/addons/refuel/functions/fnc_dropNozzle.sqf +++ b/addons/refuel/functions/fnc_dropNozzle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Detaches the fuel nozzle, drops it and removes player variables. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_disconnectOnly", false, [false]]]; TRACE_3("dropNozzle",_unit,_nozzle,_disconnectOnly); diff --git a/addons/refuel/functions/fnc_getFuel.sqf b/addons/refuel/functions/fnc_getFuel.sqf index 1ec128cb68..ecba330363 100644 --- a/addons/refuel/functions/fnc_getFuel.sqf +++ b/addons/refuel/functions/fnc_getFuel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk, Jonpas * Get the remaining fuel amount. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_source", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_handleDisconnect.sqf b/addons/refuel/functions/fnc_handleDisconnect.sqf index a7e46e23fe..ebf0d729ea 100644 --- a/addons/refuel/functions/fnc_handleDisconnect.sqf +++ b/addons/refuel/functions/fnc_handleDisconnect.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Cleans up refuel on client disconnect. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]]]; TRACE_1("disconnect",_unit); diff --git a/addons/refuel/functions/fnc_handleRespawn.sqf b/addons/refuel/functions/fnc_handleRespawn.sqf index 145cd16e60..893f893724 100644 --- a/addons/refuel/functions/fnc_handleRespawn.sqf +++ b/addons/refuel/functions/fnc_handleRespawn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * Clean variables on unit respawn. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_1("respawn",_unit); diff --git a/addons/refuel/functions/fnc_initSource.sqf b/addons/refuel/functions/fnc_initSource.sqf index 51daa5f03e..c484c151f4 100644 --- a/addons/refuel/functions/fnc_initSource.sqf +++ b/addons/refuel/functions/fnc_initSource.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * Adds refuel menu to object. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!hasInterface) exitWith {}; diff --git a/addons/refuel/functions/fnc_makeJerryCan.sqf b/addons/refuel/functions/fnc_makeJerryCan.sqf index 96fc30adce..4c4cd22aa1 100644 --- a/addons/refuel/functions/fnc_makeJerryCan.sqf +++ b/addons/refuel/functions/fnc_makeJerryCan.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Makes an object into a jerry can. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_target", objNull, [objNull]], ["_fuelAmount", 20, [0]]]; diff --git a/addons/refuel/functions/fnc_makeSource.sqf b/addons/refuel/functions/fnc_makeSource.sqf index 05707e5301..7b2179adab 100644 --- a/addons/refuel/functions/fnc_makeSource.sqf +++ b/addons/refuel/functions/fnc_makeSource.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * Makes an object into a refuel source. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!isServer) exitWith {}; diff --git a/addons/refuel/functions/fnc_moduleRefuelSettings.sqf b/addons/refuel/functions/fnc_moduleRefuelSettings.sqf index 9e3e953160..fabdad1706 100644 --- a/addons/refuel/functions/fnc_moduleRefuelSettings.sqf +++ b/addons/refuel/functions/fnc_moduleRefuelSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Module for adjusting the refuel settings. @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "", ["_activated", false, [false]]]; if !(_activated) exitWith {}; diff --git a/addons/refuel/functions/fnc_onMouseButtonDown.sqf b/addons/refuel/functions/fnc_onMouseButtonDown.sqf index 5c1951b280..2111be99e8 100644 --- a/addons/refuel/functions/fnc_onMouseButtonDown.sqf +++ b/addons/refuel/functions/fnc_onMouseButtonDown.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * Mouse button down event. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _button = _this select 1; private _unit = ACE_player; diff --git a/addons/refuel/functions/fnc_readFuelCounter.sqf b/addons/refuel/functions/fnc_readFuelCounter.sqf index 70c6a2799b..cc851a549f 100644 --- a/addons/refuel/functions/fnc_readFuelCounter.sqf +++ b/addons/refuel/functions/fnc_readFuelCounter.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Reads the fuel counter. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_source", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_refuel.sqf b/addons/refuel/functions/fnc_refuel.sqf index f23e0aae5b..4717f1206c 100644 --- a/addons/refuel/functions/fnc_refuel.sqf +++ b/addons/refuel/functions/fnc_refuel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Refuels the vehicle. @@ -17,8 +18,6 @@ * Public: No */ -#include "script_component.hpp" - params [["_unit", objNull, [objNull]], ["_sink", objNull, [objNull]], ["_nozzle", objNull, [objNull]], ["_connectToPoint", [0,0,0], [[]], 3]]; private _config = configFile >> "CfgVehicles" >> typeOf _sink; diff --git a/addons/refuel/functions/fnc_returnNozzle.sqf b/addons/refuel/functions/fnc_returnNozzle.sqf index 5da5935fd2..3cc2f773f0 100644 --- a/addons/refuel/functions/fnc_returnNozzle.sqf +++ b/addons/refuel/functions/fnc_returnNozzle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk, Jonpas * Returns the nozzle back to source vehicle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_source", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_setFuel.sqf b/addons/refuel/functions/fnc_setFuel.sqf index 0732160f4c..f95596f4f1 100644 --- a/addons/refuel/functions/fnc_setFuel.sqf +++ b/addons/refuel/functions/fnc_setFuel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Set the remaining fuel amount. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [["_source", objNull, [objNull]], ["_fuel", nil, [0]]]; diff --git a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf index 95c853a217..7f4d936ed3 100644 --- a/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf +++ b/addons/refuel/functions/fnc_startNozzleInHandsPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Dystopian * PFH while nozzle is in hands. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" #define DROP_NOZZLE [_unit, _nozzle] call FUNC(dropNozzle); #define UNHOLSTER_WEAPON \ diff --git a/addons/refuel/functions/fnc_takeNozzle.sqf b/addons/refuel/functions/fnc_takeNozzle.sqf index 5049adfee6..83e38c1be6 100644 --- a/addons/refuel/functions/fnc_takeNozzle.sqf +++ b/addons/refuel/functions/fnc_takeNozzle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Take a fuel nozzle either from a fuel truck/station or from the ground. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [ ["_unit", objNull, [objNull]], diff --git a/addons/refuel/functions/fnc_turnOff.sqf b/addons/refuel/functions/fnc_turnOff.sqf index 067d59c51e..1448a0d145 100644 --- a/addons/refuel/functions/fnc_turnOff.sqf +++ b/addons/refuel/functions/fnc_turnOff.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Turn off a fuel nozzle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; diff --git a/addons/refuel/functions/fnc_turnOn.sqf b/addons/refuel/functions/fnc_turnOn.sqf index e57cd3725a..4cbbc0033d 100644 --- a/addons/refuel/functions/fnc_turnOn.sqf +++ b/addons/refuel/functions/fnc_turnOn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: GitHawk * Turn on a fuel nozzle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_unit", objNull, [objNull]], ["_nozzle", objNull, [objNull]]]; diff --git a/addons/refuel/stringtable.xml b/addons/refuel/stringtable.xml index 32d0528ae3..9ca639d076 100644 --- a/addons/refuel/stringtable.xml +++ b/addons/refuel/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/reload/functions/fnc_canCheckAmmo.sqf b/addons/reload/functions/fnc_canCheckAmmo.sqf index 7f38e3fbfa..a0aa0c5c70 100644 --- a/addons/reload/functions/fnc_canCheckAmmo.sqf +++ b/addons/reload/functions/fnc_canCheckAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: CAA-Picard * Check if the player can check the ammo of the target. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "_target"]; diff --git a/addons/reload/functions/fnc_checkAmmo.sqf b/addons/reload/functions/fnc_checkAmmo.sqf index 90500b867f..156ca30a32 100644 --- a/addons/reload/functions/fnc_checkAmmo.sqf +++ b/addons/reload/functions/fnc_checkAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 and esteldunedain * Count the ammo of the currently loaded magazine or count rifle grenades. Play animation and display message. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" #define COUNT_BARS 12 diff --git a/addons/reload/functions/fnc_displayAmmo.sqf b/addons/reload/functions/fnc_displayAmmo.sqf index 36ee8c1528..9b018131d4 100644 --- a/addons/reload/functions/fnc_displayAmmo.sqf +++ b/addons/reload/functions/fnc_displayAmmo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 and esteldunedain * Display the ammo of the currently loaded magazine of the target or count rifle grenades. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - #define COUNT_BARS 12 params ["_target"]; diff --git a/addons/reload/functions/fnc_getAmmoToLinkBelt.sqf b/addons/reload/functions/fnc_getAmmoToLinkBelt.sqf index decb922d80..3701b32d8b 100644 --- a/addons/reload/functions/fnc_getAmmoToLinkBelt.sqf +++ b/addons/reload/functions/fnc_getAmmoToLinkBelt.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain, phyma * Check if the target has an MG equiped with belt system that the player can link @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player", "_target"]; diff --git a/addons/reload/functions/fnc_startLinkingBelt.sqf b/addons/reload/functions/fnc_startLinkingBelt.sqf index aac6ed4561..54fc1921d7 100644 --- a/addons/reload/functions/fnc_startLinkingBelt.sqf +++ b/addons/reload/functions/fnc_startLinkingBelt.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Start linking the belt @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_player", "_target"]; if (vehicle _target != _target) exitWith {false}; diff --git a/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf b/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf index a3caa76152..42af3e5027 100644 --- a/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf +++ b/addons/reloadlaunchers/functions/fnc_addMissileReloadActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Create one action per reloadable missile @@ -15,7 +16,6 @@ * Public: No * */ -#include "script_component.hpp" params ["_target", "_unit"]; TRACE_2("params",_target,_unit); diff --git a/addons/reloadlaunchers/functions/fnc_canLoad.sqf b/addons/reloadlaunchers/functions/fnc_canLoad.sqf index 2e578b1be7..af08ed8013 100644 --- a/addons/reloadlaunchers/functions/fnc_canLoad.sqf +++ b/addons/reloadlaunchers/functions/fnc_canLoad.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check of the unit can reload the launcher of target unit. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target", "_weapon", "_magazine"]; TRACE_4("params",_unit,_target,_weapon,_magazine); diff --git a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf index 2dc8cf5925..6bded89110 100644 --- a/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf +++ b/addons/reloadlaunchers/functions/fnc_getLoadableMissiles.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Return all magazine types from reloaders inventory that are compatible with given weapon. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_weapon"]; TRACE_2("params",_unit,_weapon); diff --git a/addons/reloadlaunchers/functions/fnc_load.sqf b/addons/reloadlaunchers/functions/fnc_load.sqf index 2017ecf94e..27d4cafbf2 100644 --- a/addons/reloadlaunchers/functions/fnc_load.sqf +++ b/addons/reloadlaunchers/functions/fnc_load.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Reload a launcher @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target", "_weapon", "_magazine"]; TRACE_4("params",_unit,_target,_weapon,_magazine); diff --git a/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf b/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf index cd2295d7d0..58f6b6556a 100644 --- a/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf +++ b/addons/reloadlaunchers/functions/fnc_reloadLauncher.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Reload a launcher @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit","_target","_weapon","_magazine"]; TRACE_4("params",_unit,_target,_weapon,_magazine); diff --git a/addons/repair/CfgEden.hpp b/addons/repair/CfgEden.hpp index be92ec6689..03614b3a2f 100644 --- a/addons/repair/CfgEden.hpp +++ b/addons/repair/CfgEden.hpp @@ -1,3 +1,8 @@ +#define GET_NUMBER(config,default) (if (isNumber (config)) then {getNumber (config)} else {default}) + +#define DEFAULT_ISENGINEER ([ARR_2(0,1)] select (_this getUnitTrait 'engineer')) +#define DEFAULT_ISREPAIRVEHICLE GET_NUMBER(configFile >> 'CfgVehicles' >> typeOf _this >> QQGVAR(canRepair),0) + class ctrlToolbox; class Cfg3DEN { @@ -35,10 +40,10 @@ class Cfg3DEN { property = QUOTE(ace_isEngineer); displayName = CSTRING(AssignEngineerRole_role_DisplayName); tooltip = CSTRING(AssignEngineerRole_role_Description); - expression = "if (_value != -1) then {_this setVariable ['%s',_value, true];}"; + expression = QUOTE(if !(_value == DEFAULT_ISENGINEER || {_value == -1}) then {_this setVariable [ARR_3('%s',_value,true)]}); typeName = "NUMBER"; condition = "objectBrain"; - defaultValue = "-1"; + defaultValue = QUOTE(DEFAULT_ISENGINEER); control = QGVAR(isEngineerControl); }; class ace_isRepairVehicle { @@ -47,21 +52,16 @@ class Cfg3DEN { control = "CheckboxNumber"; displayName = CSTRING(AssignRepairVehicle_role_DisplayName); tooltip = CSTRING(AssignRepairVehicle_role_Description); - expression = "_this setVariable ['%s',_value, true];"; + expression = QUOTE(if (_value != DEFAULT_ISREPAIRVEHICLE) then {_this setVariable [ARR_3('%s',_value,true)]}); typeName = "NUMBER"; condition = "objectVehicle"; - defaultValue = 0; + defaultValue = QUOTE(DEFAULT_ISREPAIRVEHICLE); }; - class ace_isRepairFacility { + class ace_isRepairFacility: ace_isRepairVehicle { property = QUOTE(ace_isRepairFacility); - value = 0; - control = "CheckboxNumber"; displayName = CSTRING(AssignRepairFacility_role_DisplayName); tooltip = CSTRING(AssignRepairFacility_role_Description); - expression = "_this setVariable ['%s',_value, true];"; - typeName = "NUMBER"; condition = "(1 - objectBrain) * (1 - objectVehicle)"; - defaultValue = 0; }; class GVAR(editorLoadedTracks) { displayName = CSTRING(editorLoadedTracks); @@ -74,16 +74,11 @@ class Cfg3DEN { condition = "objectHasInventoryCargo"; typeName = "NUMBER"; }; - class GVAR(editorLoadedWheels) { + class GVAR(editorLoadedWheels): GVAR(editorLoadedTracks) { displayName = CSTRING(editorLoadedWheels); tooltip = CSTRING(editorLoadedWheels_tooltip); property = QGVAR(editorLoadedWheels); - control = "Edit"; - expression = "_this setVariable ['%s',_value];"; defaultValue = "[0,1] select (_this isKindOf 'Car')"; // must match pre init script - validate = "number"; - condition = "objectHasInventoryCargo"; - typeName = "NUMBER"; }; }; }; diff --git a/addons/repair/functions/fnc_addRepairActions.sqf b/addons/repair/functions/fnc_addRepairActions.sqf index ed8528a4bc..5761206b3e 100644 --- a/addons/repair/functions/fnc_addRepairActions.sqf +++ b/addons/repair/functions/fnc_addRepairActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2, SilentSpike * Checks if the vehicles class already has the actions initialized, otherwise add all available repair options. Calleed from init EH. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (!hasInterface) exitWith {}; diff --git a/addons/repair/functions/fnc_addSpareParts.sqf b/addons/repair/functions/fnc_addSpareParts.sqf index 63fe11fb6d..c83397ed4b 100644 --- a/addons/repair/functions/fnc_addSpareParts.sqf +++ b/addons/repair/functions/fnc_addSpareParts.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Adds spare parts to the vehicle. Before SettingsInitialized only collect for later execution. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", ["_amount", 1], ["_part", ""], ["_force", false]]; TRACE_2("params",_vehicle,_amount); diff --git a/addons/repair/functions/fnc_canMiscRepair.sqf b/addons/repair/functions/fnc_canMiscRepair.sqf index c26cfdb42a..b9fe842a19 100644 --- a/addons/repair/functions/fnc_canMiscRepair.sqf +++ b/addons/repair/functions/fnc_canMiscRepair.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Check if misc repair action can be done, called from callbackSuccess. @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_caller", "_target", "_hitPointIndex"]; (getAllHitPointsDamage _target) params ["_allHitPoints", "", "_allHitPointDamages"]; diff --git a/addons/repair/functions/fnc_canRemove.sqf b/addons/repair/functions/fnc_canRemove.sqf index 9f06e8d148..77fc7b0eb4 100644 --- a/addons/repair/functions/fnc_canRemove.sqf +++ b/addons/repair/functions/fnc_canRemove.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if the unit can remove given wheel/track of the vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target", "_hitPoint"]; TRACE_3("params",_unit,_target,_hitPoint); diff --git a/addons/repair/functions/fnc_canRepair.sqf b/addons/repair/functions/fnc_canRepair.sqf index a54e2d3ce4..93d5eef7a0 100644 --- a/addons/repair/functions/fnc_canRepair.sqf +++ b/addons/repair/functions/fnc_canRepair.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if the repair action can be performed. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_caller", "_target", "_hitPoint", "_className"]; TRACE_4("params",_caller,_target,_hitPoint,_className); diff --git a/addons/repair/functions/fnc_canRepairTrack.sqf b/addons/repair/functions/fnc_canRepairTrack.sqf index e1ff4a5628..8559ff1a9c 100644 --- a/addons/repair/functions/fnc_canRepairTrack.sqf +++ b/addons/repair/functions/fnc_canRepairTrack.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if the unit can replace given track of the vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target", "_hitPoint"]; TRACE_3("params",_unit,_target,_hitPoint); diff --git a/addons/repair/functions/fnc_canReplaceTrack.sqf b/addons/repair/functions/fnc_canReplaceTrack.sqf index a272a0d176..d975c60efb 100644 --- a/addons/repair/functions/fnc_canReplaceTrack.sqf +++ b/addons/repair/functions/fnc_canReplaceTrack.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if the unit can replace given track of the vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target", "_hitPoint"]; TRACE_3("params",_unit,_target,_hitPoint); diff --git a/addons/repair/functions/fnc_canReplaceWheel.sqf b/addons/repair/functions/fnc_canReplaceWheel.sqf index 0b7f7ad4e7..54e8e8cdf6 100644 --- a/addons/repair/functions/fnc_canReplaceWheel.sqf +++ b/addons/repair/functions/fnc_canReplaceWheel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Check if the unit can replace given wheel of the vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_target", "_hitPoint"]; TRACE_3("params",_unit,_target,_hitPoint); diff --git a/addons/repair/functions/fnc_doFullRepair.sqf b/addons/repair/functions/fnc_doFullRepair.sqf index 492ceb01a0..fb248e6a2f 100644 --- a/addons/repair/functions/fnc_doFullRepair.sqf +++ b/addons/repair/functions/fnc_doFullRepair.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Fully repairs vehicle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["", "_vehicle"]; TRACE_1("params",_vehicle); diff --git a/addons/repair/functions/fnc_doRemoveTrack.sqf b/addons/repair/functions/fnc_doRemoveTrack.sqf index ca6ac58ffd..d15993752f 100644 --- a/addons/repair/functions/fnc_doRemoveTrack.sqf +++ b/addons/repair/functions/fnc_doRemoveTrack.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Called by repair action / progress bar. Raise events to set the new hitpoint damage. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_vehicle", "_hitPoint"]; TRACE_3("params",_unit,_vehicle,_hitPoint); diff --git a/addons/repair/functions/fnc_doRemoveWheel.sqf b/addons/repair/functions/fnc_doRemoveWheel.sqf index dafe603a18..127859a5b9 100644 --- a/addons/repair/functions/fnc_doRemoveWheel.sqf +++ b/addons/repair/functions/fnc_doRemoveWheel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Called by repair action / progress bar. Raise events to set the new hitpoint damage. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_vehicle", "_hitPoint"]; TRACE_3("params",_unit,_vehicle,_hitPoint); diff --git a/addons/repair/functions/fnc_doRepair.sqf b/addons/repair/functions/fnc_doRepair.sqf index 64056fb999..c17858d8b3 100644 --- a/addons/repair/functions/fnc_doRepair.sqf +++ b/addons/repair/functions/fnc_doRepair.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Called by repair action / progress bar. Raise events to set the new hitpoint damage. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_vehicle", "_hitPointIndex"]; TRACE_3("params",_unit,_vehicle,_hitPointIndex); diff --git a/addons/repair/functions/fnc_doRepairTrack.sqf b/addons/repair/functions/fnc_doRepairTrack.sqf index c5c94fd6e8..71d06b60f2 100644 --- a/addons/repair/functions/fnc_doRepairTrack.sqf +++ b/addons/repair/functions/fnc_doRepairTrack.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Called by repair action / progress bar. Raise events to set the new hitpoint damage. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_vehicle", "_hitPoint", "", "", "", "_claimedObjects"]; TRACE_4("params",_unit,_vehicle,_hitPoint,_claimedObjects); diff --git a/addons/repair/functions/fnc_doReplaceTrack.sqf b/addons/repair/functions/fnc_doReplaceTrack.sqf index c85899e169..60dd486f44 100644 --- a/addons/repair/functions/fnc_doReplaceTrack.sqf +++ b/addons/repair/functions/fnc_doReplaceTrack.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Replaces a track. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_vehicle", "_hitPoint", "", "", "", "_claimedObjects"]; TRACE_4("params",_unit,_vehicle,_hitPoint,_claimedObjects); diff --git a/addons/repair/functions/fnc_doReplaceWheel.sqf b/addons/repair/functions/fnc_doReplaceWheel.sqf index 4bc3ca93dd..e42c7cabf2 100644 --- a/addons/repair/functions/fnc_doReplaceWheel.sqf +++ b/addons/repair/functions/fnc_doReplaceWheel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Repairs a vehicle's wheel with a ACE_wheel spare part object. @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_vehicle", "_hitPoint", "", "", "", "_claimedObjects"]; TRACE_4("params",_unit,_vehicle,_hitPoint,_claimedObjects); diff --git a/addons/repair/functions/fnc_getClaimObjects.sqf b/addons/repair/functions/fnc_getClaimObjects.sqf index 18b2e9f7ef..a654952417 100644 --- a/addons/repair/functions/fnc_getClaimObjects.sqf +++ b/addons/repair/functions/fnc_getClaimObjects.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Returns array of required nearby repair objects (wheels/tracks). @@ -15,7 +16,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_maxRange", "_objectsToClaim"]; TRACE_3("params",_unit,_maxRange,_objectsToClaim); diff --git a/addons/repair/functions/fnc_getHitPointString.sqf b/addons/repair/functions/fnc_getHitPointString.sqf index da039c34ff..8394b4f5ac 100644 --- a/addons/repair/functions/fnc_getHitPointString.sqf +++ b/addons/repair/functions/fnc_getHitPointString.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Finds the localized string of the given hitpoint name or uses default text if none found. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_hitPoint", "_textLocalized", "_textDefault", ["_trackArray", []]]; diff --git a/addons/repair/functions/fnc_getPostRepairDamage.sqf b/addons/repair/functions/fnc_getPostRepairDamage.sqf index 22eaf7a5f9..d8ed7d3804 100644 --- a/addons/repair/functions/fnc_getPostRepairDamage.sqf +++ b/addons/repair/functions/fnc_getPostRepairDamage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns the damage threshold based on settings and unit type. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; TRACE_1("params",_unit); diff --git a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf index 5b40710c19..fe072859b2 100644 --- a/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf +++ b/addons/repair/functions/fnc_getWheelHitPointsWithSelections.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Returns the wheel hitpoints and their selections. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; TRACE_1("params",_vehicle); diff --git a/addons/repair/functions/fnc_hasItems.sqf b/addons/repair/functions/fnc_hasItems.sqf index 0b06be8d49..9b54647c8d 100644 --- a/addons/repair/functions/fnc_hasItems.sqf +++ b/addons/repair/functions/fnc_hasItems.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if the engineer has all items. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_items"]; TRACE_2("params",_unit,_items); diff --git a/addons/repair/functions/fnc_isEngineer.sqf b/addons/repair/functions/fnc_isEngineer.sqf index f7482760af..6a80b1012e 100644 --- a/addons/repair/functions/fnc_isEngineer.sqf +++ b/addons/repair/functions/fnc_isEngineer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, KoffeinFlummi, commy2 * Check if a unit is any engineer class. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", ["_engineerN", 1]]; diff --git a/addons/repair/functions/fnc_isInRepairFacility.sqf b/addons/repair/functions/fnc_isInRepairFacility.sqf index ffc7c26c26..10ef95ed66 100644 --- a/addons/repair/functions/fnc_isInRepairFacility.sqf +++ b/addons/repair/functions/fnc_isInRepairFacility.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Checks if a unit is in a repair facility. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_object"]; TRACE_1("params",_object); @@ -21,19 +21,22 @@ TRACE_1("params",_object); private _position = getPosASL _object; private _isInBuilding = false; -private _objects = (lineIntersectsWith [_object modelToWorldVisual [0, 0, (_position select 2)], _object modelToWorldVisual [0, 0, (_position select 2) +10], _object]); -{ - if (_x getVariable ["ACE_isRepairFacility", getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(canRepair))] > 0) exitWith { +private _checkObject = { + if ( + _x getVariable ["ACE_isRepairFacility", getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(canRepair))] > 0 + && {!(_x isKindOf "AllVehicles")} // check if it's not repair vehicle + && {alive _x} + ) exitWith { _isInBuilding = true; }; -} forEach _objects; - -if (!_isInBuilding) then { - _objects = position _object nearObjects 7.5; - { - if (_x getVariable ["ACE_isRepairFacility", getNumber (configFile >> "CfgVehicles" >> typeOf _x >> QGVAR(canRepair))] > 0) exitWith { - _isInBuilding = true; - }; - } forEach _objects; }; -_isInBuilding; + +private _objects = (lineIntersectsWith [_object modelToWorldVisual [0, 0, (_position select 2)], _object modelToWorldVisual [0, 0, (_position select 2) +10], _object]); +_checkObject forEach _objects; + +if (_isInBuilding) exitWith {true}; + +_objects = _object nearObjects 7.5; +_checkObject forEach _objects; + +_isInBuilding diff --git a/addons/repair/functions/fnc_isNearRepairVehicle.sqf b/addons/repair/functions/fnc_isNearRepairVehicle.sqf index 763d146970..1243c0f95b 100644 --- a/addons/repair/functions/fnc_isNearRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isNearRepairVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi * Checks if a unit is near an engineering vehicle. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; TRACE_1("params",_unit); diff --git a/addons/repair/functions/fnc_isRepairVehicle.sqf b/addons/repair/functions/fnc_isRepairVehicle.sqf index ff3ac7ed1c..6e7ddcab27 100644 --- a/addons/repair/functions/fnc_isRepairVehicle.sqf +++ b/addons/repair/functions/fnc_isRepairVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Check if vehicle is a engineering vehicle. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_vehicle"]; TRACE_1("params",_vehicle); diff --git a/addons/repair/functions/fnc_modifyInteraction.sqf b/addons/repair/functions/fnc_modifyInteraction.sqf index 5795f0c584..235afd9223 100644 --- a/addons/repair/functions/fnc_modifyInteraction.sqf +++ b/addons/repair/functions/fnc_modifyInteraction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror, mharis001 * Modifies the base interaction point for repair items to show its current damage. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "", "", "_actionData"]; diff --git a/addons/repair/functions/fnc_modifySelectionInteraction.sqf b/addons/repair/functions/fnc_modifySelectionInteraction.sqf index b4e3ed031b..66d7ae5e4b 100644 --- a/addons/repair/functions/fnc_modifySelectionInteraction.sqf +++ b/addons/repair/functions/fnc_modifySelectionInteraction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654, mharis001 * Modifies interaction icon color of vehicle selection to show its current damage. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_target", "", "_args", "_actionData"]; diff --git a/addons/repair/functions/fnc_moduleAddSpareParts.sqf b/addons/repair/functions/fnc_moduleAddSpareParts.sqf index 5d24de86f0..a70f821ffc 100644 --- a/addons/repair/functions/fnc_moduleAddSpareParts.sqf +++ b/addons/repair/functions/fnc_moduleAddSpareParts.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Adds spare parts to a vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/repair/functions/fnc_moduleAssignEngineer.sqf b/addons/repair/functions/fnc_moduleAssignEngineer.sqf index fcdb08d4f1..1949da087a 100644 --- a/addons/repair/functions/fnc_moduleAssignEngineer.sqf +++ b/addons/repair/functions/fnc_moduleAssignEngineer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Assign an engineer role to a unit. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/repair/functions/fnc_moduleAssignRepairFacility.sqf b/addons/repair/functions/fnc_moduleAssignRepairFacility.sqf index 9f0b514f1d..c071058ad6 100644 --- a/addons/repair/functions/fnc_moduleAssignRepairFacility.sqf +++ b/addons/repair/functions/fnc_moduleAssignRepairFacility.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Assign a repair facility. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/repair/functions/fnc_moduleAssignRepairVehicle.sqf b/addons/repair/functions/fnc_moduleAssignRepairVehicle.sqf index 63b5e3756f..4f5c601cce 100644 --- a/addons/repair/functions/fnc_moduleAssignRepairVehicle.sqf +++ b/addons/repair/functions/fnc_moduleAssignRepairVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Assign a repair vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/repair/functions/fnc_moduleRepairSettings.sqf b/addons/repair/functions/fnc_moduleRepairSettings.sqf index 4bbd505006..831b9a2619 100644 --- a/addons/repair/functions/fnc_moduleRepairSettings.sqf +++ b/addons/repair/functions/fnc_moduleRepairSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Adjusts repair damage settings. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/repair/functions/fnc_normalizeHitPoints.sqf b/addons/repair/functions/fnc_normalizeHitPoints.sqf index cb06eeaeae..fb07147a6a 100644 --- a/addons/repair/functions/fnc_normalizeHitPoints.sqf +++ b/addons/repair/functions/fnc_normalizeHitPoints.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Used to normalize dependant hitpoints. May overwrite some global variables that are named like hitpoints or "Total" though... @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; TRACE_2("params",_vehicle, typeOf _vehicle); diff --git a/addons/repair/functions/fnc_repair.sqf b/addons/repair/functions/fnc_repair.sqf index aeaafb4f97..9363f53671 100644 --- a/addons/repair/functions/fnc_repair.sqf +++ b/addons/repair/functions/fnc_repair.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, KoffeinFlummi * Starts the repair process. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_caller", "_target", "_hitPoint", "_className"]; TRACE_4("params",_caller,_target,_hitPoint,_className); diff --git a/addons/repair/functions/fnc_repair_failure.sqf b/addons/repair/functions/fnc_repair_failure.sqf index c433b29f92..83cce85e0d 100644 --- a/addons/repair/functions/fnc_repair_failure.sqf +++ b/addons/repair/functions/fnc_repair_failure.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Glowbal * Callback when repair fails. @@ -20,7 +21,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_args"]; _args params ["_caller", "_target","_selectionName","_className","","_usersOfItems", "_claimedObjects"]; diff --git a/addons/repair/functions/fnc_repair_success.sqf b/addons/repair/functions/fnc_repair_success.sqf index c2fa40bfbb..a86be84244 100644 --- a/addons/repair/functions/fnc_repair_success.sqf +++ b/addons/repair/functions/fnc_repair_success.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Glowbal * Callback when repair completes. @@ -20,7 +21,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_args"]; _args params ["_caller", "_target","_selectionName","_className","","","_claimedObjects"]; diff --git a/addons/repair/functions/fnc_setDamage.sqf b/addons/repair/functions/fnc_setDamage.sqf index 78c7cae709..fbae505fae 100644 --- a/addons/repair/functions/fnc_setDamage.sqf +++ b/addons/repair/functions/fnc_setDamage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Sets the structural damage of a vehicle without altering the hitPoints, requires local vehicle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_damage"]; TRACE_2("params",_vehicle,_damage); diff --git a/addons/repair/functions/fnc_setHitPointDamage.sqf b/addons/repair/functions/fnc_setHitPointDamage.sqf index 771a1c9dce..f0313315e9 100644 --- a/addons/repair/functions/fnc_setHitPointDamage.sqf +++ b/addons/repair/functions/fnc_setHitPointDamage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Set the hitpoint damage and change the structural damage acordingly, requires local vehicle. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_hitPointIndex", "_hitPointDamage", ["_useEffects", true]]; TRACE_4("params",_vehicle,typeOf _vehicle,_hitPointIndex,_hitPointDamage); diff --git a/addons/repair/functions/fnc_spawnObject.sqf b/addons/repair/functions/fnc_spawnObject.sqf index e927a19651..9dce6a7e01 100644 --- a/addons/repair/functions/fnc_spawnObject.sqf +++ b/addons/repair/functions/fnc_spawnObject.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Spawns an object of specified string, at specified position with specified damage taken. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_item", "_position", ["_damage", 0]]; TRACE_3("params",_item,_position,_damage); diff --git a/addons/repair/functions/fnc_useItem.sqf b/addons/repair/functions/fnc_useItem.sqf index de3950fa22..760be7a39b 100644 --- a/addons/repair/functions/fnc_useItem.sqf +++ b/addons/repair/functions/fnc_useItem.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Use Equipment if any is available. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_item"]; TRACE_2("params",_unit,_item); diff --git a/addons/repair/functions/fnc_useItems.sqf b/addons/repair/functions/fnc_useItems.sqf index 86b4400272..b6da87aecc 100644 --- a/addons/repair/functions/fnc_useItems.sqf +++ b/addons/repair/functions/fnc_useItems.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Use Equipment items if any is available. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_items"]; TRACE_2("params",_unit,_items); diff --git a/addons/repair/initSettings.sqf b/addons/repair/initSettings.sqf index c392711218..e226085a29 100644 --- a/addons/repair/initSettings.sqf +++ b/addons/repair/initSettings.sqf @@ -78,7 +78,8 @@ [localize ELSTRING(OptionsMenu,CategoryLogistics), localize "str_state_repair"], true, // default value true, // isGlobal - {[QGVAR(addSpareParts), _this] call EFUNC(common,cbaSettings_settingChanged)} + {[QGVAR(addSpareParts), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_settings_fnc_init; [ diff --git a/addons/repair/stringtable.xml b/addons/repair/stringtable.xml index aa94feddbd..4d4f14cb49 100644 --- a/addons/repair/stringtable.xml +++ b/addons/repair/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/respawn/functions/fnc_canMoveRallypoint.sqf b/addons/respawn/functions/fnc_canMoveRallypoint.sqf index 174d76c69d..f37ad34265 100644 --- a/addons/respawn/functions/fnc_canMoveRallypoint.sqf +++ b/addons/respawn/functions/fnc_canMoveRallypoint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Checks if a unit can move a rally point. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_side"]; diff --git a/addons/respawn/functions/fnc_handleInitPostServer.sqf b/addons/respawn/functions/fnc_handleInitPostServer.sqf index 9f43ed0445..4de502a9ea 100644 --- a/addons/respawn/functions/fnc_handleInitPostServer.sqf +++ b/addons/respawn/functions/fnc_handleInitPostServer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle XEH Init Post on Server. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/respawn/functions/fnc_handleKilled.sqf b/addons/respawn/functions/fnc_handleKilled.sqf index 6ca816e8a4..0a6fcd8ce8 100644 --- a/addons/respawn/functions/fnc_handleKilled.sqf +++ b/addons/respawn/functions/fnc_handleKilled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Handles the XEH killed event. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/respawn/functions/fnc_handlePlayerChanged.sqf b/addons/respawn/functions/fnc_handlePlayerChanged.sqf index 97592db06f..9fc71af9b7 100644 --- a/addons/respawn/functions/fnc_handlePlayerChanged.sqf +++ b/addons/respawn/functions/fnc_handlePlayerChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle player changed event. Updates visibility of Rallypoint markers. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_newUnit"]; diff --git a/addons/respawn/functions/fnc_handleRespawn.sqf b/addons/respawn/functions/fnc_handleRespawn.sqf index 3b1ae1c86f..a8c65056b3 100644 --- a/addons/respawn/functions/fnc_handleRespawn.sqf +++ b/addons/respawn/functions/fnc_handleRespawn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Handles the XEH Respawn event. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/respawn/functions/fnc_initRallypoint.sqf b/addons/respawn/functions/fnc_initRallypoint.sqf index 4715783ba3..0286813cef 100644 --- a/addons/respawn/functions/fnc_initRallypoint.sqf +++ b/addons/respawn/functions/fnc_initRallypoint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Init code for rallypoints. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_rallypoint", "_respawnMarker", "_side"]; diff --git a/addons/respawn/functions/fnc_module.sqf b/addons/respawn/functions/fnc_module.sqf index 97e6e91ccc..72b4003bbc 100644 --- a/addons/respawn/functions/fnc_module.sqf +++ b/addons/respawn/functions/fnc_module.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, bux578, esteldunedain, commy2 * Initializes the respawn module. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/respawn/functions/fnc_moduleFriendlyFire.sqf b/addons/respawn/functions/fnc_moduleFriendlyFire.sqf index 9709c85d66..2801e26b26 100644 --- a/addons/respawn/functions/fnc_moduleFriendlyFire.sqf +++ b/addons/respawn/functions/fnc_moduleFriendlyFire.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Initializes the friendly fire module. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/respawn/functions/fnc_moduleRallypoint.sqf b/addons/respawn/functions/fnc_moduleRallypoint.sqf index 72744ba712..a06220fec8 100644 --- a/addons/respawn/functions/fnc_moduleRallypoint.sqf +++ b/addons/respawn/functions/fnc_moduleRallypoint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Initializes the Rallypoint module. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/respawn/functions/fnc_moveRallypoint.sqf b/addons/respawn/functions/fnc_moveRallypoint.sqf index 3ee1f7fbdb..d0e191829e 100644 --- a/addons/respawn/functions/fnc_moveRallypoint.sqf +++ b/addons/respawn/functions/fnc_moveRallypoint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Moves a rallypoint to the players location. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_side"]; diff --git a/addons/respawn/functions/fnc_restoreGear.sqf b/addons/respawn/functions/fnc_restoreGear.sqf index 64b7437d15..990fa77ea8 100644 --- a/addons/respawn/functions/fnc_restoreGear.sqf +++ b/addons/respawn/functions/fnc_restoreGear.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578, commy2 * Restores previously saved gear. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_allGear", "_activeWeaponAndMuzzle"]; TRACE_3("restoreGear",_unit, count _allGear, _activeWeaponAndMuzzle); diff --git a/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf b/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf index 388302150d..a20c9926f5 100644 --- a/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf +++ b/addons/respawn/functions/fnc_showFriendlyFireMessage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Shows a message in system chat of who killed whom. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_killer"]; diff --git a/addons/respawn/functions/fnc_teleportToRallypoint.sqf b/addons/respawn/functions/fnc_teleportToRallypoint.sqf index 9f2da46640..6c8a697279 100644 --- a/addons/respawn/functions/fnc_teleportToRallypoint.sqf +++ b/addons/respawn/functions/fnc_teleportToRallypoint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Teleports a unit to a rallypoint @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_side", "_rallypoint"]; diff --git a/addons/respawn/functions/fnc_updateRallypoint.sqf b/addons/respawn/functions/fnc_updateRallypoint.sqf index 4a71f4284e..363e12972b 100644 --- a/addons/respawn/functions/fnc_updateRallypoint.sqf +++ b/addons/respawn/functions/fnc_updateRallypoint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Updates marker position and texts. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_rallypoint", "_side", "_position"]; diff --git a/addons/respawn/stringtable.xml b/addons/respawn/stringtable.xml index 265334d20f..98c4bec01a 100644 --- a/addons/respawn/stringtable.xml +++ b/addons/respawn/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/safemode/XEH_postInit.sqf b/addons/safemode/XEH_postInit.sqf index 81c1521c92..db922f9b35 100644 --- a/addons/safemode/XEH_postInit.sqf +++ b/addons/safemode/XEH_postInit.sqf @@ -1,15 +1,10 @@ // by esteldunedain #include "script_component.hpp" +#include "\a3\ui_f\hpp\defineDIKCodes.inc" if (!hasInterface) exitWith {}; -// IGNORE_PRIVATE_WARNING(_player) -//["Soldier", {_player = ACE_player; if (currentWeapon _player in (_player getVariable [QGVAR(safedWeapons), []])) then {[false] call FUNC(setSafeModeVisual)}] call EFUNC(common,addInfoDisplayEventHandler); -//@todo addEventHandler infoDisplayChanged with select 1 == "Soldier" - -// add keybinds -["ACE3 Weapons", QGVAR(safeMode), localize LSTRING(SafeMode), -{ +["ACE3 Weapons", QGVAR(safeMode), localize LSTRING(SafeMode), { // Conditions: canInteract if !([ACE_player, objNull, ["isNotEscorting", "isNotInside", "isNotSwimming"]] call EFUNC(common,canInteractWith)) exitWith {false}; // Conditions: specific @@ -18,6 +13,9 @@ if (!hasInterface) exitWith {}; // Statement [ACE_player, currentWeapon ACE_player, currentMuzzle ACE_player] call FUNC(lockSafety); true -}, -{false}, -[41, [false, true, false]], false] call CBA_fnc_addKeybind; +}, {false}, [DIK_GRAVE, [false, true, false]], false] call CBA_fnc_addKeybind; + +["unit", { + private _weaponSafe = currentWeapon ACE_player in (ACE_player getVariable [QGVAR(safedWeapons), []]); + [!_weaponSafe] call FUNC(setSafeModeVisual); +}] call CBA_fnc_addPlayerEventHandler; diff --git a/addons/safemode/functions/fnc_lockSafety.sqf b/addons/safemode/functions/fnc_lockSafety.sqf index 927b5c5d96..e3c1b71f30 100644 --- a/addons/safemode/functions/fnc_lockSafety.sqf +++ b/addons/safemode/functions/fnc_lockSafety.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Put weapon on safety, or take it off safety if safety is already put on. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" // don't immediately switch back if (inputAction "nextWeapon" > 0) exitWith {}; diff --git a/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf b/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf index 50998d93fb..d013d29696 100644 --- a/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf +++ b/addons/safemode/functions/fnc_playChangeFiremodeSound.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Play weapon firemode change sound. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_weapon"]; diff --git a/addons/safemode/functions/fnc_setSafeModeVisual.sqf b/addons/safemode/functions/fnc_setSafeModeVisual.sqf index cc11be3806..587ac882d3 100644 --- a/addons/safemode/functions/fnc_setSafeModeVisual.sqf +++ b/addons/safemode/functions/fnc_setSafeModeVisual.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Show firemode indicator, representing safety lock @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_show"]; diff --git a/addons/safemode/functions/fnc_unlockSafety.sqf b/addons/safemode/functions/fnc_unlockSafety.sqf index 58ecba5189..5a787277e4 100644 --- a/addons/safemode/functions/fnc_unlockSafety.sqf +++ b/addons/safemode/functions/fnc_unlockSafety.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Take weapon of safety lock. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_weapon", "_muzzle"]; diff --git a/addons/sandbag/functions/fnc_canDeploy.sqf b/addons/sandbag/functions/fnc_canDeploy.sqf index 426dde56f2..88ecd03093 100644 --- a/addons/sandbag/functions/fnc_canDeploy.sqf +++ b/addons/sandbag/functions/fnc_canDeploy.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg, commy2 * Checks if the player can deploy a sandbag. @@ -13,10 +14,9 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; -if !("ACE_Sandbag_empty" in items _unit) exitWith {false}; +if !("ACE_Sandbag_empty" in (_unit call EFUNC(common,uniqueItems))) exitWith {false}; _unit call EFUNC(common,canDig) diff --git a/addons/sandbag/functions/fnc_deploy.sqf b/addons/sandbag/functions/fnc_deploy.sqf index da22483835..b336cee0a0 100644 --- a/addons/sandbag/functions/fnc_deploy.sqf +++ b/addons/sandbag/functions/fnc_deploy.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support * Starts the deploy process for sandbags. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/sandbag/functions/fnc_deployCancel.sqf b/addons/sandbag/functions/fnc_deployCancel.sqf index bd5e1a0d86..6c5fb1e88a 100644 --- a/addons/sandbag/functions/fnc_deployCancel.sqf +++ b/addons/sandbag/functions/fnc_deployCancel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support * Cancels sandbag deployment @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_key"]; diff --git a/addons/sandbag/functions/fnc_deployConfirm.sqf b/addons/sandbag/functions/fnc_deployConfirm.sqf index 29fca46f54..e8abb586ee 100644 --- a/addons/sandbag/functions/fnc_deployConfirm.sqf +++ b/addons/sandbag/functions/fnc_deployConfirm.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support * Confirms sandbag deployment @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/sandbag/functions/fnc_handleInteractMenuOpened.sqf b/addons/sandbag/functions/fnc_handleInteractMenuOpened.sqf index 4aef8f7ec8..7683520c84 100644 --- a/addons/sandbag/functions/fnc_handleInteractMenuOpened.sqf +++ b/addons/sandbag/functions/fnc_handleInteractMenuOpened.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle opening of interaction menu. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/sandbag/functions/fnc_handleKilled.sqf b/addons/sandbag/functions/fnc_handleKilled.sqf index b991af1e4b..b778de6cc6 100644 --- a/addons/sandbag/functions/fnc_handleKilled.sqf +++ b/addons/sandbag/functions/fnc_handleKilled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle death. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/sandbag/functions/fnc_handlePlayerChanged.sqf b/addons/sandbag/functions/fnc_handlePlayerChanged.sqf index 2828979bc1..2ba996f760 100644 --- a/addons/sandbag/functions/fnc_handlePlayerChanged.sqf +++ b/addons/sandbag/functions/fnc_handlePlayerChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle player changes. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_newPlayer", "_oldPlayer"]; diff --git a/addons/sandbag/functions/fnc_handlePlayerInventoryChanged.sqf b/addons/sandbag/functions/fnc_handlePlayerInventoryChanged.sqf index 50d2fdede0..53674d8e86 100644 --- a/addons/sandbag/functions/fnc_handlePlayerInventoryChanged.sqf +++ b/addons/sandbag/functions/fnc_handlePlayerInventoryChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle the InventoryChanged event. @@ -14,12 +15,11 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; if (_unit getVariable [QGVAR(isDeploying), false]) then { - if !("ACE_Sandbag_empty" in items _unit) then { + if !("ACE_Sandbag_empty" in (_unit call EFUNC(common,uniqueItems))) then { [_unit] call FUNC(deployCancel); }; }; diff --git a/addons/sandbag/functions/fnc_handleScrollWheel.sqf b/addons/sandbag/functions/fnc_handleScrollWheel.sqf index 20d403a7a1..515e40053b 100644 --- a/addons/sandbag/functions/fnc_handleScrollWheel.sqf +++ b/addons/sandbag/functions/fnc_handleScrollWheel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, Ruthberg * Handles sandbag rotation @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (GVAR(deployPFH) == -1) exitWith {false}; diff --git a/addons/sandbag/functions/fnc_handleUnconscious.sqf b/addons/sandbag/functions/fnc_handleUnconscious.sqf index e225dac7c3..9b514007fb 100644 --- a/addons/sandbag/functions/fnc_handleUnconscious.sqf +++ b/addons/sandbag/functions/fnc_handleUnconscious.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle unconsciousness. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/sandbag/functions/fnc_pickup.sqf b/addons/sandbag/functions/fnc_pickup.sqf index f7eaca9b72..7db56cdfbe 100644 --- a/addons/sandbag/functions/fnc_pickup.sqf +++ b/addons/sandbag/functions/fnc_pickup.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Pick up sandbag @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_sandbag"]; diff --git a/addons/sandbag/stringtable.xml b/addons/sandbag/stringtable.xml index de9ecd8a18..9284d23468 100644 --- a/addons/sandbag/stringtable.xml +++ b/addons/sandbag/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/scopes/CfgWeapons.hpp b/addons/scopes/CfgWeapons.hpp index 2a5be51ee0..86c4820caa 100644 --- a/addons/scopes/CfgWeapons.hpp +++ b/addons/scopes/CfgWeapons.hpp @@ -104,8 +104,8 @@ class CfgWeapons { class optic_LRPS : ItemCore { ACE_ScopeHeightAboveRail = 4.2098; - ACE_ScopeAdjust_Vertical[] = {-4, 30}; - ACE_ScopeAdjust_Horizontal[] = {-6, 6}; + ACE_ScopeAdjust_Vertical[] = {0, 27}; + ACE_ScopeAdjust_Horizontal[] = {-8, 8}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { @@ -156,8 +156,8 @@ class CfgWeapons { class optic_AMS_base : ItemCore { ACE_ScopeHeightAboveRail = 3.8933; - ACE_ScopeAdjust_Vertical[] = {-4, 30}; - ACE_ScopeAdjust_Horizontal[] = {-6, 6}; + ACE_ScopeAdjust_Vertical[] = {0, 16}; + ACE_ScopeAdjust_Horizontal[] = {-11, 11}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { @@ -176,8 +176,8 @@ class CfgWeapons { class optic_KHS_base : ItemCore { ACE_ScopeHeightAboveRail = 4.30723; - ACE_ScopeAdjust_Vertical[] = {-4, 30}; - ACE_ScopeAdjust_Horizontal[] = {-6, 6}; + ACE_ScopeAdjust_Vertical[] = {0, 19}; + ACE_ScopeAdjust_Horizontal[] = {-9, 9}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { @@ -196,8 +196,8 @@ class CfgWeapons { class optic_KHS_old : ItemCore { ACE_ScopeHeightAboveRail = 4.30723; - ACE_ScopeAdjust_Vertical[] = {-4, 30}; - ACE_ScopeAdjust_Horizontal[] = {-6, 6}; + ACE_ScopeAdjust_Vertical[] = {0, 19}; + ACE_ScopeAdjust_Horizontal[] = {-9, 9}; ACE_ScopeAdjust_VerticalIncrement = 0.1; ACE_ScopeAdjust_HorizontalIncrement = 0.1; class ItemInfo : InventoryOpticsItem_Base_F { diff --git a/addons/scopes/XEH_postInit.sqf b/addons/scopes/XEH_postInit.sqf index 075ea48a76..a7720c62f5 100644 --- a/addons/scopes/XEH_postInit.sqf +++ b/addons/scopes/XEH_postInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, esteldunedain, Ruthberg * @@ -5,7 +6,6 @@ * Defines key bindings * */ -#include "script_component.hpp" if (!hasInterface) exitWith {}; diff --git a/addons/scopes/functions/fnc_adjustScope.sqf b/addons/scopes/functions/fnc_adjustScope.sqf index 8c48ee654b..1d99e3605f 100644 --- a/addons/scopes/functions/fnc_adjustScope.sqf +++ b/addons/scopes/functions/fnc_adjustScope.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Ruthberg * Changes the adjustment for the current scope @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_turretAndDirection", "_majorStep"]; TRACE_3("adjustScope",_unit,_turretAndDirection,_majorStep); diff --git a/addons/scopes/functions/fnc_adjustZero.sqf b/addons/scopes/functions/fnc_adjustZero.sqf index b551d6b2c7..56c3404a7c 100644 --- a/addons/scopes/functions/fnc_adjustZero.sqf +++ b/addons/scopes/functions/fnc_adjustZero.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Ruthberg * Updates the zero adjustment of the current scope @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf index f4d6959754..e64abb30fc 100644 --- a/addons/scopes/functions/fnc_applyScopeAdjustment.sqf +++ b/addons/scopes/functions/fnc_applyScopeAdjustment.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Ruthberg * Applies the adjustment for the current scope @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_elevation", "_windage", "_zero"]; diff --git a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf index 4573a1c97a..017c617ebc 100644 --- a/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf +++ b/addons/scopes/functions/fnc_calculateZeroAngleCorrection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the zero angle correction for the new zero range based on current zero range and bore height (distance between bore- and sight axis) @@ -18,7 +19,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_oldZeroRange", "_newZeroRange", "_boreHeight"/*in cm*/, "_weapon", "_ammo", "_magazine", "_advancedBallistics"]; diff --git a/addons/scopes/functions/fnc_canAdjustZero.sqf b/addons/scopes/functions/fnc_canAdjustZero.sqf index 996e6ae7fc..d9c2903cbd 100644 --- a/addons/scopes/functions/fnc_canAdjustZero.sqf +++ b/addons/scopes/functions/fnc_canAdjustZero.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Ruthberg * Checks if the unit can change the zero adjustment of the current scope @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/scopes/functions/fnc_canResetZero.sqf b/addons/scopes/functions/fnc_canResetZero.sqf index fe9def4a19..c398294684 100644 --- a/addons/scopes/functions/fnc_canResetZero.sqf +++ b/addons/scopes/functions/fnc_canResetZero.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Ruthberg * Checks if the unit can reset the zero adjustment of the current scope @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/scopes/functions/fnc_firedEH.sqf b/addons/scopes/functions/fnc_firedEH.sqf index b183109071..8870592885 100644 --- a/addons/scopes/functions/fnc_firedEH.sqf +++ b/addons/scopes/functions/fnc_firedEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, esteldunedain, Ruthberg * Adjusts the flight path of the bullet according to the zeroing. Called from the unified fired EH only for local and non-local players on foot. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/scopes/functions/fnc_getBaseAngle.sqf b/addons/scopes/functions/fnc_getBaseAngle.sqf index d529fef2f4..da5e965938 100644 --- a/addons/scopes/functions/fnc_getBaseAngle.sqf +++ b/addons/scopes/functions/fnc_getBaseAngle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Gets the base angle of the weapon & optic combination with the given weapon index @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_weaponIndex"]; diff --git a/addons/scopes/functions/fnc_getBoreHeight.sqf b/addons/scopes/functions/fnc_getBoreHeight.sqf index b76a9c7f9e..8926585989 100644 --- a/addons/scopes/functions/fnc_getBoreHeight.sqf +++ b/addons/scopes/functions/fnc_getBoreHeight.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Gets the bore height of the weapon & optic combination with the given weapon index @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", "_weaponIndex"]; diff --git a/addons/scopes/functions/fnc_getCurrentZeroRange.sqf b/addons/scopes/functions/fnc_getCurrentZeroRange.sqf index 946e2e0b2b..6425fe047a 100644 --- a/addons/scopes/functions/fnc_getCurrentZeroRange.sqf +++ b/addons/scopes/functions/fnc_getCurrentZeroRange.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Gets the zero range of the currently used optic @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/scopes/functions/fnc_getOptics.sqf b/addons/scopes/functions/fnc_getOptics.sqf index 64ad73ebdd..c9c1216d99 100644 --- a/addons/scopes/functions/fnc_getOptics.sqf +++ b/addons/scopes/functions/fnc_getOptics.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Gets the optic classnames of all currently equipped weapons. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/scopes/functions/fnc_initModuleSettings.sqf b/addons/scopes/functions/fnc_initModuleSettings.sqf index db5d5cd8a5..b0bf38492d 100644 --- a/addons/scopes/functions/fnc_initModuleSettings.sqf +++ b/addons/scopes/functions/fnc_initModuleSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, Ruthberg * Module for adjusting the scopes settings @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic","_units", "_activated"]; diff --git a/addons/scopes/functions/fnc_inventoryCheck.sqf b/addons/scopes/functions/fnc_inventoryCheck.sqf index fa0fa426c6..68a76e6ffe 100644 --- a/addons/scopes/functions/fnc_inventoryCheck.sqf +++ b/addons/scopes/functions/fnc_inventoryCheck.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Commy2, Ruthberg * Check if weapon optics changed and reset zeroing if needed @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_player"]; diff --git a/addons/scopes/functions/fnc_resetZero.sqf b/addons/scopes/functions/fnc_resetZero.sqf index 8d083cf2ee..4f4510a55d 100644 --- a/addons/scopes/functions/fnc_resetZero.sqf +++ b/addons/scopes/functions/fnc_resetZero.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, Ruthberg * Resets the zero adjustment of the current scope @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/scopes/functions/fnc_showZeroing.sqf b/addons/scopes/functions/fnc_showZeroing.sqf index 533d68f7e1..ada869b5fd 100644 --- a/addons/scopes/functions/fnc_showZeroing.sqf +++ b/addons/scopes/functions/fnc_showZeroing.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: KoffeinFlummi, esteldunedain * Display the adjustment knobs, update their value and fade them out later @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; diff --git a/addons/scopes/stringtable.xml b/addons/scopes/stringtable.xml index aa297fd32d..a5e5dcec33 100644 --- a/addons/scopes/stringtable.xml +++ b/addons/scopes/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -444,11 +444,13 @@ Horizontal limits 水平限制 水平制限 + Limite orrizontale Vertical limits 垂直限制 垂直制限 + Limite verticale diff --git a/addons/slideshow/functions/fnc_addSlideActions.sqf b/addons/slideshow/functions/fnc_addSlideActions.sqf index 177627bb7b..6acd304d32 100644 --- a/addons/slideshow/functions/fnc_addSlideActions.sqf +++ b/addons/slideshow/functions/fnc_addSlideActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Adds controller slide actions. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_objects", "_images", "_names", "_controller", "_currentSlideshow"]; diff --git a/addons/slideshow/functions/fnc_autoTransition.sqf b/addons/slideshow/functions/fnc_autoTransition.sqf index fda7b8ce1b..50e8b1d13d 100644 --- a/addons/slideshow/functions/fnc_autoTransition.sqf +++ b/addons/slideshow/functions/fnc_autoTransition.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Handles automatic slide transitions using waitAndExecute in a PFH-like manner resulting in no performance loss. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_objects", "_images", "_varString", "_duration"]; diff --git a/addons/slideshow/functions/fnc_createSlideshow.sqf b/addons/slideshow/functions/fnc_createSlideshow.sqf index b2bd602e29..965a823941 100644 --- a/addons/slideshow/functions/fnc_createSlideshow.sqf +++ b/addons/slideshow/functions/fnc_createSlideshow.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas, DaC * Prepares necessary variables and default image. @@ -18,7 +19,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [ ["_objects", [], [[]] ], diff --git a/addons/slideshow/functions/fnc_moduleInit.sqf b/addons/slideshow/functions/fnc_moduleInit.sqf index caef4cb2d8..b3cbf8bf43 100644 --- a/addons/slideshow/functions/fnc_moduleInit.sqf +++ b/addons/slideshow/functions/fnc_moduleInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Initializes the module. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" // Exit on Headless Client if (!hasInterface && !isDedicated) exitWith {}; diff --git a/addons/slideshow/stringtable.xml b/addons/slideshow/stringtable.xml index 3abaa07592..7f37e06b01 100644 --- a/addons/slideshow/stringtable.xml +++ b/addons/slideshow/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/spectator/XEH_postInit.sqf b/addons/spectator/XEH_postInit.sqf index 715dbe1c3d..a02f36ae67 100644 --- a/addons/spectator/XEH_postInit.sqf +++ b/addons/spectator/XEH_postInit.sqf @@ -34,3 +34,5 @@ if (hasInterface) then { } ] call CBA_fnc_waitUntilAndExecute; }; + +["ace_spectator", {GETMVAR(GVAR(isSet),false)}] call CBA_fnc_registerFeatureCamera; diff --git a/addons/spectator/functions/fnc_cam.sqf b/addons/spectator/functions/fnc_cam.sqf index 992476d53f..d61fff40c1 100644 --- a/addons/spectator/functions/fnc_cam.sqf +++ b/addons/spectator/functions/fnc_cam.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, SilentSpike * Handles camera initialisation and destruction @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_init"]; TRACE_1("cam",_init); diff --git a/addons/spectator/functions/fnc_cam_prepareTarget.sqf b/addons/spectator/functions/fnc_cam_prepareTarget.sqf index 81bec1504e..236924b255 100644 --- a/addons/spectator/functions/fnc_cam_prepareTarget.sqf +++ b/addons/spectator/functions/fnc_cam_prepareTarget.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, SilentSpike * Moves the spectator camera to a position relative to the camera focus. @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - private _focus = vehicle (param [0, objNull, [objNull]]); TRACE_1("cam_prepareTarget",_focus); diff --git a/addons/spectator/functions/fnc_cam_resetTarget.sqf b/addons/spectator/functions/fnc_cam_resetTarget.sqf index 94f934d6d6..5286d944e3 100644 --- a/addons/spectator/functions/fnc_cam_resetTarget.sqf +++ b/addons/spectator/functions/fnc_cam_resetTarget.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, SilentSpike * Removes the current camera interest and detaches dummy target. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - private _camera = GVAR(camera); private _dummy = GVAR(camDummy); diff --git a/addons/spectator/functions/fnc_cam_setCameraMode.sqf b/addons/spectator/functions/fnc_cam_setCameraMode.sqf index 02238ed91e..3943823f8a 100644 --- a/addons/spectator/functions/fnc_cam_setCameraMode.sqf +++ b/addons/spectator/functions/fnc_cam_setCameraMode.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO, SilentSpike * Function used to select the camera mode @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_newMode"]; private _oldMode = GVAR(camMode); diff --git a/addons/spectator/functions/fnc_cam_setTarget.sqf b/addons/spectator/functions/fnc_cam_setTarget.sqf index 51cd80215a..4587af8c34 100644 --- a/addons/spectator/functions/fnc_cam_setTarget.sqf +++ b/addons/spectator/functions/fnc_cam_setTarget.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, SilentSpike * Sets the current camera interest using dummy target. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" #define CAMERA_TARGET_CHANGE_TIME 0.5 params ["_object"]; diff --git a/addons/spectator/functions/fnc_cam_setVisionMode.sqf b/addons/spectator/functions/fnc_cam_setVisionMode.sqf index c9eed499fe..ccc761934d 100644 --- a/addons/spectator/functions/fnc_cam_setVisionMode.sqf +++ b/addons/spectator/functions/fnc_cam_setVisionMode.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Function used to select the camera vision mode @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_newVision"]; private _oldVision = GVAR(camVision); diff --git a/addons/spectator/functions/fnc_cam_tick.sqf b/addons/spectator/functions/fnc_cam_tick.sqf index 1ba9ee2797..3ec0dbe5e6 100644 --- a/addons/spectator/functions/fnc_cam_tick.sqf +++ b/addons/spectator/functions/fnc_cam_tick.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO, SilentSpike * Function used to perform camera ticks @@ -19,8 +20,6 @@ * Public: No */ -#include "script_component.hpp" - BEGIN_COUNTER(camTick); private _cameraMode = GVAR(camMode); private _camTarget = GVAR(camFocus); diff --git a/addons/spectator/functions/fnc_cam_toggleSlow.sqf b/addons/spectator/functions/fnc_cam_toggleSlow.sqf index e689351ce8..47ad2a2106 100644 --- a/addons/spectator/functions/fnc_cam_toggleSlow.sqf +++ b/addons/spectator/functions/fnc_cam_toggleSlow.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, SilentSpike * Function used to set camera slow speed mode @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_slowSpeed"]; if !(GVAR(camSlow) isEqualTo _slowSpeed) then { diff --git a/addons/spectator/functions/fnc_compat_counter.sqf b/addons/spectator/functions/fnc_compat_counter.sqf index 8a54d6dbdf..158bcbd0a5 100644 --- a/addons/spectator/functions/fnc_compat_counter.sqf +++ b/addons/spectator/functions/fnc_compat_counter.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Handles integrating the counter respawn template into the spectator UI @@ -15,8 +16,6 @@ * * Public: No */ - -#include "script_component.hpp" #define IDC_COUNTER_TITLE 1001 #define IDC_COUNTER_BACK 1002 #define IDC_COUNTER_TEXT 1003 diff --git a/addons/spectator/functions/fnc_compat_spectatorBI.sqf b/addons/spectator/functions/fnc_compat_spectatorBI.sqf index 0024664c88..f8817468f1 100644 --- a/addons/spectator/functions/fnc_compat_spectatorBI.sqf +++ b/addons/spectator/functions/fnc_compat_spectatorBI.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Handles "compatibility" (i.e. override) for BI spectator respawn types 1, 4 & 5 @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - private _respawn = getMissionConfigValue ["respawn",0]; if (_respawn isEqualType "") then { _respawn = ["","bird","","","group","side"] find (toLower _respawn); }; if !(_respawn in [1,4,5]) exitWith {}; diff --git a/addons/spectator/functions/fnc_compat_zeus.sqf b/addons/spectator/functions/fnc_compat_zeus.sqf index f379e549ce..a8f190bdd4 100644 --- a/addons/spectator/functions/fnc_compat_zeus.sqf +++ b/addons/spectator/functions/fnc_compat_zeus.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Handles compatibility with curator interface (i.e. re-opens spectator if applicable) @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_display"]; _display displayAddEventHandler ["Unload",{ diff --git a/addons/spectator/functions/fnc_getCameraAttributes.sqf b/addons/spectator/functions/fnc_getCameraAttributes.sqf index 3f43a9003a..d9e53082ed 100644 --- a/addons/spectator/functions/fnc_getCameraAttributes.sqf +++ b/addons/spectator/functions/fnc_getCameraAttributes.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Returns the current spectator camera attributes (see setCameraAttributes for details). @@ -14,8 +15,6 @@ * Public: Yes */ -#include "script_component.hpp" - if !(isNil QGVAR(camera)) then { [GVAR(camMode), GVAR(camFocus), GVAR(camVision), getPosATL GVAR(camera), getDirVisual GVAR(camera)] } else { diff --git a/addons/spectator/functions/fnc_getGroupIcon.sqf b/addons/spectator/functions/fnc_getGroupIcon.sqf index fdc2772edc..a408df73dc 100644 --- a/addons/spectator/functions/fnc_getGroupIcon.sqf +++ b/addons/spectator/functions/fnc_getGroupIcon.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Function used to get an appropriate icon for provided group. Approximate. @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" #define ICON_PATH(var1) QUOTE(a3\ui_f\data\Map\Markers\NATO\var1) // Military icons diff --git a/addons/spectator/functions/fnc_getTargetEntities.sqf b/addons/spectator/functions/fnc_getTargetEntities.sqf index 80ee72fe03..162967a1aa 100644 --- a/addons/spectator/functions/fnc_getTargetEntities.sqf +++ b/addons/spectator/functions/fnc_getTargetEntities.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Gets the possible entities to spectate based on settings. @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - // Include dead units if specified (used by entity list) private _entities = allUnits; if (param [0,false]) then { _entities append allDeadMen; }; diff --git a/addons/spectator/functions/fnc_handleFired.sqf b/addons/spectator/functions/fnc_handleFired.sqf index 4b0d640585..b2efb97a5d 100644 --- a/addons/spectator/functions/fnc_handleFired.sqf +++ b/addons/spectator/functions/fnc_handleFired.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO, SilentSpike * Function used to add projectiles to be drawn when a unit fires @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params [ "_unit", ["_weapon", "", [""]], diff --git a/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf b/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf index 4a7c891497..267ce5615f 100644 --- a/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf +++ b/addons/spectator/functions/fnc_moduleSpectatorSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Read spectator settings from module @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/spectator/functions/fnc_players.sqf b/addons/spectator/functions/fnc_players.sqf index 3525b835d5..f79c6ce5e9 100644 --- a/addons/spectator/functions/fnc_players.sqf +++ b/addons/spectator/functions/fnc_players.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Return all of the player entities who are currently in ace spectator @@ -14,6 +15,4 @@ * Public: Yes */ -#include "script_component.hpp" - allPlayers select { GETVAR(_x,GVAR(isSet),false) } diff --git a/addons/spectator/functions/fnc_respawnTemplate.sqf b/addons/spectator/functions/fnc_respawnTemplate.sqf index d5b91bbd2e..9cd54ac005 100644 --- a/addons/spectator/functions/fnc_respawnTemplate.sqf +++ b/addons/spectator/functions/fnc_respawnTemplate.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * The ace_spectator respawn template, compatible with types 1,2,3,4 & 5 @@ -20,8 +21,6 @@ * Public: No */ -#include "script_component.hpp" - params [["_newCorpse",objNull,[objNull]], ["_oldKiller",objNull,[objNull]], ["_respawn",0,[0]], ["_respawnDelay",0,[0]]]; TRACE_4("respawnTemplate",_newCorpse,_oldKiller,_respawn,_respawnDelay); diff --git a/addons/spectator/functions/fnc_setCameraAttributes.sqf b/addons/spectator/functions/fnc_setCameraAttributes.sqf index c9a272407b..2ee5140d80 100644 --- a/addons/spectator/functions/fnc_setCameraAttributes.sqf +++ b/addons/spectator/functions/fnc_setCameraAttributes.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Sets the spectator camera attributes as desired. Local effect. @@ -32,8 +33,6 @@ * Public: Yes */ -#include "script_component.hpp" - params [ ["_mode",nil,[0]], ["_focus",nil,[objNull,true]], diff --git a/addons/spectator/functions/fnc_setFocus.sqf b/addons/spectator/functions/fnc_setFocus.sqf index e2054ecfe6..f524341a1f 100644 --- a/addons/spectator/functions/fnc_setFocus.sqf +++ b/addons/spectator/functions/fnc_setFocus.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: AACO, SilentSpike * Function used to set the camera focus @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params [["_newFocus", objNull, [objNull,true]]]; // If boolean provided then first find a focus diff --git a/addons/spectator/functions/fnc_setSpectator.sqf b/addons/spectator/functions/fnc_setSpectator.sqf index ca829559e7..d9942cc3ab 100644 --- a/addons/spectator/functions/fnc_setSpectator.sqf +++ b/addons/spectator/functions/fnc_setSpectator.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Enter/exit spectator mode for the local player @@ -19,8 +20,6 @@ * Public: Yes */ -#include "script_component.hpp" - params [["_set",true,[true]], ["_force",true,[true]], ["_hide",true,[true]]]; TRACE_3("Params",_set,_force,_hide); diff --git a/addons/spectator/functions/fnc_switchFocus.sqf b/addons/spectator/functions/fnc_switchFocus.sqf index 444bd72b6d..8083a15e0f 100644 --- a/addons/spectator/functions/fnc_switchFocus.sqf +++ b/addons/spectator/functions/fnc_switchFocus.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, SilentSpike * Function used to switch to next or previous camera focus @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - private _next = param [0, true]; private _entities = [true] call FUNC(getTargetEntities); private _focus = GVAR(camFocus); diff --git a/addons/spectator/functions/fnc_ui.sqf b/addons/spectator/functions/fnc_ui.sqf index 475f794deb..c135c74a69 100644 --- a/addons/spectator/functions/fnc_ui.sqf +++ b/addons/spectator/functions/fnc_ui.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Handles UI initialisation and destruction @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_init"]; TRACE_1("ui",_init); diff --git a/addons/spectator/functions/fnc_ui_draw3D.sqf b/addons/spectator/functions/fnc_ui_draw3D.sqf index 3a60c28d64..744e1bfe5e 100644 --- a/addons/spectator/functions/fnc_ui_draw3D.sqf +++ b/addons/spectator/functions/fnc_ui_draw3D.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO, SilentSpike * Function used to draw the 3D icons and track the cursor object @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" #define HEIGHT_OFFSET 1.5 BEGIN_COUNTER(updateCursor); diff --git a/addons/spectator/functions/fnc_ui_fadeList.sqf b/addons/spectator/functions/fnc_ui_fadeList.sqf index dbc5344228..c365ca4824 100644 --- a/addons/spectator/functions/fnc_ui_fadeList.sqf +++ b/addons/spectator/functions/fnc_ui_fadeList.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO * Function used to fade/unfade the entitiy list @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_fadeList"]; if (GVAR(uiVisible)) then { diff --git a/addons/spectator/functions/fnc_ui_getTreeDataIndex.sqf b/addons/spectator/functions/fnc_ui_getTreeDataIndex.sqf index 529751a09f..73d6cf8e89 100644 --- a/addons/spectator/functions/fnc_ui_getTreeDataIndex.sqf +++ b/addons/spectator/functions/fnc_ui_getTreeDataIndex.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO * Function used to find the tree path of an entity @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params [["_data", "", [""]]]; scopeName QGVAR(getTreeDataIndex); diff --git a/addons/spectator/functions/fnc_ui_handleChildDestroyed.sqf b/addons/spectator/functions/fnc_ui_handleChildDestroyed.sqf index f2dcab47ef..abebcbc69f 100644 --- a/addons/spectator/functions/fnc_ui_handleChildDestroyed.sqf +++ b/addons/spectator/functions/fnc_ui_handleChildDestroyed.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte * Function used to handle child destroyed event @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_display","_child","_exitCode"]; if (_exitCode == 104) then { diff --git a/addons/spectator/functions/fnc_ui_handleKeyDown.sqf b/addons/spectator/functions/fnc_ui_handleKeyDown.sqf index 2ac7a049b7..aa10af0358 100644 --- a/addons/spectator/functions/fnc_ui_handleKeyDown.sqf +++ b/addons/spectator/functions/fnc_ui_handleKeyDown.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "\A3\ui_f\hpp\defineDIKCodes.inc" /* * Author: Nelson Duarte, AACO, SilentSpike * Function used to handle key down event @@ -18,9 +20,6 @@ * Public: No */ -#include "script_component.hpp" -#include "\A3\ui_f\hpp\defineDIKCodes.inc" - params ["","_key","_shift","_ctrl","_alt"]; // Handle map toggle diff --git a/addons/spectator/functions/fnc_ui_handleKeyUp.sqf b/addons/spectator/functions/fnc_ui_handleKeyUp.sqf index 672f2f7bb8..1ab7213aa1 100644 --- a/addons/spectator/functions/fnc_ui_handleKeyUp.sqf +++ b/addons/spectator/functions/fnc_ui_handleKeyUp.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "\A3\ui_f\hpp\defineDIKCodes.inc" /* * Author: Nelson Duarte, SilentSpike * Function used to handle key up event @@ -18,9 +20,6 @@ * Public: No */ -#include "script_component.hpp" -#include "\A3\ui_f\hpp\defineDIKCodes.inc" - params ["","_key","_shift","_ctrl","_alt"]; if (_key == DIK_LALT) exitWith { diff --git a/addons/spectator/functions/fnc_ui_handleListClick.sqf b/addons/spectator/functions/fnc_ui_handleListClick.sqf index 9616e77cac..225623668d 100644 --- a/addons/spectator/functions/fnc_ui_handleListClick.sqf +++ b/addons/spectator/functions/fnc_ui_handleListClick.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO, SilentSpike * Function used to handle list single/double clicks @@ -18,7 +19,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_dblClick","_params"]; _params params ["_list","_index"]; diff --git a/addons/spectator/functions/fnc_ui_handleLoad.sqf b/addons/spectator/functions/fnc_ui_handleLoad.sqf index 1afa5ce123..bcaf90a699 100644 --- a/addons/spectator/functions/fnc_ui_handleLoad.sqf +++ b/addons/spectator/functions/fnc_ui_handleLoad.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike, Jonpas * Function used to handle load event. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_display"]; diff --git a/addons/spectator/functions/fnc_ui_handleMapClick.sqf b/addons/spectator/functions/fnc_ui_handleMapClick.sqf index 6e74ed0e97..6d4e17e401 100644 --- a/addons/spectator/functions/fnc_ui_handleMapClick.sqf +++ b/addons/spectator/functions/fnc_ui_handleMapClick.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO * Function used to handle map mouse click events @@ -17,8 +18,6 @@ * Public: No */ -#include "script_component.hpp" - params ["", "", "_x", "_y"]; if (isNull GVAR(uiMapHighlighted)) then { diff --git a/addons/spectator/functions/fnc_ui_handleMapDraw.sqf b/addons/spectator/functions/fnc_ui_handleMapDraw.sqf index 40ad5c3f9a..0602c7b4d2 100644 --- a/addons/spectator/functions/fnc_ui_handleMapDraw.sqf +++ b/addons/spectator/functions/fnc_ui_handleMapDraw.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO * Function used to handle map draw @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" #define MAP_MIN_ENTITY_DISTANCE 30 // Moved timer into map controls group, update here diff --git a/addons/spectator/functions/fnc_ui_handleMouseButtonDblClick.sqf b/addons/spectator/functions/fnc_ui_handleMouseButtonDblClick.sqf index f880daf81b..ec7632e207 100644 --- a/addons/spectator/functions/fnc_ui_handleMouseButtonDblClick.sqf +++ b/addons/spectator/functions/fnc_ui_handleMouseButtonDblClick.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO, SilentSpike * Function used to handle mouse button double clicks @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["", "_button"]; if (_button == 0 && {!isNull GVAR(cursorObject)}) then { diff --git a/addons/spectator/functions/fnc_ui_handleMouseButtonDown.sqf b/addons/spectator/functions/fnc_ui_handleMouseButtonDown.sqf index a6bb64d744..da74c071ba 100644 --- a/addons/spectator/functions/fnc_ui_handleMouseButtonDown.sqf +++ b/addons/spectator/functions/fnc_ui_handleMouseButtonDown.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO, SilentSpike * Function used to handle mouse down event @@ -21,8 +22,6 @@ * Public: No */ -#include "script_component.hpp" - params ["", "_button"]; // Left click diff --git a/addons/spectator/functions/fnc_ui_handleMouseMoving.sqf b/addons/spectator/functions/fnc_ui_handleMouseMoving.sqf index af3f1ede62..de652f8845 100644 --- a/addons/spectator/functions/fnc_ui_handleMouseMoving.sqf +++ b/addons/spectator/functions/fnc_ui_handleMouseMoving.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO * Function used to handle mouse moving event @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - if (GVAR(holdingRMB) && { GVAR(camMode) == MODE_FOLLOW }) then { params ["", "_deltaX", "_deltaY"]; diff --git a/addons/spectator/functions/fnc_ui_handleMouseZChanged.sqf b/addons/spectator/functions/fnc_ui_handleMouseZChanged.sqf index 5e54cb8b72..8b109d430c 100644 --- a/addons/spectator/functions/fnc_ui_handleMouseZChanged.sqf +++ b/addons/spectator/functions/fnc_ui_handleMouseZChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO * Function used to handle mouse scroll event @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" #define FOLLOW_CAMERA_MAX_DISTANCE 5 if (GVAR(camMode) == MODE_FOLLOW) then { diff --git a/addons/spectator/functions/fnc_ui_toggleMap.sqf b/addons/spectator/functions/fnc_ui_toggleMap.sqf index 23114fe4cb..c968f39512 100644 --- a/addons/spectator/functions/fnc_ui_toggleMap.sqf +++ b/addons/spectator/functions/fnc_ui_toggleMap.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO * Function used to toggle the map @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - if (GVAR(uiMapVisible)) then { CTRL_MAP ctrlShow false; CTRL_MAP_GROUP ctrlShow false; diff --git a/addons/spectator/functions/fnc_ui_toggleUI.sqf b/addons/spectator/functions/fnc_ui_toggleUI.sqf index b15e8b1962..7e6716ba5e 100644 --- a/addons/spectator/functions/fnc_ui_toggleUI.sqf +++ b/addons/spectator/functions/fnc_ui_toggleUI.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO, SilentSpike * Function used to toggle the whole user interface @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - private _visible = !GVAR(uiVisible); { diff --git a/addons/spectator/functions/fnc_ui_updateCamButtons.sqf b/addons/spectator/functions/fnc_ui_updateCamButtons.sqf index d110aac4ea..77a8b3ca17 100644 --- a/addons/spectator/functions/fnc_ui_updateCamButtons.sqf +++ b/addons/spectator/functions/fnc_ui_updateCamButtons.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Used to update the docked camera buttons @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - // These correspond to the camera mode indices #define ENUM_IDCs [IDC_FREE, IDC_FPS, IDC_FOLLOW] #define ENUM_ACTIVE [CAM_ICON_FREE_SELECTED, CAM_ICON_FPS_SELECTED, CAM_ICON_FOLLOW_SELECTED] diff --git a/addons/spectator/functions/fnc_ui_updateHelp.sqf b/addons/spectator/functions/fnc_ui_updateHelp.sqf index 65c9408ace..f715cb1eca 100644 --- a/addons/spectator/functions/fnc_ui_updateHelp.sqf +++ b/addons/spectator/functions/fnc_ui_updateHelp.sqf @@ -1,3 +1,5 @@ +#include "script_component.hpp" +#include "\A3\ui_f\hpp\defineDIKCodes.inc" /* * Author: Nelson Duarte, SilentSpike * Updates spectator UI help element @@ -17,9 +19,6 @@ * * Public: No */ - -#include "script_component.hpp" -#include "\A3\ui_f\hpp\defineDIKCodes.inc" #define MAX_CONTROLS_HELP_ENTRIES 12 if !(GVAR(uiHelpVisible)) exitWith {}; diff --git a/addons/spectator/functions/fnc_ui_updateIconsToDraw.sqf b/addons/spectator/functions/fnc_ui_updateIconsToDraw.sqf index 4c79d5ecf4..db3065c360 100644 --- a/addons/spectator/functions/fnc_ui_updateIconsToDraw.sqf +++ b/addons/spectator/functions/fnc_ui_updateIconsToDraw.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO, SilentSpike * Function used update the things to 3D draw @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - private _iconsToDraw = []; private _entitiesToDraw = []; diff --git a/addons/spectator/functions/fnc_ui_updateListEntities.sqf b/addons/spectator/functions/fnc_ui_updateListEntities.sqf index e5ee48005a..640f860ec0 100644 --- a/addons/spectator/functions/fnc_ui_updateListEntities.sqf +++ b/addons/spectator/functions/fnc_ui_updateListEntities.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO, SilentSpike * Updates spectator UI list of units/groups @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - private _newUnits = []; private _newGroups = []; // Always show the 4 main sides in this intuative order diff --git a/addons/spectator/functions/fnc_ui_updateListFocus.sqf b/addons/spectator/functions/fnc_ui_updateListFocus.sqf index 1e9dcafaec..3ac112e2cb 100644 --- a/addons/spectator/functions/fnc_ui_updateListFocus.sqf +++ b/addons/spectator/functions/fnc_ui_updateListFocus.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, AACO, SilentSpike * Function used to update the list current selection @@ -14,6 +15,4 @@ * Public: No */ -#include "script_component.hpp" - CTRL_LIST tvSetCurSel ([[GVAR(camFocus)] call BIS_fnc_objectVar] call FUNC(ui_getTreeDataIndex)); diff --git a/addons/spectator/functions/fnc_ui_updateWidget.sqf b/addons/spectator/functions/fnc_ui_updateWidget.sqf index 068bff7cb0..32337eae3d 100644 --- a/addons/spectator/functions/fnc_ui_updateWidget.sqf +++ b/addons/spectator/functions/fnc_ui_updateWidget.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Nelson Duarte, SilentSpike * Updates spectator UI unit info widget @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" #define IMG_COMMANDER "a3\Ui_f\data\IGUI\Cfg\CommandBar\imageCommander_ca.paa" #define IMG_DRIVER "a3\Ui_f\data\IGUI\Cfg\CommandBar\imageDriver_ca.paa" #define IMG_GUNNER "a3\Ui_f\data\IGUI\Cfg\CommandBar\imageGunner_ca.paa" diff --git a/addons/spectator/functions/fnc_updateCameraModes.sqf b/addons/spectator/functions/fnc_updateCameraModes.sqf index 2931fe5295..f6408c786d 100644 --- a/addons/spectator/functions/fnc_updateCameraModes.sqf +++ b/addons/spectator/functions/fnc_updateCameraModes.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Adds or removes spectator camera modes from the selection available to the local player. @@ -21,8 +22,6 @@ * Public: Yes */ -#include "script_component.hpp" - if !(EGVAR(common,settingsInitFinished)) exitWith { EGVAR(common,runAtSettingsInitialized) pushBack [DFUNC(updateCameraModes),_this]; }; diff --git a/addons/spectator/functions/fnc_updateSides.sqf b/addons/spectator/functions/fnc_updateSides.sqf index ec4606b951..1f612a3080 100644 --- a/addons/spectator/functions/fnc_updateSides.sqf +++ b/addons/spectator/functions/fnc_updateSides.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Adds or removes sides from the selection available to spectate. Local effect. @@ -17,8 +18,6 @@ * Public: Yes */ -#include "script_component.hpp" - params [["_addSides",[],[[]]], ["_removeSides",[],[[]]]]; // Add and remove sides diff --git a/addons/spectator/functions/fnc_updateUnits.sqf b/addons/spectator/functions/fnc_updateUnits.sqf index 85ad1739ff..a32198c3de 100644 --- a/addons/spectator/functions/fnc_updateUnits.sqf +++ b/addons/spectator/functions/fnc_updateUnits.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Adds and removed units from the spectator list. Local effect. @@ -15,8 +16,6 @@ * Public: Yes */ -#include "script_component.hpp" - // Function only matters on player clients if (!hasInterface) exitWith {}; diff --git a/addons/spectator/functions/fnc_updateVisionModes.sqf b/addons/spectator/functions/fnc_updateVisionModes.sqf index 56b6696752..eb0e07f256 100644 --- a/addons/spectator/functions/fnc_updateVisionModes.sqf +++ b/addons/spectator/functions/fnc_updateVisionModes.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Adds or removes spectator vision modes from the selection available to the local player. @@ -29,8 +30,6 @@ * Public: Yes */ -#include "script_component.hpp" - if !(EGVAR(common,settingsInitFinished)) exitWith { EGVAR(common,runAtSettingsInitialized) pushBack [DFUNC(updateVisionModes),_this]; }; diff --git a/addons/spectator/stringtable.xml b/addons/spectator/stringtable.xml index 4958671946..279b0e6b57 100644 --- a/addons/spectator/stringtable.xml +++ b/addons/spectator/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -9,6 +9,7 @@ 旁观者 スペクテイター 관전자 + Spectateur ACE Spectator @@ -44,6 +45,7 @@ 可觀察AI 可观察AI AI 활성 + IA Activée Make AI viewable in spectator @@ -53,6 +55,7 @@ 開啟此功能後可在觀察者模式下觀察AI單位 开启此功能后可在观察者模式下观察AI单位。 관전자가 AI를 관전 할 수 있습니다. + Rends les IA visibles en spectateur Camera modes @@ -259,6 +262,7 @@ 單位圖示 单位图示 아이콘 + Icônes Projectiles @@ -268,6 +272,7 @@ 顯示彈道 显示弹道 발사체 + Projectiles Next Unit @@ -307,6 +312,7 @@ 視覺模式 视觉模式 보기 모드 + Mode de vision Slow Speed @@ -316,6 +322,7 @@ 慢速度 慢速度 느린 속도 + Vitesse lente diff --git a/addons/spottingscope/functions/fnc_animateReticle.sqf b/addons/spottingscope/functions/fnc_animateReticle.sqf index 7fbf71fe23..adca733814 100644 --- a/addons/spottingscope/functions/fnc_animateReticle.sqf +++ b/addons/spottingscope/functions/fnc_animateReticle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Animate scripted reticle of spotting scope. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" disableSerialization; diff --git a/addons/spottingscope/functions/fnc_pickup.sqf b/addons/spottingscope/functions/fnc_pickup.sqf index 1a15bd7880..2e8a5cc9e2 100644 --- a/addons/spottingscope/functions/fnc_pickup.sqf +++ b/addons/spottingscope/functions/fnc_pickup.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko, Ruthberg * Pick up spotting scope @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_spottingScope", "_unit"]; diff --git a/addons/spottingscope/functions/fnc_place.sqf b/addons/spottingscope/functions/fnc_place.sqf index 06f0e0d63a..ddf02d7e1e 100644 --- a/addons/spottingscope/functions/fnc_place.sqf +++ b/addons/spottingscope/functions/fnc_place.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko, Ruthberg * Place down spotting scope @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_scopeClass"]; diff --git a/addons/spottingscope/stringtable.xml b/addons/spottingscope/stringtable.xml index fdf621a29e..b11bff24ac 100644 --- a/addons/spottingscope/stringtable.xml +++ b/addons/spottingscope/stringtable.xml @@ -9,7 +9,7 @@ Telescopio Téléscope de visée Zaměřovací dalekohled - Spotting Scope + Cannocchiale Megfigyelő távcső Luneta de observador 観測用スコープ @@ -25,7 +25,7 @@ Coger telescopio Prendre téléscope de visée Zvednout zaměřovací dalekohled - Raccogli spottingscope + Raccogli Cannocchiale Mefgigy. távcső felvétele Pegar luneta de observador 観測用スコープを拾う @@ -41,7 +41,7 @@ Colocar telescopio Placer téléscope de visée Položit zaměřovací dalekohled - Posiziona spottingscope + Posiziona Cannocchiale Megfigy. távcső elhelyezése Colocar luneta de observador 観測用スコープを置く diff --git a/addons/switchunits/XEH_postInit.sqf b/addons/switchunits/XEH_postInit.sqf index 3e4fbdf46b..cffac8b57f 100644 --- a/addons/switchunits/XEH_postInit.sqf +++ b/addons/switchunits/XEH_postInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Initializes the SwitchUnits pbo. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - if (missionNamespace getVariable [QGVAR(EnableSwitchUnits), false]) then { [player] call FUNC(startSwitchUnits); diff --git a/addons/switchunits/functions/fnc_addMapFunction.sqf b/addons/switchunits/functions/fnc_addMapFunction.sqf index 3a7b20601c..28d9f05b78 100644 --- a/addons/switchunits/functions/fnc_addMapFunction.sqf +++ b/addons/switchunits/functions/fnc_addMapFunction.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Adds a mapClick Eventhandler @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_sides"]; diff --git a/addons/switchunits/functions/fnc_handleMapClick.sqf b/addons/switchunits/functions/fnc_handleMapClick.sqf index db016ac8f3..73f48c1fc0 100644 --- a/addons/switchunits/functions/fnc_handleMapClick.sqf +++ b/addons/switchunits/functions/fnc_handleMapClick.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Switches to a unit close to a clicked map position @@ -16,21 +17,15 @@ * * Public: No */ -#include "script_component.hpp" params ["_faction", "_pos"]; _faction params ["", "_sides"]; -private _sideNearest = []; +private _nearestObjects = nearestObjects [_pos, ["Man"], 15]; -{ - if ([_x] call FUNC(isValidAi) && (side group _x in _sides)) then { - _sideNearest pushBack _x; - }; - nil -} count (nearestObjects [_pos, ["Man"], 15]); +private _nearestValidUnitIndex = _nearestObjects findIf {(side group _x in _sides) && {[_x] call FUNC(isValidAi)}}; -if (count _sideNearest > 0) then { - [_sideNearest select 0] call FUNC(switchUnit); +if (_nearestValidUnitIndex != -1) then { + [_nearestObjects select _nearestValidUnitIndex] call FUNC(switchUnit); openMap false; }; diff --git a/addons/switchunits/functions/fnc_initPlayer.sqf b/addons/switchunits/functions/fnc_initPlayer.sqf index 7b0c8f2603..5fe6d5be6e 100644 --- a/addons/switchunits/functions/fnc_initPlayer.sqf +++ b/addons/switchunits/functions/fnc_initPlayer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Initializes the player @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_playerUnit", "_sides"]; @@ -32,12 +32,9 @@ if (vehicle _playerUnit == _playerUnit) then { removeAllWeapons _playerUnit; removeGoggles _playerUnit; removeHeadgear _playerUnit; - removeVest _playerUnit; removeAllAssignedItems _playerUnit; - clearAllItemsFromBackpack _playerUnit; - removeBackpack _playerUnit; + removeAllContainers _playerUnit; _playerUnit linkItem "ItemMap"; - removeUniform _playerUnit; [_playerUnit, "forceWalk", "ACE_SwitchUnits", true] call EFUNC(common,statusEffect_set); diff --git a/addons/switchunits/functions/fnc_isValidAi.sqf b/addons/switchunits/functions/fnc_isValidAi.sqf index 0b6a35c257..39fd0db94d 100644 --- a/addons/switchunits/functions/fnc_isValidAi.sqf +++ b/addons/switchunits/functions/fnc_isValidAi.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Checks if AI is a valid target for switching. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/switchunits/functions/fnc_markAiOnMap.sqf b/addons/switchunits/functions/fnc_markAiOnMap.sqf index 5d7eac6f1a..6c2eb0b0d9 100644 --- a/addons/switchunits/functions/fnc_markAiOnMap.sqf +++ b/addons/switchunits/functions/fnc_markAiOnMap.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Creates markers for AI units for given sides. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_sidesToShow"]; @@ -36,7 +36,7 @@ GVAR(AllMarkerNames) = []; // create markers { - if (([_x] call FUNC(isValidAi) && (side group _x in _sides)) || (_x getVariable [QGVAR(IsPlayerControlled), false])) then { + if ((_x getVariable [QGVAR(IsPlayerControlled), false]) || {(side group _x in _sides) && {[_x] call FUNC(isValidAi)}}) then { private _markerName = str _x; diff --git a/addons/switchunits/functions/fnc_module.sqf b/addons/switchunits/functions/fnc_module.sqf index c7762855a4..a2346ff2f4 100644 --- a/addons/switchunits/functions/fnc_module.sqf +++ b/addons/switchunits/functions/fnc_module.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Initializes the SwitchUnits module @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/switchunits/functions/fnc_nearestPlayers.sqf b/addons/switchunits/functions/fnc_nearestPlayers.sqf index f20d5fcf02..1d649d0843 100644 --- a/addons/switchunits/functions/fnc_nearestPlayers.sqf +++ b/addons/switchunits/functions/fnc_nearestPlayers.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Returns an array of alive players in a given radius around a given location @@ -14,16 +15,7 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_position", "_radius"]; -private _nearestPlayers = []; - -{ - if ([_x] call EFUNC(common,isPlayer) && {alive _x}) then { - _nearestPlayers pushBack _x; - }; -} forEach (nearestObjects [_position, ["Man"], _radius]); - -_nearestPlayers + (nearestObjects [_position, ["Man"], _radius]) select {alive _x && {[_x] call EFUNC(common,isPlayer)}}; diff --git a/addons/switchunits/functions/fnc_startSwitchUnits.sqf b/addons/switchunits/functions/fnc_startSwitchUnits.sqf index 8d4707f040..f5cc4c1330 100644 --- a/addons/switchunits/functions/fnc_startSwitchUnits.sqf +++ b/addons/switchunits/functions/fnc_startSwitchUnits.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Starts the SwitchUnits functionality @@ -14,17 +15,15 @@ * Public: No */ -#include "script_component.hpp" - params ["_player"]; if (GVAR(EnableSwitchUnits)) then { private _sides = []; - if(GVAR(SwitchToWest)) then {_sides pushBack west;}; - if(GVAR(SwitchToEast)) then {_sides pushBack east;}; - if(GVAR(SwitchToIndependent)) then {_sides pushBack independent;}; - if(GVAR(SwitchToCivilian)) then {_sides pushBack civilian;}; + if (GVAR(SwitchToWest)) then {_sides pushBack west;}; + if (GVAR(SwitchToEast)) then {_sides pushBack east;}; + if (GVAR(SwitchToIndependent)) then {_sides pushBack independent;}; + if (GVAR(SwitchToCivilian)) then {_sides pushBack civilian;}; if (_player getVariable ["ACE_CanSwitchUnits", false]) then { [_player, _sides] call FUNC(initPlayer); diff --git a/addons/switchunits/functions/fnc_switchBack.sqf b/addons/switchunits/functions/fnc_switchBack.sqf index 4c3d05ae54..9762547545 100644 --- a/addons/switchunits/functions/fnc_switchBack.sqf +++ b/addons/switchunits/functions/fnc_switchBack.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Switches back to the original player unit @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_originalPlayerUnit"]; diff --git a/addons/switchunits/functions/fnc_switchUnit.sqf b/addons/switchunits/functions/fnc_switchUnit.sqf index 84b766de4d..ab2867c3ef 100644 --- a/addons/switchunits/functions/fnc_switchUnit.sqf +++ b/addons/switchunits/functions/fnc_switchUnit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux578 * Switches to the new given player unit @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/switchunits/stringtable.xml b/addons/switchunits/stringtable.xml index 57822047c8..dd2486cbb0 100644 --- a/addons/switchunits/stringtable.xml +++ b/addons/switchunits/stringtable.xml @@ -1,9 +1,9 @@ - + Switch Units - Cambio Unità + Cambia Unità 切換單位 切换单位 ユニット切り替え diff --git a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf index 9dcd597230..f8e2ce9f3a 100644 --- a/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_cancelTLdeploy.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko, Ruthberg, commy2 * Cancel tactical ladder deployment @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" #define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"] @@ -32,8 +32,7 @@ GVAR(ladder) animate ["rotate", 0]; { GVAR(ladder) animate [_x, 0]; - true -} count __ANIMS; +} forEach __ANIMS; //Don't "optimize" this to a count. See #6607 // remove mouse buttons and hint call EFUNC(interaction,hideMouseHint); diff --git a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf index 9f1c5c14bb..755d13d132 100644 --- a/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf +++ b/addons/tacticalladder/functions/fnc_confirmTLdeploy.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko, Ruthberg, commy2 * Confirm tactical ladder deployment @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_ladder"]; diff --git a/addons/tacticalladder/functions/fnc_deployTL.sqf b/addons/tacticalladder/functions/fnc_deployTL.sqf index 9df416dca7..1005cf5100 100644 --- a/addons/tacticalladder/functions/fnc_deployTL.sqf +++ b/addons/tacticalladder/functions/fnc_deployTL.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko, Ruthberg * Deploy tactical ladder @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/tacticalladder/functions/fnc_handleInteractMenuOpened.sqf b/addons/tacticalladder/functions/fnc_handleInteractMenuOpened.sqf index 421329909e..54963d00ae 100644 --- a/addons/tacticalladder/functions/fnc_handleInteractMenuOpened.sqf +++ b/addons/tacticalladder/functions/fnc_handleInteractMenuOpened.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle opening of interaction menu. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/tacticalladder/functions/fnc_handleKilled.sqf b/addons/tacticalladder/functions/fnc_handleKilled.sqf index 9a03e5b4a6..a67b41368e 100644 --- a/addons/tacticalladder/functions/fnc_handleKilled.sqf +++ b/addons/tacticalladder/functions/fnc_handleKilled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle death. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/tacticalladder/functions/fnc_handlePlayerChanged.sqf b/addons/tacticalladder/functions/fnc_handlePlayerChanged.sqf index a19cfeb107..25be5fe7bf 100644 --- a/addons/tacticalladder/functions/fnc_handlePlayerChanged.sqf +++ b/addons/tacticalladder/functions/fnc_handlePlayerChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle player changes. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" if (isNull GETGVAR(ladder,objNull)) exitWith {}; diff --git a/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf index ea8156a81d..4e46b61d4e 100644 --- a/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf +++ b/addons/tacticalladder/functions/fnc_handleScrollWheel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko, Ruthberg * Handles lengthening and tilting of the ladder @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_scroll"]; diff --git a/addons/tacticalladder/functions/fnc_handleUnconscious.sqf b/addons/tacticalladder/functions/fnc_handleUnconscious.sqf index fe1bae5770..ed966a9f72 100644 --- a/addons/tacticalladder/functions/fnc_handleUnconscious.sqf +++ b/addons/tacticalladder/functions/fnc_handleUnconscious.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle unconsciousness. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/tacticalladder/functions/fnc_isLadderEmpty.sqf b/addons/tacticalladder/functions/fnc_isLadderEmpty.sqf index 8267faf3c4..5af9ecaafd 100644 --- a/addons/tacticalladder/functions/fnc_isLadderEmpty.sqf +++ b/addons/tacticalladder/functions/fnc_isLadderEmpty.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Checks if Tactical Ladder is empty (no one climbing it). @@ -13,19 +14,12 @@ * * Public: No */ -#include "script_component.hpp" params ["_ladder"]; private _unitsNearLadder = nearestObjects [_ladder, ["CAManBase"], 4]; TRACE_1("Near Ladder",_unitsNearLadder); -private _ladderEmpty = true; -{ - if (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState _x >> "ACE_isLadder") == 1) exitWith { - _ladderEmpty = false; - TRACE_1("On Ladder",_x); - }; -} forEach _unitsNearLadder; +private _CfgAnimationStates = configFile >> "CfgMovesMaleSdr" >> "States"; -_ladderEmpty +(_unitsNearLadder findIf {getNumber (_CfgAnimationStates >> animationState _x >> "ACE_isLadder") == 1}) == -1 diff --git a/addons/tacticalladder/functions/fnc_pickupTL.sqf b/addons/tacticalladder/functions/fnc_pickupTL.sqf index d8e313a17b..76cbea27d6 100644 --- a/addons/tacticalladder/functions/fnc_pickupTL.sqf +++ b/addons/tacticalladder/functions/fnc_pickupTL.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko, Ruthberg, commy2 * Pick up tactical ladder @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_ladder"]; diff --git a/addons/tacticalladder/functions/fnc_positionTL.sqf b/addons/tacticalladder/functions/fnc_positionTL.sqf index a52211884c..bbfd877c2f 100644 --- a/addons/tacticalladder/functions/fnc_positionTL.sqf +++ b/addons/tacticalladder/functions/fnc_positionTL.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko, Ruthberg * Position tactical ladder @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" #define __ANIMS ["extract_1","extract_2","extract_3","extract_4","extract_5","extract_6","extract_7","extract_8","extract_9","extract_10","extract_11"] diff --git a/addons/tacticalladder/stringtable.xml b/addons/tacticalladder/stringtable.xml index e94a292bc1..bec5b05e64 100644 --- a/addons/tacticalladder/stringtable.xml +++ b/addons/tacticalladder/stringtable.xml @@ -9,7 +9,7 @@ Escalera telescópica Echelle téléscopique Teleskopický žebřík - Telescopic Ladder + Scala Telescopica Teleszkopikus létra Escada telescópica タクティカル ラダー @@ -25,7 +25,7 @@ Despelgar escalera Déployer l'échelle Rozložit žebřík - Deploy ladder + Piazza scala Létra lerakása Implantar escada ラダーを設置 @@ -41,7 +41,7 @@ Soltar escalera Lacher l'échelle Položit žebřík - Drop ladder + Lascia scala Létra eldobása Derrubar escada ラダーを落とす @@ -56,7 +56,7 @@ Extender Разложить Prodloužit - Estendi, +Ctrl ruota + Estendi Extender Déployer 伸ばす @@ -87,7 +87,7 @@ Colocar escalera Positionner l'échelle Umístit žebřík - Position ladder + Posiziona scala Létra elhelyezése Posicionar escada ラダーの位置 @@ -103,7 +103,7 @@ Recoger escalera Prendre l'échelle Vzít žebřík - Pickup ladder + Prendi scala Létra felvétele Pegar escada ラダーを拾う diff --git a/addons/tagging/functions/fnc_addCustomTag.sqf b/addons/tagging/functions/fnc_addCustomTag.sqf index b29fa7af88..cb426493b3 100644 --- a/addons/tagging/functions/fnc_addCustomTag.sqf +++ b/addons/tagging/functions/fnc_addCustomTag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Adds custom tag. Has to be executed on one machine only. @@ -17,7 +18,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [ ["_identifier", "", [""]], @@ -48,7 +48,6 @@ if (_textures isEqualTo []) exitWith { }; _identifier = [_identifier] call CBA_fnc_removeWhitespace; -_requiredItem = toLower _requiredItem; // Add [QGVAR(applyCustomTag), [_identifier, _displayName, _requiredItem, _textures, _icon]] call CBA_fnc_globalEventJIP; diff --git a/addons/tagging/functions/fnc_addTagActions.sqf b/addons/tagging/functions/fnc_addTagActions.sqf index 82acf253ad..a5fdcd219a 100644 --- a/addons/tagging/functions/fnc_addTagActions.sqf +++ b/addons/tagging/functions/fnc_addTagActions.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Compiles tags from ACE_Tags and returns children actions. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; @@ -33,7 +33,7 @@ private _actions = []; }, { (_this select 2) params ["_unit", "", "", "_requiredItem"]; - _requiredItem in ((items _unit) apply {toLower _x}) + _requiredItem in (_unit call EFUNC(common,uniqueItems)) }, {}, [_unit, _class, _textures, _requiredItem] diff --git a/addons/tagging/functions/fnc_applyCustomTag.sqf b/addons/tagging/functions/fnc_applyCustomTag.sqf index f03230e9da..be73d85021 100644 --- a/addons/tagging/functions/fnc_applyCustomTag.sqf +++ b/addons/tagging/functions/fnc_applyCustomTag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Applies custom tag to the cache. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_identifier", "_displayName", "_requiredItem"]; @@ -25,6 +25,8 @@ params ["_identifier", "_displayName", "_requiredItem"]; if !(GVAR(cachedTags) select {_x select 0 == _identifier} isEqualTo []) exitWith { INFO_2("Tag with selected identifier already exists: %1 (%2)",_identifier,_displayName) }; +_requiredItem = configName (configFile >> "CfgWeapons" >> _requiredItem); // Convert To config case +_this set [2, _requiredItem]; GVAR(cachedTags) pushBack _this; GVAR(cachedRequiredItems) pushBackUnique _requiredItem; diff --git a/addons/tagging/functions/fnc_checkTaggable.sqf b/addons/tagging/functions/fnc_checkTaggable.sqf index e4328687a9..3a022ca2b7 100644 --- a/addons/tagging/functions/fnc_checkTaggable.sqf +++ b/addons/tagging/functions/fnc_checkTaggable.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut, esteldunedain * Checks if there is a taggable surface within 2.5m in front of the player. @@ -14,13 +15,13 @@ * Public: No */ -#include "script_component.hpp" - [_this, { params ["_unit"]; // Exit if no required item in inventory - if ((GVAR(cachedRequiredItems) arrayIntersect ((items _unit) apply {toLower _x})) isEqualTo []) exitWith {false}; + if ([_unit, { + GVAR(cachedRequiredItems) arrayIntersect (_unit call EFUNC(common,uniqueItems)) isEqualTo [] + }, _unit, QGVAR(checkRequiredItemsCache), 9999, "cba_events_loadoutEvent"] call EFUNC(common,cachedCall)) exitWith {false}; private _startPosASL = eyePos _unit; private _cameraPosASL = AGLToASL positionCameraToWorld [0, 0, 0]; @@ -37,7 +38,6 @@ // Exit if trying to tag a non static object TRACE_1("Obj:",_intersections); - // Exit if trying to tag a non static object if ((!isNull _object) && { // If the class is alright, do not exit if (_object isKindOf "Static") exitWith {false}; diff --git a/addons/tagging/functions/fnc_compileConfigTags.sqf b/addons/tagging/functions/fnc_compileConfigTags.sqf index 75e1cd2607..c9aaca9506 100644 --- a/addons/tagging/functions/fnc_compileConfigTags.sqf +++ b/addons/tagging/functions/fnc_compileConfigTags.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Compiles and caches tags from ACE_Tags config. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" { private _failure = false; @@ -25,7 +25,7 @@ _failure = true; }; - private _requiredItem = toLower (getText (_x >> "requiredItem")); + private _requiredItem = getText (_x >> "requiredItem"); if (_requiredItem == "") then { ERROR_1("Failed compiling ACE_Tags for tag: %1 - missing requiredItem",_class); _failure = true; @@ -33,6 +33,8 @@ if (!isClass (configFile >> "CfgWeapons" >> _requiredItem)) then { ERROR_2("Failed compiling ACE_Tags for tag: %1 - requiredItem %2 does not exist",_class,_requiredItem); _failure = true; + } else { + _requiredItem = configName (configFile >> "CfgWeapons" >> _requiredItem); // convert to config case }; }; diff --git a/addons/tagging/functions/fnc_createTag.sqf b/addons/tagging/functions/fnc_createTag.sqf index c579c6e05f..296fc4503f 100644 --- a/addons/tagging/functions/fnc_createTag.sqf +++ b/addons/tagging/functions/fnc_createTag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut, esteldunedain * Creates a tag and handle its destruction. Only execute on the server. @@ -18,8 +19,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_tagPosASL", "_vectorDirAndUp", "_texture", "_object", "_unit"]; TRACE_5("createTag:",_tagPosASL,_vectorDirAndUp,_texture,_object,_unit); diff --git a/addons/tagging/functions/fnc_moduleInit.sqf b/addons/tagging/functions/fnc_moduleInit.sqf index 7430ce4981..3f1048e1e5 100644 --- a/addons/tagging/functions/fnc_moduleInit.sqf +++ b/addons/tagging/functions/fnc_moduleInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Initializes the Tagging module. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "", "_activated"]; diff --git a/addons/tagging/functions/fnc_quickTag.sqf b/addons/tagging/functions/fnc_quickTag.sqf index 63a93e9946..bb672ed947 100644 --- a/addons/tagging/functions/fnc_quickTag.sqf +++ b/addons/tagging/functions/fnc_quickTag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Selects random tag and applies it. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - // Exit if Quick Tag disabled if (GVAR(quickTag) == 0) exitWith {}; @@ -49,6 +48,6 @@ if (GVAR(quickTag) == 3) then { // Tag if !(_possibleTags isEqualTo []) then { - private _availableTags = _possibleTags select {(_x select 2) in ((items _unit) apply {toLower _x})}; + private _availableTags = _possibleTags select {(_x select 2) in (_unit call EFUNC(common,uniqueItems))}; [_unit, selectRandom ((selectRandom _availableTags) select 3)] call FUNC(tag); }; diff --git a/addons/tagging/functions/fnc_tag.sqf b/addons/tagging/functions/fnc_tag.sqf index 4893037117..2f129ece28 100644 --- a/addons/tagging/functions/fnc_tag.sqf +++ b/addons/tagging/functions/fnc_tag.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut, esteldunedain * Creates a tag on a wall that is on the closest surface within 2m on front of the unit. @@ -15,8 +16,6 @@ * Public: Yes */ -#include "script_component.hpp" - params [ ["_unit", objNull, [objNull]], ["_texture", "", [""]] diff --git a/addons/tagging/functions/fnc_tagTestingThread.sqf b/addons/tagging/functions/fnc_tagTestingThread.sqf index a21cf69f2b..dcfb5e0bac 100644 --- a/addons/tagging/functions/fnc_tagTestingThread.sqf +++ b/addons/tagging/functions/fnc_tagTestingThread.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain * Checks if tags are still leaning on an object periodically. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - GVAR(tagsToTest) = GVAR(tagsToTest) select { _x params ["_tag", "_tagPosASL", "_vectorDirAndUp"]; diff --git a/addons/tagging/stringtable.xml b/addons/tagging/stringtable.xml index f9fc615d78..75de55efcc 100644 --- a/addons/tagging/stringtable.xml +++ b/addons/tagging/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/trenches/functions/fnc_canContinueDiggingTrench.sqf b/addons/trenches/functions/fnc_canContinueDiggingTrench.sqf index 2e1942d6b8..97fee957b0 100644 --- a/addons/trenches/functions/fnc_canContinueDiggingTrench.sqf +++ b/addons/trenches/functions/fnc_canContinueDiggingTrench.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SzwedzikPL * Checks if a unit can continue digging a trench @@ -14,11 +15,10 @@ * * Public: No */ -#include "script_component.hpp" params ["_trench", "_unit"]; -if !("ACE_EntrenchingTool" in items _unit) exitWith {false}; +if !("ACE_EntrenchingTool" in (_unit call EFUNC(common,uniqueItems))) exitWith {false}; if ((_trench getVariable [QGVAR(progress), 0]) >= 1) exitWith {false}; // Prevent removing/digging trench by more than one person diff --git a/addons/trenches/functions/fnc_canDigTrench.sqf b/addons/trenches/functions/fnc_canDigTrench.sqf index a99c5c6b60..d6bf05993d 100644 --- a/addons/trenches/functions/fnc_canDigTrench.sqf +++ b/addons/trenches/functions/fnc_canDigTrench.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg, commy2, esteldunedain * Checks if a unit can dig a trench. @@ -13,10 +14,9 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; -if !("ACE_EntrenchingTool" in items _unit) exitWith {false}; +if !("ACE_EntrenchingTool" in (_unit call EFUNC(common,uniqueItems))) exitWith {false}; _unit call EFUNC(common,canDig) diff --git a/addons/trenches/functions/fnc_canRemoveTrench.sqf b/addons/trenches/functions/fnc_canRemoveTrench.sqf index 4e33857637..23347fc310 100644 --- a/addons/trenches/functions/fnc_canRemoveTrench.sqf +++ b/addons/trenches/functions/fnc_canRemoveTrench.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SzwedzikPL * Checks if a unit can remove a trench @@ -14,11 +15,10 @@ * * Public: No */ -#include "script_component.hpp" params ["_trench", "_unit"]; -if !("ACE_EntrenchingTool" in items _unit) exitWith {false}; +if !("ACE_EntrenchingTool" in (_unit call EFUNC(common,uniqueItems))) exitWith {false}; // Prevent removing/digging trench by more than one person if (_trench getVariable [QGVAR(digging), false]) exitWith {false}; diff --git a/addons/trenches/functions/fnc_continueDiggingTrench.sqf b/addons/trenches/functions/fnc_continueDiggingTrench.sqf index de961c73ff..efedfa031b 100644 --- a/addons/trenches/functions/fnc_continueDiggingTrench.sqf +++ b/addons/trenches/functions/fnc_continueDiggingTrench.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support, esteldunedain * Continue process of digging trench. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_trench", "_unit"]; TRACE_2("continueDiggingTrench",_trench,_unit); diff --git a/addons/trenches/functions/fnc_handleInteractMenuOpened.sqf b/addons/trenches/functions/fnc_handleInteractMenuOpened.sqf index 5e68b6f60f..1a27e28d60 100644 --- a/addons/trenches/functions/fnc_handleInteractMenuOpened.sqf +++ b/addons/trenches/functions/fnc_handleInteractMenuOpened.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle opening of interaction menu. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/trenches/functions/fnc_handleKilled.sqf b/addons/trenches/functions/fnc_handleKilled.sqf index 6b57e20c91..1142ad0f3b 100644 --- a/addons/trenches/functions/fnc_handleKilled.sqf +++ b/addons/trenches/functions/fnc_handleKilled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle death. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/trenches/functions/fnc_handlePlayerChanged.sqf b/addons/trenches/functions/fnc_handlePlayerChanged.sqf index f4ebb8e2d5..77a152e421 100644 --- a/addons/trenches/functions/fnc_handlePlayerChanged.sqf +++ b/addons/trenches/functions/fnc_handlePlayerChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle player changes. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_newPlayer", "_oldPlayer"]; diff --git a/addons/trenches/functions/fnc_handlePlayerInventoryChanged.sqf b/addons/trenches/functions/fnc_handlePlayerInventoryChanged.sqf index 11bdef6072..682cbae81e 100644 --- a/addons/trenches/functions/fnc_handlePlayerInventoryChanged.sqf +++ b/addons/trenches/functions/fnc_handlePlayerInventoryChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle the InventoryChanged event. @@ -14,12 +15,11 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; if (_unit getVariable [QGVAR(isPlacing), false]) then { - if !("ACE_EntrenchingTool" in items _unit) then { + if !("ACE_EntrenchingTool" in (_unit call EFUNC(common,uniqueItems))) then { [_unit] call FUNC(placeCancel); }; }; diff --git a/addons/trenches/functions/fnc_handleScrollWheel.sqf b/addons/trenches/functions/fnc_handleScrollWheel.sqf index 5dbe661417..242b79f1f0 100644 --- a/addons/trenches/functions/fnc_handleScrollWheel.sqf +++ b/addons/trenches/functions/fnc_handleScrollWheel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, Ruthberg * Handles sandbag rotation @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (GVAR(digPFH) == -1) exitWith {false}; diff --git a/addons/trenches/functions/fnc_handleUnconscious.sqf b/addons/trenches/functions/fnc_handleUnconscious.sqf index c1f282d6c3..6f600cecdf 100644 --- a/addons/trenches/functions/fnc_handleUnconscious.sqf +++ b/addons/trenches/functions/fnc_handleUnconscious.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle unconsciousness. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/trenches/functions/fnc_placeCancel.sqf b/addons/trenches/functions/fnc_placeCancel.sqf index 1eaf7298a1..36bf5c8023 100644 --- a/addons/trenches/functions/fnc_placeCancel.sqf +++ b/addons/trenches/functions/fnc_placeCancel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support * Cancels trench dig @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_key"]; diff --git a/addons/trenches/functions/fnc_placeConfirm.sqf b/addons/trenches/functions/fnc_placeConfirm.sqf index 08c774d8c9..25d675d09b 100644 --- a/addons/trenches/functions/fnc_placeConfirm.sqf +++ b/addons/trenches/functions/fnc_placeConfirm.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support and esteldunedain * Confirms trench dig @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/trenches/functions/fnc_placeTrench.sqf b/addons/trenches/functions/fnc_placeTrench.sqf index 94826fb346..0f52786561 100644 --- a/addons/trenches/functions/fnc_placeTrench.sqf +++ b/addons/trenches/functions/fnc_placeTrench.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support, esteldunedain * Starts the place process for trench. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_trenchClass"]; diff --git a/addons/trenches/functions/fnc_removeTrench.sqf b/addons/trenches/functions/fnc_removeTrench.sqf index d22db5d27e..3a549eb16f 100644 --- a/addons/trenches/functions/fnc_removeTrench.sqf +++ b/addons/trenches/functions/fnc_removeTrench.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support and esteldunedain * Removes trench @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_trench", "_unit"]; TRACE_2("removeTrench",_trench,_unit); diff --git a/addons/trenches/functions/fnc_setTrenchPlacement.sqf b/addons/trenches/functions/fnc_setTrenchPlacement.sqf index 49c1efdaae..c314914efe 100644 --- a/addons/trenches/functions/fnc_setTrenchPlacement.sqf +++ b/addons/trenches/functions/fnc_setTrenchPlacement.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, Ruthberg, edited by commy2 for better MP and eventual AI support and esteldunedain * Sets trench placement @@ -18,7 +19,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_trench", "_trenchId", "_pos", "_vecDirAndUp", "_progress"]; diff --git a/addons/trenches/stringtable.xml b/addons/trenches/stringtable.xml index a0413a3346..9e0c1364da 100644 --- a/addons/trenches/stringtable.xml +++ b/addons/trenches/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/tripod/functions/fnc_adjust.sqf b/addons/tripod/functions/fnc_adjust.sqf index b81f9fa961..42af65be74 100644 --- a/addons/tripod/functions/fnc_adjust.sqf +++ b/addons/tripod/functions/fnc_adjust.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Adjust tripod height @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_tripod"]; diff --git a/addons/tripod/functions/fnc_handleInteractMenuOpened.sqf b/addons/tripod/functions/fnc_handleInteractMenuOpened.sqf index 014eed55d4..0103c0a590 100644 --- a/addons/tripod/functions/fnc_handleInteractMenuOpened.sqf +++ b/addons/tripod/functions/fnc_handleInteractMenuOpened.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle opening of interaction menu. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/tripod/functions/fnc_handleKilled.sqf b/addons/tripod/functions/fnc_handleKilled.sqf index 90dd388617..1ce7ce5e0b 100644 --- a/addons/tripod/functions/fnc_handleKilled.sqf +++ b/addons/tripod/functions/fnc_handleKilled.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle death. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/tripod/functions/fnc_handlePlayerChanged.sqf b/addons/tripod/functions/fnc_handlePlayerChanged.sqf index 3d37b7949f..506699c293 100644 --- a/addons/tripod/functions/fnc_handlePlayerChanged.sqf +++ b/addons/tripod/functions/fnc_handlePlayerChanged.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle player changes. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_newPlayer", "_oldPlayer"]; diff --git a/addons/tripod/functions/fnc_handleScrollWheel.sqf b/addons/tripod/functions/fnc_handleScrollWheel.sqf index 1589bbc476..d1cc67272c 100644 --- a/addons/tripod/functions/fnc_handleScrollWheel.sqf +++ b/addons/tripod/functions/fnc_handleScrollWheel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Garth 'L-H' de Wet, Ruthberg * Handles sandbag rotation @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_scroll"]; diff --git a/addons/tripod/functions/fnc_handleUnconscious.sqf b/addons/tripod/functions/fnc_handleUnconscious.sqf index 01558d6389..632be51e0d 100644 --- a/addons/tripod/functions/fnc_handleUnconscious.sqf +++ b/addons/tripod/functions/fnc_handleUnconscious.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handle unconsciousness. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/tripod/functions/fnc_pickup.sqf b/addons/tripod/functions/fnc_pickup.sqf index dc8b990515..931efaddfa 100644 --- a/addons/tripod/functions/fnc_pickup.sqf +++ b/addons/tripod/functions/fnc_pickup.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko, Ruthberg * Pick up tripod @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_tripod"]; diff --git a/addons/tripod/functions/fnc_place.sqf b/addons/tripod/functions/fnc_place.sqf index 0b63daeeec..c903c0148d 100644 --- a/addons/tripod/functions/fnc_place.sqf +++ b/addons/tripod/functions/fnc_place.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Rocko, Ruthberg * Place down tripod @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_tripodClass"]; diff --git a/addons/tripod/stringtable.xml b/addons/tripod/stringtable.xml index a63bda06b0..daea7e95fd 100644 --- a/addons/tripod/stringtable.xml +++ b/addons/tripod/stringtable.xml @@ -91,7 +91,7 @@ régler szabályzás подстройка - aggiusta + regola 調節 조절 调整 diff --git a/addons/ui/functions/fnc_compileConfigUI.sqf b/addons/ui/functions/fnc_compileConfigUI.sqf index 3de21d8ff4..0baaa8ca5c 100644 --- a/addons/ui/functions/fnc_compileConfigUI.sqf +++ b/addons/ui/functions/fnc_compileConfigUI.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Compiles and caches UI from ACE_UI config. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" { private _failure = false; diff --git a/addons/ui/functions/fnc_moduleInit.sqf b/addons/ui/functions/fnc_moduleInit.sqf index a8328c653d..b1295a6c10 100644 --- a/addons/ui/functions/fnc_moduleInit.sqf +++ b/addons/ui/functions/fnc_moduleInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Initializes the UI module. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/ui/functions/fnc_setAdvancedElement.sqf b/addons/ui/functions/fnc_setAdvancedElement.sqf index 6e931894e6..0b5a174c5a 100644 --- a/addons/ui/functions/fnc_setAdvancedElement.sqf +++ b/addons/ui/functions/fnc_setAdvancedElement.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Sets advanced visible element of the UI using displays and controls. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_element", "_show", ["_showHint", false, [true]], ["_force", false, [true]] ]; diff --git a/addons/ui/functions/fnc_setElementVisibility.sqf b/addons/ui/functions/fnc_setElementVisibility.sqf index 4cbdf1a0bc..f6c4525828 100644 --- a/addons/ui/functions/fnc_setElementVisibility.sqf +++ b/addons/ui/functions/fnc_setElementVisibility.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Setter for toggling advanced element visibility. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" params [ ["_source", "", [""]], diff --git a/addons/ui/functions/fnc_setElements.sqf b/addons/ui/functions/fnc_setElements.sqf index 1d296ba7d8..8e7da0eb3d 100644 --- a/addons/ui/functions/fnc_setElements.sqf +++ b/addons/ui/functions/fnc_setElements.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Sets basic visible elements of the UI using showHUD setter. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params [["_showHint", false]]; diff --git a/addons/ui/stringtable.xml b/addons/ui/stringtable.xml index 11013cf28b..06b253238b 100644 --- a/addons/ui/stringtable.xml +++ b/addons/ui/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/vector/functions/fnc_adjustBrightness.sqf b/addons/vector/functions/fnc_adjustBrightness.sqf index b31cc5361c..2cf2d5a923 100644 --- a/addons/vector/functions/fnc_adjustBrightness.sqf +++ b/addons/vector/functions/fnc_adjustBrightness.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); diff --git a/addons/vector/functions/fnc_clearDisplay.sqf b/addons/vector/functions/fnc_clearDisplay.sqf index 3ec3ef7eb6..8d4578a2da 100644 --- a/addons/vector/functions/fnc_clearDisplay.sqf +++ b/addons/vector/functions/fnc_clearDisplay.sqf @@ -1,21 +1,20 @@ +#include "script_component.hpp" /* * Author: commy2 * Clears the vectors control items. * * Arguments: - * 0: String + * 0: "azimuth" or "distance" * * Return Value: * None * * Example: - * [5] call ace_vector_fnc_clearDisplay + * ["azimuth"] call ace_vector_fnc_clearDisplay * * Public: No */ -#include "script_component.hpp" - disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); diff --git a/addons/vector/functions/fnc_convertToTexturesDegree.sqf b/addons/vector/functions/fnc_convertToTexturesDegree.sqf index 0a4fc349d3..17754244f1 100644 --- a/addons/vector/functions/fnc_convertToTexturesDegree.sqf +++ b/addons/vector/functions/fnc_convertToTexturesDegree.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * converts azimuth into array of textures for the vectors scripted info control @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_number"]; if (GVAR(useMil)) then { diff --git a/addons/vector/functions/fnc_convertToTexturesDistance.sqf b/addons/vector/functions/fnc_convertToTexturesDistance.sqf index 0140e45a2e..cb2f1ba990 100644 --- a/addons/vector/functions/fnc_convertToTexturesDistance.sqf +++ b/addons/vector/functions/fnc_convertToTexturesDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * converts rangefinder distance into array of textures for the vectors scripted info control @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_number"]; _number = round _number; diff --git a/addons/vector/functions/fnc_convertToTexturesFOS.sqf b/addons/vector/functions/fnc_convertToTexturesFOS.sqf index 58ce94547b..eb9e6f840c 100644 --- a/addons/vector/functions/fnc_convertToTexturesFOS.sqf +++ b/addons/vector/functions/fnc_convertToTexturesFOS.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * converts rangefinder distance into array of textures for the vectors scripted info control @@ -14,8 +15,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_number", "_coordinate"]; _number = round (_number select _coordinate); diff --git a/addons/vector/functions/fnc_dataTransfer.sqf b/addons/vector/functions/fnc_dataTransfer.sqf index 4a91a0636d..b50a823be9 100644 --- a/addons/vector/functions/fnc_dataTransfer.sqf +++ b/addons/vector/functions/fnc_dataTransfer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Data transfer over a connected cable. Based on page 14 of pdf. @@ -13,11 +14,10 @@ * * Public: No */ -#include "script_component.hpp" private _distance = call FUNC(getDistance); private _direction = call FUNC(getDirection); -private _azimuth = _direction select 0; -private _inclination = _direction select 1; +_direction params ["_azimuth", "_inclination"]; + //Send Data to connected GPS [QGVAR(rangefinderData), [_distance, _azimuth, _inclination]] call CBA_fnc_localEvent; diff --git a/addons/vector/functions/fnc_getDirection.sqf b/addons/vector/functions/fnc_getDirection.sqf index 4b67cfed28..1103a55458 100644 --- a/addons/vector/functions/fnc_getDirection.sqf +++ b/addons/vector/functions/fnc_getDirection.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,14 +15,9 @@ * Public: No */ -// by commy2 -#include "script_component.hpp" - /* -private "_dlgVector"; - disableSerialization; -_dlgVector = GETUVAR(ACE_dlgVector, displayNull); +private _dlgVector = GETUVAR(ACE_dlgVector, displayNull); [ round parseNumber ctrlText (_dlgVector displayCtrl 156), diff --git a/addons/vector/functions/fnc_getDistance.sqf b/addons/vector/functions/fnc_getDistance.sqf index 7b62b5727b..8c38cc619f 100644 --- a/addons/vector/functions/fnc_getDistance.sqf +++ b/addons/vector/functions/fnc_getDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - #define MIN_DISTANCE 10 #define MAX_DISTANCE [6000, 9000] select GVAR(useFeet) diff --git a/addons/vector/functions/fnc_getFallOfShot.sqf b/addons/vector/functions/fnc_getFallOfShot.sqf index db906ac660..7fbaa6ad98 100644 --- a/addons/vector/functions/fnc_getFallOfShot.sqf +++ b/addons/vector/functions/fnc_getFallOfShot.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,16 +15,12 @@ * Public: No */ -#include "script_component.hpp" -private _distanceP1 = GVAR(pData) select 0; -private _directionP1 = GVAR(pData) select 1; -private _azimuthP1 = _directionP1 select 0; -private _inclinationP1 = _directionP1 select 1; +GVAR(pData) params ["_distanceP1", "_directionP1"]; +_directionP1 params ["_azimuthP1", "_inclinationP1"]; private _distanceP2 = call FUNC(getDistance); private _directionP2 = call FUNC(getDirection); -private _azimuthP2 = _directionP2 select 0; -private _inclinationP2 = _directionP2 select 1; +_directionP2 params ["_azimuthP2", "_inclinationP2"]; private _abscissa = _distanceP1 * sin (_azimuthP1 - _azimuthP2); private _ordinate = _distanceP1 * cos (_inclinationP1 - _inclinationP2) - _distanceP2 * cos (_azimuthP1 - _azimuthP2); diff --git a/addons/vector/functions/fnc_getHeightDistance.sqf b/addons/vector/functions/fnc_getHeightDistance.sqf index 003aefea51..00bd888cdf 100644 --- a/addons/vector/functions/fnc_getHeightDistance.sqf +++ b/addons/vector/functions/fnc_getHeightDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,13 +15,10 @@ * Public: No */ -#include "script_component.hpp" - private _distance = call FUNC(getDistance); private _direction = call FUNC(getDirection); -private _azimuth = _direction select 0; -private _inclination = _direction select 1; +_direction params ["_azimuth", "_inclination"]; if (_distance < -999) exitWith { [-1000, -1000] // return diff --git a/addons/vector/functions/fnc_getRelativeAzimuthDistance.sqf b/addons/vector/functions/fnc_getRelativeAzimuthDistance.sqf index ce6716e4d3..33d9a07dc0 100644 --- a/addons/vector/functions/fnc_getRelativeAzimuthDistance.sqf +++ b/addons/vector/functions/fnc_getRelativeAzimuthDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,17 +15,12 @@ * Public: No */ -#include "script_component.hpp" - -private _distanceP1 = GVAR(pData) select 0; -private _directionP1 = GVAR(pData) select 1; -private _azimuthP1 = _directionP1 select 0; -private _inclinationP1 = _directionP1 select 1; +GVAR(pData) params ["_distanceP1", "_directionP1"]; +_directionP1 params ["_azimuthP1", "_inclinationP1"]; private _distanceP2 = call FUNC(getDistance); private _directionP2 = call FUNC(getDirection); -private _azimuthP2 = _directionP2 select 0; -private _inclinationP2 = _directionP2 select 1; +_directionP2 params ["_azimuthP2", "_inclinationP2"]; private _relDirection = sqrt ((_azimuthP1 - _azimuthP2) ^ 2 + (_inclinationP1 - _inclinationP2) ^ 2); private _relDistance = sqrt (_distanceP1 ^ 2 + _distanceP2 ^ 2 - 2 * _distanceP1 * _distanceP2 * cos _relDirection); diff --git a/addons/vector/functions/fnc_getRelativeDistance.sqf b/addons/vector/functions/fnc_getRelativeDistance.sqf index f6815ea552..bbe9ca1672 100644 --- a/addons/vector/functions/fnc_getRelativeDistance.sqf +++ b/addons/vector/functions/fnc_getRelativeDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,17 +15,11 @@ * Public: No */ -#include "script_component.hpp" - -private _distanceP1 = GVAR(pData) select 0; -private _directionP1 = GVAR(pData) select 1; -private _azimuthP1 = _directionP1 select 0; -private _inclinationP1 = _directionP1 select 1; - +GVAR(pData) params ["_distanceP1", "_directionP1"]; +_directionP1 params ["_azimuthP1", "_inclinationP1"]; private _distanceP2 = call FUNC(getDistance); private _directionP2 = call FUNC(getDirection); -private _azimuthP2 = _directionP2 select 0; -private _inclinationP2 = _directionP2 select 1; +_directionP2 params ["_azimuthP2", "_inclinationP2"]; private _relDirection = sqrt ((_azimuthP1 - _azimuthP2) ^ 2 + (_inclinationP1 - _inclinationP2) ^ 2); diff --git a/addons/vector/functions/fnc_getRelativeHeightLength.sqf b/addons/vector/functions/fnc_getRelativeHeightLength.sqf index 99cb828232..2bd6e4795c 100644 --- a/addons/vector/functions/fnc_getRelativeHeightLength.sqf +++ b/addons/vector/functions/fnc_getRelativeHeightLength.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - private _distanceP1 = GVAR(pData) select 0; private _directionP1 = GVAR(pData) select 1; private _azimuthP1 = _directionP1 select 0; diff --git a/addons/vector/functions/fnc_illuminate.sqf b/addons/vector/functions/fnc_illuminate.sqf index 8ecc10690f..999fc5c29a 100644 --- a/addons/vector/functions/fnc_illuminate.sqf +++ b/addons/vector/functions/fnc_illuminate.sqf @@ -1,21 +1,20 @@ +#include "script_component.hpp" /* * Author: commy2 * * * Arguments: - * 0: String + * 0: Enable illumination * * Return Value: * None * * Example: - * ["5"] call ace_vector_fnc_illuminate + * [true] call ace_vector_fnc_illuminate * * Public: No */ -#include "script_component.hpp" - disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); diff --git a/addons/vector/functions/fnc_nextMode.sqf b/addons/vector/functions/fnc_nextMode.sqf index 8e6d596f58..cd00b4977d 100644 --- a/addons/vector/functions/fnc_nextMode.sqf +++ b/addons/vector/functions/fnc_nextMode.sqf @@ -1,21 +1,20 @@ +#include "script_component.hpp" /* * Author: commy2 * * * Arguments: - * 0: String + * 0: Name of mode ("settings", "config") * * Return Value: * Array * * Example: - * ["5"] call ace_vector_fnc_nextMode + * ["settings"] call ace_vector_fnc_nextMode * * Public: No */ -#include "script_component.hpp" - switch (_this select 0) do { case ("settings"): { switch (GVAR(configTemp)) do { diff --git a/addons/vector/functions/fnc_onKeyDown.sqf b/addons/vector/functions/fnc_onKeyDown.sqf index 194a3b74af..a9c6b90b2d 100644 --- a/addons/vector/functions/fnc_onKeyDown.sqf +++ b/addons/vector/functions/fnc_onKeyDown.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handles pressing the special vector keys. @@ -9,13 +10,11 @@ * None * * Example: - * ["5"] call ace_vector_fnc_onKeyDown + * ["azimuth"] call ace_vector_fnc_onKeyDown * * Public: No */ -#include "script_component.hpp" - // set vector config settings switch (GVAR(modeReticle)) do { case (0): { diff --git a/addons/vector/functions/fnc_onKeyHold.sqf b/addons/vector/functions/fnc_onKeyHold.sqf index fdfa22d2b5..cefdc3236b 100644 --- a/addons/vector/functions/fnc_onKeyHold.sqf +++ b/addons/vector/functions/fnc_onKeyHold.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * PFH executed while holding a vector key down. @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - if (!((currentWeapon ACE_player) isKindOf ["ACE_Vector", configFile >> "CfgWeapons"])) exitWith { [_this select 1] call CBA_fnc_removePerFrameHandler; diff --git a/addons/vector/functions/fnc_onKeyUp.sqf b/addons/vector/functions/fnc_onKeyUp.sqf index 6896026b50..2e315d7c0e 100644 --- a/addons/vector/functions/fnc_onKeyUp.sqf +++ b/addons/vector/functions/fnc_onKeyUp.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Handles releasing the special vector keys. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - private _fnc_setPFH = { if (GVAR(holdKeyHandler) > -1) then { [GVAR(holdKeyHandler)] call CBA_fnc_removePerFrameHandler; diff --git a/addons/vector/functions/fnc_showAzimuth.sqf b/addons/vector/functions/fnc_showAzimuth.sqf index 59166e1f4c..4a0854f3d5 100644 --- a/addons/vector/functions/fnc_showAzimuth.sqf +++ b/addons/vector/functions/fnc_showAzimuth.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); diff --git a/addons/vector/functions/fnc_showAzimuthInclination.sqf b/addons/vector/functions/fnc_showAzimuthInclination.sqf index d6b8740e2a..15e206fbbd 100644 --- a/addons/vector/functions/fnc_showAzimuthInclination.sqf +++ b/addons/vector/functions/fnc_showAzimuthInclination.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); diff --git a/addons/vector/functions/fnc_showCenter.sqf b/addons/vector/functions/fnc_showCenter.sqf index 8142a2c3be..fef128240f 100644 --- a/addons/vector/functions/fnc_showCenter.sqf +++ b/addons/vector/functions/fnc_showCenter.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Shows or hides the vectors center square thingy. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - ((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1301) ctrlSetText (["", QPATHTOF(rsc\vector_center.paa)] select (_this select 0)); [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showDistance.sqf b/addons/vector/functions/fnc_showDistance.sqf index ffabeb9824..447622355c 100644 --- a/addons/vector/functions/fnc_showDistance.sqf +++ b/addons/vector/functions/fnc_showDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); diff --git a/addons/vector/functions/fnc_showFallOfShot.sqf b/addons/vector/functions/fnc_showFallOfShot.sqf index 459f1dcaed..3df9fa8357 100644 --- a/addons/vector/functions/fnc_showFallOfShot.sqf +++ b/addons/vector/functions/fnc_showFallOfShot.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - GVAR(FOSState) = _this select 0; disableSerialization; diff --git a/addons/vector/functions/fnc_showHeightDistance.sqf b/addons/vector/functions/fnc_showHeightDistance.sqf index cbe0b7b86d..7c8c0cc02e 100644 --- a/addons/vector/functions/fnc_showHeightDistance.sqf +++ b/addons/vector/functions/fnc_showHeightDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); diff --git a/addons/vector/functions/fnc_showP1.sqf b/addons/vector/functions/fnc_showP1.sqf index 3975399bcb..2d587e03d1 100644 --- a/addons/vector/functions/fnc_showP1.sqf +++ b/addons/vector/functions/fnc_showP1.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Shows or hides the 1-P text line. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); diff --git a/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf b/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf index a9426be05c..82f1f7eaf6 100644 --- a/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf +++ b/addons/vector/functions/fnc_showRelativeAzimuthDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); diff --git a/addons/vector/functions/fnc_showRelativeDistance.sqf b/addons/vector/functions/fnc_showRelativeDistance.sqf index e0853efa03..0bd4d23ec0 100644 --- a/addons/vector/functions/fnc_showRelativeDistance.sqf +++ b/addons/vector/functions/fnc_showRelativeDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); diff --git a/addons/vector/functions/fnc_showRelativeHeightLength.sqf b/addons/vector/functions/fnc_showRelativeHeightLength.sqf index 13bd8061e1..fe9823e170 100644 --- a/addons/vector/functions/fnc_showRelativeHeightLength.sqf +++ b/addons/vector/functions/fnc_showRelativeHeightLength.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); diff --git a/addons/vector/functions/fnc_showReticle.sqf b/addons/vector/functions/fnc_showReticle.sqf index aeecfc5ef3..5fd1729c4f 100644 --- a/addons/vector/functions/fnc_showReticle.sqf +++ b/addons/vector/functions/fnc_showReticle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Shows or hides the electronic reticle. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - ((GETUVAR(ACE_dlgVector,displayNull)) displayCtrl 1302) ctrlSetText (["", QPATHTOF(rsc\vector_crosshair.paa)] select (_this select 0)); [GVAR(illuminate)] call FUNC(illuminate); diff --git a/addons/vector/functions/fnc_showText.sqf b/addons/vector/functions/fnc_showText.sqf index 66628d8d44..a8556e7a58 100644 --- a/addons/vector/functions/fnc_showText.sqf +++ b/addons/vector/functions/fnc_showText.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - disableSerialization; private _dlgVector = GETUVAR(ACE_dlgVector,displayNull); diff --git a/addons/vehiclelock/CfgEventHandlers.hpp b/addons/vehiclelock/CfgEventHandlers.hpp index 712cc2be1c..becf395052 100644 --- a/addons/vehiclelock/CfgEventHandlers.hpp +++ b/addons/vehiclelock/CfgEventHandlers.hpp @@ -16,21 +16,3 @@ class Extended_PostInit_EventHandlers { init = QUOTE(call COMPILE_FILE(XEH_postInit)); }; }; - -class Extended_InitPost_EventHandlers { - class Car { - class ADDON { - serverInit = QUOTE(_this call FUNC(handleVehicleInitPost)); - }; - }; - class Tank { - class ADDON { - serverInit = QUOTE(_this call FUNC(handleVehicleInitPost)); - }; - }; - class Helicopter { - class ADDON { - serverInit = QUOTE(_this call FUNC(handleVehicleInitPost)); - }; - }; -}; diff --git a/addons/vehiclelock/CfgVehicles.hpp b/addons/vehiclelock/CfgVehicles.hpp index 84c4b67379..62a6a525fe 100644 --- a/addons/vehiclelock/CfgVehicles.hpp +++ b/addons/vehiclelock/CfgVehicles.hpp @@ -58,6 +58,9 @@ class CfgVehicles { class Helicopter: Air { MACRO_LOCK_ACTIONS }; + class Plane: Air { + MACRO_LOCK_ACTIONS + }; class Motorcycle: LandVehicle { MACRO_LOCK_ACTIONS }; diff --git a/addons/vehiclelock/XEH_postInit.sqf b/addons/vehiclelock/XEH_postInit.sqf index 3888a6e87a..64bd4fd642 100644 --- a/addons/vehiclelock/XEH_postInit.sqf +++ b/addons/vehiclelock/XEH_postInit.sqf @@ -4,12 +4,18 @@ [QGVAR(setupCustomKey), {_this call FUNC(serverSetupCustomKeyEH)}] call CBA_fnc_addEventHandler; [QGVAR(setVehicleLock), {_this call FUNC(setVehicleLockEH)}] call CBA_fnc_addEventHandler; -if (!hasInterface) exitwith {}; - ["ace_settingsInitialized", { - TRACE_1("SettingsInitialized eh",GVAR(LockVehicleInventory)); + TRACE_2("SettingsInitialized eh",GVAR(LockVehicleInventory),GVAR(VehicleStartingLockState)); - if (GVAR(LockVehicleInventory)) then { - ["CAManBase", "InventoryOpened", {_this call FUNC(onOpenInventory);}] call CBA_fnc_addClassEventHandler; + if (hasInterface && {GVAR(LockVehicleInventory)}) then { + ["CAManBase", "InventoryOpened", {_this call FUNC(onOpenInventory)}] call CBA_fnc_addClassEventHandler; + }; + if (isServer && {GVAR(VehicleStartingLockState) != -1}) then { + [{ + TRACE_1("adding lock handler",GVAR(VehicleStartingLockState)); + { + [_x, "initpost", LINKFUNC(handleVehicleInitPost), true, [], true] call CBA_fnc_addClassEventHandler; + } forEach ["Car", "Tank", "Air"]; + }, [], 0.25] call CBA_fnc_waitAndExecute; }; }] call CBA_fnc_addEventHandler; diff --git a/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf b/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf index c7408bf5f5..e88105e398 100644 --- a/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf +++ b/addons/vehiclelock/functions/fnc_addKeyForVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Adds a key to a unit that will open a vehicle @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!params [["_unit", objNull, [objNull]], ["_veh", objNull, [objNull]], ["_useCustom", false, [false]]]) exitWith { ERROR("Input wrong type"); diff --git a/addons/vehiclelock/functions/fnc_getVehicleSideKey.sqf b/addons/vehiclelock/functions/fnc_getVehicleSideKey.sqf index 6642b12f8d..5e78e55edb 100644 --- a/addons/vehiclelock/functions/fnc_getVehicleSideKey.sqf +++ b/addons/vehiclelock/functions/fnc_getVehicleSideKey.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Returns the side specifc key for a vehicle @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_veh"]; TRACE_1("params",_veh); diff --git a/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf b/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf index 652cecadb8..eb0ecb21a7 100644 --- a/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf +++ b/addons/vehiclelock/functions/fnc_handleVehicleInitPost.sqf @@ -1,7 +1,8 @@ +#include "script_component.hpp" /* * Author: PabstMirror * For every lockable vehicle, sets the starting lock state to a sane value. - * Only run if the InitModule is placed. + * Only run if the enabled via settings * * Arguments: * 0: Vehicle @@ -14,30 +15,19 @@ * * Public: No */ -#include "script_component.hpp" - -if (!isServer) exitWith {}; params ["_vehicle"]; -TRACE_1("params",_vehicle); +TRACE_1("handleVehicleInitPost",_vehicle); -[{ - //If the module wasn't placed, just exit (needs to be in wait because objectInitEH is before moduleInit) - if (GVAR(VehicleStartingLockState) == -1) exitWith {}; - - params ["_vehicle"]; - - if ((_vehicle isKindOf "Car") || {_vehicle isKindOf "Tank"} || {_vehicle isKindOf "Helicopter"}) then { - //set lock state (eliminates the ambigious 1-"Default" and 3-"Locked for Player" states) - private _lock = switch (GVAR(VehicleStartingLockState)) do { - case (0): { (locked _vehicle) in [2, 3] }; - case (1): { true }; - case (2): { false }; - }; - if ((_lock && {(locked _vehicle) != 2}) || {!_lock && {(locked _vehicle) != 0}}) then { - TRACE_3("Setting Lock State",_lock,(typeOf _vehicle),_vehicle); - [QGVAR(SetVehicleLock), [_vehicle, _lock], [_vehicle]] call CBA_fnc_targetEvent; - }; +if (alive _vehicle) then { + //set lock state (eliminates the ambigious 1-"Default" and 3-"Locked for Player" states) + private _lock = switch (GVAR(VehicleStartingLockState)) do { + case 0: {locked _vehicle in [2, 3]}; + case 1: {true}; + case 2: {false}; }; - //Delay call until mission start (so everyone has the eventHandler's installed) -}, [_vehicle], 0.25] call CBA_fnc_waitAndExecute; + if ((_lock && {locked _vehicle != 2}) || {!_lock && {locked _vehicle != 0}}) then { + TRACE_3("Setting Lock State",_lock,typeOf _vehicle,_vehicle); + [QGVAR(SetVehicleLock), [_vehicle, _lock], [_vehicle]] call CBA_fnc_targetEvent; + }; +}; diff --git a/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf b/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf index bc566794fe..bda8f67b65 100644 --- a/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf +++ b/addons/vehiclelock/functions/fnc_hasKeyForVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Returns if user has a valid key for the vehicle @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_veh"]; TRACE_2("params",_unit,_veh); @@ -22,19 +22,16 @@ TRACE_2("params",_unit,_veh); if (isNull _unit) exitWith {ERROR("null unit"); false}; if (isNull _veh) exitWith {ERROR("null vehicle"); false}; -private _returnValue = false; - //Master can open anything "no matter what" -if ("ACE_key_master" in (items _unit)) then {_returnValue = true}; +private _items = _unit call EFUNC(common,uniqueItems); +if ("ACE_key_master" in _items) exitWith {true}; //Check side key private _sideKeyName = [_veh] call FUNC(getVehicleSideKey); -if (_sideKeyName in (items _unit)) then {_returnValue = true}; +if (_sideKeyName in _items) exitWith {true}; //Check custom keys private _customKeys = _veh getVariable [QGVAR(customKeys), []]; -{ - if (_x in (magazinesDetail _unit)) then {_returnValue = true;}; -} forEach _customKeys; +private _magazines = magazinesDetail _unit; -_returnValue +(_customKeys findIf {_x in _magazines}) != -1 diff --git a/addons/vehiclelock/functions/fnc_lockpick.sqf b/addons/vehiclelock/functions/fnc_lockpick.sqf index a08289454a..f106216c89 100644 --- a/addons/vehiclelock/functions/fnc_lockpick.sqf +++ b/addons/vehiclelock/functions/fnc_lockpick.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles lockpick functionality. Three different functions: @@ -18,7 +19,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_veh", "_funcType"]; TRACE_3("params",_unit,_veh,_funcType); @@ -30,13 +30,13 @@ if (isNull _veh) exitWith {ERROR("null vehicle"); false}; if ((locked _veh) == 0) exitWith {false}; //need lockpick item -if (!("ACE_key_lockpick" in (items _unit))) exitWith {false}; +if !("ACE_key_lockpick" in (_unit call EFUNC(common,uniqueItems))) exitWith {false}; -private _vehLockpickStrenth = _veh getVariable[QGVAR(lockpickStrength), GVAR(DefaultLockpickStrength)]; -if (!(_vehLockpickStrenth isEqualType 0)) exitWith {ERROR("ACE_vehicleLock_LockpickStrength invalid"); false}; +private _vehLockpickStrength = _veh getVariable[QGVAR(lockpickStrength), GVAR(DefaultLockpickStrength)]; +if (!(_vehLockpickStrength isEqualType 0)) exitWith {ERROR("ACE_vehicleLock_LockpickStrength invalid"); false}; //-1 indicates unpickable lock -if (_vehLockpickStrenth < 0) exitWith {false}; +if (_vehLockpickStrength < 0) exitWith {false}; //Condition check for progressBar private _condition = { @@ -53,7 +53,7 @@ switch (_funcType) do { _returnValue = !([_unit, _veh] call FUNC(hasKeyForVehicle)) && {(locked _veh) in [2, 3]}; }; case "startLockpick": { - [_vehLockpickStrenth, [_unit, _veh, "finishLockpick"], {(_this select 0) call FUNC(lockpick)}, {}, (localize LSTRING(Action_LockpickInUse)), _condition, ["isNotInside", "isNotSwimming"]] call EFUNC(common,progressBar); + [_vehLockpickStrength, [_unit, _veh, "finishLockpick"], {(_this select 0) call FUNC(lockpick)}, {}, (localize LSTRING(Action_LockpickInUse)), _condition, ["isNotInside", "isNotSwimming"]] call EFUNC(common,progressBar); }; case "finishLockpick": { [QGVAR(setVehicleLock), [_veh, false], [_veh]] call CBA_fnc_targetEvent; diff --git a/addons/vehiclelock/functions/fnc_moduleInit.sqf b/addons/vehiclelock/functions/fnc_moduleInit.sqf index cf9d1eb79c..16e81e85ea 100644 --- a/addons/vehiclelock/functions/fnc_moduleInit.sqf +++ b/addons/vehiclelock/functions/fnc_moduleInit.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Function for setup module. Sets default lockpick strength and default lock state. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_syncedUnits", "_activated"]; TRACE_3("params",_logic,_syncedUnits,_activated); diff --git a/addons/vehiclelock/functions/fnc_moduleSync.sqf b/addons/vehiclelock/functions/fnc_moduleSync.sqf index 569f4a0691..5aede3f620 100644 --- a/addons/vehiclelock/functions/fnc_moduleSync.sqf +++ b/addons/vehiclelock/functions/fnc_moduleSync.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Function for sync module. Assigns keys for all synced vehicles to any players that are synced. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" if (!isServer) exitWith {}; @@ -27,14 +27,13 @@ if !(_activated) exitWith {WARNING("Vehicle Lock Sync Module - placed but not ac [{ params ["_syncedObjects"]; - private _listOfVehicles = []; - { - if ((_x isKindOf "Car") || (_x isKindOf "Tank") || (_x isKindOf "Helicopter")) then { - _listOfVehicles pushBack _x; - }; - } forEach _syncedObjects; + private _listOfVehicles = _syncedObjects select { + private _object = _x; + #define CLASSNAMES ["Car", "Tank", "Air"] + IS_KIND_OF_ANY(_object,CLASSNAMES) + }; - if ((count _listOfVehicles) == 0) exitWith { //Verbose error for mission makers (only shows on server) + if (_listOfVehicles isEqualTo []) exitWith { //Verbose error for mission makers (only shows on server) ["ACE_VehicleLock_fnc_moduleSync: no vehicles synced"] call BIS_fnc_error; }; diff --git a/addons/vehiclelock/functions/fnc_onOpenInventory.sqf b/addons/vehiclelock/functions/fnc_onOpenInventory.sqf index fb8972ef1d..92cbe0144d 100644 --- a/addons/vehiclelock/functions/fnc_onOpenInventory.sqf +++ b/addons/vehiclelock/functions/fnc_onOpenInventory.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Handles the inventory opening. @@ -14,19 +15,18 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_container"]; TRACE_2("params",_unit,_container); //Only check for player: -if (_unit != ace_player) exitWith {}; +if (_unit != ACE_player) exitWith {}; if (GVAR(LockVehicleInventory) && //if setting not enabled - {(vehicle ace_player) == ace_player} && //Player dismounted - {(_container isKindOf "Car") || (_container isKindOf "Tank") || (_container isKindOf "Helicopter")} && //container is a lockable veh + {(vehicle ACE_player) == ACE_player} && //Player dismounted + {(_container isKindOf "Car") || {(_container isKindOf "Tank") || {_container isKindOf "Helicopter"}}} && //container is a lockable veh {(locked _container) in [2,3]} && //Vehicle is locked - {!([ace_player, _container] call FUNC(hasKeyForVehicle))} //player doesn't have key + {!([ACE_player, _container] call FUNC(hasKeyForVehicle))} //player doesn't have key ) then { //Give feedback that vehicle is locked playSound "ACE_Sound_Click"; @@ -41,8 +41,7 @@ if (GVAR(LockVehicleInventory) && //if setting not enabled (findDisplay 602) closeDisplay 0; [{ TRACE_1("Opening Player Inventory", _this); - ACE_player action ["Gear", objNull] + ACE_player action ["Gear", objNull]; }, []] call CBA_fnc_execNextFrame; - }, - []] call CBA_fnc_waitUntilAndExecute; + }, []] call CBA_fnc_waitUntilAndExecute; }; diff --git a/addons/vehiclelock/functions/fnc_serverSetupCustomKeyEH.sqf b/addons/vehiclelock/functions/fnc_serverSetupCustomKeyEH.sqf index 957619a057..7018e67bcb 100644 --- a/addons/vehiclelock/functions/fnc_serverSetupCustomKeyEH.sqf +++ b/addons/vehiclelock/functions/fnc_serverSetupCustomKeyEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * On the server: Adds a key (magazineDetail name) to approved keys for a vehicle. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_veh", "_key"]; TRACE_2("params",_veh,_key); diff --git a/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf b/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf index 113a4ad505..8f38d48f37 100644 --- a/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf +++ b/addons/vehiclelock/functions/fnc_setVehicleLockEH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Sets a vehicle lock state because of a "ace_vehiclelock_setVehicleLock" event @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_veh", "_isLocked"]; TRACE_2("params",_veh,_isLocked); diff --git a/addons/vehiclelock/initSettings.sqf b/addons/vehiclelock/initSettings.sqf index 238268a8dc..30de8a692c 100644 --- a/addons/vehiclelock/initSettings.sqf +++ b/addons/vehiclelock/initSettings.sqf @@ -15,7 +15,8 @@ LSTRING(DisplayName), false, // default value true, // isGlobal - {[QGVAR(lockVehicleInventory), _this] call EFUNC(common,cbaSettings_settingChanged)} + {[QGVAR(lockVehicleInventory), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_settings_fnc_init; [ @@ -24,5 +25,6 @@ LSTRING(DisplayName), [[-1,0,1,2],["str_cfg_envsounds_default", LSTRING(VehicleStartingLockState_AsIs), LSTRING(VehicleStartingLockState_Locked), LSTRING(VehicleStartingLockState_Unlocked)], 0], // [values, titles, defaultIndex] true, // isGlobal - {[QGVAR(vehicleStartingLockState), _this] call EFUNC(common,cbaSettings_settingChanged)} + {[QGVAR(vehicleStartingLockState), _this] call EFUNC(common,cbaSettings_settingChanged)}, + true // Needs mission restart ] call CBA_settings_fnc_init; diff --git a/addons/vehiclelock/script_component.hpp b/addons/vehiclelock/script_component.hpp index 77b7186373..066e4ea8b6 100644 --- a/addons/vehiclelock/script_component.hpp +++ b/addons/vehiclelock/script_component.hpp @@ -15,3 +15,5 @@ #endif #include "\z\ace\addons\main\script_macros.hpp" + +#define IS_KIND_OF_ANY(object,classnames) ((classnames) findIf {(object) isKindOf _x} > -1) diff --git a/addons/vehiclelock/stringtable.xml b/addons/vehiclelock/stringtable.xml index 95fcadfc98..3898f74e16 100644 --- a/addons/vehiclelock/stringtable.xml +++ b/addons/vehiclelock/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/vehicles/functions/fnc_speedLimiter.sqf b/addons/vehicles/functions/fnc_speedLimiter.sqf index 07af1dd4c3..da2f7bf19a 100644 --- a/addons/vehicles/functions/fnc_speedLimiter.sqf +++ b/addons/vehicles/functions/fnc_speedLimiter.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Toggle speed limiter for Driver in Vehicle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_driver", "_vehicle"]; diff --git a/addons/vehicles/functions/fnc_startEngine.sqf b/addons/vehicles/functions/fnc_startEngine.sqf index 8b0d0f17bb..507036b0cb 100644 --- a/addons/vehicles/functions/fnc_startEngine.sqf +++ b/addons/vehicles/functions/fnc_startEngine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Delays engine start of vehicle. @@ -14,11 +15,10 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_isEngineOn"]; -if (!_isEngineOn || {floor abs speed _vehicle > 0}) exitWith {}; +if (!_isEngineOn || {floor abs speed _vehicle > 0 || {!isNull isVehicleCargo _vehicle}}) exitWith {}; [{ params ["_args", "_idPFH"]; diff --git a/addons/vehicles/stringtable.xml b/addons/vehicles/stringtable.xml index 076c96c193..6456cfbf6b 100644 --- a/addons/vehicles/stringtable.xml +++ b/addons/vehicles/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -36,6 +36,7 @@ Speed Limit Limite di velocità + 速度制限 Speed Limiter @@ -56,10 +57,12 @@ Increase Speed Limit Aumenta limite di velocità + 速度制限を増やす Decrease Speed Limit Diminuisce limite di velocità + 速度制限を減らす diff --git a/addons/viewdistance/functions/fnc_adaptViewDistance.sqf b/addons/viewdistance/functions/fnc_adaptViewDistance.sqf index 0277b96244..d83b8ae746 100644 --- a/addons/viewdistance/functions/fnc_adaptViewDistance.sqf +++ b/addons/viewdistance/functions/fnc_adaptViewDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Winter * Sets the player's current view distance according to whether s/he is on foot, in a land vehicle or in an air vehicle. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_showPrompt"]; if (!GVAR(enabled) || isNull ACE_player) exitWith {}; diff --git a/addons/viewdistance/functions/fnc_changeViewDistance.sqf b/addons/viewdistance/functions/fnc_changeViewDistance.sqf index c5f39ff2f8..40d07cf100 100644 --- a/addons/viewdistance/functions/fnc_changeViewDistance.sqf +++ b/addons/viewdistance/functions/fnc_changeViewDistance.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Winter * Sets the player's current view distance according to allowed values. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_indexRequested", "_showPrompt"]; diff --git a/addons/viewdistance/functions/fnc_initModule.sqf b/addons/viewdistance/functions/fnc_initModule.sqf index ad6b3852b4..b33b6b532c 100644 --- a/addons/viewdistance/functions/fnc_initModule.sqf +++ b/addons/viewdistance/functions/fnc_initModule.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Winter * Initializes the view distance limiter module. @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "_units", "_activated"]; if (!_activated) exitWith { diff --git a/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf b/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf index 257dca2995..5cc17be8bb 100644 --- a/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf +++ b/addons/viewdistance/functions/fnc_returnObjectCoeff.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Winter * Returns the object view distance coefficient according to the given index @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_index"]; switch (_index) do { diff --git a/addons/viewdistance/functions/fnc_returnValue.sqf b/addons/viewdistance/functions/fnc_returnValue.sqf index 35c0894520..480a9ce7ae 100644 --- a/addons/viewdistance/functions/fnc_returnValue.sqf +++ b/addons/viewdistance/functions/fnc_returnValue.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Winter * Returns the view distance value according to the given index. @@ -14,8 +15,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_index"]; switch (_index) do { diff --git a/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf b/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf index b4338b0511..e419687ac6 100644 --- a/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf +++ b/addons/viewdistance/functions/fnc_setFovBasedOvdPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Sets Object View Distance dynamically based on current Field of View, between Object View Distance (minimal value) and View Distance (maximum value) set before this PFH starts. @@ -15,8 +16,6 @@ * Public: No */ -#include "script_component.hpp" - params ["", "_idPFH"]; // Remove PFH and set Object View Distance back to what it was before diff --git a/addons/viewdistance/stringtable.xml b/addons/viewdistance/stringtable.xml index 7ea9bb1cce..5c2d2ec287 100644 --- a/addons/viewdistance/stringtable.xml +++ b/addons/viewdistance/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf b/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf index 288531df2c..c87047a787 100644 --- a/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf +++ b/addons/weaponselect/functions/fnc_displayGrenadeTypeAndNumber.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: esteldunedain, commy2 * Display a grenade type and quantity. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" if !(GVAR(DisplayText)) exitWith {}; diff --git a/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf b/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf index bb877ea3cd..f1bd108926 100644 --- a/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf +++ b/addons/weaponselect/functions/fnc_fireSmokeLauncher.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Fire Vehicle Smoke Launcher. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_vehicle"]; diff --git a/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf b/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf index a7c3f13936..86945dbaac 100644 --- a/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf +++ b/addons/weaponselect/functions/fnc_playChangeFiremodeSound.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Play weapon firemode change sound. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_weapon"]; diff --git a/addons/weaponselect/functions/fnc_putWeaponAway.sqf b/addons/weaponselect/functions/fnc_putWeaponAway.sqf index 0d7e93a429..e74a9c4c6b 100644 --- a/addons/weaponselect/functions/fnc_putWeaponAway.sqf +++ b/addons/weaponselect/functions/fnc_putWeaponAway.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * The unit will put its current weapon away. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit"]; diff --git a/addons/weaponselect/functions/fnc_selectNextGrenade.sqf b/addons/weaponselect/functions/fnc_selectNextGrenade.sqf index f4b48a1b1e..21f07639f4 100644 --- a/addons/weaponselect/functions/fnc_selectNextGrenade.sqf +++ b/addons/weaponselect/functions/fnc_selectNextGrenade.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Select the next grenade. @@ -14,7 +15,6 @@ * * Public: Yes */ -#include "script_component.hpp" params ["_unit", ["_type", 0]]; diff --git a/addons/weaponselect/functions/fnc_selectWeaponMode.sqf b/addons/weaponselect/functions/fnc_selectWeaponMode.sqf index c0a5f00a8a..8812a63525 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponMode.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponMode.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * The player will select the specified weapon or will change to the next firing mode if the weapon was already selected. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_weapon"]; diff --git a/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf b/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf index 3d7f05e954..ff2d48baf4 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponMuzzle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * The player will select the specified weapon and change to the first additional muzzle. E.g. the grenade launcher of a assault rifle. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_weapon"]; diff --git a/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf b/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf index 883588ee4b..b3fa528532 100644 --- a/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf +++ b/addons/weaponselect/functions/fnc_selectWeaponVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Select weapon for unit in vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_vehicle", "_index"]; diff --git a/addons/weaponselect/functions/fnc_throwGrenade.sqf b/addons/weaponselect/functions/fnc_throwGrenade.sqf index 10a730f504..1214bdc84b 100644 --- a/addons/weaponselect/functions/fnc_throwGrenade.sqf +++ b/addons/weaponselect/functions/fnc_throwGrenade.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: commy2 * Display Grenade information on grenade throw. Called from the unified fired EH only for the local player. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/weaponselect/stringtable.xml b/addons/weaponselect/stringtable.xml index 758a20ffcf..c59c2684b8 100644 --- a/addons/weaponselect/stringtable.xml +++ b/addons/weaponselect/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/weather/functions/fnc_calculateAirDensity.sqf b/addons/weather/functions/fnc_calculateAirDensity.sqf index 61d18d7201..43da78eab9 100644 --- a/addons/weather/functions/fnc_calculateAirDensity.sqf +++ b/addons/weather/functions/fnc_calculateAirDensity.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the air density @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_temperature", "_pressure", "_relativeHumidity"]; diff --git a/addons/weather/functions/fnc_calculateBarometricPressure.sqf b/addons/weather/functions/fnc_calculateBarometricPressure.sqf index 0749004c21..70cdf370bf 100644 --- a/addons/weather/functions/fnc_calculateBarometricPressure.sqf +++ b/addons/weather/functions/fnc_calculateBarometricPressure.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the barometric pressure based on altitude and weather @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" ((1013.25 - 10 * GVAR(currentOvercast)) * (1 - (0.0065 * (EGVAR(common,mapAltitude) + _this)) / (KELVIN(GVAR(currentTemperature)) + 0.0065 * EGVAR(common,mapAltitude))) ^ 5.255754495); diff --git a/addons/weather/functions/fnc_calculateDensityAltitude.sqf b/addons/weather/functions/fnc_calculateDensityAltitude.sqf index 8dea9849b1..fdfe57877d 100644 --- a/addons/weather/functions/fnc_calculateDensityAltitude.sqf +++ b/addons/weather/functions/fnc_calculateDensityAltitude.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates density altitude for a given air density @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Source: http://wahiduddin.net/calc/density_altitude.htm diff --git a/addons/weather/functions/fnc_calculateDewPoint.sqf b/addons/weather/functions/fnc_calculateDewPoint.sqf index 81db9565dc..5f020f47d1 100644 --- a/addons/weather/functions/fnc_calculateDewPoint.sqf +++ b/addons/weather/functions/fnc_calculateDewPoint.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates dew point based on temperature and relative humidity @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" #define __b 17.67 #define __c 243.5 diff --git a/addons/weather/functions/fnc_calculateHeatIndex.sqf b/addons/weather/functions/fnc_calculateHeatIndex.sqf index a4626128de..de333d801f 100644 --- a/addons/weather/functions/fnc_calculateHeatIndex.sqf +++ b/addons/weather/functions/fnc_calculateHeatIndex.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates heat index based on temperature and relative humidity @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" #define __C1 0.363445176 #define __C2 0.988622465 diff --git a/addons/weather/functions/fnc_calculateRoughnessLength.sqf b/addons/weather/functions/fnc_calculateRoughnessLength.sqf index 5112cf4ef5..17519c8092 100644 --- a/addons/weather/functions/fnc_calculateRoughnessLength.sqf +++ b/addons/weather/functions/fnc_calculateRoughnessLength.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the terrain roughness length at a given world position @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Source: http://es.ucsc.edu/~jnoble/wind/extrap/index.html #define ROUGHNESS_LENGTHS [0.0002, 0.0005, 0.0024, 0.03, 0.055, 0.1, 0.2, 0.4, 0.8, 1.6] diff --git a/addons/weather/functions/fnc_calculateSpeedOfSound.sqf b/addons/weather/functions/fnc_calculateSpeedOfSound.sqf index ed968d94f0..90d524e560 100644 --- a/addons/weather/functions/fnc_calculateSpeedOfSound.sqf +++ b/addons/weather/functions/fnc_calculateSpeedOfSound.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the speed of sound for a given temperature @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" (331.3 * sqrt(1 + (_this / 273.15))) diff --git a/addons/weather/functions/fnc_calculateTemperatureAtHeight.sqf b/addons/weather/functions/fnc_calculateTemperatureAtHeight.sqf index e33b8213eb..c392b15900 100644 --- a/addons/weather/functions/fnc_calculateTemperatureAtHeight.sqf +++ b/addons/weather/functions/fnc_calculateTemperatureAtHeight.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the temperature based on altitude and weather @@ -13,6 +14,5 @@ * * Public: No */ -#include "script_component.hpp" (GVAR(currentTemperature) - 0.0065 * _this) diff --git a/addons/weather/functions/fnc_calculateWetBulb.sqf b/addons/weather/functions/fnc_calculateWetBulb.sqf index a8a58b0dc3..5ebb497a16 100644 --- a/addons/weather/functions/fnc_calculateWetBulb.sqf +++ b/addons/weather/functions/fnc_calculateWetBulb.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates wet bulb based on temperature and relative humidity @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_temperature", "_pressure", "_relativeHumidity"]; diff --git a/addons/weather/functions/fnc_calculateWindChill.sqf b/addons/weather/functions/fnc_calculateWindChill.sqf index 0e17d53377..f657cba638 100644 --- a/addons/weather/functions/fnc_calculateWindChill.sqf +++ b/addons/weather/functions/fnc_calculateWindChill.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates wind chill based on temperature and wind speed @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_t", "_v"]; diff --git a/addons/weather/functions/fnc_calculateWindSpeed.sqf b/addons/weather/functions/fnc_calculateWindSpeed.sqf index 2f02c12852..f14d6dfbfc 100644 --- a/addons/weather/functions/fnc_calculateWindSpeed.sqf +++ b/addons/weather/functions/fnc_calculateWindSpeed.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Calculates the true wind speed at a given world position @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_position", "_windGradientEnabled", "_terrainEffectEnabled", "_obstacleEffectEnabled"]; diff --git a/addons/weather/functions/fnc_displayWindInfo.sqf b/addons/weather/functions/fnc_displayWindInfo.sqf index a8409cb68a..35c840bf85 100644 --- a/addons/weather/functions/fnc_displayWindInfo.sqf +++ b/addons/weather/functions/fnc_displayWindInfo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Displays a wind info (colored arrow) in the top left corner of the screen @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define __dsp (uiNamespace getVariable "RscWindIntuitive") #define __ctrl (__dsp displayCtrl 132948) diff --git a/addons/weather/functions/fnc_getMapData.sqf b/addons/weather/functions/fnc_getMapData.sqf index dd086b8414..20a8f1df70 100644 --- a/addons/weather/functions/fnc_getMapData.sqf +++ b/addons/weather/functions/fnc_getMapData.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg, esteldunedain * Get the weather data for the current map @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _worldName = toLower worldName; TRACE_1("getting map data",_worldName); diff --git a/addons/weather/functions/fnc_initModuleSettings.sqf b/addons/weather/functions/fnc_initModuleSettings.sqf index 3334392156..3b306398f9 100644 --- a/addons/weather/functions/fnc_initModuleSettings.sqf +++ b/addons/weather/functions/fnc_initModuleSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, Ruthberg * Module for adjusting the wind deflection settings @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/weather/functions/fnc_initWind.sqf b/addons/weather/functions/fnc_initWind.sqf index c40a6b4113..29e4e7dbe8 100644 --- a/addons/weather/functions/fnc_initWind.sqf +++ b/addons/weather/functions/fnc_initWind.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Inits the wind variables on the server (on mission start) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _month = date select 1; private _windDirectionProbabilities = GVAR(WindDirectionProbabilities) select (_month - 1); diff --git a/addons/weather/functions/fnc_updateHumidity.sqf b/addons/weather/functions/fnc_updateHumidity.sqf index 24e0211ec8..2660076f9f 100644 --- a/addons/weather/functions/fnc_updateHumidity.sqf +++ b/addons/weather/functions/fnc_updateHumidity.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE2 Team * Smoothly updates GVAR(currentHumidity) on the server (based on time of day and map data) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" if (rain > 0 && overcast > 0.7) then { GVAR(currentHumidity) = 1; diff --git a/addons/weather/functions/fnc_updateTemperature.sqf b/addons/weather/functions/fnc_updateTemperature.sqf index 7e597b1733..ea7a84a269 100644 --- a/addons/weather/functions/fnc_updateTemperature.sqf +++ b/addons/weather/functions/fnc_updateTemperature.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE2 Team * Smoothly updates GVAR(currentTemperature) on the server (based on time of day and map data) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _month = date select 1; private _timeRatio = abs(daytime - 12) / 12; diff --git a/addons/weather/functions/fnc_updateWeather.sqf b/addons/weather/functions/fnc_updateWeather.sqf index 8cb4633ef1..c573d190ce 100644 --- a/addons/weather/functions/fnc_updateWeather.sqf +++ b/addons/weather/functions/fnc_updateWeather.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE2 Team, esteldunedain, Ruthberg * Updates the weather evolution on the server. Broadcasts relevant weather information to the clients. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" missionNamespace setVariable [QGVAR(currentOvercast), overcast, true]; diff --git a/addons/weather/functions/fnc_updateWind.sqf b/addons/weather/functions/fnc_updateWind.sqf index e4c3bbb033..569179dce8 100644 --- a/addons/weather/functions/fnc_updateWind.sqf +++ b/addons/weather/functions/fnc_updateWind.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: ACE2 Team, Ruthberg * Smoothly updates wind on the server (based on time of year and map data) @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" private _speed = linearConversion [GVAR(last_wind_update), GVAR(next_wind_udpate), CBA_missionTime, GVAR(current_wind_speed), GVAR(next_wind_speed), true]; private _direction = linearConversion [GVAR(last_wind_update), GVAR(next_wind_udpate), CBA_missionTime, GVAR(current_wind_direction), GVAR(next_wind_direction), true]; diff --git a/addons/weather/stringtable.xml b/addons/weather/stringtable.xml index 12ef0dc630..0bca096192 100644 --- a/addons/weather/stringtable.xml +++ b/addons/weather/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/winddeflection/XEH_preInit.sqf b/addons/winddeflection/XEH_preInit.sqf index ad1c47f67c..b47cf6628d 100644 --- a/addons/winddeflection/XEH_preInit.sqf +++ b/addons/winddeflection/XEH_preInit.sqf @@ -1,13 +1,3 @@ -/** - * XEH_preInit.sqf - * @Descr: N/A - * @Author: Glowbal - * - * @Arguments: [] - * @Return: - * @PublicAPI: false - */ - #include "script_component.hpp" ADDON = false; diff --git a/addons/winddeflection/functions/fnc_handleFired.sqf b/addons/winddeflection/functions/fnc_handleFired.sqf index 2ee6735053..f43b40f455 100644 --- a/addons/winddeflection/functions/fnc_handleFired.sqf +++ b/addons/winddeflection/functions/fnc_handleFired.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, Ruthberg * Handles wind deflection for projectiles. Called from the unified fired EH only for players on foot and their vehicles if required by settings. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" //IGNORE_PRIVATE_WARNING ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle", "_gunner", "_turret"]; TRACE_10("firedEH:",_unit, _weapon, _muzzle, _mode, _ammo, _magazine, _projectile, _vehicle, _gunner, _turret); diff --git a/addons/winddeflection/functions/fnc_initModuleSettings.sqf b/addons/winddeflection/functions/fnc_initModuleSettings.sqf index f74ed869c6..39e7fc6f31 100644 --- a/addons/winddeflection/functions/fnc_initModuleSettings.sqf +++ b/addons/winddeflection/functions/fnc_initModuleSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, Ruthberg * Module for adjusting the wind deflection settings @@ -16,8 +17,6 @@ * Public: No */ -#include "script_component.hpp" - params ["_logic", "_units", "_activated"]; if !(_activated) exitWith {}; diff --git a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf index 8c55f6785f..e0a6b5da54 100644 --- a/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf +++ b/addons/winddeflection/functions/fnc_updateTrajectoryPFH.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal, Ruthberg * Handles wind deflection for projectiles. @@ -14,8 +15,6 @@ * * Public: No */ -// #define ENABLE_PERFORMANCE_COUNTERS -#include "script_component.hpp" [{ // BEGIN_COUNTER(pfeh); diff --git a/addons/winddeflection/stringtable.xml b/addons/winddeflection/stringtable.xml index 932a4c76a1..53648b2e37 100644 --- a/addons/winddeflection/stringtable.xml +++ b/addons/winddeflection/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/addons/yardage450/functions/fnc_acquireTarget.sqf b/addons/yardage450/functions/fnc_acquireTarget.sqf index 7aa5994f78..a6fb23f3f7 100644 --- a/addons/yardage450/functions/fnc_acquireTarget.sqf +++ b/addons/yardage450/functions/fnc_acquireTarget.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Fires the laser to acquire the target @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Reference: http://www.optcorp.com/pdf/Bushnell/YardageProSport.pdf #define MIN_DISTANCE ([9, 10] select GVAR(useYards)) diff --git a/addons/yardage450/functions/fnc_turnOn.sqf b/addons/yardage450/functions/fnc_turnOn.sqf index 59ed5c2ec8..05ae3db398 100644 --- a/addons/yardage450/functions/fnc_turnOn.sqf +++ b/addons/yardage450/functions/fnc_turnOn.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Ruthberg * Shows the Yardage 450 screen elements @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define __dsp (uiNamespace getVariable "ACE_RscYardage450") #define __ctrlTarget (__dsp displayCtrl 720041) diff --git a/addons/zeus/XEH_postInit.sqf b/addons/zeus/XEH_postInit.sqf index 2294e3a454..09faa5553f 100644 --- a/addons/zeus/XEH_postInit.sqf +++ b/addons/zeus/XEH_postInit.sqf @@ -1,5 +1,7 @@ #include "script_component.hpp" +#define IDD_DISPLAY3DEN 313 + ["ace_settingsInitialized",{ // Only add an InitPost EH if setting is enabled (and apply retroactively) if (isServer && {GVAR(autoAddObjects)}) then { @@ -24,7 +26,7 @@ if (isServer) then { [QGVAR(addObjects), { params ["_objects", ["_curator", objNull]]; - if !(isNull _curator) exitWith { _curator addCuratorEditableObjects [_objects, true]; }; + if (!isNull _curator) exitWith {_curator addCuratorEditableObjects [_objects, true]}; { _x addCuratorEditableObjects [_objects, true]; @@ -33,10 +35,81 @@ if (isServer) then { [QGVAR(removeObjects), { params ["_objects", ["_curator", objNull]]; - if !(isNull _curator) exitWith { _curator removeCuratorEditableObjects [_objects, true]; }; + if (!isNull _curator) exitWith {_curator removeCuratorEditableObjects [_objects, true]}; { _x removeCuratorEditableObjects [_objects, true]; } forEach allCurators; }] call CBA_fnc_addEventHandler; + + [QGVAR(createZeus), { + params ["_ownerPlayer"]; + private _owner = ["#adminLogged", getPlayerUID _ownerPlayer] select isMultiplayer; + private _group = createGroup sideLogic; + private _zeus = _group createUnit ["ModuleCurator_F", [0,0,0], [], 0, "NONE"]; + missionNamespace setVariable [format [QGVAR(zeus_%1), _owner], _zeus]; + _zeus setVariable ["owner", _owner, true]; + _zeus setVariable ["Addons", 3, true]; + _zeus setCuratorCoef ["Place", 0]; + _zeus setCuratorCoef ["Delete", 0]; + _group deleteGroupWhenEmpty true; + if (!isMultiplayer && {!isNull findDisplay IDD_DISPLAY3DEN}) then { + // if loaded from editor (but not after restart), addons are not activated so we do it manually + private _addons = ('true' configClasses (configFile >> "CfgPatches")) apply {configName _x}; + activateAddons _addons; + removeAllCuratorAddons _zeus; + _zeus addCuratorAddons _addons; + }; + [QGVAR(zeusCreated), _zeus, _ownerPlayer] call CBA_fnc_targetEvent; + }] call CBA_fnc_addEventHandler; + + addMissionEventHandler ["HandleDisconnect", { + private _owner = _this select 2; + private _zeusVarName = format [QGVAR(zeus_%1), _owner]; + private _zeus = missionNamespace getVariable _zeusVarName; + if (!isNil "_zeus") then { + if (!isNull _zeus) then {deleteVehicle _zeus}; + missionNamespace setVariable [_zeusVarName, nil]; + }; + }]; +}; + +if (hasInterface) then { + [QGVAR(zeusCreated), { + params ["_zeus"]; + GVAR(zeus) = _zeus; + [localize "str_a3_cfgvehicles_moduletasksetstate_f_arguments_state_values_created_0"] call EFUNC(common,displayTextStructured); + }] call CBA_fnc_addEventHandler; + + private _action = [ + QGVAR(create), + LLSTRING(CreateZeus), + "\A3\Ui_F_Curator\Data\Logos\arma3_curator_eye_32_ca.paa", + { + GVAR(zeus) = objNull; // to disable menu while zeus is being created + [QGVAR(createZeus), ACE_player] call CBA_fnc_serverEvent; + }, + { + switch (GVAR(canCreateZeus)) do { + case CAN_CREATE_ADMIN: {isServer || {IS_ADMIN_LOGGED}}; + case CAN_CREATE_CONSOLE: {call BIS_fnc_isDebugConsoleAllowed}; + case CAN_CREATE_ALL: {true}; + default {false}; + } + && {isNil QGVAR(zeus)} + } + ] call EFUNC(interact_menu,createAction); + ["CAManBase", 1, ["ACE_SelfActions"], _action, true] call EFUNC(interact_menu,addActionToClass); + + _action = [ + QGVAR(delete), + LLSTRING(DeleteZeus), + "\A3\Ui_F_Curator\Data\Logos\arma3_curator_eye_32_ca.paa", + { + deleteVehicle GVAR(zeus); + GVAR(zeus) = nil; + }, + {!(isNil QGVAR(zeus) || {isNull GVAR(zeus)})} + ] call EFUNC(interact_menu,createAction); + ["CAManBase", 1, ["ACE_SelfActions"], _action, true] call EFUNC(interact_menu,addActionToClass); }; diff --git a/addons/zeus/XEH_preInit.sqf b/addons/zeus/XEH_preInit.sqf index a55f9c304e..909005e73e 100644 --- a/addons/zeus/XEH_preInit.sqf +++ b/addons/zeus/XEH_preInit.sqf @@ -12,4 +12,6 @@ if (isServer) then { GVAR(GlobalSkillAI) = [0.5,0.5,0.5,0.5,true,true]; +#include "initSettings.sqf" + ADDON = true; diff --git a/addons/zeus/functions/fnc_addObjectToCurator.sqf b/addons/zeus/functions/fnc_addObjectToCurator.sqf index 7efa8beb64..975da83f93 100644 --- a/addons/zeus/functions/fnc_addObjectToCurator.sqf +++ b/addons/zeus/functions/fnc_addObjectToCurator.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Glowbal * Adds an object to curator upon spawn @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object"]; diff --git a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf index bc976c7bee..fffca62fc3 100644 --- a/addons/zeus/functions/fnc_bi_moduleArsenal.sqf +++ b/addons/zeus/functions/fnc_bi_moduleArsenal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Bohemia Interactive * Module function to open a full arsenal on a unit @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "", "_activated"]; diff --git a/addons/zeus/functions/fnc_bi_moduleCurator.sqf b/addons/zeus/functions/fnc_bi_moduleCurator.sqf index 3b863a70a5..b74cc28781 100644 --- a/addons/zeus/functions/fnc_bi_moduleCurator.sqf +++ b/addons/zeus/functions/fnc_bi_moduleCurator.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Bohemia Interactive * Module function for initalizing zeus @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/zeus/functions/fnc_bi_moduleMine.sqf b/addons/zeus/functions/fnc_bi_moduleMine.sqf index cb3be133d1..6b8866aaa4 100644 --- a/addons/zeus/functions/fnc_bi_moduleMine.sqf +++ b/addons/zeus/functions/fnc_bi_moduleMine.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Bohemia Interactive * Module function for spawning mines @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_units", "_activated"]; diff --git a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf index bbb4da0988..4439ad3517 100644 --- a/addons/zeus/functions/fnc_bi_moduleProjectile.sqf +++ b/addons/zeus/functions/fnc_bi_moduleProjectile.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Bohemia Interactive * Module function for spawning projectiles @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" _logic = _this select 0; _units = _this select 1; @@ -157,7 +157,7 @@ if (_activated) then { _projectile setposasl _posNew; _pos = getposatl _logic; _dir = direction _logic; - missionnamespace setvariable [_dirVar,_dir]; + //missionnamespace setvariable [_dirVar,_dir]; See L37 }; sleep 0.1; isnull _projectile || isnull _logic diff --git a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf index 687956492d..b35c8a508c 100644 --- a/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf +++ b/addons/zeus/functions/fnc_bi_moduleRemoteControl.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Bohemia Interactive * Module function for remote controlling units as zeus @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" _logic = _this select 0; _units = _this select 1; diff --git a/addons/zeus/functions/fnc_getModuleDestination.sqf b/addons/zeus/functions/fnc_getModuleDestination.sqf index d6aa822b5a..2066d5887e 100644 --- a/addons/zeus/functions/fnc_getModuleDestination.sqf +++ b/addons/zeus/functions/fnc_getModuleDestination.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Allows zeus to click to indicate a 3d position. @@ -25,7 +26,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_object", "_code", ["_text", ""], ["_icon", "\a3\ui_f\data\IGUI\Cfg\Cursors\select_target_ca.paa"], ["_color", [1,0,0,1]], ["_angle", 0]]; diff --git a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf index 58db9b093e..05bf5fdfb3 100644 --- a/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf +++ b/addons/zeus/functions/fnc_handleZeusUnitAssigned.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Contextually removes addons (given in ACE_Curator) from zeus based on their required addon(s) @@ -19,7 +20,6 @@ * * Public: No */ -#include "script_component.hpp" if !(isClass (configFile >> "ACE_Curator")) exitWith { ERROR("The ACE_Curator class does not exist") }; diff --git a/addons/zeus/functions/fnc_moduleAddAceArsenal.sqf b/addons/zeus/functions/fnc_moduleAddAceArsenal.sqf index 5d8bbdb72c..5bdb2803f9 100644 --- a/addons/zeus/functions/fnc_moduleAddAceArsenal.sqf +++ b/addons/zeus/functions/fnc_moduleAddAceArsenal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe * Add a full ACE Arsenal to an object @@ -10,7 +11,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; if (!local _logic) exitWith {}; diff --git a/addons/zeus/functions/fnc_moduleAddArsenal.sqf b/addons/zeus/functions/fnc_moduleAddArsenal.sqf index b8eed64d76..d284b9bb08 100644 --- a/addons/zeus/functions/fnc_moduleAddArsenal.sqf +++ b/addons/zeus/functions/fnc_moduleAddArsenal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe * Add a full arsenal to an object @@ -10,7 +11,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; if (!local _logic) exitWith {}; diff --git a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf index 6f60f80947..967edc9396 100644 --- a/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf +++ b/addons/zeus/functions/fnc_moduleAddOrRemoveFRIES.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Add/Removes FRIES from a helicopter. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf b/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf index ed633c2033..580d691996 100644 --- a/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf +++ b/addons/zeus/functions/fnc_moduleAddSpareTrack.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Adds a Spare Track to the vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf b/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf index 58cd6c1063..b08af3ed9d 100644 --- a/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf +++ b/addons/zeus/functions/fnc_moduleAddSpareWheel.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Jonpas * Adds a Spare Wheel to the vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleCaptive.sqf b/addons/zeus/functions/fnc_moduleCaptive.sqf index fbb1255b8d..6420559a3f 100644 --- a/addons/zeus/functions/fnc_moduleCaptive.sqf +++ b/addons/zeus/functions/fnc_moduleCaptive.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Flips the capture state of the unit the module is placed on. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleConfigurePylons.sqf b/addons/zeus/functions/fnc_moduleConfigurePylons.sqf index 404605451e..6371183192 100644 --- a/addons/zeus/functions/fnc_moduleConfigurePylons.sqf +++ b/addons/zeus/functions/fnc_moduleConfigurePylons.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Opens the pylon configuration menu for the aircraft module is placed on. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" if (canSuspend) exitWith {[FUNC(moduleConfigurePylons), _this] call CBA_fnc_directCall;}; diff --git a/addons/zeus/functions/fnc_moduleGarrison.sqf b/addons/zeus/functions/fnc_moduleGarrison.sqf index 5bc545716d..ae0dd4292e 100644 --- a/addons/zeus/functions/fnc_moduleGarrison.sqf +++ b/addons/zeus/functions/fnc_moduleGarrison.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe * Module calling the garrison function. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_pos", "_radius" ,"_mode" , "_topDownMode", "_teleport"]; diff --git a/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf b/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf index 6e275acaf8..a43ba78189 100644 --- a/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf +++ b/addons/zeus/functions/fnc_moduleGlobalSetSkill.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * PV event handler to update the AI skill on all machines when set by zeus module @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_varName", "_varValue"]; _varValue params ["_general", "_accuracy", "_handling", "_spotting", "_cover", "_combat"]; diff --git a/addons/zeus/functions/fnc_moduleGroupSide.sqf b/addons/zeus/functions/fnc_moduleGroupSide.sqf index 2ef385a091..087838ed30 100644 --- a/addons/zeus/functions/fnc_moduleGroupSide.sqf +++ b/addons/zeus/functions/fnc_moduleGroupSide.sqf @@ -1,5 +1,6 @@ +#include "script_component.hpp" /* - * Author: SilentSpike + * Author: SilentSpike, Brett * Zeus module function to change side of a group on dialog confirmation * * Arguments: @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_newSide"]; private _side = side _unit; @@ -25,20 +25,30 @@ if (_side == _newSide) exitWith {}; private _oldGroup = group _unit; private _newGroup = createGroup _newSide; +// Preserve groupid from the previous group if doesn't already exist +if ((allGroups findIf {side _x isEqualTo _newSide && {(groupId _oldGroup) isEqualTo (groupId _newGroup)}}) == -1) then { + _newGroup setGroupIdGlobal [groupId _oldGroup]; +}; + // Pretty hacky, will replace units return group with this new group if unconcious if (GETVAR(_unit,ACE_isUnconscious,false) && {GETMVAR(EGVAR(medical,moveUnitsFromGroupOnUnconscious),false)}) then { - private _previousGroupsList = _unit getVariable [QEGVAR(common,previousGroupSwitchTo), []]; + private _previousGroupsList = _unit getVariable [QEGVAR(common,previousGroupSwitchTo), []]; - { - if ("ACE_isUnconscious" == (_x select 2)) exitWith { - _x set [0,_newGroup]; - _x set [1,_newSide]; - _previousGroupsList set [_forEachIndex, _x]; - }; - } forEach _previousGroupsList; + { + if ("ACE_isUnconscious" == (_x select 2)) exitWith { + _x set [0,_newGroup]; + _x set [1,_newSide]; + _previousGroupsList set [_forEachIndex, _x]; + }; + } forEach _previousGroupsList; - _unit setVariable [QEGVAR(common,previousGroupSwitchTo), _previousGroupsList, true]; + _unit setVariable [QEGVAR(common,previousGroupSwitchTo), _previousGroupsList, true]; } else { - (units _unit) joinSilent _newGroup; + // Preserve assignedTeam for each unit + { + private _team = assignedTeam _x; + [_x] joinSilent _newGroup; + _x assignTeam _team; + } forEach units _unit; deleteGroup _oldGroup; }; diff --git a/addons/zeus/functions/fnc_moduleHeal.sqf b/addons/zeus/functions/fnc_moduleHeal.sqf index 34f7519699..647112f67a 100644 --- a/addons/zeus/functions/fnc_moduleHeal.sqf +++ b/addons/zeus/functions/fnc_moduleHeal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: mharis001 * Full heal unit. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleLoadIntoCargo.sqf b/addons/zeus/functions/fnc_moduleLoadIntoCargo.sqf index f0a6968278..b13c0cc29b 100644 --- a/addons/zeus/functions/fnc_moduleLoadIntoCargo.sqf +++ b/addons/zeus/functions/fnc_moduleLoadIntoCargo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Loads the object module is placed on into selected vehicle. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" if (canSuspend) exitWith {[FUNC(moduleLoadIntoCargo), _this] call CBA_fnc_directCall;}; @@ -43,7 +43,7 @@ if (!alive _cargo) exitWith { params ["_successful", "_cargo", "_mousePosASL"]; if (!_successful) exitWith {}; - private _holder = (nearestObjects [ASLToAGL _mousePosASL, EGVAR(cargo,cargoHolderTypes), 5]) param [0, objNull]; + private _holder = (nearestObjects [ASLToAGL _mousePosASL, EGVAR(cargo,cargoHolderTypes), 5, true]) param [0, objNull]; // 2d distance search if (isNull _holder) exitWith { [LSTRING(NothingSelected)] call FUNC(showMessage); }; diff --git a/addons/zeus/functions/fnc_moduleRemoveAceArsenal.sqf b/addons/zeus/functions/fnc_moduleRemoveAceArsenal.sqf index 83aa319480..bc6ba69d87 100644 --- a/addons/zeus/functions/fnc_moduleRemoveAceArsenal.sqf +++ b/addons/zeus/functions/fnc_moduleRemoveAceArsenal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe * Remove ACE Arsenal from an object @@ -10,7 +11,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; if (!local _logic) exitWith {}; diff --git a/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf b/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf index 97256ca67d..ec203572e4 100644 --- a/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf +++ b/addons/zeus/functions/fnc_moduleRemoveArsenal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe * Remove arsenal from an object @@ -10,7 +11,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; if (!local _logic) exitWith {}; diff --git a/addons/zeus/functions/fnc_moduleSearchNearby.sqf b/addons/zeus/functions/fnc_moduleSearchNearby.sqf index 2145d62e17..9515ab3fdc 100644 --- a/addons/zeus/functions/fnc_moduleSearchNearby.sqf +++ b/addons/zeus/functions/fnc_moduleSearchNearby.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Commands the group the module is placed on to search the nearest building @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSetEngineer.sqf b/addons/zeus/functions/fnc_moduleSetEngineer.sqf index e548c6c363..8280d75e65 100644 --- a/addons/zeus/functions/fnc_moduleSetEngineer.sqf +++ b/addons/zeus/functions/fnc_moduleSetEngineer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: mharis001 * Zeus module function to set unit engineer skill. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", ["_engineerN", 1]]; diff --git a/addons/zeus/functions/fnc_moduleSetMedic.sqf b/addons/zeus/functions/fnc_moduleSetMedic.sqf index c213bcc25e..63b962d429 100644 --- a/addons/zeus/functions/fnc_moduleSetMedic.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedic.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike, Glowbal * Assigns a medic role from the medical module to a unit @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf index e9f39019a2..ec8106d9ff 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalFacility.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike, Glowbal * Assigns a medic role from the medical module to a unit @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf index a4555c5ff9..afcacc0c25 100644 --- a/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf +++ b/addons/zeus/functions/fnc_moduleSetMedicalVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike, Glowbal * Assigns a medic role from the medical module to a unit @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSetRepairFacility.sqf b/addons/zeus/functions/fnc_moduleSetRepairFacility.sqf index a35533f4f4..e8d5fa84a3 100644 --- a/addons/zeus/functions/fnc_moduleSetRepairFacility.sqf +++ b/addons/zeus/functions/fnc_moduleSetRepairFacility.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: mharis001 * Assigns object as repair facility. @@ -13,7 +14,6 @@ * * Public: No */ - #include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSetRepairVehicle.sqf b/addons/zeus/functions/fnc_moduleSetRepairVehicle.sqf index 485c8f8db5..79c89dfa88 100644 --- a/addons/zeus/functions/fnc_moduleSetRepairVehicle.sqf +++ b/addons/zeus/functions/fnc_moduleSetRepairVehicle.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: mharis001 * Assigns object as repair vehicle. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSimulation.sqf b/addons/zeus/functions/fnc_moduleSimulation.sqf index 76a275a02e..69d7abe36c 100644 --- a/addons/zeus/functions/fnc_moduleSimulation.sqf +++ b/addons/zeus/functions/fnc_moduleSimulation.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Fisher, SilentSpike * Toggle Simulation on object. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleSuicideBomber.sqf b/addons/zeus/functions/fnc_moduleSuicideBomber.sqf index 5364692ded..c659ca7a9a 100644 --- a/addons/zeus/functions/fnc_moduleSuicideBomber.sqf +++ b/addons/zeus/functions/fnc_moduleSuicideBomber.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: mharis001 * Zeus module function to make unit a suicide bomber. @@ -17,7 +18,6 @@ * * Public: No */ -#include "script_component.hpp" #define EXPLOSIVES ["R_TBG32V_F", "M_Mo_120mm_AT", "Bo_GBU12_LGB"] #define DISTANCE_FAR 15 diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf index 0dde339da6..1900e5a7a3 100644 --- a/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf +++ b/addons/zeus/functions/fnc_moduleSuppressiveFire.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux, PabstMirror * Commands the selected unit or group to start suppressive fire on the unit, group or location the module is placed on @@ -16,7 +17,6 @@ * Public: No */ // #define DRAW_ZEUS_INFO -#include "script_component.hpp" if (canSuspend) exitWith {[FUNC(moduleSuppressiveFire), _this] call CBA_fnc_directCall;}; diff --git a/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf b/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf index 7b11b7e18f..2512269865 100644 --- a/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf +++ b/addons/zeus/functions/fnc_moduleSuppressiveFireLocal.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: bux, PabstMirror * Commands the selected unit or group to start suppressive fire on the unit, group or location the module is placed on @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_unit", "_targetASL", "_artilleryMag"]; TRACE_4("moduleSuppressiveFireLocal",_unit,local _unit,_targetASL,_artilleryMag); diff --git a/addons/zeus/functions/fnc_moduleSurrender.sqf b/addons/zeus/functions/fnc_moduleSurrender.sqf index 3c293bcfa0..5fc0ae9e0c 100644 --- a/addons/zeus/functions/fnc_moduleSurrender.sqf +++ b/addons/zeus/functions/fnc_moduleSurrender.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Flips the surrender state of the unit the module is placed on. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf index eb42306931..c120ee14f9 100644 --- a/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf +++ b/addons/zeus/functions/fnc_moduleTeleportPlayers.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Zeus module function to teleport players on dialog confirmation @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic","_uid","_group"]; diff --git a/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf b/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf index c5f4c3668d..3f169028a5 100644 --- a/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf +++ b/addons/zeus/functions/fnc_moduleToggleFlashlight.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe, mharis001 * Zeus module function to toggle flashlights. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_toggle", "_addGear", "_target"]; TRACE_1("params",_this); diff --git a/addons/zeus/functions/fnc_moduleToggleNvg.sqf b/addons/zeus/functions/fnc_moduleToggleNvg.sqf index 7a01c27a4a..f8627acfe6 100644 --- a/addons/zeus/functions/fnc_moduleToggleNvg.sqf +++ b/addons/zeus/functions/fnc_moduleToggleNvg.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe, mharis001 * Zeus module function to toggle NVGs. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic", "_toggle", "_target"]; TRACE_1("params",_this); diff --git a/addons/zeus/functions/fnc_moduleUnGarrison.sqf b/addons/zeus/functions/fnc_moduleUnGarrison.sqf index 082a19b2b1..5ac9ea5dcf 100644 --- a/addons/zeus/functions/fnc_moduleUnGarrison.sqf +++ b/addons/zeus/functions/fnc_moduleUnGarrison.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe * Un-garrison a garrisoned group. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleUnconscious.sqf b/addons/zeus/functions/fnc_moduleUnconscious.sqf index 72aa0599dd..fbba773b04 100644 --- a/addons/zeus/functions/fnc_moduleUnconscious.sqf +++ b/addons/zeus/functions/fnc_moduleUnconscious.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Flips the unconscious state of the unit the module is placed on. @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_moduleZeusSettings.sqf b/addons/zeus/functions/fnc_moduleZeusSettings.sqf index 1aa4b399ef..6024126952 100644 --- a/addons/zeus/functions/fnc_moduleZeusSettings.sqf +++ b/addons/zeus/functions/fnc_moduleZeusSettings.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Module for adjusting various aspects of zeus @@ -15,7 +16,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_logic"]; diff --git a/addons/zeus/functions/fnc_showMessage.sqf b/addons/zeus/functions/fnc_showMessage.sqf index 755b9b6278..b38652eeba 100644 --- a/addons/zeus/functions/fnc_showMessage.sqf +++ b/addons/zeus/functions/fnc_showMessage.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: 654wak654 * Shows a Zeus message through the BIS function, handles localization. @@ -16,7 +17,6 @@ * * Public: Yes */ -#include "script_component.hpp" if (!(_this isEqualTypeParams [""])) exitWith {ERROR_1("First arg must be string [%1]",_this);}; diff --git a/addons/zeus/functions/fnc_ui_attributeCargo.sqf b/addons/zeus/functions/fnc_ui_attributeCargo.sqf index e973e0df76..b4fc156127 100644 --- a/addons/zeus/functions/fnc_ui_attributeCargo.sqf +++ b/addons/zeus/functions/fnc_ui_attributeCargo.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror, mharis001 * Initializes the ace_cargo attribute of the zeus vehicle attributes display. @@ -14,7 +15,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_control"]; TRACE_1("params",_control); diff --git a/addons/zeus/functions/fnc_ui_attributeRadius.sqf b/addons/zeus/functions/fnc_ui_attributeRadius.sqf index 3fccb19fab..d8a0c46305 100644 --- a/addons/zeus/functions/fnc_ui_attributeRadius.sqf +++ b/addons/zeus/functions/fnc_ui_attributeRadius.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Initializes the "Radius" Zeus module attribute. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Generic init params ["_control"]; diff --git a/addons/zeus/functions/fnc_ui_defendArea.sqf b/addons/zeus/functions/fnc_ui_defendArea.sqf index cd3153d628..aaa05adbbf 100644 --- a/addons/zeus/functions/fnc_ui_defendArea.sqf +++ b/addons/zeus/functions/fnc_ui_defendArea.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Initializes the "Defend Area" Zeus module display. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Generic init params ["_control"]; diff --git a/addons/zeus/functions/fnc_ui_editableObjects.sqf b/addons/zeus/functions/fnc_ui_editableObjects.sqf index 7f817e6b90..b21b50ea26 100644 --- a/addons/zeus/functions/fnc_ui_editableObjects.sqf +++ b/addons/zeus/functions/fnc_ui_editableObjects.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: Fisher, SilentSpike, mharis001 * Initializes the "Editable Objects" Zeus module display. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_control"]; @@ -47,8 +47,17 @@ private _fnc_onConfirm = { private _radius = GETVAR(_display,GVAR(radius),100); private _editingMode = lbCurSel (_display displayCtrl 19181) > 0; - private _allCurators = [getAssignedCuratorLogic player, objNull] select (lbCurSel (_display displayCtrl 19182)); - private _objects = nearestObjects [getPos _logic, ["All"], _radius]; + private _allCurators = [getAssignedCuratorLogic player, objNull] select lbCurSel (_display displayCtrl 19182); + private _additionalObjects = lbCurSel (_display displayCtrl 19183); + + private _objects = nearestObjects [_logic, ["All"], _radius]; + if (_additionalObjects == 1) then { + _objects append call CBA_fnc_players; + } else { + if (_additionalObjects == 2) then { + _objects append (allUnits + allDeadMen select {!(_x isKindOf "HeadlessClient_F")}); + }; + }; if (_editingMode) then { [QGVAR(addObjects), [_objects, _allCurators]] call CBA_fnc_serverEvent; diff --git a/addons/zeus/functions/fnc_ui_garrison.sqf b/addons/zeus/functions/fnc_ui_garrison.sqf index 266d564457..a0843b5866 100644 --- a/addons/zeus/functions/fnc_ui_garrison.sqf +++ b/addons/zeus/functions/fnc_ui_garrison.sqf @@ -1,6 +1,7 @@ +#include "script_component.hpp" /* - * Author: alganthe - * Initalises the "Garrison" zeus module display. + * Author: alganthe, mharis001 + * Initializes the "Garrison" Zeus module display. * * Arguments: * 0: Garrison controls group @@ -9,26 +10,23 @@ * None * * Example: - * onSetFocus = "_this call ace_zeus_fnc_ui_garrison" + * [CONTROL] call ace_zeus_fnc_ui_garrison * * Public: No */ -#include "script_component.hpp" - -disableSerialization; params ["_control"]; -//Generic Init: -private _display = ctrlparent _control; -private _ctrlButtonOK = _display displayctrl 1; //IDC_OK -private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); -TRACE_1("logicObject",_logic); +// Generic init +private _display = ctrlParent _control; +private _ctrlButtonOK = _display displayCtrl 1; // IDC_OK +private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); +TRACE_1("Logic Object",_logic); -_control ctrlRemoveAllEventHandlers "setFocus"; +_control ctrlRemoveAllEventHandlers "SetFocus"; -// Handles errors -private _unit = effectiveCommander (attachedTo _logic); +// Validate module target +private _unit = effectiveCommander attachedTo _logic; scopeName "Main"; private _fnc_errorAndClose = { @@ -54,26 +52,9 @@ switch (false) do { }; }; -//Specific on-load stuff: -private _listbox = _display displayCtrl 73063; -{ - _listbox lbSetValue [_listbox lbAdd (_x select 0), _x select 1]; -} forEach [ - [localize LSTRING(ModuleGarrison_FillingModeEven), 0], - [localize LSTRING(ModuleGarrison_FillingModeBuilding), 1], - [localize LSTRING(ModuleGarrison_FillingModeRandom), 2] -]; - -_listbox lbSetCurSel 0; - -//Specific on-load stuff: -(_display displayCtrl 73061) cbSetChecked (_logic getVariable ["TopDownFilling",false]); -(_display displayCtrl 73062) cbSetChecked (_logic getVariable ["Teleport",false]); - +// Specific onLoad stuff private _fnc_onUnload = { - params ["_display"]; - - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; deleteVehicle _logic; @@ -82,22 +63,19 @@ private _fnc_onUnload = { private _fnc_onConfirm = { params [["_ctrlButtonOK", controlNull, [controlNull]]]; - private _display = ctrlparent _ctrlButtonOK; + private _display = ctrlParent _ctrlButtonOK; if (isNull _display) exitWith {}; - private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objnull); + private _logic = GETMVAR(BIS_fnc_initCuratorAttributes_target,objNull); if (isNull _logic) exitWith {}; - private _lb = _display displayCtrl 73063; - private _radius = GETVAR(_display,GVAR(radius),50); - private _position = GETVAR(_display,GVAR(position),getPos _logic); - private _mode = _lb lbValue (lbCurSel _lb); - private _TopDownFilling = cbChecked (_display displayCtrl 73061); - private _teleport = cbChecked (_display displayCtrl 73062); + private _teleport = lbCurSel (_display displayCtrl 73061) > 0; + private _topDown = lbCurSel (_display displayCtrl 73062) > 0; + private _fillingMode = lbCurSel (_display displayCtrl 73063); - [_logic, _position ,_radius, _mode, _TopDownFilling, _teleport] call FUNC(moduleGarrison); + [_logic, getPos _logic, _radius, _fillingMode, _topDown, _teleport] call FUNC(moduleGarrison); }; -_display displayAddEventHandler ["unload", _fnc_onUnload]; -_ctrlButtonOK ctrlAddEventHandler ["buttonclick", _fnc_onConfirm]; +_display displayAddEventHandler ["Unload", _fnc_onUnload]; +_ctrlButtonOK ctrlAddEventHandler ["ButtonClick", _fnc_onConfirm]; diff --git a/addons/zeus/functions/fnc_ui_globalSetSkill.sqf b/addons/zeus/functions/fnc_ui_globalSetSkill.sqf index 91da3b04dc..79e7ea077d 100644 --- a/addons/zeus/functions/fnc_ui_globalSetSkill.sqf +++ b/addons/zeus/functions/fnc_ui_globalSetSkill.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Initalises the `global skill` zeus module display @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_control"]; TRACE_1("params",_control); diff --git a/addons/zeus/functions/fnc_ui_groupSide.sqf b/addons/zeus/functions/fnc_ui_groupSide.sqf index 17e6aadc15..e74ab97c9e 100644 --- a/addons/zeus/functions/fnc_ui_groupSide.sqf +++ b/addons/zeus/functions/fnc_ui_groupSide.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Initalises the `group side` zeus module display @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define IDCs [31201,31200,31202,31203] params ["_control"]; diff --git a/addons/zeus/functions/fnc_ui_patrolArea.sqf b/addons/zeus/functions/fnc_ui_patrolArea.sqf index 89947afb22..93cae24aa5 100644 --- a/addons/zeus/functions/fnc_ui_patrolArea.sqf +++ b/addons/zeus/functions/fnc_ui_patrolArea.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Initializes the "Patrol Area" Zeus module display. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Generic init params ["_control"]; diff --git a/addons/zeus/functions/fnc_ui_searchArea.sqf b/addons/zeus/functions/fnc_ui_searchArea.sqf index 197f5c835f..db2748e629 100644 --- a/addons/zeus/functions/fnc_ui_searchArea.sqf +++ b/addons/zeus/functions/fnc_ui_searchArea.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike * Initializes the "Search Area" Zeus module display. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" // Generic init params ["_control"]; diff --git a/addons/zeus/functions/fnc_ui_setEngineer.sqf b/addons/zeus/functions/fnc_ui_setEngineer.sqf index 18cd5febfa..20e8113c7a 100644 --- a/addons/zeus/functions/fnc_ui_setEngineer.sqf +++ b/addons/zeus/functions/fnc_ui_setEngineer.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: mharis001 * Initalizes the "Set Engineer" Zeus module display. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_control"]; diff --git a/addons/zeus/functions/fnc_ui_suicideBomber.sqf b/addons/zeus/functions/fnc_ui_suicideBomber.sqf index 6ee5c6b0d8..060618e536 100644 --- a/addons/zeus/functions/fnc_ui_suicideBomber.sqf +++ b/addons/zeus/functions/fnc_ui_suicideBomber.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: mharis001 * Initializes the "Suicide Bomber" Zeus module display. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" #define SIDE_IDCs [83580, 83581, 83582, 83583] diff --git a/addons/zeus/functions/fnc_ui_teleportPlayers.sqf b/addons/zeus/functions/fnc_ui_teleportPlayers.sqf index 99233482a4..0594554dc5 100644 --- a/addons/zeus/functions/fnc_ui_teleportPlayers.sqf +++ b/addons/zeus/functions/fnc_ui_teleportPlayers.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: SilentSpike, mharis001 * Initalizes the "Teleport Players" Zeus module display. @@ -13,7 +14,6 @@ * * Public: No */ -#include "script_component.hpp" params ["_control"]; diff --git a/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf b/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf index 874f2dcc91..333da80ac3 100644 --- a/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf +++ b/addons/zeus/functions/fnc_ui_toggleFlashlight.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe, mharis001 * Initializes the "Toggle Flashlights" Zeus module display. @@ -13,9 +14,6 @@ * * Public: No */ -#include "script_component.hpp" - -#define COMBO_ITEMS [[LSTRING(SelectedGroup), "\a3\ui_f_curator\data\displays\rscdisplaycurator\modegroups_ca.paa"], ["STR_WEST", "\a3\ui_f\data\map\diary\icons\playerwest_ca.paa"], ["STR_EAST", "\a3\ui_f\data\map\diary\icons\playereast_ca.paa"], ["STR_guerrila", "\a3\ui_f\data\map\diary\icons\playerguer_ca.paa"], ["STR_Civilian", "\a3\ui_f\data\map\diary\icons\playerciv_ca.paa"]] params ["_control"]; @@ -28,7 +26,7 @@ TRACE_1("Logic Object",_logic); _control ctrlRemoveAllEventHandlers "SetFocus"; // Validate module target -private _unit = effectiveCommander (attachedTo _logic); +private _unit = effectiveCommander attachedTo _logic; scopeName "Main"; private _fnc_errorAndClose = { @@ -51,19 +49,11 @@ if !(isNull _unit) then { }; // Specific onLoad stuff -private _combo = _display displayCtrl 56220; - -// Add target combo options (only add selected group option if placed on unit) -{ - _x params ["_text", "_icon"]; - _combo lbSetPicture [_combo lbAdd (localize _text), _icon]; -} forEach (COMBO_ITEMS select [[0, 1] select (isNull _unit), 5]); - -_combo lbSetCurSel 0; - -// Set default flashlight status -if !(isNull _unit) then { - (_display displayCtrl 56218) lbSetCurSel ([0, 1] select (_unit isFlashlightOn (currentWeapon _unit))); +// Remove selected group option in not placed on unit and set default flashlight status +if (isNull _unit) then { + (_display displayCtrl 56220) lbDelete 0; +} else { + (_display displayCtrl 56218) lbSetCurSel ([0, 1] select (_unit isFlashlightOn currentWeapon _unit)); }; private _fnc_onUnload = { diff --git a/addons/zeus/functions/fnc_ui_toggleNvg.sqf b/addons/zeus/functions/fnc_ui_toggleNvg.sqf index c10b0b5bbc..037c216205 100644 --- a/addons/zeus/functions/fnc_ui_toggleNvg.sqf +++ b/addons/zeus/functions/fnc_ui_toggleNvg.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: alganthe, mharis001 * Initializes the "Toggle NVGs" Zeus module display. @@ -13,9 +14,6 @@ * * Public: No */ -#include "script_component.hpp" - -#define COMBO_ITEMS [[LSTRING(SelectedGroup), "\a3\ui_f_curator\data\displays\rscdisplaycurator\modegroups_ca.paa"], ["STR_WEST", "\a3\ui_f\data\map\diary\icons\playerwest_ca.paa"], ["STR_EAST", "\a3\ui_f\data\map\diary\icons\playereast_ca.paa"], ["STR_guerrila", "\a3\ui_f\data\map\diary\icons\playerguer_ca.paa"], ["STR_Civilian", "\a3\ui_f\data\map\diary\icons\playerciv_ca.paa"]] params ["_control"]; @@ -28,7 +26,7 @@ TRACE_1("Logic Object",_logic); _control ctrlRemoveAllEventHandlers "SetFocus"; // Validate module target -private _unit = effectiveCommander (attachedTo _logic); +private _unit = effectiveCommander attachedTo _logic; scopeName "Main"; private _fnc_errorAndClose = { @@ -51,18 +49,10 @@ if !(isNull _unit) then { }; // Specific onLoad stuff -private _combo = _display displayCtrl 92856; - -// Add target combo options (only add selected group option if placed on unit) -{ - _x params ["_text", "_icon"]; - _combo lbSetPicture [_combo lbAdd (localize _text), _icon]; -} forEach (COMBO_ITEMS select [[0, 1] select (isNull _unit), 5]); - -_combo lbSetCurSel 0; - -// Set default NVG status -if !(isNull _unit) then { +// Remove selected group option in not placed on unit and set default NVG status +if (isNull _unit) then { + (_display displayCtrl 92856) lbDelete 0; +} else { (_display displayCtrl 92855) lbSetCurSel ([0, 1] select !(hmd _unit isEqualTo "")); }; diff --git a/addons/zeus/functions/fnc_zeusAttributes.sqf b/addons/zeus/functions/fnc_zeusAttributes.sqf index 8e80744e66..4e2b3eb897 100644 --- a/addons/zeus/functions/fnc_zeusAttributes.sqf +++ b/addons/zeus/functions/fnc_zeusAttributes.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: PabstMirror * Dummy function to include BIS script file. @@ -16,7 +17,6 @@ * * Public: No */ -#include "script_component.hpp" TRACE_1("params",_this); diff --git a/addons/zeus/initSettings.sqf b/addons/zeus/initSettings.sqf new file mode 100644 index 0000000000..1db3fe5205 --- /dev/null +++ b/addons/zeus/initSettings.sqf @@ -0,0 +1,22 @@ +[ + QGVAR(canCreateZeus), + "LIST", + format [LLSTRING(MenuSetting), LLSTRING(CreateZeus)], + format ["ACE %1", LLSTRING(DisplayName)], + [ + [ + CAN_CREATE_NONE, + CAN_CREATE_ADMIN, + CAN_CREATE_CONSOLE, + CAN_CREATE_ALL + ], + [ + localize "STR_A3_None", + localize "str_3den_attributes_enabledebugconsole_host_text", + localize "str_ui_debug_title", + localize "str_3den_attributes_enabledebugconsole_all_text" + ], + 0 + ], + true +] call CBA_settings_fnc_init; diff --git a/addons/zeus/script_component.hpp b/addons/zeus/script_component.hpp index 380c46e1c7..957c7699d3 100644 --- a/addons/zeus/script_component.hpp +++ b/addons/zeus/script_component.hpp @@ -17,9 +17,14 @@ #include "\z\ace\addons\main\script_macros.hpp" // UI grid -#define SIZEX ((safezoneW / safezoneH) min 1.2) +#define SIZEX ((safeZoneW / safeZoneH) min 1.2) #define SIZEY (SIZEX / 1.2) #define W_PART(num) (num * (SIZEX / 40)) #define H_PART(num) (num * (SIZEY / 25)) -#define X_PART(num) (W_PART(num) + (safezoneX + (safezoneW - SIZEX)/2)) -#define Y_PART(num) (H_PART(num) + (safezoneY + (safezoneH - SIZEY)/2)) +#define X_PART(num) (W_PART(num) + (safeZoneX + (safeZoneW - SIZEX) / 2)) +#define Y_PART(num) (H_PART(num) + (safeZoneY + (safeZoneH - SIZEY) / 2)) + +#define CAN_CREATE_NONE -1 +#define CAN_CREATE_ADMIN 0 +#define CAN_CREATE_CONSOLE 1 +#define CAN_CREATE_ALL 2 diff --git a/addons/zeus/stringtable.xml b/addons/zeus/stringtable.xml index 76b0add7d2..59ba4129fc 100644 --- a/addons/zeus/stringtable.xml +++ b/addons/zeus/stringtable.xml @@ -1,4 +1,4 @@ - + @@ -321,6 +321,14 @@ 确认变更给所有编辑者 確認變更給所有編輯者 + + Additional Objects + Oggetti aggiuntivi + + + Additional objects to include in the action regardless of Task Radius + Oggetti aggiuntivi da includere nell'azione indipendentemente dal Raggio di Attività + Global AI Skill Compétence global de l'IA @@ -924,6 +932,18 @@ 需要一個不存在的插件 현재 없는 애드온을 필요로 합니다 + + None + Niente + + + Players + Giocatori + + + Players and AI + Giocati e AI + Add Objects to Curator Dodaj obiekt do kuratora @@ -971,6 +991,7 @@ Select cargo to unload 選擇要卸載的貨物 Scegli il carico da scaricare + 選択したカーゴを降ろす Task Radius @@ -1136,7 +1157,7 @@ 장비 추가 - Garrison group + Garrison Group Garnir zone 歩哨グループ Proteggi gruppo @@ -1208,7 +1229,7 @@ 순간이동 - Un-garrison group + Un-garrison Group Dégarnir zone 非歩哨グループ Non proteggere gruppo @@ -1408,54 +1429,6 @@ Устройство будет активно пытаться найти и перейти к соседним единицам активации. Диапазон автоматического поиска основан на умении снимать расстояние на расстоянии не менее 100 метров. La unidad intentará buscar activamente y moverse hacia las unidades cercanas del lado de activación. El rango de Auto Seek se basa en la habilidad de distancia al punto de la unidad con un mínimo de 100 metros. - - Small - - - Malý - Petit - Klein - Kicsi - Piccolo - - 작은 - Mały - Pequeno - Маленький - Pequeña - - - Medium - - - Střední - Moyen - Mittel - Közepes - medio - - 매질 - Średni - Médio - средний - Medio - - - Large - - - Velký - Grand - Groß - Nagy - Grande - - - Duży - ampla - большой - Grande - Unit is already a suicide bomber 這個單位已經是自殺炸彈手了 @@ -1486,5 +1459,17 @@ 移除ACE軍火庫 Rimuovi l'arsenale ACE + + Create Zeus + Создать Зевса + + + Delete Zeus + Удалить Зевса + + + "%1" menu + Меню "%1" + diff --git a/addons/zeus/ui/RscAttributes.hpp b/addons/zeus/ui/RscAttributes.hpp index 24114623d5..1174267466 100644 --- a/addons/zeus/ui/RscAttributes.hpp +++ b/addons/zeus/ui/RscAttributes.hpp @@ -86,7 +86,7 @@ class GVAR(RscEditableObjects): RscDisplayAttributes { x = 0; y = 0; w = W_PART(26); - h = H_PART(2.1); + h = H_PART(3.2); class controls { class EditingModeLabel: RscText { idc = -1; @@ -118,6 +118,17 @@ class GVAR(RscEditableObjects): RscDisplayAttributes { y = H_PART(1.1); strings[] = {ECSTRING(common,No), ECSTRING(common,Yes)}; }; + class AdditionalObjectsLabel: EditingModeLabel { + text = CSTRING(ModuleEditableObjects_AdditionalObjects); + tooltip = CSTRING(ModuleEditableObjects_AdditionalObjects_Tooltip); + y = H_PART(2.2); + }; + class AdditionalObjects: EditingMode { + idc = 19183; + y = H_PART(2.2); + columns = 3; + strings[] = {CSTRING(None), CSTRING(Players), CSTRING(PlayersAndAI)}; + }; }; }; }; @@ -350,7 +361,7 @@ class GVAR(RscTeleportPlayers): RscDisplayAttributes { x = 0; y = 0; w = W_PART(26); - h = H_PART(8.5); + h = H_PART(8.1); class controls { class Title: RscText { idc = -1; @@ -360,7 +371,7 @@ class GVAR(RscTeleportPlayers): RscDisplayAttributes { y = 0; w = W_PART(26); h = H_PART(1); - colorBackground[] = {0,0,0,0.5}; + colorBackground[] = {0, 0, 0, 0.5}; }; class Unit: RscListbox { idc = 16189; @@ -489,63 +500,66 @@ class GVAR(RscGarrison): RscDisplayAttributes { class Title: Title {}; class Content: Content { class Controls { + class radius: GVAR(AttributeRadius) {}; class Garrison: RscControlsGroupNoScrollbars { onSetFocus = QUOTE(_this call FUNC(ui_garrison)); idc = 73060; x = 0; y = 0; w = W_PART(26); - h = H_PART(8.5); + h = H_PART(6.2); class controls { - class radius: GVAR(AttributeRadius) {}; - class TopDownFillingTitle: Title { - idc = -1; - text = CSTRING(ModuleGarrison_TopDownFillingText); - toolTip = CSTRING(ModuleGarrison_TopDownFillingTooltip); - x = 0; - y = H_PART(1.2); - w = W_PART(10); - h = H_PART(1); - colorBackground[] = {0,0,0,0.5}; - }; - class TopDownFilling: RscCheckBox { - idc = 73061; - x = W_PART(10.1); - y = H_PART(1.2); - w = W_PART(1); - h = H_PART(1); - }; - class TeleportTitle: Title { + class TeleportLabel: RscText { idc = -1; text = CSTRING(ModuleGarrison_TeleportText); x = 0; - y = H_PART(2.3); + y = 0; w = W_PART(10); h = H_PART(1); - colorBackground[] = {0,0,0,0.5}; + colorBackground[] = {0, 0, 0, 0.5}; }; - class Teleport: RscCheckBox { - idc = 73062; + class Teleport: ctrlToolbox { + idc = 73061; x = W_PART(10.1); - y = H_PART(2.3); - w = W_PART(1); + y = 0; + w = W_PART(15.9); h = H_PART(1); + rows = 1; + columns = 2; + strings[] = {ECSTRING(common,No), ECSTRING(common,Yes)}; }; - class FillingModeTitle: RscText { - idc = -1; + class TopDownLabel: TeleportLabel { + text = CSTRING(ModuleGarrison_TopDownFillingText); + tooltip = CSTRING(ModuleGarrison_TopDownFillingTooltip); + y = H_PART(1.1); + }; + class TopDown: Teleport { + idc = 73062; + y = H_PART(1.1); + }; + class FillingModeLabel: TeleportLabel { text = CSTRING(ModuleGarrison_FillingModeText); - x = 0; - y = H_PART(3.5); + y = H_PART(2.2); w = W_PART(26); - h = H_PART(1); - colorBackground[] = {0,0,0,0.5}; }; class FillingMode: RscListbox { idc = 73063; x = 0; - y = H_PART(4.5); + y = H_PART(3.2); w = W_PART(26); - h = H_PART(4); + h = H_PART(3); + class Items { + class Even { + text = CSTRING(ModuleGarrison_FillingModeEven); + default = 1; + }; + class Building { + text = CSTRING(ModuleGarrison_FillingModeBuilding); + }; + class Random { + text = CSTRING(ModuleGarrison_FillingModeRandom); + }; + }; }; }; }; @@ -604,6 +618,29 @@ class GVAR(RscToggleNvg): RscDisplayAttributes { w = W_PART(15.9); h = H_PART(1); colorBackground[] = {0, 0, 0, 0.7}; + class Items { + class Group { + text = CSTRING(SelectedGroup); + picture = "\a3\ui_f_curator\data\displays\rscdisplaycurator\modegroups_ca.paa"; + default = 1; + }; + class BLUFOR { + text = "$STR_WEST"; + picture = "\a3\ui_f\data\map\diary\icons\playerwest_ca.paa"; + }; + class OPFOR { + text = "$STR_EAST"; + picture = "\a3\ui_f\data\map\diary\icons\playereast_ca.paa"; + }; + class Independent { + text = "$STR_guerrila"; + picture = "\a3\ui_f\data\map\diary\icons\playerguer_ca.paa"; + }; + class Civilian { + text = "$STR_Civilian"; + picture = "\a3\ui_f\data\map\diary\icons\playerciv_ca.paa"; + }; + }; }; }; }; @@ -670,6 +707,29 @@ class GVAR(RscToggleFlashlight): RscDisplayAttributes { w = W_PART(15.9); h = H_PART(1); colorBackground[] = {0, 0, 0, 0.7}; + class Items { + class Group { + text = CSTRING(SelectedGroup); + picture = "\a3\ui_f_curator\data\displays\rscdisplaycurator\modegroups_ca.paa"; + default = 1; + }; + class BLUFOR { + text = "$STR_WEST"; + picture = "\a3\ui_f\data\map\diary\icons\playerwest_ca.paa"; + }; + class OPFOR { + text = "$STR_EAST"; + picture = "\a3\ui_f\data\map\diary\icons\playereast_ca.paa"; + }; + class Independent { + text = "$STR_guerrila"; + picture = "\a3\ui_f\data\map\diary\icons\playerguer_ca.paa"; + }; + class Civilian { + text = "$STR_Civilian"; + picture = "\a3\ui_f\data\map\diary\icons\playerciv_ca.paa"; + }; + }; }; }; }; @@ -833,7 +893,7 @@ class GVAR(RscSuicideBomber): RscDisplayAttributes { h = H_PART(1); rows = 1; columns = 3; - strings[] = {CSTRING(ModuleSuicideBomber_Small), CSTRING(ModuleSuicideBomber_Medium), CSTRING(ModuleSuicideBomber_Large)}; + strings[] = {"$STR_small", "$STR_medium", "$STR_large"}; }; class AutoSeekLabel: DistanceLabel { idc = -1; diff --git a/docs/.gitattributes b/docs/.gitattributes index 3c59efe684..de2616570b 100644 --- a/docs/.gitattributes +++ b/docs/.gitattributes @@ -2,3 +2,4 @@ *.png binary *.jpg binary *.paa binary +*.sh eol=lf diff --git a/docs/README_DE.md b/docs/README_DE.md index 806c31cea0..4847ee7c01 100644 --- a/docs/README_DE.md +++ b/docs/README_DE.md @@ -4,7 +4,7 @@

- ACE3 Version + ACE3 Version ACE3 Fehlermeldungen @@ -18,8 +18,8 @@ ACE3 Slack - - ACE3 Build Status + + ACE3 Build Status

diff --git a/docs/README_PL.md b/docs/README_PL.md index 4f2c9b80b7..e75ba8691f 100644 --- a/docs/README_PL.md +++ b/docs/README_PL.md @@ -3,7 +3,7 @@

- ACE3 Wersja + ACE3 Wersja ACE3 Zagadnienia @@ -17,8 +17,8 @@ ACE3 Slack - - ACE3 Build Status + + ACE3 Build Status

Wymaga najnowszej wersji CBA A3. Odwiedź nas na Facebook | YouTube | Twitter | Reddit

diff --git a/docs/_config.yml b/docs/_config.yml index 18cefe6347..2ae92cadb6 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -9,16 +9,16 @@ ace: version: major: 3 minor: 12 - patch: 2 - build: 33 + patch: 3 + build: 36 acex: githubUrl: https://github.com/acemod/ACEX version: major: 3 minor: 3 - patch: 0 - build: 6 + patch: 1 + build: 8 markdown: kramdown diff --git a/docs/_config_dev.yml b/docs/_config_dev.yml index 0cf7b5256e..09dddceed8 100644 --- a/docs/_config_dev.yml +++ b/docs/_config_dev.yml @@ -9,16 +9,16 @@ ace: version: major: 3 minor: 12 - patch: 1 - build: 31 + patch: 3 + build: 36 acex: githubUrl: https://github.com/acemod/ACEX version: major: 3 minor: 3 - patch: 0 - build: 6 + patch: 1 + build: 8 markdown: kramdown diff --git a/docs/_includes/dependencies_list.md b/docs/_includes/dependencies_list.md index 40abe57472..df3b555b0e 100644 --- a/docs/_includes/dependencies_list.md +++ b/docs/_includes/dependencies_list.md @@ -451,7 +451,7 @@ {% endif %} {% if include.component == "compat_r3f" %} -`r3f_armes_c`, `r3f_armes`, `r3f_acc` +`r3f_armes_c`, `R3F_G17_addons`, `r3f_acc` {% endif %} {% if include.component == "compat_rh_acc" %} diff --git a/docs/team.md b/docs/team.md index 2dc5c9be62..4bbb9d64c5 100644 --- a/docs/team.md +++ b/docs/team.md @@ -1,149 +1,62 @@ --- -title: The Team +title: ACE3 Maintainers layout: page group: mainNav order: 3 --- -## ACE3 Project Lead +This page lists all current maintainers for the ACE3 projects with their areas of expertise and roles. -Name | Responsibilities ---- | --- -[bux](https://github.com/bux){:target="_blank"} | Scripting, Testing -[Felix Wiegand](https://github.com/koffeinflummi){:target="_blank"} | Scripting, Model Import -[Glowbal](https://github.com/glowbal){:target="_blank"} | Scripting, UI -[NouberNou](https://github.com/Noubernou){:target="_blank"} | Coding, Modeling, Performance, SME -[ViperMaul](https://github.com/vipermaul){:target="_blank"} | Project Manager +## Project maintainers -## ACE3 Core Team +This lists all the maintainers responsible for project management and the overall direction of the ACE3 project. -Name | Responsibilities ---- | --- -[BaerMitUmlaut](https://github.com/BaerMitUmlaut){:target="_blank"} | Scripting, Config -[commy2](https://github.com/commy2){:target="_blank"} | Scripting, Config -[esteldunedain](https://github.com/esteldunedain){:target="_blank"} | Scripting, Config -[Garth "L-H" de Wet](https://github.com/CorruptedHeart){:target="_blank"} | Scripting, Config -[Giallustio](https://github.com/Giallustio){:target="_blank"} | Scripting, Config, Model Import, Testing -gundy| Scripting -Janus | Small Models & Graphics -[jaynus](https://github.com/jaynus){:target="_blank"} | Coding, Performance, SME -[jokoho48](https://github.com/jokoho48){:target="_blank"} | Scripting, Model Editing / Import -[Jonpas](https://github.com/Jonpas){:target="_blank"} | Scripting, Tools, Documentation -[Kieran](https://github.com/kieran-s){:target="_blank"} | Scripting, Medical Consult (paramedic student) -[PabstMirror](https://github.com/PabstMirror){:target="_blank"} | Scripting, Config -[Ruthberg](https://github.com/ulteq){:target="_blank"} | Scripting, Config -[SilentSpike](https://github.com/SilentSpike){:target="_blank"} | Scripting, Config -tpM | ACSE Dev Lead - Sounds, SME -[VKing](https://github.com/VKing6){:target="_blank"} | Configs, Scripting, Testing, Model Editing, Regular Expressions +- [bux](https://github.com/bux){:target="_blank"} + - Scripting, Testing +- [Jonpas](https://github.com/Jonpas){:target="_blank"} + - Scripting, Tools, Documentation +- [Felix Wiegand](https://github.com/koffeinflummi){:target="_blank"} + - Scripting, Model Import +- [NouberNou](https://github.com/Noubernou){:target="_blank"} + - Coding, Modeling, Performance, SME +- [PabstMirror](https://github.com/PabstMirror){:target="_blank"} + - Scripting, Config +- [ViperMaul](https://github.com/vipermaul){:target="_blank"} + - Project management +- [Glowbal](https://github.com/thojkooi){:target="_blank"} + - Build automation, project management, architecture +## Core maintainers + +- [BaerMitUmlaut](https://github.com/BaerMitUmlaut){:target="_blank"} + - Scripting, Config +- [commy2](https://github.com/commy2){:target="_blank"} + - Scripting, Config +- [esteldunedain](https://github.com/esteldunedain){:target="_blank"} + - Scripting, Config +- [jaynus](https://github.com/jaynus){:target="_blank"} + - Coding, Performance, SME +- [jokoho48](https://github.com/jokoho48){:target="_blank"} + - Scripting, Model Editing / Import +- [SilentSpike](https://github.com/SilentSpike){:target="_blank"} + - Scripting, Config +- [Ruthberg](https://github.com/ulteq){:target="_blank"} + - Scripting, Config +- [VKing](https://github.com/VKing6){:target="_blank"} + - Configs, Scripting, Testing, Model Editing + +## Maintainers + +- [TheMagnetar](https://github.com/TheMagnetar){:target="_blank"} + - Scripting +- [Garth "L-H" de Wet](https://github.com/CorruptedHeart){:target="_blank"} + - Scripting, Config +- gundy +- Janus +- tpM +- [Kieran](https://github.com/kieran-s){:target="_blank"} +- [Giallustio](https://github.com/Giallustio){:target="_blank"} ## Contributors -* [BIG]Bull -* 11RDP-LoupVert -* 654wak654 -* ACCtomeek -* adam3adam -* Adanteh -* aeroson -* Aggr094 -* alef -* Aleksey EpMAK Yermakov -* Alganthe -* Andrea "AtixNeon" Verano -* Anthariel -* Anton -* Arkhir -* Asgar Serran -* BaerMitUmlaut -* Bamse -* Bla1337 -* BlackPixxel -* BlackQwar -* Brakoviejo -* Brisse -* Brostrom.A (Evul) -* BullHorn -* chris579 -* classicarma -* Clon1998 -* Codingboy -* Coren -* Crusty -* Dharma Bellamkonda -* Dimaslg -* dixon13 -* Drill -* Dudakov aka [OMCB]Kaban -* Dslyecxi -* ElTyranos -* eRazeri -* evromalarkey -* F3 Project -* Falke75 -* Ferenczi -* Ferenzi -* FFAAMOD -* Filip Basara -* fr89k -* FreeZbe -* geraldbolso1899 -* Ghost -* Gianmarco Varriale (TeamNuke) -* GieNkoV -* GitHawk -* gpgpgpgp -* Grey-Soldierman -* Grzegorz -* Hamburger SV -* Harakhti -* havena -* Hawkins -* Head -* Hybrid V -* Karneck -* Kavinsky -* Keithen -* Kllrt -* legman -* Legolasindar "Viper" -* licht-im-Norden87 -* looter -* Luigi "Luigium" Myrini -* Macusercom -* MarcBook -* meat -* Michail Nikolaev -* MikeMatrix -* nic547 -* nikolauska -* nomisum -* OnkelDisMaster -* oscarmolinadev -* PaxJaromeMalues -* Phyma -* pokertour -* Professor -* rakowozz -* ramius86 -* Raspu86 -* Riccardo Petricca -* Robert Boklahánics -* ruPaladin -* simon84 -* Skengman2 -* Sniperwolf572 -* System98 -* SzwedzikPL -* Tachi -* Tessa Elieff -* Toaster -* Tonic -* Tourorist -* Tuupertunut -* Valentin Torikian -* voiper -* VyMajoris(W-Cephei) -* Winter -* xrufix -* zGuba +An up-to-date list of our contributors can be found on Github at [acemod/ACE3/contributors](https://github.com/acemod/ACE3/graphs/contributors). diff --git a/docs/wiki/development/arma-3-scheduler-and-our-practices.md b/docs/wiki/development/arma-3-scheduler-and-our-practices.md index 773dc97924..2eb07d8bf3 100644 --- a/docs/wiki/development/arma-3-scheduler-and-our-practices.md +++ b/docs/wiki/development/arma-3-scheduler-and-our-practices.md @@ -1,6 +1,6 @@ --- layout: wiki -title: Arma 3 Scheduler And Our Practices +title: Arma 3 Scheduler and our Practices description: Explanation for certain ACE3 practices and rules regarding scheduled and unscheduled execution in Arma. group: development parent: wiki diff --git a/docs/wiki/development/documentation-guidelines-and-tips.md b/docs/wiki/development/documentation-guidelines-and-tips.md index ba2d14df13..5a508d14c6 100644 --- a/docs/wiki/development/documentation-guidelines-and-tips.md +++ b/docs/wiki/development/documentation-guidelines-and-tips.md @@ -1,6 +1,6 @@ --- layout: wiki -title: Documentation guidelines and tips +title: Documentation Guidelines and Tips group: development parent: wiki order: 19 diff --git a/docs/wiki/development/how-to-translate-ace3.md b/docs/wiki/development/how-to-translate-ace3.md index 3f57ee315e..6ceb41a01f 100644 --- a/docs/wiki/development/how-to-translate-ace3.md +++ b/docs/wiki/development/how-to-translate-ace3.md @@ -1,6 +1,6 @@ --- layout: wiki -title: How to translate ACE3 +title: How to Translate ACE3 description: This page describes in short how you can help translating ACE3 into your language. group: development parent: wiki diff --git a/docs/wiki/development/index.html b/docs/wiki/development/index.html index 8fdacb3d50..b9dcc99a95 100644 --- a/docs/wiki/development/index.html +++ b/docs/wiki/development/index.html @@ -1,5 +1,5 @@ --- -title: Development documentation +title: Development Documentation layout: default group: subNav order: 1 diff --git a/docs/wiki/development/modularity-and-pbo-structure.md b/docs/wiki/development/modularity-and-pbo-structure.md index 23dcf9a8f3..6f8ab50ef4 100644 --- a/docs/wiki/development/modularity-and-pbo-structure.md +++ b/docs/wiki/development/modularity-and-pbo-structure.md @@ -1,6 +1,6 @@ --- layout: wiki -title: Modularity And PBO Structure +title: Modularity and PBO Structure description: group: development parent: wiki diff --git a/docs/wiki/development/setting-up-the-development-environment.md b/docs/wiki/development/setting-up-the-development-environment.md index b1e8ba9bb3..4de655102d 100644 --- a/docs/wiki/development/setting-up-the-development-environment.md +++ b/docs/wiki/development/setting-up-the-development-environment.md @@ -1,6 +1,6 @@ --- layout: wiki -title: Setting Up The Development Environment +title: Setting Up the Development Environment description: This page describes how you can setup your development environment for ACE3, allowing you to properly build ACE and utilize file patching. group: development parent: wiki diff --git a/docs/wiki/feature/dagr.md b/docs/wiki/feature/dagr.md index 13e08811aa..f69793f1f9 100644 --- a/docs/wiki/feature/dagr.md +++ b/docs/wiki/feature/dagr.md @@ -1,6 +1,6 @@ --- layout: wiki -title: Dagr +title: DAGR description: Defense Advanced GPS Receiver. group: feature category: equipment diff --git a/docs/wiki/feature/fastroping.md b/docs/wiki/feature/fastroping.md index 86fe3de7c1..09b599c816 100644 --- a/docs/wiki/feature/fastroping.md +++ b/docs/wiki/feature/fastroping.md @@ -1,6 +1,6 @@ --- layout: wiki -title: Fastroping +title: Fast-Roping description: System for adding fast roping capabilities to helicopters. group: feature category: realism diff --git a/docs/wiki/feature/interact-menu.md b/docs/wiki/feature/interact-menu.md index c77e28d7f5..01a732cf7a 100644 --- a/docs/wiki/feature/interact-menu.md +++ b/docs/wiki/feature/interact-menu.md @@ -1,6 +1,6 @@ --- layout: wiki -title: Interact Menu +title: Interaction Menu description: Base framework for interaction menu. group: feature category: interaction diff --git a/docs/wiki/feature/spotting-scope.md b/docs/wiki/feature/spotting-scope.md index 72ee5e1cf3..d982eaa92c 100644 --- a/docs/wiki/feature/spotting-scope.md +++ b/docs/wiki/feature/spotting-scope.md @@ -1,6 +1,6 @@ --- layout: wiki -title: Spotting scope +title: Spotting Scope description: Adds a deployable spotting scope. group: feature category: equipment diff --git a/docs/wiki/feature/tacticallader.md b/docs/wiki/feature/tacticallader.md index 2ecba08931..135b56e5fc 100644 --- a/docs/wiki/feature/tacticallader.md +++ b/docs/wiki/feature/tacticallader.md @@ -1,6 +1,6 @@ --- layout: wiki -title: Tactical ladder +title: Tactical Ladder description: Adds a deployable ladder with adjustable height that you can transport on your back. group: feature category: equipment diff --git a/docs/wiki/framework/arsenal-framework.md b/docs/wiki/framework/arsenal-framework.md index eb30728169..9dd8767832 100644 --- a/docs/wiki/framework/arsenal-framework.md +++ b/docs/wiki/framework/arsenal-framework.md @@ -116,6 +116,8 @@ Both of them are optional. ## 4. Default loadouts +### 4.1 Adding default loadouts via 3DEN + While in 3DEN you have the ability to save default loadouts in ACE Arsenal, doing so will make the saved loadouts available to all players (those loadouts are still subject to loadout verification). To do so: - Open ACE Arsenal in 3DEN by editing a unit's loadout. @@ -125,6 +127,19 @@ To do so: This loadout list can be exported to the clipboard by using Shift. + LMB. on the export button, doing the same on the import button will import the list currently in the clipboard. +### 4.2 Adding default loadouts via script + +Since 3.13.0, you can also add default loadouts with the `ace_arsenal_fnc_addDefaultLoadout` function. +```cpp + * 0: Name of loadout + * 1: getUnitLoadout array +``` + +Example: +`["Squad Leader", getUnitLoadout sql1] call ace_arsenal_fnc_addDefaultLoadout` + +If a loadout with the same name exists, it will be overwritten. + ## 5. Stats ACE Arsenal stats are customizable, this will show you how. @@ -224,13 +239,48 @@ For config added stats the classname is used, for function added ones the string */ ``` +### 5.4 Stat tab numbers + +Left tabs: + +| Index | Name | +| ---- | ---- | +| 0 | Primary | +| 1 | Handgun | +| 2 | Launcher | +| 3 | Uniform | +| 4 | Vests | +| 5 | Backpacks | +| 6 | Headgear | +| 7 | Goggles | +| 8 | NVGs | +| 9 | Binoculars | +| 10 | Map | +| 11 | GPS | +| 12 | Radio | +| 13 | Compass | +| 14 | Watch | + +Right tabs: + +| Index | Name | +| ---- | ---- | +| 0 | Optics | +| 1 | Side accs | +| 2 | Muzzle | +| 3 | Bipod | +| 4 | Mag | +| 5 | Throw | +| 6 | Put | +| 7 | Misc | + #### 6.0 Eventhandlers All are local. -| Name | Arguments | -| ------------- | ------------- | -| ace_arsenal_displayOpened | Arsenal display (DISPLAY) | +| Name | Arguments | Added in | +| ------------- | ------------- | ------------- | +| ace_arsenal_displayOpened | Arsenal display (DISPLAY) | | ace_arsenal_displayClosed | None | | ace_arsenal_leftPanelFilled | Arsenal display (DISPLAY), current left panel IDC (SCALAR), current right panel IDC (SCALAR) | | ace_arsenal_rightPanelFilled | Arsenal display (DISPLAY), current left panel IDC (SCALAR), current right panel IDC (SCALAR) | @@ -241,3 +291,7 @@ All are local. | ace_arsenal_cargoChanged | Arsenal display (DISPLAY), item (STRING), add or remove (BOOL), shiftState (BOOL) | | ace_arsenal_loadoutImported | Arsenal display (DISPLAY), (import list (BOOL) | | ace_arsenal_loadoutExported | Arsenal display (DISPLAY), export list (BOOL) | +| ace_arsenal_loadoutsDisplayOpened | loadouts screen display (DISPLAY) | 3.12.3 | +| ace_arsenal_loadoutsDisplayClosed | None | 3.12.3 | +| ace_arsenal_loadoutsTabChanged | loadouts screen display (DISPLAY), tab control (CONTROL) | 3.12.3 | +| ace_arsenal_loadoutsListFilled | loadouts screen display (DISPLAY), tab control (CONTROL) | 3.12.3 | diff --git a/docs/wiki/framework/atragmx.md b/docs/wiki/framework/atragmx-framework.md similarity index 97% rename from docs/wiki/framework/atragmx.md rename to docs/wiki/framework/atragmx-framework.md index c999da9c99..822e4506be 100644 --- a/docs/wiki/framework/atragmx.md +++ b/docs/wiki/framework/atragmx-framework.md @@ -10,6 +10,7 @@ version: major: 3 minor: 0 patch: 0 +redirect_from: "/wiki/framework/atragmx.html" --- ## 1. Configs Values diff --git a/docs/wiki/framework/events-framework.md b/docs/wiki/framework/events-framework.md index 435db4e487..37214ba107 100644 --- a/docs/wiki/framework/events-framework.md +++ b/docs/wiki/framework/events-framework.md @@ -47,7 +47,7 @@ MenuType: 0 = Interaction, 1 = Self Interaction |`ace_interactMenuOpened` | [_menuType] | Local | Listen | Interaction Menu Opened |`ace_interactMenuClosed` | [_menuType] | Local | Listen | Interaction Menu Closed -### 2.4 Logistics (`ace_cargo`) +### 2.4 Cargo (`ace_cargo`) | Event Key | Parameters | Locality | Type | Description | |----------|---------|---------|---------|---------|---------| @@ -76,6 +76,18 @@ MenuType: 0 = Interaction, 1 = Self Interaction |----------|---------|---------|---------|---------|---------| |`ace_tagCreated` | [_tagObject, _texture, _tagAttachedTo (can be null), _unitThatCreated] | Global | Listen | Tag is created +### 2.8 Explosives (`ace_explosives`) + +| Event Key | Parameters | Locality | Type | Description | +|----------|---------|---------|---------|---------|---------| +|`ace_tripflareTriggered` | [_flareObject, [_posX, _posY, _posZ]] | Global | Listen | Tripflare triggered + +### 2.9 Logistics Wirecutter (`ace_logistics`) + +| Event Key | Parameters | Locality | Type | Description | +|----------|---------|---------|---------|---------|---------| +|`ace_wireCuttingStarted` | [_unit, _fence] | Global | Listen | Fence cutting started + ## 3. Usage Also Reference [CBA Events System](https://github.com/CBATeam/CBA_A3/wiki/Custom-Events-System){:target="_blank"} documentation. diff --git a/docs/wiki/frameworkx/fortify-framework.md b/docs/wiki/frameworkx/fortify-framework.md index 547dd180c7..045bc30e1a 100644 --- a/docs/wiki/frameworkx/fortify-framework.md +++ b/docs/wiki/frameworkx/fortify-framework.md @@ -64,6 +64,21 @@ class ACEX_Fortify_Presets { ``` Then you will have to set the mission preset to `myMissionObjects` with `#fortify blufor myMissionObjects` to enable it. + +## 1.3 Adding custom deploy handlers + +A custom deploy handler allows missions makers to decide if an object can be placed or not. + +To verify that an object isn't above a certain terrain height we can check the heigt of the object before it is confirmed as placed. Returning `false` from the code block means that placement is not allowed. + +```sqf +[{ + params ["_unit", "_object", "_cost"]; + private _return = (getPosATL _object) select 2 < 1; + _return +}] call acex_fortify_fnc_addDeployHandler; +``` + ## 2. Events @@ -73,3 +88,4 @@ Event Name | Passed Parameter(s) | Locality | Description ---------- | ----------- | ------------------- | -------- `acex_fortify_objectPlaced` | [player, side, objectPlaced] | Global | Foritfy object placed `acex_fortify_objectDeleted` | [player, side, objectDeleted] | Global | Foritfy object deleted +`acex_fortify_onDeployStart` | [player, object, cost] | Local | Player starts placing object diff --git a/docs/wiki/user/how-to-make-a-feature-request.md b/docs/wiki/user/how-to-make-a-feature-request.md index 2aade6e4f9..c1aae0fe6f 100644 --- a/docs/wiki/user/how-to-make-a-feature-request.md +++ b/docs/wiki/user/how-to-make-a-feature-request.md @@ -1,6 +1,6 @@ --- layout: wiki -title: How to make a feature request +title: How to Make a Feature Request description: ACE3 requires a special procedure to make feature requests. Because due to our current work load, in the period of weeks prior and posterior to the first release, new feature requests are under embargo. group: user order: 11 diff --git a/docs/wiki/user/how-to-report-an-issue.md b/docs/wiki/user/how-to-report-an-issue.md index 11d2023b02..2c244ebb2e 100644 --- a/docs/wiki/user/how-to-report-an-issue.md +++ b/docs/wiki/user/how-to-report-an-issue.md @@ -1,6 +1,6 @@ --- layout: wiki -title: How to report an issue +title: How to Report an Issue description: If you have found an issue with ACE3 please read this entry before reporting it. group: user order: 10 diff --git a/docs/wiki/user/installation-guide.md b/docs/wiki/user/installation-guide.md index 788e1745d5..95ae7dcc1d 100644 --- a/docs/wiki/user/installation-guide.md +++ b/docs/wiki/user/installation-guide.md @@ -65,7 +65,7 @@ Only use the optional components that correspond with your mod-pack. ### 6.1 Swifty -[Swifty](http://getswifty.net/){:target="_blank"} +[Swifty](https://getswifty.net/){:target="_blank"} - tbd ### 6.2 Arma3Sync @@ -79,8 +79,3 @@ Only use the optional components that correspond with your mod-pack. Arma3Sync Launcher - Click `Start Game` -### 6.3 Play withSIX - -[Play withSIX](http://withsix.com/p){:target="_blank"} - -- tbd diff --git a/extras/CfgWeaponsReference.hpp b/extras/CfgWeaponsReference.hpp index 15df01e306..7afe3164e8 100644 --- a/extras/CfgWeaponsReference.hpp +++ b/extras/CfgWeaponsReference.hpp @@ -1559,7 +1559,7 @@ class CfgWeapons ACE_barrelTwist=0.0; ACE_twistDirection=0; ACE_barrelLength=429.26; - } + }; class CUP_arifle_Mk16_CQC : Rifle_Base_F { ACE_barrelTwist=177.8; @@ -1891,4 +1891,4 @@ class CfgWeapons ACE_twistDirection=9.45; ACE_barrelLength=414.02; }; -}; \ No newline at end of file +}; diff --git a/mod.cpp b/mod.cpp index cbb26b3acb..b23f34ab79 100644 --- a/mod.cpp +++ b/mod.cpp @@ -1,8 +1,8 @@ -name = "Advanced Combat Environment 3.12.2"; +name = "Advanced Combat Environment 3.12.3"; picture = "logo_ace3_ca.paa"; actionName = "GitHub"; action = "https://github.com/acemod/ACE3"; -description = "ACE3 - Version 3.12.2"; +description = "ACE3 - Version 3.12.3"; logo = "logo_ace3_ca.paa"; logoOver = "logo_ace3_ca.paa"; tooltip = "ACE3"; diff --git a/optionals/compat_adr_97/stringtable.xml b/optionals/compat_adr_97/stringtable.xml index 698aafaacb..0023fde746 100644 --- a/optionals/compat_adr_97/stringtable.xml +++ b/optionals/compat_adr_97/stringtable.xml @@ -1,4 +1,4 @@ - + diff --git a/optionals/compat_r3f/CfgAmmo.hpp b/optionals/compat_r3f/CfgAmmo.hpp index a708d34e2d..1145e9ab0f 100644 --- a/optionals/compat_r3f/CfgAmmo.hpp +++ b/optionals/compat_r3f/CfgAmmo.hpp @@ -2,6 +2,7 @@ class CfgAmmo { class Default; class BulletBase; class R3F_9x19_Ball: BulletBase { // https://github.com/acemod/ACE3/blob/master/addons/ballistics/CfgAmmo.hpp#L370 + hit = 6; // R3F default value 13, BI default value 5 typicalSpeed = 350; // R3F config airFriction = -0.00201185; // ACE3 value, default -0.001413 ACE_caliber = 9.017; diff --git a/optionals/compat_r3f/CfgMagazines.hpp b/optionals/compat_r3f/CfgMagazines.hpp index 82247aa887..3a36eadfed 100644 --- a/optionals/compat_r3f/CfgMagazines.hpp +++ b/optionals/compat_r3f/CfgMagazines.hpp @@ -1,7 +1,7 @@ class CfgMagazines { class CA_magazine; class R3F_securite_mag: CA_magazine { - scope = 0; // default 2 + scope = 1; // Game Update 1.84: "Tweaked: Magazines can now be hidden in Virtual Arsenal by setting their scope to 1", R3F default value 2 }; class R3F_15Rnd_9x19_PAMAS: CA_magazine { initSpeed = 350; // R3F config @@ -9,6 +9,9 @@ class CfgMagazines { class R3F_15Rnd_9x19_HKUSP: CA_magazine { initSpeed = 350; // R3F config }; + class R3F_17Rnd_9x19_G17: CA_magazine { + initSpeed = 350; // R3F config + }; class R3F_30Rnd_9x19_MP5: CA_magazine { initSpeed = 400; // R3F config }; diff --git a/optionals/compat_r3f/CfgWeapons.hpp b/optionals/compat_r3f/CfgWeapons.hpp index 97fcb6c23e..e25f959009 100644 --- a/optionals/compat_r3f/CfgWeapons.hpp +++ b/optionals/compat_r3f/CfgWeapons.hpp @@ -23,10 +23,10 @@ class CfgWeapons { class R3F_Famas_F1_M203: R3F_Famas_F1 { muzzles[] = {"this","Lance_Grenades"}; }; - class R3F_Famas_surb: R3F_Famas_F1 { + class R3F_Famas_surb: R3F_Famas_F1 { // R3F FAMAS Surbaissé, should be FAMAS Valorisé : http://narval34.free.fr/fiche_tech_famas.pdf ACE_RailHeightAboveBore = 5.08219; - ACE_barrelTwist = 228.6; // 1:9" - ACE_barrelLength = 450.0; // Beretta barrel + ACE_barrelTwist = 228.6; // 1:9" FAMAS Surbaissé, should be 1:7" FAMAS Valorisé + ACE_barrelLength = 450.0; // 3D model with Beretta barrel : FAMAS Valorisé }; class R3F_Famas_surb_M203: R3F_Famas_surb { muzzles[] = {"this","Lance_Grenades"}; @@ -230,12 +230,27 @@ class CfgWeapons { ACE_barrelLength = 125.0; muzzles[] = {"this"}; initSpeed = -1.0; // default 410 + class Single: Mode_SemiAuto { + dispersion=0.0025; // 8.59 MOA (a square of 6.25/6.25cm at 25 meters), R3F default value 0.025 (85.94 MOA) + }; }; class R3F_HKUSP: Pistol_Base_F { ACE_barrelTwist = 250.0; ACE_barrelLength = 121.0; muzzles[] = {"this"}; initSpeed = -1.0; // default 410 + class Single: Mode_SemiAuto { + dispersion=0.002; // 6.88 MOA (a square of 5/5cm at 25 meters), R3F default value 0.02 (68.75 MOA) + }; + }; + class R3F_G17: Pistol_Base_F { + ACE_barrelTwist = 250.0; + ACE_barrelLength = 114.0; + muzzles[] = {"this"}; + initSpeed = -1.0; // default 410 + class Single: Mode_SemiAuto { + dispersion=0.0029; // R3F default value, 9.97 MOA (a square of 7.25/7.25cm at 25 meters) + }; }; class ItemCore; class InventoryOpticsItem_Base_F; @@ -265,6 +280,31 @@ class CfgWeapons { }; class R3F_FELIN_FRF2: ItemCore { ACE_ScopeHeightAboveRail = 4.28091; + class ItemInfo: InventoryOpticsItem_Base_F { + class OpticsModes { + class Felin {}; + class Oeilleton: Felin { + opticsID=2; + opticsDisplayName=""; + useModelOptics=0; + opticsPPEffects[]={}; + opticsFlare=0; + opticsDisablePeripherialVision=0; + opticsZoomMin=0.25; + opticsZoomMax=1.25; + opticsZoomInit=0.75; + memoryPointCamera="eye_Oeilleton"; + visionMode[]={}; + discretefov[]={}; + discreteDistance[]={200}; + discreteDistanceInitIndex=0; + distanceZoomMin=200; + distanceZoomMax=200; + discreteInitIndex=0; + cameraDir=""; + }; + }; + }; }; class R3F_J8: ItemCore { // http://www.scrome.com/assets/templates/flexibility/pdf/Scrome_Marksman_Scope_LTE_Datasheet_GB.pdf ACE_ScopeHeightAboveRail = 4.474; // Inaccurate BDC reticle, designed to work with the vanilla ballistic and R3F values. @@ -492,6 +532,6 @@ class ACE_ATragMX_Presets { }; class R3F_HK417L { // Profile Name, Muzzle Velocity, Zero Range, Scope Base Angle, AirFriction, Bore Height, Scope Unit, Scope Click Unit, Scope Click Number, Maximum Elevation, Dialed Elevation, Dialed Windage, Mass, Bullet Diameter, Rifle Twist, BC, Drag Model, Atmosphere Model, Muzzle Velocity vs. Temperature Interpolation, C1 Ballistic Coefficient vs. Distance Interpolation - preset[] = {"R3F HK417L M80", 820, 100, 0.0884448, -0.00103711, 7.62, 0, 2, 10, 120, 0, 0, 9.461, 7.82, 27.94, 0.398, 1, "ICAO", {{-15, 801},{0, 808},{10, 815},{15, 820},{25, 834},{30, 843},{35, 854}}, {{0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}, {0, 0}}}; + preset[] = {"R3F HK417L M80", 820, 100, 0.0884448, -0.00103711, 7.62, 0, 2, 10, 120, 0, 0, 9.461, 7.82, 27.94, 0.398, 1, "ICAO", {{-15, 801},{0, 808},{10, 815},{15, 820},{25, 834},{30, 843},{35, 854}}, {{200, 0.398}, {400, 0.398}, {600, 0.398}, {800, 0.39}, {1000, 0.383}, {1200, 0.379}, {1400, 0.378}}}; }; }; diff --git a/optionals/compat_r3f/config.cpp b/optionals/compat_r3f/config.cpp index c1263172d5..90218d7f04 100644 --- a/optionals/compat_r3f/config.cpp +++ b/optionals/compat_r3f/config.cpp @@ -6,7 +6,7 @@ class CfgPatches { units[] = {}; weapons[] = {}; requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"r3f_armes_c", "r3f_armes", "r3f_acc"}; + requiredAddons[] = {"r3f_armes_c", "R3F_G17_addons", "r3f_acc"}; author = ECSTRING(common,ACETeam); authors[] = {"Ruthberg"}; url = ECSTRING(main,URL); diff --git a/optionals/compat_rh_acc/CfgWeapons.hpp b/optionals/compat_rh_acc/CfgWeapons.hpp index df63559f06..001506ce8d 100644 --- a/optionals/compat_rh_acc/CfgWeapons.hpp +++ b/optionals/compat_rh_acc/CfgWeapons.hpp @@ -158,18 +158,4 @@ class CfgWeapons { }; }; }; - - /* Flashlights */ - class InventoryFlashLightItem_Base_F; - - class RH_SFM952V: ItemCore { - class ItemInfo: InventoryFlashLightItem_Base_F { - class FlashLight { - ACE_Flashlight_Colour = "white"; - ACE_Flashlight_Beam = QPATHTOEF(map,UI\Flashlight_beam_white_ca.paa); - ACE_Flashlight_Size = 2.75; - ACE_Flashlight_Sound = 1; - }; - }; - }; }; diff --git a/optionals/compat_rhs_afrf3/CfgMagazines.hpp b/optionals/compat_rhs_afrf3/CfgMagazines.hpp index d1229b5a61..1ce1a43b04 100644 --- a/optionals/compat_rhs_afrf3/CfgMagazines.hpp +++ b/optionals/compat_rhs_afrf3/CfgMagazines.hpp @@ -1,8 +1,8 @@ class cfgMagazines { class VehicleMagazine; - class rhs_30Rnd_545x39_AK; + class rhs_30Rnd_545x39_7N6_AK; - class rhs_100Rnd_762x54mmR: rhs_30Rnd_545x39_AK { + class rhs_100Rnd_762x54mmR: rhs_30Rnd_545x39_7N6_AK { ace_isbelt = 1; }; class rhs_mag_127x108mm_50: VehicleMagazine { diff --git a/optionals/compat_rhs_afrf3/CfgVehicles.hpp b/optionals/compat_rhs_afrf3/CfgVehicles.hpp index 6d27039836..068f22280c 100644 --- a/optionals/compat_rhs_afrf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_afrf3/CfgVehicles.hpp @@ -219,6 +219,30 @@ class CfgVehicles { EGVAR(refuel,fuelCapacity) = 500; }; + class StaticWeapon: LandVehicle { + class ACE_Actions { + class ACE_MainActions; + }; + }; + class StaticMGWeapon: StaticWeapon {}; + class AT_01_base_F: StaticMGWeapon {}; + + class rhs_SPG9_base: AT_01_base_F { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = ""; + }; + }; + }; + class rhs_Kornet_Base: AT_01_base_F { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = ""; + selection = "tripod"; + }; + }; + }; + class rhs_assault_umbts; class rhs_assault_umbts_engineer: rhs_assault_umbts { EGVAR(logistics_wirecutter,hasWirecutter) = 1; diff --git a/optionals/compat_rhs_afrf3/CfgWeapons.hpp b/optionals/compat_rhs_afrf3/CfgWeapons.hpp index 6dea9eb890..742841484d 100644 --- a/optionals/compat_rhs_afrf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_afrf3/CfgWeapons.hpp @@ -67,7 +67,7 @@ class CfgWeapons { ACE_barrelTwist = 240.03; ACE_barrelLength = 645.16; }; - class rhs_weap_rpk74m: rhs_weap_pkp { + class rhs_weap_rpk74: rhs_weap_pkp { ACE_barrelTwist = 195.072; ACE_barrelLength = 589.28; }; diff --git a/optionals/compat_rhs_afrf3/functions/fnc_onCut.sqf b/optionals/compat_rhs_afrf3/functions/fnc_onCut.sqf index 6a249a55c4..266fa5e223 100644 --- a/optionals/compat_rhs_afrf3/functions/fnc_onCut.sqf +++ b/optionals/compat_rhs_afrf3/functions/fnc_onCut.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Function for closing doors and retracting the hooks for RHS USF helos. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; _vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true]; diff --git a/optionals/compat_rhs_afrf3/functions/fnc_onPrepare.sqf b/optionals/compat_rhs_afrf3/functions/fnc_onPrepare.sqf index 8a9dc9471e..d5317192d1 100644 --- a/optionals/compat_rhs_afrf3/functions/fnc_onPrepare.sqf +++ b/optionals/compat_rhs_afrf3/functions/fnc_onPrepare.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Function for opening doors and extending the hook for most vanilla helos. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; _vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true]; diff --git a/optionals/compat_rhs_gref3/CfgMagazines.hpp b/optionals/compat_rhs_gref3/CfgMagazines.hpp new file mode 100644 index 0000000000..f5e84fca6c --- /dev/null +++ b/optionals/compat_rhs_gref3/CfgMagazines.hpp @@ -0,0 +1,9 @@ +class CfgMagazines { + class CA_Magazine; + class rhsgref_50Rnd_792x57_SmE_drum: CA_Magazine { // drum, but still just a belt + ACE_isBelt = 1; + }; + class rhsgref_296Rnd_792x57_SmE_belt: CA_Magazine { + ACE_isBelt = 1; + }; +}; diff --git a/optionals/compat_rhs_gref3/CfgVehicles.hpp b/optionals/compat_rhs_gref3/CfgVehicles.hpp new file mode 100644 index 0000000000..3ac81df2fe --- /dev/null +++ b/optionals/compat_rhs_gref3/CfgVehicles.hpp @@ -0,0 +1,7 @@ +class CfgVehicles { + class Rubber_duck_base_F; + class rhsgref_canoe_base: Rubber_duck_base_F { + // Canoes are propelled by paddlers + EGVAR(refuel,canReceive) = 0; + }; +}; diff --git a/optionals/compat_rhs_gref3/CfgWeapons.hpp b/optionals/compat_rhs_gref3/CfgWeapons.hpp index 7abf45e9a4..f7408af2ba 100644 --- a/optionals/compat_rhs_gref3/CfgWeapons.hpp +++ b/optionals/compat_rhs_gref3/CfgWeapons.hpp @@ -77,4 +77,7 @@ class CfgWeapons { ACE_barrelTwist=240; ACE_barrelLength=658; }; + class rhs_weap_mg42_base: Rifle_Base_F { + ACE_Overheating_allowSwapBarrel = 1; + }; }; diff --git a/optionals/compat_rhs_gref3/config.cpp b/optionals/compat_rhs_gref3/config.cpp index b7cef32194..a8f8e14773 100644 --- a/optionals/compat_rhs_gref3/config.cpp +++ b/optionals/compat_rhs_gref3/config.cpp @@ -8,10 +8,13 @@ class CfgPatches { requiredVersion = REQUIRED_VERSION; requiredAddons[] = {"rhsgref_main", "rhsgref_c_weapons"}; author = ECSTRING(common,ACETeam); + authors[] = {"PabstMirror", "Ruthberg", "Anton"}; url = ECSTRING(main,URL); VERSION_CONFIG; }; }; #include "CfgAmmo.hpp" +#include "CfgMagazines.hpp" #include "CfgWeapons.hpp" +#include "CfgVehicles.hpp" diff --git a/optionals/compat_rhs_usf3/CfgMagazineWells.hpp b/optionals/compat_rhs_usf3/CfgMagazineWells.hpp new file mode 100644 index 0000000000..6be0ec603f --- /dev/null +++ b/optionals/compat_rhs_usf3/CfgMagazineWells.hpp @@ -0,0 +1,5 @@ +class CfgMagazineWells { + class UGL_40x36 { // rhsusf\addons\rhsusf_c_weapons\cfgMagazineWells.hpp + ADDON[] = {"ACE_HuntIR_M203"}; + }; +}; diff --git a/optionals/compat_rhs_usf3/CfgMagazines.hpp b/optionals/compat_rhs_usf3/CfgMagazines.hpp index dd756c884e..9e595fddfb 100644 --- a/optionals/compat_rhs_usf3/CfgMagazines.hpp +++ b/optionals/compat_rhs_usf3/CfgMagazines.hpp @@ -2,14 +2,10 @@ class cfgMagazines { class CA_Magazine; class VehicleMagazine; class rhs_mag_30Rnd_556x45_M855A1_Stanag; - class rhs_mag_30Rnd_556x45_M200_Stanag; class rhsusf_100Rnd_556x45_soft_pouch: rhs_mag_30Rnd_556x45_M855A1_Stanag { ace_isbelt = 1; }; - class rhsusf_100Rnd_556x45_M200_soft_pouch: rhs_mag_30Rnd_556x45_M200_Stanag { - ace_isbelt = 1; - }; class rhsusf_50Rnd_762x51: CA_Magazine { ace_isbelt = 1; }; diff --git a/optionals/compat_rhs_usf3/CfgVehicles.hpp b/optionals/compat_rhs_usf3/CfgVehicles.hpp index 2684bd65f5..02c4fff408 100644 --- a/optionals/compat_rhs_usf3/CfgVehicles.hpp +++ b/optionals/compat_rhs_usf3/CfgVehicles.hpp @@ -89,7 +89,7 @@ class CfgVehicles { class Eventhandlers; }; class Heli_Transport_01_base_F: Helicopter_Base_H {}; - + class RHS_MELB_base: Helicopter_Base_H {}; class RHS_MELB_MH6M: RHS_MELB_base { EGVAR(fastroping,enabled) = 1; @@ -286,17 +286,32 @@ class CfgVehicles { EGVAR(cargo,space) = 4; EGVAR(cargo,hasCargo) = 1; }; - + + class StaticWeapon: LandVehicle { + class ACE_Actions { + class ACE_MainActions; + }; + }; + class StaticMortar: StaticWeapon {}; + class RHS_M252_Base: StaticMortar { + class ACE_Actions: ACE_Actions { + class ACE_MainActions: ACE_MainActions { + position = ""; + selection = "main_gun"; + }; + }; + }; + class rhsusf_infantry_usmc_base; class rhsusf_usmc_marpat_wd_helipilot: rhsusf_infantry_usmc_base { ace_gforcecoef = 0.55; }; - + class rhsusf_infantry_army_base; class rhsusf_army_ocp_helipilot: rhsusf_infantry_army_base { ace_gforcecoef = 0.55; }; - + class rhsusf_usmc_marpat_wd_rifleman_m4; class rhsusf_airforce_jetpilot: rhsusf_usmc_marpat_wd_rifleman_m4 { ace_gforcecoef = 0.55; diff --git a/optionals/compat_rhs_usf3/CfgWeapons.hpp b/optionals/compat_rhs_usf3/CfgWeapons.hpp index 84299450b2..190cbadd35 100644 --- a/optionals/compat_rhs_usf3/CfgWeapons.hpp +++ b/optionals/compat_rhs_usf3/CfgWeapons.hpp @@ -16,11 +16,6 @@ class CfgWeapons { class Rifle_Base_F; class srifle_EBR_F; class launch_O_Titan_F; - class UGL_F; - - class rhs_weap_M320_Base_F: Pistol_Base_F { // Standalone M320 (pistol slot) - magazines[] += {"ACE_HuntIR_M203"}; - }; class GM6_base_F; class rhs_weap_M107_Base_F: GM6_base_F { ACE_barrelTwist = 381.0; @@ -48,10 +43,6 @@ class CfgWeapons { ACE_RailHeightAboveBore = 2.56518; ACE_barrelTwist = 177.8; ACE_barrelLength = 368.3; - class M203_GL: UGL_F { - magazines[] += {"ACE_HuntIR_M203"}; - }; - // Added to the M320_GL in subConfig }; class rhs_weap_m4a1; class rhs_weap_hk416d10: rhs_weap_m4a1 { diff --git a/optionals/compat_rhs_usf3/config.cpp b/optionals/compat_rhs_usf3/config.cpp index 5847a2ac40..59aaa625bd 100644 --- a/optionals/compat_rhs_usf3/config.cpp +++ b/optionals/compat_rhs_usf3/config.cpp @@ -17,6 +17,7 @@ class CfgPatches { #include "CfgAmmo.hpp" #include "CfgEventHandlers.hpp" #include "CfgMagazines.hpp" +#include "CfgMagazineWells.hpp" #include "CfgWeapons.hpp" #include "CfgVehicles.hpp" #include "CfgGlasses.hpp" diff --git a/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf b/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf index 2395010624..3d793f08c8 100644 --- a/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf +++ b/optionals/compat_rhs_usf3/functions/fnc_canCloseDoor.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Checks if the door can be closed. @@ -15,7 +16,6 @@ * Public: No */ -#include "script_component.hpp" params ["_vehicle", "_door"]; (alive _vehicle) && diff --git a/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf b/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf index 8cbf1e2450..4547ca6b83 100644 --- a/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf +++ b/optionals/compat_rhs_usf3/functions/fnc_onCut.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Function for closing doors and retracting the hooks for RHS USF helos. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; _vehicle setVariable [QEGVAR(fastroping,doorsLocked), false, true]; diff --git a/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf b/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf index 2adb6f2b5e..cfd23da7b3 100644 --- a/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf +++ b/optionals/compat_rhs_usf3/functions/fnc_onPrepare.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut * Function for opening doors and extending the hook for most vanilla helos. @@ -13,8 +14,6 @@ * * Public: No */ - -#include "script_component.hpp" params ["_vehicle"]; _vehicle setVariable [QEGVAR(fastroping,doorsLocked), true, true]; diff --git a/optionals/compat_rhs_usf3/subConfig/config.cpp b/optionals/compat_rhs_usf3/subConfig/config.cpp deleted file mode 100644 index e3c3b30ae0..0000000000 --- a/optionals/compat_rhs_usf3/subConfig/config.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "\z\ace\addons\compat_rhs_usf3\script_component.hpp" -#undef COMPONENT -#define COMPONENT compat_rhs_usf3_sub - -class CfgPatches { - class ADDON { - name = COMPONENT_NAME; - units[] = {}; - weapons[] = {}; - requiredVersion = REQUIRED_VERSION; - requiredAddons[] = {"ace_compat_rhs_usf3"}; - author = ECSTRING(common,ACETeam); - url = ECSTRING(main,URL); - VERSION_CONFIG; - }; -}; - -class CfgWeapons { - class arifle_MX_Base_F; - class rhs_weap_m4_Base: arifle_MX_Base_F { - class M203_GL; - class M320_GL: M203_GL { - magazines[] += {"ACE_HuntIR_M203"}; - }; - }; -}; diff --git a/optionals/nouniformrestrictions/CfgVehicles.hpp b/optionals/nouniformrestrictions/CfgVehicles.hpp index 4a39a2436f..8d10f3f65f 100644 --- a/optionals/nouniformrestrictions/CfgVehicles.hpp +++ b/optionals/nouniformrestrictions/CfgVehicles.hpp @@ -20,6 +20,8 @@ class CfgVehicles { class O_Soldier_diver_base_F; class I_G_Sharpshooter_F; class B_Soldier_F; + class I_G_Soldier_LAT2_F; + class I_crew_F; class Civilian_F: Civilian { modelSides[] = {6}; @@ -234,6 +236,9 @@ class CfgVehicles { class I_Protagonist_VR_F: I_Soldier_base_F { modelSides[] = {6}; }; + class C_Protagonist_VR_F: C_man_1 { + modelSides[] = {6}; + }; class B_G_Sharpshooter_F: I_G_Sharpshooter_F { modelSides[] = {6}; }; @@ -258,4 +263,16 @@ class CfgVehicles { class C_IDAP_Man_Base_F: Civilian_F { modelSides[] = {6}; }; + class O_A_soldier_base_F: O_officer_F { + modelSides[] = {6}; + }; + class B_G_Soldier_LAT2_F: I_G_Soldier_LAT2_F { + modelSides[] = {6}; + }; + class O_G_Soldier_LAT2_F: I_G_Soldier_LAT2_F { + modelSides[] = {6}; + }; + class I_Story_Crew_F: I_crew_F { + modelSides[] = {6}; + }; }; diff --git a/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf b/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf index f5e3d0cb8b..b43a530728 100644 --- a/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf +++ b/optionals/nouniformrestrictions/functions/fnc_exportConfig.sqf @@ -1,3 +1,4 @@ +#include "script_component.hpp" /* * Author: BaerMitUmlaut, 654wak654 * Generates the CfgVehicles config to allow uniform usage on all sides. @@ -13,7 +14,6 @@ * * Public: Yes */ -#include "script_component.hpp" private _modifyClasses = []; private _baseClasses = []; diff --git a/optionals/tracers/CfgAmmo.hpp b/optionals/tracers/CfgAmmo.hpp index a432be3286..c1d83fcbdf 100644 --- a/optionals/tracers/CfgAmmo.hpp +++ b/optionals/tracers/CfgAmmo.hpp @@ -5,21 +5,34 @@ class CfgAmmo { class SubmunitionBullet; //No idea - class B_56x15_dual: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_56x15_dual: BulletBase {model = PATHTOF(ace_TracerWhite2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white //Pistol - class B_9x21_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_9x21_Ball: BulletBase {model = PATHTOF(ace_TracerWhite2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white class B_9x21_Ball_Tracer_Green: B_9x21_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_9x21_Ball_Tracer_Red: B_9x21_Ball_Tracer_Green {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red + class B_9x21_Ball_Tracer_Yellow: B_9x21_Ball_Tracer_Green {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + class Sub_F_Signal_Green: B_9x21_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class Sub_F_Signal_Red: Sub_F_Signal_Green {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red class B_45ACP_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red class B_45ACP_Ball_Green: B_45ACP_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green class B_45ACP_Ball_Yellow: B_45ACP_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow //Assault rifle + + class B_50BW_Ball_F: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; + + class B_545x39_Ball_F: BulletBase {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + class B_545x39_Ball_Green_F: B_545x39_Ball_F {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + class B_556x45_Ball: BulletBase {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow class B_556x45_Ball_Tracer_Red: B_556x45_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red class B_556x45_Ball_Tracer_Green: B_556x45_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green class B_556x45_Ball_Tracer_Yellow: B_556x45_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + // class B_556x45_Ball_Tracer_White: B_556x45_Ball {model = PATHTOF(ace_TracerWhite2.p3d);}; //New class for testing + + class B_580x42_Ball_F: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; class B_65x39_Caseless: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red class B_65x39_Caseless_green: B_65x39_Caseless {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green @@ -34,8 +47,11 @@ class CfgAmmo { class B_65x39_Minigun_Caseless_Yellow_splash: B_65x39_Minigun_Caseless_Red_splash {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow class B_65x39_Minigun_Caseless_Green_splash: B_65x39_Minigun_Caseless_Red_splash {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green + class B_762x39_Ball_F: BulletBase {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + class B_762x39_Ball_Green_F: B_762x39_Ball_F {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow + //Battle rifle - class B_762x51_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_762x51_Ball: BulletBase {model = PATHTOF(ace_TracerWhite2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white class B_762x51_Tracer_Red: B_762x51_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red class B_762x51_Tracer_Green: B_762x51_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green class B_762x51_Tracer_Yellow: B_762x51_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow @@ -52,7 +68,7 @@ class CfgAmmo { class B_762x54_Tracer_Yellow: B_762x54_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow //Sniper rifle - class B_127x99_Ball: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_127x99_Ball: BulletBase {model = PATHTOF(ace_TracerWhite2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white class B_127x99_Ball_Tracer_Red: B_127x99_Ball {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red class B_127x99_Ball_Tracer_Green: B_127x99_Ball {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green class B_127x99_Ball_Tracer_Yellow: B_127x99_Ball {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow @@ -76,7 +92,7 @@ class CfgAmmo { class B_93x64_Ball: BulletBase {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green //Autocannon - class B_19mm_HE: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_19mm_HE: BulletBase {model = PATHTOF(ace_TracerWhite2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white class B_30mm_HE; class B_30mm_HE_Tracer_Red: B_30mm_HE {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red @@ -96,9 +112,9 @@ class CfgAmmo { class B_20mm: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red class B_20mm_Tracer_Red: B_20mm {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red - class B_25mm: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_25mm: BulletBase {model = PATHTOF(ace_TracerWhite2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white - class B_30mm_AP: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_30mm_AP: BulletBase {model = PATHTOF(ace_TracerWhite2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white class B_30mm_AP_Tracer_Red: B_30mm_AP {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red class B_30mm_AP_Tracer_Green: B_30mm_AP {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green class B_30mm_AP_Tracer_Yellow: B_30mm_AP {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow @@ -113,7 +129,7 @@ class CfgAmmo { class B_40mm_APFSDS_Tracer_Green: B_40mm_APFSDS {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green class B_40mm_APFSDS_Tracer_Yellow: B_40mm_APFSDS {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow - class B_35mm_AA: BulletBase {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white + class B_35mm_AA: BulletBase {model = PATHTOF(ace_TracerWhite2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_white class B_35mm_AA_Tracer_Red: B_35mm_AA {model = PATHTOF(ace_TracerRed2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_red class B_35mm_AA_Tracer_Green: B_35mm_AA {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green class B_35mm_AA_Tracer_Yellow: B_35mm_AA {model = PATHTOF(ace_TracerYellow2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_yellow @@ -122,12 +138,12 @@ class CfgAmmo { class Cannon_30mm_HE_Plane_CAS_02_F: Gatling_30mm_HE_Plane_CAS_01_F {model = PATHTOF(ace_TracerGreen2.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\tracer_green.p3d //Cannon - class Sh_120mm_HE: ShellBase {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_white + class Sh_120mm_HE: ShellBase {model = PATHTOF(ace_shell_tracer_white.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_white class Sh_120mm_HE_Tracer_Red: Sh_120mm_HE {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red class Sh_120mm_HE_Tracer_Green: Sh_120mm_HE {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green class Sh_120mm_HE_Tracer_Yellow: Sh_120mm_HE {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow - class Sh_120mm_APFSDS: ShellBase {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_white + class Sh_120mm_APFSDS: ShellBase {model = PATHTOF(ace_shell_tracer_white.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_white class Sh_120mm_APFSDS_Tracer_Red: Sh_120mm_APFSDS {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red class Sh_120mm_APFSDS_Tracer_Green: Sh_120mm_APFSDS {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green class Sh_120mm_APFSDS_Tracer_Yellow: Sh_120mm_APFSDS {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow @@ -156,4 +172,4 @@ class CfgAmmo { class Sh_105mm_HEAT_MP_T_Red: Sh_105mm_HEAT_MP {model = PATHTOF(ace_shell_tracer_red.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_red class Sh_105mm_HEAT_MP_T_Green: Sh_105mm_HEAT_MP {model = PATHTOF(ace_shell_tracer_green.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_green class Sh_105mm_HEAT_MP_T_Yellow: Sh_105mm_HEAT_MP {model = PATHTOF(ace_shell_tracer_yellow.p3d);}; //Replaces \A3\Weapons_f\Data\bullettracer\shell_tracer_yellow -}; \ No newline at end of file +}; diff --git a/optionals/tracers/ace_TracerWhite2.p3d b/optionals/tracers/ace_TracerWhite2.p3d new file mode 100644 index 0000000000..40b6df46ee Binary files /dev/null and b/optionals/tracers/ace_TracerWhite2.p3d differ diff --git a/optionals/tracers/ace_shell_tracer_green.p3d b/optionals/tracers/ace_shell_tracer_green.p3d index 64963617d7..ff103a7d3b 100644 Binary files a/optionals/tracers/ace_shell_tracer_green.p3d and b/optionals/tracers/ace_shell_tracer_green.p3d differ diff --git a/optionals/tracers/ace_shell_tracer_red.p3d b/optionals/tracers/ace_shell_tracer_red.p3d index 622427ca63..72c546d549 100644 Binary files a/optionals/tracers/ace_shell_tracer_red.p3d and b/optionals/tracers/ace_shell_tracer_red.p3d differ diff --git a/optionals/tracers/ace_shell_tracer_white.p3d b/optionals/tracers/ace_shell_tracer_white.p3d new file mode 100644 index 0000000000..77f1ae8163 Binary files /dev/null and b/optionals/tracers/ace_shell_tracer_white.p3d differ diff --git a/optionals/tracers/ace_shell_tracer_yellow.p3d b/optionals/tracers/ace_shell_tracer_yellow.p3d index 3d2de95cf9..8805194838 100644 Binary files a/optionals/tracers/ace_shell_tracer_yellow.p3d and b/optionals/tracers/ace_shell_tracer_yellow.p3d differ diff --git a/optionals/tracers/config.cpp b/optionals/tracers/config.cpp index 8b44cec0d3..200b24cf57 100644 --- a/optionals/tracers/config.cpp +++ b/optionals/tracers/config.cpp @@ -15,3 +15,27 @@ class CfgPatches { }; #include "CfgAmmo.hpp" + +// CfgMagazines and CfgWeapons are included for testing only and may be removed for release version. +// There is also an ammo class B_556x45_Ball_Tracer_White commented out in CfgAmmo +// this should also be uncommented when testing white tracers. +/* +class CfgMagazines { + class 200Rnd_556x45_Box_Tracer_F; + class 200Rnd_556x45_Box_Green_F : 200Rnd_556x45_Box_Tracer_F { + ammo = "B_556x45_Ball_Tracer_Green"; + displayName = "5.56 mm 200Rnd Tracer (Green) Box"; + }; + class 200Rnd_556x45_Box_White_F : 200Rnd_556x45_Box_Tracer_F { + ammo = "B_556x45_Ball_Tracer_White"; + displayName = "5.56 mm 200Rnd Tracer (White) Box"; + }; +}; + +class CfgWeapons { + class LMG_03_base_F; + class LMG_03_F : LMG_03_base_F { + magazines[] = {"200Rnd_556x45_Box_F","200Rnd_556x45_Box_Red_F","200Rnd_556x45_Box_Tracer_F","200Rnd_556x45_Box_Tracer_Red_F","200Rnd_556x45_Box_Green_F","200Rnd_556x45_Box_White_F"}; + }; +}; +*/ diff --git a/optionals/tracers/data/SLX_GreenTracer_Material.rvmat b/optionals/tracers/data/SLX_GreenTracer_Material.rvmat index 55cd8f6295..f5de615298 100644 --- a/optionals/tracers/data/SLX_GreenTracer_Material.rvmat +++ b/optionals/tracers/data/SLX_GreenTracer_Material.rvmat @@ -1,8 +1,8 @@ ambient[] = {0.2, 0.8, 0.1, 1}; diffuse[] = {0.2, 0.8, 0.1, 1}; forcedDiffuse[] = {0.2, 0.8, 0.1, 1}; -emmisive[] = {0.2, 0.8, 0.1, 1}; -specular[] = {0.0, 0.0, 0.0, 0.0}; +emmisive[] = {100, 400, 100, 1}; +specular[] = {0, 0, 0, 0}; specularPower = 0.0; renderFlags[] = {"NoZWrite", "NoAlphaWrite", "AddBlend"}; PixelShaderID = "Normal"; diff --git a/optionals/tracers/data/SLX_RedTracer_Material.rvmat b/optionals/tracers/data/SLX_RedTracer_Material.rvmat index a4b990f2d7..7bc0b7c298 100644 --- a/optionals/tracers/data/SLX_RedTracer_Material.rvmat +++ b/optionals/tracers/data/SLX_RedTracer_Material.rvmat @@ -1,8 +1,8 @@ ambient[] = {0.8, 0.1, 0.1, 1}; diffuse[] = {0.8, 0.1, 0.1, 1}; forcedDiffuse[] = {0.8, 0.1, 0.1, 1}; -emmisive[] = {0.8, 0.1, 0.1, 1}; -specular[] = {0.0, 0.0, 0.0, 0.0}; +emmisive[] = {1000, 100, 10, 1}; +specular[] = {0, 0, 0, 0}; specularPower = 0.0; renderFlags[] = {"NoZWrite", "NoAlphaWrite", "AddBlend"}; PixelShaderID = "Normal"; diff --git a/optionals/tracers/data/SLX_WhiteTracer_Material.rvmat b/optionals/tracers/data/SLX_WhiteTracer_Material.rvmat new file mode 100644 index 0000000000..8f2318885c --- /dev/null +++ b/optionals/tracers/data/SLX_WhiteTracer_Material.rvmat @@ -0,0 +1,9 @@ +ambient[] = {1, 0.98, 0.98, 1}; +diffuse[] = {1, 0.98, 0.98, 1}; +forcedDiffuse[] = {1, 0.98, 0.98, 1}; +emmisive[] = {250, 250, 400, 1}; +specular[] = {0, 0, 0, 0}; +specularPower = 0.0; +renderFlags[] = {"NoZWrite", "NoAlphaWrite", "AddBlend"}; +PixelShaderID = "Normal"; +VertexShaderID = "Basic"; diff --git a/optionals/tracers/data/SLX_YellowTracer_Material.rvmat b/optionals/tracers/data/SLX_YellowTracer_Material.rvmat index e139bd9aa8..fa810aab32 100644 --- a/optionals/tracers/data/SLX_YellowTracer_Material.rvmat +++ b/optionals/tracers/data/SLX_YellowTracer_Material.rvmat @@ -1,8 +1,8 @@ ambient[] = {1, 0.98, 0.137, 1}; diffuse[] = {1, 0.98, 0.137, 1}; forcedDiffuse[] = {1, 0.98, 0.137, 1}; -emmisive[] = {1, 0.98, 0.137, 1}; -specular[] = {0.0, 0.0, 0.0, 0.0}; +emmisive[] = {500, 500, 0, 1}; +specular[] = {0, 0, 0, 0}; specularPower = 0.0; renderFlags[] = {"NoZWrite", "NoAlphaWrite", "AddBlend"}; PixelShaderID = "Normal"; diff --git a/optionals/tracers/data/TracerWhite.paa b/optionals/tracers/data/TracerWhite.paa new file mode 100644 index 0000000000..7388bd20a2 Binary files /dev/null and b/optionals/tracers/data/TracerWhite.paa differ diff --git a/optionals/tracers/data/tracer_green.rvmat b/optionals/tracers/data/tracer_green.rvmat index dc6daa6143..dd352adb2a 100644 --- a/optionals/tracers/data/tracer_green.rvmat +++ b/optionals/tracers/data/tracer_green.rvmat @@ -1,18 +1,9 @@ -//////////////////////////////////////////////////////////////////// -//Produced from mikero's Dos Tools using dll 3.17 -//http://dev-heaven.net/projects/list_files/mikero-pbodll -//////////////////////////////////////////////////////////////////// - -#define _ARMA_ - -//Class weapons : Data\bullettracer\Data\tracer_green.rvmat{ -ambient[] = {1.0,1.0,1.0,3.25}; -diffuse[] = {1.0,1.0,1.0,1.0}; -forcedDiffuse[] = {0.0,0.0,0.0,0.0}; -emmisive[] = {1.0,1.0,1.0,1.0}; -specular[] = {0.0,0.0,0.0,1.0}; +ambient[] = {1,1,1,3.25}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {100, 400, 100, 1}; +specular[] = {0,0,0,1}; specularPower = 1.0; -renderFlags[] = {"NoZWrite","AddBlend"}; +renderFlags[] = {"NoZWrite", "NoAlphaWrite", "AddBlend"}; PixelShaderID = "Normal"; VertexShaderID = "Basic"; -//}; diff --git a/optionals/tracers/data/tracer_green1_ca.paa b/optionals/tracers/data/tracer_green1_ca.paa index a8960e69f8..1a1f48e62d 100644 Binary files a/optionals/tracers/data/tracer_green1_ca.paa and b/optionals/tracers/data/tracer_green1_ca.paa differ diff --git a/optionals/tracers/data/tracer_red.rvmat b/optionals/tracers/data/tracer_red.rvmat index f5565e39b2..ff5f3fcd2d 100644 --- a/optionals/tracers/data/tracer_red.rvmat +++ b/optionals/tracers/data/tracer_red.rvmat @@ -1,18 +1,9 @@ -//////////////////////////////////////////////////////////////////// -//Produced from mikero's Dos Tools using dll 3.17 -//http://dev-heaven.net/projects/list_files/mikero-pbodll -//////////////////////////////////////////////////////////////////// - -#define _ARMA_ - -//Class weapons : Data\bullettracer\Data\tracer_red.rvmat{ -ambient[] = {1.0,1.0,1.0,3.25}; -diffuse[] = {1.0,1.0,1.0,1.0}; -forcedDiffuse[] = {0.0,0.0,0.0,0.0}; -emmisive[] = {1.0,1.0,1.0,1.0}; -specular[] = {0.0,0.0,0.0,1.0}; +ambient[] = {1,1,1,3.25}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {1000, 100, 10, 1}; +specular[] = {0,0,0,1}; specularPower = 1.0; -renderFlags[] = {"NoZWrite","AddBlend"}; +renderFlags[] = {"NoZWrite", "NoAlphaWrite", "AddBlend"}; PixelShaderID = "Normal"; VertexShaderID = "Basic"; -//}; diff --git a/optionals/tracers/data/tracer_red1_ca.paa b/optionals/tracers/data/tracer_red1_ca.paa index 171325cc55..4f32204dfb 100644 Binary files a/optionals/tracers/data/tracer_red1_ca.paa and b/optionals/tracers/data/tracer_red1_ca.paa differ diff --git a/optionals/tracers/data/tracer_white.rvmat b/optionals/tracers/data/tracer_white.rvmat new file mode 100644 index 0000000000..bed8419b18 --- /dev/null +++ b/optionals/tracers/data/tracer_white.rvmat @@ -0,0 +1,9 @@ +ambient[] = {1,1,1,3.25}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {250, 250, 400, 1}; +specular[] = {0,0,0,1}; +specularPower = 1.0; +renderFlags[] = {"NoZWrite", "NoAlphaWrite", "AddBlend"}; +PixelShaderID = "Normal"; +VertexShaderID = "Basic"; diff --git a/optionals/tracers/data/tracer_white1_ca.paa b/optionals/tracers/data/tracer_white1_ca.paa new file mode 100644 index 0000000000..aa96373a4c Binary files /dev/null and b/optionals/tracers/data/tracer_white1_ca.paa differ diff --git a/optionals/tracers/data/tracer_yellow.rvmat b/optionals/tracers/data/tracer_yellow.rvmat index 757791f1b9..112d055311 100644 --- a/optionals/tracers/data/tracer_yellow.rvmat +++ b/optionals/tracers/data/tracer_yellow.rvmat @@ -1,18 +1,9 @@ -//////////////////////////////////////////////////////////////////// -//Produced from mikero's Dos Tools using dll 3.17 -//http://dev-heaven.net/projects/list_files/mikero-pbodll -//////////////////////////////////////////////////////////////////// - -#define _ARMA_ - -//Class weapons : Data\bullettracer\Data\tracer_yellow.rvmat{ -ambient[] = {1.0,1.0,1.0,3.25}; -diffuse[] = {1.0,1.0,1.0,1.0}; -forcedDiffuse[] = {0.0,0.0,0.0,0.0}; -emmisive[] = {1.0,1.0,1.0,1.0}; -specular[] = {0.0,0.0,0.0,1.0}; +ambient[] = {1,1,1,3.25}; +diffuse[] = {1,1,1,1}; +forcedDiffuse[] = {0,0,0,0}; +emmisive[] = {500, 500, 0, 1}; +specular[] = {0,0,0,1}; specularPower = 1.0; -renderFlags[] = {"NoZWrite","AddBlend"}; +renderFlags[] = {"NoZWrite", "NoAlphaWrite", "AddBlend"}; PixelShaderID = "Normal"; VertexShaderID = "Basic"; -//}; diff --git a/optionals/tracers/data/tracer_yellow1_ca.paa b/optionals/tracers/data/tracer_yellow1_ca.paa index f895ffe6e3..237e5b08f6 100644 Binary files a/optionals/tracers/data/tracer_yellow1_ca.paa and b/optionals/tracers/data/tracer_yellow1_ca.paa differ diff --git a/tools/sqf_validator.py b/tools/sqf_validator.py index c824b35268..c45f0f94f2 100644 --- a/tools/sqf_validator.py +++ b/tools/sqf_validator.py @@ -8,7 +8,7 @@ import sys import argparse def validKeyWordAfterCode(content, index): - keyWords = ["for", "do", "count", "each", "forEach", "else", "and", "not", "isEqualTo", "in", "call", "spawn", "execVM", "catch", "param", "select", "apply"]; + keyWords = ["for", "do", "count", "each", "forEach", "else", "and", "not", "isEqualTo", "in", "call", "spawn", "execVM", "catch", "param", "select", "apply", "findIf", "remoteExec"]; for word in keyWords: try: subWord = content.index(word, index, index+len(word)) @@ -47,7 +47,7 @@ def check_sqf_syntax(filepath): inStringType = ''; lastIsCurlyBrace = False - checkForSemiColumn = False + checkForSemicolon = False # Extra information so we know what line we find errors at lineNumber = 1 @@ -57,7 +57,8 @@ def check_sqf_syntax(filepath): for c in content: if (lastIsCurlyBrace): lastIsCurlyBrace = False - checkForSemiColumn = True + # Test generates false positives with binary commands that take CODE as 2nd arg (e.g. findIf) + checkForSemicolon = not re.search('findIf', content, re.IGNORECASE) if c == '\n': # Keeping track of our line numbers lineNumber += 1 # so we can print accurate line number information when we detect a possible error @@ -113,11 +114,11 @@ def check_sqf_syntax(filepath): print("ERROR: Tab detected at {0} Line number: {1}".format(filepath,lineNumber)) bad_count_file += 1 - if (checkForSemiColumn): + if (checkForSemicolon): if (c not in [' ', '\t', '\n', '/']): # keep reading until no white space or comments - checkForSemiColumn = False + checkForSemicolon = False if (c not in [']', ')', '}', ';', ',', '&', '!', '|', '='] and not validKeyWordAfterCode(content, indexOfCharacter)): # , 'f', 'd', 'c', 'e', 'a', 'n', 'i']): - print("ERROR: Possible missing semi-column ';' detected at {0} Line number: {1}".format(filepath,lineNumber)) + print("ERROR: Possible missing semicolon ';' detected at {0} Line number: {1}".format(filepath,lineNumber)) bad_count_file += 1 else: # Look for the end of our comment block @@ -139,6 +140,13 @@ def check_sqf_syntax(filepath): if brackets_list.count('{') != brackets_list.count('}'): print("ERROR: A possible missing curly brace {{ or }} in file {0} {{ = {1} }} = {2}".format(filepath,brackets_list.count('{'),brackets_list.count('}'))) bad_count_file += 1 + pattern = re.compile('\s*(/\*[\s\S]+?\*/)\s*#include') + if pattern.match(content): + print("ERROR: A found #include after block comment in file {0}".format(filepath)) + bad_count_file += 1 + + + return bad_count_file def main():