From 3d3fdc44c0a79acc29a5b50117ed9cd4fe66ee4a Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sun, 15 Aug 2021 15:39:16 +0200 Subject: [PATCH] chore: make subgame worlds part of subgame folder --- sonic-radiance.love/game/modules/subgames/init.lua | 2 +- .../{ => subgames}/world/actors/collisions/fakefloor.lua | 0 .../{ => subgames}/world/actors/collisions/floor.lua | 0 .../{ => subgames}/world/actors/collisions/invisible.lua | 0 .../{ => subgames}/world/actors/collisions/textured.lua | 0 .../{ => subgames}/world/actors/collisions/wall.lua | 0 .../game/modules/{ => subgames}/world/actors/init.lua | 0 .../{ => subgames}/world/actors/items/collectible.lua | 2 +- .../modules/{ => subgames}/world/actors/items/ring.lua | 0 .../game/modules/{ => subgames}/world/actors/parent.lua | 0 .../modules/{ => subgames}/world/actors/player/init.lua | 0 .../game/modules/{ => subgames}/world/battle.lua | 4 ++-- .../game/modules/{ => subgames}/world/maps/battle.lua | 0 .../game/modules/subgames/world/maps/init.lua | 7 +++++++ .../game/modules/{ => subgames}/world/maps/shoot.lua | 2 +- .../game/modules/{ => subgames}/world/maps/test.lua | 0 .../game/modules/{ => subgames}/world/maps/tools/chunk.lua | 2 +- .../{ => subgames}/world/maps/tools/chunkterrain.lua | 0 .../game/modules/{ => subgames}/world/parent.lua | 4 ++-- .../game/modules/{ => subgames}/world/shoot.lua | 4 ++-- sonic-radiance.love/game/modules/world/maps/init.lua | 7 ------- sonic-radiance.love/scenes/subgames/testBattle/init.lua | 6 +----- sonic-radiance.love/scenes/subgames/testShoot/init.lua | 6 +----- 23 files changed, 19 insertions(+), 27 deletions(-) rename sonic-radiance.love/game/modules/{ => subgames}/world/actors/collisions/fakefloor.lua (100%) rename sonic-radiance.love/game/modules/{ => subgames}/world/actors/collisions/floor.lua (100%) rename sonic-radiance.love/game/modules/{ => subgames}/world/actors/collisions/invisible.lua (100%) rename sonic-radiance.love/game/modules/{ => subgames}/world/actors/collisions/textured.lua (100%) rename sonic-radiance.love/game/modules/{ => subgames}/world/actors/collisions/wall.lua (100%) rename sonic-radiance.love/game/modules/{ => subgames}/world/actors/init.lua (100%) rename sonic-radiance.love/game/modules/{ => subgames}/world/actors/items/collectible.lua (78%) rename sonic-radiance.love/game/modules/{ => subgames}/world/actors/items/ring.lua (100%) rename sonic-radiance.love/game/modules/{ => subgames}/world/actors/parent.lua (100%) rename sonic-radiance.love/game/modules/{ => subgames}/world/actors/player/init.lua (100%) rename sonic-radiance.love/game/modules/{ => subgames}/world/battle.lua (73%) rename sonic-radiance.love/game/modules/{ => subgames}/world/maps/battle.lua (100%) create mode 100644 sonic-radiance.love/game/modules/subgames/world/maps/init.lua rename sonic-radiance.love/game/modules/{ => subgames}/world/maps/shoot.lua (98%) rename sonic-radiance.love/game/modules/{ => subgames}/world/maps/test.lua (100%) rename sonic-radiance.love/game/modules/{ => subgames}/world/maps/tools/chunk.lua (97%) rename sonic-radiance.love/game/modules/{ => subgames}/world/maps/tools/chunkterrain.lua (100%) rename sonic-radiance.love/game/modules/{ => subgames}/world/parent.lua (91%) rename sonic-radiance.love/game/modules/{ => subgames}/world/shoot.lua (78%) delete mode 100644 sonic-radiance.love/game/modules/world/maps/init.lua diff --git a/sonic-radiance.love/game/modules/subgames/init.lua b/sonic-radiance.love/game/modules/subgames/init.lua index 6435a3a..ea36e8d 100644 --- a/sonic-radiance.love/game/modules/subgames/init.lua +++ b/sonic-radiance.love/game/modules/subgames/init.lua @@ -2,7 +2,7 @@ local Scene = require("birb.modules.scenes") local PlayStyle = Scene:extend() local PauseMenu = require("game.modules.subgames.pause") -local TestWorld = require("game.modules.world.parent") +local TestWorld = require("game.modules.subgames.world.parent") function PlayStyle:new(supportedLevels, missionfile) diff --git a/sonic-radiance.love/game/modules/world/actors/collisions/fakefloor.lua b/sonic-radiance.love/game/modules/subgames/world/actors/collisions/fakefloor.lua similarity index 100% rename from sonic-radiance.love/game/modules/world/actors/collisions/fakefloor.lua rename to sonic-radiance.love/game/modules/subgames/world/actors/collisions/fakefloor.lua diff --git a/sonic-radiance.love/game/modules/world/actors/collisions/floor.lua b/sonic-radiance.love/game/modules/subgames/world/actors/collisions/floor.lua similarity index 100% rename from sonic-radiance.love/game/modules/world/actors/collisions/floor.lua rename to sonic-radiance.love/game/modules/subgames/world/actors/collisions/floor.lua diff --git a/sonic-radiance.love/game/modules/world/actors/collisions/invisible.lua b/sonic-radiance.love/game/modules/subgames/world/actors/collisions/invisible.lua similarity index 100% rename from sonic-radiance.love/game/modules/world/actors/collisions/invisible.lua rename to sonic-radiance.love/game/modules/subgames/world/actors/collisions/invisible.lua diff --git a/sonic-radiance.love/game/modules/world/actors/collisions/textured.lua b/sonic-radiance.love/game/modules/subgames/world/actors/collisions/textured.lua similarity index 100% rename from sonic-radiance.love/game/modules/world/actors/collisions/textured.lua rename to sonic-radiance.love/game/modules/subgames/world/actors/collisions/textured.lua diff --git a/sonic-radiance.love/game/modules/world/actors/collisions/wall.lua b/sonic-radiance.love/game/modules/subgames/world/actors/collisions/wall.lua similarity index 100% rename from sonic-radiance.love/game/modules/world/actors/collisions/wall.lua rename to sonic-radiance.love/game/modules/subgames/world/actors/collisions/wall.lua diff --git a/sonic-radiance.love/game/modules/world/actors/init.lua b/sonic-radiance.love/game/modules/subgames/world/actors/init.lua similarity index 100% rename from sonic-radiance.love/game/modules/world/actors/init.lua rename to sonic-radiance.love/game/modules/subgames/world/actors/init.lua diff --git a/sonic-radiance.love/game/modules/world/actors/items/collectible.lua b/sonic-radiance.love/game/modules/subgames/world/actors/items/collectible.lua similarity index 78% rename from sonic-radiance.love/game/modules/world/actors/items/collectible.lua rename to sonic-radiance.love/game/modules/subgames/world/actors/items/collectible.lua index c09c971..a977081 100644 --- a/sonic-radiance.love/game/modules/world/actors/items/collectible.lua +++ b/sonic-radiance.love/game/modules/subgames/world/actors/items/collectible.lua @@ -1,4 +1,4 @@ -local Parent = require "game.modules.world.actors.parent" +local Parent = require "game.modules.subgames.world.actors.parent" local Collectible = Parent:extend() function Collectible:new(world, x, y, z, w, h, d) diff --git a/sonic-radiance.love/game/modules/world/actors/items/ring.lua b/sonic-radiance.love/game/modules/subgames/world/actors/items/ring.lua similarity index 100% rename from sonic-radiance.love/game/modules/world/actors/items/ring.lua rename to sonic-radiance.love/game/modules/subgames/world/actors/items/ring.lua diff --git a/sonic-radiance.love/game/modules/world/actors/parent.lua b/sonic-radiance.love/game/modules/subgames/world/actors/parent.lua similarity index 100% rename from sonic-radiance.love/game/modules/world/actors/parent.lua rename to sonic-radiance.love/game/modules/subgames/world/actors/parent.lua diff --git a/sonic-radiance.love/game/modules/world/actors/player/init.lua b/sonic-radiance.love/game/modules/subgames/world/actors/player/init.lua similarity index 100% rename from sonic-radiance.love/game/modules/world/actors/player/init.lua rename to sonic-radiance.love/game/modules/subgames/world/actors/player/init.lua diff --git a/sonic-radiance.love/game/modules/world/battle.lua b/sonic-radiance.love/game/modules/subgames/world/battle.lua similarity index 73% rename from sonic-radiance.love/game/modules/world/battle.lua rename to sonic-radiance.love/game/modules/subgames/world/battle.lua index 183f74a..162008a 100644 --- a/sonic-radiance.love/game/modules/world/battle.lua +++ b/sonic-radiance.love/game/modules/subgames/world/battle.lua @@ -1,7 +1,7 @@ -local ParentWorld = require "game.modules.world.parent" +local ParentWorld = require "game.modules.subgames.world.parent" local BattleWorld = ParentWorld:extend() -local customMap = require "game.modules.world.maps" +local customMap = require "game.modules.subgames.world.maps" function BattleWorld:new(scene, mapname) local mappath = game.utils.getMapPath("battle", mapname) diff --git a/sonic-radiance.love/game/modules/world/maps/battle.lua b/sonic-radiance.love/game/modules/subgames/world/maps/battle.lua similarity index 100% rename from sonic-radiance.love/game/modules/world/maps/battle.lua rename to sonic-radiance.love/game/modules/subgames/world/maps/battle.lua diff --git a/sonic-radiance.love/game/modules/subgames/world/maps/init.lua b/sonic-radiance.love/game/modules/subgames/world/maps/init.lua new file mode 100644 index 0000000..e3a6577 --- /dev/null +++ b/sonic-radiance.love/game/modules/subgames/world/maps/init.lua @@ -0,0 +1,7 @@ +local customMap = {} + +customMap.Test = require "game.modules.subgames.world.maps.test" +customMap.Battle = require "game.modules.subgames.world.maps.battle" +customMap.Shoot = require "game.modules.subgames.world.maps.shoot" + +return customMap diff --git a/sonic-radiance.love/game/modules/world/maps/shoot.lua b/sonic-radiance.love/game/modules/subgames/world/maps/shoot.lua similarity index 98% rename from sonic-radiance.love/game/modules/world/maps/shoot.lua rename to sonic-radiance.love/game/modules/subgames/world/maps/shoot.lua index b001ffe..3e57f60 100644 --- a/sonic-radiance.love/game/modules/world/maps/shoot.lua +++ b/sonic-radiance.love/game/modules/subgames/world/maps/shoot.lua @@ -7,7 +7,7 @@ local TESTZONE = "forest" local zoneDatas = require "datas.gamedata.maps.shoot.zones" local Background = require "game.modules.drawing.parallaxBackground" -local Chunk = require "game.modules.world.maps.tools.chunk" +local Chunk = require "game.modules.subgames.world.maps.tools.chunk" function ShootMap:new(world, maptype, mapname) ShootMap.super.new(self, world) diff --git a/sonic-radiance.love/game/modules/world/maps/test.lua b/sonic-radiance.love/game/modules/subgames/world/maps/test.lua similarity index 100% rename from sonic-radiance.love/game/modules/world/maps/test.lua rename to sonic-radiance.love/game/modules/subgames/world/maps/test.lua diff --git a/sonic-radiance.love/game/modules/world/maps/tools/chunk.lua b/sonic-radiance.love/game/modules/subgames/world/maps/tools/chunk.lua similarity index 97% rename from sonic-radiance.love/game/modules/world/maps/tools/chunk.lua rename to sonic-radiance.love/game/modules/subgames/world/maps/tools/chunk.lua index a254eef..963bbca 100644 --- a/sonic-radiance.love/game/modules/world/maps/tools/chunk.lua +++ b/sonic-radiance.love/game/modules/subgames/world/maps/tools/chunk.lua @@ -1,5 +1,5 @@ local Chunk = Object:extend() -local ChunkTerrain = require "game.modules.world.maps.tools.chunkterrain" +local ChunkTerrain = require "game.modules.subgames.world.maps.tools.chunkterrain" function Chunk:new(map, data) self.map = map diff --git a/sonic-radiance.love/game/modules/world/maps/tools/chunkterrain.lua b/sonic-radiance.love/game/modules/subgames/world/maps/tools/chunkterrain.lua similarity index 100% rename from sonic-radiance.love/game/modules/world/maps/tools/chunkterrain.lua rename to sonic-radiance.love/game/modules/subgames/world/maps/tools/chunkterrain.lua diff --git a/sonic-radiance.love/game/modules/world/parent.lua b/sonic-radiance.love/game/modules/subgames/world/parent.lua similarity index 91% rename from sonic-radiance.love/game/modules/world/parent.lua rename to sonic-radiance.love/game/modules/subgames/world/parent.lua index b55dcc4..3bf246f 100644 --- a/sonic-radiance.love/game/modules/world/parent.lua +++ b/sonic-radiance.love/game/modules/subgames/world/parent.lua @@ -1,13 +1,13 @@ local World3D = require "birb.modules.world.world3D" local ParentWorld = World3D:extend() -local customMap = require "game.modules.world.maps" +local customMap = require "game.modules.subgames.world.maps" function ParentWorld:new(scene, maptype, mapname) local mappath = game.utils.getMapPath("test", "test") self.customMap = customMap - ParentWorld.super.new(self, scene, "game.modules.world.actors", mappath, maptype) + ParentWorld.super.new(self, scene, "game.modules.subgames.world.actors", mappath, maptype) self.mapname = mapname self.autorun = false diff --git a/sonic-radiance.love/game/modules/world/shoot.lua b/sonic-radiance.love/game/modules/subgames/world/shoot.lua similarity index 78% rename from sonic-radiance.love/game/modules/world/shoot.lua rename to sonic-radiance.love/game/modules/subgames/world/shoot.lua index 63a692c..4c62f79 100644 --- a/sonic-radiance.love/game/modules/world/shoot.lua +++ b/sonic-radiance.love/game/modules/subgames/world/shoot.lua @@ -1,7 +1,7 @@ -local ParentWorld = require "game.modules.world.parent" +local ParentWorld = require "game.modules.subgames.world.parent" local ShootWorld = ParentWorld:extend() -local customMap = require "game.modules.world.maps" +local customMap = require "game.modules.subgames.world.maps" function ShootWorld:new(scene, mapname) local mappath = game.utils.getMapPath("shoot", mapname) diff --git a/sonic-radiance.love/game/modules/world/maps/init.lua b/sonic-radiance.love/game/modules/world/maps/init.lua deleted file mode 100644 index 41f47b0..0000000 --- a/sonic-radiance.love/game/modules/world/maps/init.lua +++ /dev/null @@ -1,7 +0,0 @@ -local customMap = {} - -customMap.Test = require "game.modules.world.maps.test" -customMap.Battle = require "game.modules.world.maps.battle" -customMap.Shoot = require "game.modules.world.maps.shoot" - -return customMap diff --git a/sonic-radiance.love/scenes/subgames/testBattle/init.lua b/sonic-radiance.love/scenes/subgames/testBattle/init.lua index 29cbf33..6f783fd 100644 --- a/sonic-radiance.love/scenes/subgames/testBattle/init.lua +++ b/sonic-radiance.love/scenes/subgames/testBattle/init.lua @@ -24,9 +24,7 @@ local PlayStyle = require "game.modules.subgames" local MovePlayer = PlayStyle:extend() -local TestWorld = require "game.modules.world.parent" -local ShootWorld = require "game.modules.world.shoot" -local BattleWorld = require "game.modules.world.battle" +local BattleWorld = require "game.modules.subgames.world.battle" function MovePlayer:new(map) self.map = map @@ -34,9 +32,7 @@ function MovePlayer:new(map) end function MovePlayer:initWorld() - --ShootWorld(self, "testlevel.test1") BattleWorld(self, self.map) - --TestWorld(self) end return MovePlayer diff --git a/sonic-radiance.love/scenes/subgames/testShoot/init.lua b/sonic-radiance.love/scenes/subgames/testShoot/init.lua index 8fa6adb..2fdc472 100644 --- a/sonic-radiance.love/scenes/subgames/testShoot/init.lua +++ b/sonic-radiance.love/scenes/subgames/testShoot/init.lua @@ -24,9 +24,7 @@ local PlayStyle = require "game.modules.subgames" local MovePlayer = PlayStyle:extend() -local TestWorld = require "game.modules.world.parent" -local ShootWorld = require "game.modules.world.shoot" -local BattleWorld = require "game.modules.world.battle" +local ShootWorld = require "game.modules.subgames.world.shoot" function MovePlayer:new(map) self.map = map @@ -35,8 +33,6 @@ end function MovePlayer:initWorld() ShootWorld(self, "testlevel.test1") - --BattleWorld(self, self.map) - --TestWorld(self) end return MovePlayer