1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-11-06 09:09:26 +02:00

Removed unessesary lines and variables

This commit is contained in:
JCA122204
2018-06-04 17:58:47 -04:00
committed by GitHub
parent e60d8ab69f
commit 99c319a4a2

View File

@@ -2,15 +2,12 @@ local Event = require 'utils.event'
local function player_built_entity(event)
local entity = event.created_entity
if not entity or not entity.valid then
return
end
if not entity or not entity.valid then return end
if entity.name == 'train-stop' then
local y = math.random(1, 3)
if y ~= 1 then
local total_players = #game.players
local x = math.random(1, total_players)
local x = math.random(1, #game.players)
local player = game.players[x]
event.created_entity.backer_name = player.name
end