doc update

This commit is contained in:
Xertis 2026-03-23 00:23:04 +03:00
parent b035621249
commit b707c18931
2 changed files with 32 additions and 1 deletions

View file

@ -180,6 +180,22 @@ function on_inventory_closed(invid: int, playerid: int)
Called when the inventory is closed.
### CONTENT events
Callbacks specified in *content.lua* script.
```lua
function on_scripts_loading()
```
Called before the content pack scripts are loaded
```lua
function on_content_loaded()
```
Called after the content pack has been fully loaded
## Layout events
Script *layouts/layout_name.xml.lua* events.
@ -202,7 +218,6 @@ Called on element removed from the screen.
Callbacks specified in *hud.lua* script.
```lua
function on_hud_open(playerid: int)
```

View file

@ -4,6 +4,7 @@
- [События блоков](#события-блоков)
- [События предметов](#события-предметов)
- [События мира](#события-мира)
- [События CONTENT](#События CONTENT)
- [События макета](#события-макета)
- [События HUD](#события-hud)
- [События ECS](ecs.md#события-компонента)
@ -189,6 +190,21 @@ function on_inventory_closed(invid: int, playerid: int)
Вызывается при закрытии инвентаря.
### События CONTENT
События жизненного цикла контент-пака прописываются в файле `scripts/content.lua`
```lua
function on_scripts_loading()
```
Вызывается перед загрузкой скриптов контент-пака
```lua
function on_content_loaded()
```
Вызывается после того, как контент-пак был полностью загружен
## События макета