I think I've worked out what confuses me about this recipe.
say you have the bare minimum requirements in your inventory, regular bark, birch bark, stick and string.
First the recipe tries to pick an "any bark"
Second the recipe tries to pick a "birch bark"
It does its picking based on the order in which things were added to your inventory.
Therefore, if the birchbark went into your inventory after the regular bark, it will be picked by the algorithm as the "any bark" component. When it gets to the "birch bark" component, it can't find a free one, so you get the "not enough ingredients" message.
Solution would be to make sure the specific ingredient is before the broad ingredient in the recipe order. You could still end up using more birch bark than you expected, but it would stop someone with adequate ingredients for a single getting confused and not being able to make a boat without inv juggling
-
theTrav
- Posts: 3464
- Joined: Fri May 29, 2009 11:25 pm
-
cobaltjones
- Posts: 2725
- Joined: Tue Dec 07, 2010 1:27 am
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: bark boat recipe picks ingredients in wrong order
+1
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
MagicManICT
- Posts: 18435
- Joined: Tue Aug 17, 2010 1:47 am
Re: bark boat recipe picks ingredients in wrong order
Don't the rules of programming state:
When selecting items from a list, pick specialized items before general items.
When selecting items from a list, pick specialized items before general items.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
-
loftar
- Posts: 9096
- Joined: Fri Apr 03, 2009 7:05 am
- Location: Your character database
Re: bark boat recipe picks ingredients in wrong order
No, because it has no knowledge of which types are more specific.
"Object-oriented design is the roman numerals of computing." -- Rob Pike
-
MagicManICT
- Posts: 18435
- Joined: Tue Aug 17, 2010 1:47 am
Re: bark boat recipe picks ingredients in wrong order
You're quite right. The programmer, does, though, and thus the rule. (I think I read it in some debugging book somewhere.)
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
-
novaalpha
- Posts: 1490
- Joined: Sun Dec 26, 2010 11:42 pm
- Location: Sparta
Re: bark boat recipe picks ingredients in wrong order
There is no such thing as 'programming rules'.
-
Jackard
- Posts: 8849
- Joined: Sun Jul 12, 2009 6:07 am
- Location: fucking curios how do they work