aa12.lua 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. minetest.register_tool("rangedweapons:aa12_r", {
  2. stack_max= 1,
  3. wield_scale = {x=1.9,y=1.9,z=1.4},
  4. description = "",
  5. rw_next_reload = "rangedweapons:aa12_rr",
  6. load_sound = "rangedweapons_rifle_clip_in",
  7. range = 0,
  8. groups = {not_in_creative_inventory = 1},
  9. inventory_image = "rangedweapons_aa12_rld.png",
  10. })
  11. minetest.register_tool("rangedweapons:aa12_rr", {
  12. stack_max= 1,
  13. wield_scale = {x=1.9,y=1.9,z=1.4},
  14. description = "",
  15. rw_next_reload = "rangedweapons:aa12_rrr",
  16. load_sound = "rangedweapons_reload_a",
  17. range = 0,
  18. groups = {not_in_creative_inventory = 1},
  19. inventory_image = "rangedweapons_aa12.png",
  20. })
  21. minetest.register_tool("rangedweapons:aa12_rrr", {
  22. stack_max= 1,
  23. wield_scale = {x=1.9,y=1.9,z=1.4},
  24. description = "",
  25. rw_next_reload = "rangedweapons:aa12",
  26. load_sound = "rangedweapons_reload_b",
  27. range = 0,
  28. groups = {not_in_creative_inventory = 1},
  29. inventory_image = "rangedweapons_aa12.png",
  30. })
  31. -------------------------------------------
  32. minetest.register_tool("rangedweapons:aa12", {
  33. stack_max= 1,
  34. wield_scale = {x=1.9,y=1.9,z=1.4},
  35. description = "" ..core.colorize("#35cdff","AA-12\n") ..core.colorize("#FFFFFF", "Ranged damage: 1\n") ..core.colorize("#FFFFFF", "projectiles: 5\n") ..core.colorize("#FFFFFF", "Gun gravity: 4\n") ..core.colorize("#FFFFFF", "accuracy: 40%\n") ..core.colorize("#FFFFFF", "knockback: 5\n") ..core.colorize("#FFFFFF", "Reload delay: 1.5\n") ..core.colorize("#FFFFFF", "Clip size: 20\n") ..core.colorize("#FFFFFF", "Critical chance: 5%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 2.0x\n") ..core.colorize("#FFFFFF", "Ammunition: 12 gauge shell\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.2 (full-auto)\n") ..core.colorize("#FFFFFF", "Gun type: shotgun\n") ..core.colorize("#FFFFFF", "Bullet velocity: 25"),
  36. range = 0,
  37. inventory_image = "rangedweapons_aa12.png",
  38. RW_gun_capabilities = {
  39. automatic_gun = 1,
  40. gun_damage = {fleshy=1,knockback=5},
  41. gun_crit = 5,
  42. gun_critEffc = 2.0,
  43. suitable_ammo = {{"rangedweapons:shell",20}},
  44. gun_skill = {"shotgun_skill",40},
  45. gun_magazine = "rangedweapons:drum_mag",
  46. gun_icon = "rangedweapons_aa12_icon.png",
  47. gun_unloaded = "rangedweapons:aa12_r",
  48. gun_velocity = 25,
  49. gun_accuracy = 40,
  50. gun_cooldown = 0.2,
  51. gun_reload = 1.5/4,
  52. gun_projectiles = 1,
  53. has_shell = 1,
  54. gun_durability = 750,
  55. gun_smokeSize = 8,
  56. gun_door_breaking = 1,
  57. gun_projectiles = 5,
  58. gun_gravity = 4,
  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. })