From 4bf6a9b78a3c394eef195e828154e62e1415739e Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 10 Apr 2021 15:58:53 +0200 Subject: [PATCH] chore: separate actors in folders --- .../scenes/overworld/actors/init.lua | 16 ++++++++-------- .../scenes/overworld/actors/loot/init.lua | 7 +++++++ .../overworld/actors/{ => loot}/itembox.lua | 0 .../scenes/overworld/actors/{ => loot}/ring.lua | 0 .../overworld/actors/{ => loot}/ringbox.lua | 0 .../actors/{player.lua => player/init.lua} | 0 6 files changed, 15 insertions(+), 8 deletions(-) create mode 100644 sonic-radiance.love/scenes/overworld/actors/loot/init.lua rename sonic-radiance.love/scenes/overworld/actors/{ => loot}/itembox.lua (100%) rename sonic-radiance.love/scenes/overworld/actors/{ => loot}/ring.lua (100%) rename sonic-radiance.love/scenes/overworld/actors/{ => loot}/ringbox.lua (100%) rename sonic-radiance.love/scenes/overworld/actors/{player.lua => player/init.lua} (100%) diff --git a/sonic-radiance.love/scenes/overworld/actors/init.lua b/sonic-radiance.love/scenes/overworld/actors/init.lua index 4342783..7c6481f 100644 --- a/sonic-radiance.love/scenes/overworld/actors/init.lua +++ b/sonic-radiance.love/scenes/overworld/actors/init.lua @@ -4,22 +4,22 @@ local Obj = {} local cwd = (...):gsub('%.init$', '') .. "." Obj.Player = require(cwd .. "player") Obj.Gizmo = require(cwd .. "gizmo") -Obj.Ring = require(cwd .. "ring") -Obj.ItemBox = require(cwd .. "itembox") -Obj.RingBox = require(cwd .. "ringbox") -Obj.Encounter = require(cwd .. "encounter") Obj.Teleporter = require(cwd .. "teleport") Obj.PNJ = require(cwd .. "pnj") +Obj.Encounter = require(cwd .. "encounter") + +Obj.loot = require(cwd .. "loot") Obj.index = {} Obj.index["player"] = Obj.Player Obj.index["gizmo"] = Obj.Gizmo -Obj.index["ring"] = Obj.Ring -Obj.index["itembox"] = Obj.ItemBox -Obj.index["ringbox"] = Obj.RingBox -Obj.index["encounter"] = Obj.Encounter Obj.index["teleporter"] = Obj.Teleporter Obj.index["pnj"] = Obj.PNJ +Obj.index["encounter"] = Obj.Encounter + +Obj.index["ring"] = Obj.loot.Ring +Obj.index["itembox"] = Obj.loot.ItemBox +Obj.index["ringbox"] = Obj.loot.RingBox Obj.collisions = {} Obj.collisions["wall"] = require(cwd .. "wall") diff --git a/sonic-radiance.love/scenes/overworld/actors/loot/init.lua b/sonic-radiance.love/scenes/overworld/actors/loot/init.lua new file mode 100644 index 0000000..9afbb91 --- /dev/null +++ b/sonic-radiance.love/scenes/overworld/actors/loot/init.lua @@ -0,0 +1,7 @@ +local Loot = {} + +Loot.Ring = require "scenes.overworld.actors.loot.ring" +Loot.RingBox = require "scenes.overworld.actors.loot.ringbox" +Loot.ItemBox = require "scenes.overworld.actors.loot.itembox" + +return Loot \ No newline at end of file diff --git a/sonic-radiance.love/scenes/overworld/actors/itembox.lua b/sonic-radiance.love/scenes/overworld/actors/loot/itembox.lua similarity index 100% rename from sonic-radiance.love/scenes/overworld/actors/itembox.lua rename to sonic-radiance.love/scenes/overworld/actors/loot/itembox.lua diff --git a/sonic-radiance.love/scenes/overworld/actors/ring.lua b/sonic-radiance.love/scenes/overworld/actors/loot/ring.lua similarity index 100% rename from sonic-radiance.love/scenes/overworld/actors/ring.lua rename to sonic-radiance.love/scenes/overworld/actors/loot/ring.lua diff --git a/sonic-radiance.love/scenes/overworld/actors/ringbox.lua b/sonic-radiance.love/scenes/overworld/actors/loot/ringbox.lua similarity index 100% rename from sonic-radiance.love/scenes/overworld/actors/ringbox.lua rename to sonic-radiance.love/scenes/overworld/actors/loot/ringbox.lua diff --git a/sonic-radiance.love/scenes/overworld/actors/player.lua b/sonic-radiance.love/scenes/overworld/actors/player/init.lua similarity index 100% rename from sonic-radiance.love/scenes/overworld/actors/player.lua rename to sonic-radiance.love/scenes/overworld/actors/player/init.lua