These aren't intended (at the moment) to be exposed to the script writer; it's needed so that classes with a GameScriptRotation member can have a default member initialiser.
Rename LARA_DRAW_TYPE to LARA_TYPE as it's used in more than just drawing code. Make WEATHER_TYPE a scoped enum (would have done this for LARA_TYPE too but didn't want to pepper casts in other parts of the codebase). Relabel constants in both enums.
Add kLaraTypes and kWeatherTypes and add them as tables in GameFlow.
Remove Background member - it's not level-specific so GameFlow is a better home for it.
Add (incomplete for now) documentation for some GameScriptLevel members - those I tested, at any rate.
Remove a lot of members which were unused and which represented level properties already accounted for in GameScriptLevel.
Make TITLE_TYPE an enum class and relabel its values.
Add TitleScreenImagePath and SetTitleScreenImagePath, which replaces GameScriptLevel's Background member.
Register GameScriptColor in GameFlowScript since we will be using it for the fog and sky layer properties of levels.
Make all GameScript maps unordered_maps, as these are supposed to be more suitable for cases where we don't need the data to be sorted.
Add default member initialisers to GameScript.
SetErrorMode is called via Lua in settings.lua to allow us or the LD to choose between the three ERROR_MODEs for script asserts.
ScriptWarn is for when we want to follow up on a failed assert in ERROR_MODE::WARN. e.g. if the player gives in an invalid HP value, we would ScriptWarn to tell them that the HP is being set to zero instead. If we added this information in ScriptAssert, we would end up displaying this message in TERMINATE mode, too - which is incorrect, since we won't have set the HP to zero, as we will have terminated the game.
Rework Level and Game tables as they weren't entirely working before. These correspond to m_locals and m_globals, which hold the level-specific and game-spanning data that will go into save files.
Make GetVariable and SetVariable take sol::table args. Sol seems to require this in order to use them as metamethods of a table (it doesn't require them for usertypes, but it seems more logical from the API point of view for Level and Game to be tables).
Add documentation for the above tables.
Move several functions out of the GameScript class in order to simplify its interface, and make them static functions that only live in GameLogicScript.cpp.
Remove g_GameScript from GameLogicScript.cpp as it's not used there; let winmain.cpp deal with it instead.
For recoverable errors, add some recovery behaviour and logging so a level designer can see in the log what was done as a result of the error.
Warn about default behaviour if no callbacks are added.
This is to be used when an error is discovered in a Lua Script.
The var ScriptErrorMode refers to the error mode the user has chosen (silent, warn, terminate). At the moment this is hardcoded but will soon become editable to a LD via settings.
ScriptAssert will read this variable and take the appropriate action when an assert is failed.
IGNORE will do nothing (we should make a note in the documentation that this should almost certainly not be used by the LD if they can avoid it).
WARN will call TENLog with LogLevel::Warn.
TERMINATE will throw a TENScriptException, where it will be caught at GameMain, where TENLog will be called.
There are circumstances where we will HAVE to terminate, even if the user has opted not to (i.e. errors where there is nothing sensible that can be done, such as syntax errors that would terminate Lua anyway). For these, we can pass in ERROR_MODE::TERMINATE as the last variable.
Treat functions as global that would previously be accessed through the GameFlow table. This does pollute the global environment in Lua a bit, but keeps it consistent with the functions in GameLogicScript, which are all accessed as globals.
Add some default member initialisers.
Remove WriteDefaults. Rename Intro to IntroImagePath and make it a std::string.
Add some documentation for the functions of GameFlowScript.
Fix some comments.