Cleaning body locations
This commit is contained in:
@@ -176,13 +176,6 @@ end
|
|||||||
|
|
||||||
-- MAIN UPDATE FUNCTIONS
|
-- MAIN UPDATE FUNCTIONS
|
||||||
|
|
||||||
local testOnAnimEvent = IsoGameCharacter.OnAnimEvent
|
|
||||||
|
|
||||||
function IsoGameCharacter.OnAnimEvent(animLayer, animEvent)
|
|
||||||
print("ENTERING ON ANIM EVENT!!!")
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function TocUpdateOnTick()
|
local function TocUpdateOnTick()
|
||||||
|
|
||||||
@@ -191,14 +184,6 @@ local function TocUpdateOnTick()
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local toc_data = player:getModData().TOC
|
local toc_data = player:getModData().TOC
|
||||||
if toc_data ~= nil then
|
if toc_data ~= nil then
|
||||||
CheckIfPlayerIsInfected(player, toc_data)
|
CheckIfPlayerIsInfected(player, toc_data)
|
||||||
|
|||||||
@@ -1,82 +1,23 @@
|
|||||||
local function addBodyLocationBefore(newLocation, movetoLocation)
|
local function addBodyLocationBefore(new_location, move_to_location)
|
||||||
|
|
||||||
-- TODO this is still broken!
|
|
||||||
local group = BodyLocations.getGroup("Human")
|
local group = BodyLocations.getGroup("Human")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local list = getClassFieldVal(group, getClassField(group, 1))
|
local list = getClassFieldVal(group, getClassField(group, 1))
|
||||||
|
group:getOrCreateLocation(new_location)
|
||||||
|
local new_item = list:get(list:size()-1)
|
||||||
|
print("TOC: Created new body location" .. new_item:getId())
|
||||||
group:getOrCreateLocation(newLocation)
|
list:remove(new_item)
|
||||||
|
local i = group:indexOf(move_to_location)
|
||||||
|
list:add(i, new_item)
|
||||||
local newItem = list:get(list:size()-1)
|
|
||||||
print("TOC: Created new body location" .. newItem:getId())
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
list:remove(newItem)
|
|
||||||
local i = group:indexOf(movetoLocation)
|
|
||||||
list:add(i, newItem)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local function TocSetSleeves(check)
|
|
||||||
|
|
||||||
-- FIXME This can't work, we need to fix masks before changing the order. There is nothing I can do for now with only this
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- -- Check if we already set stuff before
|
|
||||||
-- -- Readd them
|
|
||||||
-- print("TOC: Running TocSetSleeves")
|
|
||||||
|
|
||||||
-- if group:getLocation("RightArm") or group:getLocation("LeftArm") then
|
|
||||||
-- BodyLocations:Reset() -- maybe it's too much
|
|
||||||
-- end
|
|
||||||
|
|
||||||
-- if check then
|
|
||||||
-- print("TOC: Rolling up sleeves")
|
|
||||||
-- group:getOrCreateLocation("ArmRight_Prot")
|
|
||||||
-- group:getOrCreateLocation("ArmLeft_Prot")
|
|
||||||
-- group:getOrCreateLocation("ArmRight")
|
|
||||||
-- group:getOrCreateLocation("ArmLeft")
|
|
||||||
-- else
|
|
||||||
-- print("TOC: Won't roll up sleeve")
|
|
||||||
-- addBodyLocationBefore("ArmRight_Prot", "TorsoExtra")
|
|
||||||
-- addBodyLocationBefore("ArmLeft_Prot", "TorsoExtra")
|
|
||||||
-- addBodyLocationBefore("ArmRight", "Jacket")
|
|
||||||
-- addBodyLocationBefore("ArmLeft", "Jacket")
|
|
||||||
|
|
||||||
-- end
|
|
||||||
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
-- FIXME this still breaks
|
|
||||||
|
|
||||||
local group = BodyLocations.getGroup("Human")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
addBodyLocationBefore("TOC_ArmRight", "Shoes")
|
addBodyLocationBefore("TOC_ArmRight", "Shoes")
|
||||||
addBodyLocationBefore("TOC_ArmLeft", "Shoes")
|
addBodyLocationBefore("TOC_ArmLeft", "Shoes")
|
||||||
|
|
||||||
|
addBodyLocationBefore("TOC_LegRight", "Shoes")
|
||||||
addBodyLocationBefore("TOC_LegLeft", "Shoes")
|
addBodyLocationBefore("TOC_LegLeft", "Shoes")
|
||||||
|
|
||||||
addBodyLocationBefore("TOC_ArmRightProsthesis", "Shoes")
|
addBodyLocationBefore("TOC_ArmRightProsthesis", "Shoes")
|
||||||
addBodyLocationBefore("TOC_ArmLeftProsthesis", "Shoes")
|
addBodyLocationBefore("TOC_ArmLeftProsthesis", "Shoes")
|
||||||
|
|
||||||
|
addBodyLocationBefore("TOC_LegRightProsthesis", "Shoes")
|
||||||
|
addBodyLocationBefore("TOC_LegLeftProsthesis", "Shoes")
|
||||||
-- group:getOrCreateLocation("TOC_ArmRight")
|
|
||||||
-- group:getOrCreateLocation("ArmLeft")
|
|
||||||
-- group:getOrCreateLocation("ArmRight_Prot")
|
|
||||||
-- group:getOrCreateLocation("ArmLeft_Prot")
|
|
||||||
Reference in New Issue
Block a user