diff --git a/Server_Install_Pack/sc/battleye/scripts.txt b/Server_Install_Pack/sc/battleye/scripts.txt index 3b3f5d69..25d210a0 100644 --- a/Server_Install_Pack/sc/battleye/scripts.txt +++ b/Server_Install_Pack/sc/battleye/scripts.txt @@ -17,7 +17,7 @@ 5 allowDamage !="_unit allowDamage false;" !="_unit allowDamage true;" !="player allowDamage true;" !="vehicle player allowDamage true;" !="player allowDamage false;" !="_target allowDamage true;" !="_cargo allowDamage false;" 5 addWeaponCargo !="_acceptHolder addWeaponCargo [_wWeapon, 1] ;" !="CBA_fnc_addWeaponCargo" !="\\fnc_addWeaponCargo" !="\"addWeaponCargo" !="cba_fAddWeaponCargo" 5 onMapSingleClick !="onMapSingleClick '';" !="\"onmapsingleclick\"" -5 addMagazine !"addMagazineCargo" !="player addMagazine [_item, _magazineSizeMax];" !="player addMagazine [_item, floor (_magazineSize % _magazineSizeMax)];" !="player addMagazine[_x select 0, _x select 1];" !="player addMagazine \"sledge_swing\";" !="player addMagazine \"Hatchet_swing\";" !="player addMagazine \"stick_swing\";" !="_wh addMagazineAmmoCargo[_item, 1, _count];" !="CBA_fnc_addMagazine" !="\\fnc_addMagazine" !="\"addMagazine" !="vehicle player addMagazineTurret" !="player addMagazine [_magsTurret,_magAmmo]" !="vehicle player addMagazineTurret" !="player addMagazine [_magsTurret,_magAmmo]" !="EPOCH_fnc_addMagazineOverflow" +5 addMagazine !"addMagazineCargo" !="player addMagazine [_item,_count];" !="player addMagazine \"sledge_swing\";" !="player addMagazine \"Hatchet_swing\";" !="player addMagazine \"stick_swing\";" !="_wh addMagazineAmmoCargo[_item, 1, _count];" !="CBA_fnc_addMagazine" !="\\fnc_addMagazine" !="\"addMagazine" !="vehicle player addMagazineTurret" !="vehicle player addMagazineTurret" !="EPOCH_fnc_addMagazineOverflow" 5 addMagazineCargo !="_dogHolder addMagazineCargo [\"RabbitCarcass_EPOCH\", 1]" !="_dogHolder addMagazineCargo [\"Pelt_EPOCH\", 1]" !="_dogHolder addMagazineCargo [\"Venom_EPOCH\", 1]" !="_dogHolder addMagazineCargo [\"SnakeCarcass_EPOCH\", 1]" !="_dogHolder addMagazineCargo [\"ChickenCarcass_EPOCH\", 1]" !="_acceptHolder addMagazineCargo [_wAmmo, 1] ;" !="CBA_fnc_addMagazineCargo" !="\\fnc_addMagazineCargo" !="\"addMagazineCargo" !="cba_fAddMagazineCargo" 5 addItem !="{player addItemToVest _x} forEach _vestItems;" !="player addItem _item;" !="_plyr addItemToVest _missionItem;" !="axeVIP addItemToVest _item;" !="_plyr addItemToVest _missionItem;" !="EPOCH_fnc_addItemOverflow" !="CBA_fnc_addItem" !="\\fnc_addItem" !="\"addItem" !="fnc_addItemCargo" !="wH = _nearByHolder select 0;\n};\nif !(isNull _wh) then {\n_wh addItemCargoGlobal [_item,1];\n};\n};\n};\n\n_fnc_findItemInContainers = " !="player addItem 'ItemRope';" 5 addBackPack !="fnc_addBackpackCargo" diff --git a/Sources/epoch_code/compile/EPOCH_consumeItem.sqf b/Sources/epoch_code/compile/EPOCH_consumeItem.sqf index fa18bf93..0bba493e 100644 --- a/Sources/epoch_code/compile/EPOCH_consumeItem.sqf +++ b/Sources/epoch_code/compile/EPOCH_consumeItem.sqf @@ -82,10 +82,10 @@ switch _interactOption do { player removeMagazines _item; for "_i" from 1 to floor (_magazineSize / _magazineSizeMax) do { - player addMagazine [_item, _magazineSizeMax]; + [_item, _magazineSizeMax] call EPOCH_fnc_addMagazineOverflow; }; if ((_magazineSize % _magazineSizeMax) > 0) then { - player addMagazine [_item, floor (_magazineSize % _magazineSizeMax)]; + [_item, floor (_magazineSize % _magazineSizeMax)] call EPOCH_fnc_addMagazineOverflow; }; ["Ammo Repacked", 5] call Epoch_message; }; diff --git a/Sources/epoch_code/compile/inventory/EPOCH_usedItemRepack.sqf b/Sources/epoch_code/compile/inventory/EPOCH_usedItemRepack.sqf index b77f9396..7a4b2b08 100644 --- a/Sources/epoch_code/compile/inventory/EPOCH_usedItemRepack.sqf +++ b/Sources/epoch_code/compile/inventory/EPOCH_usedItemRepack.sqf @@ -59,7 +59,7 @@ if!(_chg isEqualTo 0)then{ _player removeMagazines _mag; { if ((_x select 1) > 0) then { // Do not add back an empty mag, as it can not be handled by any scripts and is useless - _player addMagazine _x; + _x call EPOCH_fnc_addMagazineOverflow; }; }forEach _itemMags; [format["You have used your %1", _displayName],5,[[0,0,0,0.2],[1,1,1,1]]] call Epoch_message_stack; diff --git a/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf b/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf index 52a03452..60dda9cc 100644 --- a/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf +++ b/Sources/epoch_code/compile/traders/EPOCH_startNpcTrade.sqf @@ -89,7 +89,7 @@ if (alive _this) then { _added = true; player removemagazines _item; { - player addmagazine _x; + _x call EPOCH_fnc_addMagazineOverflow; } foreach _itemMags; }; }; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_packJack.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_packJack.sqf index 24335df8..3da4cb96 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_packJack.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_packJack.sqf @@ -20,6 +20,5 @@ if (_player distance _unit > 20) exitWith{}; // TODO configize if (typeOf _unit == "Jack_SIM_EPOCH") then { deleteVehicle _unit; - // TODO handle overflow - _player addMagazine["JackKit", 1]; + ["JackKit", 1] call EPOCH_fnc_addMagazineOverflow; };