ClaudeMetz / FactoryPlanner

A mod for Factorio. Allows you to plan out your production in detail.
https://mods.factorio.com/mod/factoryplanner
MIT License
92 stars 46 forks source link

Copying Used Factory Also Copies Compatible Machines #383

Open ridesdragons opened 2 weeks ago

ridesdragons commented 2 weeks ago

Problem Description

When shift+right clicking and shift+left clicking on the factory icon to quickly transfer which factory you're using to various lines, normally if the factory you're copying over can't be used for the good (for example, you can't use a foundry to make rocket fuel, but you can use assemblers) it'll throw an error telling you "pasted machine is incompatible".

however, different goods have overlap. for example, both belts, green circuits, rocket fuel, and electric engine units can be made in the assembler 2, but only belts can be made in the foundry, only circuits can be made in the electromagnetic plant, only rocket fuel can be made in the biochamber, and only electric engine units can not be made in the assembler 1. if you were to put in an order to make belts, set it to use the assembler 2, copy that, and then make an order to make rocket fuel, green circuits, and electric engine units, and copy that assembler 2 over to those production lines, you run into this bug.

after you copy the machine over, if you later decide to change the factory building (maybe you've unlocked a more efficient machine), you will be limited by the compatibility group. this not only creates situations where you cannot later change the factory to use a newly unlocked building because the original group you copied from doesn't include the building, but it also means you can set the factory to a building that is incompatible. here's an example of me making engine units in a biochamber, belts in an EM plant, and green circuits and rocket fuel in a foundry. the only exception to this would be the assembler 1, which it seems does not get added over in the case of the electric engine unit. so while I can make a plan to build engine units in an EM plant, I cannot make a plan to build them in assembler 1s (neither building should be possible). space age factory planner shenanigans.zip factorio-current.log

Reproduction

  1. create several factory lines that share a common production building (such as assembler 2s)
  2. copy that common building across lines from a production line that can be made from a building the other lines cannot
  3. behold as you can now attempt to make rocket fuel from lava
DeadMG commented 1 week ago

I've encountered this issue without needing to copy and paste; no diea exactly how but FP will let me set Engine Units as being made in a Foundry when they can't be

ClaudeMetz commented 4 days ago

Thanks for the reports. When copy/pasting, I need to manually verify what is compatible and what isn't, and it seems I got it wrong in some way here. Will have a look.