mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Cargo - Add alternative unloading item from vehicle cargo (#8827)
Co-authored-by: johnb432 <58661205+johnb432@users.noreply.github.com> Co-authored-by: LinkIsGrim <salluci.lovi@gmail.com> Co-authored-by: Grim <69561145+LinkIsGrim@users.noreply.github.com>
This commit is contained in:
@ -25,6 +25,9 @@ if (GVAR(interactionParadrop)) then {
|
||||
(_display displayCtrl 12) ctrlSetText LLSTRING(paradropButton);
|
||||
};
|
||||
|
||||
// Disable deploy option if paradropping or in Zeus
|
||||
(_display displayCtrl 13) ctrlEnable (GVAR(enableDeploy) && !GVAR(interactionParadrop) && {isNull curatorCamera});
|
||||
|
||||
[{
|
||||
params ["_vehicle", "_pfhID"];
|
||||
|
||||
@ -33,7 +36,6 @@ if (GVAR(interactionParadrop)) then {
|
||||
private _display = uiNamespace getVariable QGVAR(menuDisplay);
|
||||
|
||||
if (isNil "_display") exitWith {
|
||||
GVAR(interactionVehicle) = nil;
|
||||
GVAR(interactionParadrop) = nil;
|
||||
|
||||
_pfhID call CBA_fnc_removePerFrameHandler;
|
||||
@ -41,18 +43,18 @@ if (GVAR(interactionParadrop)) then {
|
||||
|
||||
// Close menu if in invalid state
|
||||
if (
|
||||
!alive _vehicle ||
|
||||
!alive ACE_player ||
|
||||
{!alive _vehicle} ||
|
||||
{locked _vehicle >= 2} ||
|
||||
{!(_vehicle getVariable [QGVAR(hasCargo), true])} || // if the cargo menu could be opened, the vehicle has QGVAR(hasCargo) in its config or the variable is set using FUNC(setSpace)
|
||||
{
|
||||
isNull findDisplay 312 && // if in Zeus, ignore the following checks
|
||||
isNull curatorCamera && // if in Zeus, ignore the checks that follow
|
||||
{([ACE_player, _vehicle] call EFUNC(interaction,getInteractionDistance)) >= MAX_LOAD_DISTANCE} &&
|
||||
{(vehicle ACE_player) != _vehicle}
|
||||
}
|
||||
) exitWith {
|
||||
closeDialog 0;
|
||||
|
||||
GVAR(interactionVehicle) = nil;
|
||||
GVAR(interactionParadrop) = nil;
|
||||
|
||||
_pfhID call CBA_fnc_removePerFrameHandler;
|
||||
|
Reference in New Issue
Block a user