From cb6bd661745d5bf63eac00de53d0623555421a0e Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 15 Aug 2021 16:50:53 +0200 Subject: [PATCH] chore: completely redo the fighters organisation --- .../controllers/fighters/systems/actions/init.lua | 9 --------- .../controllers/fighters/systems/behaviours/init.lua | 5 ----- .../systems => fighters/character}/actions/attack.lua | 2 +- .../systems => fighters/character}/actions/defend.lua | 2 +- .../systems => fighters/character}/actions/flee.lua | 2 +- .../battlesystem/fighters/character/actions/init.lua | 9 +++++++++ .../systems => fighters/character}/actions/item.lua | 2 +- .../systems => fighters/character}/actions/parent.lua | 0 .../systems => fighters/character}/actions/skill.lua | 2 +- .../character.lua => fighters/character/init.lua} | 6 +++--- .../systems => fighters/character}/selection.lua | 0 .../{controllers/ennemy.lua => fighters/ennemies.lua} | 4 ++-- .../ennemyaction.lua => fighters/ennemy/action.lua} | 2 +- .../battlesystem/fighters/ennemy/behaviours/init.lua | 5 +++++ .../systems => fighters/ennemy}/behaviours/parent.lua | 0 .../systems => fighters/ennemy}/behaviours/random.lua | 2 +- .../fighters/villain.lua => fighters/ennemy/init.lua} | 6 +++--- .../fighters/parent.lua => fighters/fighter.lua} | 0 .../battlesystem/{controllers => fighters}/parent.lua | 0 .../battlesystem/{controllers => fighters}/player.lua | 4 ++-- sonic-radiance.love/scenes/battlesystem/turns.lua | 4 ++-- .../scenes/menus/debugmenus/choregraphy/mocks/action.lua | 2 +- 22 files changed, 34 insertions(+), 34 deletions(-) delete mode 100644 sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/init.lua delete mode 100644 sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/behaviours/init.lua rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/systems => fighters/character}/actions/attack.lua (78%) rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/systems => fighters/character}/actions/defend.lua (82%) rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/systems => fighters/character}/actions/flee.lua (90%) create mode 100644 sonic-radiance.love/scenes/battlesystem/fighters/character/actions/init.lua rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/systems => fighters/character}/actions/item.lua (89%) rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/systems => fighters/character}/actions/parent.lua (100%) rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/systems => fighters/character}/actions/skill.lua (83%) rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/character.lua => fighters/character/init.lua} (92%) rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/systems => fighters/character}/selection.lua (100%) rename sonic-radiance.love/scenes/battlesystem/{controllers/ennemy.lua => fighters/ennemies.lua} (90%) rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/systems/ennemyaction.lua => fighters/ennemy/action.lua} (84%) create mode 100644 sonic-radiance.love/scenes/battlesystem/fighters/ennemy/behaviours/init.lua rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/systems => fighters/ennemy}/behaviours/parent.lua (100%) rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/systems => fighters/ennemy}/behaviours/random.lua (74%) rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/villain.lua => fighters/ennemy/init.lua} (91%) rename sonic-radiance.love/scenes/battlesystem/{controllers/fighters/parent.lua => fighters/fighter.lua} (100%) rename sonic-radiance.love/scenes/battlesystem/{controllers => fighters}/parent.lua (100%) rename sonic-radiance.love/scenes/battlesystem/{controllers => fighters}/player.lua (77%) diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/init.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/init.lua deleted file mode 100644 index 1bc71ec..0000000 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/init.lua +++ /dev/null @@ -1,9 +0,0 @@ -local actions = {} - -actions.attack = require "scenes.battlesystem.controllers.fighters.systems.actions.attack" -actions.skill = require "scenes.battlesystem.controllers.fighters.systems.actions.skill" -actions.item = require "scenes.battlesystem.controllers.fighters.systems.actions.item" -actions.defend = require "scenes.battlesystem.controllers.fighters.systems.actions.defend" -actions.flee = require "scenes.battlesystem.controllers.fighters.systems.actions.flee" - -return actions diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/behaviours/init.lua b/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/behaviours/init.lua deleted file mode 100644 index 6676ba4..0000000 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/behaviours/init.lua +++ /dev/null @@ -1,5 +0,0 @@ -local folder = "scenes.battlesystem.controllers.fighters.systems.behaviours." - -return { - ["random"] = require(folder .. "random") -} diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/attack.lua b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/attack.lua similarity index 78% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/attack.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/character/actions/attack.lua index 7697633..8c2794d 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/attack.lua +++ b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/attack.lua @@ -1,4 +1,4 @@ -local ActionParent = require "scenes.battlesystem.controllers.fighters.systems.actions.parent" +local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent" local AttackAction = ActionParent:extend() function AttackAction:new(fighter) diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/defend.lua b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/defend.lua similarity index 82% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/defend.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/character/actions/defend.lua index ad5a2b9..04e26ae 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/defend.lua +++ b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/defend.lua @@ -1,4 +1,4 @@ -local ActionParent = require "scenes.battlesystem.controllers.fighters.systems.actions.parent" +local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent" local DefendAction = ActionParent:extend() function DefendAction:new(fighter) diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/flee.lua b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/flee.lua similarity index 90% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/flee.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/character/actions/flee.lua index 6360d18..dea1186 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/flee.lua +++ b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/flee.lua @@ -1,4 +1,4 @@ -local ActionParent = require "scenes.battlesystem.controllers.fighters.systems.actions.parent" +local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent" local FleeAction = ActionParent:extend() local STATS = require "datas.consts.stats" diff --git a/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/init.lua b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/init.lua new file mode 100644 index 0000000..d351d2d --- /dev/null +++ b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/init.lua @@ -0,0 +1,9 @@ +local actions = {} + +actions.attack = require "scenes.battlesystem.fighters.character.actions.attack" +actions.skill = require "scenes.battlesystem.fighters.character.actions.skill" +actions.item = require "scenes.battlesystem.fighters.character.actions.item" +actions.defend = require "scenes.battlesystem.fighters.character.actions.defend" +actions.flee = require "scenes.battlesystem.fighters.character.actions.flee" + +return actions diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/item.lua b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/item.lua similarity index 89% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/item.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/character/actions/item.lua index a2a6fac..316130a 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/item.lua +++ b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/item.lua @@ -1,4 +1,4 @@ -local ActionParent = require "scenes.battlesystem.controllers.fighters.systems.actions.parent" +local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent" local ItemAction = ActionParent:extend() local EffectManager = require "game.loot.effectManager" diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/parent.lua b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/parent.lua similarity index 100% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/parent.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/character/actions/parent.lua diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/skill.lua b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/skill.lua similarity index 83% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/skill.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/character/actions/skill.lua index b0dfcff..e1c3605 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/actions/skill.lua +++ b/sonic-radiance.love/scenes/battlesystem/fighters/character/actions/skill.lua @@ -1,4 +1,4 @@ -local ActionParent = require "scenes.battlesystem.controllers.fighters.systems.actions.parent" +local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent" local SkillAction = ActionParent:extend() function SkillAction:new(fighter, skill) diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/character.lua b/sonic-radiance.love/scenes/battlesystem/fighters/character/init.lua similarity index 92% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/character.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/character/init.lua index a113463..120dbc1 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/character.lua +++ b/sonic-radiance.love/scenes/battlesystem/fighters/character/init.lua @@ -1,9 +1,9 @@ -local FighterParent = require "scenes.battlesystem.controllers.fighters.parent" +local FighterParent = require "scenes.battlesystem.fighters.fighter" local HeroFighter = FighterParent:extend() local StatusBar = require "game.modules.gui.statusbar" -local SelectionSystem = require "scenes.battlesystem.controllers.fighters.systems.selection" -local actionList = require "scenes.battlesystem.controllers.fighters.systems.actions" +local SelectionSystem = require "scenes.battlesystem.fighters.character.selection" +local actionList = require "scenes.battlesystem.fighters.character.actions" local HEROES_LINE = 2; local HUDSIZE = 91 diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/selection.lua b/sonic-radiance.love/scenes/battlesystem/fighters/character/selection.lua similarity index 100% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/selection.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/character/selection.lua diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/ennemy.lua b/sonic-radiance.love/scenes/battlesystem/fighters/ennemies.lua similarity index 90% rename from sonic-radiance.love/scenes/battlesystem/controllers/ennemy.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/ennemies.lua index 41530e0..2b9f5ce 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/ennemy.lua +++ b/sonic-radiance.love/scenes/battlesystem/fighters/ennemies.lua @@ -1,7 +1,7 @@ -local FighterControllerParent = require "scenes.battlesystem.controllers.parent" +local FighterControllerParent = require "scenes.battlesystem.fighters.parent" local EnnemyController = FighterControllerParent:extend() -local Villain = require "scenes.battlesystem.controllers.fighters.villain" +local Villain = require "scenes.battlesystem.fighters.ennemy" local STATS = require "datas.consts.stats" function EnnemyController:new(owner, battleData) diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/ennemyaction.lua b/sonic-radiance.love/scenes/battlesystem/fighters/ennemy/action.lua similarity index 84% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/ennemyaction.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/ennemy/action.lua index e06fb8c..b561001 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/ennemyaction.lua +++ b/sonic-radiance.love/scenes/battlesystem/fighters/ennemy/action.lua @@ -1,4 +1,4 @@ -local ActionParent = require "scenes.battlesystem.controllers.fighters.systems.actions.parent" +local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent" local EnnemyAction = ActionParent:extend() function EnnemyAction:new(fighter, skill) diff --git a/sonic-radiance.love/scenes/battlesystem/fighters/ennemy/behaviours/init.lua b/sonic-radiance.love/scenes/battlesystem/fighters/ennemy/behaviours/init.lua new file mode 100644 index 0000000..ee42910 --- /dev/null +++ b/sonic-radiance.love/scenes/battlesystem/fighters/ennemy/behaviours/init.lua @@ -0,0 +1,5 @@ +local folder = "scenes.battlesystem.fighters.ennemy.behaviours." + +return { + ["random"] = require(folder .. "random") +} diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/behaviours/parent.lua b/sonic-radiance.love/scenes/battlesystem/fighters/ennemy/behaviours/parent.lua similarity index 100% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/behaviours/parent.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/ennemy/behaviours/parent.lua diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/behaviours/random.lua b/sonic-radiance.love/scenes/battlesystem/fighters/ennemy/behaviours/random.lua similarity index 74% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/behaviours/random.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/ennemy/behaviours/random.lua index 9922355..b79c4ce 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/systems/behaviours/random.lua +++ b/sonic-radiance.love/scenes/battlesystem/fighters/ennemy/behaviours/random.lua @@ -1,4 +1,4 @@ -local ParentBehaviour = require "scenes.battlesystem.controllers.fighters.systems.behaviours.parent" +local ParentBehaviour = require "scenes.battlesystem.fighters.ennemy.behaviours.parent" local RandomBehaviour = ParentBehaviour:extend() function RandomBehaviour:new(fighter, skilldata, targetList) diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/villain.lua b/sonic-radiance.love/scenes/battlesystem/fighters/ennemy/init.lua similarity index 91% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/villain.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/ennemy/init.lua index 948a6cf..932026a 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/villain.lua +++ b/sonic-radiance.love/scenes/battlesystem/fighters/ennemy/init.lua @@ -1,10 +1,10 @@ -local FighterParent = require "scenes.battlesystem.controllers.fighters.parent" +local FighterParent = require "scenes.battlesystem.fighters.fighter" local VillainFighter = FighterParent:extend() local SimpleHPBar = require "game.modules.gui.simplehpbar" local BossHPBar = require "game.modules.gui.bosshpbar" -local EnnemyAction = require "scenes.battlesystem.controllers.fighters.systems.ennemyaction" -local behaviourList = require "scenes.battlesystem.controllers.fighters.systems.behaviours" +local EnnemyAction = require "scenes.battlesystem.fighters.ennemy.action" +local behaviourList = require "scenes.battlesystem.fighters.ennemy.behaviours" local POSITIONS = {1, 3, 5} diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/fighters/parent.lua b/sonic-radiance.love/scenes/battlesystem/fighters/fighter.lua similarity index 100% rename from sonic-radiance.love/scenes/battlesystem/controllers/fighters/parent.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/fighter.lua diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/parent.lua b/sonic-radiance.love/scenes/battlesystem/fighters/parent.lua similarity index 100% rename from sonic-radiance.love/scenes/battlesystem/controllers/parent.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/parent.lua diff --git a/sonic-radiance.love/scenes/battlesystem/controllers/player.lua b/sonic-radiance.love/scenes/battlesystem/fighters/player.lua similarity index 77% rename from sonic-radiance.love/scenes/battlesystem/controllers/player.lua rename to sonic-radiance.love/scenes/battlesystem/fighters/player.lua index cf9d54f..6094d04 100644 --- a/sonic-radiance.love/scenes/battlesystem/controllers/player.lua +++ b/sonic-radiance.love/scenes/battlesystem/fighters/player.lua @@ -1,7 +1,7 @@ -local FighterControllerParent = require "scenes.battlesystem.controllers.parent" +local FighterControllerParent = require "scenes.battlesystem.fighters.parent" local HeroFighterController = FighterControllerParent:extend() -local Character = require "scenes.battlesystem.controllers.fighters.character" +local Character = require "scenes.battlesystem.fighters.character" function HeroFighterController:new(owner) self.super.new(self, owner) diff --git a/sonic-radiance.love/scenes/battlesystem/turns.lua b/sonic-radiance.love/scenes/battlesystem/turns.lua index 80af613..e4f61de 100644 --- a/sonic-radiance.love/scenes/battlesystem/turns.lua +++ b/sonic-radiance.love/scenes/battlesystem/turns.lua @@ -1,7 +1,7 @@ local TurnController = Object:extend() -local Player = require "scenes.battlesystem.controllers.player" -local Ennemy = require "scenes.battlesystem.controllers.ennemy" +local Player = require "scenes.battlesystem.fighters.player" +local Ennemy = require "scenes.battlesystem.fighters.ennemies" local HUD = require "scenes.battlesystem.gui.hud" diff --git a/sonic-radiance.love/scenes/menus/debugmenus/choregraphy/mocks/action.lua b/sonic-radiance.love/scenes/menus/debugmenus/choregraphy/mocks/action.lua index 7095fb5..59314ae 100644 --- a/sonic-radiance.love/scenes/menus/debugmenus/choregraphy/mocks/action.lua +++ b/sonic-radiance.love/scenes/menus/debugmenus/choregraphy/mocks/action.lua @@ -1,4 +1,4 @@ -local ActionParent = require "scenes.battlesystem.controllers.fighters.systems.actions.parent" +local ActionParent = require "scenes.battlesystem.fighters.character.actions.parent" local ActionMock = ActionParent:extend() local ChoregraphySystem = require "scenes.battlesystem.choregraphy"