We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6bb26f6 commit 478de7eCopy full SHA for 478de7e
exp_scenario/module/gui/player_bonus.lua
@@ -401,6 +401,9 @@ end
401
--- @param player LuaPlayer
402
function Elements.container.clear_player_bonus(player)
403
Elements.container.data[player] = {}
404
+ if not player.character then
405
+ return
406
+ end
407
for _, bonus_data in pairs(config.player_bonus) do
408
if not bonus_data.is_special then
409
player[bonus_data.name] = 0
0 commit comments