mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 13:01:49 +00:00
add function inventory.move_range
This commit is contained in:
parent
f6ab0de5af
commit
0ba0584c5d
4 changed files with 52 additions and 2 deletions
|
|
@ -55,8 +55,21 @@ inventory.create(size: int) -> int
|
|||
-- Create inventory copy. Returns the created copy ID.
|
||||
inventory.clone(invid: int) -> int
|
||||
|
||||
-- Move item from slotA of invA to slotB of invB.
|
||||
-- Move an item from slotA of invA to slotB of invB.
|
||||
-- invA may be the same as invB.
|
||||
-- If slotB will be chosen automaticly if argument is not specified.
|
||||
-- The move may be incomplete if the available slot has no enough stack space.
|
||||
inventory.move(invA: int, slotA: int, invB: int, slotB: int)
|
||||
|
||||
-- Moves an item from slotA of inventory invA to a suitable slot(s)
|
||||
-- in the specified range of inventory invB.
|
||||
-- invA may be the same as invB.
|
||||
-- The move may be incomplete if the available slots are filled.
|
||||
inventory.move(
|
||||
invA: int,
|
||||
slotA: int,
|
||||
invB: int,
|
||||
rangeBegin: int,
|
||||
[optional] rangeEnd: int
|
||||
)
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue