Update player_sharpen.sqf

Fixes extra knife being deleted if player already had a fully sharpened
knife on their toolbelt (duplicate weapon).

Vanilla commit:

https://github.com/DayZMod/DayZ/commit/0332fcbe711b657723704fc9a4d5fd8f66f52b77
This commit is contained in:
ebayShopper
2017-03-20 18:18:04 -04:00
parent d4eb7ac6e4
commit 8b3f28dc0c
5 changed files with 21 additions and 18 deletions
+9 -8
View File
@@ -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";