mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Merge pull request #2283 from acemod/cargoCanInteract
Add canInteractWith checks for cargo
This commit is contained in:
commit
70c0edf436
@ -18,6 +18,8 @@
|
||||
|
||||
params ["_player", "_object"];
|
||||
|
||||
if (!([_player, _object, []] call EFUNC(common,canInteractWith))) exitWith {false};
|
||||
|
||||
private ["_nearestVehicle"];
|
||||
_nearestVehicle = [_player] call FUNC(findNearestVehicle);
|
||||
|
||||
|
@ -39,7 +39,10 @@ SETMVAR(GVAR(initializedClasses),_initializedClasses);
|
||||
if (getNumber (configFile >> "CfgVehicles" >> _type >> QGVAR(hasCargo)) != 1) exitWith {};
|
||||
|
||||
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);
|
||||
_statement = {GVAR(interactionVehicle) = _target; createDialog QGVAR(menu);};
|
||||
_icon = "";
|
||||
|
Loading…
Reference in New Issue
Block a user