Delete other amputated limbs after cutting same side

This commit is contained in:
Pao
2023-01-18 14:32:12 +01:00
parent 22406dcef5
commit 0f30841978
14 changed files with 72 additions and 52 deletions

View File

@@ -1,20 +1,9 @@
-- 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))
print("TOC: Setting texture " .. matched_index)
item:getVisual():setTextureChoice(tonumber(matched_index - 1)) -- TODO why is it correct with -1?
end