mods
mods copied to clipboard
Remove disabled recipes from expensive, normal mode effects of technologies too
When a recipe is disabled it is only removed from the default effects
table in technologies. They are now also removed from the effects
table in the expensive and normal modes if they exist.
Not a massive fan of the code copying here, but I figured it was better than trying to generalise this code over all three options.
I need this for compact for my mod, which synthesises expensive and normal modes for technologies it touches.
I was able to start the game and generate and open a map in 1.1.70. I was not able to figure out how to run the unit tests. I can do that if anyone can explain or point me to an explanation.
thanks for bringing this to my/our attention, it appears that a more substantial attack of the way technologies are updated is required than just this treatment. For reference, it is not just the effects which are a problem, but a suite of properties are split out in the case of normal/expensive mode which are not being handled correctly:
upgrade = true, --bool
--enabled = true, --bool
hidden = true, --bool
visible_when_disabled = true, --bool
ignore_tech_cost_multiplier = true, --bool
max_level = true, --int
count_formula = true, --string
unit = true, --array --aka ingredients
prerequisites = true, --array
effects = true, --array
I'm tempted to do a full re-work of that aspect of the library instead of pulling this PR as a result
Completely understand. The changes I made were really just so that our mods are compatible, and nothing more. I assume that you already know that this same feature also exists on recipes?
Link if you need it for testing: https://mods.factorio.com/mod/SingleChangeRecipes
c5fe8d2 is my draft for reference
On hold till lib rework?
On hold until expensive recipes are removed? https://forums.factorio.com/viewtopic.php?f=6&t=104026
#945