-
Notifications
You must be signed in to change notification settings - Fork 5
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
RFC : Support for LUA #5
Comments
Patches would have to be ordered, which is more difficult in Lua. |
That's the trick - you will still need traditional patches. But a new operator would call a lua function:
The hard part (aside shoving lua on MM, of course) is where the lua code will reside. Having a |
However, there should be no-return calls too, like this:
|
No necessarily. Every function needs to return something - otherwise this feature has no place on Module Manager. Perhaps a MM Extension would be a better solution for this particular use case. But, even if we discover a feature where this would be necessary, the function can return NULL and MM would discard NULL returns silently. |
I agree with both solutions: separate scripting language and LUA functions |
That's the drill:
Thus guy had a hell of an idea, but I think it's too much of a hassle to implement.
So...
What if the all the advanced patch would be implemented on LUA, a pretty simple, straightforward language with a very lightweight runtime?
The code would reside on a file with the same name as the patch file, but with the excetion
lua
. MM would check the source URL of the patch, then check if it exists a correspondent.lua
file and if finds it, load it. Then a simple syntax change on MM itself would make the call for the code on that file.This will be simpler to implement (I have experience on LUA from my sjasm++ project) and since KSP2 team is using LUA extensively on the development, and assuming they will expose it for the Add'On authors, we would have one less barrier on supporting KSP2 later.
Additionally, there's this project embedding (or trying to) LUA into KSP, what makes the task more feasible.
The text was updated successfully, but these errors were encountered: