Update on_step

This commit is contained in:
tacigar 2017-01-07 17:38:49 +09:00
parent 7ed8b8172a
commit 4ee3ef55dd
1 changed files with 5 additions and 0 deletions

View File

@ -517,6 +517,11 @@ function maidroid.register_maidroid(product_name, def)
-- on_step is a callback function that is called every delta times.
local function on_step(self, dtime)
-- if owner didn't login, the maidroid does nothing.
if not minetest.get_player_by_name(self.owner_name) then
return
end
-- pickup surrounding item.
pickup_item(self)