mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-03-17 20:58:13 +02:00
player_modifiers.lua: fix undefined "player" variable
While trying to access update_player_modifiers, undefined "player" variable was used. It was corrected to game.players[event.player_index]
This commit is contained in:
parent
3cf61967aa
commit
3d95d8d633
@ -41,7 +41,7 @@ end
|
||||
|
||||
local function on_player_joined_game(event)
|
||||
if this[event.player_index] then
|
||||
Public.update_player_modifiers(player)
|
||||
Public.update_player_modifiers(game.players[event.player_index])
|
||||
return
|
||||
end
|
||||
this[event.player_index] = {}
|
||||
@ -58,4 +58,5 @@ local Event = require 'utils.event'
|
||||
Event.add(defines.events.on_player_joined_game, on_player_joined_game)
|
||||
Event.add(defines.events.on_player_respawned, on_player_respawned)
|
||||
|
||||
return Public
|
||||
return Public
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user