I experienced the same crash after adding the mod to an existing single-player game. The problem is that in single player mode, on_player_joined_game
will be raised only once (directly after on_player_created
), not when loading a saved game. The only place where player data could be initialized in this case would be in on_configuration_changed
, but the mod only migrates tables there and doesn't create new ones. (@DiRten: By the way, why didn't you use migration files? Each migration file will be run only once, not each time a mod has been changed.)
I've fixed the crash by replacing lines 26 and 27 of libraries/update.lua with this:
for _, v in pairs(game.players) do
global.player_info[v.index] = global.player_info[v.index] or {color = v.color}
if v.gui.relative.player_color_sprite_button_open ~= nil then