mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
* 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:
parent
f8e4e2759b
commit
3b3bf8e878
9 changed files with 84 additions and 37 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue