Spawn von Saaten deaktiviert, um Dopplungen zu vermeiden.
This commit is contained in:
parent
f69bd7f597
commit
9dc6c712b3
58 changed files with 29 additions and 71 deletions
13
mods/.xcompat(alt)/doc/functions.md
Normal file
13
mods/.xcompat(alt)/doc/functions.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Functions API
|
||||
|
||||
## `can_interact_with_node(player, pos)`
|
||||
returns `bool`
|
||||
|
||||
checks for the ability to interact with a node via:
|
||||
* if a player
|
||||
* owner metadata key
|
||||
* protection_bypass
|
||||
|
||||
supports
|
||||
* minetest game default if present
|
||||
* else polyfill
|
12
mods/.xcompat(alt)/doc/gameid.md
Normal file
12
mods/.xcompat(alt)/doc/gameid.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# GameId API
|
||||
|
||||
## minetest versions >= 5.7
|
||||
|
||||
simply returns `minetest.get_game_info().id`
|
||||
|
||||
## minetest versions < 5.7
|
||||
|
||||
approximates the gameid value via a hardcoded table of gameid=>modname
|
||||
and then checks via `minetest.get_modpath()`. If it fails, it falls
|
||||
back to using `xcompat_unknown_gameid` as the id. See the chart in the
|
||||
readme for which games are supported
|
3
mods/.xcompat(alt)/doc/materials.md
Normal file
3
mods/.xcompat(alt)/doc/materials.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Materials API
|
||||
|
||||
consult `/src/materials/minetest.lua` at this time
|
13
mods/.xcompat(alt)/doc/player.md
Normal file
13
mods/.xcompat(alt)/doc/player.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Player API
|
||||
|
||||
mimic mtg player_api
|
||||
|
||||
## NOTE
|
||||
|
||||
`xcompat.player.player_attached`
|
||||
|
||||
read/write from it is fine, looping over it is not as it is a proxy table. this
|
||||
would need lua5.2 __pairs/__ipairs metamethods support which i could polyfill
|
||||
for using https://stackoverflow.com/a/77354254 but didnt feel like doing at
|
||||
this time. (luajit supports this via 5.2 extensions). additionally see issue:
|
||||
https://github.com/minetest/minetest/issues/15133
|
35
mods/.xcompat(alt)/doc/sounds.md
Normal file
35
mods/.xcompat(alt)/doc/sounds.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Sound API
|
||||
|
||||
## Option 1: Agnostically depend
|
||||
|
||||
You can do this by using a custom field in your node def instead of the `sounds` key.
|
||||
|
||||
```lua
|
||||
minetest.register_node(nodename, {
|
||||
...
|
||||
_sound_def = {
|
||||
key = "",
|
||||
input = {},
|
||||
},
|
||||
...
|
||||
})
|
||||
```
|
||||
|
||||
where:
|
||||
|
||||
* key: string name of the field from the sound api you want to use, for example `node_sound_stone_defaults`
|
||||
* input: table input of fields you want passed to the key field, used to override specific sounds.
|
||||
|
||||
## Option 2: Hard depend
|
||||
|
||||
add this mod to your mod.confs depends and directly call the sound_api as follows
|
||||
|
||||
```lua
|
||||
minetest.register_node(nodename, {
|
||||
...
|
||||
sounds = xcompat.sounds.node_sound_stone_defaults(input)
|
||||
...
|
||||
})
|
||||
```
|
||||
|
||||
* input: optional table to override some or all of returned values
|
3
mods/.xcompat(alt)/doc/textures.md
Normal file
3
mods/.xcompat(alt)/doc/textures.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Textures API
|
||||
|
||||
consult `/src/texture/minetest.lua` at this time
|
Loading…
Add table
Add a link
Reference in a new issue