mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-01-30 04:30:58 +02:00
Fix train station names
This commit is contained in:
parent
bdc5d2ae77
commit
1d4acc8e35
@ -1,5 +1,4 @@
|
||||
local Event = require 'utils.event'
|
||||
local Game = require 'utils.game'
|
||||
|
||||
local function player_built_entity(event)
|
||||
local entity = event.created_entity
|
||||
@ -10,8 +9,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 = table.get_random(game.players, true)
|
||||
local player = Game.get_player_by_index(x)
|
||||
local player = table.get_random(game.players, true)
|
||||
event.created_entity.backer_name = player.name
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user