-
Notifications
You must be signed in to change notification settings - Fork 804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Lua support #6689
Add Lua support #6689
Conversation
f191e6c
to
e91c703
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this uses a limited API for security reasons (i.e. later down the road a mod manager etc), you'll probably want an "unsafe mode" switch to unlock the filesystem and other things (for i.e. integrations such as Twitch and Archipelago).
fad7201
to
57a032c
Compare
limited API? unsafe mode? Archipelago? |
Games like Factorio and Noita limit/restrict the API for security reasons, as people can enable many mods through a simple one-click solution via some mod manager or Steam. I don't know if that's something you wanted to do or not. Some games like Starbound and Noita have a switch that you can enable to allow "unsafe" mods (usually called "unsafe mode", "allow unsafe mods", or "unrestrict lua API" etc). Archipelago. |
Yes, a way to enable multiple mods would be an eventual goal. |
It's unrestricted by default I think. A restricted mode would restrict or modify some of the main functions such as |
25a9473
to
2f76f46
Compare
e4e831d
to
1abcbec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome.
A very basic Lua integration that just links it in the most lame way possible (to see what platforms build) and adds a single event and a way to print message to the player.
The game will look for
lua/user.lua
on boot up. If you provide the following:You get this once the game loads:
The event system is somewhat based on the one from Project Zomboid https://pzwiki.net/wiki/Lua_Events/OnGameStart
Thought a good portion of it is implemented via Lua so mods can register and trigger there own events.