mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 18:41:09 +01:00
wip mcl_damage documentation
This commit is contained in:
parent
c59bea211d
commit
da4952a125
1 changed files with 15 additions and 0 deletions
15
mods/CORE/mcl_damage/API.md
Normal file
15
mods/CORE/mcl_damage/API.md
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# mcl_damage
|
||||||
|
|
||||||
|
This mod is intended to overall minetest's native damage system, to provide a better integration between features that deals with entities' health.
|
||||||
|
|
||||||
|
WARNING: Not using it inside your mods may cause strange bugs (using the native damage system may cause conflicts with this system).
|
||||||
|
|
||||||
|
## Callbacks
|
||||||
|
|
||||||
|
To modify the amount of damage made by something:
|
||||||
|
|
||||||
|
```lua
|
||||||
|
--obj: an ObjectRef
|
||||||
|
mcl_damage.register_modifier(function(obj, damage, reason)
|
||||||
|
end, 0)
|
||||||
|
```
|
Loading…
Reference in a new issue