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:
ebayShopper
2017-03-20 18:18:04 -04:00
parent d4eb7ac6e4
commit 8b3f28dc0c
5 changed files with 21 additions and 18 deletions

View File

@@ -11,6 +11,7 @@
[FIXED] Removing a trap with no room in your gear will no longer delete the trap.
[FIXED] Player_forceSave is now called correctly when the abort menu is opened. It was previously using the wrong variable and time.
[FIXED] The unconscious wake up animation can no longer be skipped by using a bandage or other right click actions.
[FIXED] Sharpening a knife will no longer delete one if the player already had a fully sharpened knife on their toolbelt (duplicate weapon).
[NOTE] Fixes below are included in the mission file and server pbo as part of server package 1.0.6.1A (March 10th 2017)
[FIXED] Fixed food and drink going down 10x faster from melee and other "working" actions.

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";

View File

@@ -21,7 +21,7 @@ if (_this in items player) then {
_bag addWeaponCargoGlobal [_this,1];
} else {
[_this,2,1] call fn_dropItem;
systemChat format[localize "str_epoch_player_314",_this];
systemChat format[localize "str_actions_noroom",_this];
};
} else {
//Remove melee magazines (BIS_fnc_invAdd fix)
@@ -30,7 +30,7 @@ if (_this in items player) then {
if !([player,_this] call BIS_fnc_invAdd) then {
systemChat localize "str_epoch_player_107";
[_this,2,1] call fn_dropItem;
systemChat format[localize "str_epoch_player_314",_this];
systemChat format[localize "str_actions_noroom",_this];
};
true call dz_fn_meleeMagazines;
};

View File

@@ -40,6 +40,7 @@ switch (_this select 0) do {
//Drop dull knife or empty matchbox if player already has one. Prevents duplicate tool.
player removeWeapon _remaining;
[_remaining,2,1] call fn_dropItem;
format[localize "str_actions_noroom",_remaining] call dayz_rollingMessages;
};
player addWeapon _remaining;
};

View File

@@ -1402,6 +1402,14 @@
<French>Vous n&apos;avez plus de place. Tout est tombé sur le sol.</French>
<German>Du hast keinen Platz mehr und lässt alles auf den Boden fallen.</German>
</Key>
<Key ID="str_actions_noroom">
<English>%1 is already in your inventory. Dropping on the ground!</English>
<German>%1 ist bereits in deinem Inventar. Fallenlassen auf den Boden!</German>
<Russian>%1 уже в вашем инвентаре. Сброшено на землю!</Russian>
<Dutch>%1 is al in je inventaris. Het laten vallen op de grond!</Dutch>
<French>%1 est déjà dans votre inventaire. Déposer sur le terrain!</French>
<Czech>%1 je již ve vašem inventáři. Pád na zem!</Czech>
</Key>
<Key ID="str_siphon_hose">
<English>A hose would be needed to do this.</English>
<Russian>Для этого нужен шланг.</Russian>
@@ -13285,14 +13293,6 @@
<French>%1 est déjà dans votre inventaire. Ajout d'un sac à dos!</French>
<Czech>%1 je již ve vašem inventáři. Přidání do batoh!</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_314">
<English>%1 is already in your inventory. Dropping on the ground!</English>
<German>%1 ist bereits in deinem Inventar. Fallenlassen auf den Boden!</German>
<Russian>%1 уже в вашем инвентаре. Сброшено на землю!</Russian>
<Dutch>%1 is al in je inventaris. Het laten vallen op de grond!</Dutch>
<French>%1 est déjà dans votre inventaire. Déposer sur le terrain!</French>
<Czech>%1 je již ve vašem inventáři. Pád na zem!</Czech>
</Key>
<Key ID="STR_EPOCH_PLAYER_315">
<English>%1 is restricted.</English>
<German>%1 ist gesperrt.</German>