1
0
mirror of https://github.com/tacigar/maidroid.git synced 2024-09-24 12:40:17 +02:00

Update on_step

This commit is contained in:
tacigar 2017-01-07 17:38:49 +09:00
parent 7ed8b8172a
commit 4ee3ef55dd

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. -- on_step is a callback function that is called every delta times.
local function on_step(self, dtime) 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 surrounding item.
pickup_item(self) pickup_item(self)