Code: Select all
railEntity = surface.create_entity{ force=game.player.force, name = "straight-rail", position = fPos, direction = defines.direction.west}
sPos = shallowcopy(fPos)
sPos.x = sPos.x+1
sPos.y = sPos.y-2
railSignalEntity = surface.create_entity{ force=game.player.force, name = "rail-signal", position = sPos, direction = defines.direction.west}
sPos.y = sPos.y+3
surface.create_entity{ force=game.player.force, name = "rail-chain-signal", position = sPos, direction = defines.direction.east}