diff --git a/media/lua/client/TOC/Controllers/LimitActionsController.lua b/media/lua/client/TOC/Controllers/LimitActionsController.lua index a51d557..65e4ac6 100644 --- a/media/lua/client/TOC/Controllers/LimitActionsController.lua +++ b/media/lua/client/TOC/Controllers/LimitActionsController.lua @@ -266,14 +266,3 @@ function ISWorldObjectContextMenu.createMenu(player, worldobjects, x, y, test) end -local og_ISOpenCloseDoor_perform = ISOpenCloseDoor.perform -function ISOpenCloseDoor:perform() - - if CachedDataHandler.GetBothHandsFeasibility() then - og_ISOpenCloseDoor_perform(self) - else - --getCore():getKey("Interact") - - ISBaseTimedAction.perform(self) - end -end \ No newline at end of file diff --git a/media/lua/server/TOC/LimitActionsController.lua b/media/lua/server/TOC/LimitActionsController.lua index 26bf7f8..a45a90d 100644 --- a/media/lua/server/TOC/LimitActionsController.lua +++ b/media/lua/server/TOC/LimitActionsController.lua @@ -1,7 +1,16 @@ -function ISObjectClickHandler.doClickCurtain(object, playerNum, playerObj) - TOC_DEBUG.print("Opening door") +local CachedDataHandler = require("TOC/Handlers/CachedDataHandler") - if not object:canInteractWith(playerObj) then return false end - object:ToggleDoor(playerObj) - return true -end + + +local og_ISObjectClickHandler_doClickSpecificObject = ISObjectClickHandler.doClickSpecificObject + +---@param object IsoObject +---@param playerNum any +---@param playerObj IsoPlayer +function ISObjectClickHandler.doClickSpecificObject(object, playerNum, playerObj) + if CachedDataHandler.GetBothHandsFeasibility() then + og_ISObjectClickHandler_doClickSpecificObject(object, playerNum, playerObj) + end + + return false +end \ No newline at end of file