diff --git a/gamecore/init.lua b/gamecore/init.lua index 5a8da4c..0ceac21 100644 --- a/gamecore/init.lua +++ b/gamecore/init.lua @@ -35,13 +35,14 @@ utils = require(cwd .. "utils") local CoreSystem = Object:extend() local DebugSystem = require(cwd .. "debug") - local Options = require(cwd .. "options") local Input = require(cwd .. "input") local Screen = require(cwd .. "screen") local Lang = require(cwd .. "lang") local SceneManager = require(cwd .. "scenemanager") +local modules = require(cwd .. "modules") + require(cwd .. "callbacks") -- INIT FUNCTIONS @@ -54,6 +55,8 @@ function CoreSystem:new(DEBUGMODE) self.screen = Screen(self) self.scenemanager = SceneManager(self) self.lang = Lang(self) + + self.modules = modules end function CoreSystem:registerGameSystem(gamesystem) diff --git a/gamecore/modules/init.lua b/gamecore/modules/init.lua new file mode 100644 index 0000000..d965156 --- /dev/null +++ b/gamecore/modules/init.lua @@ -0,0 +1,32 @@ +-- modules : different modules that are usable as part of gamecore + +--[[ + Copyright © 2019 Kazhnuz + + Permission is hereby granted, free of charge, to any person obtaining a copy of + this software and associated documentation files (the "Software"), to deal in + the Software without restriction, including without limitation the rights to + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of + the Software, and to permit persons to whom the Software is furnished to do so, + subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +]] + +local modules = {} + +local cwd = (...):gsub('%.init$', '') .. "." + +modules.Assets = require(cwd .. "assets") +modules.GameSystem = require(cwd .. "gamesystem") +modules.MenuSystem = require(cwd .. "menusystem") + +return modules