Add explanations of textures & player api usage, non-function sounds, and some minor touch-up of docs (#55)

This commit is contained in:
Medley
2025-10-23 00:34:20 +02:00
committed by GitHub
parent c024d0b6c8
commit 5a778586c9
6 changed files with 72 additions and 19 deletions

View File

@@ -1,5 +1,6 @@
# Sound API
## Option 1: Agnostically depend
You can do this by using a custom field in your node def instead of the `sounds` key.
@@ -22,7 +23,7 @@ where:
## Option 2: Hard depend
add this mod to your mod.confs depends and directly call the sound_api as follows
add this mod to your mod.confs depends and directly call the `sound_api` as follows
```lua
minetest.register_node(nodename, {
@@ -32,4 +33,13 @@ minetest.register_node(nodename, {
})
```
* input: optional table to override some or all of returned values
* input: optional table to override some or all of returned values
## Note
In some instances, when sounds are defined by strings and the sound doesn't
belong to a block or anything mod-specific, xcompat may not be needed. E.g.
the sound `"default_dig_choppy"` is accessed in the same way in both Mineclonia
and Minetest Game, without xcompat.