From bd2ec708a37742fa1062344eb8ba69988f20fa54 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Thu, 16 Sep 2021 21:51:32 +0200 Subject: [PATCH] improvement: use the scene message queue --- .../scenes/battlesystem/fighters/character/actions/flee.lua | 6 +++--- .../scenes/battlesystem/gui/menus/widgets.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/flee.lua b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/flee.lua index dea1186..96b605e 100644 --- a/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/flee.lua +++ b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/flee.lua @@ -15,17 +15,17 @@ function FleeAction:startAction() local stats = self.fighter.abstract.stats if (self.fighter.abstract.name == "shadow") then - self.fighter.turns.hud:showMessage("You won't flee the battle") + self.fighter.turnSystem.scene:showMessage("You won't flee the battle") self:finishAction() return end local chanceToFlee = self.fighter.turnSystem:getChanceTooFlee(self.fighter:getStat(STATS.SPEED)) if (math.random(100) < chanceToFlee) then - self.fighter.turnSystem.hud:showMessage("You flee the battle") + self.fighter.turnSystem.scene:showMessage("You flee the battle") self.fighter.turnSystem:fleeBattle() else - self.fighter.turnSystem.hud:showMessage("You failed to flee the battle") + self.fighter.turnSystem.scene:showMessage("You failed to flee the battle") self:finishAction() end diff --git a/sonic-radiance.love/scenes/battlesystem/gui/menus/widgets.lua b/sonic-radiance.love/scenes/battlesystem/gui/menus/widgets.lua index 441f494..7510b0a 100644 --- a/sonic-radiance.love/scenes/battlesystem/gui/menus/widgets.lua +++ b/sonic-radiance.love/scenes/battlesystem/gui/menus/widgets.lua @@ -134,7 +134,7 @@ function widgets.SkillWidget:sendCharacterData() core.debug:warning("cbs/menu", "skill " .. self.skillname .. " doesn't exist") self.character:doNothing() self.assets.sfx["mError"]:play() - self.scene.turns.hud:showMessage("You haven't enough PP!") + self.scene:showMessage("You haven't enough PP!") end end