tec9.lua 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. minetest.register_craftitem("rangedweapons:tec9_r", {
  2. stack_max= 1,
  3. wield_scale = {x=1.25,y=1.25,z=1.50},
  4. description = "",
  5. range = 0,
  6. rw_next_reload = "rangedweapons:tec9_rr",
  7. load_sound = "rangedweapons_handgun_mag_in",
  8. groups = {not_in_creative_inventory = 1},
  9. inventory_image = "rangedweapons_tec9_rld.png",
  10. })
  11. minetest.register_craftitem("rangedweapons:tec9_rr", {
  12. stack_max= 1,
  13. wield_scale = {x=1.25,y=1.25,z=1.50},
  14. description = "",
  15. range = 0,
  16. rw_next_reload = "rangedweapons:tec9_rrr",
  17. load_sound = "rangedweapons_reload_a",
  18. groups = {not_in_creative_inventory = 1},
  19. inventory_image = "rangedweapons_tec9.png",
  20. })
  21. minetest.register_craftitem("rangedweapons:tec9_rrr", {
  22. stack_max= 1,
  23. wield_scale = {x=1.25,y=1.25,z=1.50},
  24. description = "",
  25. range = 0,
  26. rw_next_reload = "rangedweapons:tec9",
  27. load_sound = "rangedweapons_reload_b",
  28. groups = {not_in_creative_inventory = 1},
  29. inventory_image = "rangedweapons_tec9.png",
  30. })
  31. minetest.register_craftitem("rangedweapons:tec9", {
  32. stack_max= 1,
  33. wield_scale = {x=1.25,y=1.25,z=1.50},
  34. description = "" ..core.colorize("#35cdff","TEC-9\n") ..core.colorize("#FFFFFF", "Gun damage: 1\n") ..core.colorize("#FFFFFF", "accuracy: 75%\n") ..core.colorize("#FFFFFF", "Gun knockback: 0\n") ..core.colorize("#FFFFFF", "Gun Critical chance: 9%\n") ..core.colorize("#FFFFFF", "Gun Critical efficiency: 1.9x\n") ..core.colorize("#FFFFFF", "Reload delay: 1.0\n") ..core.colorize("#FFFFFF", "Clip size: 50\n") ..core.colorize("#FFFFFF", "Ammunition: 9x19mm parabellum\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.2\n") ..core.colorize("#FFFFFF", "Gun type: machine pistol\n") ..core.colorize("#FFFFFF", "Bullet velocity: 20"),
  35. range = 0,
  36. inventory_image = "rangedweapons_tec9.png",
  37. RW_gun_capabilities = {
  38. automatic_gun = 1,
  39. gun_damage = {fleshy=1,knockback=0},
  40. gun_crit = 9,
  41. gun_critEffc = 1.9,
  42. suitable_ammo = {{"rangedweapons:9mm",50}},
  43. gun_skill = {"mp_skill",80},
  44. gun_magazine = "rangedweapons:machinepistol_mag",
  45. gun_icon = "rangedweapons_tec9_icon.png",
  46. gun_unloaded = "rangedweapons:tec9_r",
  47. gun_velocity = 20,
  48. gun_accuracy = 75,
  49. gun_cooldown = 0.2,
  50. gun_reload = 1.0/4,
  51. gun_projectiles = 1,
  52. has_shell = 1,
  53. gun_gravity = 0,
  54. gun_durability = 1100,
  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. })