1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-02-11 13:39:17 +02:00

Fixed inserter train loading bug, by preserving the ghost entities direction

This commit is contained in:
Maik Wild 2017-09-28 02:02:01 +02:00
parent ff109a811f
commit dad4a5d91d

View File

@ -34,7 +34,7 @@ local function on_player_mined_item(event)
if event.entity.force.name ~= "enemy" and event.entity.force.name ~= "neutral" and event.entity.name ~= "entity-ghost" then
local entity_name = event.entity.name
if entity_name == "pipe-to-ground" then entity_name = "pipe" end
local ghost = game.surfaces[1].create_entity{name = "entity-ghost", position = event.entity.position, inner_name = entity_name, expires = false, force = "enemy"}
local ghost = game.surfaces[1].create_entity{name = "entity-ghost", position = event.entity.position, inner_name = entity_name, expires = false, force = "enemy", direction = event.entity.direction}
ghost.last_user = event.player_index
end
end