Page 1 of 1

Multiple recipe for item

Posted: Thu Jan 02, 2020 4:43 pm
by Dron-elektron
Hello. I was spending some time with parsing recipe prototypes and faced to a problem. Two files have same recipe for "engine-unit" item.

Image

Image

Is it normal? My expectations was something like this:
1) demo-* files have minimal set of items/recipes
2) other files have remaining items/recipes

Re: Multiple recipe for item

Posted: Thu Jan 02, 2020 6:04 pm
by Dron-elektron
Looks like this is a bug and somebody from devs forgot to remove recipe from... recipe.lua?

P.S. Moderators, please move this topic to "Bug Reports" section.

Re: Multiple recipe for item

Posted: Thu Jan 02, 2020 8:03 pm
by Koub
[Koub] Right, moving this to bug reports then.

Re: Multiple recipe for item

Posted: Sat Jan 04, 2020 12:02 am
by TruePikachu
It shouldn't affect anything within the game, however; since the recipies have the same name, the one that's read later is the one that will be used (and that one is the non-demo-file version).

Re: Multiple recipe for item

Posted: Sat Jan 04, 2020 9:37 pm
by Dron-elektron
Yes, I know that, but this is a potential problem if something suddenly changes in the data reading algorithm. It’s just ideologically wrong...

Re: Multiple recipe for item

Posted: Sat Jan 04, 2020 10:06 pm
by Deadlock989
Dron-elektron wrote: Sat Jan 04, 2020 9:37 pm Yes, I know that, but this is a potential problem if something suddenly changes in the data reading algorithm. It’s just ideologically wrong...
If it doesn't have any effect whatsoever, how is it a "bug"?

Re: Multiple recipe for item

Posted: Sun Jan 05, 2020 11:15 am
by Dron-elektron
Full and demo files shouldn't intersect and overriding is not a solution, it's just ignoring of a potential problem.

Let's developers to decide for themselves, is it a bug or not. I want developers to just know about this "little problem" :P

Re: Multiple recipe for item

Posted: Mon Jan 06, 2020 7:43 pm
by Jorn86
Deadlock989 wrote: Sat Jan 04, 2020 10:06 pm
Dron-elektron wrote: Sat Jan 04, 2020 9:37 pm Yes, I know that, but this is a potential problem if something suddenly changes in the data reading algorithm. It’s just ideologically wrong...
If it doesn't have any effect whatsoever, how is it a "bug"?
Because clean code matters.

Re: Multiple recipe for item

Posted: Wed Jan 08, 2020 4:47 pm
by Klonan
This will be fixed when we remove the NPE and cleanup what is in the demo