mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fix -1//disabled and JIP issues
This commit is contained in:
parent
4b1672eaa0
commit
d5b3696c02
@ -9,7 +9,10 @@ GVAR(configTypesAdded) = [];
|
|||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["ace_unconscious", LINKFUNC(handleUnconscious)] call CBA_fnc_addEventHandler;
|
["ace_unconscious", LINKFUNC(handleUnconscious)] call CBA_fnc_addEventHandler;
|
||||||
[QGVAR(initSupplyVehicle), LINKFUNC(initSupplyVehicle)] call CBA_fnc_addEventHandler;
|
[QGVAR(initSupplyVehicle), {
|
||||||
|
TRACE_1("initSupplyVehicle EH",_this); // Warning: this can run before settings are init
|
||||||
|
[FUNC(initSupplyVehicle), _this] call EFUNC(common,runAfterSettingsInit);
|
||||||
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["vehicle", {
|
["vehicle", {
|
||||||
params ["_unit"];
|
params ["_unit"];
|
||||||
|
@ -19,10 +19,8 @@
|
|||||||
params ["_truck", "_unit"];
|
params ["_truck", "_unit"];
|
||||||
|
|
||||||
(alive _unit)
|
(alive _unit)
|
||||||
&& {_unit isKindOf "CAManBase"}
|
|
||||||
&& {local _unit}
|
|
||||||
&& {alive _truck}
|
&& {alive _truck}
|
||||||
&& {(_truck distance _unit) < REARM_ACTION_DISTANCE}
|
&& {(_truck distance _unit) < REARM_ACTION_DISTANCE}
|
||||||
&& {GVAR(supply) > 0}
|
&& {GVAR(supply) > 0}
|
||||||
&& {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this
|
&& {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this
|
||||||
|
&& {(_truck getVariable [QGVAR(currentSupply), 0]) >= 0}
|
||||||
|
@ -19,9 +19,8 @@
|
|||||||
params ["_truck", "_unit"];
|
params ["_truck", "_unit"];
|
||||||
|
|
||||||
(alive _unit)
|
(alive _unit)
|
||||||
&& {_unit isKindOf "CAManBase"}
|
|
||||||
&& {local _unit}
|
|
||||||
&& {!isNull (_unit getVariable [QGVAR(dummy), objNull])}
|
&& {!isNull (_unit getVariable [QGVAR(dummy), objNull])}
|
||||||
&& {alive _truck}
|
&& {alive _truck}
|
||||||
&& {(_truck distance _unit) < REARM_ACTION_DISTANCE}
|
&& {(_truck distance _unit) < REARM_ACTION_DISTANCE}
|
||||||
&& {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this
|
&& {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this
|
||||||
|
&& {(_truck getVariable [QGVAR(currentSupply), 0]) >= 0}
|
||||||
|
@ -19,9 +19,8 @@
|
|||||||
params ["_truck", "_unit"];
|
params ["_truck", "_unit"];
|
||||||
|
|
||||||
(alive _unit)
|
(alive _unit)
|
||||||
&& {_unit isKindOf "CAManBase"}
|
|
||||||
&& {local _unit}
|
|
||||||
&& {alive _truck}
|
&& {alive _truck}
|
||||||
&& {(_truck distance _unit) < REARM_ACTION_DISTANCE}
|
&& {(_truck distance _unit) < REARM_ACTION_DISTANCE}
|
||||||
&& {isNull (_unit getVariable [QGVAR(dummy), objNull])}
|
&& {isNull (_unit getVariable [QGVAR(dummy), objNull])}
|
||||||
&& {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this
|
&& {[_unit, _truck, ["IsNotInside"]] call EFUNC(common,canInteractWith)} // manually added actions need this
|
||||||
|
&& {(_truck getVariable [QGVAR(currentSupply), 0]) >= 0}
|
||||||
|
@ -68,6 +68,8 @@ if (_oldRearmConfig || {_configSupply > 0}) then {
|
|||||||
WARNING_1("Actions already present on [%1]. Old Compat PBO?",_typeOf);
|
WARNING_1("Actions already present on [%1]. Old Compat PBO?",_typeOf);
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
if (_vehicle getVariable [QGVAR(objectActionsAdded), false]) exitWith {TRACE_1("Actions already added to object",_vehicle);};
|
||||||
|
_vehicle setVariable [QGVAR(objectActionsAdded), true];
|
||||||
TRACE_1("Adding Object Actions",_typeOf);
|
TRACE_1("Adding Object Actions",_typeOf);
|
||||||
[_vehicle, 0, ["ACE_MainActions"], _actionReadSupplyCounter] call EFUNC(interact_menu,addActionToObject);
|
[_vehicle, 0, ["ACE_MainActions"], _actionReadSupplyCounter] call EFUNC(interact_menu,addActionToObject);
|
||||||
[_vehicle, 0, ["ACE_MainActions"], _actionTakeAmmo] call EFUNC(interact_menu,addActionToObject);
|
[_vehicle, 0, ["ACE_MainActions"], _actionTakeAmmo] call EFUNC(interact_menu,addActionToObject);
|
||||||
|
@ -20,6 +20,8 @@ params [
|
|||||||
["_testVanillaRearm", false, [false]]
|
["_testVanillaRearm", false, [false]]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if ((_target getVariable [QGVAR(currentSupply), 0]) < 0) exitWith {false};
|
||||||
|
|
||||||
private _vehCfg = configFile >> "CfgVehicles" >> typeOf _target;
|
private _vehCfg = configFile >> "CfgVehicles" >> typeOf _target;
|
||||||
private _vanillaCargoConfig = getNumber (_vehCfg >> "transportAmmo");
|
private _vanillaCargoConfig = getNumber (_vehCfg >> "transportAmmo");
|
||||||
private _rearmCargoConfig = getNumber (_vehCfg >> QGVAR(defaultSupply));
|
private _rearmCargoConfig = getNumber (_vehCfg >> QGVAR(defaultSupply));
|
||||||
|
@ -29,6 +29,7 @@ params [
|
|||||||
["_rearmCargo", 0, [0]],
|
["_rearmCargo", 0, [0]],
|
||||||
["_addToCurrent", false, [false]]
|
["_addToCurrent", false, [false]]
|
||||||
];
|
];
|
||||||
|
TRACE_3("makeSource",_source,_rearmCargo,_addToCurrent);
|
||||||
|
|
||||||
if (isNull _source) exitWith {};
|
if (isNull _source) exitWith {};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user