The Battle for Wesnoth  1.17.10+dev
Classes | Functions
lua_formula_bridge Namespace Reference


class  fwrapper


int intf_eval_formula (lua_State *)
 Evaluates a formula in the formula engine. More...
int intf_compile_formula (lua_State *)
std::string register_metatables (lua_State *)

Function Documentation

◆ intf_compile_formula()

int lua_formula_bridge::intf_compile_formula ( lua_State *  L)

Definition at line 235 of file lua_formula_bridge.cpp.

References formulaKey, and luaW_type_error().

Referenced by lua_kernel_base::lua_kernel_base().

◆ intf_eval_formula()

int lua_formula_bridge::intf_eval_formula ( lua_State *  L)

Evaluates a formula in the formula engine.

  • Arg 1: Formula string.
  • Arg 2: optional context; can be a unit or a Lua table.
  • Ret 1: Result of the formula.

Definition at line 209 of file lua_formula_bridge.cpp.

References lua_formula_bridge::fwrapper::evaluate(), formulaKey, luaW_pushfaivariant(), and luaW_tounit().

Referenced by lua_kernel_base::lua_kernel_base(), and register_metatables().

◆ register_metatables()

std::string lua_formula_bridge::register_metatables ( lua_State *  L)