mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Weather support
This commit is contained in:
parent
e65d8ad655
commit
3aedfac968
23 changed files with 552 additions and 91 deletions
|
@ -233,3 +233,20 @@ void ScriptApiNode::node_on_receive_fields(v3s16 p,
|
|||
scriptError("error: %s", lua_tostring(L, -1));
|
||||
}
|
||||
|
||||
void ScriptApiNode::node_falling_update(v3s16 p)
|
||||
{
|
||||
SCRIPTAPI_PRECHECKHEADER
|
||||
lua_getglobal(L, "nodeupdate");
|
||||
push_v3s16(L, p);
|
||||
if(lua_pcall(L, 1, 0, 0))
|
||||
scriptError("error: %s", lua_tostring(L, -1));
|
||||
}
|
||||
|
||||
void ScriptApiNode::node_falling_update_single(v3s16 p)
|
||||
{
|
||||
SCRIPTAPI_PRECHECKHEADER
|
||||
lua_getglobal(L, "nodeupdate_single");
|
||||
push_v3s16(L, p);
|
||||
if(lua_pcall(L, 1, 0, 0))
|
||||
scriptError("error: %s", lua_tostring(L, -1));
|
||||
}
|
||||
|
|
|
@ -49,6 +49,8 @@ public:
|
|||
const std::string &formname,
|
||||
const std::map<std::string, std::string> &fields,
|
||||
ServerActiveObject *sender);
|
||||
void node_falling_update(v3s16 p);
|
||||
void node_falling_update_single(v3s16 p);
|
||||
public:
|
||||
static struct EnumString es_DrawType[];
|
||||
static struct EnumString es_ContentParamType[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue