pack.get_installed + pack docs

This commit is contained in:
MihailRis
2024-03-23 23:55:02 +03:00
parent 15b11d52ad
commit 86a2349863
3 changed files with 51 additions and 0 deletions
+20
View File
@@ -71,6 +71,26 @@ world.get_seed() -> int
Returns world seed.
## *pack* library
```python
pack.get_folder(packid: str) -> str
```
Returns installed content-pack folder
```python
pack.is_installed(packid: str) -> bool
```
Check if the world has specified pack installed
```python
pack.get_installed() -> array of strings
```
Returns all installed content-pack ids
## *gui* library
Library contains ui elements access functions. Library should not be directly used, because script *layouts/layout_name.xml.lua* already has a generated variable **document** (instance of **Document**)
+20
View File
@@ -66,6 +66,26 @@ world.get_seed() -> int
Возвращает зерно мира.
## Библиотека pack
```python
pack.get_folder(packid: str) -> str
```
Возвращает путь к папке установленного контент-пака
```python
pack.is_installed(packid: str) -> bool
```
Проверяет наличие контент-пака в мире
```python
pack.get_installed() -> массив строк
```
Возращает id всех установленных в мире контент-паков
## Библиотека gui
Библиотека содержит функции для доступа к свойствам UI элементов. Вместо gui следует использовать объектную обертку, предоставляющую доступ к свойствам через мета-методы __index, __newindex: