diff --git a/media/lua/client/TOC_Test.lua b/media/lua/client/TOC_Test.lua new file mode 100644 index 0000000..bb6b936 --- /dev/null +++ b/media/lua/client/TOC_Test.lua @@ -0,0 +1,14 @@ +-- TODO TestFramework stuff here + +if not getActivatedMods():contains("TEST_FRAMEWORK") or not isDebugEnabled() then return end +local TestFramework = require("TestFramework/TestFramework") +local TestUtils = require("TestFramework/TestUtils") + +TestFramework.registerTestModule("Functionality", "Cut Left Hand", function() + local Tests = {} + + function Tests.CutLeftHand() + + end + +end) \ No newline at end of file diff --git a/media/lua/client/TimedActions/TOC_CutLimbAction.lua b/media/lua/client/TimedActions/TOC_CutLimbAction.lua index 3c1840c..5645b63 100644 --- a/media/lua/client/TimedActions/TOC_CutLimbAction.lua +++ b/media/lua/client/TimedActions/TOC_CutLimbAction.lua @@ -3,6 +3,7 @@ require "TimedActions/ISBaseTimedAction" local CutLimbAction = ISBaseTimedAction:derive("CutLimbAction") function CutLimbAction:new(patient, surgeon, partName) - + print("CUTLIMBACTION") end + return CutLimbAction \ No newline at end of file diff --git a/media/lua/client/TOC_UIHandler.lua b/media/lua/client/UI/TOC_CutLimbHandler.lua similarity index 87% rename from media/lua/client/TOC_UIHandler.lua rename to media/lua/client/UI/TOC_CutLimbHandler.lua index 2612e9a..26b87d4 100644 --- a/media/lua/client/TOC_UIHandler.lua +++ b/media/lua/client/UI/TOC_CutLimbHandler.lua @@ -1,5 +1,5 @@ -local BaseHandler = require("TOC_HealthPanelBaseHandler") -local CutLimbAction = require("TOC_CutLimbAction") +local BaseHandler = require("UI/TOC_HealthPanelBaseHandler") +local CutLimbAction = require("TimedActions/TOC_CutLimbAction") ---@class CutLimbHandler local CutLimbHandler = BaseHandler:derive("CutLimbHandler") @@ -48,10 +48,11 @@ function CutLimbHandler:dropItems(items) end function CutLimbHandler:isValid(itemType) - return self:isInjured() and self:getItemOfType(self.items.ITEMS, itemType) + return self:getItemOfType(self.items.ITEMS, itemType) end function CutLimbHandler:perform(previousAction, itemType) + print("perform cutlimbhandler") local item = self:getItemOfType(self.items.ITEMS, itemType) previousAction = self:toPlayerInventory(item, previousAction) diff --git a/media/lua/client/TOC_UI.lua b/media/lua/client/UI/TOC_HealthPanel.lua similarity index 96% rename from media/lua/client/TOC_UI.lua rename to media/lua/client/UI/TOC_HealthPanel.lua index aac64f4..92ad3c8 100644 --- a/media/lua/client/TOC_UI.lua +++ b/media/lua/client/UI/TOC_HealthPanel.lua @@ -1,4 +1,4 @@ -local CutLimbHandler = require("TOC_UIHandler") +local CutLimbHandler = require("UI/TOC_CutLimbHandler") -- TODO Use this to replace the sprites once a limb is cut ISHealthBodyPartPanel = ISBodyPartPanel:derive("ISHealthBodyPartPanel") diff --git a/media/lua/client/TOC_HealthPanelBaseHandler.lua b/media/lua/client/UI/TOC_HealthPanelBaseHandler.lua similarity index 100% rename from media/lua/client/TOC_HealthPanelBaseHandler.lua rename to media/lua/client/UI/TOC_HealthPanelBaseHandler.lua