This commit is contained in:
ZioPao
2023-11-15 01:47:30 +01:00
parent 441fe67890
commit bd9be10e02
2 changed files with 4 additions and 6 deletions

View File

@@ -75,7 +75,7 @@ function ItemsHandler.Player.DeleteOldAmputationItem(playerObj, limbName)
-- If we manage to find and remove an item, then we should stop this function. -- If we manage to find and remove an item, then we should stop this function.
---@cast othClothingItem InventoryItem ---@cast othClothingItem InventoryItem
if ItemsHandler.RemoveClothingItem(playerObj, othClothingItem) then return end if ItemsHandler.Player.RemoveClothingItem(playerObj, othClothingItem) then return end
end end
end end
@@ -88,7 +88,7 @@ function ItemsHandler.Player.DeleteAllOldAmputationItems(playerObj)
local clothItemName = StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName local clothItemName = StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName
local clothItem = playerObj:getInventory():FindAndReturn(clothItemName) local clothItem = playerObj:getInventory():FindAndReturn(clothItemName)
---@cast clothItem InventoryItem ---@cast clothItem InventoryItem
ItemsHandler.RemoveClothingItem(playerObj, clothItem) ItemsHandler.Player.RemoveClothingItem(playerObj, clothItem)
end end
end end
@@ -98,7 +98,7 @@ end
function ItemsHandler.Player.SpawnAmputationItem(playerObj, limbName) function ItemsHandler.Player.SpawnAmputationItem(playerObj, limbName)
TOC_DEBUG.print("clothing name " .. StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName) TOC_DEBUG.print("clothing name " .. StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName)
local clothingItem = playerObj:getInventory():AddItem(StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName) local clothingItem = playerObj:getInventory():AddItem(StaticData.AMPUTATION_CLOTHING_ITEM_BASE .. limbName)
local texId = ItemsHandler.GetAmputationTexturesIndex(playerObj, false) local texId = ItemsHandler.Player.GetAmputationTexturesIndex(playerObj, false)
---@cast clothingItem InventoryItem ---@cast clothingItem InventoryItem
clothingItem:getVisual():setTextureChoice(texId) -- it counts from 0, so we have to subtract 1 clothingItem:getVisual():setTextureChoice(texId) -- it counts from 0, so we have to subtract 1

View File

@@ -60,7 +60,6 @@ function ModDataHandler:setup(key)
-- Initialize limbs -- Initialize limbs
for i=1, #StaticData.LIMBS_STR do for i=1, #StaticData.LIMBS_STR do
local limbName = StaticData.LIMBS_STR[i] local limbName = StaticData.LIMBS_STR[i]
self.tocData.limbs[limbName] = {} self.tocData.limbs[limbName] = {}
@@ -68,8 +67,7 @@ function ModDataHandler:setup(key)
end end
-- Initialize prostheses stuff -- Initialize prostheses stuff
for i=1, #StaticData.PROSTHESES_GROUPS do for group, _ in ipairs(StaticData.PROSTHESES_GROUPS) do
local group = StaticData.PROSTHESES_GROUPS[i]
self.tocData.prostheses[group] = { self.tocData.prostheses[group] = {
isEquipped = false, isEquipped = false,
prostFactor = 0 prostFactor = 0