1
0
mirror of https://github.com/Refactorio/RedMew.git synced 2025-03-03 14:53:01 +02:00

Fixed that underground pipes could not reconnect because a ghost underground pipe was placed \n Instead a normal pipe is now placed

This commit is contained in:
Maik Wild 2017-09-27 23:59:41 +02:00
parent 13d40e2437
commit 2d260dd4bb

View File

@ -30,7 +30,9 @@ end
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 ghost = game.surfaces[1].create_entity{name = "entity-ghost", position = event.entity.position, inner_name = event.entity.name, expires = false, force = "enemy"}
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"}
ghost.last_user = event.player_index
end
end