Client: fix on_nodemeta_form_open
This commit is contained in:
parent
ed6d477962
commit
2e517ca1cb
@ -95,4 +95,4 @@ core.registered_on_modchannel_message, core.register_on_modchannel_message = mak
|
||||
core.registered_on_modchannel_signal, core.register_on_modchannel_signal = make_registration()
|
||||
core.registered_on_inventory_open, core.register_on_inventory_open = make_registration()
|
||||
core.registered_on_receiving_inventory_form, core.register_on_receiving_inventory_form = make_registration()
|
||||
core.registered_on_open_nodemeta_form, core.register_on_open_nodemeta_form = make_registration()
|
||||
core.registered_on_nodemeta_form_open, core.register_on_nodemeta_form_open = make_registration()
|
||||
|
@ -2625,6 +2625,7 @@ bool Game::nodePlacement(const ItemDefinition &selected_def,
|
||||
client->interact(INTERACT_PLACE, pointed);
|
||||
|
||||
std::string formspec_str = meta->getString("formspec");
|
||||
|
||||
if (!client->getScript()->on_nodemeta_form_open(nodepos, "", formspec_str)) {
|
||||
infostream << "Launching custom inventory view" << std::endl;
|
||||
|
||||
|
@ -273,7 +273,7 @@ bool ScriptApiClient::on_nodemeta_form_open(v3s16 position, std::string formname
|
||||
lua_pushstring(L, formname.c_str());
|
||||
lua_pushstring(L, formspec.c_str());
|
||||
|
||||
runCallbacks(2, RUN_CALLBACKS_MODE_OR);
|
||||
runCallbacks(3, RUN_CALLBACKS_MODE_OR);
|
||||
return readParam<bool>(L, -1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user