Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on_activate = function(self, staticdata, dtime_s)
- if string.sub(staticdata, 1, string.len("return")) == "return" then
- local data = minetest.deserialize(staticdata)
- if data and type(data) == "table" then
- self.itemstring = data.itemstring
- self.always_collect = data.always_collect
- print(dump(dtime_s))
- if data.age then
- self.age = data.age + dtime_s
- else
- self.age = dtime_s
- end
- end
- else
- self.itemstring = staticdata
- end
- self.object:set_armor_groups({immortal=1})
- self.object:setvelocity({x=0, y=2, z=0})
- self.object:setacceleration({x=0, y=-10, z=0})
- self:set_item(self.itemstring)
- end,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement