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,3 +1,20 @@
# Textures API
consult `/src/texture/minetest.lua` at this time
## Usage
To use a texture in your mod, find the texture you want by looking at one of
the files in `/src/texture`, and append its path to `xcompat.textures`.
If a texture isn't supported for the current game, xcompat creates a solid
color texture using texture modifiers as a fallback, ensuring compatibility.
## Example
| Path | Result in Minetest Game |
| - | - |
| xcompat.textures.wool.white | `"wool_white.png"` |
| xcompat.textures.wood.apple.planks | `"default_wood.png"` |
| xcompat.textures.wood.jungle.leaves | `"default_jungleleaves.png"` |
| xcompat.textures.glass.pane | `"default_glass.png"` |
For games like Minetest and Mineclonia, see the file `/src/textures/minetest.lua`.