init.lua 736 B

1234567891011121314151617181920212223242526272829303132333435
  1. local modname = minetest.get_current_modname()
  2. local modpath = minetest.get_modpath(modname)
  3. dofile(modpath .. "/dragonflies.lua")
  4. minetest.register_entity(modname .. ":bug",
  5. {
  6. initial_properties =
  7. {
  8. visual = "mesh",
  9. mesh = modname .. "_bug.b3d",
  10. textures = {"eg_bugs_bug.png"},
  11. physical = true,
  12. collisionbox = {-0.35, 0, -0.35, 0.35, 0.65, 0.35},
  13. glow = 5,
  14. },
  15. timeout = 50,
  16. buoyancy = 0.2,
  17. lung_capacity = 10,
  18. max_hp = 10,
  19. on_step = mobkit.stepfunc,
  20. on_activate = mobkit.actfunc,
  21. get_staticdata = mobkit.statfunc,
  22. logic = function(self)
  23. end,
  24. max_speed = 5,
  25. jump_height = 1,
  26. view_range = 5,
  27. attack = {range = 1, damage_groups = {fleshy = 2}},
  28. armor_groups = {fleshy = 3}
  29. })