diff options
| author | the lemons <citrons@mondecitronne.com> | 2022-08-28 01:13:24 -0500 |
|---|---|---|
| committer | the lemons <citrons@mondecitronne.com> | 2022-08-28 01:22:32 -0500 |
| commit | 3129926390486aa334bab648ced10bd928f99c93 (patch) | |
| tree | 27621c85af53754afc02d194f027bdad8794975d /load.lua | |
| parent | 56ea4768c6decc07df7fd9025561835ac8be9d64 (diff) | |
enable multiple runtimes
Diffstat (limited to 'load.lua')
| -rw-r--r-- | load.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/load.lua b/load.lua new file mode 100644 index 0000000..aefac62 --- /dev/null +++ b/load.lua @@ -0,0 +1,11 @@ +return function(args) + love.setDeprecationOutput(false) + + local runtime = "game" + if not love.filesystem.isFused() and args[1] == '-r' then + runtime = args[2] + end + local path = "runtime/"..runtime..".lua" + local rt = assert(loadstring(assert(love.filesystem.read(path)))) + return rt(unpack(args, 3)) +end |
