starcheat icon indicating copy to clipboard operation
starcheat copied to clipboard

Tech script default arguments

Open wizzomafizzo opened this issue 10 years ago • 0 comments

Tech lua scripts can have default arguments that need to be set in the inventory. If they are not set the game will crash when the tech is used.

The arguments are in a function called init and are all the assignments to the data object. It is probably possible to parse them just with some regex but blixt has suggested using AST to parse lua.

If this takes too long, we can add a bandaid solution, but I would like the end goal to be the AST solution since this will work much better in the long run.

wizzomafizzo avatar Apr 19 '14 02:04 wizzomafizzo