mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Additional Check
This commit is contained in:
parent
1684b20933
commit
3cb8db20ec
@ -13,7 +13,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/event_handlers/EPOCH_InventoryOpened.sqf
|
||||
*/
|
||||
//[[[cog import generate_private_arrays ]]]
|
||||
private ["_blocked","_containerlocked","_seclocked"];
|
||||
private ["_stored","_savecontainer","_blocked","_containerlocked","_seclocked"];
|
||||
//[[[end]]]
|
||||
params ["_unit","_container","_sec"];
|
||||
setMousePosition[0.5, 0.5];
|
||||
@ -38,4 +38,31 @@ if (!_blocked && _containerlocked || _seclocked) then {
|
||||
ctrlActivate _ground;
|
||||
};
|
||||
};
|
||||
|
||||
_savecontainer = objnull;
|
||||
_vehSlot1 = _container getVariable["VEHICLE_SLOT", "ABORT"];
|
||||
_storageSlot1 = _container getVariable["STORAGE_SLOT", "ABORT"];
|
||||
_vehSlot2 = _sec getVariable["VEHICLE_SLOT", "ABORT"];
|
||||
_storageSlot2 = _sec getVariable["STORAGE_SLOT", "ABORT"];
|
||||
if (_vehSlot1 != "ABORT" || _storageSlot1 != "ABORT") then{
|
||||
_savecontainer = _container;
|
||||
}
|
||||
else {
|
||||
if (_vehSlot2 != "ABORT" || _storageSlot2 != "ABORT") then{
|
||||
_savecontainer = _sec;
|
||||
};
|
||||
};
|
||||
if (!isnull _savecontainer && !_blocked) then {
|
||||
_savecontainer spawn {
|
||||
waituntil {!isnull (findDisplay 602)};
|
||||
while {!isnull (findDisplay 602)} do {
|
||||
_stored = [itemcargo _this, magazinecargo _this, backpackcargo _this];
|
||||
waituntil {uisleep 0.5; !(_stored isequalto [itemcargo _this, magazinecargo _this, backpackcargo _this]) || isnull (findDisplay 602)};
|
||||
if !(_stored isequalto [itemcargo _this, magazinecargo _this, backpackcargo _this]) then {
|
||||
_this call EPOCH_interact;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_blocked
|
||||
|
Loading…
Reference in New Issue
Block a user