hud.get_block_inventory and inventory.move

This commit is contained in:
MihailRis
2024-04-03 20:50:26 +03:00
parent cbdc151373
commit 0dc3ab50a2
7 changed files with 79 additions and 1 deletions
+15
View File
@@ -152,6 +152,14 @@ inventory.clone(invid: int) -> int
Создает копию инвентаря и возвращает id копии. Если копируемого инвентаря не существует, возвращает 0.
```python
inventory.move(invA: int, slotA: int, invB: int, slotB: int)
```
Перемещает предмет из slotA инвентаря invA в slotB инвентаря invB.
invA и invB могут указывать на один инвентарь.
slotB будет выбран автоматически, если не указывать явно.
## Библиотека block
```python
@@ -323,6 +331,13 @@ hud.close(layoutid: str)
```
Удаляет элемент с экрана
```python
hud.get_block_inventory() -> int
```
Получить ID инвентаря открытого блока или 0
## События блоков
```lua