uzi.lua 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. minetest.register_tool("rangedweapons:uzi_r", {
  2. stack_max= 1,
  3. wield_scale = {x=1.6,y=1.6,z=1.10},
  4. description = "",
  5. rw_next_reload = "rangedweapons:uzi_rr",
  6. load_sound = "rangedweapons_handgun_mag_in",
  7. range = 0,
  8. groups = {not_in_creative_inventory = 1},
  9. inventory_image = "rangedweapons_uzi_rld.png",
  10. })
  11. minetest.register_tool("rangedweapons:uzi_rr", {
  12. stack_max= 1,
  13. wield_scale = {x=1.6,y=1.6,z=1.10},
  14. description = "",
  15. rw_next_reload = "rangedweapons:uzi_rrr",
  16. load_sound = "rangedweapons_reload_a",
  17. range = 0,
  18. groups = {not_in_creative_inventory = 1},
  19. inventory_image = "rangedweapons_uzi.png",
  20. })
  21. minetest.register_tool("rangedweapons:uzi_rrr", {
  22. stack_max= 1,
  23. wield_scale = {x=1.6,y=1.6,z=1.10},
  24. description = "",
  25. rw_next_reload = "rangedweapons:uzi",
  26. load_sound = "rangedweapons_reload_b",
  27. range = 0,
  28. groups = {not_in_creative_inventory = 1},
  29. inventory_image = "rangedweapons_uzi.png",
  30. })
  31. -------------------------------------------
  32. minetest.register_tool("rangedweapons:uzi", {
  33. stack_max= 1,
  34. wield_scale = {x=1.6,y=1.6,z=1.10},
  35. description = "" ..core.colorize("#35cdff","UZI\n") ..core.colorize("#FFFFFF", "Ranged damage: 2\n") ..core.colorize("#FFFFFF", "accuracy: 72%\n") ..core.colorize("#FFFFFF", "knockback: 0\n") ..core.colorize("#FFFFFF", "Reload delay: 1.2\n") ..core.colorize("#FFFFFF", "Clip size: 40/22\n") ..core.colorize("#FFFFFF", "Critical chance: 5%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 1.9x\n") ..core.colorize("#FFFFFF", "Ammunition: 9x19mm parabellum/.45acp\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.08 (full-auto)\n") ..core.colorize("#FFFFFF", "Gun type: machine pistol\n") ..core.colorize("#FFFFFF", "Bullet velocity: 25"),
  36. range = 0,
  37. inventory_image = "rangedweapons_uzi.png",
  38. RW_gun_capabilities = {
  39. automatic_gun = 1,
  40. gun_damage = {fleshy=2,knockback=0},
  41. gun_crit = 5,
  42. gun_critEffc = 1.9,
  43. suitable_ammo = {{"rangedweapons:9mm",40},{"rangedweapons:45acp",22}},
  44. gun_skill = {"mp_skill",80},
  45. gun_magazine = "rangedweapons:machinepistol_mag",
  46. gun_icon = "rangedweapons_uzi_icon.png",
  47. gun_unloaded = "rangedweapons:uzi_r",
  48. gun_velocity = 25,
  49. gun_accuracy = 72,
  50. gun_cooldown = 0.08,
  51. gun_reload = 1.2/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_machine_pistol",
  59. },
  60. on_secondary_use = function(itemstack, user, pointed_thing)
  61. rangedweapons_reload_gun(itemstack, user)
  62. return itemstack
  63. end,
  64. })