luaEntity.order_upgrade{} behavior differs from upgrade planner

Bugs that are actually features.
Post Reply
User avatar
Mylon
Filter Inserter
Filter Inserter
Posts: 513
Joined: Sun Oct 23, 2016 11:42 pm
Contact:

luaEntity.order_upgrade{} behavior differs from upgrade planner

Post by Mylon »

What happened:
Calling `/c game.player.selected.order_upgrade{force=game.player.force, target="fast-underground-belt"}` on an underground transport belt marks the entity for upgrade but does not mark its neighbor.
What was expected:
Calling the above command marks the entity and its connected neighbor for upgrade.

Compare to: upgrade planner only selecting one underground belt and the neighbor gets marked for upgrade as well.
To recreate:
/cheat all, get some underground belts and fast-underground belts in inventory
Build two pairs of underground belts. Upgrade planner 1 entity. Both entities in the pair get marked and robots upgrade both.
Call the above command while mousing over one of the other pairs. Only that entity gets marked and robots only upgrade that one entity.

User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2916
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: luaEntity.order_upgrade{} behavior differs from upgrade planner

Post by Optera »

It probably won't be a bug, in which case this could be moved to api requests.

When using order_upgrade on type="underground-belt" implicitly call order_upgrade on neighbor.
Writing the request like this I'm not sure if it's a good idea to do that.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: luaEntity.order_upgrade{} behavior differs from upgrade planner

Post by Rseding91 »

Thanks for the report however that's intended. If you want both ends done - just do both ends. It was done this way because otherwise there would be no way to do just one end through the API.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Not a bug”