Require gets a string passed in. The string should be one of three things:
Another scripts identifier require("script-id"). This would give whatever is returned by the scripts entrypoint.
A path within the script calling require require("path.to.library"). This would be a path relative to the script calling require. It would give whatever's returned by the script on execution.
A mods provided identifier require("mod-id"). This would give whatever is returned by a mod providing an external API for use within allium. (If you are a developer and do this, I love you.)
I recall require stores loaded packages in a table packages.something... To keep compat with Lua we'll have to respect this. Shouldn't be to bad. Simply mentioning it here as a reminder to anyone attempting an implementation (ie: me)
Require gets a string passed in. The string should be one of three things:
require("script-id")
. This would give whatever is returned by the scriptsentrypoint
.require("path.to.library")
. This would be a path relative to the script calling require. It would give whatever's returned by the script on execution.require("mod-id")
. This would give whatever is returned by a mod providing an external API for use within allium. (If you are a developer and do this, I love you.)I recall require stores loaded packages in a table
packages.something
... To keep compat with Lua we'll have to respect this. Shouldn't be to bad. Simply mentioning it here as a reminder to anyone attempting an implementation (ie: me)