mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-10 16:19:59 +00:00
Little correction to prev commit
Only handle cooking failure if the function call was successful. Otherwise, fallback to SeaLoaf.
This commit is contained in:
parent
1bbd9e097d
commit
25727244ad
1 changed files with 7 additions and 5 deletions
|
@ -7221,11 +7221,13 @@ void Game::onCook()
|
|||
const char *p2 = cookList[1]->name.c_str();
|
||||
const char *p3 = cookList.size() >= 3 ? cookList[2]->name.c_str() : "";
|
||||
std::string ingname;
|
||||
cookingScript->call("cookFailure", p1, p2, p3, &ingname);
|
||||
if(ingname.length())
|
||||
data = dsq->continuity.getIngredientDataByName(ingname);
|
||||
if(!data)
|
||||
goto endcook;
|
||||
if(cookingScript->call("cookFailure", p1, p2, p3, &ingname))
|
||||
{
|
||||
if(ingname.length())
|
||||
data = dsq->continuity.getIngredientDataByName(ingname);
|
||||
if(!data)
|
||||
goto endcook;
|
||||
}
|
||||
}
|
||||
|
||||
if(!data)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue