scar.lua 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. minetest.register_tool("rangedweapons:scar_r", {
  2. stack_max= 1,
  3. wield_scale = {x=1.7,y=1.7,z=1.25},
  4. description = "",
  5. rw_next_reload = "rangedweapons:scar_rr",
  6. load_sound = "rangedweapons_rifle_clip_in",
  7. range = 0,
  8. groups = {not_in_creative_inventory = 1},
  9. inventory_image = "rangedweapons_scar_rld.png",
  10. })
  11. minetest.register_tool("rangedweapons:scar_rr", {
  12. stack_max= 1,
  13. wield_scale = {x=1.7,y=1.7,z=1.25},
  14. description = "",
  15. rw_next_reload = "rangedweapons:scar_rrr",
  16. load_sound = "rangedweapons_rifle_reload_a",
  17. range = 0,
  18. groups = {not_in_creative_inventory = 1},
  19. inventory_image = "rangedweapons_scar.png",
  20. })
  21. minetest.register_tool("rangedweapons:scar_rrr", {
  22. stack_max= 1,
  23. wield_scale = {x=1.7,y=1.7,z=1.25},
  24. description = "",
  25. rw_next_reload = "rangedweapons:scar",
  26. load_sound = "rangedweapons_rifle_reload_b",
  27. range = 0,
  28. groups = {not_in_creative_inventory = 1},
  29. inventory_image = "rangedweapons_scar.png",
  30. })
  31. minetest.register_tool("rangedweapons:scar", {
  32. stack_max= 1,
  33. wield_scale = {x=1.7,y=1.7,z=1.25},
  34. description = "" ..core.colorize("#35cdff","FN SCAR 16\n") ..core.colorize("#FFFFFF", "Ranged damage: 9\n") ..core.colorize("#FFFFFF", "Accuracy: 85%\n") ..core.colorize("#FFFFFF", "Gun knockback: 6\n")..core.colorize("#FFFFFF", "Critical chance: 11%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 2.75x\n") ..core.colorize("#FFFFFF", "Ammunition: 7.62mm rounds/5.56mm rounds\n") ..core.colorize("#FFFFFF", "Reload delay: 1.2\n") ..core.colorize("#FFFFFF", "Clip size: 20/30\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.15\n") ..core.colorize("#FFFFFF", "Block penetration: 7%\n")
  35. ..core.colorize("#FFFFFF", "penetration: 20%\n") ..core.colorize("#FFFFFF", "Gun type: Assault rifle\n") ..core.colorize("#FFFFFF", "Bullet velocity: 45"),
  36. range = 0,
  37. inventory_image = "rangedweapons_scar.png",
  38. RW_gun_capabilities = {
  39. automatic_gun = 1,
  40. gun_damage = {fleshy=9,knockback=6},
  41. gun_crit = 11,
  42. gun_critEffc = 2.75,
  43. suitable_ammo = {{"rangedweapons:762mm",20},{"rangedweapons:556mm",30}},
  44. gun_skill = {"arifle_skill",50},
  45. gun_magazine = "rangedweapons:assaultrifle_mag",
  46. gun_icon = "rangedweapons_scar_icon.png",
  47. gun_unloaded = "rangedweapons:scar_r",
  48. gun_velocity = 45,
  49. gun_accuracy = 85,
  50. gun_cooldown = 0.15,
  51. gun_reload = 1.2/4,
  52. gun_projectiles = 1,
  53. has_shell = 1,
  54. gun_gravity = 0,
  55. gun_durability = 1600,
  56. gun_smokeSize = 5,
  57. gun_mob_penetration = 20,
  58. gun_node_penetration = 7,
  59. gun_unload_sound = "rangedweapons_rifle_clip_out",
  60. gun_sound = "rangedweapons_ak",
  61. },
  62. on_secondary_use = function(itemstack, user, pointed_thing)
  63. rangedweapons_reload_gun(itemstack, user)
  64. return itemstack
  65. end,
  66. inventory_image = "rangedweapons_scar.png",
  67. })