mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-04-08 07:37:07 +00:00
Fixed handling of IET_SCRIPT, rename Lua callback func getIngredientString() to getIngredientEffectString(), compile fix
This commit is contained in:
parent
9d2dcc2d0f
commit
153dd522c9
2 changed files with 10 additions and 11 deletions
|
@ -591,6 +591,14 @@ std::string Continuity::getIEString(IngredientData *data, int i)
|
|||
case IET_LI:
|
||||
return dsq->continuity.stringBank.get(227);
|
||||
break;
|
||||
case IET_SCRIPT:
|
||||
if(dsq->game->cookingScript)
|
||||
{
|
||||
std::string ret = "";
|
||||
dsq->game->cookingScript->call("getIngredientEffectString", data->name.c_str(), &ret);
|
||||
return ret;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return "";
|
||||
|
@ -866,16 +874,6 @@ bool Continuity::applyIngredientEffects(IngredientData *data)
|
|||
|
||||
std::string Continuity::getIngredientAffectsString(IngredientData *data)
|
||||
{
|
||||
if(data->type == IET_SCRIPT)
|
||||
{
|
||||
if(dsq->game->cookingScript)
|
||||
{
|
||||
std::string ret = "";
|
||||
dsq->game->cookingScript->call("getIngredientString", data->name.c_str(), &ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
return getAllIEString(data);
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ static const char * const interfaceFunctions[] = {
|
|||
"entityDied",
|
||||
"exitState",
|
||||
"exitTimer",
|
||||
"getIngredientString",
|
||||
"getIngredientEffectString",
|
||||
"hitEntity",
|
||||
"hitSurface",
|
||||
"init",
|
||||
|
@ -715,6 +715,7 @@ luaFunc(panicHandler)
|
|||
{
|
||||
std::string err = luaFormatStackInfo(L) + ": Lua PANIC: " + getString(L, -1);
|
||||
exit_error(err);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static bool findFile_helper(const char *rawname, std::string &fname)
|
||||
|
|
Loading…
Add table
Reference in a new issue