Fix instanceItem, oops
This commit is contained in:
@@ -365,5 +365,5 @@ end
|
|||||||
local og_ISClothingExtraAction_isValid = ISClothingExtraAction.isValid
|
local og_ISClothingExtraAction_isValid = ISClothingExtraAction.isValid
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function ISClothingExtraAction:isValid()
|
function ISClothingExtraAction:isValid()
|
||||||
return WrapClothingAction(self, og_ISClothingExtraAction_isValid, instanceItem.CreateItem(self.extra))
|
return WrapClothingAction(self, og_ISClothingExtraAction_isValid, instanceItem(self.extra))
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -128,14 +128,14 @@ local og_ISClothingExtraAction_isValid = ISClothingExtraAction.isValid
|
|||||||
function ISClothingExtraAction:isValid()
|
function ISClothingExtraAction:isValid()
|
||||||
local isEquippable = og_ISClothingExtraAction_isValid(self)
|
local isEquippable = og_ISClothingExtraAction_isValid(self)
|
||||||
-- self.extra is a string, not the item
|
-- self.extra is a string, not the item
|
||||||
local testItem = instanceItem.CreateItem(self.extra)
|
local testItem = instanceItem(self.extra)
|
||||||
return HandleProsthesisValidation(testItem, isEquippable)
|
return HandleProsthesisValidation(testItem, isEquippable)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local og_ISClothingExtraAction_perform = ISClothingExtraAction.perform
|
local og_ISClothingExtraAction_perform = ISClothingExtraAction.perform
|
||||||
function ISClothingExtraAction:perform()
|
function ISClothingExtraAction:perform()
|
||||||
local extraItem = instanceItem.CreateItem(self.extra)
|
local extraItem = instanceItem(self.extra)
|
||||||
ProsthesisHandler.SearchAndSetupProsthesis(extraItem, true)
|
ProsthesisHandler.SearchAndSetupProsthesis(extraItem, true)
|
||||||
og_ISClothingExtraAction_perform(self)
|
og_ISClothingExtraAction_perform(self)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -122,13 +122,14 @@ function ISDrinkFromBottle:new(character, item, uses)
|
|||||||
return action
|
return action
|
||||||
end
|
end
|
||||||
|
|
||||||
local og_ISFinalizeDealAction_new = ISFinalizeDealAction.new
|
-- FIX This doesn't exist anymore in B42
|
||||||
function ISFinalizeDealAction:new(player, otherPlayer, itemsToGive, itemsToReceive, time)
|
-- local og_ISFinalizeDealAction_new = ISFinalizeDealAction.new
|
||||||
local action = og_ISFinalizeDealAction_new(self, player, otherPlayer, itemsToGive, itemsToReceive, time)
|
-- function ISFinalizeDealAction:new(player, otherPlayer, itemsToGive, itemsToReceive, time)
|
||||||
--TOC_DEBUG.print("Override ISFinalizeDealAction")
|
-- local action = og_ISFinalizeDealAction_new(self, player, otherPlayer, itemsToGive, itemsToReceive, time)
|
||||||
action.skipTOC = true
|
-- --TOC_DEBUG.print("Override ISFinalizeDealAction")
|
||||||
return action
|
-- action.skipTOC = true
|
||||||
end
|
-- return action
|
||||||
|
-- end
|
||||||
|
|
||||||
local og_ISCampingInfoAction_new = ISCampingInfoAction.new
|
local og_ISCampingInfoAction_new = ISCampingInfoAction.new
|
||||||
function ISCampingInfoAction:new(character, campfireObject, campfire)
|
function ISCampingInfoAction:new(character, campfireObject, campfire)
|
||||||
|
|||||||
@@ -276,8 +276,8 @@ StaticData.AMPUTATION_CLOTHING_ITEM_BASE = "TOC.Amputation_"
|
|||||||
------------------
|
------------------
|
||||||
--* Items check
|
--* Items check
|
||||||
|
|
||||||
local sawObj = instanceItem.CreateItem("Base.Saw")
|
local sawObj = instanceItem("Base.Saw")
|
||||||
local gardenSawObj = instanceItem.CreateItem("Base.GardenSaw")
|
local gardenSawObj = instanceItem("Base.GardenSaw")
|
||||||
|
|
||||||
StaticData.SAWS_NAMES_IND_STR = {
|
StaticData.SAWS_NAMES_IND_STR = {
|
||||||
saw = sawObj:getName(),
|
saw = sawObj:getName(),
|
||||||
|
|||||||
Reference in New Issue
Block a user