mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add a way to block auto carry after unload on classes (#9013)
This commit is contained in:
parent
c633a199b4
commit
3872eb0647
@ -19,7 +19,7 @@ params ["_unloader", "_object"];
|
||||
TRACE_2("unloadCarryItem-start",_unloader,_object);
|
||||
|
||||
if !(["ace_dragging"] call EFUNC(common,isModLoaded)) exitWith {};
|
||||
if !(GVAR(carryAfterUnload)) exitWith {};
|
||||
if (!GVAR(carryAfterUnload) || {getNumber (configOf _object >> QGVAR(blockUnloadCarry)) > 0}) exitWith {};
|
||||
|
||||
// When unloading attached objects, this code will run before server has finished moving object to the safe position
|
||||
[{
|
||||
@ -36,5 +36,5 @@ if !(GVAR(carryAfterUnload)) exitWith {};
|
||||
};
|
||||
}, _this, 1.0, { // delay is based on how long it will take server event to trigger and take effect
|
||||
// not a hard error if this fails, could have just unloaded to other side of vehicle because of findSafePos
|
||||
TRACE_1("unloadCarryItem-failed to unload nearby player",_this);
|
||||
TRACE_1("unloadCarryItem-failed to unload nearby player",_this);
|
||||
}] call CBA_fnc_waitUntilAndExecute;
|
||||
|
@ -33,6 +33,7 @@ class CfgVehicles {
|
||||
ace_cargo_size = 4; // Cargo space the object takes
|
||||
ace_cargo_canLoad = 1; // Enables the object to be loaded (1-yes, 0-no)
|
||||
ace_cargo_noRename = 1; // Blocks renaming object (1-blocked, 0-allowed)
|
||||
ace_cargo_blockUnloadCarry = 1; // Blocks object from being automatically picked up by player on unload
|
||||
};
|
||||
};
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user