Skip to content

Commit af4b63f

Browse files
raymookwolekr
authored andcommittedSep 12, 2016
fix missing parameters in some mentions of entity callbacks
1 parent 403dada commit af4b63f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed
 

‎doc/lua_api.txt

+5-3
Original file line numberDiff line numberDiff line change
@@ -3329,13 +3329,15 @@ Registered entities
33293329
* It has the member `.object`, which is an `ObjectRef` pointing to the object
33303330
* The original prototype stuff is visible directly via a metatable
33313331
* Callbacks:
3332-
* `on_activate(self, staticdata)`
3332+
* `on_activate(self, staticdata, dtime_s)`
33333333
* Called when the object is instantiated.
3334+
* `dtime_s` is the time passed since the object was unloaded, which can
3335+
be used for updating the entity state.
33343336
* `on_step(self, dtime)`
33353337
* Called on every server tick, after movement and collision processing.
33363338
`dtime` is usually 0.1 seconds, as per the `dedicated_server_step` setting
33373339
`in minetest.conf`.
3338-
* `on_punch(self, puncher, time_from_last_punch, tool_capabilities, dir`
3340+
* `on_punch(self, puncher, time_from_last_punch, tool_capabilities, dir)`
33393341
* Called when somebody punches the object.
33403342
* Note that you probably want to handle most punches using the
33413343
automatic armor group system.
@@ -3463,7 +3465,7 @@ Definition tables
34633465

34643466
on_activate = function(self, staticdata, dtime_s),
34653467
on_step = function(self, dtime),
3466-
on_punch = function(self, hitter),
3468+
on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir),
34673469
on_rightclick = function(self, clicker),
34683470
get_staticdata = function(self),
34693471
-- ^ Called sometimes; the string returned is passed to on_activate when

0 commit comments

Comments
 (0)
Please sign in to comment.