mirror of
https://github.com/minetest/minetest.git
synced 2024-11-09 17:23:45 +01:00
fix missing parameters in some mentions of entity callbacks
This commit is contained in:
parent
403dada85a
commit
af4b63ff21
@ -3329,13 +3329,15 @@ Registered entities
|
|||||||
* It has the member `.object`, which is an `ObjectRef` pointing to the object
|
* It has the member `.object`, which is an `ObjectRef` pointing to the object
|
||||||
* The original prototype stuff is visible directly via a metatable
|
* The original prototype stuff is visible directly via a metatable
|
||||||
* Callbacks:
|
* Callbacks:
|
||||||
* `on_activate(self, staticdata)`
|
* `on_activate(self, staticdata, dtime_s)`
|
||||||
* Called when the object is instantiated.
|
* Called when the object is instantiated.
|
||||||
|
* `dtime_s` is the time passed since the object was unloaded, which can
|
||||||
|
be used for updating the entity state.
|
||||||
* `on_step(self, dtime)`
|
* `on_step(self, dtime)`
|
||||||
* Called on every server tick, after movement and collision processing.
|
* Called on every server tick, after movement and collision processing.
|
||||||
`dtime` is usually 0.1 seconds, as per the `dedicated_server_step` setting
|
`dtime` is usually 0.1 seconds, as per the `dedicated_server_step` setting
|
||||||
`in minetest.conf`.
|
`in minetest.conf`.
|
||||||
* `on_punch(self, puncher, time_from_last_punch, tool_capabilities, dir`
|
* `on_punch(self, puncher, time_from_last_punch, tool_capabilities, dir)`
|
||||||
* Called when somebody punches the object.
|
* Called when somebody punches the object.
|
||||||
* Note that you probably want to handle most punches using the
|
* Note that you probably want to handle most punches using the
|
||||||
automatic armor group system.
|
automatic armor group system.
|
||||||
@ -3463,7 +3465,7 @@ Definition tables
|
|||||||
|
|
||||||
on_activate = function(self, staticdata, dtime_s),
|
on_activate = function(self, staticdata, dtime_s),
|
||||||
on_step = function(self, dtime),
|
on_step = function(self, dtime),
|
||||||
on_punch = function(self, hitter),
|
on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir),
|
||||||
on_rightclick = function(self, clicker),
|
on_rightclick = function(self, clicker),
|
||||||
get_staticdata = function(self),
|
get_staticdata = function(self),
|
||||||
-- ^ Called sometimes; the string returned is passed to on_activate when
|
-- ^ Called sometimes; the string returned is passed to on_activate when
|
||||||
|
Loading…
Reference in New Issue
Block a user