[2.0.76] Rolling stock ghost cannot revive when an adjacent rail is a ghost
Posted: Fri May 15, 2026 1:39 am
Take the following setup, note the rail ghost on the right:
place a rolling stock ghost within 2 rail segments of the rail ghost:
/c LOCO = game.player.surface.create_entity{name="entity-ghost", inner_name="locomotive", position={-1.9, -1}, force="player"} Attempting to revive the locomotive ghost fails (/c LOCO.revive()) even though the bounding box is completely within the built rail segments.
A manually placed rolling stock is possible get much closer to the ghost rail segment as shown here. Additionally, this locomotive is unable to be revived simply because the branch rail is a ghost. With this setup, the placement order doesn't matter. Having a built straight rail with a ghost locomotive, the locomotive becomes unrevivable as soon as the ghost rail branch is placed.
This is causing a bug in space exploration where I'm trying to revive rolling stock ghosts at the edge of the space elevator. Rolling stock can become unrevivable due to a nearby rail ghost even though the rail ghost shouldn't be interacting with the rolling stock.
/c LOCO = game.player.surface.create_entity{name="entity-ghost", inner_name="locomotive", position={-1.9, -1}, force="player"} Attempting to revive the locomotive ghost fails (/c LOCO.revive()) even though the bounding box is completely within the built rail segments.
A manually placed rolling stock is possible get much closer to the ghost rail segment as shown here. Additionally, this locomotive is unable to be revived simply because the branch rail is a ghost. With this setup, the placement order doesn't matter. Having a built straight rail with a ghost locomotive, the locomotive becomes unrevivable as soon as the ghost rail branch is placed.
This is causing a bug in space exploration where I'm trying to revive rolling stock ghosts at the edge of the space elevator. Rolling stock can become unrevivable due to a nearby rail ghost even though the rail ghost shouldn't be interacting with the rolling stock.