1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-01-18 03:21:47 +02:00

Fix nil ref in train_station_names Closes #440 (#441)

This commit is contained in:
Matthew 2018-11-22 19:03:15 -05:00 committed by Valansch
parent 8b0febb478
commit 8db491634d

View File

@ -10,7 +10,7 @@ local function player_built_entity(event)
if entity.name == 'train-stop' then
local y = math.random(1, 3)
if y ~= 1 then
local x = math.random(1, #Game.players)
local x = math.random(1, #game.players)
local player = Game.get_player_by_index(x)
event.created_entity.backer_name = player.name
end