diff --git a/media/clothing/clothingItems/Amputation_Left_Hand.xml b/media/clothing/clothingItems/Amputation_Left_Hand.xml
index 5cae2e2..39329c8 100644
--- a/media/clothing/clothingItems/Amputation_Left_Hand.xml
+++ b/media/clothing/clothingItems/Amputation_Left_Hand.xml
@@ -7,5 +7,9 @@
false
false
4
- Clothes\prototype
+ Clothes\skin01
+ Clothes\skin02
+ Clothes\skin03
+ Clothes\skin04
+ Clothes\skin05
\ No newline at end of file
diff --git a/media/clothing/clothingItems/Amputation_Left_LowerArm.xml b/media/clothing/clothingItems/Amputation_Left_LowerArm.xml
index 81b0310..dd3bf57 100644
--- a/media/clothing/clothingItems/Amputation_Left_LowerArm.xml
+++ b/media/clothing/clothingItems/Amputation_Left_LowerArm.xml
@@ -8,5 +8,9 @@
false
3
4
- Clothes\prototype
+ Clothes\skin01
+ Clothes\skin02
+ Clothes\skin03
+ Clothes\skin04
+ Clothes\skin05
\ No newline at end of file
diff --git a/media/clothing/clothingItems/Amputation_Left_UpperArm.xml b/media/clothing/clothingItems/Amputation_Left_UpperArm.xml
index bc7e1f0..5bbe578 100644
--- a/media/clothing/clothingItems/Amputation_Left_UpperArm.xml
+++ b/media/clothing/clothingItems/Amputation_Left_UpperArm.xml
@@ -8,5 +8,9 @@
false
3
4
- Clothes\prototype
+ Clothes\skin01
+ Clothes\skin02
+ Clothes\skin03
+ Clothes\skin04
+ Clothes\skin05
\ No newline at end of file
diff --git a/media/clothing/clothingItems/Amputation_Right_Hand.xml b/media/clothing/clothingItems/Amputation_Right_Hand.xml
index 894f230..402cfcb 100644
--- a/media/clothing/clothingItems/Amputation_Right_Hand.xml
+++ b/media/clothing/clothingItems/Amputation_Right_Hand.xml
@@ -6,5 +6,9 @@
false
false
6
- Clothes\prototype
+ Clothes\skin01
+ Clothes\skin02
+ Clothes\skin03
+ Clothes\skin04
+ Clothes\skin05
\ No newline at end of file
diff --git a/media/clothing/clothingItems/Amputation_Right_LowerArm.xml b/media/clothing/clothingItems/Amputation_Right_LowerArm.xml
index 9381d73..f96e63b 100644
--- a/media/clothing/clothingItems/Amputation_Right_LowerArm.xml
+++ b/media/clothing/clothingItems/Amputation_Right_LowerArm.xml
@@ -8,5 +8,9 @@
false
5
6
- Clothes\prototype
+ Clothes\skin01
+ Clothes\skin02
+ Clothes\skin03
+ Clothes\skin04
+ Clothes\skin05
\ No newline at end of file
diff --git a/media/clothing/clothingItems/Amputation_Right_UpperArm.xml b/media/clothing/clothingItems/Amputation_Right_UpperArm.xml
index 770cf19..8c1a73c 100644
--- a/media/clothing/clothingItems/Amputation_Right_UpperArm.xml
+++ b/media/clothing/clothingItems/Amputation_Right_UpperArm.xml
@@ -8,5 +8,9 @@
false
5
6
- Clothes\prototype
+ Clothes\skin01
+ Clothes\skin02
+ Clothes\skin03
+ Clothes\skin04
+ Clothes\skin05
\ No newline at end of file
diff --git a/media/lua/client/TOC_Update.lua b/media/lua/client/TOC_Update.lua
index 995d45a..3f90d95 100644
--- a/media/lua/client/TOC_Update.lua
+++ b/media/lua/client/TOC_Update.lua
@@ -223,8 +223,8 @@ function TheOnlyCure.UpdateEveryTenMinutes()
if player == nil then
return
end
- local part_data = player:getModData().TOC.Limbs
-
+ local toc_data = player:getModData().TOC
+ local part_data = toc_data.Limbs
--Experience for prosthesis user
for _, side in ipairs({"Left", "Right"}) do
diff --git a/media/lua/client/TOC_Visuals.lua b/media/lua/client/TOC_Visuals.lua
new file mode 100644
index 0000000..2b40b45
--- /dev/null
+++ b/media/lua/client/TOC_Visuals.lua
@@ -0,0 +1,20 @@
+-- 6 skin tones or 5?
+
+function TocSetCorrectTextureForAmputation(item, player)
+
+ local human_visual = player:getHumanVisual()
+
+ local texture_string = human_visual:getSkinTexture()
+ print(texture_string)
+
+
+ local matched_index = string.match(texture_string, "%d$")
+ print(matched_index)
+
+
+ item:getVisual():setTextureChoice(tonumber(matched_index))
+
+
+
+
+end
\ No newline at end of file
diff --git a/media/lua/client/TOC_main.lua b/media/lua/client/TOC_main.lua
index 16a89a9..bcd3a06 100644
--- a/media/lua/client/TOC_main.lua
+++ b/media/lua/client/TOC_main.lua
@@ -14,8 +14,6 @@ Arm = "Arm"
function TheOnlyCure.InitTheOnlyCure(_, player)
local mod_data = player:getModData()
-
- -- TODO
if mod_data.TOC == nil then
TocSetInitData(mod_data, player)
else
@@ -263,8 +261,9 @@ function TheOnlyCure.CutLimb(part_name, surgeon_factor, bandage_table, painkille
end
--Equip model for amputation
- local cloth = player:getInventory():AddItem(TocFindAmputatedClothingFromPartName(part_name))
- player:setWornItem(cloth:getBodyLocation(), cloth)
+ local amputation_clothing_item = player:getInventory():AddItem(TocFindAmputatedClothingFromPartName(part_name))
+ TocSetCorrectTextureForAmputation(amputation_clothing_item, player)
+ player:setWornItem(amputation_clothing_item:getBodyLocation(), amputation_clothing_item)
player:transmitModData()
end
diff --git a/media/textures/Clothes/prototype.png b/media/textures/Clothes/skin01.png
similarity index 100%
rename from media/textures/Clothes/prototype.png
rename to media/textures/Clothes/skin01.png
diff --git a/media/textures/Clothes/skin02.png b/media/textures/Clothes/skin02.png
new file mode 100644
index 0000000..a9881de
Binary files /dev/null and b/media/textures/Clothes/skin02.png differ
diff --git a/media/textures/Clothes/skin03.png b/media/textures/Clothes/skin03.png
new file mode 100644
index 0000000..1d2992f
Binary files /dev/null and b/media/textures/Clothes/skin03.png differ
diff --git a/media/textures/Clothes/skin04.png b/media/textures/Clothes/skin04.png
new file mode 100644
index 0000000..402bd89
Binary files /dev/null and b/media/textures/Clothes/skin04.png differ
diff --git a/media/textures/Clothes/skin05.png b/media/textures/Clothes/skin05.png
new file mode 100644
index 0000000..cde47df
Binary files /dev/null and b/media/textures/Clothes/skin05.png differ