mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-14 10:30:08 +00:00
Initial supported for scripted ingredients, not fully tested.
This adds a few additional interface functions, to be defined in: scripts/global/cooking.lua, or _mods/XYZ/scripts/cooking.lua Added functions: cookFailure(a,b,c) - Called when no recipe could be found for ingredients a,b,c getIngredientString() - Called by the menu. Expected to return effects description for scripted ingredient.. useIngredient(name) - Called when a scripted ingredient will be eaten. Return true to eat. Use a line like this in ingredients.txt: LuaLoaf sealoaf Loaf (script) to enable calling useIngredient() upon eating.
This commit is contained in:
parent
61395779a1
commit
1bbd9e097d
8 changed files with 250 additions and 88 deletions
|
@ -714,6 +714,8 @@ public:
|
|||
Ingredient *getNearestIngredient(const Vector &pos, int radius);
|
||||
Entity *getNearestEntity(const Vector &pos, int radius, Entity *ignore = 0, EntityType et=ET_NOTYPE, DamageType dt=DT_NONE, int lrStart=-1, int lrEnd=-1);
|
||||
|
||||
Script *cookingScript;
|
||||
|
||||
void spawnManaBall(Vector pos, float a);
|
||||
bool updateMusic();
|
||||
std::string overrideMusic;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue