mirror of
https://github.com/mt-mods/xcompat.git
synced 2025-11-20 01:25:30 +01:00
Add explanations of textures & player api usage, non-function sounds, and some minor touch-up of docs (#55)
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user