summaryrefslogtreecommitdiff
path: root/load.lua
diff options
context:
space:
mode:
authorthe lemons <citrons@mondecitronne.com>2022-08-28 01:13:24 -0500
committerthe lemons <citrons@mondecitronne.com>2022-08-28 01:22:32 -0500
commit3129926390486aa334bab648ced10bd928f99c93 (patch)
tree27621c85af53754afc02d194f027bdad8794975d /load.lua
parent56ea4768c6decc07df7fd9025561835ac8be9d64 (diff)
enable multiple runtimes
Diffstat (limited to 'load.lua')
-rw-r--r--load.lua11
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