From 8315d8999b3ab1e6859b418f35a1f64fbf64b775 Mon Sep 17 00:00:00 2001 From: A Man Date: Mon, 11 May 2020 19:55:28 +0200 Subject: [PATCH] Remove DayZ Mod crafting and replace it with epoch crafting - All dayz mod recipe were moved to epoch crafting. - This disables the craft dialog in the diary too. - The player_craftitem got updated and can handle all dayz mod recipes now. - A few wooden recipes got updated with an need nails now. - player_craftitem shows all items that are needed for crafting now, no longer only one missing part. - Add a systemchat text for missing tools, so it can be checked later in the chat. --- .../Configs/CfgCrafting/CfgCrafting.hpp | 33 +----- .../CfgMagazines/Buildings/BearTrap.hpp | 18 +++ .../Consumables/PlasticWaterbottle.hpp | 20 +++- .../CfgMagazines/Consumables/WaterBottle.hpp | 18 +++ .../Configs/CfgMagazines/Items/Metal.hpp | 8 ++ .../Configs/CfgMagazines/Items/Misc.hpp | 4 +- .../Configs/CfgMagazines/Items/Planting.hpp | 7 -- .../Configs/CfgMagazines/Items/Textiles.hpp | 72 +++++++++++- .../CfgMagazines/Items/ToolCrafting.hpp | 42 ++++++- .../Configs/CfgMagazines/Items/Wood.hpp | 57 ++++++--- .../Configs/CfgMagazines/Medical/Medical.hpp | 41 ++++++- .../Configs/CfgPlayerStats/p_cover.hpp | 6 +- .../Configs/CfgWeapons/CfgWeapons.hpp | 56 +-------- .../Configs/CfgWeapons/Melee/BaseballBat.hpp | 26 +++++ SQF/dayz_code/Configs/RscDisplay/includes.hpp | 2 +- SQF/dayz_code/actions/player_craftItem.sqf | 108 ++++++++++++------ .../compile/dze_requiredItemsCheck.sqf | 9 +- SQF/dayz_code/init/compiles.sqf | 12 +- SQF/dayz_code/stringtable.xml | 63 +++++++--- 19 files changed, 419 insertions(+), 183 deletions(-) diff --git a/SQF/dayz_code/Configs/CfgCrafting/CfgCrafting.hpp b/SQF/dayz_code/Configs/CfgCrafting/CfgCrafting.hpp index 652466898..9f29e7f2d 100644 --- a/SQF/dayz_code/Configs/CfgCrafting/CfgCrafting.hpp +++ b/SQF/dayz_code/Configs/CfgCrafting/CfgCrafting.hpp @@ -1,34 +1,3 @@ class CfgCrafting { - class Recipe { - displayName = "Generic Recipe"; - input[] = {}; //Items consumed during crafting - output[] = {}; //Items created from crafting - required[] = {}; //Items needed for but not consumed during crafting - failChance = 0; - }; - //Completed - //Weapons - #include "Recipes\Weapons\NailedBaseballBat.hpp" - #include "Recipes\Weapons\BaseBallBatBarbed.hpp" - #include "Recipes\Weapons\Crossbow.hpp" - //Medical - #include "Recipes\Medical\Bandage.hpp" - #include "Recipes\Medical\sepsisBandage.hpp" - #include "Recipes\Medical\woodensplint.hpp" - #include "Recipes\Medical\HerbalDrink.hpp" - //ammo - //#include "Recipes\Ammo\WoodenArrow.hpp" - //other - #include "Recipes\Other\woodencrate.hpp" - #include "Recipes\Other\nails.hpp" - #include "Recipes\Other\BackPack.hpp" - //#include "Recipes\Other\woodenCraftTable.hpp" - //Traps - #include "Recipes\Traps\TrapBearTrapFlare.hpp" - #include "Recipes\Traps\TrapBearTrapSmoke.hpp" - #include "Recipes\Traps\TrapTripwireCans.hpp" - #include "Recipes\Traps\TrapTripwireFlare.hpp" - #include "Recipes\Traps\TrapTripwireGrenade.hpp" - #include "Recipes\Traps\TrapTripwireSmoke.hpp" -}; +}; \ No newline at end of file diff --git a/SQF/dayz_code/Configs/CfgMagazines/Buildings/BearTrap.hpp b/SQF/dayz_code/Configs/CfgMagazines/Buildings/BearTrap.hpp index 93bda971d..158487295 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Buildings/BearTrap.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Buildings/BearTrap.hpp @@ -19,6 +19,24 @@ class TrapBear : CA_Magazine consume[] = {"TrapBear"}; create = "BearTrap_DZ"; }; + class Crafting + { + text = $STR_ITEM_NAME_BEAR_TRAP_FLARE; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemToolbox"}; + output[] = {{"ItemTrapBearTrapFlare",1}}; + input[] = {{"equip_string",1},{"TrapBear",1},{"PartWoodPile",1},{"equip_duct_tape",1},{"HandRoadFlare",1}}; + }; + class Crafting1 + { + text = $STR_ITEM_NAME_BEAR_TRAP_SMOKE; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemToolbox"}; + output[] = {{"ItemTrapBearTrapSmoke",1}}; + input[] = {{"equip_string",1},{"TrapBear",1},{"PartWoodPile",1},{"equip_duct_tape",1},{"SmokeShell",1}}; + }; }; }; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Consumables/PlasticWaterbottle.hpp b/SQF/dayz_code/Configs/CfgMagazines/Consumables/PlasticWaterbottle.hpp index 845c1ea39..3418ea6b5 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Consumables/PlasticWaterbottle.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Consumables/PlasticWaterbottle.hpp @@ -93,7 +93,25 @@ class ItemPlasticWaterBottleBoiled : ItemWaterBottle infectionChance = 0; consumeOutput = "ItemPlasticWaterbottleUnfilled"; containerEmpty = "ItemPlasticWaterbottleUnfilled"; - }; + + class ItemActions + { + class Crafting + { + text = $STR_CRAFTING_HERBALDRINK; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {}; + output[] = {{"ItemPlasticWaterBottleHerbal",1}}; + input[] = {{"equip_herb_box",1},{"ItemPlasticWaterBottleBoiled",1}}; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + }; +}; class ItemPlasticWaterBottleHerbal : ItemWaterBottle { diff --git a/SQF/dayz_code/Configs/CfgMagazines/Consumables/WaterBottle.hpp b/SQF/dayz_code/Configs/CfgMagazines/Consumables/WaterBottle.hpp index 16f303a59..a79189bc1 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Consumables/WaterBottle.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Consumables/WaterBottle.hpp @@ -46,6 +46,24 @@ class ItemWaterBottleBoiled : ItemWaterBottle descriptionShort = $STR_ITEMWATERBOTTLEBOILED_CODE_DESC; infectionChance = 0; + + class ItemActions + { + class Crafting + { + text = $STR_CRAFTING_HERBALDRINK; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {}; + output[] = {{"ItemWaterBottleHerbal",1}}; + input[] = {{"equip_herb_box",1},{"ItemWaterBottleBoiled",1}}; + }; + class Empty + { + text = $STR_EQUIP_NAME_13_EMPTY; + script = "spawn player_emptyContainer"; + }; + }; }; class ItemWaterBottleHerbal : ItemWaterBottle diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Metal.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Metal.hpp index e1ed04b75..e0063d1cc 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Metal.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Metal.hpp @@ -17,6 +17,14 @@ class PartGeneric : CA_Magazine output[] = {{"ItemPole",1}}; input[] = {{"PartGeneric",2}}; }; + class Crafting1 { + text = $STR_CRAFTING_NAILS; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {"fire"}; + requiretools[] = {"ItemToolbox"}; + output[] = {{"equip_nails",4}}; + input[] = {{"PartGeneric",2}}; + }; }; }; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Misc.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Misc.hpp index abcc384bd..888fee73e 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Misc.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Misc.hpp @@ -102,8 +102,8 @@ class equip_pvc_box : CA_Magazine { count = 1; displayName = $STR_ITEM_NAME_equip_pvc_box; descriptionShort = $STR_ITEM_DESC_equip_pvc_box; - model = "\z\addons\dayz_communityassets\models\plastic_box.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\equip_plastic_box_ca.paa"; + model = "\z\addons\dayz_communityassets\models\plastic_box.p3d"; + picture = "\z\addons\dayz_communityassets\pictures\equip_plastic_box_ca.paa"; type = 256; }; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Planting.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Planting.hpp index 95ee6e30c..5091d9849 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Planting.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Planting.hpp @@ -3,7 +3,6 @@ class ItemFertilizer: CA_Magazine { count = 1; displayName = $STR_CRAFT_NAME_FERTILIZER; descriptionShort = $STR_CRAFT_DESC_FERTILIZER; - weight = 0.1; picture = "\z\addons\dayz_epoch_w\magazine\ui\m_fertilizer_ca.paa"; model = "\z\addons\dayz_epoch_w\magazine\dze_fertilizer.p3d"; type = 256; @@ -14,7 +13,6 @@ class ItemPumpkinSeed: CA_Magazine { count = 1; displayName = $STR_CRAFT_NAME_PUMPKIN_SEED; descriptionShort = $STR_CRAFT_DESC_PUMPKIN_SEED; - weight = 0.1; model = "\z\addons\dayz_epoch\models\doc_child1.p3d"; // TODO: model + icon picture = "\z\addons\dayz_epoch\pictures\equip_child1_ca.paa"; type = 256; @@ -36,7 +34,6 @@ class ItemPumpkinPlant: CA_Magazine { count = 1; displayName = $STR_CRAFT_NAME_PUMPKIN_PLANT; descriptionShort = $STR_CRAFT_DESC_PUMPKIN_PLANT; - weight = 0.1; model = "\z\addons\dayz_epoch\models\doc_child1.p3d"; // TODO: model + icon picture = "\z\addons\dayz_epoch\pictures\equip_child1_ca.paa"; type = 256; @@ -56,7 +53,6 @@ class ItemHempSeed: CA_Magazine { count = 1; displayName = $STR_CRAFT_NAME_HEMP_SEED; descriptionShort = $STR_CRAFT_DESC_HEMP_SEED; - weight = 0.1; model = "\z\addons\dayz_epoch\models\doc_child2.p3d"; // TODO: model + icon picture = "\z\addons\dayz_epoch\pictures\equip_child2_ca.paa"; type = 256; @@ -78,7 +74,6 @@ class ItemHempPlant: CA_Magazine { count = 1; displayName = $STR_CRAFT_NAME_HEMP_PLANT; descriptionShort = $STR_CRAFT_DESC_HEMP_PLANT; - weight = 0.1; model = "\z\addons\dayz_epoch\models\doc_child2.p3d"; // TODO: model + icon picture = "\z\addons\dayz_epoch\pictures\equip_child2_ca.paa"; type = 256; @@ -99,7 +94,6 @@ class ItemKiloHemp : CA_Magazine count = 1; displayName = $STR_EPOCH_KILOOFHEMP; descriptionShort = $STR_EPOCH_KILOOFHEMP_DESC; - weight = 1; model = "z\addons\dayz_epoch\models\kilohemp.p3d"; picture = "\z\addons\dayz_epoch\pictures\equip_kilohemp_CA.paa"; type = 256; @@ -132,7 +126,6 @@ class ItemKiloTobacco : CA_Magazine count = 1; displayName = $STR_EPOCH_KILOTOBACCO; descriptionShort = $STR_EPOCH_KILOTOBACCO_DESC; - weight = 1; model = "z\addons\dayz_epoch\models\kilohemp.p3d"; picture = "\z\addons\dayz_epoch\pictures\equip_kilohemp_CA.paa"; type = 256; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Textiles.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Textiles.hpp index 0669c1e0e..a7b809f70 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Textiles.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Textiles.hpp @@ -7,6 +7,7 @@ class ItemCanvas: CA_Magazine model = "\z\addons\dayz_epoch\models\canvas.p3d"; picture = "\z\addons\dayz_epoch\pictures\equip_canvas_ca.paa"; descriptionShort = $STR_EPOCH_CANVAS_DESC; + class ItemActions { class Crafting @@ -56,6 +57,7 @@ class ItemCanvas: CA_Magazine }; }; }; + class ItemBurlap: CA_Magazine { scope = public; @@ -65,13 +67,14 @@ class ItemBurlap: CA_Magazine model = "\z\addons\dayz_epoch\models\burlap.p3d"; picture = "\z\addons\dayz_epoch\pictures\equip_burlap_ca.paa"; descriptionShort = $STR_EPOCH_BURLAP_DESC; + class ItemActions { class Crafting { text = $STR_EPOCH_PLAYER_195; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; - neednearby[] = {"sand"}; // todo add sand requirement + neednearby[] = {}; requiretools[] = {"ItemEtool","ItemToolbox"}; output[] = {{"ItemSandbag",1}}; input[] = {{"ItemBurlap",3}}; @@ -87,6 +90,20 @@ class equip_rag : CA_Magazine { model = "\z\addons\dayz_communityassets\models\rag_clean.p3d"; picture = "\z\addons\dayz_communityassets\pictures\equip_rag_clean_ca.paa"; type = 256; + + class ItemActions + { + class Crafting + { + text = $STR_EPOCH_PLAYER_269; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemKnife"}; + output[] = {{"ItemBandage",2}}; + outputweapons[] = {}; + input[] = {{"equip_gauze",2},{"equip_rag",1},{"equip_string",1}}; + }; + }; }; class equip_string : CA_Magazine { @@ -94,9 +111,59 @@ class equip_string : CA_Magazine { count = 1; displayName = $STR_ITEM_NAME_equip_string; descriptionShort = $STR_ITEM_DESC_equip_string; - model = "\z\addons\dayz_communityassets\models\string.p3d"; + model = "\z\addons\dayz_communityassets\models\string.p3d"; picture = "\z\addons\dayz_communityassets\pictures\equip_string_ca.paa"; type = 256; + + class ItemActions + { + class Crafting + { + text = $STR_EPOCH_PLAYER_269; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemKnife"}; + output[] = {{"ItemBandage",2}}; + outputweapons[] = {}; + input[] = {{"equip_gauze",2},{"equip_rag",1},{"equip_string",1}}; + }; + class Crafting1 + { + text = $STR_ITEM_NAME_TRIPWIRE_CANS; + script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemToolbox"}; + output[] = {{"ItemTrapTripwireCans",1}}; + input[] = {{"equip_string",1},{"TrashTinCan",1},{"PartWoodPile",1},{"equip_duct_tape",1}}; + }; + class Crafting2 + { + text = $STR_ITEM_NAME_TRIPWIRE_FLARE; + script = ";['Crafting2','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemToolbox"}; + output[] = {{"ItemTrapTripwireFlare",1}}; + input[] = {{"equip_string",1},{"HandRoadFlare",1},{"PartWoodPile",1},{"equip_duct_tape",1}}; + }; + class Crafting3 + { + text = $STR_ITEM_NAME_TRIPWIRE_GRENADE; + script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemToolbox"}; + output[] = {{"ItemTrapTripwireGrenade",1}}; + input[] = {{"equip_string",1},{"HandGrenade_West",1},{"PartWoodPile",1},{"equip_duct_tape",1}}; + }; + class Crafting4 + { + text = $STR_ITEM_NAME_TRIPWIRE_SMOKE; + script = ";['Crafting4','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemToolbox"}; + output[] = {{"ItemTrapTripwireSmoke",1}}; + input[] = {{"equip_string",1},{"SmokeShell",1},{"PartWoodPile",1},{"equip_duct_tape",1}}; + }; + }; }; class equip_rope : CA_Magazine { @@ -107,6 +174,7 @@ class equip_rope : CA_Magazine { model = "\z\addons\dayz_communityassets\models\rope.p3d"; picture = "\z\addons\dayz_communityassets\pictures\equip_rope_ca.paa"; type = 256; + class ItemActions { class Crafting diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/ToolCrafting.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/ToolCrafting.hpp index 282bc3aa3..aba4e82ce 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/ToolCrafting.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/ToolCrafting.hpp @@ -18,7 +18,7 @@ class ItemSledgeHead : CA_Magazine model = "\z\addons\dayz_epoch\models\sledge_head.p3d"; picture = "\z\addons\dayz_epoch\pictures\equip_sledge_head_ca.paa"; descriptionShort = $STR_EPOCH_SLEDGEHAMMERHEAD_DESC; - weight = 9; + class ItemActions { class Crafting @@ -43,7 +43,7 @@ class ItemSledgeHandle : CA_Magazine model = "\z\addons\dayz_epoch\models\sledge_handle.p3d"; picture = "\z\addons\dayz_epoch\pictures\equip_sledge_handle_ca.paa"; descriptionShort = $STR_EPOCH_SLEDGEHAMMERHANDLE_DESC; - weight = 1; + class ItemActions { class Crafting @@ -59,7 +59,8 @@ class ItemSledgeHandle : CA_Magazine }; }; -class equip_Crossbow_Kit : CA_Magazine { +class equip_Crossbow_Kit : CA_Magazine +{ scope = public; count = 1; displayName = $STR_ITEM_NAME_CROSSBOW_KIT; @@ -67,14 +68,43 @@ class equip_Crossbow_Kit : CA_Magazine { model = "\z\addons\community_crossbow\models\Crossbow_kit.p3d"; picture = "\z\addons\community_crossbow\textures\Crossbow_kit.paa"; type = 256; + + class ItemActions + { + class Crafting + { + text = $STR_CRAFTING_CROSSBOW; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {"workshop"}; + requiretools[] = {"ItemToolbox","ItemKnife"}; + output[] = {}; + outputweapons[] = {"Crossbow_DZ"}; + input[] = {{"equip_Crossbow_Kit",1},{"equip_crossbow_stock",1}}; + }; + }; }; -class equip_crossbow_stock : CA_Magazine { +class equip_crossbow_stock : CA_Magazine +{ scope = public; count = 1; - displayName = "Crossbow (Stock)"; - descriptionShort="You require a Crossbow String kit to craft this weapon"; + displayName = $STR_ITEM_NAME_CROSSBOW_STOCK; + descriptionShort = $STR_ITEM_DESC_CROSSBOW_STOCK; model = "z\addons\community_crossbow\models\crossbow_stock.p3d"; picture = "\z\addons\community_crossbow\icons\crossbow_stock.paa"; type = 256; + + class ItemActions + { + class Crafting + { + text = $STR_CRAFTING_CROSSBOW; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {"workshop"}; + requiretools[] = {"ItemToolbox","ItemKnife"}; + output[] = {}; + outputweapons[] = {"Crossbow_DZ"}; + input[] = {{"equip_Crossbow_Kit",1},{"equip_crossbow_stock",1}}; + }; + }; }; \ No newline at end of file diff --git a/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp b/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp index 33aa7afdd..ba00ffe7b 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Items/Wood.hpp @@ -58,6 +58,15 @@ class ItemPlank : CA_Magazine output[] = {{"PartWoodPile",2}}; input[] = {{"ItemPlank",1}}; }; + class Crafting1 + { + text = $STR_CRAFTING_SPLINT; + Script = ";['Crafting1','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemKnife"}; + output[] = {{"equip_woodensplint",1}}; + input[] = {{"ItemPlank",1},{"equip_duct_tape",1},{"equip_string",1}}; + }; }; }; @@ -82,7 +91,7 @@ class PartWoodPile : CA_Magazine { text = $STR_EPOCH_PLAYER_242; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; - neednearby[] = {"sawmill"}; + neednearby[] = {}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"PartWoodLumber",1}}; input[] = {{"PartWoodPile",2}}; @@ -107,6 +116,15 @@ class PartWoodPile : CA_Magazine input[] = {{"PartWoodPile",6}}; }; + class Crafting3 + { + text = $STR_CRAFTING_SPLINT; + Script = ";['Crafting3','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemKnife"}; + output[] = {{"equip_woodensplint",1}}; + input[] = {{"PartWoodPile",1},{"equip_duct_tape",1},{"equip_string",1}}; + }; }; }; @@ -126,7 +144,7 @@ class PartPlankPack: CA_Magazine { text = $STR_EPOCH_PLAYER_251; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; - neednearby[] = {"sawmill"}; + neednearby[] = {}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"PartWoodLumber",3}}; input[] = {{"PartPlankPack",1}}; @@ -150,7 +168,7 @@ class PartPlywoodPack: CA_Magazine { text = $STR_EPOCH_PLAYER_251; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; - neednearby[] = {"sawmill"}; + neednearby[] = {}; requiretools[] = {"ItemToolbox","ItemKnife"}; output[] = {{"PartWoodPlywood",3}}; input[] = {{"PartPlywoodPack",1}}; @@ -173,7 +191,7 @@ class PartWoodLumber: CA_Magazine { text = $STR_EPOCH_PLAYER_254; script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; - neednearby[] = {"sawmill"}; + neednearby[] = {}; requiretools[] = {"ItemToolbox"}; output[] = {{"PartWoodPlywood",1}}; input[] = {{"PartWoodLumber",2}}; @@ -196,7 +214,7 @@ class PartWoodLumber: CA_Magazine neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox","ItemCrowbar"}; output[] = {{"deer_stand_kit",1}}; - input[] = {{"PartWoodLumber",8},{"PartWoodPile",2}}; + input[] = {{"PartWoodLumber",8},{"PartWoodPile",2},{"equip_nails",2}}; }; class Crafting3 @@ -206,7 +224,7 @@ class PartWoodLumber: CA_Magazine neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {{"ItemWoodStairs",1}}; - input[] = {{"PartWoodLumber",8}}; + input[] = {{"PartWoodLumber",8},{"equip_nails",2}}; }; class Crafting4 @@ -216,14 +234,14 @@ class PartWoodLumber: CA_Magazine neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {{"ItemWoodLadder",1}}; - input[] = {{"PartWoodLumber",8}}; + input[] = {{"PartWoodLumber",8},{"equip_nails",2}}; }; class Crafting5 { text = $STR_EPOCH_PLAYER_259; Script = ";['Crafting5','CfgMagazines', _id] spawn player_craftItem;"; - neednearby[] = {"sawmill"}; + neednearby[] = {}; requiretools[] = {"ItemToolbox"}; output[] = {{"PartPlankPack",1}}; input[] = {{"PartWoodLumber",3}}; @@ -235,16 +253,16 @@ class PartWoodLumber: CA_Magazine neednearby[] = {"workshop"}; requiretools[] = {"ItemToolbox"}; output[] = {{"ItemGunRackKit",1}}; - input[] = {{"PartWoodLumber",6}}; + input[] = {{"PartWoodPlywood",1},{"PartWoodLumber",4},{"equip_nails",1}}; }; class Crafting7 { - text = $STR_EPOCH_PLAYER_304; + text = $STR_CRAFTING_SPLINT; Script = ";['Crafting7','CfgMagazines', _id] spawn player_craftItem;"; neednearby[] = {}; - requiretools[] = {"ItemToolbox"}; - output[] = {{"ItemWoodCrateKit",1}}; - input[] = {{"PartWoodLumber",6}}; + requiretools[] = {"ItemKnife"}; + output[] = {{"equip_woodensplint",1}}; + input[] = {{"PartWoodLumber",1},{"equip_duct_tape",1},{"equip_string",1}}; }; }; }; @@ -276,7 +294,7 @@ class PartWoodPlywood: CA_Magazine neednearby[] = {}; requiretools[] = {"ItemToolbox"}; output[] = {{"wood_shack_kit",1}}; - input[] = {{"PartWoodPlywood",4},{"PartWoodLumber",4}}; + input[] = {{"PartWoodPlywood",4},{"PartWoodLumber",4},{"equip_nails",2}}; }; class Crafting2 { @@ -300,11 +318,20 @@ class PartWoodPlywood: CA_Magazine { text = $STR_EPOCH_PLAYER_264; Script = ";['Crafting4','CfgMagazines', _id] spawn player_craftItem;"; - neednearby[] = {"sawmill"}; + neednearby[] = {}; requiretools[] = {"ItemToolbox"}; output[] = {{"PartPlywoodPack",1}}; input[] = {{"PartWoodPlywood",3}}; }; + class Crafting5 + { + text = $STR_EPOCH_PLAYER_304; + Script = ";['Crafting5','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemToolbox"}; + output[] = {{"ItemWoodCrateKit",1}}; + input[] = {{"PartWoodPlywood",4},{"PartWoodLumber",2},{"equip_nails",1}}; + }; }; }; diff --git a/SQF/dayz_code/Configs/CfgMagazines/Medical/Medical.hpp b/SQF/dayz_code/Configs/CfgMagazines/Medical/Medical.hpp index f2325a546..e5a411a8f 100644 --- a/SQF/dayz_code/Configs/CfgMagazines/Medical/Medical.hpp +++ b/SQF/dayz_code/Configs/CfgMagazines/Medical/Medical.hpp @@ -41,6 +41,16 @@ class ItemBandage : CA_Magazine text = $STR_BANDAGE_SELF; script = "spawn player_useMeds;"; }; + class Crafting + { + text = $STR_CRAFTING_SEPSISBANDAGE; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {}; + output[] = {{"ItemSepsisBandage",1}}; + outputweapons[] = {}; + input[] = {{"ItemBandage",1},{"equip_comfreyleafs",1}}; + }; }; }; @@ -127,6 +137,7 @@ class equip_woodensplint : CA_Magazine { model = "\z\addons\dayz_communityassets\models\woodensplint.p3d"; picture = "\z\addons\dayz_communityassets\pictures\equip_woodensplint_ca.paa"; type = 256; + class ItemActions { class Use { text = $STR_ACTIONS_BRACE_LEG; @@ -143,6 +154,20 @@ class equip_gauze : CA_Magazine { model = "\z\addons\dayz_communityassets\models\gauze.p3d"; picture = "\z\addons\dayz_communityassets\pictures\equip_gauze_ca.paa"; type = 256; + + class ItemActions + { + class Crafting + { + text = $STR_EPOCH_PLAYER_269; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemKnife"}; + output[] = {{"ItemBandage",2}}; + outputweapons[] = {}; + input[] = {{"equip_gauze",2},{"equip_rag",1},{"equip_string",1}}; + }; + }; }; class equip_gauzepackaged : CA_Magazine { @@ -153,6 +178,20 @@ class equip_gauzepackaged : CA_Magazine { model = "\z\addons\dayz_communityassets\models\gauze_package.p3d"; picture = "\z\addons\dayz_communityassets\pictures\equip_gauze_package_ca.paa"; type = 256; + + class ItemActions + { + class Crafting + { + text = $STR_CRAFTING_PACKAGEGAUZE; + script = ";['Crafting','CfgMagazines', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {}; + output[] = {{"equip_gauze",3}}; + outputweapons[] = {}; + input[] = {{"equip_gauzepackaged",1}}; + }; + }; }; class equip_herb_box : CA_Magazine { @@ -161,5 +200,5 @@ class equip_herb_box : CA_Magazine { displayName = $STR_EQUIP_NAME_HERBBOX; descriptionShort = $STR_EQUIP_DESC_HERBBOX; model = "\z\addons\dayz_communityassets\models\herb_box.p3d"; - picture = "\z\addons\dayz_communityassets\pictures\equip_herb_box_ca.paa"; + picture = "\z\addons\dayz_communityassets\pictures\equip_herb_box_ca.paa"; }; \ No newline at end of file diff --git a/SQF/dayz_code/Configs/CfgPlayerStats/p_cover.hpp b/SQF/dayz_code/Configs/CfgPlayerStats/p_cover.hpp index a206b423f..81ecb8065 100644 --- a/SQF/dayz_code/Configs/CfgPlayerStats/p_cover.hpp +++ b/SQF/dayz_code/Configs/CfgPlayerStats/p_cover.hpp @@ -18,7 +18,7 @@ class horde_journal_front_cover controls[] = { "book_page_image", - "open_craft", + //"open_craft", "open_book", "click_here_to_close_book_1", "click_here_to_close_book_2", @@ -40,7 +40,7 @@ class horde_journal_front_cover }; // buttons - + /* class open_craft: RscIGUIShortcutButton { idc = -1; x = 0.48 * safezoneW + safezoneX; @@ -48,7 +48,7 @@ class horde_journal_front_cover text = $STR_UI_CRAFT_OPEN; action = "closeDialog 0; createDialog 'RscDisplayCraftingMenu';"; }; - /* + class open_Construction: RscIGUIShortcutButton { idc = -1; x = 0.48 * safezoneW + safezoneX; diff --git a/SQF/dayz_code/Configs/CfgWeapons/CfgWeapons.hpp b/SQF/dayz_code/Configs/CfgWeapons/CfgWeapons.hpp index 4821b7856..dc87e05b0 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/CfgWeapons.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/CfgWeapons.hpp @@ -297,11 +297,7 @@ class CfgWeapons #include "Melee\Machete.hpp" #include "Melee\BaseballBat.hpp" #include "Melee\FishingPole.hpp" - #include "Melee\MeleeSledgehammer.hpp" - - - - + #include "Melee\MeleeSledgehammer.hpp" /* TOOLS */ @@ -340,54 +336,4 @@ class CfgWeapons #include "Item\ItemKeys.hpp" #include "Item\Documents.hpp" - - - - - /* OTHER */ - - /*class ItemFlashlightEmpty : ItemCore - { - scope = public; - displayName = $STR_EQUIP_NAME_5; - model = "\dayz_equip\models\flashlight.p3d"; - picture = "\dayz_equip\textures\equip_flashlight_ca.paa"; - descriptionShort = $STR_EQUIP_DESC_5; - }; - - class ItemSodaEmpty : HandGrenade - { - scope = public; - displayName = $STR_EQUIP_NAME_35; - model = "\dayz_equip\models\soda_coke_e.p3d"; - picture = "\dayz_equip\textures\equip_soda_empty_ca.paa"; - descriptionShort = $STR_EQUIP_DESC_35; - ammo = "SodaCan"; - class ItemActions - { - class Drink - { - text = $STR_ACTIONS_DRINK2; - script = ";[_id] spawn player_fillWater;"; - }; - }; - }; - - class TrashTinCan : HandGrenade - { - scope = public; - displayName = $STR_EQUIP_NAME_33; - model = "\dayz_equip\models\trash_tincan.p3d"; - picture = "\dayz_equip\textures\equip_tincan_ca.paa"; - descriptionShort = $STR_EQUIP_DESC_33; - ammo = "TinCan"; - class ItemActions - { - class Drink - { - text = $STR_ACTIONS_DRINK2; - script = ";[_id] spawn player_fillWater;"; - }; - }; - };*/ }; \ No newline at end of file diff --git a/SQF/dayz_code/Configs/CfgWeapons/Melee/BaseballBat.hpp b/SQF/dayz_code/Configs/CfgWeapons/Melee/BaseballBat.hpp index 52c2dde53..d953b5f32 100644 --- a/SQF/dayz_code/Configs/CfgWeapons/Melee/BaseballBat.hpp +++ b/SQF/dayz_code/Configs/CfgWeapons/Melee/BaseballBat.hpp @@ -15,6 +15,32 @@ class MeleeBaseBallBat : MeleeWeapon { libTextDesc = $STR_EQUIP_DESC_BASEBALLBAT; }; + + class ItemActions + { + class Crafting + { + text = $STR_CRAFTING_NAILEDBASEBALLBAT; + script = ";['Crafting','CfgWeapons', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemToolbox"}; + output[] = {}; + outputweapons[] = {"MeleeBaseBallBatNails"}; + input[] = {{"equip_nails",1}}; + inputweapons[] = {"MeleeBaseBallBat"}; + }; + class Crafting1 + { + text = $STR_CRAFTING_BASEBALLBATBARBED; + script = ";['Crafting1','CfgWeapons', _id] spawn player_craftItem;"; + neednearby[] = {}; + requiretools[] = {"ItemToolbox"}; + output[] = {}; + outputweapons[] = {"MeleeBaseBallBatBarbed"}; + input[] = {{"equip_nails",1},{"ItemWire",1}}; + inputweapons[] = {"MeleeBaseBallBat"}; + }; + }; }; class MeleeBaseBallBatBarbed : MeleeWeapon diff --git a/SQF/dayz_code/Configs/RscDisplay/includes.hpp b/SQF/dayz_code/Configs/RscDisplay/includes.hpp index 875c6df77..57fde7ce3 100644 --- a/SQF/dayz_code/Configs/RscDisplay/includes.hpp +++ b/SQF/dayz_code/Configs/RscDisplay/includes.hpp @@ -1,5 +1,5 @@ #include "RscGroups.hpp" -#include "RscDisplayCraftingMenu.hpp" +//#include "RscDisplayCraftingMenu.hpp" #include "RscDisplayGear.hpp" #include "RscDisplayGearMinimal.hpp" #include "RscDisplayGenderSelect.hpp" diff --git a/SQF/dayz_code/actions/player_craftItem.sqf b/SQF/dayz_code/actions/player_craftItem.sqf index 16ca71337..5bfded755 100644 --- a/SQF/dayz_code/actions/player_craftItem.sqf +++ b/SQF/dayz_code/actions/player_craftItem.sqf @@ -1,6 +1,3 @@ -// If a string was passed redirect to vanilla player_craftItem (Epoch items always pass an array) -if (typeName _this == "STRING") exitWith {_this spawn player_craftItemVanilla;}; - /* DayZ Epoch Crafting 0.3 Made for DayZ Epoch && Unleashed by [VB]AWOL please ask permission to use/edit/distrubute email vbawol@veteranbastards.com. @@ -26,16 +23,13 @@ class ItemActions if (dayz_actionInProgress) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; dayz_actionInProgress = true; -private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_boiled","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_finished","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx","_configParent","_pPos"]; +private ["_tradeComplete","_onLadder","_canDo","_selectedRecipeOutput","_boiled","_proceed","_itemIn","_countIn","_missing","_missingQty","_qty","_itemOut","_countOut","_finished","_removed","_tobe_removed_total","_textCreate","_textMissing","_selectedRecipeInput","_selectedRecipeInputStrict","_num_removed","_removed_total","_temp_removed_array","_abort","_waterLevel","_waterLevel_lowest","_reason","_isNear","_selectedRecipeTools","_distance","_crafting","_needNear","_item","_baseClass","_num_removed_weapons","_outputWeapons","_inputWeapons","_randomOutput","_craft_doLoop","_selectedWeapon","_selectedMag","_sfx","_configParent","_pPos","_text"]; // This is used to find correct recipe based what itemaction was click allows multiple recipes per item. _crafting = _this select 0; - // This tells the script what type of item we are clicking on _baseClass = _this select 1; - _item = _this select 2; - _abort = false; _distance = 3; _reason = ""; @@ -43,7 +37,7 @@ _waterLevel = 0; _outputWeapons = []; _selectedRecipeOutput = []; _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; -_canDo = (!r_drag_sqf && !r_player_unconscious && !_onLadder); +_canDo = (!r_player_unconscious && {!r_drag_sqf} && {!_onLadder}); _boiled = false; // Need Near Requirements @@ -68,13 +62,11 @@ if (_abort) exitWith { dayz_actionInProgress = false; }; -// diag_log format["Checking for fire: %1", _isFireNear]; - if (_canDo) then { _selectedRecipeTools = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "requiretools"); _selectedRecipeOutput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "output"); _selectedRecipeInput = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "input"); - _selectedRecipeInputStrict = ((isNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict")) && (getNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict") > 0)); + _selectedRecipeInputStrict = ((isNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict")) && {getNumber (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputstrict") > 0}); _outputWeapons = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "outputweapons"); _inputWeapons = getArray (configFile >> _baseClass >> _item >> "ItemActions" >> _crafting >> "inputweapons"); @@ -102,9 +94,27 @@ if (_canDo) then { _itemIn = _x select 0; _countIn = _x select 1; - _qty = { (_x == _itemIn) || (!_selectedRecipeInputStrict && configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn)} count magazines player; - if (_qty < _countIn) exitWith { _missing = _itemIn; _missingQty = (_countIn - _qty); _proceed = false; }; - } forEach _selectedRecipeInput; + _qty = { (_x == _itemIn) || (!_selectedRecipeInputStrict && {configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)) == _itemIn})} count magazines player; + if (_qty < _countIn) exitWith { + _missing = _itemIn; + _missingQty = (_countIn - _qty); + _proceed = false; + }; + } count _selectedRecipeInput; + }; + + if (count _inputWeapons > 0 && {_proceed}) then { + { + _itemIn = _x; + _countIn = 1; + _qty = { (_x == _itemIn) || (!_selectedRecipeInputStrict && {configName(inheritsFrom(configFile >> "cfgWeapons" >> _x)) == _itemIn})} count weapons player; + + if (_qty < _countIn) exitWith { + _missing = _itemIn; + _missingQty = (_countIn - _qty); + _proceed = false; + }; + } count _inputWeapons; }; // If all parts proceed @@ -131,7 +141,7 @@ if (_canDo) then { // Preselect the item { _configParent = configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)); - if ((_x == _itemIn) || (!_selectedRecipeInputStrict && _configParent == _itemIn)) then { + if ((_x == _itemIn) || (!_selectedRecipeInputStrict && {_configParent == _itemIn})) then { // Get lowest waterlevel if ((_x == "ItemWaterbottle") || (_configParent == "ItemWaterbottle")) then { _waterLevel = getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz"); @@ -140,15 +150,14 @@ if (_canDo) then { }; }; }; - } forEach (magazines player); + } count (magazines player); { _configParent = configName(inheritsFrom(configFile >> "cfgMagazines" >> _x)); - if ((_removed < _countIn) && ((_x == _itemIn) || (!_selectedRecipeInputStrict && _configParent == _itemIn))) then { - if ((_waterLevel_lowest == 0) || ((_waterLevel_lowest > 0) && (getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz") == _waterLevel_lowest))) then { + if ((_removed < _countIn) && {(_x == _itemIn) || (!_selectedRecipeInputStrict && {_configParent == _itemIn})}) then { + if ((_waterLevel_lowest == 0) || ((_waterLevel_lowest > 0) && {getNumber(configFile >> "CfgMagazines" >> _x >> "wateroz") == _waterLevel_lowest})) then { _num_removed = ([player,_x] call BIS_fnc_invRemove); - } - else { + } else { _num_removed = 0; }; _removed = _removed + _num_removed; @@ -164,9 +173,8 @@ if (_canDo) then { _temp_removed_array set [count _temp_removed_array,_x]; }; }; - } forEach (magazines player); - - } forEach _selectedRecipeInput; + } foreach (magazines player); + } count _selectedRecipeInput; //diag_log format["removed: %1 of: %2", _removed, _tobe_removed_total]; @@ -175,27 +183,33 @@ if (_canDo) then { _num_removed_weapons = 0; { _num_removed_weapons = _num_removed_weapons + ([player,_x] call BIS_fnc_invRemove); - } forEach _inputWeapons; + } count _inputWeapons; if (_num_removed_weapons == (count _inputWeapons)) then { if (_randomOutput == 1) then { - if (!isNil "_outputWeapons" && count _outputWeapons > 0) then { + if (!isNil "_outputWeapons" && {count _outputWeapons > 0}) then { _selectedWeapon = _outputWeapons call BIS_fnc_selectRandom; _outputWeapons = [_selectedWeapon]; }; - if (!isNil "_selectedRecipeOutput" && count _selectedRecipeOutput > 0) then { + if (!isNil "_selectedRecipeOutput" && {count _selectedRecipeOutput > 0}) then { _selectedMag = _selectedRecipeOutput call BIS_fnc_selectRandom; _selectedRecipeOutput = [_selectedMag]; }; // exit loop _craft_doLoop = false; }; + { - if (_x == "ItemSledge") then { + if (_x in weapons player) then { _x call player_addDuplicateTool; } else { - player addWeapon _x; + if (getNumber(configFile >> "CfgWeapons" >> _x >> "type") == 256) then { + player addWeapon _x; + } else { + _x call player_addDuplicateTool; + }; }; - } forEach _outputWeapons; + } count _outputWeapons; + { _itemOut = _x select 0; _countOut = _x select 1; @@ -219,7 +233,7 @@ if (_canDo) then { }; }; }; - } foreach _temp_removed_array; + } count _temp_removed_array; }; // diag_log format["Checking for water level: %1", _waterLevel]; @@ -231,25 +245,45 @@ if (_canDo) then { format[localize "str_epoch_player_150",_textCreate,_countOut] call dayz_rollingMessages; // sleep here uiSleep 1; - } forEach _selectedRecipeOutput; + } count _selectedRecipeOutput; - _tradeComplete = _tradeComplete+1; + _tradeComplete = _tradeComplete + 1; }; - } else { // Refund parts since we failed - {player addMagazine _x; } forEach _temp_removed_array; + {player addMagazine _x; } count _temp_removed_array; format[localize "STR_EPOCH_PLAYER_145",_removed_total,_tobe_removed_total] call dayz_rollingMessages; }; - } else { localize "str_epoch_player_64" call dayz_rollingMessages; _craft_doLoop = false; }; - } else { - _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); + if (isClass (configFile >> "CfgMagazines" >> _missing)) then { + _textMissing = getText(configFile >> "CfgMagazines" >> _missing >> "displayName"); + } else { + if (isClass (configFile >> "CfgWeapons" >> _missing)) then { + _textMissing = getText(configFile >> "CfgWeapons" >> _missing >> "displayName"); + } else { + _textMissing = getText(configFile >> "CfgVehicles" >> _missing >> "displayName"); + }; + }; format[localize "str_epoch_player_152",_missingQty, _textMissing,_tradeComplete] call dayz_rollingMessages; + systemchat localize "STR_CRAFTING_NEEDED_ITEMS"; + + if (count _selectedRecipeInput > 0) then { + { + _text = getText(configFile >> "CfgMagazines" >> (_x select 0) >> "displayName"); + systemchat format ["%2x %1",_text,(_x select 1)]; + } count _selectedRecipeInput; + }; + if (count _inputWeapons > 0) then { + { + _text = getText(configFile >> "CfgWeapons" >> _x >> "displayName"); + systemchat format ["1x %1",_text]; + + } count _inputWeapons; + }; _craft_doLoop = false; }; } else { diff --git a/SQF/dayz_code/compile/dze_requiredItemsCheck.sqf b/SQF/dayz_code/compile/dze_requiredItemsCheck.sqf index e76e2c078..84ea34042 100644 --- a/SQF/dayz_code/compile/dze_requiredItemsCheck.sqf +++ b/SQF/dayz_code/compile/dze_requiredItemsCheck.sqf @@ -44,7 +44,7 @@ _missingText = ""; _missingText = _x; } else { if (_forEachIndex == ((count _missing) - 1)) then { - _missingText = _missingText + " and " + _x; + _missingText = _missingText + ", " + _x; } else { _missingText = _missingText + ", " + _x; }; @@ -53,7 +53,12 @@ _missingText = ""; _hasbuilditem = _item in magazines player; if (!_hasbuilditem && {_text != ""}) exitWith {dayz_actionInProgress = false; format[localize "str_player_31",_text,"build"] call dayz_rollingMessages; false;}; -if (!_hasrequireditem) exitWith {dayz_actionInProgress = false; format[localize "str_epoch_player_137",_missingText] call dayz_rollingMessages; false;}; +if (!_hasrequireditem) exitWith { + dayz_actionInProgress = false; + systemChat format[localize "str_epoch_player_137",_missingText]; + format[localize "str_epoch_player_137",_missingText] call dayz_rollingMessages; + false; +}; //When calling this function in another script use a silent exitWith, unless you have something special to say. i.e. if (!_hasrequireditem) exitWith{}; _hasrequireditem; diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index 9a09528e4..2927aad38 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -157,11 +157,11 @@ if (!isDedicated) then { player_spawn_2 = compile preprocessFileLineNumbers "\z\addons\dayz_code\system\player_spawn_2.sqf"; //Crafting - fn_updateCraftUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_updateCraftUI.sqf"; player_craftItem = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItem.sqf"; - player_craftItemVanilla = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItemVanilla.sqf"; - player_craftItemGUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItemGUI.sqf"; - player_checkRecipe = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_checkRecipe.sqf"; + //fn_updateCraftUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_updateCraftUI.sqf"; + //player_craftItemVanilla = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItemVanilla.sqf"; + //player_craftItemGUI = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_craftItemGUI.sqf"; + //player_checkRecipe = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\player_checkRecipe.sqf"; // EPOCH ADDITIONS dayz_autoRunOff = {dayz_autoRun = false; terminate dayz_autoRunThread; if (speed player > 0) then {player playActionNow "Stop"};}; @@ -515,9 +515,9 @@ if (!isDedicated) then { dz_fn_meleeMagazines = { if (_this) then { - { player addMagazine _x } count MeleeMagazines; + { player addMagazine _x } foreach MeleeMagazines; } else { - { player removeMagazines _x } count MeleeMagazines; + { player removeMagazines _x } foreach MeleeMagazines; }; }; diff --git a/SQF/dayz_code/stringtable.xml b/SQF/dayz_code/stringtable.xml index 47f5f871a..1d1bdbba3 100644 --- a/SQF/dayz_code/stringtable.xml +++ b/SQF/dayz_code/stringtable.xml @@ -4219,14 +4219,6 @@ Картонная коробка Kartonschachtel - - Compound Crossbow - Kompositarmbrust - Составной арбалет - Ballesta Compuesta - Arbalète composite - Kuše - The compound crossbow is, once the aim is mastered, a powerful short-range single-shot weapon with a long reload time. Die Kompositarmbrust ist, wenn man das Zielen beherrscht, eine starke und lautlose Waffe - allerdings mit kurzer Reichweite und langer Nachladezeit. @@ -25368,7 +25360,55 @@ Green Borders Grüne Umrandung - + + You cannot change clothes when you are being targeted by NPCs! + Du kannst deine Kleidung nicht wechseln, wenn du dich in einem Gefecht mit NPCs befindest! + + + Crossbow Stock + Armbrustschaft + + + You require a Crossbow String kit to craft this weapon. + Zum Herstellen einer Armbrust wird ein Armbrust-Selbstbau-Kit benötigt. + + + Craft Crossbow + Armbrust herstellen + + + Craft Nailed Baseball Bat + Nagelkeule herstellen + + + Craft Baseball Bat Barbed + Stacheldrahtkeule herstellen + + + Mix Herbal Drink + Kräutertrunk mixen + + + Craft Sepsis Bandage + Sepsisbandage herstellen + + + Unpack Gauze Packaged + Mullbindenpackung entpacken + + + Craft Wooden Splint + Holzschiene herstellen + + + Craft Nails + Nägel herstellen + + + Needed items: + Benötigte Gegenstände: + + Street Sign @@ -25387,9 +25427,6 @@ Maskovací oblečení vytvořeno speciálně pro použítí v lesních oblestech. Lze rozbalit a obléknout. Une tenue de camouflage spécialement étudiée pour se fondre dans la végétation. Peut être porté. Schwere Tarnkleidung, die dichtes Unterholz simuliert. Kann ausgepackt und getragen werden. - - - You cannot change clothes when you are being targeted by NPCs - +