Just a suggestion/request. I am not part of the Turbo Engine /Leadwerks Next beta, but would it be possible to change the way Script Properties work? Currently Leadwerks Handles the Script properties with hints comments as seen here:
Entity.myPath = "" --path "File location" "Texture File (*tex):tex|Texture"
Entity.myChoice = 1 --choice "Choice list" "Monster, Zombie, Alien"
Entity.myEditChoice = "Monster" --choiceedit "Choice list" "Monster, Zombie, Alien"
Entity.myEntity = nil --entity "Some entity
Would it be possible to change it to a more programmatic method such as this:
-- First Initialization Style: Explicit (they all result in the same function)
Entity._scriptProperties.myPath = {}
Entity._scriptProperties.myPath.Type = TurboEngine.ScriptProperties.Path -- Engine Enum
Entity._scriptProperties.myPath.Label = "File Location"
Entity._scriptProperties.myPath.Filter = "Texture File (*tex):tex|Texture"
-- Second Initialization Style: Inline (they all result in the same function)
Entity._scriptProperties.myChoice = {Type = TurboEngine.ScriptProperties.Choice, Label = "Choice List", Default = 1 , List = {"Monster", "Zombie", "Alien"}}
-- Second Initialization Style: Named As You Go (they all result in the same function)
Entity._scriptProperties.myEditChoice["Type"] = TurboEngine.ScriptProperties.ChoiceEdit
Entity._scriptProperties.myEditChoice["Label"] = "Choice List"
Entity._scriptProperties.myEditChoice["Default"] = 1
Entity._scriptProperties.myEditChoice["List"] = {"Monster", "Zombie", "Alien"}
Some of the benefits are:
The editor would just need to load the a scripts _scriptsproperties instead of needing to rely on reading the script and finding the comments
Creates a standardized interface to add properties
It further opens up the option of editor scripting
Creates the option of dynamic population of properties and choices (You can select 1 choice and another choice changes it's value
Easier to serialize
Some downsides:
Scripts will need to be rewritten
More verbose (will need to write more code to make something seemingly simple happen)
Requires a higher level of lua understanding (Will need to know how to use named tables and nested tables)
Potentially time consuming
This is something that I have been thinking about for a while and since it looks like you are taking the opportunity to use the Turbo Engine to make breaking changes I thought i might bring it up.