40 lines
No EOL
986 B
Markdown
40 lines
No EOL
986 B
Markdown
# configurator
|
|
|
|
helper for generating json configs interactively.
|
|
Plugins that hook into this plugin can register configuration nodes like "lobby.spawnpoint" with type Location.
|
|
server operators can then go ingame and do `/cfg key lobby.spawnpoint` to set a spawn location and then
|
|
`/cfg export` ig
|
|
|
|
## TODO
|
|
|
|
- lists
|
|
- exporting
|
|
- proper namespaces
|
|
- split into api and impl
|
|
- more types(region pickers especially; also itemstacks)
|
|
- type variants like location without yaw/pitch
|
|
|
|
## design
|
|
|
|
in json we have primitives(like "hi", 1, false"), structures(like {"foo":"bar}) and lists(like []).
|
|
everything consists of primitives eventually so we can go from
|
|
|
|
```json
|
|
{
|
|
"arenas": [
|
|
{
|
|
"name": "skyfall",
|
|
"minPlayers": 3,
|
|
"maxPlayers": 8
|
|
}
|
|
]
|
|
}
|
|
```
|
|
to
|
|
```text
|
|
arenas.0.name = Primitive("skyfall")
|
|
arenas.0.minPlayers = Primitive(3)
|
|
arenas.0.maxPlayers = Primitive(8)
|
|
```
|
|
|
|
We can define a complex type as "type has a string field called name" and it will just use |