mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
delete redundant scripting events
This commit is contained in:
parent
6a486af6ab
commit
1d19dac5ce
2 changed files with 0 additions and 18 deletions
|
|
@ -109,7 +109,6 @@ namespace scripting {
|
|||
void on_inventory_open(const Player* player, const Inventory& inventory);
|
||||
void on_inventory_closed(const Player* player, const Inventory& inventory);
|
||||
void on_inventory_interact(int invid, int slot, int action, int mode);
|
||||
void on_inventory_clicked_outside(int exchange_invid, int exchange_slot, int mode);
|
||||
|
||||
void on_player_tick(Player* player, int tps);
|
||||
|
||||
|
|
|
|||
|
|
@ -110,22 +110,6 @@ void scripting::on_inventory_interact(int invid, int slot, int action, int mode)
|
|||
}
|
||||
}
|
||||
|
||||
void scripting::on_inventory_clicked_outside(int exchange_invid, int exchange_slot, int mode) {
|
||||
auto L = lua::get_main_state();
|
||||
for (auto& pack : content_control->getAllContentPacks()) {
|
||||
lua::emit_event(
|
||||
L,
|
||||
pack.id + ":.inventoryclickedoutside",
|
||||
[&](lua::State* L) {
|
||||
lua::pushinteger(L, exchange_invid);
|
||||
lua::pushinteger(L, exchange_slot);
|
||||
lua::pushinteger(L, mode);
|
||||
return 3;
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void scripting::load_hud_script(
|
||||
const scriptenv& senv,
|
||||
const std::string& packid,
|
||||
|
|
@ -143,7 +127,6 @@ void scripting::load_hud_script(
|
|||
register_event(env, "on_hud_render", packid + ":.hudrender");
|
||||
register_event(env, "on_hud_close", packid + ":.hudclose");
|
||||
register_event(env, "on_inventory_interact", packid + ":.inventoryinteract");
|
||||
register_event(env, "on_inventory_clicked_outside", packid + ":.inventoryclickedoutside");
|
||||
}
|
||||
|
||||
gui::PageLoaderFunc scripting::create_page_loader() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue