update doc/en/scripting.md

This commit is contained in:
MihailRis 2024-06-13 20:48:00 +03:00
parent 899767c430
commit 92cc208b0a
2 changed files with 24 additions and 7 deletions

View File

@ -437,7 +437,6 @@ Set specified bits.
## *item* library ## *item* library
```python ```python
item.name(itemid: int) -> str item.name(itemid: int) -> str
``` ```
@ -512,7 +511,25 @@ Remove an element from the screen
hud.get_block_inventory() -> int hud.get_block_inventory() -> int
``` ```
Get open block inventory ID or 0 Get open block inventory ID or 0.
```python
hud.get_player() -> int
```
Gives the ID of the player that the UI is bound to.
```python
hud.pause()
```
Opens the pause menu
```python
hud.resume()
```
Closes the pause menu.
### *time* library ### *time* library

View File

@ -496,25 +496,25 @@ hud.open_permanent(layoutid: str)
hud.close(layoutid: str) hud.close(layoutid: str)
``` ```
Удаляет элемент с экрана Удаляет элемент с экрана.
```python ```python
hud.get_block_inventory() -> int hud.get_block_inventory() -> int
``` ```
Дает ID инвентаря открытого блока или 0 Дает ID инвентаря открытого блока или 0.
```python ```python
hud.get_player() -> int hud.get_player() -> int
``` ```
Дает ID игрока, к которому привязан пользовательский интерфейс Дает ID игрока, к которому привязан пользовательский интерфейс.
```python ```python
hud.pause() hud.pause()
``` ```
Открывает меню паузы Открывает меню паузы.
```python ```python
hud.resume() hud.resume()
@ -528,7 +528,7 @@ hud.resume()
time.uptime() -> float time.uptime() -> float
``` ```
Возвращает время с момента запуска движка в секундах Возвращает время с момента запуска движка в секундах.
```python ```python
time.delta() -> float time.delta() -> float