diff --git a/media/lua/client/TOC_Checks.lua b/media/lua/client/TOC_Checks.lua index aa32262..dc858df 100644 --- a/media/lua/client/TOC_Checks.lua +++ b/media/lua/client/TOC_Checks.lua @@ -6,7 +6,7 @@ end function CheckIfCanBeCut(part_name) -- This is just for MP handling... Not enough to check everything - return not getPlayer():getModData().TOC[part_name].is_cut + return not getPlayer():getModData().TOC.Limbs[part_name].is_cut end diff --git a/media/lua/client/TOC_Test.lua b/media/lua/client/TOC_Test.lua2 similarity index 100% rename from media/lua/client/TOC_Test.lua rename to media/lua/client/TOC_Test.lua2 diff --git a/media/lua/client/TOC_UI.lua b/media/lua/client/TOC_UI.lua index d212070..5aae821 100644 --- a/media/lua/client/TOC_UI.lua +++ b/media/lua/client/TOC_UI.lua @@ -441,11 +441,11 @@ function SetupTocDescUI(surgeon, patient, toc_data, part_name) -- TODO add check for cuts and scratches desc_ui["status"]:setText("Not cut") desc_ui["status"]:setColor(1, 1, 1, 1) - if GetSawInInventory(surgeon) and not CheckIfProsthesisAlreadyInstalled(toc_data, part_name) then + if GetSawInInventory(surgeon) and not CheckIfProsthesisAlreadyInstalled(toc_data.Limbs, part_name) then desc_ui["b1"]:setVisible(true) desc_ui["b1"]:setText("Cut") desc_ui["b1"]:addArg("option", "Cut") - elseif GetSawInInventory(surgeon) and CheckIfProsthesisAlreadyInstalled(toc_data, part_name) then + elseif GetSawInInventory(surgeon) and CheckIfProsthesisAlreadyInstalled(toc_data.Limbs, part_name) then desc_ui["b1"]:setVisible(true) desc_ui["b1"]:setText("Remove prosthesis before") desc_ui["b1"]:addArg("option", "Nothing") diff --git a/media/lua/client/TOC_main.lua b/media/lua/client/TOC_main.lua index 48ba71c..ad3ed50 100644 --- a/media/lua/client/TOC_main.lua +++ b/media/lua/client/TOC_main.lua @@ -16,14 +16,26 @@ function TheOnlyCure.InitTheOnlyCure(_, player) local mod_data = player:getModData() if mod_data.TOC == nil then - mod_data.TOC = {} + + print("TOC: Creating mod_data.TOC") mod_data.TOC = { Limbs = { + Right_Hand = {}, + Right_LowerArm = {}, + Right_UpperArm = {}, + + Left_Hand = {}, + Left_LowerArm = {}, + Left_UpperArm = {}, is_other_bodypart_infected = false }, - Prosthesis = {}, + Prosthesis = { + WoodenHook = {}, + MetalHook = {}, + MetalHand = {} + }, Generic = {}, } -------- diff --git a/media/ui/TOC/LeftHand/Base.png b/media/ui/TOC/Left_Hand/Base.png similarity index 100% rename from media/ui/TOC/LeftHand/Base.png rename to media/ui/TOC/Left_Hand/Base.png diff --git a/media/ui/TOC/LeftHand/Bite.png b/media/ui/TOC/Left_Hand/Bite.png similarity index 100% rename from media/ui/TOC/LeftHand/Bite.png rename to media/ui/TOC/Left_Hand/Bite.png diff --git a/media/ui/TOC/LeftHand/Bleed.png b/media/ui/TOC/Left_Hand/Bleed.png similarity index 100% rename from media/ui/TOC/LeftHand/Bleed.png rename to media/ui/TOC/Left_Hand/Bleed.png diff --git a/media/ui/TOC/LeftHand/Cut.png b/media/ui/TOC/Left_Hand/Cut.png similarity index 100% rename from media/ui/TOC/LeftHand/Cut.png rename to media/ui/TOC/Left_Hand/Cut.png diff --git a/media/ui/TOC/LeftHand/Hook.png b/media/ui/TOC/Left_Hand/Hook.png similarity index 100% rename from media/ui/TOC/LeftHand/Hook.png rename to media/ui/TOC/Left_Hand/Hook.png diff --git a/media/ui/TOC/LeftHand/MetalHand.png b/media/ui/TOC/Left_Hand/MetalHand.png similarity index 100% rename from media/ui/TOC/LeftHand/MetalHand.png rename to media/ui/TOC/Left_Hand/MetalHand.png diff --git a/media/ui/TOC/LeftHand/Operate.png b/media/ui/TOC/Left_Hand/Operate.png similarity index 100% rename from media/ui/TOC/LeftHand/Operate.png rename to media/ui/TOC/Left_Hand/Operate.png diff --git a/media/ui/TOC/LeftForearm/Base.png b/media/ui/TOC/Left_LowerArm/Base.png similarity index 100% rename from media/ui/TOC/LeftForearm/Base.png rename to media/ui/TOC/Left_LowerArm/Base.png diff --git a/media/ui/TOC/LeftForearm/Bite.png b/media/ui/TOC/Left_LowerArm/Bite.png similarity index 100% rename from media/ui/TOC/LeftForearm/Bite.png rename to media/ui/TOC/Left_LowerArm/Bite.png diff --git a/media/ui/TOC/LeftForearm/Bleed.png b/media/ui/TOC/Left_LowerArm/Bleed.png similarity index 100% rename from media/ui/TOC/LeftForearm/Bleed.png rename to media/ui/TOC/Left_LowerArm/Bleed.png diff --git a/media/ui/TOC/LeftForearm/Cut.png b/media/ui/TOC/Left_LowerArm/Cut.png similarity index 100% rename from media/ui/TOC/LeftForearm/Cut.png rename to media/ui/TOC/Left_LowerArm/Cut.png diff --git a/media/ui/TOC/LeftForearm/Operate.png b/media/ui/TOC/Left_LowerArm/Operate.png similarity index 100% rename from media/ui/TOC/LeftForearm/Operate.png rename to media/ui/TOC/Left_LowerArm/Operate.png diff --git a/media/ui/TOC/LeftForearm/Prothesis.png b/media/ui/TOC/Left_LowerArm/Prothesis.png similarity index 100% rename from media/ui/TOC/LeftForearm/Prothesis.png rename to media/ui/TOC/Left_LowerArm/Prothesis.png diff --git a/media/ui/TOC/LeftArm/Base.png b/media/ui/TOC/Left_UpperArm/Base.png similarity index 100% rename from media/ui/TOC/LeftArm/Base.png rename to media/ui/TOC/Left_UpperArm/Base.png diff --git a/media/ui/TOC/LeftArm/Bite.png b/media/ui/TOC/Left_UpperArm/Bite.png similarity index 100% rename from media/ui/TOC/LeftArm/Bite.png rename to media/ui/TOC/Left_UpperArm/Bite.png diff --git a/media/ui/TOC/LeftArm/Bleed.png b/media/ui/TOC/Left_UpperArm/Bleed.png similarity index 100% rename from media/ui/TOC/LeftArm/Bleed.png rename to media/ui/TOC/Left_UpperArm/Bleed.png diff --git a/media/ui/TOC/LeftArm/Cut.png b/media/ui/TOC/Left_UpperArm/Cut.png similarity index 100% rename from media/ui/TOC/LeftArm/Cut.png rename to media/ui/TOC/Left_UpperArm/Cut.png diff --git a/media/ui/TOC/LeftArm/Operate.png b/media/ui/TOC/Left_UpperArm/Operate.png similarity index 100% rename from media/ui/TOC/LeftArm/Operate.png rename to media/ui/TOC/Left_UpperArm/Operate.png diff --git a/media/ui/TOC/RightHand/Base.png b/media/ui/TOC/Right_Hand/Base.png similarity index 100% rename from media/ui/TOC/RightHand/Base.png rename to media/ui/TOC/Right_Hand/Base.png diff --git a/media/ui/TOC/RightHand/Bite.png b/media/ui/TOC/Right_Hand/Bite.png similarity index 100% rename from media/ui/TOC/RightHand/Bite.png rename to media/ui/TOC/Right_Hand/Bite.png diff --git a/media/ui/TOC/RightHand/Bleed.png b/media/ui/TOC/Right_Hand/Bleed.png similarity index 100% rename from media/ui/TOC/RightHand/Bleed.png rename to media/ui/TOC/Right_Hand/Bleed.png diff --git a/media/ui/TOC/RightHand/Cut.png b/media/ui/TOC/Right_Hand/Cut.png similarity index 100% rename from media/ui/TOC/RightHand/Cut.png rename to media/ui/TOC/Right_Hand/Cut.png diff --git a/media/ui/TOC/RightHand/Hook.png b/media/ui/TOC/Right_Hand/Hook.png similarity index 100% rename from media/ui/TOC/RightHand/Hook.png rename to media/ui/TOC/Right_Hand/Hook.png diff --git a/media/ui/TOC/RightHand/MetalHand.png b/media/ui/TOC/Right_Hand/MetalHand.png similarity index 100% rename from media/ui/TOC/RightHand/MetalHand.png rename to media/ui/TOC/Right_Hand/MetalHand.png diff --git a/media/ui/TOC/RightHand/Operate.png b/media/ui/TOC/Right_Hand/Operate.png similarity index 100% rename from media/ui/TOC/RightHand/Operate.png rename to media/ui/TOC/Right_Hand/Operate.png diff --git a/media/ui/TOC/RightForearm/Base.png b/media/ui/TOC/Right_LowerArm/Base.png similarity index 100% rename from media/ui/TOC/RightForearm/Base.png rename to media/ui/TOC/Right_LowerArm/Base.png diff --git a/media/ui/TOC/RightForearm/Bite.png b/media/ui/TOC/Right_LowerArm/Bite.png similarity index 100% rename from media/ui/TOC/RightForearm/Bite.png rename to media/ui/TOC/Right_LowerArm/Bite.png diff --git a/media/ui/TOC/RightForearm/Bleed.png b/media/ui/TOC/Right_LowerArm/Bleed.png similarity index 100% rename from media/ui/TOC/RightForearm/Bleed.png rename to media/ui/TOC/Right_LowerArm/Bleed.png diff --git a/media/ui/TOC/RightForearm/Cut.png b/media/ui/TOC/Right_LowerArm/Cut.png similarity index 100% rename from media/ui/TOC/RightForearm/Cut.png rename to media/ui/TOC/Right_LowerArm/Cut.png diff --git a/media/ui/TOC/RightForearm/Operate.png b/media/ui/TOC/Right_LowerArm/Operate.png similarity index 100% rename from media/ui/TOC/RightForearm/Operate.png rename to media/ui/TOC/Right_LowerArm/Operate.png diff --git a/media/ui/TOC/RightForearm/Prothesis.png b/media/ui/TOC/Right_LowerArm/Prothesis.png similarity index 100% rename from media/ui/TOC/RightForearm/Prothesis.png rename to media/ui/TOC/Right_LowerArm/Prothesis.png diff --git a/media/ui/TOC/RightArm/Base.png b/media/ui/TOC/Right_UpperArm/Base.png similarity index 100% rename from media/ui/TOC/RightArm/Base.png rename to media/ui/TOC/Right_UpperArm/Base.png diff --git a/media/ui/TOC/RightArm/Bite.png b/media/ui/TOC/Right_UpperArm/Bite.png similarity index 100% rename from media/ui/TOC/RightArm/Bite.png rename to media/ui/TOC/Right_UpperArm/Bite.png diff --git a/media/ui/TOC/RightArm/Bleed.png b/media/ui/TOC/Right_UpperArm/Bleed.png similarity index 100% rename from media/ui/TOC/RightArm/Bleed.png rename to media/ui/TOC/Right_UpperArm/Bleed.png diff --git a/media/ui/TOC/RightArm/Cut.png b/media/ui/TOC/Right_UpperArm/Cut.png similarity index 100% rename from media/ui/TOC/RightArm/Cut.png rename to media/ui/TOC/Right_UpperArm/Cut.png diff --git a/media/ui/TOC/RightArm/Operate.png b/media/ui/TOC/Right_UpperArm/Operate.png similarity index 100% rename from media/ui/TOC/RightArm/Operate.png rename to media/ui/TOC/Right_UpperArm/Operate.png