Page 1 of 1

[Rseding91] [1.1.4] Can't fast replace underground belts through script

Posted: Fri Dec 04, 2020 5:32 am
by Nexela
I am 95% sure this used to work

Create a single yellow underneathie, point at it and run

Code: Select all

   /c entity = game.player.selected;
        entity.order_upgrade {force = entity.force, player = game.player, target = "fast-underground-belt"}
        entity.surface.create_entity {
        name = entity.get_upgrade_target().name,
        direction = entity.direction,
        force = entity.force,
        position = entity.position,
        fast_replace = true,
        player = game.player,
        type = entity.belt_to_ground_type,
        raise_built = true
    }
Additionally even can_fast_replace returns false

Re: [1.1.4] Can't fast replace underground belts through script

Posted: Fri Dec 04, 2020 11:24 am
by OkraDonkey
Related: 92391

Re: [1.1.4] Can't fast replace underground belts through script

Posted: Fri Dec 04, 2020 1:19 pm
by kovarex
Script building is not supposed to use fast-replace.

Re: [1.1.4] Can't fast replace underground belts through script

Posted: Fri Dec 04, 2020 1:45 pm
by Rseding91
kovarex wrote:
Fri Dec 04, 2020 1:19 pm
Script building is not supposed to use fast-replace.
Yes it is. There have been functions for it for the last 3 years. It was broken with the recent transport belt fixes.

Re: [Rseding91] [1.1.4] Can't fast replace underground belts through script

Posted: Mon Dec 07, 2020 9:33 pm
by Rseding91
Waiting on 92391 as once that's fixed this will most likely be fixed too.