1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +00:00

Minor doc updates for PlayerHPChangeReason updates

This commit is contained in:
Wuzzy 2025-07-04 12:36:05 +02:00
parent a21dd0a992
commit 4374f1d7ed

View file

@ -11079,8 +11079,8 @@ The `PlayerHPChangeReason` table specifies a reason for player health changes.
* The `type` field will have one of the following values: * The `type` field will have one of the following values:
* `set_hp`: A mod or the engine called `set_hp`, either without * `set_hp`: A mod or the engine called `set_hp`, either without
giving a reason, or by setting `set_hp` as damage type giving a reason, or by setting `set_hp` as damage type
explicitly explicitly
* `punch`: Was punched. `reason.object` will hold the puncher, or nil if none. * `punch`: Was punched. `reason.object` will hold the puncher, or nil if none.
* `fall`: Fall damage. * `fall`: Fall damage.
* `node_damage`: `damage_per_second` from a neighboring node. * `node_damage`: `damage_per_second` from a neighboring node.
@ -11099,8 +11099,8 @@ The `PlayerHPChangeReason` table specifies a reason for player health changes.
* `mod`: Mod or builtin * `mod`: Mod or builtin
* Mods may add additional fields * Mods may add additional fields
Note: The `from` field doesn't need to be provided in the `set_hp` method, Note: The `from` is ignored by `ObjectRef:set_hp`, the engine will always
the engine will automatically set it to `mod`. set it to `mod`.
Chat command definition Chat command definition
----------------------- -----------------------