mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge branch 'master' into captivesMedicalInegration
This commit is contained in:
commit
55fcc60453
12
README.md
12
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** and **CSE** 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).
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
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
|
||||
];
|
@ -1,47 +1,30 @@
|
||||
/*
|
||||
* Author: bux, commy2
|
||||
* Author: commy2
|
||||
*
|
||||
* Handle the open inventory event. Don't open the inventory if it's locked and display message.
|
||||
* Handle the open inventory event. Display message on traget client.
|
||||
*
|
||||
* Argument:
|
||||
* Input from "InventoryOpened" eventhandler
|
||||
*
|
||||
* Return value:
|
||||
* Don't open the inventory dialog? (Bool)
|
||||
* false. Always open the inventory dialog. (Bool)
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_target", "_isBackpack", "_isLocked", "_return"];
|
||||
private ["_unit", "_backpack"];
|
||||
|
||||
_target = _this select 1;
|
||||
_unit = _this select 0;
|
||||
_backpack = _this select 1;
|
||||
|
||||
_isBackpack = [_target] call FUNC(isBackpack);
|
||||
_isLocked = _target getVariable ["ACE_LockedInventory", false];
|
||||
// exit if the target is not a backpack
|
||||
if !([_backpack] call FUNC(isBackpack)) exitWith {};
|
||||
|
||||
_return = false;
|
||||
if (_isBackpack) then {
|
||||
// target is a backpack
|
||||
private "_unit";
|
||||
_unit = [_target] call FUNC(getBackpackAssignedUnit);
|
||||
// get the unit that wears the backpack object
|
||||
private "_target";
|
||||
_target = [_backpack] call FUNC(getBackpackAssignedUnit);
|
||||
|
||||
if (!alive _unit || {_unit getVariable ["ACE_isUnconscious", false]}) exitWith {};
|
||||
// raise event on target unit
|
||||
["backpackOpened", _target, [_unit, _target, _backpack]] call EFUNC(common,targetEvent);
|
||||
|
||||
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
|
||||
// return false to open inventory as usual
|
||||
false
|
||||
|
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.
@ -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>
|
@ -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);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -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);
|
||||
@ -200,6 +203,9 @@ PREP(logDisplays);
|
||||
PREP(monitor);
|
||||
PREP(showUser);
|
||||
|
||||
PREP(dumpPerformanceCounters);
|
||||
PREP(dumpArray);
|
||||
|
||||
// ACE_CuratorFix
|
||||
PREP(addCuratorUnloadEventhandler);
|
||||
PREP(fixCrateContent);
|
||||
@ -228,6 +234,9 @@ PREP(hashListSelect);
|
||||
PREP(hashListSet);
|
||||
PREP(hashListPush);
|
||||
|
||||
//Debug
|
||||
ACE_COUNTERS = [];
|
||||
|
||||
// Load settings
|
||||
if (isServer) then {
|
||||
call FUNC(loadSettingsOnServer);
|
||||
|
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)}
|
@ -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);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -26,7 +26,7 @@ if (!hasInterface) exitWith {};
|
||||
false
|
||||
},
|
||||
{false},
|
||||
[20, true, true, false], false] call CALLSTACK(cba_fnc_addKeybind);
|
||||
[20, [true, true, false]], false] call cba_fnc_addKeybind;
|
||||
|
||||
if isNil(QGVAR(UsePP)) then {
|
||||
GVAR(UsePP) = true;
|
||||
|
@ -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);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -22,37 +22,22 @@ GVAR(isOpeningDoor) = false;
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(!GVAR(isOpeningDoor) &&
|
||||
{[2] call FUNC(getDoor) select 1 != ''}
|
||||
) exitWith {false};
|
||||
if (GVAR(isOpeningDoor) || {[2] call FUNC(getDoor) select 1 == ''}) exitWith {false};
|
||||
|
||||
// Statement
|
||||
call EFUNC(interaction,openDoor);
|
||||
true
|
||||
},
|
||||
{},
|
||||
[57, [false, true, false]], false] call cba_fnc_addKeybind;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_OpenDoor",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
if !(_exceptions call EGVAR(common,canInteract)) exitWith {false};
|
||||
// Conditions: specific
|
||||
if !(GVAR(isOpeningDoor)) exitWith {false};
|
||||
|
||||
//Probably don't want any condidtions here, so variable never gets locked down
|
||||
// Statement
|
||||
GVAR(isOpeningDoor) = false;
|
||||
true
|
||||
},
|
||||
[57, [false, true, false]],
|
||||
false,
|
||||
"keyup"
|
||||
] call cba_fnc_registerKeybind;
|
||||
[57, [false, true, false]], false] call cba_fnc_addKeybind; //Key CTRL+Space
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_TapShoulder",
|
||||
|
||||
["ACE3", QGVAR(tapShoulder), localize "STR_ACE_Interaction_TapShoulder",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = [];
|
||||
@ -64,13 +49,10 @@ localize "STR_ACE_Interaction_TapShoulder",
|
||||
[ACE_player, cursorTarget] call FUNC(tapShoulder);
|
||||
true
|
||||
},
|
||||
[20, [true, false, false]],
|
||||
false,
|
||||
"keydown"
|
||||
] call cba_fnc_registerKeybind;
|
||||
{false},
|
||||
[20, [true, false, false]], false] call cba_fnc_addKeybind;
|
||||
|
||||
["ACE3",
|
||||
localize "STR_ACE_Interaction_ModifierKey",
|
||||
["ACE3", QGVAR(modifierKey), localize "STR_ACE_Interaction_ModifierKey",
|
||||
{
|
||||
// Conditions: canInteract
|
||||
_exceptions = ["ACE_Drag_isNotDragging"];
|
||||
@ -81,24 +63,9 @@ localize "STR_ACE_Interaction_ModifierKey",
|
||||
// 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
|
||||
//Probably don't want any condidtions here, so variable never gets locked down
|
||||
ACE_Modifier = 0;
|
||||
// Return false so it doesn't block other actions
|
||||
false
|
||||
false;
|
||||
},
|
||||
[29, [false, false, false]],
|
||||
false,
|
||||
"keyup"
|
||||
] call cba_fnc_registerKeybind;
|
||||
[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;
|
||||
|
@ -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 {
|
||||
|
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,8 +1,3 @@
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
class CAManBase: Man {
|
||||
@ -103,31 +98,31 @@ class CfgVehicles {
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_MapTools,12)
|
||||
MACRO_ADDITEM(ACE_MapTools,12);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -192,7 +192,7 @@ class ACE_Medical_Actions {
|
||||
treatmentLocations[] = {"All"};
|
||||
requiredMedic = 0;
|
||||
treatmentTime = 7.5;
|
||||
items[] = {QVAR(bodyBag)};
|
||||
items[] = {QGVAR(bodyBag)};
|
||||
condition = "!alive (_this select 1);";
|
||||
callbackSuccess = QUOTE(DFUNC(actionPlaceInBodyBag));
|
||||
callbackFailure = "";
|
||||
|
@ -347,7 +347,8 @@ class CfgVehicles {
|
||||
|
||||
class ACE_Actions {
|
||||
class ACE_Head {
|
||||
statement = QUOTE([ARR_3(_target, true, 0)] call DEFUNC(displayPatientInformation));
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 0)] call DFUNC(displayPatientInformation));
|
||||
|
||||
class Bandage_Head {
|
||||
displayName = "Bandage Head";
|
||||
@ -406,7 +407,8 @@ class CfgVehicles {
|
||||
displayName = "Medical";
|
||||
distance = 5.0;
|
||||
condition = "true";
|
||||
statement = QUOTE([ARR_3(_target, true, 1)] call DEFUNC(displayPatientInformation));
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 1)] call DFUNC(displayPatientInformation));
|
||||
showDisabled = 1;
|
||||
priority = 2;
|
||||
hotkey = "M";
|
||||
@ -481,7 +483,8 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
class ACE_ArmLeft {
|
||||
statement = QUOTE([ARR_3(_target, true, 2)] call DEFUNC(displayPatientInformation));
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 2)] call DFUNC(displayPatientInformation));
|
||||
|
||||
class Bandage_LeftArm {
|
||||
displayName = "Bandage Left Arm";
|
||||
@ -602,7 +605,8 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
class ACE_ArmRight {
|
||||
statement = QUOTE([ARR_3(_target, true, 3)] call DEFUNC(displayPatientInformation));
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 3)] call DFUNC(displayPatientInformation));
|
||||
class Bandage_RightArm {
|
||||
displayName = "Bandage Right Arm";
|
||||
distance = 2.0;
|
||||
@ -723,7 +727,8 @@ class CfgVehicles {
|
||||
|
||||
};
|
||||
class ACE_LegLeft {
|
||||
statement = QUOTE([ARR_3(_target, true, 4)] call DEFUNC(displayPatientInformation));
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 4)] call DFUNC(displayPatientInformation));
|
||||
class Bandage_LeftLeg {
|
||||
displayName = "Bandage Left Leg";
|
||||
distance = 2.0;
|
||||
@ -834,7 +839,8 @@ class CfgVehicles {
|
||||
};
|
||||
};
|
||||
class ACE_LegRight {
|
||||
statement = QUOTE([ARR_3(_target, true, 5)] call DEFUNC(displayPatientInformation));
|
||||
runOnHover = 1;
|
||||
statement = QUOTE([ARR_3(_target, true, 5)] call DFUNC(displayPatientInformation));
|
||||
class Bandage_RightLeg {
|
||||
displayName = "Bandage Right Leg";
|
||||
distance = 2.0;
|
||||
|
@ -227,7 +227,7 @@ class CfgWeapons {
|
||||
count = 1;
|
||||
type = 16;
|
||||
displayName = $STR_ACE_MEDICAL_AID_KIT_DISPLAY;
|
||||
//picture = QUOTE(PATHTOF(ui\items\personal_aid_kit.paa));
|
||||
picture = QUOTE(PATHTOF(ui\items\personal_aid_kit.paa));
|
||||
//model = QUOTE(PATHTOF(equipment\Personal-aidkits\MTP.p3d));
|
||||
descriptionShort = $STR_ACE_MEDICAL_AID_KIT_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MEDICAL_AID_KIT_DESC_USE;
|
||||
@ -240,7 +240,7 @@ class CfgWeapons {
|
||||
scope=2;
|
||||
displayName= $STR_ACE_MEDICAL_SURGICALKIT_DISPLAY;
|
||||
model = QUOTE(PATHTOF(data\surgical_kit.p3d));
|
||||
//picture = QUOTE(PATHTOF(data\surgical_kit.paa));
|
||||
picture = QUOTE(PATHTOF(ui\items\surgicalKit.paa));
|
||||
descriptionShort = $STR_ACE_MEDICAL_SURGICALKIT_DESC_SHORT;
|
||||
descriptionUse = $STR_ACE_MEDICAL_SURGICALKIT_DESC_USE;
|
||||
class ItemInfo: InventoryItem_Base_F {
|
||||
|
BIN
addons/medical/data/Epipen_co.paa
Normal file
BIN
addons/medical/data/Epipen_co.paa
Normal file
Binary file not shown.
@ -8,7 +8,7 @@ PixelShaderID="Super";
|
||||
VertexShaderID="Super";
|
||||
class Stage1
|
||||
{
|
||||
texture="z\ace\addons\medical\equipment\data\bodybag_nohq.paa";
|
||||
texture="z\ace\addons\medical\data\bodybag_nohq.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
@ -80,7 +80,7 @@ class Stage6
|
||||
};
|
||||
class Stage7
|
||||
{
|
||||
texture="z\ace\addons\medical\equipment\data\env_co.paa";
|
||||
texture="z\ace\addons\medical\data\env_co.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
|
@ -8,7 +8,7 @@ PixelShaderID="NormalMapSpecularDIMap";
|
||||
VertexShaderID="NormalMap";
|
||||
class Stage1
|
||||
{
|
||||
texture="z\ace\addons\medical\equipment\data\bodybagItem_nohq.paa";
|
||||
texture="z\ace\addons\medical\data\bodybagItem_nohq.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
@ -20,7 +20,7 @@ class Stage1
|
||||
};
|
||||
class Stage2
|
||||
{
|
||||
texture="z\ace\addons\medical\equipment\data\bodybagItem_smdi.paa";
|
||||
texture="z\ace\addons\medical\data\bodybagItem_smdi.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
|
BIN
addons/medical/data/env_co.paa
Normal file
BIN
addons/medical/data/env_co.paa
Normal file
Binary file not shown.
@ -8,7 +8,7 @@ PixelShaderID="NormalMapSpecularDIMap";
|
||||
VertexShaderID="NormalMap";
|
||||
class Stage1
|
||||
{
|
||||
texture="z\ace\addons\medical\equipment\bandages\packingbandage_nohq.paa";
|
||||
texture="z\ace\addons\medical\data\packingbandage_nohq.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
@ -20,7 +20,7 @@ class Stage1
|
||||
};
|
||||
class Stage2
|
||||
{
|
||||
texture="z\ace\addons\medical\equipment\bandages\packingbandage_smdi.paa";
|
||||
texture="z\ace\addons\medical\data\packingbandage_smdi.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
|
BIN
addons/medical/data/packingbandage_nohq.paa
Normal file
BIN
addons/medical/data/packingbandage_nohq.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/packingbandage_smdi.paa
Normal file
BIN
addons/medical/data/packingbandage_smdi.paa
Normal file
Binary file not shown.
@ -8,7 +8,7 @@ PixelShaderID="Super";
|
||||
VertexShaderID="Super";
|
||||
class Stage1
|
||||
{
|
||||
texture="z\ace\addons\medical\equipment\data\surgical_kit_nohq.paa";
|
||||
texture="z\ace\addons\medical\data\surgical_kit_nohq.paa";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
@ -80,7 +80,7 @@ class Stage6
|
||||
};
|
||||
class Stage7
|
||||
{
|
||||
texture="z\ace\addons\medical\equipment\data\env_co.tga";
|
||||
texture="z\ace\addons\medical\data\env_co.tga";
|
||||
uvSource="tex";
|
||||
class uvTransform
|
||||
{
|
||||
|
BIN
addons/medical/data/tournequit_co.paa
Normal file
BIN
addons/medical/data/tournequit_co.paa
Normal file
Binary file not shown.
BIN
addons/medical/data/tourniquet.p3d
Normal file
BIN
addons/medical/data/tourniquet.p3d
Normal file
Binary file not shown.
@ -49,7 +49,7 @@ if (_show) then {
|
||||
if (((_target getvariable [QGVAR(tourniquets), [0,0,0,0,0,0]]) select GVAR(currentSelectedSelectionN)) > 0) then {
|
||||
_genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_TOURNIQUET_APPLIED", [0.5, 0.5, 0, 1]];
|
||||
};
|
||||
if (_target getvariable[QGVAR(inPain), false]) then {
|
||||
if (_target getvariable[QGVAR(hasPain), false]) then {
|
||||
_genericMessages pushback [localize "STR_ACE_MEDICAL_STATUS_PAIN", [1, 1, 1, 1]];
|
||||
};
|
||||
|
||||
@ -149,4 +149,4 @@ if (_show) then {
|
||||
|
||||
} else {
|
||||
("ACE_MedicalRscDisplayInformation" call BIS_fnc_rscLayer) cutText ["","PLAIN"];
|
||||
};
|
||||
};
|
||||
|
BIN
addons/medical/ui/items/personal_aid_kit.paa
Normal file
BIN
addons/medical/ui/items/personal_aid_kit.paa
Normal file
Binary file not shown.
@ -4,19 +4,14 @@ class CfgVehicles {
|
||||
ACE_NightVision_blur = 0.055;
|
||||
};
|
||||
|
||||
#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_NVG_Gen1,6)
|
||||
MACRO_ADDITEM(ACE_NVG_Gen2,6)
|
||||
//MACRO_ADDITEM(ACE_NVG_Gen3,6)
|
||||
MACRO_ADDITEM(ACE_NVG_Gen4,6)
|
||||
MACRO_ADDITEM(ACE_NVG_Wide,6)
|
||||
MACRO_ADDITEM(ACE_NVG_Gen1,6);
|
||||
MACRO_ADDITEM(ACE_NVG_Gen2,6);
|
||||
//MACRO_ADDITEM(ACE_NVG_Gen3,6);
|
||||
MACRO_ADDITEM(ACE_NVG_Gen4,6);
|
||||
MACRO_ADDITEM(ACE_NVG_Wide,6);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -1,8 +1,3 @@
|
||||
#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Man;
|
||||
|
||||
@ -39,61 +34,61 @@ class CfgVehicles {
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2)
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2);
|
||||
};
|
||||
};
|
||||
|
||||
class B_supplyCrate_F: ReammoBox_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2)
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2)
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2);
|
||||
};
|
||||
};
|
||||
|
||||
class O_supplyCrate_F: B_supplyCrate_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2)
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2)
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_FIA_Support_F: FIA_Box_Base_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2)
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2);
|
||||
};
|
||||
};
|
||||
|
||||
class I_supplyCrate_F: B_supplyCrate_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2)
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2);
|
||||
};
|
||||
};
|
||||
|
||||
class IG_supplyCrate_F: ReammoBox_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2)
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2);
|
||||
};
|
||||
};
|
||||
|
||||
class C_supplyCrate_F: ReammoBox_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2)
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,2);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,6)
|
||||
MACRO_ADDITEM(ACE_SpareBarrel,6);
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -19,3 +19,14 @@ class CfgPatches {
|
||||
#include "CfgVehicles.hpp"
|
||||
|
||||
#include "CfgWeapons.hpp"
|
||||
|
||||
class ACE_Settings {
|
||||
class GVAR(DisplayTextOnJam) {
|
||||
typeName = "BOOL";
|
||||
isClientSetable = 1;
|
||||
value = 1;
|
||||
displayName = "$STR_ACE_overheating_SettingDisplayTextName";
|
||||
description = "$STR_ACE_overheating_SettingDisplayTextDesc";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -42,13 +42,16 @@ if (_weapon in _jammedWeapons) then {
|
||||
};
|
||||
|
||||
_unit playActionNow _clearJamAction;
|
||||
};
|
||||
if (_weapon == primaryWeapon _unit) then {
|
||||
playSound QGVAR(fixing_rifle);
|
||||
} else {
|
||||
if (_weapon == secondaryWeapon _unit) then {
|
||||
playSound QGVAR(fixing_pistol);
|
||||
if (_weapon == primaryWeapon _unit) then {
|
||||
playSound QGVAR(fixing_rifle);
|
||||
} else {
|
||||
if (_weapon == secondaryWeapon _unit) then {
|
||||
playSound QGVAR(fixing_pistol);
|
||||
};
|
||||
};
|
||||
};
|
||||
[localize "STR_ACE_Overheating_WeaponUnjammed"] call EFUNC(common,displayTextStructured);
|
||||
|
||||
if (GVAR(DisplayTextOnJam)) then {
|
||||
[localize "STR_ACE_Overheating_WeaponUnjammed"] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
};
|
||||
|
@ -61,7 +61,7 @@ if (_unit getVariable [QGVAR(JammingActionID), -1] == -1) then {
|
||||
_statement = {
|
||||
playSound3D ["a3\sounds_f\weapons\Other\dry9.wss", _this select 0];
|
||||
|
||||
if (!(missionNamespace getVariable [QGVAR(knowAboutJam), false]) && {(_this select 1) ammo currentWeapon (_this select 1) > 0}) then {
|
||||
if (!(missionNamespace getVariable [QGVAR(knowAboutJam), false]) && {(_this select 1) ammo currentWeapon (_this select 1) > 0} && {GVAR(DisplayTextOnJam)}) then {
|
||||
[localize "STR_ACE_Overheating_WeaponJammed"] call EFUNC(common,displayTextStructured);
|
||||
GVAR(knowAboutJam) = true;
|
||||
};
|
||||
|
@ -2,6 +2,12 @@
|
||||
<!-- Edited with tabler - 2014-12-17 -->
|
||||
<Project name="ACE">
|
||||
<Package name="Overheating">
|
||||
<Key ID="STR_ACE_overheating_SettingDisplayTextName">
|
||||
<English>Display text on jam</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_overheating_SettingDisplayTextDesc">
|
||||
<English>Display a notification whenever your weapon gets jammed</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Overheating_SpareBarrelName">
|
||||
<English>Spare barrel</English>
|
||||
<German>Ersatzlauf</German>
|
||||
|
34
addons/parachute/CfgVehicles.hpp
Normal file
34
addons/parachute/CfgVehicles.hpp
Normal file
@ -0,0 +1,34 @@
|
||||
class CfgVehicles {
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
class _xx_ACE_Altimeter {
|
||||
name = "ACE_Altimeter";
|
||||
count = 6;
|
||||
};
|
||||
};
|
||||
class TransportBackpacks {
|
||||
class _xx_ACE_NonSteerableParachute {
|
||||
backpack = "ACE_NonSteerableParachute";
|
||||
count = 4;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class B_Parachute;
|
||||
class ACE_NonSteerableParachute: B_Parachute {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
scope = 2;
|
||||
displayName = "$STR_ACE_Parachute_NonSteerableParachute";
|
||||
//picture = "\A3\Characters_F\data\ui\icon_b_parachute_ca.paa"; // @todo
|
||||
//model = "\A3\Weapons_F\Ammoboxes\Bags\Backpack_Parachute"; // @todo
|
||||
// backpackSimulation = "ParachuteNonSteerable"; //ParachuteSteerable //Bis broke this in 1.40
|
||||
ParachuteClass = "NonSteerable_Parachute_F";
|
||||
maximumLoad = 0;
|
||||
mass = 100;
|
||||
};
|
||||
|
||||
class B_Soldier_05_f; class B_Pilot_F: B_Soldier_05_f {backpack = "ACE_NonSteerableParachute";};
|
||||
class I_Soldier_04_F; class I_pilot_F: I_Soldier_04_F {backpack = "ACE_NonSteerableParachute";};
|
||||
class O_helipilot_F; class O_Pilot_F: O_helipilot_F {backpack = "ACE_NonSteerableParachute";};
|
||||
};
|
9
addons/parachute/CfgWeapons.hpp
Normal file
9
addons/parachute/CfgWeapons.hpp
Normal file
@ -0,0 +1,9 @@
|
||||
class CfgWeapons {
|
||||
class ItemWatch;
|
||||
class ACE_Altimeter:ItemWatch {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
descriptionShort = "$STR_ACE_Parachute_AltimeterDescription";
|
||||
displayName = "$STR_ACE_Parachute_AltimeterDisplayName";
|
||||
picture = PATHTOF(UI\watch_altimeter.paa);
|
||||
};
|
||||
};
|
@ -30,7 +30,7 @@ if (!hasInterface) exitWith {};
|
||||
true
|
||||
},
|
||||
{false},
|
||||
[24, false, false, false], false] call CALLSTACK(cba_fnc_addKeybind);
|
||||
[24, [false, false, false]], false] call cba_fnc_addKeybind;
|
||||
|
||||
GVAR(PFH) = false;
|
||||
["playerVehicleChanged",{
|
||||
|
@ -1,61 +1,18 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
class CfgPatches {
|
||||
class ACE_Parachute {
|
||||
units[] = {"ACE_NonSteerableParachute"};
|
||||
weapons[] = {"ACE_Altimeter"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
VERSION_CONFIG;
|
||||
author[] = {"Garth 'LH' de Wet"};
|
||||
authorUrl = "http://garth.snakebiteink.co.za/";
|
||||
};
|
||||
class ACE_Parachute {
|
||||
units[] = {"ACE_NonSteerableParachute"};
|
||||
weapons[] = {"ACE_Altimeter"};
|
||||
requiredVersion = REQUIRED_VERSION;
|
||||
requiredAddons[] = {"ace_common"};
|
||||
VERSION_CONFIG;
|
||||
author[] = {"Garth 'LH' de Wet"};
|
||||
authorUrl = "http://garth.snakebiteink.co.za/";
|
||||
};
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.hpp"
|
||||
#include "CfgWeapons.hpp"
|
||||
#include "RscTitles.hpp"
|
||||
|
||||
class CfgWeapons {
|
||||
class ItemWatch;
|
||||
class ACE_Altimeter:ItemWatch {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
descriptionShort = "$STR_ACE_Parachute_AltimeterDescription";
|
||||
displayName = "$STR_ACE_Parachute_AltimeterDisplayName";
|
||||
picture = PATHTOF(UI\watch_altimeter.paa);
|
||||
};
|
||||
};
|
||||
|
||||
class CfgVehicles {
|
||||
class Box_NATO_Support_F;
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
class _xx_ACE_Altimeter {
|
||||
name = "ACE_Altimeter";
|
||||
count = 6;
|
||||
};
|
||||
};
|
||||
class TransportBackpacks {
|
||||
class _xx_ACE_NonSteerableParachute {
|
||||
backpack = "ACE_NonSteerableParachute";
|
||||
count = 4;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
class B_Parachute;
|
||||
class ACE_NonSteerableParachute: B_Parachute {
|
||||
author = "$STR_ACE_Common_ACETeam";
|
||||
scope = 2;
|
||||
displayName = "$STR_ACE_Parachute_NonSteerableParachute";
|
||||
//picture = "\A3\Characters_F\data\ui\icon_b_parachute_ca.paa"; // @todo
|
||||
//model = "\A3\Weapons_F\Ammoboxes\Bags\Backpack_Parachute"; // @todo
|
||||
// backpackSimulation = "ParachuteNonSteerable"; //ParachuteSteerable //Bis broke this in 1.40
|
||||
ParachuteClass = "NonSteerable_Parachute_F";
|
||||
maximumLoad = 0;
|
||||
mass = 100;
|
||||
};
|
||||
|
||||
class B_Soldier_05_f; class B_Pilot_F: B_Soldier_05_f {backpack = "ACE_NonSteerableParachute";};
|
||||
class I_Soldier_04_F; class I_pilot_F: I_Soldier_04_F {backpack = "ACE_NonSteerableParachute";};
|
||||
class O_helipilot_F; class O_Pilot_F: O_helipilot_F {backpack = "ACE_NonSteerableParachute";};
|
||||
};
|
||||
|
@ -14,7 +14,7 @@ class Extended_PostInit_EventHandlers {
|
||||
class Extended_Take_EventHandlers {
|
||||
class CAManBase {
|
||||
class ACE_AmmoIndicatorReload {
|
||||
clientTake = QUOTE(if (_this select 0 == ACE_player && {(_this select 1) in [ARR_3(uniformContainer (_this select 0), vestContainer (_this select 0), backpackContainer (_this select 0))]} && {_this select 2 == currentMagazine (_this select 0)}) then {[ARR_2(_this select 0, vehicle (_this select 0))] call FUNC(displayAmmo)};);
|
||||
clientTake = QUOTE(if (_this select 0 == ACE_player && {GVAR(DisplayText)} && {(_this select 1) in [ARR_3(uniformContainer (_this select 0), vestContainer (_this select 0), backpackContainer (_this select 0))]} && {_this select 2 == currentMagazine (_this select 0)}) then {[ARR_2(_this select 0, vehicle (_this select 0))] call FUNC(displayAmmo)};);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -21,3 +21,14 @@ class CfgPatches {
|
||||
#include "CfgActions.hpp"
|
||||
|
||||
#include "RscInGameUI.hpp"
|
||||
|
||||
class ACE_Settings {
|
||||
class GVAR(DisplayText) {
|
||||
typeName = "BOOL";
|
||||
isClientSetable = 1;
|
||||
value = 1;
|
||||
displayName = "$STR_ACE_reload_SettingDisplayTextName";
|
||||
description = "$STR_ACE_reload_SettingDisplayTextDesc";
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -2,6 +2,12 @@
|
||||
<!-- Edited with tabler - 2014-09-09 -->
|
||||
<Project name="ACE">
|
||||
<Package name="Reload">
|
||||
<Key ID="STR_ACE_reload_SettingDisplayTextName">
|
||||
<English>Check ammo on weapon reload</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_reload_SettingDisplayTextDesc">
|
||||
<English>Check the ammo in your new magazine on magazine reload.</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Reload_checkAmmo">
|
||||
<English>Check Ammo</English>
|
||||
<German>Munition prüfen</German>
|
||||
|
@ -7,7 +7,7 @@ class CfgVehicles {
|
||||
function = QFUNC(module);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = QUOTE(PATHTOF(UI\IconSwitchUnits_ca.paa));
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Respawn_ca.paa));
|
||||
class Arguments {
|
||||
class SavePreDeathGear {
|
||||
displayName = "Save Gear?";
|
||||
@ -49,7 +49,7 @@ class CfgVehicles {
|
||||
function = QFUNC(moduleRallypoint);
|
||||
scope = 2;
|
||||
isGlobal = 1;
|
||||
icon = QUOTE(PATHTOF(UI\IconSwitchUnits_ca.paa));
|
||||
icon = QUOTE(PATHTOF(UI\Icon_Module_Rallypoint_ca.paa));
|
||||
class Arguments {
|
||||
};
|
||||
};
|
||||
|
@ -1,8 +1,4 @@
|
||||
/*#define MACRO_ADDITEM(ITEM,COUNT) class _xx_##ITEM { \
|
||||
name = #ITEM; \
|
||||
count = COUNT; \
|
||||
};
|
||||
|
||||
/*
|
||||
class CfgVehicles {
|
||||
class NATO_Box_Base;
|
||||
class EAST_Box_Base;
|
||||
@ -10,25 +6,25 @@ class CfgVehicles {
|
||||
|
||||
class Box_NATO_Support_F: NATO_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_acc_flashlight_tls,5)
|
||||
MACRO_ADDITEM(ACE_acc_flashlight_tls,5);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_East_Support_F: EAST_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_acc_flashlight_tls,5)
|
||||
MACRO_ADDITEM(ACE_acc_flashlight_tls,5);
|
||||
};
|
||||
};
|
||||
|
||||
class Box_IND_Support_F: IND_Box_Base {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_acc_flashlight_tls,5)
|
||||
MACRO_ADDITEM(ACE_acc_flashlight_tls,5);
|
||||
};
|
||||
};
|
||||
|
||||
class ACE_Box_Misc: Box_NATO_Support_F {
|
||||
class TransportItems {
|
||||
MACRO_ADDITEM(ACE_acc_flashlight_tls,2)
|
||||
MACRO_ADDITEM(ACE_acc_flashlight_tls,2);
|
||||
};
|
||||
};
|
||||
};*/
|
||||
|
@ -13,3 +13,13 @@ class CfgPatches {
|
||||
};
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
|
||||
class ACE_Settings {
|
||||
class GVAR(DisplayText) {
|
||||
typeName = "BOOL";
|
||||
isClientSetable = 1;
|
||||
value = 1;
|
||||
displayName = "$STR_ACE_Weaponselect_SettingDisplayTextName";
|
||||
description = "$STR_ACE_Weaponselect_SettingDisplayTextDesc";
|
||||
};
|
||||
};
|
||||
|
@ -14,6 +14,8 @@
|
||||
|
||||
private ["_magazine", "_numberofMagazines"];
|
||||
|
||||
if !(GVAR(DisplayText)) exitwith {};
|
||||
|
||||
_magazine = _this select 0;
|
||||
_numberofMagazines = _this select 1;
|
||||
|
||||
|
@ -36,9 +36,10 @@ if (_nextMuzzle != "") then {
|
||||
// There is a no muzzle with magazines --> select nothing
|
||||
GVAR(CurrentGrenadeMuzzleFrag) = ""; GVAR(CurrentGrenadeMuzzleOther) = "";
|
||||
|
||||
_text = [localize "STR_ACE_WeaponSelect_NoGrenadesLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||
|
||||
if (GVAR(DisplayText)) then {
|
||||
_text = [localize "STR_ACE_WeaponSelect_NoGrenadesLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
};
|
||||
|
||||
if (_nextMuzzle in GVAR(FragMuzzles)) then {
|
||||
|
@ -35,10 +35,10 @@ if (_nextMuzzle != "") then {
|
||||
} else {
|
||||
// There is a no muzzle with magazines --> select nothing
|
||||
GVAR(CurrentGrenadeMuzzleFrag) = "";
|
||||
|
||||
_text = [localize "STR_ACE_WeaponSelect_NoFragsLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||
|
||||
if (GVAR(DisplayText)) then {
|
||||
_text = [localize "STR_ACE_WeaponSelect_NoFragsLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
};
|
||||
|
||||
GVAR(CurrentGrenadeMuzzleIsFrag) = true;
|
||||
|
@ -35,10 +35,10 @@ if (_nextMuzzle != "") then {
|
||||
} else {
|
||||
// There is a no muzzle with magazines --> select nothing
|
||||
GVAR(CurrentGrenadeMuzzleOther) = "";
|
||||
|
||||
_text = [localize "STR_ACE_WeaponSelect_NoMiscGrenadeLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||
|
||||
if (GVAR(DisplayText)) then {
|
||||
_text = [localize "STR_ACE_WeaponSelect_NoMiscGrenadeLeft", [1,0,0]] call EFUNC(common,stringToColoredText);
|
||||
[composeText [lineBreak, _text]] call EFUNC(common,displayTextStructured);
|
||||
};
|
||||
};
|
||||
|
||||
GVAR(CurrentGrenadeMuzzleIsFrag) = false;
|
||||
|
@ -2,6 +2,12 @@
|
||||
<!-- Edited with tabler - 2014-12-20 -->
|
||||
<Project name="ACE">
|
||||
<Package name="WeaponSelect">
|
||||
<Key ID="STR_ACE_Weaponselect_SettingDisplayTextName">
|
||||
<English>Display text on grenade throw</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_Weaponselect_SettingDisplayTextDesc">
|
||||
<English>Display a hint or text on grenade throw.</English>
|
||||
</Key>
|
||||
<Key ID="STR_ACE_WeaponSelect_SelectPistol">
|
||||
<English>Select Pistol</English>
|
||||
<German>Pistole auswählen</German>
|
||||
|
@ -1,11 +1,13 @@
|
||||
class Extended_PreInit_EventHandlers {
|
||||
class ADDON {
|
||||
init = QUOTE( call compile preprocessFileLineNumbers PATHTOF(XEH_preInit.sqf) );
|
||||
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
||||
};
|
||||
};
|
||||
|
||||
class Extended_Fired_Eventhandlers {
|
||||
class CaManBase {
|
||||
fired = QUOTE( call FUNC(handleFired) );
|
||||
};
|
||||
};
|
||||
class Extended_FiredBIS_EventHandlers {
|
||||
class CAManBase {
|
||||
class ADDON {
|
||||
firedBIS = QUOTE(_this call FUNC(handleFired));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -28,4 +28,6 @@ class ACE_Settings {
|
||||
isClientSetable = 0;
|
||||
};
|
||||
};
|
||||
#include "CfgVehicles.h"
|
||||
|
||||
#include "CfgEventHandlers.hpp"
|
||||
#include "CfgVehicles.h"
|
||||
|
@ -1,21 +1,24 @@
|
||||
/**
|
||||
* fnc HandleFired.
|
||||
* Handles wind deflection for projectiles.
|
||||
* Is expected to be triggered by the fired eventhandler from BI.
|
||||
*
|
||||
* Params:
|
||||
* 1. unit: Object - Object the event handler is assigned to
|
||||
* 2. weapon: String - Fired weapon
|
||||
* 3. muzzle: String - Muzzle that was used
|
||||
* 4. mode: String - Current mode of the fired weapon
|
||||
* 5. ammo: String - Ammo used
|
||||
* 6. magazine: String - magazine name which was used
|
||||
* 7. projectile: Object - Object of the projectile that was shot (Arma 2: OA and onwards)
|
||||
*
|
||||
/*
|
||||
* Author: Glowbal, Ruthberg
|
||||
* Handles wind deflection for projectiles.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit - Object the event handler is assigned to <OBJECT>
|
||||
* 1: weapon - Fired weapon <STRING>
|
||||
* 2: muzzle - Muzzle that was used <STRING>
|
||||
* 3: mode - Current mode of the fired weapon <STRING>
|
||||
* 4: ammo - Ammo used <STRING>
|
||||
* 5: magazine - magazine name which was used <STRING>
|
||||
* 6: projectile - Object of the projectile that was shot <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [clientFiredBIS-XEH] call ace_winddeflection_fnc_handleFired
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
|
||||
#include "script_component.hpp"
|
||||
|
||||
private ["_unit", "_weapon", "_ammo", "_bullet", "_airFriction", "_index"];
|
||||
|
BIN
extras/assets/icons/Icons_Modules.psd
Normal file
BIN
extras/assets/icons/Icons_Modules.psd
Normal file
Binary file not shown.
15918
extras/assets/logo/black/ACE3-Logo.eps
Normal file
15918
extras/assets/logo/black/ACE3-Logo.eps
Normal file
File diff suppressed because it is too large
Load Diff
BIN
extras/assets/logo/black/ACE3-Logo.jpg
Normal file
BIN
extras/assets/logo/black/ACE3-Logo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
BIN
extras/assets/logo/black/ACE3-Logo.png
Normal file
BIN
extras/assets/logo/black/ACE3-Logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
15918
extras/assets/logo/white/ACE3-Logo.eps
Normal file
15918
extras/assets/logo/white/ACE3-Logo.eps
Normal file
File diff suppressed because it is too large
Load Diff
BIN
extras/assets/logo/white/ACE3-Logo.jpg
Normal file
BIN
extras/assets/logo/white/ACE3-Logo.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
BIN
extras/assets/logo/white/ACE3-Logo.png
Normal file
BIN
extras/assets/logo/white/ACE3-Logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 21 KiB |
Loading…
Reference in New Issue
Block a user