ump.lua 2.5 KB

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