jackhammer.lua 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. minetest.register_tool("rangedweapons:jackhammer_r", {
  2. stack_max= 1,
  3. wield_scale = {x=2.6,y=2.6,z=1.8},
  4. description = "",
  5. rw_next_reload = "rangedweapons:jackhammer_rr",
  6. load_sound = "rangedweapons_rifle_clip_in",
  7. range = 0,
  8. groups = {not_in_creative_inventory = 1},
  9. inventory_image = "rangedweapons_jackhammer_rld.png",
  10. })
  11. minetest.register_tool("rangedweapons:jackhammer_rr", {
  12. stack_max= 1,
  13. wield_scale = {x=2.6,y=2.6,z=1.8},
  14. description = "",
  15. rw_next_reload = "rangedweapons:jackhammer_rrr",
  16. load_sound = "rangedweapons_reload_a",
  17. range = 0,
  18. groups = {not_in_creative_inventory = 1},
  19. inventory_image = "rangedweapons_jackhammer.png",
  20. })
  21. minetest.register_tool("rangedweapons:jackhammer_rrr", {
  22. stack_max= 1,
  23. wield_scale = {x=2.6,y=2.6,z=1.8},
  24. description = "",
  25. rw_next_reload = "rangedweapons:jackhammer",
  26. load_sound = "rangedweapons_reload_b",
  27. range = 0,
  28. groups = {not_in_creative_inventory = 1},
  29. inventory_image = "rangedweapons_jackhammer.png",
  30. })
  31. -------------------------------------------
  32. minetest.register_tool("rangedweapons:jackhammer", {
  33. stack_max= 1,
  34. wield_scale = {x=2.6,y=2.6,z=1.8},
  35. description = "" ..core.colorize("#35cdff","Jackhammer\n") ..core.colorize("#FFFFFF", "Ranged damage: 3\n") ..core.colorize("#FFFFFF", "projectiles: 8\n") ..core.colorize("#FFFFFF", "Gun gravity: 3\n") ..core.colorize("#FFFFFF", "accuracy: 35%\n") ..core.colorize("#FFFFFF", "knockback: 6\n") ..core.colorize("#FFFFFF", "Reload delay: 1.6\n") ..core.colorize("#FFFFFF", "Clip size: 10\n") ..core.colorize("#FFFFFF", "Critical chance: 7%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 2.2x\n") ..core.colorize("#FFFFFF", "Ammunition: 12 gauge shell\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.25 (full-auto)\n") ..core.colorize("#FFFFFF", "Gun type: shotgun\n") ..core.colorize("#FFFFFF", "Bullet velocity: 30"),
  36. range = 0,
  37. inventory_image = "rangedweapons_jackhammer.png",
  38. RW_gun_capabilities = {
  39. automatic_gun = 1,
  40. gun_damage = {fleshy=3,knockback=6},
  41. gun_crit = 7,
  42. gun_critEffc = 2.2,
  43. suitable_ammo = {{"rangedweapons:shell",10}},
  44. gun_skill = {"shotgun_skill",35},
  45. gun_magazine = "rangedweapons:drum_mag",
  46. gun_icon = "rangedweapons_jackhammer_icon.png",
  47. gun_unloaded = "rangedweapons:jackhammer_r",
  48. gun_velocity = 30,
  49. gun_accuracy = 35,
  50. gun_cooldown = 0.25,
  51. gun_reload = 1.6/4,
  52. gun_projectiles = 1,
  53. has_shell = 1,
  54. gun_durability = 825,
  55. gun_smokeSize = 9,
  56. gun_door_breaking = 1,
  57. gun_projectiles = 8,
  58. gun_gravity = 3,
  59. gun_unload_sound = "rangedweapons_rifle_clip_out",
  60. gun_sound = "rangedweapons_shotgun_shot",
  61. },
  62. on_secondary_use = function(itemstack, user, pointed_thing)
  63. rangedweapons_reload_gun(itemstack, user)
  64. return itemstack
  65. end,
  66. })