mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 03:21:49 +00:00
swap 'action' and 'mode' on_inventory_interact arguments & minor refactor
This commit is contained in:
parent
1f7696e972
commit
c435c6080a
6 changed files with 75 additions and 41 deletions
|
|
@ -108,7 +108,7 @@ 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 mode, int action);
|
||||
void on_inventory_interact(int invid, int slot, int action, int mode);
|
||||
|
||||
void on_player_tick(Player* player, int tps);
|
||||
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ void scripting::on_frontend_close() {
|
|||
scripting::post_processing = nullptr;
|
||||
}
|
||||
|
||||
void scripting::on_inventory_interact(int invid, int slot, int mode, int action) {
|
||||
void scripting::on_inventory_interact(int invid, int slot, int action, int mode) {
|
||||
auto L = lua::get_main_state();
|
||||
for (auto& pack : content_control->getAllContentPacks()) {
|
||||
lua::emit_event(
|
||||
|
|
@ -102,8 +102,8 @@ void scripting::on_inventory_interact(int invid, int slot, int mode, int action)
|
|||
[&](lua::State* L) {
|
||||
lua::pushinteger(L, invid);
|
||||
lua::pushinteger(L, slot);
|
||||
lua::pushinteger(L, mode);
|
||||
lua::pushinteger(L, action);
|
||||
lua::pushinteger(L, mode);
|
||||
return 4;
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue