mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-11 16:59:53 +00:00
More Lua functions; allow specifying ingredient type by ID
- avatar_setBlockBackflip() - avatar_isBlockBackflip() - inv_getNumItems() - inv_getItemName() - getIngredientDataSize() - getIngredientDataName()
This commit is contained in:
parent
08821f5156
commit
c6ae568ed8
5 changed files with 62 additions and 0 deletions
|
@ -165,6 +165,8 @@ IngredientType Continuity::getIngredientTypeFromName(const std::string &name) co
|
|||
return IT_MUSHROOM;
|
||||
else if (name == "Anything")
|
||||
return IT_ANYTHING;
|
||||
else if (name.length() && isdigit(name[0]))
|
||||
return (IngredientType)atoi(name.c_str());
|
||||
|
||||
return IT_NONE;
|
||||
}
|
||||
|
@ -190,6 +192,16 @@ IngredientData *Continuity::getIngredientDataByIndex(int idx)
|
|||
return ingredientData[idx];
|
||||
}
|
||||
|
||||
int Continuity::getIngredientDataSize() const
|
||||
{
|
||||
return (int)ingredientData.size();
|
||||
}
|
||||
|
||||
int Continuity::getIngredientHeldSize() const
|
||||
{
|
||||
return (int)ingredients.size();
|
||||
}
|
||||
|
||||
Recipe::Recipe()
|
||||
{
|
||||
known = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue