[2.0.32] Upgrade planners can't change the quality of some entities
Posted: Sun Mar 02, 2025 8:34 pm
Tested version: 2.0.32 (build 81349 expansion, mac-arm64, standalone)
When creating a new upgrade planner, some entities that have tiers/variants (chests, inserters, belts, power poles, train signals, possibly more) will force the player to choose from a list of alternatives that excludes the entity's own concrete variant (e.g. you cannot upgrade a yellow inserter to a yellow inserter). Meanwhile others (e.g. modules, assemblers, beacons, refineries, rocket silos...) don't have this limitation; you can upgrade a speed 1 module to a speed 1, or an assembler 2 to an assembler 2. Oddly e.g. a refinery doesn't even have any other variant/tier to which it could be upgraded.
While this would've been a quirky edge case for 1.x, this complicates the matter for 2.0, since we now have quality (and quality wildcard matching). It makes perfect sense to upgrade a normal blue inserter to an uncommon blue inserter, without changing the entity's concrete type; right now I need to first mark the inserters in question for an upgrade to something different, and then apply a different upgrade planner to get the target quality.
In addition to that, some entities that greatly benefit from quality cannot be marked for upgrade at all; e.g. pumps, offshore pumps, thrusters.
Expected behaviour: any item that can be built in the world as an entity should be a valid target for an upgrade planner; each entity should have itself as a valid target for an upgrade planner.
When creating a new upgrade planner, some entities that have tiers/variants (chests, inserters, belts, power poles, train signals, possibly more) will force the player to choose from a list of alternatives that excludes the entity's own concrete variant (e.g. you cannot upgrade a yellow inserter to a yellow inserter). Meanwhile others (e.g. modules, assemblers, beacons, refineries, rocket silos...) don't have this limitation; you can upgrade a speed 1 module to a speed 1, or an assembler 2 to an assembler 2. Oddly e.g. a refinery doesn't even have any other variant/tier to which it could be upgraded.
While this would've been a quirky edge case for 1.x, this complicates the matter for 2.0, since we now have quality (and quality wildcard matching). It makes perfect sense to upgrade a normal blue inserter to an uncommon blue inserter, without changing the entity's concrete type; right now I need to first mark the inserters in question for an upgrade to something different, and then apply a different upgrade planner to get the target quality.
In addition to that, some entities that greatly benefit from quality cannot be marked for upgrade at all; e.g. pumps, offshore pumps, thrusters.
Expected behaviour: any item that can be built in the world as an entity should be a valid target for an upgrade planner; each entity should have itself as a valid target for an upgrade planner.