Refactor code for invoke_lua_source and world.init. Also, add compile_commands.json to luprex

This commit is contained in:
2025-06-16 19:58:26 -04:00
parent f150b14d30
commit 80ff7d7d92
14 changed files with 279 additions and 331 deletions

View File

@@ -1,14 +1,23 @@
makeclass("world")
makeclass('login')
makeclass("engio")
makeclass('cube')
makeclass('sphere')
-- This gets called on every login except the admin user.
function login.init()
local actor = tangible.actor()
dprint("login.init:", actor)
tangible.animinit(actor, {bp="character", plane="earth", xyz={0, 0, 90}})
tangible.build{class=cube, xyz={500,-100,0}}
tangible.build{class=sphere, xyz={500,100,0}}
end
-- This gets called on the admin user. You can call login.init in here if you want.
function world.init()
local actor = tangible.actor()
dprint("world.init:", actor)
tangible.build{class=cube, plane="earth", xyz={500,-100,0}}
tangible.build{class=sphere, plane="earth", xyz={500,100,0}}
login.init()
end
function engio.move(action, xyz, facing)