mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into SettingsMenuImprovements
Conflicts: addons/optionsmenu/functions/fnc_onListBoxSettingsChanged.sqf addons/optionsmenu/functions/fnc_onListBoxShowSelectionChanged.sqf addons/optionsmenu/functions/fnc_onSettingsMenuOpen.sqf addons/optionsmenu/functions/fnc_onSliderPosChanged.sqf addons/optionsmenu/functions/fnc_resetSettings.sqf addons/optionsmenu/functions/fnc_settingsMenuUpdateKeyView.sqf addons/optionsmenu/functions/fnc_settingsMenuUpdateList.sqf addons/optionsmenu/functions/fnc_updateSetting.sqf addons/optionsmenu/gui/settingsMenu.hpp
This commit is contained in:
commit
4f08d0d006
14
README.md
14
README.md
@ -1,21 +1,23 @@
|
||||
<p align="center">
|
||||
<img src="https://raw.githubusercontent.com/KoffeinFlummi/ACE3/new-readme/extras/logo.png?token=ACU2mWeJUeshQIVc52XPoNiPpc3PzTauks5Uv24rwA%3D%3D" height="150px" /><br />
|
||||
<img src="https://github.com/KoffeinFlummi/ACE3/blob/master/extras/assets/logo/black/ACE3-Logo.jpg" height="80" />
|
||||
</p>
|
||||
<p align="center">
|
||||
<a href="https://github.com/KoffeinFlummi/ACE3/releases">
|
||||
<img src="http://img.shields.io/badge/release-3.0-green.svg?style=flat" alt="ACE version">
|
||||
</a>
|
||||
<a href="#">
|
||||
<a href="#">
|
||||
<img src="http://img.shields.io/badge/download-22_MB-blue.svg?style=flat" alt="ACE download">
|
||||
</a>
|
||||
<a href="https://github.com/KoffeinFlummi/ACE3/issues">
|
||||
<a href="https://github.com/KoffeinFlummi/ACE3/issues">
|
||||
<img src="http://img.shields.io/github/issues/KoffeinFlummi/ACE3.svg?style=flat" alt="ACE issues">
|
||||
</a>
|
||||
<a href="https://github.com/KoffeinFlummi/ACE3/blob/master/LICENSE">
|
||||
<a href="https://github.com/KoffeinFlummi/ACE3/blob/master/LICENSE">
|
||||
<img src="http://img.shields.io/badge/license-GPLv2-red.svg?style=flat" alt="ACE license">
|
||||
</a>
|
||||
</p>
|
||||
<p align="center"><sup><strong>Requires the latest version of <a href="http://www.armaholic.com/page.php?id=18767">CBA A3</a> | <a href="#">BIF thread</a></strong></sup></p>
|
||||
|
||||
**ACE 3** is a join effort by the teams behind **ACE 2**, **AGM**, **CSE** and **RHS** to improve the realism and authenticity of Arma 3.
|
||||
**ACE 3** is a joint effort by the teams behind **ACE2**, **AGM** and **CSE** to improve the realism and authenticity of Arma 3.
|
||||
|
||||
This mod is entirely **open-source**, and everyone is free to propose changes or maintain their own, customized version as long as they make their changes open to the public in accordance with the GNU General Public License (for more information check the license file attached to this project).
|
||||
|
||||
@ -32,7 +34,7 @@ More information on the purpose of the different components of ACE and which one
|
||||
* Realistic ballistics including wind and humidity
|
||||
* Backblast simulation
|
||||
* Weapon resting and bipod deployment
|
||||
* A fire control system for armored vehicles and helicopters
|
||||
* A fire control system for armored vehicles and helicopters
|
||||
***and more...***
|
||||
|
||||
For a full list of current features, check [the official wiki](https://github.com/KoffeinFlummi/ACE3/wiki).
|
||||
|
BIN
ace_fcs.dll
BIN
ace_fcs.dll
Binary file not shown.
@ -217,9 +217,8 @@ class CfgVehicles {
|
||||
};*/
|
||||
};
|
||||
|
||||
class I_Heli_Transport_02_F: Heli_Transport_02_base_F {};
|
||||
|
||||
class I_Heli_light_03_base_F: Helicopter_Base_F {
|
||||
class Heli_light_03_base_F: Helicopter_Base_F {};
|
||||
class I_Heli_light_03_base_F: Heli_light_03_base_F {
|
||||
lockDetectionSystem = 0;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
@ -242,15 +241,15 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class I_Heli_light_03_F: I_Heli_light_03_base_F {
|
||||
class I_Heli_light_03_F: Heli_light_03_base_F {
|
||||
class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {};
|
||||
};
|
||||
};
|
||||
|
||||
class I_Heli_light_03_unarmed_base_F: I_Heli_light_03_base_F {};
|
||||
class Heli_light_03_unarmed_base_F: Heli_light_03_base_F {};
|
||||
|
||||
class I_Heli_light_03_unarmed_F: I_Heli_light_03_unarmed_base_F {};
|
||||
class I_Heli_light_03_unarmed_F: Heli_light_03_unarmed_base_F {};
|
||||
|
||||
class Plane_CAS_01_base_F: Plane_Base_F {
|
||||
lockDetectionSystem = 12;
|
||||
@ -303,7 +302,8 @@ class CfgVehicles {
|
||||
};*/
|
||||
};
|
||||
|
||||
class B_Heli_Transport_03_base_F: Helicopter_Base_H {
|
||||
class Heli_Transport_03_base_F: Helicopter_Base_H {};
|
||||
class B_Heli_Transport_03_base_F: Heli_Transport_03_base_F {
|
||||
lockDetectionSystem = 12;
|
||||
incomingMissileDetectionSystem = 16;
|
||||
driverCanEject = 1;
|
||||
@ -317,7 +317,7 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
|
||||
class B_Heli_Transport_03_unarmed_base_F: B_Heli_Transport_03_base_F {
|
||||
class B_Heli_Transport_03_unarmed_base_F: Heli_Transport_03_base_F {
|
||||
class Turrets: Turrets {
|
||||
class CopilotTurret: CopilotTurret {
|
||||
canEject = 1;
|
||||
|
1
addons/backpacks/$PBOPREFIX$
Normal file
1
addons/backpacks/$PBOPREFIX$
Normal file
@ -0,0 +1 @@
|
||||
z\ace\addons\backpacks
|
@ -5,6 +5,12 @@ class Extended_PreInit_EventHandlers {
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_InventoryOpened_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(onOpenInventory) {
|
3
addons/backpacks/XEH_postInit.sqf
Normal file
3
addons/backpacks/XEH_postInit.sqf
Normal file
@ -0,0 +1,3 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
["backpackOpened", {_this call FUNC(backpackOpened)}] call EFUNC(common,addEventHandler);
|
@ -2,6 +2,7 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(backpackOpened);
|
||||
PREP(getBackpackAssignedUnit);
|
||||
PREP(isBackpack);
|
||||
PREP(onOpenInventory);
|
@ -5,7 +5,7 @@ class CfgPatches {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common","ace_interaction"};
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"bux","commy2"};
|
||||
authorUrl = "https://github.com/commy2/";
|
||||
VERSION_CONFIG;
|
||||
@ -13,4 +13,3 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
51
addons/backpacks/functions/fnc_backpackOpened.sqf
Normal file
51
addons/backpacks/functions/fnc_backpackOpened.sqf
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Someone opened your backpack. Execute locally.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Who accessed your inventory? (Object)
|
||||
* 1: Unit that wields the backpack (Object)
|
||||
* 2: The backpack object (Object)
|
||||
*
|
||||
* Return value:
|
||||
* None.
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_target"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_target = _this select 1;
|
||||
_backpack = _this select 2;
|
||||
|
||||
// do cam shake if the target is the player
|
||||
if ([_target] call EFUNC(common,isPlayer)) then {
|
||||
addCamShake [4, 0.5, 5];
|
||||
};
|
||||
|
||||
// play a rustling sound
|
||||
private ["_sounds", "_position"];
|
||||
|
||||
_sounds = [
|
||||
/*"a3\sounds_f\characters\ingame\AinvPknlMstpSlayWpstDnon_medic.wss",
|
||||
"a3\sounds_f\characters\ingame\AinvPknlMstpSlayWrflDnon_medic.wss",
|
||||
"a3\sounds_f\characters\ingame\AinvPpneMstpSlayWpstDnon_medic.wss",
|
||||
"a3\sounds_f\characters\ingame\AinvPpneMstpSlayWrflDnon_medic.wss"*/
|
||||
|
||||
QUOTE(PATHTO_R(sounds\zip_in.wav)),
|
||||
QUOTE(PATHTO_R(sounds\zip_out.wav))
|
||||
];
|
||||
|
||||
_position = _target modelToWorld (_target selectionPosition "Spine3");
|
||||
_position = _position call EFUNC(common,positionToASL);
|
||||
|
||||
playSound3D [
|
||||
_sounds select floor random count _sounds,
|
||||
objNull,
|
||||
false,
|
||||
_position,
|
||||
1,
|
||||
1,
|
||||
50
|
||||
];
|
30
addons/backpacks/functions/fnc_onOpenInventory.sqf
Normal file
30
addons/backpacks/functions/fnc_onOpenInventory.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Handle the open inventory event. Display message on traget client.
|
||||
*
|
||||
* Argument:
|
||||
* Input from "InventoryOpened" eventhandler
|
||||
*
|
||||
* Return value:
|
||||
* false. Always open the inventory dialog. (Bool)
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_backpack"];
|
||||
|
||||
_unit = _this select 0;
|
||||
_backpack = _this select 1;
|
||||
|
||||
// exit if the target is not a backpack
|
||||
if !([_backpack] call FUNC(isBackpack)) exitWith {};
|
||||
|
||||
// get the unit that wears the backpack object
|
||||
private "_target";
|
||||
_target = [_backpack] call FUNC(getBackpackAssignedUnit);
|
||||
|
||||
// raise event on target unit
|
||||
["backpackOpened", _target, [_unit, _target, _backpack]] call EFUNC(common,targetEvent);
|
||||
|
||||
// return false to open inventory as usual
|
||||
false
|
1
addons/backpacks/functions/script_component.hpp
Normal file
1
addons/backpacks/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\backpacks\script_component.hpp"
|
12
addons/backpacks/script_component.hpp
Normal file
12
addons/backpacks/script_component.hpp
Normal file
@ -0,0 +1,12 @@
|
||||
#define COMPONENT backpacks
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_BACKPACKS
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ENABLED_BACKPACKS
|
||||
#define DEBUG_SETTINGS DEBUG_ENABLED_BACKPACKS
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
BIN
addons/backpacks/sounds/zip_in.wav
Normal file
BIN
addons/backpacks/sounds/zip_in.wav
Normal file
Binary file not shown.
BIN
addons/backpacks/sounds/zip_out.wav
Normal file
BIN
addons/backpacks/sounds/zip_out.wav
Normal file
Binary file not shown.
@ -154,15 +154,10 @@ class CfgVehicles {
|
||||
MACRO_LOADUNLOADCAPTIVE
|
||||
};
|
||||
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_CableTie,12)
|
||||
MACRO_ADDITEM(ACE_CableTie,12);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -27,12 +27,5 @@ if (isServer) then {
|
||||
["SetHandcuffed", {_this call FUNC(setHandcuffed)}] call EFUNC(common,addEventHandler);
|
||||
["SetSurrendered", {_this call FUNC(setSurrendered)}] call EFUNC(common,addEventHandler);
|
||||
|
||||
//TODO: Medical Integration Events???
|
||||
|
||||
// [_unit, "knockedOut", {
|
||||
// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleKnockedOut};
|
||||
// }] call ACE_Core_fnc_addCustomEventhandler;
|
||||
|
||||
// [_unit, "wokeUp", {
|
||||
// if (local (_this select 0)) then {_this call ACE_Captives_fnc_handleWokeUp};
|
||||
// }] call ACE_Core_fnc_addCustomEventhandler;
|
||||
//Medical Integration Events???
|
||||
["medical_onUnconscious", {_this call ACE_Captives_fnc_handleOnUnconscious}] call EFUNC(common,addEventHandler);
|
||||
|
@ -19,10 +19,9 @@ PREP(doUnloadCaptive);
|
||||
PREP(handleGetIn);
|
||||
PREP(handleGetOut);
|
||||
PREP(handleKilled);
|
||||
PREP(handleKnockedOut);
|
||||
PREP(handleOnUnconscious);
|
||||
PREP(handlePlayerChanged);
|
||||
PREP(handleUnitInitPost);
|
||||
PREP(handleWokeUp);
|
||||
PREP(handleZeusDisplayChanged);
|
||||
PREP(moduleSurrender);
|
||||
PREP(setHandcuffed);
|
||||
|
@ -51,7 +51,7 @@ if (_state) then {
|
||||
_unit setVariable [QGVAR(escortedUnit), objNull, true];
|
||||
};
|
||||
};
|
||||
[_escortFnc, 0.2, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
[_escortFnc, 0, [_unit, _target, _actionID]] call CBA_fnc_addPerFrameHandler;
|
||||
|
||||
} else {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
|
@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Author: commy2, PabstMirror
|
||||
* Handles when a unit gets knocked out. Ends surrendering.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob, true] call ACE_captives_fnc_handleKnockedOut
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
|
||||
//ToDo: Waiting on medical integration
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then { //If surrendering, stop
|
||||
[_unit, false] call FUNC(setSurrendered);
|
||||
};
|
36
addons/captives/functions/fnc_handleOnUnconscious.sqf
Normal file
36
addons/captives/functions/fnc_handleOnUnconscious.sqf
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Author: commy2, PabstMirror
|
||||
* Handles the "medical_onUnconscious" event
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 0: Is Unconsisisiouses <BOOL>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [bob, true] call ACE_captives_fnc_handleOnUnconscious
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_isUnconc);
|
||||
|
||||
if (!local _unit) exitWith {};
|
||||
|
||||
systemChat format ["med: %1", _this];
|
||||
|
||||
if (_isUnconc) then {
|
||||
//Knocked out: If surrendering, stop
|
||||
if (_unit getVariable [QGVAR(isSurrendering), false]) then {
|
||||
[_unit, false] call FUNC(setSurrendered);
|
||||
};
|
||||
} else {
|
||||
//Woke up: if handcuffed, goto animation
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
};
|
||||
};
|
@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* TODO
|
||||
*
|
||||
* Arguments:
|
||||
* 0: _unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [bob] call ACE_captives_fnc_handleWokeUp
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
|
||||
if (_unit getVariable [QGVAR(isHandcuffed), false] && {vehicle _unit == _unit}) then {
|
||||
[_unit] call EFUNC(common,fixLoweredRifleAnimation);
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 0] call EFUNC(common,doAnimation);
|
||||
};
|
@ -52,7 +52,7 @@ if (_state) then {
|
||||
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
|
||||
PARAMS_2(_unit,_newAnimation);
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && (_newAnimation != "Unconscious")) then {
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
ERROR("Handcuff animation interrupted");
|
||||
systemChat format ["debug %2: new %1", _newAnimation, time];
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
@ -71,8 +71,8 @@ if (_state) then {
|
||||
_unit removeEventHandler ["AnimChanged", _animChangedEHID];
|
||||
_unit setVariable [QGVAR(handcuffAnimEHID), -1];
|
||||
|
||||
if ((vehicle _unit) == _unit) then {
|
||||
//Break out of hands up animation loop (doAnimation handles Unconscious prioity)
|
||||
if (((vehicle _unit) == _unit) && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
//Break out of hands up animation loop
|
||||
[_unit, "ACE_AmovPercMstpScapWnonDnon_AmovPercMstpSnonWnonDnon", 2] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
|
@ -50,7 +50,7 @@ if (_state) then {
|
||||
//If we get a change in animation then redo the animation (handles people vaulting to break the animation chain)
|
||||
_animChangedEHID = _unit addEventHandler ["AnimChanged", {
|
||||
PARAMS_2(_unit,_newAnimation);
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && (_newAnimation != "Unconscious")) then {
|
||||
if ((_newAnimation != "ACE_AmovPercMstpSsurWnonDnon") && {!(_unit getVariable ["ACE_isUnconscious", false])}) then {
|
||||
ERROR("Surrender animation interrupted");
|
||||
systemChat format ["debug %2: new %1", _newAnimation, time];
|
||||
[_unit, "ACE_AmovPercMstpSsurWnonDnon", 1] call EFUNC(common,doAnimation);
|
||||
|
@ -19,6 +19,7 @@ PREP(ASLToPosition);
|
||||
PREP(beingCarried);
|
||||
PREP(binarizeNumber);
|
||||
PREP(blurScreen);
|
||||
PREP(cachedCall);
|
||||
PREP(callCustomEventHandlers);
|
||||
PREP(callCustomEventHandlersGlobal);
|
||||
PREP(canGetInPosition);
|
||||
@ -47,6 +48,7 @@ PREP(displayTextPicture);
|
||||
PREP(displayTextStructured);
|
||||
PREP(doAnimation);
|
||||
PREP(endRadioTransmission);
|
||||
PREP(eraseCache);
|
||||
PREP(execNextFrame);
|
||||
PREP(execPersistentFnc);
|
||||
PREP(execRemoteFnc);
|
||||
@ -109,6 +111,7 @@ PREP(insertionSort);
|
||||
PREP(interpolateFromArray);
|
||||
PREP(inTransitionAnim);
|
||||
PREP(inWater);
|
||||
PREP(isAlive);
|
||||
PREP(isArrested);
|
||||
PREP(isAutoWind);
|
||||
PREP(isAwake);
|
||||
@ -147,6 +150,7 @@ PREP(removeCameraEventHandler);
|
||||
PREP(removeCustomEventHandler);
|
||||
PREP(removeMapMarkerCreatedEventHandler);
|
||||
PREP(removeScrollWheelEventHandler);
|
||||
PREP(removeSpecificMagazine);
|
||||
PREP(requestCallback);
|
||||
PREP(resetAllDefaults);
|
||||
PREP(restoreVariablesJIP);
|
||||
@ -199,6 +203,9 @@ PREP(logDisplays);
|
||||
PREP(monitor);
|
||||
PREP(showUser);
|
||||
|
||||
PREP(dumpPerformanceCounters);
|
||||
PREP(dumpArray);
|
||||
|
||||
// ACE_CuratorFix
|
||||
PREP(addCuratorUnloadEventhandler);
|
||||
PREP(fixCrateContent);
|
||||
@ -227,6 +234,9 @@ PREP(hashListSelect);
|
||||
PREP(hashListSet);
|
||||
PREP(hashListPush);
|
||||
|
||||
//Debug
|
||||
ACE_COUNTERS = [];
|
||||
|
||||
// Load settings
|
||||
if (isServer) then {
|
||||
call FUNC(loadSettingsOnServer);
|
||||
|
@ -11,4 +11,4 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
sunOrMoon * sunOrMoon + moonIntensity/5 min 1
|
||||
sunOrMoon * sunOrMoon * (1 - overcast * 0.25) + (moonIntensity/5 min 1) * (1 - overcast)
|
||||
|
30
addons/common/functions/fnc_cachedCall.sqf
Normal file
30
addons/common/functions/fnc_cachedCall.sqf
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Author: CAA-Picard and Jaynus
|
||||
* Returns the result of the function and caches it up to a given time
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Parameters <ARRAY>
|
||||
* 1: Function <CODE>
|
||||
* 2: Namespace to store the cache on <NAMESPACE>
|
||||
* 3: Cache uid <STRING>
|
||||
* 4: Max duration of the cache <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* Result of the function <ANY>
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_5_PVT(_this,_params,_function,_namespace,_uid,_duration);
|
||||
|
||||
if (((_namespace getVariable [_uid, [-99999]]) select 0) < diag_tickTime) then {
|
||||
_namespace setVariable [_uid, [diag_tickTime + _duration, _params call _function]];
|
||||
#ifdef DEBUG_MODE_FULL
|
||||
diag_log format ["Calculated result: %1 %2", _namespace, _uid];
|
||||
} else {
|
||||
diag_log format ["Cached result : %1 %2", _namespace, _uid];
|
||||
#endif
|
||||
};
|
||||
|
||||
(_namespace getVariable _uid) select 1
|
25
addons/common/functions/fnc_dumpArray.sqf
Normal file
25
addons/common/functions/fnc_dumpArray.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
//fnc_dumpArray.sqf
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_var", "_depth", "_pad", "_i", "_x"];
|
||||
|
||||
_var = _this select 0;
|
||||
_depth = _this select 1;
|
||||
_pad = "";
|
||||
for "_i" from 0 to _depth do {
|
||||
_pad = _pad + toString [9];
|
||||
};
|
||||
_depth = _depth + 1;
|
||||
if(IS_ARRAY(_var)) then {
|
||||
if((count _var) > 0) then {
|
||||
diag_log text format["%1[", _pad];
|
||||
{
|
||||
[_x, _depth] call FUNC(dumpArray);
|
||||
} forEach _var;
|
||||
diag_log text format["%1],", _pad];
|
||||
} else {
|
||||
diag_log text format["%1[],", _pad];
|
||||
};
|
||||
} else {
|
||||
diag_log text format["%1%2", _pad, [_var] call FUNC(formatVar)];
|
||||
};
|
73
addons/common/functions/fnc_dumpPerformanceCounters.sqf
Normal file
73
addons/common/functions/fnc_dumpPerformanceCounters.sqf
Normal file
@ -0,0 +1,73 @@
|
||||
//fnc_dumpPerformanceCounters.sqf
|
||||
#define DEBUG_MODE_FULL
|
||||
#include "script_component.hpp"
|
||||
|
||||
/*
|
||||
diag_log text format["REGISTERED ACE PFH HANDLERS"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
if(!isNil "ACE_PFH") then {
|
||||
{
|
||||
private["_pfh"];
|
||||
_pfh = _x select 0;
|
||||
diag_log text format["Registered PFH: id=%1, %1:%2", (_pfh select 0), (_pfh select 1), (_pfh select 2) ];
|
||||
} forEach ACE_PFH;
|
||||
};*/
|
||||
|
||||
diag_log text format["ACE COUNTER RESULTS"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
{
|
||||
private["_counterEntry", "_iter", "_total", "_count", "_delta", "_averageResult"];
|
||||
_counterEntry = _x;
|
||||
_iter = 0;
|
||||
_total = 0;
|
||||
_count = 0;
|
||||
_averageResult = 0;
|
||||
if( (count _counterEntry) > 3) then {
|
||||
// calc
|
||||
{
|
||||
if(_iter > 2) then {
|
||||
_count = _count + 1;
|
||||
_delta = (_x select 1) - (_x select 0);
|
||||
|
||||
_total = _total + _delta;
|
||||
};
|
||||
_iter = _iter + 1;
|
||||
} forEach _counterEntry;
|
||||
|
||||
// results
|
||||
_averageResult = (_total / _count) * 1000;
|
||||
|
||||
// dump results
|
||||
diag_log text format["%1: Average: %2s / %3 = %4ms", (_counterEntry select 0), _total, _count, _averageResult];
|
||||
} else {
|
||||
diag_log text format["%1: No results", (_counterEntry select 0) ];
|
||||
};
|
||||
} forEach ACE_COUNTERS;
|
||||
|
||||
/*
|
||||
// Dump PFH Trackers
|
||||
diag_log text format["ACE_PERFORMANCE_EXCESSIVE_STEP_TRACKER"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
{
|
||||
private["_delay"];
|
||||
_delay = _x select 2;
|
||||
//if(_delay > 0) then { _delay = _delay / 1000; };
|
||||
|
||||
diag_log text format["%1: %2s, delay=%3, handle=%4",(_x select 0), _delay, (_x select 3), (_x select 4)];
|
||||
} forEach ACE_PERFORMANCE_EXCESSIVE_STEP_TRACKER;
|
||||
|
||||
// Dump PFH Trackers
|
||||
diag_log text format["ACE_PERFORMANCE_EXCESSIVE_FRAME_TRACKER"];
|
||||
diag_log text format["-------------------------------------------"];
|
||||
{
|
||||
private["_delta"];
|
||||
_delta = _x select 1;
|
||||
//if(_delta > 0) then { _delta = _delta / 1000; };
|
||||
diag_log text format[" DELTA: %1s", _delta];
|
||||
} forEach ACE_PERFORMANCE_EXCESSIVE_FRAME_TRACKER;
|
||||
|
||||
//{
|
||||
//
|
||||
//} forEach ACRE_EXCESSIVE_FRAME_TRACKER;
|
||||
|
||||
*/
|
18
addons/common/functions/fnc_eraseCache.sqf
Normal file
18
addons/common/functions/fnc_eraseCache.sqf
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Deletes a cached result
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Namespace to store the cache on <NAMESPACE>
|
||||
* 1: Cache uid <STRING>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_2_PVT(_this,_namespace,_uid);
|
||||
|
||||
_namespace setVariable [_uid, nil];
|
14
addons/common/functions/fnc_isAlive.sqf
Normal file
14
addons/common/functions/fnc_isAlive.sqf
Normal file
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* Check if the object still exists and is alive. This function exists because 'alive objNull' actually returns true.
|
||||
*
|
||||
* Argument:
|
||||
* 0: Any object (Object)
|
||||
*
|
||||
* Return value:
|
||||
* The object exists and is alive (Bool).
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
!isNull (_this select 0) && {alive (_this select 0)}
|
69
addons/common/functions/fnc_removeSpecificMagazine.sqf
Normal file
69
addons/common/functions/fnc_removeSpecificMagazine.sqf
Normal file
@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Removes a magazine from the unit that has an specific ammo count
|
||||
*
|
||||
* Argument:
|
||||
* 0: Player <OBJECT>
|
||||
* 1: Magazine <STRING>
|
||||
* 2: Ammo count <NUMBER>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_3_PVT(_this,_player,_magazineType,_ammoCount);
|
||||
|
||||
private ["_magazines","_index","_isRemoved"];
|
||||
_isRemoved = false;
|
||||
|
||||
// Check uniform
|
||||
_magazines = [magazinesAmmoCargo uniformContainer _player, {_this select 0 == _magazineType}] call FUNC(filter);
|
||||
_index = _magazines find [_magazineType,_ammoCount];
|
||||
if (_index > -1) exitWith {
|
||||
{
|
||||
_player removeItemFromUniform (_x select 0);
|
||||
} forEach _magazines;
|
||||
|
||||
{
|
||||
if (!_isRemoved && (_x isEqualTo [_magazineType,_ammoCount])) then {
|
||||
_isRemoved = true;
|
||||
} else {
|
||||
(uniformContainer _player) addMagazineAmmoCargo [_x select 0, 1, _x select 1];
|
||||
};
|
||||
} forEach _magazines;
|
||||
};
|
||||
|
||||
// Check vest
|
||||
_magazines = [magazinesAmmoCargo vestContainer _player, {_this select 0 == _magazineType}] call FUNC(filter);
|
||||
_index = _magazines find [_magazineType,_ammoCount];
|
||||
if (_index > -1) exitWith {
|
||||
{
|
||||
_player removeItemFromVest (_x select 0);
|
||||
} forEach _magazines;
|
||||
|
||||
{
|
||||
if (!_isRemoved && (_x isEqualTo [_magazineType,_ammoCount])) then {
|
||||
_isRemoved = true;
|
||||
} else {
|
||||
(vestContainer _player) addMagazineAmmoCargo [_x select 0, 1, _x select 1];
|
||||
};
|
||||
} forEach _magazines;
|
||||
};
|
||||
|
||||
// Check backpack
|
||||
_magazines = [magazinesAmmoCargo backpackContainer _player, {_this select 0 == _magazineType}] call FUNC(filter);
|
||||
_index = _magazines find [_magazineType,_ammoCount];
|
||||
if (_index > -1) exitWith {
|
||||
{
|
||||
_player removeItemFromBackpack (_x select 0);
|
||||
} forEach _magazines;
|
||||
|
||||
{
|
||||
if (!_isRemoved && (_x isEqualTo [_magazineType,_ammoCount])) then {
|
||||
_isRemoved = true;
|
||||
} else {
|
||||
(backpackContainer _player) addMagazineAmmoCargo [_x select 0, 1, _x select 1];
|
||||
};
|
||||
} forEach _magazines;
|
||||
};
|
@ -1,8 +1,3 @@
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
|
||||
@ -142,47 +137,47 @@ class CfgVehicles {
|
||||
|
||||
class Box_NATO_AmmoOrd_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_Clacker,12)
|
||||
MACRO_ADDITEM(ACE_M26_Clacker,6)
|
||||
MACRO_ADDITEM(ACE_DefusalKit,12)
|
||||
MACRO_ADDITEM(ACE_Clacker,12);
|
||||
MACRO_ADDITEM(ACE_M26_Clacker,6);
|
||||
MACRO_ADDITEM(ACE_DefusalKit,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_AmmoOrd_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_Clacker,12)
|
||||
MACRO_ADDITEM(ACE_M26_Clacker,6)
|
||||
MACRO_ADDITEM(ACE_DefusalKit,12)
|
||||
MACRO_ADDITEM(ACE_Clacker,12);
|
||||
MACRO_ADDITEM(ACE_M26_Clacker,6);
|
||||
MACRO_ADDITEM(ACE_DefusalKit,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_AmmoOrd_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_Clacker,12)
|
||||
MACRO_ADDITEM(ACE_M26_Clacker,6)
|
||||
MACRO_ADDITEM(ACE_DefusalKit,12)
|
||||
MACRO_ADDITEM(ACE_Deadmanswitch,2)
|
||||
MACRO_ADDITEM(ACE_Cellphone,3)
|
||||
MACRO_ADDITEM(ACE_Clacker,12);
|
||||
MACRO_ADDITEM(ACE_M26_Clacker,6);
|
||||
MACRO_ADDITEM(ACE_DefusalKit,12);
|
||||
MACRO_ADDITEM(ACE_Deadmanswitch,2);
|
||||
MACRO_ADDITEM(ACE_Cellphone,3);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Ammo_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_Clacker,2)
|
||||
MACRO_ADDITEM(ACE_M26_Clacker,2)
|
||||
MACRO_ADDITEM(ACE_DefusalKit,2)
|
||||
MACRO_ADDITEM(ACE_Deadmanswitch,1)
|
||||
MACRO_ADDITEM(ACE_Cellphone,2)
|
||||
MACRO_ADDITEM(ACE_Clacker,2);
|
||||
MACRO_ADDITEM(ACE_M26_Clacker,2);
|
||||
MACRO_ADDITEM(ACE_DefusalKit,2);
|
||||
MACRO_ADDITEM(ACE_Deadmanswitch,1);
|
||||
MACRO_ADDITEM(ACE_Cellphone,2);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_Clacker,12)
|
||||
MACRO_ADDITEM(ACE_M26_Clacker,6)
|
||||
MACRO_ADDITEM(ACE_DefusalKit,12)
|
||||
MACRO_ADDITEM(ACE_Deadmanswitch,6)
|
||||
MACRO_ADDITEM(ACE_Cellphone,10)
|
||||
MACRO_ADDITEM(ACE_Clacker,12);
|
||||
MACRO_ADDITEM(ACE_M26_Clacker,6);
|
||||
MACRO_ADDITEM(ACE_DefusalKit,12);
|
||||
MACRO_ADDITEM(ACE_Deadmanswitch,6);
|
||||
MACRO_ADDITEM(ACE_Cellphone,10);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -28,7 +28,7 @@ class CfgVehicles {
|
||||
displayName = $STR_ACE_FCS_ResetFCS;
|
||||
enableInside = 1;
|
||||
condition = QUOTE(call FUNC(canResetFCS));
|
||||
statement = QUOTE([ARR_2(_vehicle,[_player] call DEFUNC(common,getTurretIndex))] call DFUNC(reset););
|
||||
statement = QUOTE([ARR_2(vehicle _player,[_player] call DEFUNC(common,getTurretIndex))] call DFUNC(reset););
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = "";
|
||||
@ -42,7 +42,7 @@ class CfgVehicles {
|
||||
displayName = $STR_ACE_FCS_ResetFCS;
|
||||
enableInside = 1;
|
||||
condition = QUOTE(call FUNC(canResetFCS));
|
||||
statement = QUOTE([ARR_2(_vehicle,[_player] call DEFUNC(common,getTurretIndex))] call DFUNC(reset););
|
||||
statement = QUOTE([ARR_2(vehicle _player,[_player] call DEFUNC(common,getTurretIndex))] call DFUNC(reset););
|
||||
showDisabled = 0;
|
||||
priority = 1;
|
||||
icon = "";
|
||||
@ -492,13 +492,13 @@ class CfgVehicles {
|
||||
};*/
|
||||
};
|
||||
|
||||
class I_Heli_light_03_base_F: Helicopter_Base_F {
|
||||
class Heli_light_03_base_F;
|
||||
class I_Heli_light_03_base_F: Heli_light_03_base_F {
|
||||
/*class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {};
|
||||
};*/
|
||||
};
|
||||
|
||||
class I_Heli_light_03_F: I_Heli_light_03_base_F {
|
||||
class I_Heli_light_03_F: Heli_light_03_base_F {
|
||||
/*class Turrets: Turrets {
|
||||
class MainTurret: MainTurret {};
|
||||
};*/
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_vehicle", "_weapon", "_ammo", "_magazine", "_projectile"];
|
||||
private ["_vehicle", "_weapon", "_ammo", "_magazine", "_projectile","_velocityCorrection"];
|
||||
|
||||
_vehicle = _this select 0;
|
||||
_weapon = _this select 1;
|
||||
@ -30,7 +30,7 @@ if !([_gunner] call EFUNC(common,isPlayer)) exitWith {};
|
||||
|
||||
private ["_FCSMagazines", "_FCSElevation", "_offset"];
|
||||
|
||||
_FCSMagazines = _vehicle getVariable format ["%1_%2", QGVAR(Magazines), _turret];
|
||||
_FCSMagazines = _vehicle getVariable [(format ["%1_%2", QGVAR(Magazines), _turret]), []];
|
||||
_FCSElevation = _vehicle getVariable format ["%1_%2", QGVAR(Elevation), _turret];
|
||||
|
||||
if !(_magazine in _FCSMagazines) exitWith {};
|
||||
@ -43,8 +43,12 @@ _offset = 0;
|
||||
};
|
||||
} forEach _FCSMagazines;
|
||||
|
||||
[_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, 0] call EFUNC(common,changeProjectileDirection);
|
||||
// Correct velocity for weapons that have initVelocity
|
||||
// @todo: Take into account negative initVelocities
|
||||
_velocityCorrection = (vectorMagnitude velocity _projectile) -
|
||||
getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
|
||||
|
||||
[_projectile, (_vehicle getVariable format ["%1_%2", QGVAR(Azimuth), _turret]), _offset, _velocityCorrection] call EFUNC(common,changeProjectileDirection);
|
||||
// Air burst missile
|
||||
|
||||
// handle locally only
|
||||
|
@ -1,81 +1,63 @@
|
||||
// by commy2
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_FCS_LaseTarget",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false};
|
||||
["ACE3", QGVAR(lazeTarget), localize "STR_ACE_FCS_LaseTarget",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !((!GVAR(enabled) && FUNC(canUseFCS)) || FUNC(canUseRangefinder)) exitWith {false};
|
||||
|
||||
// prevent holding down
|
||||
if (GETGVAR(isDownStateKey1,false)) exitWith {false};
|
||||
GVAR(isDownStateKey1) = true;
|
||||
if (GETGVAR(isDownStateKey1,false)) exitWith {false};
|
||||
GVAR(isDownStateKey1) = true;
|
||||
|
||||
// Statement
|
||||
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call FUNC(keyDown);
|
||||
// Return false so it doesn't block the rest weapon action
|
||||
false
|
||||
},
|
||||
[15, [false, false, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
// Statement
|
||||
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call FUNC(keyDown);
|
||||
// Return false so it doesn't block the rest weapon action
|
||||
false
|
||||
},
|
||||
{
|
||||
// prevent holding down
|
||||
GVAR(isDownStateKey1) = false;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_FCS_LaseTarget",
|
||||
{
|
||||
// prevent holding down
|
||||
GVAR(isDownStateKey1) = false;
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(GVAR(enabled) && FUNC(canUseFCS)) exitWith {false};
|
||||
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(GVAR(enabled) && FUNC(canUseFCS)) exitWith {false};
|
||||
// Statement
|
||||
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call FUNC(keyUp);
|
||||
false
|
||||
},
|
||||
[15, [false, false, false]], false] call cba_fnc_addKeybind; //Tab Key
|
||||
|
||||
// Statement
|
||||
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex)] call FUNC(keyUp);
|
||||
false
|
||||
},
|
||||
[15, [false, false, false]],
|
||||
false,
|
||||
"keyup"
|
||||
] call cba_fnc_registerKeybind;
|
||||
["ACE3", QGVAR(adjustRangeUp), localize "STR_ACE_FCS_AdjustRangeUp",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_FCS_AdjustRangeUp",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
|
||||
// Statement
|
||||
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), 50] call FUNC(adjustRange);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[201, [false, false, false]], false] call cba_fnc_addKeybind; //PageUp Key
|
||||
|
||||
// Statement
|
||||
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), 50] call FUNC(adjustRange);
|
||||
true
|
||||
},
|
||||
[201, [false, false, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
["ACE3", QGVAR(adjustRangDown), localize "STR_ACE_FCS_AdjustRangeDown",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_FCS_AdjustRangeDown",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(call FUNC(canUseRangefinder) || FUNC(canUseFCS)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), -50] call FUNC(adjustRange);
|
||||
true
|
||||
},
|
||||
[209, [false, false, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
// Statement
|
||||
[vehicle ACE_player, [ACE_player] call EFUNC(common,getTurretIndex), -50] call FUNC(adjustRange);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[209, [false, false, false]], false] call cba_fnc_addKeybind; //PageDown Key
|
||||
|
@ -17,17 +17,19 @@
|
||||
#include "script_component.hpp"
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["ACE3", localize "STR_ACE_Goggles_WipeGlasses",
|
||||
["ACE3", QGVAR(wipeGlasses), localize "STR_ACE_Goggles_WipeGlasses",
|
||||
{
|
||||
if (!(GETVAR(ace_player,ACE_isUnconscious,false))) exitWith {
|
||||
call FUNC(clearGlasses);
|
||||
true
|
||||
};
|
||||
false
|
||||
}, [20, true, true, false], false, "keydown"] call CALLSTACK(cba_fnc_registerKeybind);
|
||||
if (!(GETVAR(ace_player,ACE_isUnconscious,false))) exitWith {
|
||||
call FUNC(clearGlasses);
|
||||
true
|
||||
};
|
||||
false
|
||||
},
|
||||
{false},
|
||||
[20, [true, true, false]], false] call cba_fnc_addKeybind;
|
||||
|
||||
if isNil(QGVAR(UsePP)) then {
|
||||
GVAR(UsePP) = true;
|
||||
GVAR(UsePP) = true;
|
||||
};
|
||||
|
||||
GVAR(PostProcess) = ppEffectCreate ["ColorCorrections", 1995];
|
||||
@ -47,78 +49,78 @@ GVAR(RainActive) = false;
|
||||
GVAR(RainLastLevel) = 0;
|
||||
|
||||
FUNC(CheckGlasses) = {
|
||||
if (GVAR(Current) != (goggles ace_player)) then {
|
||||
GVAR(Current) = (goggles ace_player);
|
||||
["GlassesChanged",[GVAR(Current)]] call EFUNC(common,localEvent);
|
||||
};
|
||||
if (GVAR(Current) != (goggles ace_player)) then {
|
||||
GVAR(Current) = (goggles ace_player);
|
||||
["GlassesChanged",[GVAR(Current)]] call EFUNC(common,localEvent);
|
||||
};
|
||||
};
|
||||
|
||||
player addEventHandler ["Explosion", {
|
||||
if (alive ace_player) then {
|
||||
call FUNC(ApplyDirtEffect);
|
||||
if (GETBROKEN) exitWith {};
|
||||
if (((_this select 1) call FUNC(GetExplosionIndex)) < getNumber(ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_Resistance")) exitWith {};
|
||||
if !([ace_player] call FUNC(isGogglesVisible)) exitWith {["GlassesCracked",[ace_player]] call EFUNC(common,localEvent);};
|
||||
_effects = GETGLASSES(ace_player);
|
||||
_effects set [BROKEN, true];
|
||||
SETGLASSES(ace_player,_effects);
|
||||
if (getText(ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_OverlayCracked") != "" && {cameraOn == ace_player}) then {
|
||||
if (call FUNC(ExternalCamera)) exitWith {};
|
||||
if (isNull(GLASSDISPLAY)) then {
|
||||
150 cutRsc["RscACE_Goggles", "PLAIN",1, false];
|
||||
};
|
||||
(GLASSDISPLAY displayCtrl 10650) ctrlSetText getText(ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_OverlayCracked");
|
||||
if (alive ace_player) then {
|
||||
call FUNC(ApplyDirtEffect);
|
||||
if (GETBROKEN) exitWith {};
|
||||
if (((_this select 1) call FUNC(GetExplosionIndex)) < getNumber(ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_Resistance")) exitWith {};
|
||||
if !([ace_player] call FUNC(isGogglesVisible)) exitWith {["GlassesCracked",[ace_player]] call EFUNC(common,localEvent);};
|
||||
_effects = GETGLASSES(ace_player);
|
||||
_effects set [BROKEN, true];
|
||||
SETGLASSES(ace_player,_effects);
|
||||
if (getText(ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_OverlayCracked") != "" && {cameraOn == ace_player}) then {
|
||||
if (call FUNC(ExternalCamera)) exitWith {};
|
||||
if (isNull(GLASSDISPLAY)) then {
|
||||
150 cutRsc["RscACE_Goggles", "PLAIN",1, false];
|
||||
};
|
||||
(GLASSDISPLAY displayCtrl 10650) ctrlSetText getText(ConfigFile >> "CfgGlasses" >> GVAR(Current) >> "ACE_OverlayCracked");
|
||||
};
|
||||
["GlassesCracked",[ace_player]] call EFUNC(common,localEvent);
|
||||
};
|
||||
["GlassesCracked",[ace_player]] call EFUNC(common,localEvent);
|
||||
};
|
||||
}];
|
||||
player addEventHandler ["Killed",{
|
||||
GVAR(PostProcessEyes) ppEffectEnable false;
|
||||
SETGLASSES(ace_player,GLASSESDEFAULT);
|
||||
call FUNC(removeGlassesEffect);
|
||||
GVAR(EffectsActive)=false;
|
||||
ace_player setVariable ["ACE_EyesDamaged", false];
|
||||
if (GVAR(EyesDamageScript) != -1) then {
|
||||
[GVAR(EyesDamageScript)] call CALLSTACK(cba_fnc_removePreFrameHandler);
|
||||
};
|
||||
if (GVAR(DustHandler) != -1) then {
|
||||
[GVAR(DustHandler)] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
GVAR(DustHandler) = -1;
|
||||
};
|
||||
GVAR(PostProcessEyes) ppEffectEnable false;
|
||||
SETGLASSES(ace_player,GLASSESDEFAULT);
|
||||
call FUNC(removeGlassesEffect);
|
||||
GVAR(EffectsActive)=false;
|
||||
ace_player setVariable ["ACE_EyesDamaged", false];
|
||||
if (GVAR(EyesDamageScript) != -1) then {
|
||||
[GVAR(EyesDamageScript)] call CALLSTACK(cba_fnc_removePreFrameHandler);
|
||||
};
|
||||
if (GVAR(DustHandler) != -1) then {
|
||||
[GVAR(DustHandler)] call CALLSTACK(cba_fnc_removePerFrameHandler);
|
||||
GVAR(DustHandler) = -1;
|
||||
};
|
||||
}];
|
||||
player addEventHandler ["Fired",{[_this select 0, _this select 1] call FUNC(dustHandler);}];
|
||||
player AddEventHandler ["Take",{call FUNC(checkGlasses);}];
|
||||
player AddEventHandler ["Put", {call FUNC(checkGlasses);}];
|
||||
|
||||
["GlassesChanged",{
|
||||
SETGLASSES(ace_player,GLASSESDEFAULT);
|
||||
SETGLASSES(ace_player,GLASSESDEFAULT);
|
||||
|
||||
if (call FUNC(ExternalCamera)) exitWith {call FUNC(RemoveGlassesEffect)};
|
||||
if (call FUNC(ExternalCamera)) exitWith {call FUNC(RemoveGlassesEffect)};
|
||||
|
||||
if ([ace_player] call FUNC(isGogglesVisible)) then {
|
||||
[_this select 0] call FUNC(applyGlassesEffect);
|
||||
} else {
|
||||
call FUNC(removeGlassesEffect);
|
||||
};
|
||||
if ([ace_player] call FUNC(isGogglesVisible)) then {
|
||||
[_this select 0] call FUNC(applyGlassesEffect);
|
||||
} else {
|
||||
call FUNC(removeGlassesEffect);
|
||||
};
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
["GlassesCracked",{
|
||||
if (_this select 0 != ace_player) exitWith {};
|
||||
ace_player setVariable ["ACE_EyesDamaged", true];
|
||||
if (GVAR(EyesDamageScript) != -1) then {
|
||||
[GVAR(EyesDamageScript)] call CALLSTACK(cba_fnc_removePreFrameHandler);
|
||||
};
|
||||
GVAR(PostProcessEyes) ppEffectAdjust[1, 1, 0, [0,0,0,0], [0.5,0.5,0.5,0.5],[1,1,1,0]];
|
||||
GVAR(PostProcessEyes) ppEffectCommit 0;
|
||||
GVAR(PostProcessEyes) ppEffectEnable true;
|
||||
GVAR(EyesDamageScript) = [{
|
||||
GVAR(PostProcessEyes) ppEffectAdjust[1, 1, 0, [0,0,0,0], [1,1,1,1],[1,1,1,0]];
|
||||
GVAR(PostProcessEyes) ppEffectCommit 5;
|
||||
if (_this select 0 != ace_player) exitWith {};
|
||||
ace_player setVariable ["ACE_EyesDamaged", true];
|
||||
if (GVAR(EyesDamageScript) != -1) then {
|
||||
[GVAR(EyesDamageScript)] call CALLSTACK(cba_fnc_removePreFrameHandler);
|
||||
};
|
||||
GVAR(PostProcessEyes) ppEffectAdjust[1, 1, 0, [0,0,0,0], [0.5,0.5,0.5,0.5],[1,1,1,0]];
|
||||
GVAR(PostProcessEyes) ppEffectCommit 0;
|
||||
GVAR(PostProcessEyes) ppEffectEnable true;
|
||||
GVAR(EyesDamageScript) = [{
|
||||
GVAR(PostProcessEyes) ppEffectEnable false;
|
||||
ace_player setVariable ["ACE_EyesDamaged", false];
|
||||
GVAR(EyesDamageScript) = -1;
|
||||
}, [], 5, 1] call EFUNC(common,waitAndExecute);
|
||||
}, [], 25, 5] call EFUNC(common,waitAndExecute);
|
||||
GVAR(PostProcessEyes) ppEffectAdjust[1, 1, 0, [0,0,0,0], [1,1,1,1],[1,1,1,0]];
|
||||
GVAR(PostProcessEyes) ppEffectCommit 5;
|
||||
GVAR(EyesDamageScript) = [{
|
||||
GVAR(PostProcessEyes) ppEffectEnable false;
|
||||
ace_player setVariable ["ACE_EyesDamaged", false];
|
||||
GVAR(EyesDamageScript) = -1;
|
||||
}, [], 5, 1] call EFUNC(common,waitAndExecute);
|
||||
}, [], 25, 5] call EFUNC(common,waitAndExecute);
|
||||
}] call EFUNC(common,addEventHandler);
|
||||
call FUNC(checkGlasses);
|
||||
[FUNC(CheckGoggles), 1, []] call CBA_fnc_addPerFrameHandler;
|
||||
|
@ -1,8 +1,3 @@
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
@ -11,35 +6,35 @@ class CfgVehicles {
|
||||
|
||||
class Box_NATO_Grenades_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_HandFlare_White,12)
|
||||
MACRO_ADDITEM(ACE_HandFlare_Green,12)
|
||||
MACRO_ADDITEM(ACE_M84,12)
|
||||
MACRO_ADDITEM(ACE_HandFlare_White,12);
|
||||
MACRO_ADDITEM(ACE_HandFlare_Green,12);
|
||||
MACRO_ADDITEM(ACE_M84,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Grenades_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_HandFlare_Yellow,12)
|
||||
MACRO_ADDITEM(ACE_HandFlare_Red,12)
|
||||
MACRO_ADDITEM(ACE_M84,12)
|
||||
MACRO_ADDITEM(ACE_HandFlare_Yellow,12);
|
||||
MACRO_ADDITEM(ACE_HandFlare_Red,12);
|
||||
MACRO_ADDITEM(ACE_M84,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Grenades_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_HandFlare_Yellow,12)
|
||||
MACRO_ADDITEM(ACE_HandFlare_Green,12)
|
||||
MACRO_ADDITEM(ACE_M84,12)
|
||||
MACRO_ADDITEM(ACE_HandFlare_Yellow,12);
|
||||
MACRO_ADDITEM(ACE_HandFlare_Green,12);
|
||||
MACRO_ADDITEM(ACE_M84,12);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_HandFlare_White,12)
|
||||
MACRO_ADDITEM(ACE_HandFlare_Red,12)
|
||||
MACRO_ADDITEM(ACE_HandFlare_Green,12)
|
||||
MACRO_ADDITEM(ACE_HandFlare_Yellow,12)
|
||||
MACRO_ADDITEM(ACE_M84,12)
|
||||
MACRO_ADDITEM(ACE_HandFlare_White,12);
|
||||
MACRO_ADDITEM(ACE_HandFlare_Red,12);
|
||||
MACRO_ADDITEM(ACE_HandFlare_Green,12);
|
||||
MACRO_ADDITEM(ACE_HandFlare_Yellow,12);
|
||||
MACRO_ADDITEM(ACE_M84,12);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -10,19 +10,16 @@ GVAR(flashbangPPEffectCC) = ppEffectCreate ["ColorCorrections", 4265];
|
||||
GVAR(flashbangPPEffectCC) ppEffectForceInNVG true;
|
||||
|
||||
// Add keybinds
|
||||
["ACE3",
|
||||
localize "STR_ACE_Grenades_SwitchGrenadeMode",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(captives,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call EFUNC(common,canUseWeapon))) exitWith {false};
|
||||
["ACE3", QGVAR(switchGrenadeMode), localize "STR_ACE_Grenades_SwitchGrenadeMode",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [QEGVAR(captives,isNotEscorting)];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (!([ACE_player] call EFUNC(common,canUseWeapon))) exitWith {false};
|
||||
|
||||
// Statement
|
||||
[] call FUNC(nextMode);
|
||||
},
|
||||
[9, [false, false, false]], //8 key
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
// Statement
|
||||
[] call FUNC(nextMode);
|
||||
},
|
||||
{false},
|
||||
[9, [false, false, false]], false] call cba_fnc_addKeybind; //8 Key
|
||||
|
@ -1,9 +1,3 @@
|
||||
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
@ -41,61 +35,61 @@ class CfgVehicles {
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_EarBuds,12)
|
||||
MACRO_ADDITEM(ACE_EarBuds,12);
|
||||
};
|
||||
};
|
||||
|
||||
class B_supplyCrate_F: ReammoBox_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_EarBuds,12)
|
||||
MACRO_ADDITEM(ACE_EarBuds,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_EarBuds,12)
|
||||
MACRO_ADDITEM(ACE_EarBuds,12);
|
||||
};
|
||||
};
|
||||
|
||||
class O_supplyCrate_F: B_supplyCrate_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_EarBuds,12)
|
||||
MACRO_ADDITEM(ACE_EarBuds,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_EarBuds,12)
|
||||
MACRO_ADDITEM(ACE_EarBuds,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_EarBuds,12)
|
||||
MACRO_ADDITEM(ACE_EarBuds,12);
|
||||
};
|
||||
};
|
||||
|
||||
class I_supplyCrate_F: B_supplyCrate_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_EarBuds,12)
|
||||
MACRO_ADDITEM(ACE_EarBuds,12);
|
||||
};
|
||||
};
|
||||
|
||||
class IG_supplyCrate_F: ReammoBox_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_EarBuds,12)
|
||||
MACRO_ADDITEM(ACE_EarBuds,12);
|
||||
};
|
||||
};
|
||||
|
||||
class C_supplyCrate_F: ReammoBox_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_EarBuds,12)
|
||||
MACRO_ADDITEM(ACE_EarBuds,12);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_EarBuds,12)
|
||||
MACRO_ADDITEM(ACE_EarBuds,12);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -6,30 +6,12 @@ _fnc = {
|
||||
};
|
||||
addMissionEventHandler ["Draw3D", _fnc];
|
||||
|
||||
["ACE3",
|
||||
"Interact Key",
|
||||
["ACE3", QGVAR(InteractKey), "Interact Key",
|
||||
{_this call FUNC(keyDown)},
|
||||
[219, [false, false, false]],
|
||||
false,
|
||||
"keydown"] call cba_fnc_registerKeybind;
|
||||
|
||||
["ACE3",
|
||||
"Interact Key",
|
||||
{_this call FUNC(keyUp)},
|
||||
[219, [false, false, false]],
|
||||
false,
|
||||
"keyUp"] call cba_fnc_registerKeybind;
|
||||
[219, [false, false, false]], false] call cba_fnc_addKeybind; //Left Windows Key
|
||||
|
||||
["ACE3",
|
||||
"Self Actions Key",
|
||||
["ACE3", QGVAR(SelfInteractKey), "Self Actions Key",
|
||||
{_this call FUNC(keyDownSelfAction)},
|
||||
[219, [false, true, false]],
|
||||
false,
|
||||
"keydown"] call cba_fnc_registerKeybind;
|
||||
|
||||
["ACE3",
|
||||
"Self Actions Key",
|
||||
{_this call FUNC(keyUpSelfAction)},
|
||||
[219, [false, true, false]],
|
||||
false,
|
||||
"keyUp"] call cba_fnc_registerKeybind;
|
||||
[219, [false, true, false]], false] call cba_fnc_addKeybind; //Left Windows Key + Ctrl/Strg
|
||||
|
@ -3,6 +3,7 @@
|
||||
ADDON = false;
|
||||
|
||||
PREP(addAction);
|
||||
PREP(addClassAction);
|
||||
PREP(compileMenu);
|
||||
PREP(compileMenuSelfAction);
|
||||
PREP(collectActiveActionTree);
|
||||
@ -11,6 +12,7 @@ PREP(keyDownSelfAction);
|
||||
PREP(keyUp);
|
||||
PREP(keyUpSelfAction);
|
||||
PREP(removeAction);
|
||||
PREP(removeClassAction);
|
||||
PREP(render);
|
||||
PREP(renderIcon);
|
||||
PREP(renderBaseMenu);
|
||||
@ -23,7 +25,8 @@ GVAR(keyDownTime) = 0;
|
||||
GVAR(lastTime) = diag_tickTime;
|
||||
GVAR(rotationAngle) = 0;
|
||||
|
||||
GVAR(selectedAction) = {};
|
||||
GVAR(selectedAction) = [[],[]];
|
||||
GVAR(selectedStatement) = {};
|
||||
GVAR(actionSelected) = false;
|
||||
GVAR(selectedTarget) = objNull;
|
||||
|
||||
|
@ -13,6 +13,7 @@
|
||||
* 6: Statement <CODE>
|
||||
* 7: Condition <CODE>
|
||||
* 8: Distance <NUMBER>
|
||||
* 9: Other parameters <ARRAY> (Optional)
|
||||
*
|
||||
* Return value:
|
||||
* The entry full path, which can be used to remove the entry, or add children entries <ARRAY>.
|
||||
@ -26,7 +27,7 @@
|
||||
|
||||
EXPLODE_9_PVT(_this,_object,_typeNum,_fullPath,_displayName,_icon,_position,_statement,_condition,_distance);
|
||||
|
||||
private ["_varName","_actions"];
|
||||
private ["_varName","_actions","_params","_entry"];
|
||||
|
||||
_varName = [QGVAR(actions),QGVAR(selfActions)] select _typeNum;
|
||||
_actions = _object getVariable [_varName, []];
|
||||
@ -34,7 +35,11 @@ if((count _actions) == 0) then {
|
||||
_object setVariable [_varName, _actions];
|
||||
};
|
||||
|
||||
private "_entry";
|
||||
_params = [false,false,false,false];
|
||||
if (count _this > 9) then {
|
||||
_params = _this select 9;
|
||||
};
|
||||
|
||||
_entry = [
|
||||
[
|
||||
_displayName,
|
||||
@ -43,7 +48,7 @@ _entry = [
|
||||
_statement,
|
||||
_condition,
|
||||
_distance,
|
||||
[false,false,false],
|
||||
_params,
|
||||
+ _fullPath
|
||||
],
|
||||
[]
|
||||
|
94
addons/interact_menu/functions/fnc_addClassAction.sqf
Normal file
94
addons/interact_menu/functions/fnc_addClassAction.sqf
Normal file
@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Add an ACE action to a class, under a certain path
|
||||
* Note: This function is NOT global.
|
||||
*
|
||||
* Argument:
|
||||
* 0: TypeOf of the class <STRING>
|
||||
* 1: Type of action, 0 for actions, 1 for self-actions <NUMBER>
|
||||
* 2: Full path of the new action <ARRAY>
|
||||
* 3: Name of the action shown in the menu <STRING>
|
||||
* 4: Icon <STRING>
|
||||
* 5: Position (Position or Selection Name) <POSITION> or <STRING>
|
||||
* 6: Statement <CODE>
|
||||
* 7: Condition <CODE>
|
||||
* 8: Distance <NUMBER>
|
||||
* 9: Other parameters <ARRAY> (Optional)
|
||||
*
|
||||
* Return value:
|
||||
* The entry full path, which can be used to remove the entry, or add children entries <ARRAY>.
|
||||
*
|
||||
* Example:
|
||||
* [typeOf cursorTarget, 0,["ACE_TapShoulderRight","VulcanPinch"],"Vulcan Pinch","",[0,0,0],{_target setDamage 1;},{true},100] call ace_interact_menu_fnc_addClassAction;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_9_PVT(_this,_objectType,_typeNum,_fullPath,_displayName,_icon,_position,_statement,_condition,_distance);
|
||||
|
||||
// Ensure the config menu was compiled first
|
||||
if (_typeNum == 0) then {
|
||||
[_objectType] call FUNC(compileMenu);
|
||||
} else {
|
||||
[_objectType] call FUNC(compileMenuSelfAction);
|
||||
};
|
||||
|
||||
private ["_varName","_actions","_params","_entry", "_parentLevel", "_foundParentLevel", "_fnc_findFolder"];
|
||||
|
||||
_varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType];
|
||||
_actions = missionNamespace getVariable [_varName, []];
|
||||
if((count _actions) == 0) then {
|
||||
missionNamespace setVariable [_varName, _actions];
|
||||
};
|
||||
|
||||
_params = [false,false,false,false];
|
||||
if (count _this > 9) then {
|
||||
_params = _this select 9;
|
||||
};
|
||||
|
||||
// Search the class action trees and find where to insert the entry
|
||||
_parentLevel = _actions;
|
||||
_foundParentLevel = false;
|
||||
|
||||
_fnc_findFolder = {
|
||||
EXPLODE_3_PVT(_this,_fullPath,_level,_classActions);
|
||||
|
||||
if (count _fullPath == _level + 1) then {
|
||||
_parentLevel = _classActions;
|
||||
_foundParentLevel = true;
|
||||
};
|
||||
|
||||
if (_foundParentLevel) exitWith {};
|
||||
|
||||
{
|
||||
EXPLODE_2_PVT(_x,_actionData,_actionChildren);
|
||||
if (((_actionData select 7) select _level) isEqualTo (_fullPath select _level)) exitWith {
|
||||
// The action should go somewhere in here
|
||||
[_fullPath, _level + 1, _actionChildren] call _fnc_findFolder;
|
||||
};
|
||||
} forEach _classActions;
|
||||
};
|
||||
|
||||
[_fullPath, 0, _actions] call _fnc_findFolder;
|
||||
|
||||
// Exit if there's no entry point to insert this action
|
||||
if (!_foundParentLevel) exitWith {};
|
||||
|
||||
_entry = [
|
||||
[
|
||||
_displayName,
|
||||
_icon,
|
||||
_position,
|
||||
_statement,
|
||||
_condition,
|
||||
_distance,
|
||||
_params,
|
||||
+ _fullPath
|
||||
],
|
||||
[]
|
||||
];
|
||||
|
||||
_parentLevel pushBack _entry;
|
||||
|
||||
_fullPath
|
@ -3,7 +3,7 @@
|
||||
* Compile the action menu from config for an object's class
|
||||
*
|
||||
* Argument:
|
||||
* 0: Object <OBJECT>
|
||||
* 0: Object or class name <OBJECT> or <STRING>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
@ -12,10 +12,13 @@
|
||||
*/
|
||||
#include "script_component.hpp";
|
||||
|
||||
EXPLODE_1_PVT(_this,_object);
|
||||
EXPLODE_1_PVT(_this,_target);
|
||||
|
||||
private ["_objectType","_actionsVarName"];
|
||||
_objectType = typeOf _object;
|
||||
_objectType = _target;
|
||||
if (typeName _target == "OBJECT") then {
|
||||
_objectType = typeOf _target;
|
||||
};
|
||||
_actionsVarName = format [QGVAR(Act_%1), _objectType];
|
||||
|
||||
// Exit if the action menu is already compiled for this class
|
||||
@ -24,7 +27,7 @@ if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {};
|
||||
private "_recurseFnc";
|
||||
_recurseFnc = {
|
||||
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_selection", "_condition", "_showDisabled",
|
||||
"_enableInside", "_children", "_entry", "_entryCfg", "_fullPath"];
|
||||
"_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_fullPath"];
|
||||
EXPLODE_2_PVT(_this,_actionsCfg,_parentPath);
|
||||
_actions = [];
|
||||
|
||||
@ -48,6 +51,7 @@ _recurseFnc = {
|
||||
_showDisabled = (getNumber (_entryCfg >> "showDisabled")) > 0;
|
||||
_enableInside = (getNumber (_entryCfg >> "enableInside")) > 0;
|
||||
_canCollapse = (getNumber (_entryCfg >> "canCollapse")) > 0;
|
||||
_runOnHover = (getNumber (_entryCfg >> "runOnHover")) > 0;
|
||||
|
||||
_fullPath = (+ _parentPath);
|
||||
_fullPath pushBack (configName _entryCfg);
|
||||
@ -63,7 +67,7 @@ _recurseFnc = {
|
||||
_statement,
|
||||
_condition,
|
||||
_distance,
|
||||
[_showDisabled,_enableInside,_canCollapse],
|
||||
[_showDisabled,_enableInside,_canCollapse,_runOnHover],
|
||||
_fullPath
|
||||
],
|
||||
_children
|
||||
|
@ -3,7 +3,7 @@
|
||||
* Compile the self action menu from config for an object's class
|
||||
*
|
||||
* Argument:
|
||||
* 0: Object <OBJECT>
|
||||
* 0: Object or class name <OBJECT> or <STRING>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
@ -12,10 +12,13 @@
|
||||
*/
|
||||
#include "script_component.hpp";
|
||||
|
||||
EXPLODE_1_PVT(_this,_object);
|
||||
EXPLODE_1_PVT(_this,_target);
|
||||
|
||||
private ["_objectType","_actionsVarName"];
|
||||
_objectType = typeOf _object;
|
||||
_objectType = _target;
|
||||
if (typeName _target == "OBJECT") then {
|
||||
_objectType = typeOf _target;
|
||||
};
|
||||
_actionsVarName = format [QGVAR(SelfAct_%1), _objectType];
|
||||
|
||||
// Exit if the action menu is already compiled for this class
|
||||
@ -24,7 +27,7 @@ if !(isNil {missionNamespace getVariable [_actionsVarName, nil]}) exitWith {};
|
||||
private "_recurseFnc";
|
||||
_recurseFnc = {
|
||||
private ["_actions", "_displayName", "_distance", "_icon", "_statement", "_selection", "_condition", "_showDisabled",
|
||||
"_enableInside", "_children", "_entry", "_entryCfg", "_fullPath"];
|
||||
"_enableInside", "_canCollapse", "_runOnHover", "_children", "_entry", "_entryCfg", "_fullPath"];
|
||||
EXPLODE_2_PVT(_this,_actionsCfg,_parentPath);
|
||||
_actions = [];
|
||||
|
||||
@ -45,6 +48,7 @@ _recurseFnc = {
|
||||
_showDisabled = (getNumber (_entryCfg >> "showDisabled")) > 0;
|
||||
_enableInside = (getNumber (_entryCfg >> "enableInside")) > 0;
|
||||
_canCollapse = (getNumber (_entryCfg >> "canCollapse")) > 0;
|
||||
_runOnHover = (getNumber (_entryCfg >> "runOnHover")) > 0;
|
||||
|
||||
_fullPath = (+ _parentPath);
|
||||
_fullPath pushBack (configName _entryCfg);
|
||||
@ -60,7 +64,7 @@ _recurseFnc = {
|
||||
_statement,
|
||||
_condition,
|
||||
10, //distace
|
||||
[_showDisabled,_enableInside,_canCollapse],
|
||||
[_showDisabled,_enableInside,_canCollapse,_runOnHover],
|
||||
_fullPath
|
||||
],
|
||||
_children
|
||||
|
@ -19,5 +19,7 @@ if(!GVAR(keyDown)) then {
|
||||
|
||||
GVAR(keyDown) = true;
|
||||
GVAR(keyDownTime) = diag_tickTime;
|
||||
|
||||
["interactMenuOpened", [0]] call EFUNC(common,localEvent);
|
||||
};
|
||||
true
|
||||
|
@ -17,6 +17,8 @@ if(!GVAR(keyDownSelfAction)) then {
|
||||
GVAR(keyDown) = false;
|
||||
GVAR(keyDownTime) = diag_tickTime;
|
||||
|
||||
["interactMenuOpened", [1]] call EFUNC(common,localEvent);
|
||||
|
||||
GVAR(useCursorMenu) = (vehicle ACE_player != ACE_player) || GVAR(AlwaysUseCursorSelfInteraction) || visibleMap;
|
||||
|
||||
if (GVAR(useCursorMenu)) then {
|
||||
|
@ -12,13 +12,18 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
GVAR(keyDown) = false;
|
||||
if(GVAR(actionSelected)) then {
|
||||
this = GVAR(selectedTarget);
|
||||
_player = ACE_Player;
|
||||
_target = GVAR(selectedTarget);
|
||||
[GVAR(selectedTarget), ACE_player] call GVAR(selectedAction);
|
||||
[GVAR(selectedTarget), ACE_player] call GVAR(selectedStatement);
|
||||
};
|
||||
|
||||
if (GVAR(keyDown)) then {
|
||||
GVAR(keyDown) = false;
|
||||
["interactMenuClosed", [0]] call EFUNC(common,localEvent);
|
||||
};
|
||||
|
||||
GVAR(expanded) = false;
|
||||
GVAR(lastPath) = [];
|
||||
GVAR(menuDepthPath) = [];
|
||||
|
@ -16,13 +16,18 @@ if (uiNamespace getVariable [QGVAR(cursorMenuOpened),false]) then {
|
||||
closeDialog 0;
|
||||
};
|
||||
|
||||
GVAR(keyDownSelfAction) = false;
|
||||
if(GVAR(actionSelected)) then {
|
||||
this = GVAR(selectedTarget);
|
||||
_player = ACE_Player;
|
||||
_target = GVAR(selectedTarget);
|
||||
[GVAR(selectedTarget), ACE_player] call GVAR(selectedAction);
|
||||
[GVAR(selectedTarget), ACE_player] call GVAR(selectedStatement);
|
||||
};
|
||||
|
||||
if (GVAR(keyDownSelfAction)) then {
|
||||
GVAR(keyDownSelfAction) = false;
|
||||
["interactMenuClosed", [1]] call EFUNC(common,localEvent);
|
||||
};
|
||||
|
||||
GVAR(expanded) = false;
|
||||
GVAR(lastPath) = [];
|
||||
GVAR(menuDepthPath) = [];
|
||||
|
72
addons/interact_menu/functions/fnc_removeClassAction.sqf
Normal file
72
addons/interact_menu/functions/fnc_removeClassAction.sqf
Normal file
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Author: CAA-Picard
|
||||
* Removes a class action from a class
|
||||
* Note: This function is NOT global.
|
||||
*
|
||||
* Argument:
|
||||
* 0: TypeOf of the class <STRING>
|
||||
* 1: Type of action, 0 for actions, 1 for self-actions <NUMBER>
|
||||
* 2: Full path of the new action <ARRAY>
|
||||
*
|
||||
* Return value:
|
||||
* None
|
||||
*
|
||||
* Example:
|
||||
* [typeOf cursorTarget, 0,["ACE_TapShoulderRight","VulcanPinch"]] call ace_interact_menu_fnc_removeClassAction;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
EXPLODE_3_PVT(_this,_objectType,_typeNum,_fullPath);
|
||||
|
||||
private ["_varName","_actions","_parentLevel", "_actionIndex", "_foundAction", "_fnc_findFolder"];
|
||||
|
||||
_varName = format [[QGVAR(Act_%1), QGVAR(SelfAct_%1)] select _typeNum, _objectType];
|
||||
_actions = missionNamespace getVariable [_varName, []];
|
||||
|
||||
// Search the class action trees and find where to insert the entry
|
||||
_parentLevel = _actions;
|
||||
_actionIndex = -1;
|
||||
_foundAction = false;
|
||||
|
||||
_fnc_findFolder = {
|
||||
EXPLODE_3_PVT(_this,_fullPath,_level,_classActions);
|
||||
|
||||
if (count _fullPath == _level + 1) then {
|
||||
_parentLevel = _classActions;
|
||||
};
|
||||
|
||||
{
|
||||
EXPLODE_2_PVT(_x,_actionData,_actionChildren);
|
||||
if (((_actionData select 7) select _level) isEqualTo (_fullPath select _level)) exitWith {
|
||||
if (_level + 1 == count _fullPath) exitWith {
|
||||
_actionIndex = _forEachIndex;
|
||||
_foundAction = true;
|
||||
};
|
||||
[_fullPath, _level + 1, _actionChildren] call _fnc_findFolder;
|
||||
};
|
||||
if (_foundAction) exitWith {};
|
||||
} forEach _classActions;
|
||||
};
|
||||
|
||||
[_fullPath, 0, _actions] call _fnc_findFolder;
|
||||
|
||||
// Exit if the action was not found
|
||||
if (!_foundAction) exitWith {};
|
||||
|
||||
_entry = [
|
||||
[
|
||||
_displayName,
|
||||
_icon,
|
||||
_position,
|
||||
_statement,
|
||||
_condition,
|
||||
_distance,
|
||||
_params,
|
||||
+ _fullPath
|
||||
],
|
||||
[]
|
||||
];
|
||||
|
||||
_parentLevel deleteAt _actionIndex;
|
@ -143,7 +143,9 @@ if(GVAR(keyDown) || GVAR(keyDownSelfAction)) then {
|
||||
_foundTarget = true;
|
||||
GVAR(actionSelected) = true;
|
||||
GVAR(selectedTarget) = (_closest select 0) select 0;
|
||||
GVAR(selectedAction) = (((_closest select 0) select 1) select 0) select 3;
|
||||
GVAR(selectedAction) = (_closest select 0) select 1;
|
||||
GVAR(selectedStatement) = ((GVAR(selectedAction)) select 0) select 3;
|
||||
|
||||
_misMatch = false;
|
||||
_hoverPath = (_closest select 2);
|
||||
|
||||
@ -165,6 +167,16 @@ if(GVAR(keyDown) || GVAR(keyDownSelfAction)) then {
|
||||
if(!GVAR(expanded) && diag_tickTime-GVAR(startHoverTime) > 0.25) then {
|
||||
GVAR(expanded) = true;
|
||||
GVAR(menuDepthPath) = +GVAR(lastPath);
|
||||
|
||||
// Execute the current action if it's run on hover
|
||||
private "_runOnHover";
|
||||
_runOnHover = ((GVAR(selectedAction) select 0) select 6) select 3;
|
||||
if (_runOnHover) then {
|
||||
this = GVAR(selectedTarget);
|
||||
_player = ACE_Player;
|
||||
_target = GVAR(selectedTarget);
|
||||
[GVAR(selectedTarget), ACE_player] call GVAR(selectedStatement);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -58,8 +58,14 @@ if ((_sPos select 1) < safeZoneY || (_sPos select 1) > safeZoneY + safeZon
|
||||
|
||||
|
||||
// Collect active tree
|
||||
// @todo: cache activeActionTree?
|
||||
_activeActionTree = ([_object, _baseAction] call FUNC(collectActiveActionTree));
|
||||
private "_uid";
|
||||
_uid = format [QGVAR(ATCache_%1), (_actionData select 7) select 0];
|
||||
_activeActionTree = [
|
||||
[_object, _baseAction],
|
||||
DFUNC(collectActiveActionTree),
|
||||
_object, _uid, 0.2
|
||||
] call EFUNC(common,cachedCall);
|
||||
|
||||
|
||||
// Check if there's something left for rendering
|
||||
if (count _activeActionTree == 0) exitWith {false};
|
||||
|
@ -1,8 +1,3 @@
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
|
||||
class Module_F;
|
||||
@ -481,8 +476,8 @@ class CfgVehicles {
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
displayName = "$STR_ACE_Interaction_MainAction";
|
||||
selection = "";
|
||||
distance = 10;
|
||||
selection = "gunnerview";
|
||||
distance = 2;
|
||||
condition = "true";
|
||||
};
|
||||
};
|
||||
@ -494,8 +489,8 @@ class CfgVehicles {
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
displayName = "$STR_ACE_Interaction_MainAction";
|
||||
selection = "";
|
||||
distance = 10;
|
||||
selection = "gunnerview";
|
||||
distance = 2;
|
||||
condition = "true";
|
||||
};
|
||||
};
|
||||
|
@ -16,92 +16,56 @@ GVAR(isOpeningDoor) = false;
|
||||
|
||||
|
||||
// Add keybinds
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_OpenDoor",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(!GVAR(isOpeningDoor) &&
|
||||
{[2] call FUNC(getDoor) select 1 != ''}
|
||||
) exitWith {false};
|
||||
["ACE3", QGVAR(openDoor), localize "STR_ACE_Interaction_OpenDoor",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if (GVAR(isOpeningDoor) || {[2] call FUNC(getDoor) select 1 == ''}) exitWith {false};
|
||||
|
||||
// Statement
|
||||
call EFUNC(interaction,openDoor);
|
||||
true
|
||||
},
|
||||
[57, [false, true, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
// Statement
|
||||
call EFUNC(interaction,openDoor);
|
||||
true
|
||||
},
|
||||
{
|
||||
//Probably don't want any condidtions here, so variable never gets locked down
|
||||
// Statement
|
||||
GVAR(isOpeningDoor) = false;
|
||||
true
|
||||
},
|
||||
[57, [false, true, false]], false] call cba_fnc_addKeybind; //Key CTRL+Space
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_OpenDoor",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(GVAR(isOpeningDoor)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
GVAR(isOpeningDoor) = false;
|
||||
true
|
||||
},
|
||||
[57, [false, true, false]],
|
||||
false,
|
||||
"keyup"
|
||||
] call cba_fnc_registerKeybind;
|
||||
["ACE3", QGVAR(tapShoulder), localize "STR_ACE_Interaction_TapShoulder",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player, cursorTarget] call FUNC(canTapShoulder)) exitWith {false};
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_TapShoulder",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !([ACE_player, cursorTarget] call FUNC(canTapShoulder)) exitWith {false};
|
||||
// Statement
|
||||
[ACE_player, cursorTarget] call FUNC(tapShoulder);
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[20, [true, false, false]], false] call cba_fnc_addKeybind;
|
||||
|
||||
// Statement
|
||||
[ACE_player, cursorTarget] call FUNC(tapShoulder);
|
||||
true
|
||||
},
|
||||
[20, [true, false, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
["ACE3", QGVAR(modifierKey), localize "STR_ACE_Interaction_ModifierKey",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_ModifierKey",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
ACE_Modifier = 1;
|
||||
// Return false so it doesn't block other actions
|
||||
false
|
||||
},
|
||||
[29, [false, false, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_ModifierKey",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging"];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
|
||||
// Statement
|
||||
ACE_Modifier = 0;
|
||||
// Return false so it doesn't block other actions
|
||||
false
|
||||
},
|
||||
[29, [false, false, false]],
|
||||
false,
|
||||
"keyup"
|
||||
] call cba_fnc_registerKeybind;
|
||||
// Statement
|
||||
ACE_Modifier = 1;
|
||||
// Return false so it doesn't block other actions
|
||||
false
|
||||
},
|
||||
{
|
||||
//Probably don't want any condidtions here, so variable never gets locked down
|
||||
ACE_Modifier = 0;
|
||||
false;
|
||||
},
|
||||
[29, [false, false, false]], false] call cba_fnc_addKeybind;
|
||||
|
@ -47,7 +47,7 @@ playSound "ACE_Sound_Click";
|
||||
!GVAR(isOpeningDoor) || {getPosASL ACE_player distance _position > 1}
|
||||
};
|
||||
|
||||
if (!_usedMouseWheel && {time < _time}) then {
|
||||
if (!_usedMouseWheel && {time < _time} && {[] call EGVAR(common,canInteract)}) then {
|
||||
_phase = [0, 1] select (_house animationPhase (_animations select 0) < 0.5);
|
||||
|
||||
{_house animate [_x, _phase]} forEach _animations;
|
||||
|
516
addons/inventory/RscDisplayInventory.hpp
Normal file
516
addons/inventory/RscDisplayInventory.hpp
Normal file
@ -0,0 +1,516 @@
|
||||
/*
|
||||
Adjust the scaling of the inventory screen
|
||||
- changes it from scaling based on user's interface size to a dynamic size based on a setting variable
|
||||
- text size and row height size are uneffected (so more rows in a list)
|
||||
- also tweaks the height of the two ProgressBars which looked odd scaled up so much
|
||||
|
||||
regex:
|
||||
x = "[-+]?(\d*[.]?\d+).*
|
||||
x = X_PART\(\1\);
|
||||
*/
|
||||
|
||||
class RscText;
|
||||
class RscPicture;
|
||||
class RscListBox;
|
||||
class RscProgress;
|
||||
class RscStructuredText;
|
||||
class RscActiveText;
|
||||
class RscCombo;
|
||||
|
||||
#define X_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2))
|
||||
#define Y_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - (((safezoneW / safezoneH) min 1.2) / 1.2))/2))
|
||||
#define W_BIS(num) (num * (((safezoneW / safezoneH) min 1.2) / 40))
|
||||
#define H_BIS(num) (num * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25))
|
||||
|
||||
#define X_MAKEITBIGGA(num) (num * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2))
|
||||
#define Y_MAKEITBIGGA(num) (num * (safeZoneH / 30) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2))
|
||||
#define W_MAKEITBIGGA(num) (num * (safeZoneH / 40))
|
||||
#define H_MAKEITBIGGA(num) (num * (safeZoneH / 30))
|
||||
|
||||
#define X_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(inventoryDisplaySize)), 0)]), X_BIS(num), X_MAKEITBIGGA(num))])
|
||||
#define Y_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(inventoryDisplaySize)), 0)]), Y_BIS(num), Y_MAKEITBIGGA(num))])
|
||||
#define W_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(inventoryDisplaySize)), 0)]), W_BIS(num), W_MAKEITBIGGA(num))])
|
||||
#define H_PART(num) QUOTE(linearConversion [ARR_5(0, 2, (missionNamespace getVariable [ARR_2(QUOTE(QGVAR(inventoryDisplaySize)), 0)]), H_BIS(num), H_MAKEITBIGGA(num))])
|
||||
|
||||
class RscDisplayInventory {
|
||||
class controls {
|
||||
class CA_ContainerBackground: RscText {
|
||||
//crate: GroundLoad adjust size
|
||||
x = X_PART(1);
|
||||
y = Y_PART(1);
|
||||
w = W_PART(12);
|
||||
h = H_PART(22.5);
|
||||
};
|
||||
class CA_PlayerBackground: RscText {
|
||||
//center player's container: decrease height because of progressbar height decrease
|
||||
x = X_PART(14.6);
|
||||
y = Y_PART(2);
|
||||
w = W_PART(24.4);
|
||||
h = H_PART(21.5);
|
||||
};
|
||||
class TitleBackground: RscText {
|
||||
x = X_PART(14.6);
|
||||
y = Y_PART(1);
|
||||
w = W_PART(24.4);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class PlayersName: RscText {
|
||||
x = X_PART(15.6);
|
||||
y = Y_PART(1);
|
||||
w = W_PART(19.8);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class RankBackground: RscText {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(1.25);
|
||||
w = W_PART(0.6);
|
||||
h = H_PART(0.6);
|
||||
};
|
||||
class RankPicture: RscPicture {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(1.25);
|
||||
w = W_PART(0.6);
|
||||
h = H_PART(0.6);
|
||||
};
|
||||
class ButtonBack: RscActiveText {
|
||||
x = X_PART(38);
|
||||
y = Y_PART(1);
|
||||
w = W_PART(1);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class BackgroundSlotPrimary: RscPicture {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(6);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackgroundSlotPrimaryMuzzle: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryFlashlight: BackgroundSlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryOptics: BackgroundSlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotPrimaryMagazine: BackgroundSlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondary: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(11.5);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackgroundSlotSecondaryMuzzle: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondaryFlashlight: BackgroundSlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondaryOptics: BackgroundSlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotSecondaryMagazine: BackgroundSlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHandgun: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(17);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackgroundSlotHandgunMuzzle: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHandgunFlashlight: BackgroundSlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHandgunOptics: BackgroundSlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHandgunMagazine: BackgroundSlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotHeadgear: BackgroundSlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class BackgroundSlotGoggles: BackgroundSlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class BackgroundSlotHMD: BackgroundSlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class BackgroundSlotBinoculars: BackgroundSlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class BackgroundSlotMap: BackgroundSlotPrimary {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotGPS: BackgroundSlotPrimary {
|
||||
x = X_PART(17.32);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotCompass: BackgroundSlotPrimary {
|
||||
x = X_PART(21.76);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotRadio: BackgroundSlotPrimary {
|
||||
x = X_PART(19.54);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class BackgroundSlotWatch: BackgroundSlotPrimary {
|
||||
x = X_PART(23.98);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.12);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class ExternalContainerBackground: RscPicture {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(3.7);
|
||||
w = W_PART(11);
|
||||
h = H_PART(18.4);
|
||||
};
|
||||
class PlayerContainerBackground: ExternalContainerBackground {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(6);
|
||||
w = W_PART(11);
|
||||
h = H_PART(14);
|
||||
};
|
||||
class GroundTab: RscActiveText {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(1.5);
|
||||
w = W_PART(5.5);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class SoldierTab: GroundTab {
|
||||
x = X_PART(7);
|
||||
y = Y_PART(1.5);
|
||||
w = W_PART(5.5);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class GroundContainer: RscListBox {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(3.7);
|
||||
w = W_PART(11);
|
||||
h = H_PART(18.4);
|
||||
};
|
||||
class GroundFilter: RscCombo {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(2.6);
|
||||
w = W_PART(11);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class GroundLoad: RscProgress {
|
||||
//crate: GroundLoad adjust size
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(22.5);
|
||||
w = W_PART(11);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class SlotPrimary: GroundTab {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(6);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class SlotPrimaryMuzzle: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = X_PART(39);
|
||||
y = Y_PART(9);
|
||||
};
|
||||
class SlotPrimaryFlashlight: SlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryOptics: SlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotPrimaryMagazine: SlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(9.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondary: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(11.5);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class SlotSecondaryMuzzle: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondaryGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = X_PART(39);
|
||||
y = Y_PART(14.5);
|
||||
};
|
||||
class SlotSecondaryFlashlight: SlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondaryOptics: SlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotSecondaryMagazine: SlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(14.6);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHandgun: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(17);
|
||||
w = W_PART(11.9);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class SlotHandgunMuzzle: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHandgunGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = X_PART(39);
|
||||
y = Y_PART(20);
|
||||
};
|
||||
class SlotHandgunFlashlight: SlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHandgunOptics: SlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHandgunMagazine: SlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotHeadgear: SlotPrimary {
|
||||
x = X_PART(26.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class SlotGoggles: SlotPrimary {
|
||||
x = X_PART(29.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class SlotHMD: SlotPrimary {
|
||||
x = X_PART(32.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class SlotBinoculars: SlotPrimary {
|
||||
x = X_PART(35.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(2.9);
|
||||
h = H_PART(2.9);
|
||||
};
|
||||
class SlotMap: SlotPrimary {
|
||||
x = X_PART(15.16);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotGPS: SlotPrimary {
|
||||
x = X_PART(17.38);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotCompass: SlotPrimary {
|
||||
x = X_PART(21.82);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotRadio: SlotPrimary {
|
||||
x = X_PART(19.6);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class SlotWatch: SlotPrimary {
|
||||
x = X_PART(24.04);
|
||||
y = Y_PART(20.1);
|
||||
w = W_PART(2);
|
||||
h = H_PART(2);
|
||||
};
|
||||
class UniformTab: GroundTab {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class UniformSlot: SlotPrimary {
|
||||
x = X_PART(15.35);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class UniformLoad: GroundLoad {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(5.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class UniformContainer: GroundContainer {
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(6);
|
||||
w = W_PART(11);
|
||||
h = H_PART(14);
|
||||
};
|
||||
class VestTab: UniformTab {
|
||||
x = X_PART(18.85);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class VestSlot: SlotPrimary {
|
||||
x = X_PART(19.1);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class VestLoad: GroundLoad {
|
||||
x = X_PART(18.85);
|
||||
y = Y_PART(5.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class BackpackTab: UniformTab {
|
||||
x = X_PART(22.6);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackpackSlot: SlotPrimary {
|
||||
x = X_PART(22.85);
|
||||
y = Y_PART(2.5);
|
||||
w = W_PART(3);
|
||||
h = H_PART(3);
|
||||
};
|
||||
class BackpackLoad: GroundLoad {
|
||||
x = X_PART(22.6);
|
||||
y = Y_PART(5.5);
|
||||
w = W_PART(3.5);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class TotalLoad: GroundLoad {
|
||||
//center: progressbar height decrease
|
||||
x = X_PART(15.1);
|
||||
y = Y_PART(22.5);
|
||||
w = W_PART(23.4);
|
||||
h = H_PART(0.5);
|
||||
};
|
||||
class ContainerMarker: GroundTab {
|
||||
x = X_PART(0);
|
||||
y = Y_PART(24);
|
||||
w = W_PART(1);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class GroundMarker: ContainerMarker {
|
||||
x = X_PART(1.5);
|
||||
y = Y_PART(24);
|
||||
w = W_PART(1);
|
||||
h = H_PART(1);
|
||||
};
|
||||
class SoldierMarker: ContainerMarker {
|
||||
x = X_PART(3);
|
||||
y = Y_PART(24);
|
||||
w = W_PART(1);
|
||||
h = H_PART(1);
|
||||
};
|
||||
};
|
||||
};
|
@ -12,503 +12,16 @@ class CfgPatches {
|
||||
};
|
||||
};
|
||||
|
||||
#include "RscDisplayInventory.hpp"
|
||||
|
||||
class RscText;
|
||||
class RscPicture;
|
||||
class RscListBox;
|
||||
class RscProgress;
|
||||
class RscStructuredText;
|
||||
class RscActiveText;
|
||||
class RscCombo;
|
||||
class RscControlsGroupNoScrollbars;
|
||||
|
||||
/*
|
||||
Adjust the scaling of the inventory screen
|
||||
- changes it from scaling based on user's interface size to a static size
|
||||
- text size and row height size are uneffected
|
||||
- also tweaks the height of the two ProgressBars which looked odd scaled up so much
|
||||
*/
|
||||
|
||||
class RscDisplayInventory {
|
||||
class controls {
|
||||
class CA_ContainerBackground: RscText {
|
||||
//crate: GroundLoad adjust size
|
||||
x = "1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "12 * (safeZoneH / 40)";
|
||||
h = "22.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class CA_PlayerBackground: RscText {
|
||||
//center player's container: decrease height because of progressbar height decrease
|
||||
x = "14.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "24.4 * (safeZoneH / 40)";
|
||||
h = "21.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class TitleBackground: RscText {
|
||||
x = "14.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "24.4 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class PlayersName: RscText {
|
||||
text = "Player name:";
|
||||
x = "15.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "19.8 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class RankBackground: RscText {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1.25 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "0.6 * (safeZoneH / 40)";
|
||||
h = "0.6 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class RankPicture: RscPicture {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1.25 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "0.6 * (safeZoneH / 40)";
|
||||
h = "0.6 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class ButtonBack: RscActiveText {
|
||||
x = "38 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "1 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimary: RscPicture {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimaryMuzzle: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimaryFlashlight: BackgroundSlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimaryOptics: BackgroundSlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotPrimaryMagazine: BackgroundSlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondary: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "11.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondaryMuzzle: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondaryFlashlight: BackgroundSlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondaryOptics: BackgroundSlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotSecondaryMagazine: BackgroundSlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgun: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "17 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgunMuzzle: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgunFlashlight: BackgroundSlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgunOptics: BackgroundSlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHandgunMagazine: BackgroundSlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHeadgear: BackgroundSlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotGoggles: BackgroundSlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotHMD: BackgroundSlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotBinoculars: BackgroundSlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotMap: BackgroundSlotPrimary {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotGPS: BackgroundSlotPrimary {
|
||||
x = "17.32 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotCompass: BackgroundSlotPrimary {
|
||||
x = "21.76 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotRadio: BackgroundSlotPrimary {
|
||||
x = "19.54 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackgroundSlotWatch: BackgroundSlotPrimary {
|
||||
x = "23.98 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.12 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class ExternalContainerBackground: RscPicture {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "3.7 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "18.4 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class PlayerContainerBackground: ExternalContainerBackground {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "14 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundTab: RscActiveText {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "5.5 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SoldierTab: GroundTab {
|
||||
x = "7 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "1.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "5.5 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundContainer: RscListBox {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "3.7 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "18.4 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundFilter: RscCombo {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundLoad: RscProgress {
|
||||
//crate: GroundLoad adjust size
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "22.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimary: GroundTab {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimaryMuzzle: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimaryGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = "39 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
};
|
||||
class SlotPrimaryFlashlight: SlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimaryOptics: SlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotPrimaryMagazine: SlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "9.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondary: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "11.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondaryMuzzle: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondaryGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = "39 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
};
|
||||
class SlotSecondaryFlashlight: SlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondaryOptics: SlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotSecondaryMagazine: SlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "14.6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgun: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "17 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11.9 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgunMuzzle: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgunGrip: SlotPrimary {
|
||||
w = 0;
|
||||
h = 0;
|
||||
x = "39 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
};
|
||||
class SlotHandgunFlashlight: SlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgunOptics: SlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHandgunMagazine: SlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHeadgear: SlotPrimary {
|
||||
x = "26.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotGoggles: SlotPrimary {
|
||||
x = "29.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotHMD: SlotPrimary {
|
||||
x = "32.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotBinoculars: SlotPrimary {
|
||||
x = "35.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2.9 * (safeZoneH / 40)";
|
||||
h = "2.9 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotMap: SlotPrimary {
|
||||
x = "15.16 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotGPS: SlotPrimary {
|
||||
x = "17.38 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotCompass: SlotPrimary {
|
||||
x = "21.82 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotRadio: SlotPrimary {
|
||||
x = "19.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SlotWatch: SlotPrimary {
|
||||
x = "24.04 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "20.1 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "2 * (safeZoneH / 40)";
|
||||
h = "2 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class UniformTab: GroundTab {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class UniformSlot: SlotPrimary {
|
||||
x = "15.35 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class UniformLoad: GroundLoad {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "5.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class UniformContainer: GroundContainer {
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "6 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "11 * (safeZoneH / 40)";
|
||||
h = "14 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class VestTab: UniformTab {
|
||||
x = "18.85 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class VestSlot: SlotPrimary {
|
||||
x = "19.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class VestLoad: GroundLoad {
|
||||
x = "18.85 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "5.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackpackTab: UniformTab {
|
||||
x = "22.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackpackSlot: SlotPrimary {
|
||||
x = "22.85 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "2.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3 * (safeZoneH / 40)";
|
||||
h = "3 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class BackpackLoad: GroundLoad {
|
||||
x = "22.6 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "5.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "3.5 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class TotalLoad: GroundLoad {
|
||||
//center: progressbar height decrease
|
||||
x = "15.1 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "22.5 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "23.4 * (safeZoneH / 40)";
|
||||
h = "0.5 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class ContainerMarker: GroundTab {
|
||||
x = "0 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "24 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "1 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class GroundMarker: ContainerMarker {
|
||||
x = "1.5 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "24 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "1 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class SoldierMarker: ContainerMarker {
|
||||
x = "3 * (safeZoneH / 40) + (safezoneX + (safezoneW - safeZoneH)/2)";
|
||||
y = "24 * ((safeZoneH / 1.2) / 25) + (safezoneY + (safezoneH - (safeZoneH / 1.2))/2)";
|
||||
w = "1 * (safeZoneH / 40)";
|
||||
h = "1 * ((safeZoneH / 1.2) / 25)";
|
||||
};
|
||||
class ACE_Settings {
|
||||
class GVAR(inventoryDisplaySize) {
|
||||
value = 0;
|
||||
typeName = "SCALAR";
|
||||
isClientSetable = 1;
|
||||
displayName = "$STR_ACE_Inventory_SettingName";
|
||||
description = "$STR_ACE_Inventory_SettingDescription";
|
||||
values[] = {"Normal (Default Size)", "Medium", "Bigger"};
|
||||
};
|
||||
};
|
||||
|
||||
|
12
addons/inventory/stringtable.xml
Normal file
12
addons/inventory/stringtable.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2015-02-13 -->
|
||||
<Project name="ACE">
|
||||
<Package name="Inventory">
|
||||
<Key ID="STR_ACE_Inventory_SettingName">
|
||||
<English>Make Inventory Display Bigger</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Inventory_SettingDescription">
|
||||
<English>Normally inventory display is scaled by UI size. This allows scaling the Inventory UI size up, but doesn't increase font size allowing more rows displayed.</English>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -1,9 +1,3 @@
|
||||
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
}
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
|
@ -1,9 +1,3 @@
|
||||
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
}
|
||||
|
||||
class CfgVehicles {
|
||||
class NATO_Box_Base;
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
|
@ -3,7 +3,7 @@
|
||||
class CfgPatches {
|
||||
class ADDON {
|
||||
units[] = {};
|
||||
weapons[] = {"AGM_acc_pointer_red","AGM_acc_pointer_green"};
|
||||
weapons[] = {"ACE_acc_pointer_red","ACE_acc_pointer_green"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
author[] = {"commy2"};
|
||||
|
@ -1 +0,0 @@
|
||||
z\ace\addons\lockbackpacks
|
@ -1,31 +0,0 @@
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class ACE_LockBackpack {
|
||||
displayName = "$STR_ACE_LockBackpacks_LockBackpack";
|
||||
condition = QUOTE([backpackContainer _player] call FUNC(isBackpack) && {!((backpackContainer _player) getVariable [ARR_2('ACE_LockedInventory', false)])});
|
||||
statement = QUOTE((backpackContainer _player) setVariable [ARR_3('ACE_LockedInventory', true, true)];);
|
||||
showDisabled = 0;
|
||||
priority = 2.5;
|
||||
icon = ""; // @todo
|
||||
hotkey = "L";
|
||||
enableInside = 1;
|
||||
};
|
||||
|
||||
class ACE_UnlockBackpack {
|
||||
displayName = "$STR_ACE_LockBackpacks_UnlockBackpack";
|
||||
condition = QUOTE([backpackContainer _player] call FUNC(isBackpack) && {(backpackContainer _player) getVariable [ARR_2('ACE_LockedInventory', false)]});
|
||||
statement = QUOTE((backpackContainer _player) setVariable [ARR_3('ACE_LockedInventory', false, true)];);
|
||||
showDisabled = 0;
|
||||
priority = 2.5;
|
||||
icon = ""; // @todo
|
||||
hotkey = "L";
|
||||
enableInside = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
@ -1,47 +0,0 @@
|
||||
/*
|
||||
* Author: bux, commy2
|
||||
*
|
||||
* Handle the open inventory event. Don't open the inventory if it's locked and display message.
|
||||
*
|
||||
* Argument:
|
||||
* Input from "InventoryOpened" eventhandler
|
||||
*
|
||||
* Return value:
|
||||
* Don't open the inventory dialog? (Bool)
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_target", "_isBackpack", "_isLocked", "_return"];
|
||||
|
||||
_target = _this select 1;
|
||||
|
||||
_isBackpack = [_target] call FUNC(isBackpack);
|
||||
_isLocked = _target getVariable ["ACE_LockedInventory", false];
|
||||
|
||||
_return = false;
|
||||
if (_isBackpack) then {
|
||||
// target is a backpack
|
||||
private "_unit";
|
||||
_unit = [_target] call FUNC(getBackpackAssignedUnit);
|
||||
|
||||
if (!alive _unit || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {};
|
||||
|
||||
if (_isLocked) then {
|
||||
// target is a locked backpack
|
||||
[format [localize "STR_ACE_LockBackpacks_BackpackLocked", [_unit] call EFUNC(common,getName)]] call EFUNC(common,displayTextStructured);
|
||||
_return = true;
|
||||
} else {
|
||||
// target is a not-locked backpack
|
||||
if (_unit getVariable ["ACE_LockedInventory", false]) then {
|
||||
[localize "STR_ACE_LockBackpacks_InventoryLocked"] call EFUNC(common,displayTextStructured);
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
} else {
|
||||
// target is not a backpack
|
||||
if (_isLocked) then {
|
||||
[localize "STR_ACE_LockBackpacks_InventoryLocked"] call EFUNC(common,displayTextStructured);
|
||||
_return = true;
|
||||
};
|
||||
};
|
||||
_return
|
@ -1 +0,0 @@
|
||||
#include "\z\ace\addons\lockbackpacks\script_component.hpp"
|
@ -1,12 +0,0 @@
|
||||
#define COMPONENT lockbackpacks
|
||||
#include "\z\ace\addons\main\script_mod.hpp"
|
||||
|
||||
#ifdef DEBUG_ENABLED_LOCKBACKPACKS
|
||||
#define DEBUG_MODE_FULL
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG_ENABLED_LOCKBACKPACKS
|
||||
#define DEBUG_SETTINGS DEBUG_ENABLED_LOCKBACKPACKS
|
||||
#endif
|
||||
|
||||
#include "\z\ace\addons\main\script_macros.hpp"
|
@ -1,70 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Edited with tabler - 2014-12-21 -->
|
||||
<Project name="ACE">
|
||||
<Package name="LockBackpacks">
|
||||
<Key ID="STR_ACE_LockBackpacks_BackpackVentralTake">
|
||||
<English>Take (Ventral)</English>
|
||||
<German>Aufnehmen (Am Bauch)</German>
|
||||
<Spanish>Coger (Mochila delantera)</Spanish>
|
||||
<Polish>Załóż (brzuch)</Polish>
|
||||
<Czech>Vzít (ventrální)</Czech>
|
||||
<French>Prendre (Ventral)</French>
|
||||
<Russian>Взять рюкзак (передний)</Russian>
|
||||
<Hungarian>Felvétel (előre)</Hungarian>
|
||||
<Portuguese>Pegar (Mochila Ventral)</Portuguese>
|
||||
<Italian>Prendi</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_LockBackpacks_BackpackVentralPut">
|
||||
<English>Take Off Backpack</English>
|
||||
<German>Rucksack ablegen</German>
|
||||
<Spanish>Dejar mochila</Spanish>
|
||||
<Polish>Zdejmij (brzuch)</Polish>
|
||||
<Czech>Odložit batoh</Czech>
|
||||
<French>Enlever (Ventral)</French>
|
||||
<Russian>Снять рюкзак (передний)</Russian>
|
||||
<Hungarian>Táska levétele</Hungarian>
|
||||
<Portuguese>Retirar Mochila</Portuguese>
|
||||
<Italian>Togliere zaino</Italian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_LockBackpacks_LockBackpack">
|
||||
<English>Lock Backpack</English>
|
||||
<German>Rucksack verschließen</German>
|
||||
<French>Verrouiller le sac à dos</French>
|
||||
<Spanish>Bloquear mochila</Spanish>
|
||||
<Czech>Zamknout batoh</Czech>
|
||||
<Polish>Zablokuj plecak</Polish>
|
||||
<Hungarian>Táska zárolása</Hungarian>
|
||||
<Russian>Запереть рюкзак</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_LockBackpacks_UnlockBackpack">
|
||||
<English>Unlock Backpack</English>
|
||||
<German>Rucksack aufschließen</German>
|
||||
<French>Déverouiller le sac à dos</French>
|
||||
<Spanish>Desbloquear mochila</Spanish>
|
||||
<Czech>Odemknout batoh</Czech>
|
||||
<Polish>Odblokuj plecak</Polish>
|
||||
<Hungarian>Táska nyitása</Hungarian>
|
||||
<Russian>Отпереть рюкзак</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_LockBackpacks_BackpackLocked">
|
||||
<English>Backpack of %1 is locked</English>
|
||||
<German>Der Rucksack von %1 ist verschlossen</German>
|
||||
<French>Le sac à dos de %1 est verroullé</French>
|
||||
<Spanish>La mochila de %1 está bloqueada</Spanish>
|
||||
<Czech>%1 má zamčený batoh</Czech>
|
||||
<Polish>Plecak %1 jest zablokowany</Polish>
|
||||
<Hungarian>%1 táskája zárolva</Hungarian>
|
||||
<Russian>Рюкзак %1 заперт</Russian>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_LockBackpacks_InventoryLocked">
|
||||
<English>Inventory is locked</English>
|
||||
<German>Das Inventar ist verschlossen</German>
|
||||
<French>L'inventaire est verrouillé</French>
|
||||
<Spanish>Inventario bloqueado</Spanish>
|
||||
<Czech>Inventář je zamčený</Czech>
|
||||
<Polish>Ekwipunek jest zablokowany</Polish>
|
||||
<Hungarian>Felszerelés zárolt</Hungarian>
|
||||
<Russian>Инвентарь заперт</Russian>
|
||||
</Key>
|
||||
</Package>
|
||||
</Project>
|
@ -4,3 +4,8 @@ class Extended_PreInit_EventHandlers {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE( call COMPILE_FILE(XEH_clientInit) );
|
||||
};
|
||||
};
|
||||
|
@ -1,19 +0,0 @@
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
class ACE_Equipment {
|
||||
class GVAR(CutFence) {
|
||||
displayName = "$STR_ACE_logistics_wirecutter_CutFence";
|
||||
condition = QUOTE([_player] call FUNC(canCutFence));
|
||||
statement = QUOTE([_player] call FUNC(cutDownFence));
|
||||
exceptions[] = {};
|
||||
showDisabled = 1;
|
||||
priority = 0;
|
||||
icon = PATHTOF(UI\wirecutter_ca.paa);
|
||||
hotkey = "C";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
5
addons/logistics_wirecutter/XEH_clientInit.sqf
Normal file
5
addons/logistics_wirecutter/XEH_clientInit.sqf
Normal file
@ -0,0 +1,5 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
["interactMenuOpened", {_this call FUNC(interactEH)}] call EFUNC(common,addEventHandler);
|
@ -2,11 +2,11 @@
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(canCutFence);
|
||||
PREP(cutDownFence);
|
||||
PREP(cutDownFenceAbort);
|
||||
PREP(cutDownFenceCallback);
|
||||
PREP(getNearestFence);
|
||||
PREP(interactEH);
|
||||
PREP(isFence);
|
||||
|
||||
ADDON = true;
|
||||
|
@ -5,7 +5,7 @@ class CfgPatches {
|
||||
units[] = {};
|
||||
weapons[] = {};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common", "ace_interaction"};
|
||||
requiredAddons[] = {"ace_interact_menu"};
|
||||
author[] = {"gpgpgpgp", "PabstMirror"};
|
||||
authorUrl = "";
|
||||
VERSION_CONFIG;
|
||||
@ -13,6 +13,5 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgSounds.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
|
@ -1,18 +0,0 @@
|
||||
/* fnc_canCutFence.sqf
|
||||
*
|
||||
* Author: PabstMirror
|
||||
*
|
||||
* Condition check if player is able to cut a fence.
|
||||
* Checks for "ACE_wirecutter" item and if there is a nearby fence.
|
||||
*
|
||||
* Argument:
|
||||
* 0: OBJECT - Unit to check condition for (player)
|
||||
*
|
||||
* Return value:
|
||||
* BOOL
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
PARAMS_1(_unit);
|
||||
|
||||
("ACE_wirecutter" in (items _unit)) && {!(isNull ([_unit] call FUNC(getNearestFence)))}
|
@ -1,20 +1,31 @@
|
||||
// by gpgpgpgp, edited by commy2
|
||||
/*
|
||||
* Author: gpgpgpgp, edited by commy2, PabstMirror
|
||||
* Starts cutting down a fence
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Fence <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [player, berlinWall] call ace_logistics_wirecutter_fnc_cutDownFence
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_unit);
|
||||
private ["_timeToCut"];
|
||||
|
||||
PARAMS_2(_unit,_fenceObject);
|
||||
if (_unit != ACE_player) exitWith {};
|
||||
|
||||
_fenceObject = [ACE_player] call FUNC(getNearestFence);
|
||||
if (isNull _fenceObject) exitWith {};
|
||||
|
||||
_timeToCut = 5;
|
||||
if !([ACE_player] call EFUNC(common,isEngineer)) then {
|
||||
_timeToCut = _timeToCut + 5;
|
||||
};
|
||||
_timeToCut = if ([ACE_player] call EFUNC(common,isEngineer)) then {5} else {10};
|
||||
|
||||
[ACE_player, "AinvPknlMstpSnonWnonDr_medic5", 0] call EFUNC(common,doAnimation);
|
||||
|
||||
if (_timeToCut > 4.5) then {
|
||||
if (_timeToCut > 5) then {
|
||||
playSound "ACE_wirecutter_sound_long";
|
||||
} else {
|
||||
playSound "ACE_wirecutter_sound";
|
||||
|
@ -1,4 +1,18 @@
|
||||
// by commy2
|
||||
/*
|
||||
* Author: commy2
|
||||
* Stops cutting down fence (reset animation)
|
||||
*
|
||||
* Arguments:
|
||||
* Nothing
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [] call ace_logistics_wirecutter_fnc_cutDownFenceAbort
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
[ACE_player, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||
|
@ -1,7 +1,22 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Once progressbar is done: Fence is cutdown
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Fence Object <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [aFence] call ace_logistics_wirecutter_fnc_cutDownFenceCallback
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_fenceObject);
|
||||
|
||||
_fenceObject setdamage 1;
|
||||
[localize "STR_ACE_logistics_wirecutter_FenceCut"] call EFUNC(common,displayTextStructured);
|
||||
// [localize "STR_ACE_logistics_wirecutter_FenceCut"] call EFUNC(common,displayTextStructured);
|
||||
[ACE_player, "AmovPknlMstpSrasWrflDnon", 1] call EFUNC(common,doAnimation);
|
||||
|
@ -1,15 +1,18 @@
|
||||
/* fnc_getNearestFence.sqf
|
||||
*
|
||||
* Author: PabstMirror
|
||||
*
|
||||
* Gets nearest fence within 5 meters to the unit.
|
||||
*
|
||||
* Argument:
|
||||
* 0: OBJECT - Unit to search for fence objects arround
|
||||
*
|
||||
* Return value:
|
||||
* OBJECT - Nearest object that is a fence, objNull if none found.
|
||||
*/
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Gets nearest fence object (not actully used, left for utility)
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* The return value <OBJECT>
|
||||
*
|
||||
* Example:
|
||||
* [player] call ace_logistics_wirecutter_fnc_getNearestFence
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private "_nearestFence";
|
||||
@ -20,6 +23,6 @@ _nearestFence = objNull;
|
||||
if ((isNull _nearestFence) && {[_x] call FUNC(isFence)}) then {
|
||||
_nearestFence = _x;
|
||||
};
|
||||
} forEach nearestObjects [_unit, [], 5];
|
||||
} forEach nearestObjects [_unit, [], 15];
|
||||
|
||||
_nearestFence
|
||||
|
64
addons/logistics_wirecutter/functions/fnc_interactEH.sqf
Normal file
64
addons/logistics_wirecutter/functions/fnc_interactEH.sqf
Normal file
@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* When interact_menu starts rendering (from "interact_keyDown" event)
|
||||
*
|
||||
* Arguments:
|
||||
* Interact Menu Type (0 - world, 1 - self) <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [0] call ace_logistics_wirecutter_fnc_interactEH
|
||||
*
|
||||
* Public: Yes
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_1(_interactionType);
|
||||
|
||||
if (_interactionType != 0) exitWith {};
|
||||
|
||||
//for performance only do stuff it they have a wirecutter item
|
||||
//(if they somehow get one durring keydown they'll just have to reopen)
|
||||
if (!("ACE_wirecutter" in (items ace_player))) exitWith {};
|
||||
|
||||
[{
|
||||
private ["_fncStatement", "_attachedFence", "_fncCondition", "_helper"];
|
||||
PARAMS_2(_args,_pfID);
|
||||
EXPLODE_3_PVT(_args,_setPosition,_addedHelpers,_fencesHelped);
|
||||
|
||||
if (!EGVAR(interact_menu,keyDown)) then {
|
||||
{deleteVehicle _x;} forEach _addedHelpers;
|
||||
[_pfID] call CBA_fnc_removePerFrameHandler;
|
||||
} else {
|
||||
//If play moved >5 meters from last pos, then rescan
|
||||
if (((getPosASL ace_player) distance _setPosition) > 5) then {
|
||||
|
||||
_fncStatement = {
|
||||
_attachedFence = _target getVariable [QGVAR(attachedFence), objNull];
|
||||
[ace_player, _attachedFence] call FUNC(cutDownFence);
|
||||
};
|
||||
_fncCondition = {
|
||||
_attachedFence = _target getVariable [QGVAR(attachedFence), objNull];
|
||||
((!isNull _attachedFence) && {(damage _attachedFence) < 1} && {("ACE_wirecutter" in (items ace_player))})
|
||||
};
|
||||
|
||||
{
|
||||
if (!(_x in _fencesHelped)) then {
|
||||
if ([_x] call FUNC(isFence)) then {
|
||||
_fencesHelped pushBack _x;
|
||||
_helper = "Sign_Sphere25cm_F" createVehicleLocal (getpos _x);
|
||||
[_helper, 0, [""], (localize "STR_ACE_logistics_wirecutter_CutFence"), QUOTE(PATHTOF(ui\wirecutter_ca.paa)), [0,0,0], _fncStatement, _fncCondition, 5] call EFUNC(interact_menu,addAction);
|
||||
_helper setPosASL ((getPosASL _x) vectorAdd [0,0,1.25]);
|
||||
_helper hideObject true;
|
||||
_helper setVariable [QGVAR(attachedFence), _x];
|
||||
_addedHelpers pushBack _helper;
|
||||
};
|
||||
};
|
||||
} forEach nearestObjects [ace_player, [], 15];
|
||||
|
||||
_args set [0, (getPosASL ace_player)];
|
||||
};
|
||||
};
|
||||
}, 0.1, [((getPosASL ace_player) vectorAdd [-100,0,0]), [], []]] call CBA_fnc_addPerFrameHandler;
|
@ -1,16 +1,19 @@
|
||||
/* fnc_isFence.sqf
|
||||
*
|
||||
* Author: PabstMirror
|
||||
*
|
||||
* Checks if object is a fence. Should work on any fence type, even (typeof == "").
|
||||
* Call is fairly expensive because of all of the string checking.
|
||||
*
|
||||
* Argument:
|
||||
* 0: OBJECT - Ojbect to test
|
||||
*
|
||||
* Return value:
|
||||
* BOOL
|
||||
*/
|
||||
/*
|
||||
* Author: PabstMirror
|
||||
* Checks if object is a fence. Should work on any fence type, even (typeof == "").
|
||||
* Call is fairly expensive because of all of the string checking.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: An Object To Test <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Is it a fence <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [aFence] call ace_logistics_wirecutter_fnc_isFence
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
//find is case sensitive, so keep everything lowercase
|
||||
@ -27,14 +30,14 @@ _typeOf = toLower (typeOf _object);
|
||||
_returnValue = false;
|
||||
|
||||
if (_typeOf != "") then {
|
||||
_returnValue = _typeOf in (FENCE_A3_TYPENAMES + FENCE_AIA_TYPENAMES);
|
||||
_returnValue = _typeOf in (FENCE_A3_TYPENAMES + FENCE_AIA_TYPENAMES);
|
||||
} else {
|
||||
_typeOf = toLower (str _object); //something like "123201: wall_indfnc_9.p3d"
|
||||
{
|
||||
if ((_typeOf find _x) != -1) then {
|
||||
_returnValue = true;
|
||||
};
|
||||
} forEach (FENCE_A3_P3DS + FENCE_AIA_P3DS);
|
||||
_typeOf = toLower (str _object); //something like "123201: wall_indfnc_9.p3d"
|
||||
{
|
||||
if ((_typeOf find _x) != -1) then {
|
||||
_returnValue = true;
|
||||
};
|
||||
} forEach (FENCE_A3_P3DS + FENCE_AIA_P3DS);
|
||||
};
|
||||
|
||||
_returnValue
|
||||
|
13
addons/magazines/CfgEventHandlers.hpp
Normal file
13
addons/magazines/CfgEventHandlers.hpp
Normal file
@ -0,0 +1,13 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_FiredBIS_EventHandlers {
|
||||
class AllVehicles {
|
||||
class ADDON {
|
||||
firedBIS = QUOTE(_this call FUNC(forceMagazineMuzzleVelocity));
|
||||
};
|
||||
};
|
||||
};
|
@ -22,6 +22,7 @@ class CfgMagazines {
|
||||
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_mag_SDDescription";
|
||||
picture = "\A3\weapons_f\data\ui\m_30stanag_caseless_green_CA.paa";
|
||||
initSpeed = 320;
|
||||
GVAR(forceMagazineMuzzleVelocity) = 1;
|
||||
};
|
||||
|
||||
class ACE_30Rnd_65x39_caseless_mag_AP: 30Rnd_65x39_caseless_mag {
|
||||
@ -57,6 +58,7 @@ class CfgMagazines {
|
||||
displayNameShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDNameShort";
|
||||
descriptionShort = "$STR_ACE_30Rnd_65x39_caseless_green_mag_SDDescription";
|
||||
initSpeed = 320;
|
||||
GVAR(forceMagazineMuzzleVelocity) = 1;
|
||||
};
|
||||
|
||||
class ACE_30Rnd_65x39_caseless_green_mag_AP: 30Rnd_65x39_caseless_green {
|
||||
@ -88,6 +90,7 @@ class CfgMagazines {
|
||||
displayNameShort = "$STR_ACE_30Rnd_556x45_mag_SDNameShort";
|
||||
descriptionShort = "$STR_ACE_30Rnd_556x45_mag_SDDescription";
|
||||
initSpeed = 320;
|
||||
GVAR(forceMagazineMuzzleVelocity) = 1;
|
||||
picture = "\A3\weapons_f\data\ui\m_30stanag_green_ca.paa";
|
||||
};
|
||||
|
||||
@ -127,6 +130,7 @@ class CfgMagazines {
|
||||
displayNameShort = "$STR_ACE_20Rnd_762x51_mag_SDNameShort";
|
||||
descriptionShort = "$STR_ACE_20Rnd_762x51_mag_SDDescription";
|
||||
initSpeed = 320;
|
||||
GVAR(forceMagazineMuzzleVelocity) = 1;
|
||||
};
|
||||
|
||||
class ACE_20Rnd_762x51_Mag_AP: 20Rnd_762x51_Mag {
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
class SlotInfo;
|
||||
class MuzzleSlot;
|
||||
|
||||
class CfgWeapons {
|
||||
|
||||
@ -20,7 +20,7 @@ class CfgWeapons {
|
||||
};
|
||||
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_H"};
|
||||
};
|
||||
};
|
||||
@ -59,7 +59,7 @@ class CfgWeapons {
|
||||
};
|
||||
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_H"};
|
||||
};
|
||||
};
|
||||
@ -74,7 +74,7 @@ class CfgWeapons {
|
||||
|
||||
class EBR_base_F: Rifle_Long_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_B"};
|
||||
};
|
||||
};
|
||||
@ -82,7 +82,7 @@ class CfgWeapons {
|
||||
|
||||
class DMR_01_base_F: Rifle_Long_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_B"};
|
||||
};
|
||||
};
|
||||
@ -90,7 +90,7 @@ class CfgWeapons {
|
||||
|
||||
class LMG_Mk200_F: Rifle_Long_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_H"};
|
||||
};
|
||||
};
|
||||
@ -98,7 +98,7 @@ class CfgWeapons {
|
||||
|
||||
class LMG_Zafir_F: Rifle_Long_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_B"};
|
||||
};
|
||||
};
|
||||
@ -115,7 +115,7 @@ class CfgWeapons {
|
||||
};
|
||||
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_L"};
|
||||
};
|
||||
};
|
||||
@ -129,7 +129,7 @@ class CfgWeapons {
|
||||
};
|
||||
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_L"};
|
||||
};
|
||||
};
|
||||
@ -148,7 +148,7 @@ class CfgWeapons {
|
||||
|
||||
class pdw2000_base_F: Rifle_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
|
||||
};
|
||||
};
|
||||
@ -156,7 +156,7 @@ class CfgWeapons {
|
||||
|
||||
class SMG_01_Base: Rifle_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
|
||||
};
|
||||
};
|
||||
@ -164,7 +164,7 @@ class CfgWeapons {
|
||||
|
||||
class SMG_02_base_F: Rifle_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
|
||||
};
|
||||
};
|
||||
@ -180,7 +180,7 @@ class CfgWeapons {
|
||||
|
||||
class hgun_P07_F: Pistol_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
|
||||
};
|
||||
@ -189,7 +189,7 @@ class CfgWeapons {
|
||||
|
||||
class hgun_Rook40_F: Pistol_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
linkProxy = "\A3\data_f\proxies\weapon_slots\MUZZLE";
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_smg_02"};
|
||||
};
|
||||
@ -198,7 +198,7 @@ class CfgWeapons {
|
||||
|
||||
class hgun_ACPC2_F: Pistol_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
|
||||
};
|
||||
};
|
||||
@ -206,7 +206,7 @@ class CfgWeapons {
|
||||
|
||||
class hgun_Pistol_heavy_01_F: Pistol_Base_F {
|
||||
class WeaponSlotsInfo: WeaponSlotsInfo {
|
||||
class MuzzleSlot: SlotInfo {
|
||||
class MuzzleSlot: MuzzleSlot {
|
||||
compatibleItems[] += {"ACE_muzzle_mzls_smg_01"};
|
||||
};
|
||||
};
|
||||
|
7
addons/magazines/XEH_preInit.sqf
Normal file
7
addons/magazines/XEH_preInit.sqf
Normal file
@ -0,0 +1,7 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
ADDON = false;
|
||||
|
||||
PREP(forceMagazineMuzzleVelocity);
|
||||
|
||||
ADDON = true;
|
@ -12,6 +12,8 @@ class CfgPatches {
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
||||
#include "CfgAmmo.hpp"
|
||||
#include "CfgMagazines.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
|
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
*
|
||||
* DESCRIPTION.
|
||||
*
|
||||
* Arguments:
|
||||
* firedBIS
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_weapon", "_magazine", "_projectile"];
|
||||
|
||||
_weapon = _this select 1;
|
||||
_magazine = _this select 5;
|
||||
_projectile = _this select 6;
|
||||
|
||||
if (getNumber (configFile >> "CfgMagazines" >> _magazine >> QGVAR(forceMagazineMuzzleVelocity)) != 1) exitWith {
|
||||
//hint str (speed _projectile / 3.6);
|
||||
};
|
||||
|
||||
private ["_initSpeedWeapon", "_initSpeedMagazine"];
|
||||
|
||||
_initSpeedWeapon = getNumber (configFile >> "CfgWeapons" >> _weapon >> "initSpeed");
|
||||
_initSpeedMagazine = getNumber (configFile >> "CfgMagazines" >> _magazine >> "initSpeed");
|
||||
|
||||
//systemChat format ["W: %1m/s, M: %2m/s", _initSpeedWeapon, _initSpeedMagazine];
|
||||
|
||||
// force magazine initSpeed
|
||||
|
||||
private ["_credit", "_debit"];
|
||||
|
||||
_credit = vectorMagnitude velocity _projectile;
|
||||
_debit = _credit + (_initSpeedMagazine - _initSpeedWeapon);
|
||||
|
||||
_projectile setVelocity ((velocity _projectile) vectorMultiply (_debit / _credit));
|
||||
|
||||
//hint str (speed _projectile / 3.6);
|
1
addons/magazines/functions/script_component.hpp
Normal file
1
addons/magazines/functions/script_component.hpp
Normal file
@ -0,0 +1 @@
|
||||
#include "\z\ace\addons\magazines\script_component.hpp"
|
File diff suppressed because it is too large
Load Diff
46
addons/main/script_debug.hpp
Normal file
46
addons/main/script_debug.hpp
Normal file
@ -0,0 +1,46 @@
|
||||
/**
|
||||
STACK TRACING
|
||||
**/
|
||||
//#define ENABLE_CALLSTACK
|
||||
|
||||
#ifdef ENABLE_CALLSTACK
|
||||
|
||||
#define CALLSTACK(function) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'ANON', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'ANON'; _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#define CALLSTACK_NAMED(function, functionName) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, functionName, _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = functionName; _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#define DUMPSTACK ([__FILE__, __LINE__] call ACE_DUMPSTACK_FNC)
|
||||
|
||||
#define FUNC(var1) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(ADDON,fnc,var1)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(ADDON,fnc,var1)'; _ret = _this call TRIPLES(ADDON,fnc,var1); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#define EFUNC(var1,var2) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)'; _ret = _this call TRIPLES(DOUBLES(PREFIX,var1),fnc,var2); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
|
||||
#else
|
||||
#define CALLSTACK(function) function
|
||||
#define CALLSTACK_NAMED(function, functionName) function
|
||||
#define DUMPSTACK
|
||||
|
||||
#define FUNC(var1) TRIPLES(ADDON,fnc,var1)
|
||||
#define EFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
PERFORMANCE COUNTERS SECTION
|
||||
**/
|
||||
//#define ENABLE_PERFORMANCE_COUNTERS
|
||||
|
||||
#ifdef ENABLE_PERFORMANCE_COUNTERS
|
||||
#define ADDPFH(function, timing, args) call { _ret = [function, timing, args, #function] call EFUNC(sys_sync,perFrame_add); if(isNil "ACE_PFH" ) then { ACE_PFH=[]; }; ACE_PFH pushBack [[_ret, __FILE__, __LINE__], [function, timing, args]]; _ret }
|
||||
|
||||
#define CREATE_COUNTER(x) if(isNil "ACE_COUNTERS" ) then { ACE_COUNTERS=[]; }; GVAR(DOUBLES(x,counter))=[]; GVAR(DOUBLES(x,counter)) set[0, QUOTE(GVAR(DOUBLES(x,counter)))]; GVAR(DOUBLES(x,counter)) set[1, diag_tickTime]; ACE_COUNTERS pushBack GVAR(DOUBLES(x,counter));
|
||||
#define BEGIN_COUNTER(x) if(isNil QUOTE(GVAR(DOUBLES(x,counter)))) then { CREATE_COUNTER(x) }; GVAR(DOUBLES(x,counter)) set[2, diag_tickTime];
|
||||
#define END_COUNTER(x) GVAR(DOUBLES(x,counter)) pushBack [(GVAR(DOUBLES(x,counter)) select 2), diag_tickTime];
|
||||
|
||||
#define DUMP_COUNTERS ([__FILE__, __LINE__] call ACE_DUMPCOUNTERS_FNC)
|
||||
#else
|
||||
#define ADDPFH(function, timing, args) [function, timing, args, #function] call EFUNC(sys_sync,perFrame_add)
|
||||
|
||||
#define CREATE_COUNTER(x) /* disabled */
|
||||
#define BEGIN_COUNTER(x) /* disabled */
|
||||
#define END_COUNTER(x) /* disabled */
|
||||
#define DUMP_COUNTERS /* disabled */
|
||||
#endif
|
@ -223,26 +223,6 @@
|
||||
|
||||
#define PREP_MODULE(folder) [] call compile preprocessFileLineNumbers QUOTE(PATHTOF(folder\__PREP__.sqf))
|
||||
|
||||
|
||||
#ifdef ENABLE_CALLSTACK
|
||||
#define CALLSTACK(function) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'ANON', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'ANON'; _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#define CALLSTACK_NAMED(function, functionName) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, functionName, _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = functionName; _ret = _this call ##function; ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#define DUMPSTACK ([__FILE__, __LINE__] call ACE_DUMPSTACK_FNC)
|
||||
|
||||
#define FUNC(var1) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(ADDON,fnc,var1)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(ADDON,fnc,var1)'; _ret = _this call TRIPLES(ADDON,fnc,var1); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
#define EFUNC(var1,var2) {private ['_ret']; if(ACE_IS_ERRORED) then { ['AUTO','AUTO'] call ACE_DUMPSTACK_FNC; ACE_IS_ERRORED = false; }; ACE_IS_ERRORED = true; ACE_STACK_TRACE set [ACE_STACK_DEPTH, [diag_tickTime, __FILE__, __LINE__, ACE_CURRENT_FUNCTION, 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)', _this]]; ACE_STACK_DEPTH = ACE_STACK_DEPTH + 1; ACE_CURRENT_FUNCTION = 'TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)'; _ret = _this call TRIPLES(DOUBLES(PREFIX,var1),fnc,var2); ACE_STACK_DEPTH = ACE_STACK_DEPTH - 1; ACE_IS_ERRORED = false; _ret;}
|
||||
|
||||
#else
|
||||
#define CALLSTACK(function) function
|
||||
#define CALLSTACK_NAMED(function, functionName) function
|
||||
#define DUMPSTACK
|
||||
|
||||
#define FUNC(var1) TRIPLES(ADDON,fnc,var1)
|
||||
#define EFUNC(var1,var2) TRIPLES(DOUBLES(PREFIX,var1),fnc,var2)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define HASH_CREATE ([] call EFUNC(common,hashCreate))
|
||||
#define HASH_SET(hash, key, val) ([hash, key, val, __FILE__, __LINE__] call EFUNC(common,hashSet))
|
||||
#define HASH_GET(hash, key) ([hash, key, __FILE__, __LINE__] call EFUNC(common,hashGet))
|
||||
@ -254,3 +234,5 @@
|
||||
#define HASHLIST_SELECT(hashList, index) ([hashList, index, __FILE__, __LINE__] call EFUNC(common,hashListSelect))
|
||||
#define HASHLIST_SET(hashList, index, value) ([hashList, index, value, __FILE__, __LINE__] call EFUNC(common,hashListSet))
|
||||
#define HASHLIST_PUSH(hashList, value) ([hashList, value, __FILE__, __LINE__] call EFUNC(common,hashListPush))
|
||||
|
||||
#include "script_debug.hpp"
|
@ -1,12 +1,11 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call COMPILE_FILE(XEH_preInit) );
|
||||
serverInit = QUOTE( call COMPILE_FILE(XEH_preInitServer) );
|
||||
};
|
||||
class ADDON {
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit) );
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_PostInit_EventHandlers {
|
||||
class ADDON {
|
||||
clientInit = QUOTE( call COMPILE_FILE(XEH_postInitClient) );
|
||||
};
|
||||
class ADDON {
|
||||
clientInit = QUOTE(call COMPILE_FILE(XEH_postInitClient) );
|
||||
};
|
||||
};
|
||||
|
@ -1,67 +1,42 @@
|
||||
// MARKERS
|
||||
class CfgMarkers {
|
||||
class Flag;
|
||||
class Flag;
|
||||
|
||||
// Reenable NATO symbols ...
|
||||
class b_unknown: Flag {scope = 2;};
|
||||
// Reenable NATO symbols ...
|
||||
class b_unknown: Flag {scope = 2;};
|
||||
|
||||
// ... and disable all the useless ones
|
||||
// If you think that some of these are needed, create an issue; But until
|
||||
// there's a better way to place markers, there should be only the most
|
||||
// important markers here.
|
||||
// Keep in mind that all of these can still be placed in the editor.
|
||||
class b_hq: b_unknown {scope = 1;};
|
||||
class b_installation: b_unknown {scope = 1;};
|
||||
class b_maint: b_unknown {scope = 1;};
|
||||
class b_med: b_unknown {scope = 1;};
|
||||
class b_service: b_unknown {scope = 1;};
|
||||
class b_support: b_unknown {scope = 1;};
|
||||
// ... and disable all the useless ones
|
||||
// If you think that some of these are needed, create an issue; But until
|
||||
// there's a better way to place markers, there should be only the most
|
||||
// important markers here.
|
||||
// Keep in mind that all of these can still be placed in the editor.
|
||||
class b_hq: b_unknown {scope = 1;};
|
||||
class b_installation: b_unknown {scope = 1;};
|
||||
class b_maint: b_unknown {scope = 1;};
|
||||
class b_med: b_unknown {scope = 1;};
|
||||
class b_service: b_unknown {scope = 1;};
|
||||
class b_support: b_unknown {scope = 1;};
|
||||
|
||||
class n_unknown: b_unknown {};
|
||||
class n_hq: n_unknown {scope = 1;};
|
||||
class n_installation: n_unknown {scope = 1;};
|
||||
class u_installation: n_unknown {scope = 1;}; // i have no idea...
|
||||
class n_maint: n_unknown {scope = 1;};
|
||||
class n_med: n_unknown {scope = 1;};
|
||||
class n_service: n_unknown {scope = 1;};
|
||||
class n_support: n_unknown {scope = 1;};
|
||||
class n_unknown: b_unknown {};
|
||||
class n_hq: n_unknown {scope = 1;};
|
||||
class n_installation: n_unknown {scope = 1;};
|
||||
class u_installation: n_unknown {scope = 1;}; // i have no idea...
|
||||
class n_maint: n_unknown {scope = 1;};
|
||||
class n_med: n_unknown {scope = 1;};
|
||||
class n_service: n_unknown {scope = 1;};
|
||||
class n_support: n_unknown {scope = 1;};
|
||||
|
||||
class o_unknown: b_unknown {};
|
||||
class o_hq: o_unknown {scope = 1;};
|
||||
class o_installation: o_unknown {scope = 1;};
|
||||
class o_maint: o_unknown {scope = 1;};
|
||||
class o_med: o_unknown {scope = 1;};
|
||||
class o_service: o_unknown {scope = 1;};
|
||||
class o_support: o_unknown {scope = 1;};
|
||||
class o_unknown: b_unknown {};
|
||||
class o_hq: o_unknown {scope = 1;};
|
||||
class o_installation: o_unknown {scope = 1;};
|
||||
class o_maint: o_unknown {scope = 1;};
|
||||
class o_med: o_unknown {scope = 1;};
|
||||
class o_service: o_unknown {scope = 1;};
|
||||
class o_support: o_unknown {scope = 1;};
|
||||
|
||||
// disable all civy markers (harbor etc.)
|
||||
class c_unknown: b_unknown {scope = 1;};
|
||||
// disable all civy markers (harbor etc.)
|
||||
class c_unknown: b_unknown {scope = 1;};
|
||||
|
||||
// disable quantity indicators (fire team/squad/platoon ...)
|
||||
class group_0: b_unknown {scope = 1;};
|
||||
|
||||
|
||||
class ACE_MapToolFixed {
|
||||
name = "MapToolFixed";
|
||||
icon = PATHTOF(data\mapToolFixed.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingNormal {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingNormal.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
|
||||
class ACE_MapToolRotatingSmall {
|
||||
name = "MapToolRotating";
|
||||
icon = PATHTOF(data\mapToolRotatingSmall.paa);
|
||||
scope = 0;
|
||||
color[] = {1,1,1,1};
|
||||
size = 32;
|
||||
};
|
||||
// disable quantity indicators (fire team/squad/platoon ...)
|
||||
class group_0: b_unknown {scope = 1;};
|
||||
};
|
||||
|
@ -1,160 +1,28 @@
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
class ACE_SelfActions {
|
||||
|
||||
class ACE_MapTools {
|
||||
displayName = "$STR_ACE_Map_MapTools_Menu";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) || {call FUNC(canUseMapGPS)}));
|
||||
statement = "";
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 100;
|
||||
enableInside = 1;
|
||||
|
||||
class ACE_MapToolsHide {
|
||||
displayName = "$STR_ACE_Map_MapToolsHide";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 5;
|
||||
enableInside = 1;
|
||||
class Module_F;
|
||||
class ACE_ModuleBlueForceTracking: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Blue Force Tracking";
|
||||
function = QFUNC(blueForceTrackingModule);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = PATHTOF(UI\IconBFTracking_ca.paa);
|
||||
class Arguments {
|
||||
class Interval {
|
||||
displayName = "Interval";
|
||||
description = "How often the markers should be refreshed (in seconds)";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class HideAiGroups {
|
||||
displayName = "Hide AI groups?";
|
||||
description = "Hide markers for 'AI only' groups?";
|
||||
typeName = "BOOL";
|
||||
class values {
|
||||
class Yes { name = "Yes"; value = 1; };
|
||||
class No { name = "No"; value = 0; default = 1; };
|
||||
};
|
||||
};
|
||||
};
|
||||
class ACE_MapToolsShowNormal {
|
||||
displayName = "$STR_ACE_Map_MapToolsShowNormal";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 1}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 1; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 4;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsShowSmall {
|
||||
displayName = "$STR_ACE_Map_MapToolsShowSmall";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 2}));
|
||||
statement = QUOTE(GVAR(mapTool_Shown) = 2; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 3;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignNorth {
|
||||
displayName = "$STR_ACE_Map_MapToolsAlignNorth";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0}));
|
||||
statement = QUOTE(GVAR(mapTool_angle) = 0; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapToolsAlignCompass {
|
||||
displayName = "$STR_ACE_Map_MapToolsAlignCompass";
|
||||
condition = QUOTE((call FUNC(canUseMapTools) && {GVAR(mapTool_Shown) != 0} && {('ItemCompass' in assigneditems ACE_player) || {'ItemCompass' in assigneditems ACE_player}}));
|
||||
statement = QUOTE(GVAR(mapTool_angle) = getDir ACE_player; [] call FUNC(updateMapToolMarkers));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 1;
|
||||
priority = 1;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsShow {
|
||||
displayName = "$STR_ACE_Map_MapGpsShow";
|
||||
condition = QUOTE((call FUNC(canUseMapGPS) && {!GVAR(mapGpsShow)}));
|
||||
statement = QUOTE(GVAR(mapGpsShow) = true; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
class ACE_MapGpsHide {
|
||||
displayName = "$STR_ACE_Map_MapGpsHide";
|
||||
condition = QUOTE((call FUNC(canUseMapGPS) && {GVAR(mapGpsShow)}));
|
||||
statement = QUOTE(GVAR(mapGpsShow) = false; [GVAR(mapGpsShow)] call FUNC(openMapGps));
|
||||
exceptions[] = {"ACE_Drag_isNotDragging", QEGVAR(common,notOnMap)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
enableInside = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Actions {
|
||||
class ACE_MainActions {
|
||||
class ACE_CopyMap {
|
||||
displayName = "$STR_ACE_Map_CopyMap";
|
||||
condition = QUOTE(([_target] call EFUNC(common,isPlayer) && {'ItemMap' in assigneditems _player} && {'ACE_MapTools' in items _player} && {'ItemMap' in assignedItems _target}));
|
||||
statement = QUOTE([ARR_2(_player,_target)] call FUNC(copyMapStart));
|
||||
showDisabled = 0;
|
||||
priority = -1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
class IND_Box_Base;
|
||||
class FIA_Box_Base_F;
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
};
|
||||
};
|
||||
|
||||
class Module_F;
|
||||
class ACE_ModuleBlueForceTracking: Module_F {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
category = "ACE";
|
||||
displayName = "Blue Force Tracking";
|
||||
function = QFUNC(blueForceTrackingModule);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = PATHTOF(UI\IconBFTracking_ca.paa);
|
||||
class Arguments {
|
||||
class Interval {
|
||||
displayName = "Interval";
|
||||
description = "How often the markers should be refreshed (in seconds)";
|
||||
defaultValue = 1;
|
||||
};
|
||||
class HideAiGroups {
|
||||
displayName = "Hide AI groups?";
|
||||
description = "Hide markers for 'AI only' groups?";
|
||||
typeName = "BOOL";
|
||||
class values {
|
||||
class Yes { name = "Yes"; value = 1; };
|
||||
class No { name = "No"; value = 0; default = 1; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,15 +0,0 @@
|
||||
class CfgWeapons {
|
||||
class ACE_ItemCore;
|
||||
class InventoryItem_Base_F;
|
||||
|
||||
class ACE_MapTools: ACE_ItemCore {
|
||||
displayName = "$STR_ACE_MapTools_Name";
|
||||
descriptionShort = "$STR_ACE_MapTools_Description";
|
||||
model = "\A3\weapons_F\ammo\mag_univ.p3d";
|
||||
picture = PATHTOF(UI\maptool_item.paa);
|
||||
scope = 2;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
mass = 1;
|
||||
};
|
||||
};
|
||||
};
|
@ -1,93 +1,9 @@
|
||||
class controls {
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
class CA_PlayerName: RscText {
|
||||
x = "2 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfilePicture: RscPicture {
|
||||
x = "13.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ProfileBackground: RscText {
|
||||
x = "13.3 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class Separator1: RscPicture {
|
||||
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
};
|
||||
class ColorBlack: RscButton {
|
||||
idc = 36732;
|
||||
x = "0 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {0,0,0,1};
|
||||
colorFocused[] = {0,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlack""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorBlack")]);
|
||||
};
|
||||
class ColorRed: RscButton {
|
||||
idc = 36733;
|
||||
x = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.2,0.2,1};
|
||||
colorBackgroundActive[] = {1,0,0,1};
|
||||
colorFocused[] = {1,0,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorRed""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),QUOTE(ColorRed))]);
|
||||
};
|
||||
class ColorGreen: RscButton {
|
||||
idc = 36734;
|
||||
x = "0.6 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {0,1,0,1};
|
||||
colorFocused[] = {0,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorGreen""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor),"ColorGreen")]);
|
||||
};
|
||||
class ColorBlue: RscButton {
|
||||
idc = 36735;
|
||||
x = "0.9 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.2,0.2,0.8,1};
|
||||
colorBackgroundActive[] = {0,0,1,1};
|
||||
colorFocused[] = {0,0,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorBlue""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorBlue")]);
|
||||
};
|
||||
class ColorYellow: RscButton {
|
||||
idc = 36736;
|
||||
x = "1.2 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.2,1};
|
||||
colorBackgroundActive[] = {1,1,0,1};
|
||||
colorFocused[] = {1,1,0,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorYellow""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorYellow")]);
|
||||
};
|
||||
class ColorWhite: RscButton {
|
||||
idc = 36737;
|
||||
x = "1.5 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
y = "0.25 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
w = "0.3 * (((safezoneW / safezoneH) min 1.2) / 40)";
|
||||
h = "1.00 * ((((safezoneW / safezoneH) min 1.2) / 1.2) / 25)";
|
||||
colorBackground[] = {0.8,0.8,0.8,1};
|
||||
colorBackgroundActive[] = {1,1,1,1};
|
||||
colorFocused[] = {1,1,1,1};
|
||||
onButtonClick = "missionNamespace setVariable [""ACE_Map_drawing_drawColor"", ""ColorWhite""]";
|
||||
// onButtonClick = QUOTE(missionNamespace setVariable [ARR_2(QGVAR(drawing_drawColor), "ColorWhite")]);
|
||||
};
|
||||
class ButtonPlayer: RscActiveText {
|
||||
text = "";
|
||||
w = 0;
|
||||
h = 0;
|
||||
sizeEx = 0;
|
||||
onButtonClick = "";
|
||||
};
|
||||
};
|
||||
|
@ -1,81 +0,0 @@
|
||||
#define GUI_GRID_X (0)
|
||||
#define GUI_GRID_Y (0)
|
||||
#define GUI_GRID_W (0.025)
|
||||
#define GUI_GRID_H (0.04)
|
||||
|
||||
#define ST_LEFT 0x00
|
||||
#define ST_RIGHT 0x01
|
||||
#define ST_CENTER 0x02
|
||||
|
||||
#define W_gps 0.4025
|
||||
#define H_gps 0.25
|
||||
#define X_gps safeZoneX + safeZoneW - 1.1 * W_gps
|
||||
#define Y_gps safeZoneY + safeZoneH - 1.2 * H_gps
|
||||
|
||||
class RscTitles {
|
||||
class RscACE_MapGps {
|
||||
idd = 9855;
|
||||
movingEnable = 1;
|
||||
duration = 3600;
|
||||
fadein = 0;
|
||||
fadeout = 0;
|
||||
// onLoad = QUOTE(uiNamespace setVariable [ARR_2(QGVAR(ui_mapGpsDisplay), _this select 0)];);
|
||||
onLoad = "uiNamespace setVariable ['ACE_map_ui_mapGpsDisplay', _this select 0];"; //@todo cbaify this
|
||||
//onUnLoad = "_this call onRscLoad";
|
||||
class controls {
|
||||
class back:RscPicture {
|
||||
x = X_gps;
|
||||
y = Y_gps;
|
||||
w = W_gps;
|
||||
h = H_gps;
|
||||
text = PATHTOF(UI\mapGps.paa);
|
||||
colorBackground[] = {1, 1, 1, 1};
|
||||
};
|
||||
class heading: RscText{
|
||||
idc = 913590;
|
||||
x = X_gps + W_gps * 0.25;
|
||||
y = Y_gps + H_gps * 0.12;
|
||||
w = W_gps * 0.2;
|
||||
h = H_gps * 0.16;
|
||||
style = ST_LEFT;
|
||||
text = "225";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.042;
|
||||
};
|
||||
class altitude: RscText{
|
||||
idc = 913591;
|
||||
x = X_gps + W_gps * 0.55;
|
||||
y = Y_gps + H_gps * 0.12;
|
||||
w = W_gps * 0.2;
|
||||
h = H_gps * 0.16;
|
||||
style = ST_RIGHT;
|
||||
text = "55 m";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.042;
|
||||
};
|
||||
class coordinates: RscText{
|
||||
idc = 913592;
|
||||
x = X_gps + W_gps * 0.2;
|
||||
y = Y_gps + H_gps * 0.33;
|
||||
w = W_gps * 0.6;
|
||||
h = H_gps * 0.35;
|
||||
style = ST_CENTER;
|
||||
text = "012.3 115.1";
|
||||
colorBackground[] = {0,0,0,0};
|
||||
colorText[] = {0.247,0.251,0.157,1};
|
||||
shadowColo[] = {0,0,0,0};
|
||||
font = "EtelkaNarrowMediumPro";
|
||||
shadow = 0;
|
||||
sizeEx = 0.1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user