Documentation for metadata

This commit is contained in:
ZXMushroom63 2024-09-08 13:33:28 +08:00
parent 1f2995ad1c
commit 6d710b3ece
2 changed files with 16 additions and 0 deletions

View File

@ -51,6 +51,9 @@ The global object has the following properties:
- This object is used to push code for use in the dedicated server.
- Once the dedicated server worker has started, it is unuseable.
- More: [DedicatedServerDocumentation](dedicatedserver.md)
- `ModAPI.meta`
- This object is used to register metadata for mods such as their title, credits, icon and description.
- More: [MetaDocumentation](meta.md)
- `ModAPI.version: String`
- The version of ModAPI.
- `ModAPI.flavour: String`

13
docs/apidoc/meta.md Normal file
View File

@ -0,0 +1,13 @@
## ModAPI.meta
ModAPI.meta contains the API for registering metadata on mods easily.
Methods:
- `ModAPI.meta.title(title: String)`
- Sets the title of the mod. This is mandatory if any metadata is to be displayed. Character limit of 14.
- `ModAPI.meta.credits(credits: String)`
- Sets the credits of the mod. Character limit of 16.
- `ModAPI.meta.description(desc: String)`
- Sets the description of the mod. Character limit of 64.
- `ModAPI.meta.icon(iconURL: String)`
- Sets the icon of the mod.
- It can be extremely low res, it will not appear blurry.