mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Logistics Wirecutter - Add modded class support (#9235)
* Update script_component.hpp Change check for wire cutters for all child classes in addition to current class * Update script_component.hpp fix bracket * Change isKindOf for alt syntax Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> * Update addons/logistics_wirecutter/script_component.hpp Better performing searching for wirecutter Co-authored-by: BrettMayson <brett@mayson.io> * Update XEH_postInit.sqf Index all possible wirecutters * Update script_component.hpp arrayIntersect with possible wirecutters * Update XEH_postInit.sqf Incorrect quotes * Update CfgWeapons.hpp Add iswirecutter to wirecutter * Update XEH_postInit.sqf Remove pointless parentheses * Update addons/logistics_wirecutter/script_component.hpp fix for incorrect arrayintersect check Co-authored-by: PabstMirror <pabstmirror@gmail.com> * Update addons/logistics_wirecutter/XEH_postInit.sqf Incorrect quoting Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com> * use configClasses and cache at preStart --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> Co-authored-by: BrettMayson <brett@mayson.io> Co-authored-by: PabstMirror <pabstmirror@gmail.com> Co-authored-by: Jouni Järvinen <rautamiekka@users.noreply.github.com>
This commit is contained in:
parent
29b5eb97a9
commit
05c9e4247b
@ -8,6 +8,7 @@ class CfgWeapons {
|
|||||||
descriptionShort = CSTRING(wirecutterDescription);
|
descriptionShort = CSTRING(wirecutterDescription);
|
||||||
model = QPATHTOF(data\ace_wirecutter.p3d);
|
model = QPATHTOF(data\ace_wirecutter.p3d);
|
||||||
picture = QPATHTOF(ui\item_wirecutter_ca.paa);
|
picture = QPATHTOF(ui\item_wirecutter_ca.paa);
|
||||||
|
ACE_isWirecutter = 1;
|
||||||
scope = 2;
|
scope = 2;
|
||||||
class ItemInfo: CBA_MiscItem_ItemInfo {
|
class ItemInfo: CBA_MiscItem_ItemInfo {
|
||||||
mass = 25;
|
mass = 25;
|
||||||
|
@ -7,3 +7,5 @@ if (hasInterface) then {
|
|||||||
if (isServer) then {
|
if (isServer) then {
|
||||||
[QGVAR(destroyFence), {_this call FUNC(destroyFence)}] call CBA_fnc_addEventHandler;
|
[QGVAR(destroyFence), {_this call FUNC(destroyFence)}] call CBA_fnc_addEventHandler;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GVAR(possibleWirecutters) = call (uiNamespace getVariable [QGVAR(possibleWirecutters), {[]}]);
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
#include "XEH_PREP.hpp"
|
#include "XEH_PREP.hpp"
|
||||||
|
|
||||||
|
// Cache wirecutter item classes, see XEH_postInit.sqf
|
||||||
|
private _possibleWirecutters = ("getNumber (_x >> 'ACE_isWirecutter') == 1" configClasses (configFile >> "CfgWeapons")) apply {configName _x};
|
||||||
|
uiNamespace setVariable [QGVAR(possibleWirecutters), compileFinal str _possibleWirecutters];
|
||||||
|
@ -88,7 +88,7 @@
|
|||||||
#define CUT_TIME_ENGINEER 7.5
|
#define CUT_TIME_ENGINEER 7.5
|
||||||
|
|
||||||
#define HAS_WIRECUTTER(unit) (\
|
#define HAS_WIRECUTTER(unit) (\
|
||||||
"ACE_wirecutter" in (unit call EFUNC(common,uniqueItems)) \
|
((unit call EFUNC(common,uniqueItems)) arrayIntersect GVAR(possibleWirecutters)) isNotEqualTo []\
|
||||||
|| {getNumber ((configOf (backpackContainer unit)) >> QGVAR(hasWirecutter)) == 1} \
|
|| {getNumber ((configOf (backpackContainer unit)) >> QGVAR(hasWirecutter)) == 1} \
|
||||||
|| {getNumber (configFile >> "CfgWeapons" >> (vest unit) >> QGVAR(hasWirecutter)) == 1} \
|
|| {getNumber (configFile >> "CfgWeapons" >> (vest unit) >> QGVAR(hasWirecutter)) == 1} \
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user