From 13010b7b2a39cd9e210a5b461ed51257c4e2c704 Mon Sep 17 00:00:00 2001 From: Pao Date: Wed, 18 Jan 2023 01:33:06 +0100 Subject: [PATCH] Changed all the names --- ...ft_noHand.xml => Amputation_Left_Hand.xml} | 4 +- ...reArm.xml => Amputation_Left_LowerArm.xml} | 4 +- ...noArm.xml => Amputation_Left_UpperArm.xml} | 4 +- ...t_noHand.xml => Amputation_Right_Hand.xml} | 5 +- ...eArm.xml => Amputation_Right_LowerArm.xml} | 4 +- ...oArm.xml => Amputation_Right_UpperArm.xml} | 4 +- .../clothingItems/ArmRight_MetalHand_fore.xml | 10 -- ...Hand.xml => Prost_Left_Hand_MetalHand.xml} | 4 +- ...Hook.xml => Prost_Left_Hand_MetalHook.xml} | 4 +- ...ook.xml => Prost_Left_Hand_WoodenHook.xml} | 4 +- ....xml => Prost_Left_LowerArm_MetalHand.xml} | 4 +- ....xml => Prost_Left_LowerArm_MetalHook.xml} | 4 +- ...xml => Prost_Left_LowerArm_WoodenHook.xml} | 4 +- .../Prost_Left_UpperArm_MetalHook.xml | 0 ...and.xml => Prost_Right_Hand_MetalHand.xml} | 4 +- ...ook.xml => Prost_Right_Hand_MetalHook.xml} | 4 +- ...ok.xml => Prost_Right_Hand_WoodenHook.xml} | 4 +- ...xml => Prost_Right_LowerArm_MetalHand.xml} | 4 +- .../Prost_Right_LowerArm_MetalHook.xml | 0 ...ml => Prost_Right_LowerArm_WoodenHook.xml} | 4 +- media/lua/client/TOC_Test.lua | 129 +++++++++++------- 21 files changed, 110 insertions(+), 98 deletions(-) rename media/clothing/clothingItems/{ArmLeft_noHand.xml => Amputation_Left_Hand.xml} (70%) rename media/clothing/clothingItems/{ArmLeft_noForeArm.xml => Amputation_Left_LowerArm.xml} (70%) rename media/clothing/clothingItems/{ArmLeft_noArm.xml => Amputation_Left_UpperArm.xml} (70%) rename media/clothing/clothingItems/{ArmRight_noHand.xml => Amputation_Right_Hand.xml} (64%) rename media/clothing/clothingItems/{ArmRight_noForeArm.xml => Amputation_Right_LowerArm.xml} (70%) rename media/clothing/clothingItems/{ArmRight_noArm.xml => Amputation_Right_UpperArm.xml} (70%) delete mode 100644 media/clothing/clothingItems/ArmRight_MetalHand_fore.xml rename media/clothing/clothingItems/{ArmLeft_MetalHand.xml => Prost_Left_Hand_MetalHand.xml} (66%) rename media/clothing/clothingItems/{ArmLeft_MetalHook.xml => Prost_Left_Hand_MetalHook.xml} (66%) rename media/clothing/clothingItems/{ArmLeft_WoodenHook.xml => Prost_Left_Hand_WoodenHook.xml} (66%) rename media/clothing/clothingItems/{ArmLeft_MetalHand_fore.xml => Prost_Left_LowerArm_MetalHand.xml} (65%) rename media/clothing/clothingItems/{ArmLeft_MetalHook_fore.xml => Prost_Left_LowerArm_MetalHook.xml} (65%) rename media/clothing/clothingItems/{ArmLeft_WoodenHook_fore.xml => Prost_Left_LowerArm_WoodenHook.xml} (65%) create mode 100644 media/clothing/clothingItems/Prost_Left_UpperArm_MetalHook.xml rename media/clothing/clothingItems/{ArmRight_MetalHand.xml => Prost_Right_Hand_MetalHand.xml} (66%) rename media/clothing/clothingItems/{ArmRight_MetalHook.xml => Prost_Right_Hand_MetalHook.xml} (66%) rename media/clothing/clothingItems/{ArmRight_WoodenHook.xml => Prost_Right_Hand_WoodenHook.xml} (65%) rename media/clothing/clothingItems/{ArmRight_MetalHook_fore.xml => Prost_Right_LowerArm_MetalHand.xml} (65%) create mode 100644 media/clothing/clothingItems/Prost_Right_LowerArm_MetalHook.xml rename media/clothing/clothingItems/{ArmRight_WoodenHook_fore.xml => Prost_Right_LowerArm_WoodenHook.xml} (64%) diff --git a/media/clothing/clothingItems/ArmLeft_noHand.xml b/media/clothing/clothingItems/Amputation_Left_Hand.xml similarity index 70% rename from media/clothing/clothingItems/ArmLeft_noHand.xml rename to media/clothing/clothingItems/Amputation_Left_Hand.xml index a82b736..5cae2e2 100644 --- a/media/clothing/clothingItems/ArmLeft_noHand.xml +++ b/media/clothing/clothingItems/Amputation_Left_Hand.xml @@ -1,7 +1,7 @@ - ArmLeft_noHand - ArmLeft_noHand + Amputation_Left_Hand_Male + Amputation_Left_Hand_Female 2de93af2-b7a8-4c04-84d1-28d92cce8a0f false false diff --git a/media/clothing/clothingItems/ArmLeft_noForeArm.xml b/media/clothing/clothingItems/Amputation_Left_LowerArm.xml similarity index 70% rename from media/clothing/clothingItems/ArmLeft_noForeArm.xml rename to media/clothing/clothingItems/Amputation_Left_LowerArm.xml index ccfb01e..81b0310 100644 --- a/media/clothing/clothingItems/ArmLeft_noForeArm.xml +++ b/media/clothing/clothingItems/Amputation_Left_LowerArm.xml @@ -1,7 +1,7 @@ - ArmLeft_noForeArm - ArmLeft_noForeArm + Amputation_Left_LowerArm_Male + Amputation_Left_LowerArm_Female d3816fe0-48e1-4cf5-a8e4-48c72595edb4 false false diff --git a/media/clothing/clothingItems/ArmLeft_noArm.xml b/media/clothing/clothingItems/Amputation_Left_UpperArm.xml similarity index 70% rename from media/clothing/clothingItems/ArmLeft_noArm.xml rename to media/clothing/clothingItems/Amputation_Left_UpperArm.xml index 127b2c2..bc7e1f0 100644 --- a/media/clothing/clothingItems/ArmLeft_noArm.xml +++ b/media/clothing/clothingItems/Amputation_Left_UpperArm.xml @@ -1,7 +1,7 @@ - ArmLeft_noArm - ArmLeft_noArm + Amputation_Left_UpperArm_Male + Amputation_Left_UpperArm_Female 646cafa5-3fa1-41af-9ca0-aa57cca3b36d false false diff --git a/media/clothing/clothingItems/ArmRight_noHand.xml b/media/clothing/clothingItems/Amputation_Right_Hand.xml similarity index 64% rename from media/clothing/clothingItems/ArmRight_noHand.xml rename to media/clothing/clothingItems/Amputation_Right_Hand.xml index 4d27016..894f230 100644 --- a/media/clothing/clothingItems/ArmRight_noHand.xml +++ b/media/clothing/clothingItems/Amputation_Right_Hand.xml @@ -1,7 +1,6 @@ - - ArmRight_noHand - ArmRight_noHand + Amputation_Right_Hand_Male + Amputation_Right_Hand_Female f114e53a-b92e-4639-8d8c-2b43ab981885 false false diff --git a/media/clothing/clothingItems/ArmRight_noForeArm.xml b/media/clothing/clothingItems/Amputation_Right_LowerArm.xml similarity index 70% rename from media/clothing/clothingItems/ArmRight_noForeArm.xml rename to media/clothing/clothingItems/Amputation_Right_LowerArm.xml index 9ba6af2..9381d73 100644 --- a/media/clothing/clothingItems/ArmRight_noForeArm.xml +++ b/media/clothing/clothingItems/Amputation_Right_LowerArm.xml @@ -1,7 +1,7 @@ - ArmRight_noForeArm - ArmRight_noForeArm + Amputation_Right_LowerArm_Male + Amputation_Right_LowerArm_Female e6f80efd-22e5-49e0-8b24-537519d42b37 false false diff --git a/media/clothing/clothingItems/ArmRight_noArm.xml b/media/clothing/clothingItems/Amputation_Right_UpperArm.xml similarity index 70% rename from media/clothing/clothingItems/ArmRight_noArm.xml rename to media/clothing/clothingItems/Amputation_Right_UpperArm.xml index 5c29fea..770cf19 100644 --- a/media/clothing/clothingItems/ArmRight_noArm.xml +++ b/media/clothing/clothingItems/Amputation_Right_UpperArm.xml @@ -1,7 +1,7 @@ - ArmRight_noArm - ArmRight_noArm + Amputation_Right_UpperArm_Male + Amputation_Right_UpperArm_Female db8ccad2-b76f-44bd-93ab-1eefa25beade false false diff --git a/media/clothing/clothingItems/ArmRight_MetalHand_fore.xml b/media/clothing/clothingItems/ArmRight_MetalHand_fore.xml deleted file mode 100644 index 9e5a5b9..0000000 --- a/media/clothing/clothingItems/ArmRight_MetalHand_fore.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - ArmRight_MetalHand_fore - ArmRight_MetalHand_fore - 27758f1e-6298-42eb-b027-b9be31465c11 - false - false - false - Clothes\metal - \ No newline at end of file diff --git a/media/clothing/clothingItems/ArmLeft_MetalHand.xml b/media/clothing/clothingItems/Prost_Left_Hand_MetalHand.xml similarity index 66% rename from media/clothing/clothingItems/ArmLeft_MetalHand.xml rename to media/clothing/clothingItems/Prost_Left_Hand_MetalHand.xml index d0a806d..7bf438a 100644 --- a/media/clothing/clothingItems/ArmLeft_MetalHand.xml +++ b/media/clothing/clothingItems/Prost_Left_Hand_MetalHand.xml @@ -1,7 +1,7 @@ - ArmLeft_MetalHand_hand - ArmLeft_MetalHand_hand + Prost_Left_Hand_MetalHand_Male + Prost_Left_Hand_MetalHand_Female 2101af26-54b9-455b-abc0-7533ce37f84b false false diff --git a/media/clothing/clothingItems/ArmLeft_MetalHook.xml b/media/clothing/clothingItems/Prost_Left_Hand_MetalHook.xml similarity index 66% rename from media/clothing/clothingItems/ArmLeft_MetalHook.xml rename to media/clothing/clothingItems/Prost_Left_Hand_MetalHook.xml index 4ed556b..86ada3b 100644 --- a/media/clothing/clothingItems/ArmLeft_MetalHook.xml +++ b/media/clothing/clothingItems/Prost_Left_Hand_MetalHook.xml @@ -1,7 +1,7 @@ - ArmLeft_Hook_hand - ArmLeft_Hook_hand + Prost_Left_Hand_MetalHook_Male + Prost_Left_Hand_MetalHook_Female 6b4f4e13-d51f-48ab-80b0-6e0923650fc4 false false diff --git a/media/clothing/clothingItems/ArmLeft_WoodenHook.xml b/media/clothing/clothingItems/Prost_Left_Hand_WoodenHook.xml similarity index 66% rename from media/clothing/clothingItems/ArmLeft_WoodenHook.xml rename to media/clothing/clothingItems/Prost_Left_Hand_WoodenHook.xml index 4b73411..09fb042 100644 --- a/media/clothing/clothingItems/ArmLeft_WoodenHook.xml +++ b/media/clothing/clothingItems/Prost_Left_Hand_WoodenHook.xml @@ -1,7 +1,7 @@ - ArmLeft_Hook_hand - ArmLeft_Hook_hand + Prost_Left_Hand_WoodenHook_Male + Prost_Left_Hand_WoodenHook_Female 0def629e-fe4f-4485-bdae-2d6032e150be false false diff --git a/media/clothing/clothingItems/ArmLeft_MetalHand_fore.xml b/media/clothing/clothingItems/Prost_Left_LowerArm_MetalHand.xml similarity index 65% rename from media/clothing/clothingItems/ArmLeft_MetalHand_fore.xml rename to media/clothing/clothingItems/Prost_Left_LowerArm_MetalHand.xml index b81379b..dd0a562 100644 --- a/media/clothing/clothingItems/ArmLeft_MetalHand_fore.xml +++ b/media/clothing/clothingItems/Prost_Left_LowerArm_MetalHand.xml @@ -1,7 +1,7 @@ - ArmLeft_MetalHand_fore - ArmLeft_MetalHand_fore + Prost_Left_LowerArm_MetalHand_Male + Prost_Left_LowerArm_MetalHand_Female 0405a4c0-f71b-45a8-9edc-489fc81dca39 false false diff --git a/media/clothing/clothingItems/ArmLeft_MetalHook_fore.xml b/media/clothing/clothingItems/Prost_Left_LowerArm_MetalHook.xml similarity index 65% rename from media/clothing/clothingItems/ArmLeft_MetalHook_fore.xml rename to media/clothing/clothingItems/Prost_Left_LowerArm_MetalHook.xml index 820dd85..5378f67 100644 --- a/media/clothing/clothingItems/ArmLeft_MetalHook_fore.xml +++ b/media/clothing/clothingItems/Prost_Left_LowerArm_MetalHook.xml @@ -1,7 +1,7 @@ - ArmLeft_Hook_fore - ArmLeft_Hook_fore + Prost_Left_LowerArm_MetalHook_Male + Prost_Left_LowerArm_MetalHook_Female 129ee688-d4bb-4297-8eb2-f88974001217 false false diff --git a/media/clothing/clothingItems/ArmLeft_WoodenHook_fore.xml b/media/clothing/clothingItems/Prost_Left_LowerArm_WoodenHook.xml similarity index 65% rename from media/clothing/clothingItems/ArmLeft_WoodenHook_fore.xml rename to media/clothing/clothingItems/Prost_Left_LowerArm_WoodenHook.xml index bd92bff..298cb69 100644 --- a/media/clothing/clothingItems/ArmLeft_WoodenHook_fore.xml +++ b/media/clothing/clothingItems/Prost_Left_LowerArm_WoodenHook.xml @@ -1,7 +1,7 @@ - ArmLeft_Hook_fore - ArmLeft_Hook_fore + Prost_Left_LowerArm_WoodenHook_Male + Prost_Left_LowerArm_WoodenHook_Female aea8e02a-cba0-48d0-9eb0-7087651306b0 false false diff --git a/media/clothing/clothingItems/Prost_Left_UpperArm_MetalHook.xml b/media/clothing/clothingItems/Prost_Left_UpperArm_MetalHook.xml new file mode 100644 index 0000000..e69de29 diff --git a/media/clothing/clothingItems/ArmRight_MetalHand.xml b/media/clothing/clothingItems/Prost_Right_Hand_MetalHand.xml similarity index 66% rename from media/clothing/clothingItems/ArmRight_MetalHand.xml rename to media/clothing/clothingItems/Prost_Right_Hand_MetalHand.xml index aba18b6..2b16e52 100644 --- a/media/clothing/clothingItems/ArmRight_MetalHand.xml +++ b/media/clothing/clothingItems/Prost_Right_Hand_MetalHand.xml @@ -1,7 +1,7 @@ - ArmRight_MetalHand_hand - ArmRight_MetalHand_hand + Prost_Right_Hand_MetalHand_Male + Prost_Right_Hand_MetalHand_Female 731c280a-9682-4e2e-84cf-470bf00dd02f false false diff --git a/media/clothing/clothingItems/ArmRight_MetalHook.xml b/media/clothing/clothingItems/Prost_Right_Hand_MetalHook.xml similarity index 66% rename from media/clothing/clothingItems/ArmRight_MetalHook.xml rename to media/clothing/clothingItems/Prost_Right_Hand_MetalHook.xml index a50bf8c..053c69d 100644 --- a/media/clothing/clothingItems/ArmRight_MetalHook.xml +++ b/media/clothing/clothingItems/Prost_Right_Hand_MetalHook.xml @@ -1,7 +1,7 @@ - ArmRight_Hook_hand - ArmRight_Hook_hand + Prost_Right_Hand_MetalHook_Male + Prost_Right_Hand_MetalHook_Female dd7b749b-7e81-4547-91b0-81b1a1e9f7b8 false false diff --git a/media/clothing/clothingItems/ArmRight_WoodenHook.xml b/media/clothing/clothingItems/Prost_Right_Hand_WoodenHook.xml similarity index 65% rename from media/clothing/clothingItems/ArmRight_WoodenHook.xml rename to media/clothing/clothingItems/Prost_Right_Hand_WoodenHook.xml index 05529de..d56a34f 100644 --- a/media/clothing/clothingItems/ArmRight_WoodenHook.xml +++ b/media/clothing/clothingItems/Prost_Right_Hand_WoodenHook.xml @@ -1,7 +1,7 @@ - ArmRight_Hook_hand - ArmRight_Hook_hand + Prost_Right_Hand_WoodenHook_Male + Prost_Right_Hand_WoodenHook_Female 1fcc7523-d577-4cb0-a019-f077ef281d3a false false diff --git a/media/clothing/clothingItems/ArmRight_MetalHook_fore.xml b/media/clothing/clothingItems/Prost_Right_LowerArm_MetalHand.xml similarity index 65% rename from media/clothing/clothingItems/ArmRight_MetalHook_fore.xml rename to media/clothing/clothingItems/Prost_Right_LowerArm_MetalHand.xml index ba7e539..0b87807 100644 --- a/media/clothing/clothingItems/ArmRight_MetalHook_fore.xml +++ b/media/clothing/clothingItems/Prost_Right_LowerArm_MetalHand.xml @@ -1,7 +1,7 @@ - ArmRight_Hook_forearm - ArmRight_Hook_forearm + Prost_Right_LowerArm_MetalHand_Male + Prost_Right_LowerArm_MetalHand_Female 1eb56768-d7ef-46e4-ac07-91d0e43d15fb false false diff --git a/media/clothing/clothingItems/Prost_Right_LowerArm_MetalHook.xml b/media/clothing/clothingItems/Prost_Right_LowerArm_MetalHook.xml new file mode 100644 index 0000000..e69de29 diff --git a/media/clothing/clothingItems/ArmRight_WoodenHook_fore.xml b/media/clothing/clothingItems/Prost_Right_LowerArm_WoodenHook.xml similarity index 64% rename from media/clothing/clothingItems/ArmRight_WoodenHook_fore.xml rename to media/clothing/clothingItems/Prost_Right_LowerArm_WoodenHook.xml index 4b9bbf9..e579dda 100644 --- a/media/clothing/clothingItems/ArmRight_WoodenHook_fore.xml +++ b/media/clothing/clothingItems/Prost_Right_LowerArm_WoodenHook.xml @@ -1,7 +1,7 @@ - ArmRight_Hook_forearm - ArmRight_Hook_forearm + Prost_Right_LowerArm_WoodenHook_Male + Prost_Right_LowerArm_WoodenHook_Female 714b78a7-8895-4f48-a29d-b6f12909db0e false false diff --git a/media/lua/client/TOC_Test.lua b/media/lua/client/TOC_Test.lua index 49ffa5e..4da145c 100644 --- a/media/lua/client/TOC_Test.lua +++ b/media/lua/client/TOC_Test.lua @@ -35,73 +35,96 @@ function TestStuffToc() local sides = {"Left", "Right"} local limbs = {"Hand", "LowerArm", "UpperArm"} -- Let's follow their naming + + + local prosthesis_list = {"WoodenHook", "MetalHook", "MetalHand"} + + + + local accepted_prosthesis_hand = {"WoodenHook", "MetalHook", "MetalHand"} + local accepted_prosthesis_lowerarm = {"WoodenHook", "MetalHook", "MetalHand"} + local accepted_prosthesis_upperarm = {} -- For future stuff + + + + + + for _, side in ipairs(sides) do + for _, limb in ipairs(limbs) do + + local part_name = side .. "_" .. limb + + mod_data.TOC.Limbs[part_name].is_cut = false + mod_data.TOC.Limbs[part_name].is_infected = false + mod_data.TOC.Limbs[part_name].is_operated = false + mod_data.TOC.Limbs[part_name].is_cicatrized = false + mod_data.TOC.Limbs[part_name].is_cauterized = false + mod_data.TOC.Limbs[part_name].is_amputation_shown = false + mod_data.TOC.Limbs[part_name].cicatrization_time = 0 + + + mod_data.TOC.Limbs[part_name].is_prosthesis_equipped = false + mod_data.TOC.Limbs[part_name].prosthesis_factor = 1.0 + mod_data.TOC.Limbs[part_name].prosthesis_material_id = nil + + + -- 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.Prosthesis.AcceptedProsthesis[part_name] = accepted_prosthesis_hand + elseif limb == "LowerArm" then + mod_data.TOC.Prosthesis.AcceptedProsthesis[part_name] = accepted_prosthesis_lowerarm + elseif limb == "UpperArm" then + mod_data.TOC.Prosthesis.AcceptedProsthesis[part_name] = accepted_prosthesis_upperarm + end + + end + end - - - - - - - -- Setup prosthesis table - - local prosthesis_table = { - } - - - - - - for _ ,v in pairs(GetBodyParts()) do - mod_data.TOC.Limbs[v].is_cut = false - mod_data.TOC.Limbs[v].is_infected = false - mod_data.TOC.Limbs[v].is_operated = false - mod_data.TOC.Limbs[v].is_cicatrized = false - mod_data.TOC.Limbs[v].is_cauterized = false - mod_data.TOC.Limbs[v].is_amputation_shown = false - - mod_data.TOC.Limbs[v].cicatrization_time = 0 + for _, v in ipairs(prosthesis_list) do - - mod_data.TOC.Limbs[v].is_prosthesis_equipped = false - mod_data.TOC.Limbs[v].prosthesis_factor = 1.0 - mod_data.TOC.Limbs[v].prosthesis_material_id = nil - - - -- Prosthesis part - mod_data.TOC.Prosthesis[v].accepted_prosthesis = {} - mod_data.TOC.Prosthesis - + mod_data.TOC.Prosthesis[v].prosthesis_factor = 1.0 -- Default + mod_data.TOC.Limbs[v].prosthesis_material_id = nil -- Set texture? + -- TODO Something else? end - - mod_data.TOC.Prosthesis.list = GetProsthesisList() - - for _,v in ipairs(GetProsthesisLisHumanReadable()) do - mod_data.TOC.Prosthesis[v]. - +end +function Test2Toc(part_name, prosthetic_name) + + -------- + -- NEW NAMING SCHEME + + ---- Amputations + + -- Amputation_Left_Hand + -- Amputation_Right_UpperArm + + + ---- Prosthesis to equip + -- Prost_Left_Hand_MetalHook + -- Prost_Right_Forearm_WoodenHook + + --- Objects + -- Prost_Object_WoddenHook + + + -- First value side, second value limb + local part_name_table = {} + + for v in part_name:gmatch("([^_]+)") do + table.insert(part_name_table, v) end - - - - RightHand = {}, - RightForearm = {}, - RightArm = {}, - - LeftHand = {}, - LeftForearm = {}, - LeftArm = {}, - - is_other_bodypart_infected = false - } + -- TODO Probably add TOC. before prost_ + local prost_to_equip_name = "Prost_" .. part_name_table[1] .. "_" .. part_name_table[2] .. "_" .. prosthetic_name + return prost_to_equip_name end \ No newline at end of file