shpaass / yafc-ce

Powerful Factorio calculator/analyser that works with mods
GNU General Public License v3.0
81 stars 21 forks source link

Should not prefer disabled recipes #197

Open Dorus opened 3 months ago

Dorus commented 3 months ago

I noticed YaFC prefers non-turd seaweed that's objectively worse in my project.

Isolating the problem, it apears YaFC takes the disabled recipe over the enabled one. I manually enabled the seaweed turd, that in turn enables water-free seaweed. I also manually disabled the old seaweed recipe, doing so YaFC suddenly prefers the old recipe.

afbeelding Left is the production sheet with old seaweed disabled, it's preferring this. Right is the same sheet but with all recipes enabled.

My project files: https://discord.com/channels/560199483065892894/1210135941700919296/1264603463048761406

Dorus commented 3 months ago

Possible theorem: YaFC cost is not calculated for disabled recipes. As a result, disabled recipes are preferred.

DaleStan commented 3 months ago

I think that's a reasonable theory, but I'm curious why you marked Recipe.seaweed inaccessible in the first place. It's not immediately apparent to me why the inaccessible setting is preferable to setting a favorite recipe, disabling the recipe row, or accepting YAFC's default behavior.

Dorus commented 3 months ago

but I'm curious why you marked Recipe.seaweed inaccessible in the first place.

Because it is? T.u.r.d. replaces one recipe with another, but the way Py and YaFC are currently set up, that's not automatically done. In case of T.u.r.d. support it would indeed be better if the recipe got replaced, but that's a separate issue.