add pack.assemble(...), app.config_packs(...)
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user