Advertisement
Guest User

Untitled

a guest
May 21st, 2014
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. on_activate = function(self, staticdata, dtime_s)
  2. if string.sub(staticdata, 1, string.len("return")) == "return" then
  3. local data = minetest.deserialize(staticdata)
  4. if data and type(data) == "table" then
  5. self.itemstring = data.itemstring
  6. self.always_collect = data.always_collect
  7. print(dump(dtime_s))
  8. if data.age then
  9. self.age = data.age + dtime_s
  10. else
  11. self.age = dtime_s
  12. end
  13. end
  14. else
  15. self.itemstring = staticdata
  16. end
  17. self.object:set_armor_groups({immortal=1})
  18. self.object:setvelocity({x=0, y=2, z=0})
  19. self.object:setacceleration({x=0, y=-10, z=0})
  20. self:set_item(self.itemstring)
  21. end,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement