mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-08 20:41:49 +00:00
add pack.assemble(...), app.config_packs(...)
This commit is contained in:
parent
3187243a7d
commit
bd9018dafe
12 changed files with 93 additions and 10 deletions
|
|
@ -48,7 +48,8 @@ app.reconfig_packs(
|
|||
)
|
||||
```
|
||||
|
||||
Updates the pack configuration, checking its correctness (dependencies and availability of packs).
|
||||
Updates the packs configuration, checking its correctness (dependencies and availability of packs).
|
||||
Automatically adds dependencies.
|
||||
|
||||
To remove all packs from the configuration, you can use `pack.get_installed()`:
|
||||
|
||||
|
|
@ -58,6 +59,16 @@ app.reconfig_packs({}, pack.get_installed())
|
|||
|
||||
In this case, `base` will also be removed from the configuration.
|
||||
|
||||
```lua
|
||||
app.config_packs(
|
||||
-- expected set of packs (excluding dependencies)
|
||||
packs: table
|
||||
)
|
||||
```
|
||||
|
||||
Updates the packs configuration, automatically removing unspecified ones, adding those missing in the previous configuration.
|
||||
Uses app.reconfig_packs.
|
||||
|
||||
```lua
|
||||
app.new_world(
|
||||
-- world name
|
||||
|
|
|
|||
|
|
@ -96,8 +96,14 @@ Returns information about the pack (not necessarily installed).
|
|||
- `~` - weak
|
||||
for example `!teal`
|
||||
|
||||
To obtain information about multiple packs, use table of ids to avoid re-scanning.
|
||||
To obtain information about multiple packs, use table of ids to avoid re-scanning:one
|
||||
|
||||
```lua
|
||||
pack.get_info(packids: table) -> {id={...}, id2={...}, ...}
|
||||
```
|
||||
|
||||
```lua
|
||||
pack.assemble(packis: table) -> table
|
||||
```
|
||||
|
||||
Checks the configuration for correctness and adds dependencies, returning the complete configuration.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue