mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add canInteractWith checks for cargo
This commit is contained in:
parent
ca991712e8
commit
9c8e9732ed
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
params ["_player", "_object"];
|
params ["_player", "_object"];
|
||||||
|
|
||||||
|
if (!([_player, _object, []] call EFUNC(common,canInteractWith))) exitWith {false};
|
||||||
|
|
||||||
private ["_nearestVehicle"];
|
private ["_nearestVehicle"];
|
||||||
_nearestVehicle = [_player] call FUNC(findNearestVehicle);
|
_nearestVehicle = [_player] call FUNC(findNearestVehicle);
|
||||||
|
|
||||||
|
@ -39,7 +39,10 @@ SETMVAR(GVAR(initializedClasses),_initializedClasses);
|
|||||||
if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
|
if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
|
||||||
|
|
||||||
private ["_text", "_condition", "_statement", "_icon", "_action"];
|
private ["_text", "_condition", "_statement", "_icon", "_action"];
|
||||||
_condition = {GVAR(enable)};
|
_condition = {
|
||||||
|
params ["_target", "_player"];
|
||||||
|
GVAR(enable) && {[_player, _target, []] call EFUNC(common,canInteractWith)}
|
||||||
|
};
|
||||||
_text = localize LSTRING(openMenu);
|
_text = localize LSTRING(openMenu);
|
||||||
_statement = {GVAR(interactionVehicle) = _target; createDialog QGVAR(menu);};
|
_statement = {GVAR(interactionVehicle) = _target; createDialog QGVAR(menu);};
|
||||||
_icon = "";
|
_icon = "";
|
||||||
|
Loading…
Reference in New Issue
Block a user