Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions scripts/reviver.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ local function picker_revive_selected_ghosts(event)
if selected.ghost_type == 'underground-belt' then
local name = selected.ghost_name
local belt_type = selected.belt_to_ground_type
player.build_from_cursor {position = position, direction = direction}
if belt_type == 'output' then
direction = (direction + 4) % 8
end

player.build_from_cursor {position = position, direction = direction}
local ent = player.surface.find_entity(name, position)
if ent then
if ent.belt_to_ground_type ~= belt_type then
ent.rotate()
end
ent.direction = direction
if belt_type == 'output' and ent then
ent.rotate()
end
elseif selected.ghost_type == 'pipe-to-ground' then
local name = selected.ghost_name
Expand Down