diff --git a/Sources/epoch_code/compile/EPOCH_QuickTakeAll.sqf b/Sources/epoch_code/compile/EPOCH_QuickTakeAll.sqf index c942ca60..9b0e8ae5 100644 --- a/Sources/epoch_code/compile/EPOCH_QuickTakeAll.sqf +++ b/Sources/epoch_code/compile/EPOCH_QuickTakeAll.sqf @@ -17,23 +17,27 @@ private ["_items","_magazines","_weapons"]; //[[[end]]] closeDialog 0; { + if ((_x getvariable ["EPOCH_Loot",false]) || _x iskindof "container_epoch") then { + _nearplayers = (player nearEntities ["Man", 12]) select {alive _x && isplayer _x && !(_x == player)}; + if (count _nearplayers > 0) exitwith { + ["Take all not allowed near other Players",5] call Epoch_message; + }; + _magazines = magazinesAmmoCargo _x; + clearMagazineCargoGlobal _x; + { + [_x select 0,1] call EPOCH_fnc_addItemOverflow; + } foreach _magazines; - _magazines = magazinesAmmoCargo _x; - clearMagazineCargoGlobal _x; - { - [_x select 0,_x select 1] call EPOCH_fnc_addItemOverflow; - } foreach _magazines; + _items = itemCargo _x; + clearItemCargoGlobal _x; + { + _x call EPOCH_fnc_addItemOverflow; + } foreach _items; - _items = itemCargo _x; - clearItemCargoGlobal _x; - { - _x call EPOCH_fnc_addItemOverflow; - } foreach _items; - - _weapons = weaponCargo _x; - clearWeaponCargoGlobal _x; - { - _x call EPOCH_fnc_addItemOverflow; - } foreach _weapons; - -} foreach nearestObjects[player, ["container_epoch"], 5]; + _weapons = weaponCargo _x; + clearWeaponCargoGlobal _x; + { + _x call EPOCH_fnc_addItemOverflow; + } foreach _weapons; + }; +} foreach nearestObjects[player, ["container_epoch","weaponholdersimulated","GroundWeaponHolder"], 5]; diff --git a/Sources/epoch_code/compile/EPOCH_QuickTakeLoad.sqf b/Sources/epoch_code/compile/EPOCH_QuickTakeLoad.sqf index cc1bf3fd..3b7a579d 100644 --- a/Sources/epoch_code/compile/EPOCH_QuickTakeLoad.sqf +++ b/Sources/epoch_code/compile/EPOCH_QuickTakeLoad.sqf @@ -13,15 +13,30 @@ https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/EPOCH_QuickTakeLoad.sqf */ //[[[cog import generate_private_arrays ]]] -private ["_index","_magazines"]; +private ["_index"]; //[[[end]]] createDialog "QuickTake"; { - _magazines = magazinesAmmoCargo _x; - { - _index = lbAdd[1500, getText(configfile >> "CfgMagazines" >> (_x select 0) >> "DisplayName")]; - lbSetData[1500, _index, _x select 0]; - lbSetValue[1500, _index, _x select 1]; - lbSetPicture[1500, _index, _x select 0 call EPOCH_itemPicture]; - } foreach _magazines; -} foreach nearestObjects[player, ["container_epoch"], 5]; + if ((_x getvariable ["EPOCH_Loot",false]) || _x iskindof "container_epoch") then { + { + _index = lbAdd[1500, getText(configfile >> "CfgMagazines" >> (_x select 0) >> "DisplayName")]; + lbSetData[1500, _index, _x select 0]; + lbSetValue[1500, _index, _x select 1]; + lbSetPicture[1500, _index, _x select 0 call EPOCH_itemPicture]; + } foreach (magazinesAmmoCargo _x); + + { + _index = lbAdd[1500, getText(configfile >> "CfgWeapons" >> _x >> "DisplayName")]; + lbSetData[1500, _index, _x]; + lbSetValue[1500, _index, _x]; + lbSetPicture[1500, _index, _x call EPOCH_itemPicture]; + } foreach (itemcargo _x); + + { + _index = lbAdd[1500, getText(configfile >> "CfgWeapons" >> _x >> "DisplayName")]; + lbSetData[1500, _index, _x]; + lbSetValue[1500, _index, _x]; + lbSetPicture[1500, _index, _x call EPOCH_itemPicture]; + } foreach (weaponCargo _x); + }; +} foreach (nearestObjects[player, ["container_epoch","weaponholdersimulated","GroundWeaponHolder"], 5]); \ No newline at end of file diff --git a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp index 92810c2a..7e166618 100644 --- a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp +++ b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_self.hpp @@ -30,7 +30,7 @@ class veh_unLock class player_inspect { condition = "!dyna_inVehicle"; - action = "call EPOCH_lootTrash;"; + action = "if !(underwater player) then {call EPOCH_lootTrash}else {if !(((nearestobjects [player,['container_epoch','weaponholdersimulated','GroundWeaponHolder'],5]) select {(_x getvariable ['EPOCH_Loot',false]) || (_x iskindof 'container_epoch' && _x animationPhase 'open_lid' > 0.5)}) isequalto []) then {call EPOCH_QuickTakeLoad} else {call EPOCH_lootTrash}};"; icon = "x\addons\a3_epoch_code\Data\UI\buttons\player_inspect.paa"; tooltip = "Examine"; }; diff --git a/Sources/epoch_server/compile/epoch_looting/EPOCH_server_lootAnimal.sqf b/Sources/epoch_server/compile/epoch_looting/EPOCH_server_lootAnimal.sqf index 096d1e39..bc2c345e 100644 --- a/Sources/epoch_server/compile/epoch_looting/EPOCH_server_lootAnimal.sqf +++ b/Sources/epoch_server/compile/epoch_looting/EPOCH_server_lootAnimal.sqf @@ -27,6 +27,9 @@ if !(isNull _object) then { }; deleteVehicle _object; _item = createVehicle["groundWeaponHolder", [0,0,0], [], 0.0, "CAN_COLLIDE"]; + if (_objectClass isequalto "GreatWhite_F") then { + _item setvariable ["EPOCH_Loot",true,true]; + }; _item setPosATL _pos; _class = "SeaFood"; _config = configFile >> "CfgMainTable" >> _objectClass; diff --git a/Sources/epoch_server_settings/configs/CfgLootTable.h b/Sources/epoch_server_settings/configs/CfgLootTable.h index 901ccbba..05d36f9f 100644 --- a/Sources/epoch_server_settings/configs/CfgLootTable.h +++ b/Sources/epoch_server_settings/configs/CfgLootTable.h @@ -894,7 +894,7 @@ class CfgLootTable { items[] = { { { "MetalBars", "CfgLootTable" }, 9 }, - { { "ItemBriefcaseGold100oz", "magazine" }, 1 } + { { "ItemGoldBar", "magazine" }, 2 } }; }; class Epoch_Sapper_F