mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 10:56:29 +03:00
Update player_sharpen.sqf
Fixes extra knife being deleted if player already had a fully sharpened
knife on their toolbelt (duplicate weapon).
Vanilla commit:
0332fcbe71
This commit is contained in:
@@ -30,16 +30,17 @@ if (player hasWeapon _item) then {
|
||||
_displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName");
|
||||
|
||||
player removeMagazine _waterUsed;
|
||||
Player removeWeapon _item;
|
||||
player removeWeapon _item;
|
||||
|
||||
Player addWeapon _repair;
|
||||
if !(player hasWeapon _repair) then {
|
||||
player addWeapon _repair;
|
||||
} else {
|
||||
//Drop sharpened knife if player already has one. Prevents duplicate tool.
|
||||
[_repair,2,1] call fn_dropItem;
|
||||
format[localize "str_actions_noroom",_repair] call dayz_rollingMessages;
|
||||
};
|
||||
|
||||
if (_waterUsed in ["ItemWaterBottle","ItemWaterBottleInfected","ItemWaterBottleSafe","ItemWaterBottleBoiled","ItemWaterBottleHerbal"]) then {
|
||||
player addMagazine "ItemWaterBottleUnfilled";
|
||||
};
|
||||
if (_waterUsed in ["ItemCanteen","ItemCanteenInfected","ItemCanteenSafe","ItemCanteenBoiled","ItemCanteenHerbal"]) then {
|
||||
player addMagazine "ItemCanteenEmpty";
|
||||
};
|
||||
player addMagazine (getText(configFile >> "CfgMagazines" >> _waterUsed >> "containerEmpty"));
|
||||
|
||||
//Remove Later
|
||||
player removeMagazine "equip_brick";
|
||||
|
||||
Reference in New Issue
Block a user