Moved all sanity checking for OptionRowHandlerLua to a separate function so that a malformed row does not crash StepMania, and instead prints an error to the log file, and creates a row that does nothing. Added AllowAnything arg to CheckEnum.

This commit is contained in:
Kyzentun
2014-06-25 12:08:57 -06:00
parent d472d28490
commit dcf819d297
6 changed files with 224 additions and 96 deletions
@@ -46,6 +46,8 @@ function FooMods()
-- PlayerNumbers that are allowed to use the row.
-- A row that can't be used by one player can be confusing for the players
-- so consider carefully before using this.
-- This function will be called an extra time during loading to ensure
-- it returns a table.
EnabledForPlayers= function(self)
Trace("FooMods:EnabledForPlayers() called.")
-- Leave out PLAYER_1 just for example.