1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-07-03 22:44:32 +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:
fgenesis 2013-06-20 04:49:20 +02:00
parent 61395779a1
commit 1bbd9e097d
8 changed files with 250 additions and 88 deletions

View file

@ -3578,10 +3578,10 @@ void SceneEditor::update(float dt)
(dsq->getGameCursorPosition().y - cursorOffset.y)*factor);
//editingElement->scale=oldScale + add;
Vector sz = oldScale + add;
if (sz.x < 64)
sz.x = 64;
if (sz.y < 64)
sz.y = 64;
if (sz.x < 32)
sz.x = 32;
if (sz.y < 32)
sz.y = 32;
editingPath->rect.x1 = -sz.x/2;
editingPath->rect.x2 = sz.x/2;
editingPath->rect.y1 = -sz.y/2;