1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-08-13 17:59:53 +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:
fgenesis 2013-06-20 05:15:07 +02:00
parent 1bbd9e097d
commit 25727244ad

View file

@ -7221,11 +7221,13 @@ void Game::onCook()
const char *p2 = cookList[1]->name.c_str(); const char *p2 = cookList[1]->name.c_str();
const char *p3 = cookList.size() >= 3 ? cookList[2]->name.c_str() : ""; const char *p3 = cookList.size() >= 3 ? cookList[2]->name.c_str() : "";
std::string ingname; std::string ingname;
cookingScript->call("cookFailure", p1, p2, p3, &ingname); if(cookingScript->call("cookFailure", p1, p2, p3, &ingname))
if(ingname.length()) {
data = dsq->continuity.getIngredientDataByName(ingname); if(ingname.length())
if(!data) data = dsq->continuity.getIngredientDataByName(ingname);
goto endcook; if(!data)
goto endcook;
}
} }
if(!data) if(!data)