Documenta un bel po' di robe
parent
6b251a6ab5
commit
beeb757e3b
40
DOCS.md
40
DOCS.md
|
@ -1,10 +1,42 @@
|
|||
# Skins collectible docs
|
||||
|
||||
## 1 API
|
||||
> THIS IS AN ALPHA, EXPECT BREAKAGES
|
||||
|
||||
(not necessary now, it's still a beta)
|
||||
# Table of Contents
|
||||
* [1 Skins](#1-skins)
|
||||
* [2 API](#2-api)
|
||||
* [2.1 Skins handlers](#21-skins-handlers)
|
||||
* [2.2 Utils](#22-utils)
|
||||
* [2.3 Getters](#23-getters)
|
||||
* [2.4 Setters](#24-setters)
|
||||
* [2.5 Callbacks](#25-callbacks)
|
||||
* [3 About the author(s)](#3-about-the-authors)
|
||||
|
||||
## 2 Customisation
|
||||
TODO: documentare comandi? Se sì, qui e basta o anche nel README?
|
||||
|
||||
### 2.1 Callbacks
|
||||
## 1 Skins
|
||||
|
||||
(TODO, check the README for now)
|
||||
|
||||
## 2 API
|
||||
|
||||
TODO: spiega
|
||||
|
||||
### 2.1 Skins handlers
|
||||
`skins_collectible.unlock_skin(p_name, skin_ID)`: unlock skin with ID `skin_ID` for `p_name`
|
||||
`skins_collectible.remove_skin(p_name, skin_ID)`: remove skin with ID `skin_ID` from `p_name`
|
||||
|
||||
### 2.2 Utils
|
||||
`skins_collectible.is_skin_unlocked(p_name, skin_ID)`: returns whether `p_name` has the skin with ID `skin_ID`, as a boolean.
|
||||
|
||||
### 2.3 Getters
|
||||
TODO: la struttura attuale è meh
|
||||
|
||||
### 2.4 Setters
|
||||
`skins_collectible.set_skin(player, skin_ID, <is_permanent>)`: set skin with ID `skin_ID` to `player`. `is_permanent` is an optional boolean indicating whether the skin should be remembered the next time they log in if they didn't change it before logging out (defaults to `false`)
|
||||
|
||||
### 2.5 Callbacks
|
||||
`skins_collectible.register_on_set_skin(p_name, skin_ID)`: additional behaviour when a player changes skin
|
||||
|
||||
## 3. About the author(s)
|
||||
I'm Zughy (Marco), a professional Italian pixel artist who fights for FOSS and digital ethics. If this library spared you a lot of time and you want to support me somehow, please consider donating on [Liberapay](https://liberapay.com/Zughy/). Also, this project wouldn't have been possible if it hadn't been for some friends who helped me testing through: `Giov4`, `SonoMichele`, `_Zaizen_` and `Xx_Crazyminer_xX`
|
||||
|
|
21
README.md
21
README.md
|
@ -4,6 +4,27 @@ Wear and unlock skins on Minetest
|
|||
|
||||
<a href="https://liberapay.com/Zughy/"><img src="https://i.imgur.com/4B2PxjP.png" alt="Support my work"/></a>
|
||||
|
||||
### How to
|
||||
> THIS IS AN ALPHA, EXPECT BREAKAGES
|
||||
|
||||
To add a skin:
|
||||
1. open the `skins_data` folder
|
||||
2. open an existing file or create a new one (Skins Collectible can read multiple skins from multiple files)
|
||||
3. follow the template down below, where `skinID` is an actual number
|
||||
```yaml
|
||||
skinID:
|
||||
name:
|
||||
description:
|
||||
texture:
|
||||
hint: (optional, default "(locked)")
|
||||
model: (optional, default none)
|
||||
tier: (optional, default 1)
|
||||
splash_art: (optional, default none)
|
||||
author: (optional, default "???")
|
||||
```
|
||||
|
||||
For more information or for using the API, check out the [DOCS](/DOCS.md)
|
||||
|
||||
### Want to help?
|
||||
Feel free to:
|
||||
* open an [issue](https://gitlab.com/zughy-friends-minetest/skins-collectible/-/issues)
|
||||
|
|
|
@ -1,35 +1,23 @@
|
|||
|
||||
1:
|
||||
name: Default1
|
||||
name: Default 1
|
||||
description: Not the best, but at least it's not Sam!
|
||||
texture: character_default1.png
|
||||
author: Zughy
|
||||
|
||||
2:
|
||||
name: Default2
|
||||
name: Default 2
|
||||
description: Not the best, but at least it's not Sam!
|
||||
texture: character_default2.png
|
||||
author: Zughy
|
||||
|
||||
3:
|
||||
name: Default3
|
||||
name: Default 3
|
||||
description: Not the best, but at least it's not Sam!
|
||||
texture: character_default3.png
|
||||
author: Zughy
|
||||
|
||||
4:
|
||||
name: Default4
|
||||
name: Default 4
|
||||
description: Not the best, but at least it's not Sam!
|
||||
texture: character_default4.png
|
||||
author: Zughy
|
||||
|
||||
# template
|
||||
#ID:
|
||||
#Name:
|
||||
#Description:
|
||||
#Texture:
|
||||
#Hint: (optional, default "(locked)")
|
||||
#Model: (optional, default none)
|
||||
#Tier: (optional, default 1)
|
||||
#Image: (optional, default none)
|
||||
#Author: (optional, default "???")
|
||||
|
|
Loading…
Reference in New Issue