From 4445fec8d2208ae4a4615d8b81b6928e68ddcde3 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 17 Jul 2021 21:23:29 +0200 Subject: [PATCH] feat: wire up tags --- .../controllers/fighters/systems/choregraphy/init.lua | 3 ++- .../controllers/fighters/systems/choregraphy/step/addGFX.lua | 2 +- .../controllers/fighters/systems/choregraphy/step/addQTE.lua | 2 +- .../controllers/fighters/systems/choregraphy/step/goTo.lua | 1 + .../controllers/fighters/systems/choregraphy/step/jumpBack.lua | 1 + .../fighters/systems/choregraphy/step/setAnimation.lua | 1 + 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/init.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/init.lua index 36d3b1d..75108fb 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/init.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/init.lua @@ -82,13 +82,14 @@ function ChoregraphySystem:checkCondition(condition) return success end -function ChoregraphySystem:addQTE(action, origin, qteBaseData, blockProcess) +function ChoregraphySystem:addQTE(action, origin, qteBaseData, blockProcess, tag) local qteData = core.datas:parse("qtesteps", qteBaseData) if (qteObjectList[qteData.name] ~= nil) then core.debug:print("cbs/choregraphy", "Starting qte " .. qteData.name) self.qte.current = qteObjectList[qteData.name](self, qteData.arguments, 0, 0) self.qte.current:blockAction(action, blockProcess) self.qte.current:setOrigin(origin) + self.qte.current:setTag(tag) end end diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/addGFX.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/addGFX.lua index 8bdacb2..cb8349f 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/addGFX.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/addGFX.lua @@ -8,7 +8,7 @@ end function StepGFX:start() local x, y = self:getStepCoordinate() - self.choregraphy.world.obj.GFX(self.choregraphy.world, x, y, 0, self.arguments.sprite, self, self.arguments.blockProcess) + self.choregraphy.world.obj.GFX(self.choregraphy.world, x, y, 0, self.arguments.sprite, self, self.arguments.blockProcess, self.tag) if (not self.arguments.blockProcess) then self:finish() diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/addQTE.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/addQTE.lua index 47fd1d8..0971db1 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/addQTE.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/addQTE.lua @@ -6,7 +6,7 @@ function StepQTE:new(controller, args) end function StepQTE:start() - self.choregraphy:addQTE(self, self.arguments.origin, self.arguments.qteData, self.arguments.blockProcess) + self.choregraphy:addQTE(self, self.arguments.origin, self.arguments.qteData, self.arguments.blockProcess, self.tag) if (not self.arguments.blockProcess) then self:finish() end diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo.lua index 9bb6433..bc033d8 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/goTo.lua @@ -10,6 +10,7 @@ function GoToStep:start() local x, y = self:getStepCoordinate() self.choregraphy.actor:goTo(x, y, self.arguments.duration) + self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "goTo") if (self.arguments.blockProcess == false) then self:finish() else diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jumpBack.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jumpBack.lua index 94b6afd..9aeb743 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jumpBack.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/jumpBack.lua @@ -9,6 +9,7 @@ function JumpBackStep:start() self.choregraphy.actor:jumpBack() + self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "jump") if (self.arguments.blockProcess == false) then self:finish() else diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/setAnimation.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/setAnimation.lua index 406386f..bc4fd47 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/setAnimation.lua +++ b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/choregraphy/step/setAnimation.lua @@ -8,6 +8,7 @@ end function AnimationSetterStep:start() self.choregraphy.actor:changeAnimation(self.arguments.animation) + self.choregraphy.actor:addTaggedAction(self.tag, self.choregraphy, "animation") if (self.arguments.blockProcess == false) then self:finish() else