More tests
This commit is contained in:
@@ -17,7 +17,7 @@ ItemsController.Player = {}
|
||||
---@return number
|
||||
---@private
|
||||
function ItemsController.Player.GetAmputationTexturesIndex(playerObj, isCicatrized)
|
||||
-- FIX Broken
|
||||
-- todo
|
||||
local textureString = playerObj:getHumanVisual():getSkinTexture()
|
||||
local isHairy = textureString:sub(-1) == "a"
|
||||
|
||||
@@ -79,13 +79,16 @@ end
|
||||
---Deletes all the old amputation items, used for resets
|
||||
---@param playerObj IsoPlayer
|
||||
function ItemsController.Player.DeleteAllOldAmputationItems(playerObj)
|
||||
-- TODO Fix visual bug
|
||||
-- This part is a workaround for a pretty shitty implementation on the java side. Check ProsthesisHandler for more infos
|
||||
local group = BodyLocations.getGroup("Human")
|
||||
group:setMultiItem("TOC_Arm", false)
|
||||
group:setMultiItem("TOC_ArmProst", false)
|
||||
-- local group = BodyLocations.getGroup("Human")
|
||||
-- group:setMultiItem("TOC_Arm", false)
|
||||
-- group:setMultiItem("TOC_ArmProst", false)
|
||||
|
||||
for i = 1, #StaticData.LIMBS_STR do
|
||||
local limbName = StaticData.LIMBS_STR[i]
|
||||
|
||||
-- TODO Won't work with dedicated clothingItems for multi amps
|
||||
local clothItemName = StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName
|
||||
local clothItem = playerObj:getInventory():FindAndReturn(clothItemName)
|
||||
---@cast clothItem InventoryItem
|
||||
@@ -94,8 +97,8 @@ function ItemsController.Player.DeleteAllOldAmputationItems(playerObj)
|
||||
-- Reset model just in case
|
||||
playerObj:resetModel()
|
||||
|
||||
group:setMultiItem("TOC_Arm", true)
|
||||
group:setMultiItem("TOC_ArmProst", true)
|
||||
-- group:setMultiItem("TOC_Arm", true)
|
||||
-- group:setMultiItem("TOC_ArmProst", true)
|
||||
end
|
||||
|
||||
---Spawns and equips the correct amputation item to the player.
|
||||
|
||||
@@ -43,23 +43,26 @@ function BodyLocationsAPI.MoveOrCreateBeforeOrAfter(toRelocateOrCreate, location
|
||||
end
|
||||
end
|
||||
|
||||
-- function TestBodyLocations()
|
||||
-- local group = BodyLocations.getGroup("Human")
|
||||
-- local x = group:getAllLocations()
|
||||
function TestBodyLocations()
|
||||
local group = BodyLocations.getGroup("Human")
|
||||
local x = group:getAllLocations()
|
||||
|
||||
-- for i=0, x:size() -1 do
|
||||
for i=0, x:size() -1 do
|
||||
|
||||
-- ---@type BodyLocation
|
||||
-- local bl = x:get(i)
|
||||
---@type BodyLocation
|
||||
local bl = x:get(i)
|
||||
|
||||
-- print(bl:getId())
|
||||
-- end
|
||||
-- end
|
||||
print(bl:getId())
|
||||
end
|
||||
end
|
||||
|
||||
-- MultiItem causes a ton of issues... fucking hell
|
||||
|
||||
BodyLocationsAPI.MoveOrCreateBeforeOrAfter("TOC_Arm", "FullTop", true)
|
||||
group:setMultiItem("TOC_Arm", true)
|
||||
-- BodyLocationsAPI.MoveOrCreateBeforeOrAfter("TOC_Arm", "Shirt", true)
|
||||
-- group:setMultiItem("TOC_Arm", true)
|
||||
|
||||
local curItem = BodyLocation.new(group, "TOC_Arm") -- create new item
|
||||
group:getAllLocations():add(curItem) -- add to the list
|
||||
|
||||
BodyLocationsAPI.MoveOrCreateBeforeOrAfter("TOC_ArmProst", "TOC_Arm", true)
|
||||
group:setMultiItem("TOC_ArmProst", true)
|
||||
|
||||
Reference in New Issue
Block a user