forgot to reneable stuff and more things in preparation for modular prost

This commit is contained in:
Pao
2023-02-11 03:34:20 +01:00
parent e84b6b65f1
commit 49fa5b3f62
4 changed files with 56 additions and 34 deletions

View File

@@ -72,17 +72,14 @@ function ISInventoryPane:onMouseDoubleClick(x, y)
local item_to_check = self.items[self.mouseOverOption]
local player_inventory = getPlayerInventory(self.player).inventory
-----------------------------------------------------------------------------------
-- TODO THIS IS DISABLED ONLY FOR TEST!!!!! REMEMBER TO RESTORE IT
-----------------------------------------------------------------------------------
-- if instanceof(item_to_check, "InventoryItem") then
-- og_ISInventoryPaneOnMouseDoubleClick(self, x, y)
-- elseif CheckIfItemIsAmputatedLimb(item_to_check.items[1]) or CheckIfItemIsInstalledProsthesis(item_to_check.items[1]) then
-- --print("TOC: Can't double click this item")
-- else
-- end
if instanceof(item_to_check, "InventoryItem") then
og_ISInventoryPaneOnMouseDoubleClick(self, x, y)
elseif CheckIfItemIsAmputatedLimb(item_to_check.items[1]) or CheckIfItemIsInstalledProsthesis(item_to_check.items[1]) then
--print("TOC: Can't double click this item")
end
og_ISInventoryPaneOnMouseDoubleClick(self, x, y)
@@ -96,17 +93,12 @@ function ISInventoryPane.getActualItems(items)
local ret = og_ISInventoryPaneGetActualItems(items)
-- This is gonna be slower than just overriding the function but hey it's more compatible
-----------------------------------------------------------------------------------
-- TODO THIS IS DISABLED ONLY FOR TEST!!!!! REMEMBER TO RESTORE IT
-----------------------------------------------------------------------------------
-- for i = 1, #ret do
-- local item_full_type = ret[i]:getFullType()
-- if string.find(item_full_type, "Amputation_") or string.find(item_full_type, "Prost_") then
-- table.remove(ret, i)
-- end
-- end
for i = 1, #ret do
local item_full_type = ret[i]:getFullType()
if string.find(item_full_type, "Amputation_") or string.find(item_full_type, "Prost_") then
table.remove(ret, i)
end
end
return ret
end

View File

@@ -32,6 +32,8 @@ function GenerateEquippedProsthesis(prosthesis_item, limb)
-- TODO Durability should be decided from the clothing item xml. Same thing for disassembling stuff
-- TODO some stuff should be defined by the limb, like -10 if forearm in speed
-- -- when we equip a prosthesis, we're gonna pass these parameters to the newly generated clothing item
-- -- when we unequip it, we regen the normal item with the parameters from the clothing item
local durability = 0
local speed = 0
@@ -80,10 +82,6 @@ end
-- -- Set mod data for item with durability and all that crap
-- -- when we equip a prosthesis, we're gonna pass these parameters to the newly generated clothing item
-- -- when we unequip it, we regen the normal item with the parameters from the clothing item
-- end