diff --git a/media/lua/client/TOC_Test.lua b/media/lua/client/TOC_Test.lua index 4da145c..1c3bfd6 100644 --- a/media/lua/client/TOC_Test.lua +++ b/media/lua/client/TOC_Test.lua @@ -71,13 +71,16 @@ function TestStuffToc() -- Even if there are some duplicates, this is just easier in the end since we're gonna get fairly easily part_name if limb == "Hand" then + mod_data.TOC.Limbs[part_name].cicatrization_base_time = 1700 + mod_data.TOC.Limbs[part_name].depends_on = {} mod_data.TOC.Prosthesis.AcceptedProsthesis[part_name] = accepted_prosthesis_hand - - - elseif limb == "LowerArm" then + mod_data.TOC.Limbs[part_name].cicatrization_base_time = 1800 + mod_data.TOC.Limbs[part_name].depends_on = {side .. "_Hand",} mod_data.TOC.Prosthesis.AcceptedProsthesis[part_name] = accepted_prosthesis_lowerarm elseif limb == "UpperArm" then + mod_data.TOC.Limbs[part_name].cicatrization_base_time = 2000 + mod_data.TOC.Limbs[part_name].depends_on = {side .. "_Hand", side .. "_LowerArm",} mod_data.TOC.Prosthesis.AcceptedProsthesis[part_name] = accepted_prosthesis_upperarm end @@ -93,9 +96,58 @@ function TestStuffToc() end + -- Setup traits + if player:HasTrait("Amputee_Hand") then + local amputation_clothing = player:getInventory():AddItem("TOC.Amputation_Left_Hand") + player:setWornItem(amputation_clothing:getBodyLocation(), amputation_clothing) + mod_data.TOC.Left_Hand.is_cut = true + mod_data.TOC.Left_Hand.is_operated = true + mod_data.TOC.Left_Hand.is_amputation_shown = true + mod_data.TOC.Left_Hand.is_cicatrized = true + elseif player:HasTrait("Amputee_LowerArm") then + local amputation_clothing = player:getInventory():AddItem("TOC.Amputation_Left_LowerArm") + player:setWornItem(amputation_clothing:getBodyLocation(), amputation_clothing) + mod_data.TOC.Left_LowerArm.is_cut = true + mod_data.TOC.Left_LowerArm.is_operated = true + mod_data.TOC.Left_LowerArm.is_amputation_shown = true + mod_data.TOC.Left_LowerArm.is_cicatrized = true + elseif player:HasTrait("Amputee_UpperArm") then + local amputation_clothing = player:getInventory():AddItem("TOC.Amputation_Left_UpperArm") + player:setWornItem(amputation_clothing:getBodyLocation(), amputation_clothing) + mod_data.TOC.Left_UpperArm.is_cut = true + mod_data.TOC.Left_UpperArm.is_operated = true + mod_data.TOC.Left_UpperArm.is_amputation_shown = true + mod_data.TOC.Left_UpperArm.is_cicatrized = true + end + end +function TheOnlyCure.DeclareTraits2() + local amp1 = TraitFactory.addTrait("Amputee_Hand", getText("UI_trait_Amputee_Hand"), -8, getText("UI_trait_Amputee_Hand_desc"), false, false) + amp1:addXPBoost(Perks.LeftHand, 4) + + local amp2 = TraitFactory.addTrait("Amputee_LowerArm", getText("UI_trait_Amputee_LowerArm"), -10, getText("UI_trait_Amputee_LowerArm_desc"), false, false) + amp2:addXPBoost(Perks.LeftHand, 4) + + local amp3 = TraitFactory.addTrait("Amputee_UpperArm", getText("UI_trait_Amputee_UpperArm"), -20, getText("UI_trait_Amputee_UpperArm_desc"), false, false) + amp3:addXPBoost(Perks.LeftHand, 4) + + TraitFactory.addTrait("Insensitive", getText("UI_trait_Insensitive"), 6, getText("UI_trait_Insensitivedesc"), false, false) + TraitFactory.setMutualExclusive("Amputee_Hand", "Amputee_LowerArm") + TraitFactory.setMutualExclusive("Amputee_Hand", "Amputee_UpperArm") + TraitFactory.setMutualExclusive("Amputee_LowerArm", "Amputee_UpperArm") +end + + + + + + + + + + function Test2Toc(part_name, prosthetic_name) -------- diff --git a/media/lua/shared/translate/EN/UI_EN.txt b/media/lua/shared/translate/EN/UI_EN.txt index 54baa93..7697212 100644 --- a/media/lua/shared/translate/EN/UI_EN.txt +++ b/media/lua/shared/translate/EN/UI_EN.txt @@ -8,12 +8,12 @@ UI_EN = { UI_prof_surgeon = "Surgeon", UI_profdesc_surgeon = "You are a surgeon! Start with all recipe of the mod the only cure.
You are also better to cut and operate.", - UI_trait_Amputee1 = "Amputee hand", - UI_trait_Amputee1desc = "Begin the game without a hand but also a metal hook.", - UI_trait_Amputee2 = "Amputee forearm", - UI_trait_Amputee2desc = "Begin the game without a forearm but also a metal hook.", - UI_trait_Amputee3 = "Amputee arm", - UI_trait_Amputee3desc = "Begin the game without an arm, good luck.", + UI_trait_Amputee_Hand = "Amputee hand", + UI_trait_Amputee_Hand_desc = "Begin the game without a hand but also a metal hook.", + UI_trait_Amputee_LowerArm = "Amputee forearm", + UI_trait_Amputee_LowerArm_desc = "Begin the game without a forearm but also a metal hook.", + UI_trait_Amputee_UpperArm = "Amputee arm", + UI_trait_Amputee_UpperArm_desc = "Begin the game without an arm, good luck.", UI_trait_Insensitive = "Insensitive to pain", UI_trait_Insensitivedesc = "Reduces maximum pain.", diff --git a/media/scripts/TOC_items.txt b/media/scripts/TOC_items.txt index 01c409b..6b3a03c 100644 --- a/media/scripts/TOC_items.txt +++ b/media/scripts/TOC_items.txt @@ -4,13 +4,13 @@ imports { Base } -/****************** Cloth that look like a cut arm ******************/ - item ArmRight_noHand +/****************** Clothing that look like a cut arm ******************/ + item Amputation_Right_Hand { Type = Clothing, DisplayName = Amputated right hand, - ClothingItem = ArmRight_noHand, + ClothingItem = Amputation_Right_Hand, BodyLocation = ArmRight, Weight = 0, @@ -23,12 +23,12 @@ imports Icon = genericAmputation, } - item ArmRight_noForearm + item Amputation_Right_LowerArm { Type = Clothing, DisplayName = Amputated right forearm, - ClothingItem = ArmRight_noForeArm, + ClothingItem = Amputation_Right_LowerArm, BodyLocation = ArmRight, Weight = 0, @@ -40,12 +40,12 @@ imports Icon = genericAmputation, } - item ArmRight_noArm + item Amputation_Right_UpperArm { Type = Clothing, DisplayName = Amputated entire right arm, - ClothingItem = ArmRight_noArm, + ClothingItem = Amputation_Right_UpperArm, BodyLocation = ArmRight, /*BloodLocation = UpperArms,*/ Weight = 0, @@ -56,12 +56,12 @@ imports Icon = genericAmputation, } - item ArmLeft_noHand + item Amputation_Left_Hand { Type = Clothing, DisplayName = Amputated left hand, - ClothingItem = ArmLeft_noHand, + ClothingItem = Amputation_Left_Hand, BodyLocation = ArmLeft, Weight = 0, @@ -74,12 +74,12 @@ imports Icon = genericAmputation, } - item ArmLeft_noForearm + item Amputation_Left_LowerArm { Type = Clothing, DisplayCategory = Amputation, DisplayName = Amputated left forearm, - ClothingItem = ArmLeft_noForeArm, + ClothingItem = Amputation_Left_LowerArm, BodyLocation = ArmLeft, Weight = 0, @@ -92,11 +92,11 @@ imports } - item ArmLeft_noArm + item Amputation_Left_UpperArm { Type = Clothing, DisplayName = Amputated entire left arm, - ClothingItem = ArmLeft_noArm, + ClothingItem = Amputation_Left_UpperArm, BodyLocation = ArmLeft, Weight = 0, @@ -145,13 +145,13 @@ imports /************************ Prothese cloth ************************/ /* TODO make these not clothing so we cant equip them but only install them via the menu or context menu*/ - item WoodenHook_right_noHand + item Prost_Right_Hand_WoodenHook { Weight = 1, Type = Clothing, DisplayCategory = Prosthesis, DisplayName = DisplayName_woodenHook, - ClothingItem = ArmRight_WoodenHook, + ClothingItem = Prost_Right_Hand_WoodenHook, BodyLocation = ArmRight_Prot, BloodLocation = Hands, Icon = woodenHook, @@ -159,13 +159,13 @@ imports WaterResistance = 15, } - item WoodenHook_left_noHand + item Prost_Left_Hand_WoodenHook { Weight = 1, Type = Clothing, DisplayCategory = Prosthesis, DisplayName = DisplayName_woodenHook, - ClothingItem = ArmLeft_WoodenHook, + ClothingItem = Prost_Left_Hand_WoodenHook, BodyLocation = ArmLeft_Prot, BloodLocation = Hands, Icon = woodenHook, @@ -173,13 +173,13 @@ imports WaterResistance = 15, } - item MetalHook_right_noHand + item Prost_Right_Hand_MetalHook { Weight = 0.5, Type = Clothing, DisplayCategory = Prosthesis, DisplayName = DisplayName_metalHook, - ClothingItem = ArmRight_MetalHook, + ClothingItem = Prost_Right_Hand_MetalHook, BodyLocation = ArmRight_Prot, BloodLocation = Hands, Icon = metalHook, @@ -187,13 +187,13 @@ imports WaterResistance = 13, } - item MetalHook_left_noHand + item Prost_Left_Hand_MetalHook { Weight = 0.5, Type = Clothing, DisplayCategory = Prosthesis, DisplayName = DisplayName_metalHook, - ClothingItem = ArmLeft_MetalHook, + ClothingItem = Prost_Left_Hand_MetalHook, BodyLocation = ArmLeft_Prot, BloodLocation = Hands, Icon = metalHook, @@ -201,13 +201,13 @@ imports WaterResistance = 13, } - item MetalHand_right_noHand + item Prost_Right_Hand_MetalHand { Weight = 0.3, Type = Clothing, DisplayCategory = Prosthesis, DisplayName = DisplayName_metalHand, - ClothingItem = ArmRight_MetalHamd, + ClothingItem = Prost_Right_Hand_MetalHand, BodyLocation = ArmRight_Prot, BloodLocation = Hands, Icon = metalHand, @@ -215,13 +215,13 @@ imports WaterResistance = 11, } - item MetalHand_left_noHand + item Prost_Left_Hand_MetalHand { Weight = 0.3, Type = Clothing, DisplayCategory = Prosthesis, DisplayName = DisplayName_metalHand, - ClothingItem = ArmLeft_MetalHand, + ClothingItem = Prost_Left_Hand_MetalHand, BodyLocation = ArmLeft_Prot, BloodLocation = Hands, Icon = metalHand, @@ -229,13 +229,13 @@ imports WaterResistance = 11, } - item WoodenHook_right_noForearm + item Prost_Right_LowerArm_WoodenHook { Weight = 2, Type = Clothing, DisplayCategory = Prosthesis, DisplayName = DisplayName_woodenHook, - ClothingItem = ArmRight_WoodenHook_fore, + ClothingItem = Prost_Right_LowerArm_WoodenHook, BodyLocation = ArmRight_Prot, BloodLocation = LowerArms;Hands, Icon = woodenHook, @@ -243,13 +243,13 @@ imports WaterResistance = 16, } - item WoodenHook_left_noForearm + item Prost_Left_LowerArm_WoodenHook { Weight = 2, Type = Clothing, DisplayCategory = Prosthesis, DisplayName = DisplayName_woodenHook, - ClothingItem = ArmLeft_WoodenHook_fore, + ClothingItem = Prost_Left_LowerArm_WoodenHook, BodyLocation = ArmLeft_Prot, BloodLocation = LowerArms;Hands, @@ -258,13 +258,13 @@ imports WaterResistance = 16, } - item MetalHook_right_noForearm + item Prost_Right_LowerArm_MetalHook { Weight = 1.5, Type = Clothing, DisplayCategory = Prosthesis, DisplayName = DisplayName_metalHook, - ClothingItem = ArmRight_MetalHook_fore, + ClothingItem = Prost_Right_LowerArm_MetalHook, BodyLocation = ArmRight_Prot, BloodLocation = LowerArms;Hands, Icon = metalHook, @@ -272,13 +272,13 @@ imports WaterResistance = 14, } - item MetalHook_left_noForearm + item Prost_Left_LowerArm_MetalHook { Weight = 1.5, Type = Clothing, DisplayCategory = Prosthesis, DisplayName = DisplayName_metalHook, - ClothingItem = ArmLeft_MetalHook_fore, + ClothingItem = Prost_Left_LowerArm_MetalHook, BodyLocation = ArmLeft_Prot, BloodLocation = LowerArms;Hands, @@ -287,13 +287,13 @@ imports WaterResistance = 14, } - item MetalHand_right_noForearm + item Prost_Right_LowerArm_MetalHand { Weight = 1.2, Type = Clothing, DisplayCategory = Prosthesis, DisplayName = DisplayName_metalHand, - ClothingItem = ArmRight_MetalHand_fore, + ClothingItem = Prost_Right_LowerArm_MetalHand, BodyLocation = ArmRight_Prot, BloodLocation = LowerArms;Hands, Icon = metalHand, @@ -301,13 +301,13 @@ imports WaterResistance = 12, } - item MetalHand_left_noForearm + item Prost_Left_LowerArm_MetalHand { Weight = 1.2, Type = Clothing, DisplayCategory = Prosthesis, DisplayName = DisplayName_metalHand, - ClothingItem = ArmLeft_MetalHand_fore, + ClothingItem = Prost_Left_LowerArm_MetalHand, BodyLocation = ArmLeft_Prot, BloodLocation = LowerArms;Hands, Icon = metalHand,