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

Merge pull request #521 from plague006/fix/car_body

Fix car body directions
This commit is contained in:
Matthew
2018-12-07 16:28:11 -05:00
committed by GitHub

View File

@@ -2,7 +2,7 @@ local Event = require 'utils.event'
local Game = require 'utils.game'
local drivers_group = 'Drivers'
local directions = defines.direction
local random = math.random
local function transfer_body(player)
-- Remove the player from their character and place them in a car.
@@ -11,7 +11,7 @@ local function transfer_body(player)
local pos = force.get_spawn_position(surface)
-- Choose a random direction for the car to face
local dir = table.get_random(directions, true)
local dir = random(0, 7)
-- Remove the players' character
if player.character then