m16.lua 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. minetest.register_tool("rangedweapons:m16_r", {
  2. stack_max= 1,
  3. wield_scale = {x=1.75,y=1.75,z=1.3},
  4. description = "",
  5. rw_next_reload = "rangedweapons:m16_rr",
  6. load_sound = "rangedweapons_handgun_mag_in",
  7. range = 0,
  8. groups = {not_in_creative_inventory = 1},
  9. inventory_image = "rangedweapons_m16_rld.png",
  10. })
  11. minetest.register_tool("rangedweapons:m16_rr", {
  12. stack_max= 1,
  13. wield_scale = {x=1.75,y=1.75,z=1.3},
  14. description = "",
  15. rw_next_reload = "rangedweapons:m16_rrr",
  16. load_sound = "rangedweapons_rifle_reload_a",
  17. range = 0,
  18. groups = {not_in_creative_inventory = 1},
  19. inventory_image = "rangedweapons_m16.png",
  20. })
  21. minetest.register_tool("rangedweapons:m16_rrr", {
  22. stack_max= 1,
  23. wield_scale = {x=1.75,y=1.75,z=1.3},
  24. description = "",
  25. rw_next_reload = "rangedweapons:m16",
  26. load_sound = "rangedweapons_rifle_reload_b",
  27. range = 0,
  28. groups = {not_in_creative_inventory = 1},
  29. inventory_image = "rangedweapons_m16.png",
  30. })
  31. minetest.register_tool("rangedweapons:m16", {
  32. stack_max= 1,
  33. wield_scale = {x=1.75,y=1.75,z=1.3},
  34. description = "" ..core.colorize("#35cdff","m16\n") ..core.colorize("#FFFFFF", "Gun damage: 6\n") ..core.colorize("#FFFFFF", "accuracy: 75%\n") ..core.colorize("#FFFFFF", "Gun knockback: 4\n") ..core.colorize("#FFFFFF", "Gun Critical chance: 11%\n")..core.colorize("#FFFFFF", "Critical efficiency: 2.75x\n") ..core.colorize("#FFFFFF", "Reload delay: 1.0\n") ..core.colorize("#FFFFFF", "Clip size: 20\n") ..core.colorize("#FFFFFF", "Ammunition: 5.56mm rounds\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.067(full-auto)\n") ..core.colorize("#FFFFFF", "Gun type: assault rifle\n")
  35. ..core.colorize("#FFFFFF", "Enemy penetration: 10%\n") ..core.colorize("#FFFFFF", "Bullet velocity: 35"),
  36. range = 0,
  37. inventory_image = "rangedweapons_m16.png",
  38. RW_gun_capabilities = {
  39. automatic_gun = 1,
  40. gun_damage = {fleshy=6,knockback=4},
  41. gun_crit = 11,
  42. gun_critEffc = 2.75,
  43. suitable_ammo = {{"rangedweapons:556mm",20}},
  44. gun_skill = {"arifle_skill",55},
  45. gun_magazine = "rangedweapons:assaultrifle_mag",
  46. gun_icon = "rangedweapons_m16_icon.png",
  47. gun_unloaded = "rangedweapons:m16_r",
  48. gun_velocity = 35,
  49. gun_accuracy = 75,
  50. gun_cooldown = 0.067,
  51. gun_reload = 1.0/4,
  52. gun_projectiles = 1,
  53. has_shell = 1,
  54. gun_gravity = 0,
  55. gun_durability = 1350,
  56. gun_smokeSize = 5,
  57. gun_mob_penetration = 10,
  58. gun_unload_sound = "rangedweapons_handgun_mag_out",
  59. gun_sound = "rangedweapons_smg",
  60. },
  61. on_secondary_use = function(itemstack, user, pointed_thing)
  62. rangedweapons_reload_gun(itemstack, user)
  63. return itemstack
  64. end,
  65. inventory_image = "rangedweapons_m16.png",
  66. })