Inventory enhancements #897: 2, 5, 9, 11, 12 (#931)

* implement a bit

* change shift to ctrl

* add enhancement #2

* add ctrl-interaction with content access

* fix libinventory.move bug (none checking)

* fix p.5

* move shareinv logic into inventory_utils

* add inventory utils

* small refactor

* fix iframe.src = ""

---------

Co-authored-by: MihailRis <mexaruc@gmail.com>
This commit is contained in:
Neveix 2026-08-14 23:25:42 +05:00 • committed by GitHub
parent f8e4e2759b
commit 3b3bf8e878
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 84 additions and 37 deletions

View file

@ -2,6 +2,7 @@
#include "items/Inventories.hpp"
#include "items/ItemStack.hpp"
#include "logic/BlocksController.hpp"
#include "logic/scripting/lua/lua_util.hpp"
#include "world/Level.hpp"
#include "api_lua.hpp"
@ -180,7 +181,7 @@ static int l_move(lua::State* L) {
validate_slotid(slotAid, invA);
auto invBid = lua::tointeger(L, 3);
auto slotBid = lua::isnil(L, 4) ? -1 : lua::tointeger(L, 4);
auto slotBid = lua::isnoneornil(L, 4) ? -1 : lua::tointeger(L, 4);
auto& invB = get_inventory(invBid, 3);
auto& slot = invA.getSlot(slotAid);
if (slotBid == -1) {