diff --git a/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp b/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp index 73a4cadcb..845c1ea39 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/DZE/PlasticWaterbottle.hpp @@ -33,13 +33,17 @@ class ItemPlasticWaterbottleDmg : CA_Magazine picture = "\dayz_epoch_c\icons\plasticwaterbottle\PETwaterbottleDamaged.paa"; displayName = $STR_EQUIP_NAME_WBPET_02; descriptionShort = $STR_EQUIP_DESC_WBPET_02; + sfx = "bandage"; class ItemActions { - class Repair - { - text = $STR_ACTIONS_FIX_W; - script = "spawn player_fixBottle;"; + class Crafting { + text = $STR_ACTIONS_FIX_W; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {}; + output[] = {{"ItemPlasticWaterbottleUnfilled",1}}; + input[] = {{"ItemPlasticWaterbottleDmg",1},{"equip_duct_tape",1}}; }; }; }; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/WaterBottle.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/WaterBottle.hpp index 3ec9d7782..7abbf1ec6 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/WaterBottle.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/WaterBottle.hpp @@ -33,13 +33,17 @@ class ItemWaterBottleDmg : CA_Magazine //We don't have a damaged canteen image/m picture = "\dayz_equip\textures\equip_waterbottle_empty_ca.paa"; displayName = $STR_ITEMWATERBOTTLEDMG_CODE_NAME; descriptionShort = $STR_ITEMWATERBOTTLEDMG_CODE_DESC; + sfx = "bandage"; class ItemActions { - class Repair - { + class Crafting { text = $STR_ACTIONS_FIX_W; - script = "spawn player_fixBottle;"; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {}; + output[] = {{"ItemWaterbottleUnfilled",1}}; + input[] = {{"ItemWaterBottleDmg",1},{"equip_duct_tape",1}}; }; }; }; \ No newline at end of file diff --git a/SQF/dayz_code/actions/player_fixBottle.sqf b/SQF/dayz_code/actions/player_fixBottle.sqf deleted file mode 100644 index 6deb22455..000000000 --- a/SQF/dayz_code/actions/player_fixBottle.sqf +++ /dev/null @@ -1,30 +0,0 @@ -if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; }; -dayz_actionInProgress = true; - -private ["_bottle","_tape","_fixedBottle","_finished"]; - -_bottle = _this; -_tape = "equip_duct_tape"; -_fixedBottle = ["ItemPlasticWaterbottleUnfilled", "ItemWaterBottleUnfilled"] select (_bottle == "ItemWaterbottleDmg"); - -call gear_ui_init; -closeDialog 0; - -// Check if the player has the tape -if (_tape in magazines player) then { - [player,"bandage",0,false] call dayz_zombieSpeak; - _finished = ["Medic",1] call fn_loopAction; - if (!_finished) exitWith {}; - - // Check again to make sure player didn't drop item - if (_tape in magazines player) then { - player removeMagazine _bottle; - player removeMagazine _tape; - player addMagazine _fixedBottle; - localize "str_fix_water_bottle" call dayz_rollingMessages; - }; -} else { //If the player doesn't have the tape - localize "str_fix_water_bottle_fail" call dayz_rollingMessages; -}; - -dayz_actionInProgress = false; \ No newline at end of file diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 022fde7f1..8d5ceb231 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -116,7 +116,6 @@ if (!isDedicated) then { call compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_switchWeapon.sqf"; //player_goFishing = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_goFishing.sqf"; player_gather = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_gather.sqf"; - player_fixBottle = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_fixBottle.sqf"; player_tearClothes = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_tearClothes.sqf"; //object_remove = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\remove.sqf"; player_fixHatchet = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_fixTools.sqf"; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index e04d01e61..7f86342c4 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -1311,22 +1311,6 @@ Vous avez bu quelque chose. Du hast etwas getrunken. - - You have successfully fixed a water bottle! - Вы успешно починили бутылку с водой! - Usted ha resuelto con éxito una botella de agua! - Úspěšně jste spravili láhev na vodu! - Vous avez bien réparé la bouteille d'eau! - Du hast die Wasserflasche erfolgreich repariert! - - - You think you need Duct Tape to fix the bottle. - Похоже, нужен скотч, чтобы починить бутылку. - Usted cree que necesita cinta para conductos para fijar la botella. - Ke spravení láhve bude zřejmě třeba lepící páska. - Vous pensez que vous avez besoin de ruban adhésif pour réparer la bouteille. - Du könntest Klebeband gebrauchen, um die Flasche zu reparieren. - Tear Clothes Kleidung zerreißen