mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Explosives - Add modded defusal kit support (#9353)
* Update CfgWeapons.hpp * Update XEH_preStart.sqf * Update XEH_preInit.sqf * Update fnc_canDefuse.sqf * Update fnc_canDefuse.sqf * fix condition Co-authored-by: PabstMirror <pabstmirror@gmail.com> * Update fnc_interactEH.sqf * Update addons/explosives/functions/fnc_interactEH.sqf Co-authored-by: PabstMirror <pabstmirror@gmail.com> --------- Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com> Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
parent
c1c1433c44
commit
beb4ec8f06
@ -48,6 +48,7 @@ class CfgWeapons {
|
||||
picture = QPATHTOF(Data\UI\Pliers.paa);
|
||||
model = "\A3\Structures_F\Items\Tools\Pliers_F.p3d";
|
||||
ACE_isTool = 1;
|
||||
GVAR(defusalKit) = 1;
|
||||
|
||||
class ItemInfo: ACE_ExplosiveItem {
|
||||
mass = 5;
|
||||
|
@ -13,4 +13,6 @@ PREP_RECOMPILE_END;
|
||||
GVAR(detonationHandlers) = [];
|
||||
GVAR(excludedMines) = [];
|
||||
|
||||
GVAR(defusalKits) = call (uiNamespace getVariable QGVAR(defusalKits));
|
||||
|
||||
ADDON = true;
|
||||
|
@ -1,3 +1,6 @@
|
||||
#include "script_component.hpp"
|
||||
|
||||
#include "XEH_PREP.hpp"
|
||||
|
||||
private _defusalKits = (QUOTE(getNumber (_x >> QQGVAR(defusalKit)) > 0) configClasses (configFile >> "CfgWeapons") apply {configName _x});
|
||||
uiNamespace setVariable [QGVAR(defusalKits), compileFinal str _defusalKits];
|
||||
|
@ -24,7 +24,7 @@ if (isNull _explosive) exitWith {
|
||||
deleteVehicle _target;
|
||||
false
|
||||
};
|
||||
if (vehicle _unit != _unit || {!("ACE_DefusalKit" in (_unit call EFUNC(common,uniqueItems)))}) exitWith {false};
|
||||
if (vehicle _unit != _unit || {(_unit call EFUNC(common,uniqueItems)) findAny GVAR(defusalKits) == -1}) exitWith {false};
|
||||
|
||||
if (GVAR(RequireSpecialist) && {!([_unit] call EFUNC(Common,isEOD))}) exitWith {false};
|
||||
|
||||
|
@ -25,7 +25,7 @@ TRACE_1("Explosives interactEH",_interactionType);
|
||||
if (
|
||||
_interactionType != 0
|
||||
|| {vehicle ACE_player != ACE_player}
|
||||
|| {!("ACE_DefusalKit" in (ACE_player call EFUNC(common,uniqueItems)))}
|
||||
|| {(ACE_player call EFUNC(common,uniqueItems)) findAny GVAR(defusalKits) == -1}
|
||||
) exitWith {};
|
||||
|
||||
[{
|
||||
|
Loading…
Reference in New Issue
Block a user