mirror of
https://github.com/minetest/contentdb.git
synced 2025-01-03 03:37:28 +01:00
Update minetest_client.md docs
This commit is contained in:
parent
0c08738a66
commit
fb3b0be50e
@ -47,7 +47,7 @@ Tokens can be attained by visiting [Settings > API Tokens](/user/tokens/).
|
|||||||
* `name`: Technical name (needs permission if already approved).
|
* `name`: Technical name (needs permission if already approved).
|
||||||
* `short_description`
|
* `short_description`
|
||||||
* `tags`: List of tag names, see [misc](#misc).
|
* `tags`: List of tag names, see [misc](#misc).
|
||||||
* `content_Warnings`: List of content warning names, see [misc](#misc).
|
* `content_warnings`: List of content warning names, see [misc](#misc).
|
||||||
* `license`: A license name.
|
* `license`: A license name.
|
||||||
* `media_license`: A license name.
|
* `media_license`: A license name.
|
||||||
* `long_description`: Long markdown description.
|
* `long_description`: Long markdown description.
|
||||||
|
@ -58,6 +58,47 @@ This supports redirects.
|
|||||||
The client will edit the .conf of the installed content to add `author`, `name`, and `release` to
|
The client will edit the .conf of the installed content to add `author`, `name`, and `release` to
|
||||||
track the installed release to detect updates in the future.
|
track the installed release to detect updates in the future.
|
||||||
|
|
||||||
|
## Resolving Dependencies
|
||||||
|
|
||||||
|
### Short version
|
||||||
|
|
||||||
|
Minetest uses `/api/packages/<author>/<name>/dependencies/?only_hard=1` to find out the hard
|
||||||
|
dependencies for a package.
|
||||||
|
|
||||||
|
Then, it resolves each dependency recursively.
|
||||||
|
|
||||||
|
Say you're resolving for `basic_materials`, then it will attempt to find the mod in this order:
|
||||||
|
|
||||||
|
1. It first checks installed mods in the game and mods folder (ie: `mods/basic_materials/`)
|
||||||
|
2. Then it looks on ContentDB for exact name matches (ie: `VanessaE/basic_materials`)
|
||||||
|
3. Then it looks on ContentDB for modpacks which contain (=provides) the modname
|
||||||
|
(ie: `VanessaE/dreambuilder`)
|
||||||
|
|
||||||
|
### Long version
|
||||||
|
|
||||||
|
When installing a package, an API request is made to ContentDB to find out the dependencies.
|
||||||
|
If there are no dependencies, then the mod is installed straight away.
|
||||||
|
|
||||||
|
If there are dependencies, it will resolve them and show a dialog with a list of mods to install.
|
||||||
|
|
||||||
|
Resolving works like this:
|
||||||
|
|
||||||
|
1. Fetch dependencies for the package from ContentDB's API
|
||||||
|
2. For each hard dependency:
|
||||||
|
1. Check current game, exit if dep found
|
||||||
|
2. Check installed mods, exit if found
|
||||||
|
3. Check available mods from ContentDB:
|
||||||
|
1. Choose a package to install. Prefer higher scores and exact base name matches
|
||||||
|
(rather than modpacks).
|
||||||
|
2. Resolve dependencies for this package - ie, goto 1.
|
||||||
|
|
||||||
|
The ContentDB API is a dictionary of packages to dependencies.
|
||||||
|
The dictionary will allow ContentDB to prefetch dependencies without any client changes.
|
||||||
|
For example, say you request the dependencies for Mobs Monster.
|
||||||
|
It's pretty likely that the next request you'll make is for Mobs Redo, and so ContentDB can prevent
|
||||||
|
the need for another request by including the dependency information for Mobs Redo in the
|
||||||
|
response for Mobs Monster.
|
||||||
|
|
||||||
## View in browser
|
## View in browser
|
||||||
|
|
||||||
The client will open the package in a browser by constructing the following URL
|
The client will open the package in a browser by constructing the following URL
|
||||||
|
Loading…
Reference in New Issue
Block a user