mp5.lua 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. minetest.register_tool("rangedweapons:mp5_r", {
  2. stack_max= 1,
  3. wield_scale = {x=1.75,y=1.75,z=1.20},
  4. description = "",
  5. rw_next_reload = "rangedweapons:mp5_rr",
  6. load_sound = "rangedweapons_handgun_mag_in",
  7. range = 0,
  8. groups = {not_in_creative_inventory = 1},
  9. inventory_image = "rangedweapons_mp5_rld.png",
  10. })
  11. minetest.register_tool("rangedweapons:mp5_rr", {
  12. stack_max= 1,
  13. wield_scale = {x=1.75,y=1.75,z=1.20},
  14. description = "",
  15. rw_next_reload = "rangedweapons:mp5_rrr",
  16. load_sound = "rangedweapons_reload_a",
  17. range = 0,
  18. groups = {not_in_creative_inventory = 1},
  19. inventory_image = "rangedweapons_mp5.png",
  20. })
  21. minetest.register_tool("rangedweapons:mp5_rrr", {
  22. stack_max= 1,
  23. wield_scale = {x=1.75,y=1.75,z=1.20},
  24. description = "",
  25. rw_next_reload = "rangedweapons:mp5",
  26. load_sound = "rangedweapons_reload_b",
  27. range = 0,
  28. groups = {not_in_creative_inventory = 1},
  29. inventory_image = "rangedweapons_mp5.png",
  30. })
  31. minetest.register_tool("rangedweapons:mp5", {
  32. stack_max= 1,
  33. wield_scale = {x=1.75,y=1.75,z=1.20},
  34. description = "" ..core.colorize("#35cdff","MP5\n") ..core.colorize("#FFFFFF", "Gun damage: 3\n") ..core.colorize("#FFFFFF", "accuracy: 74%\n") ..core.colorize("#FFFFFF", "Gun knockback: 1\n") ..core.colorize("#FFFFFF", "Gun Critical chance: 7%\n")..core.colorize("#FFFFFF", "Critical efficiency: 2.0x\n") ..core.colorize("#FFFFFF", "Reload delay: 1.0\n") ..core.colorize("#FFFFFF", "Clip size: 40/40\n") ..core.colorize("#FFFFFF", "Ammunition: 9x19mm parabellum/10mm auto\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.075(full-auto)\n") ..core.colorize("#FFFFFF", "Gun type: sub-machinegun\n") ..core.colorize("#FFFFFF", "Bullet velocity: 25"),
  35. range = 0,
  36. inventory_image = "rangedweapons_mp5.png",
  37. RW_gun_capabilities = {
  38. automatic_gun = 1,
  39. gun_damage = {fleshy=3,knockback=1},
  40. gun_crit = 7,
  41. gun_critEffc = 2.0,
  42. suitable_ammo = {{"rangedweapons:9mm",40},{"rangedweapons:10mm",40}},
  43. gun_skill = {"smg_skill",75},
  44. gun_magazine = "rangedweapons:machinepistol_mag",
  45. gun_icon = "rangedweapons_mp5_icon.png",
  46. gun_unloaded = "rangedweapons:mp5_r",
  47. gun_velocity = 25,
  48. gun_accuracy = 74,
  49. gun_cooldown = 0.075,
  50. gun_reload = 1.0/4,
  51. gun_projectiles = 1,
  52. has_shell = 1,
  53. gun_gravity = 0,
  54. gun_durability = 1600,
  55. gun_smokeSize = 4,
  56. gun_unload_sound = "rangedweapons_handgun_mag_out",
  57. gun_sound = "rangedweapons_machine_pistol",
  58. },
  59. on_secondary_use = function(itemstack, user, pointed_thing)
  60. rangedweapons_reload_gun(itemstack, user)
  61. return itemstack
  62. end,
  63. })