m79.lua 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. minetest.register_tool("rangedweapons:m79_r", {
  2. stack_max= 1,
  3. wield_scale = {x=2.0,y=2.0,z=2.5},
  4. range = 0,
  5. description = "",
  6. groups = {not_in_creative_inventory = 1},
  7. rw_next_reload = "rangedweapons:m79",
  8. load_sound = "rangedweapons_reload_a",
  9. inventory_image = "rangedweapons_m79_rld.png",
  10. })
  11. minetest.register_tool("rangedweapons:m79", {
  12. description = "" ..core.colorize("#35cdff","m79\n") ..core.colorize("#FFFFFF", "Direct contact damage: 10\n")..core.colorize("#FFFFFF", "Accuracy: 92%\n") ..core.colorize("#FFFFFF", "direct contact knockback: 25\n") ..core.colorize("#FFFFFF", "Gun crit chance: 8%\n")..core.colorize("#FFFFFF", "Critical efficiency: 3x\n") ..core.colorize("#FFFFFF", "Reload delay: 0.9\n")..core.colorize("#FFFFFF", "Clip size: 1\n") ..core.colorize("#FFFFFF", "Gun gravity: 5\n")..core.colorize("#FFFFFF", "Ammunition: 40mm grenades\n")..core.colorize("#FFFFFF", "Gun type: grenade launcher\n") ..core.colorize("#FFFFFF", "Bullet velocity: 20"),
  13. range = 0,
  14. wield_scale = {x=2.0,y=2.0,z=2.5},
  15. inventory_image = "rangedweapons_m79.png",
  16. RW_gun_capabilities = {
  17. gun_damage = {fleshy=10,knockback=25},
  18. gun_crit = 8,
  19. gun_critEffc = 3.0,
  20. suitable_ammo = {{"rangedweapons:40mm",1}},
  21. gun_skill = {"",1},
  22. gun_magazine = "rangedweapons:shell_grenadedrop",
  23. gun_icon = "rangedweapons_m79_icon.png",
  24. gun_unloaded = "rangedweapons:m79_r",
  25. gun_cooling = "rangedweapons:m79",
  26. gun_velocity = 20,
  27. gun_accuracy = 92,
  28. gun_cooldown = 0.0,
  29. gun_reload = 0.9,
  30. gun_projectiles = 1,
  31. gun_smokeSize = 15,
  32. gun_durability = 100,
  33. gun_gravity = 5,
  34. gun_unload_sound = "rangedweapons_handgun_mag_out",
  35. gun_sound = "rangedweapons_rocket",
  36. },
  37. on_secondary_use = function(itemstack, user, pointed_thing)
  38. rangedweapons_reload_gun(itemstack, user)
  39. return itemstack
  40. end,
  41. on_use = function(itemstack, user, pointed_thing)
  42. rangedweapons_shoot_gun(itemstack, user)
  43. return itemstack
  44. end,
  45. })