mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix getCraftRecipe returing wrong reciep due to way to unspecific output matching
This commit is contained in:
parent
0118c111e8
commit
d902bd31c4
1 changed files with 3 additions and 1 deletions
|
@ -954,7 +954,9 @@ public:
|
|||
|
||||
try {
|
||||
tmpout = def->getOutput(input, gamedef);
|
||||
if(tmpout.item.substr(0,output.item.length()) == output.item)
|
||||
if((tmpout.item.substr(0,output.item.length()) == output.item) &&
|
||||
((tmpout.item[output.item.length()] == 0) ||
|
||||
(tmpout.item[output.item.length()] == ' ')))
|
||||
{
|
||||
// Get output, then decrement input (if requested)
|
||||
input = def->getInput(output, gamedef);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue