ak47.lua 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. minetest.register_tool("rangedweapons:ak47_r", {
  2. stack_max= 1,
  3. wield_scale = {x=1.75,y=1.75,z=1.3},
  4. description = "",
  5. rw_next_reload = "rangedweapons:ak47_rr",
  6. load_sound = "rangedweapons_rifle_clip_in",
  7. range = 0,
  8. groups = {not_in_creative_inventory = 1},
  9. inventory_image = "rangedweapons_ak47_rld.png",
  10. })
  11. minetest.register_tool("rangedweapons:ak47_rr", {
  12. stack_max= 1,
  13. wield_scale = {x=1.75,y=1.75,z=1.3},
  14. description = "",
  15. rw_next_reload = "rangedweapons:ak47_rrr",
  16. load_sound = "rangedweapons_rifle_reload_a",
  17. range = 0,
  18. groups = {not_in_creative_inventory = 1},
  19. inventory_image = "rangedweapons_ak47.png",
  20. })
  21. minetest.register_tool("rangedweapons:ak47_rrr", {
  22. stack_max= 1,
  23. wield_scale = {x=1.75,y=1.75,z=1.3},
  24. description = "",
  25. rw_next_reload = "rangedweapons:ak47",
  26. load_sound = "rangedweapons_rifle_reload_b",
  27. range = 0,
  28. groups = {not_in_creative_inventory = 1},
  29. inventory_image = "rangedweapons_ak47.png",
  30. })
  31. minetest.register_tool("rangedweapons:ak47", {
  32. stack_max= 1,
  33. wield_scale = {x=1.75,y=1.75,z=1.3},
  34. description = "" ..core.colorize("#35cdff","AK-47\n") ..core.colorize("#FFFFFF", "Gun damage: 7\n") ..core.colorize("#FFFFFF", "accuracy: 77%\n") ..core.colorize("#FFFFFF", "Gun knockback: 5\n") ..core.colorize("#FFFFFF", "Gun Critical chance: 12%\n")..core.colorize("#FFFFFF", "Critical efficiency: 2.9x\n") ..core.colorize("#FFFFFF", "Reload delay: 1.4\n") ..core.colorize("#FFFFFF", "Clip size: 30\n") ..core.colorize("#FFFFFF", "Ammunition: 7.62mm rounds\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.10(full-auto)\n") ..core.colorize("#FFFFFF", "Gun type: assault rifle\n") ..core.colorize("#FFFFFF", "Block penetration: 5%\n")
  35. ..core.colorize("#FFFFFF", "Enemy penetration: 15%\n") ..core.colorize("#FFFFFF", "Bullet velocity: 40"),
  36. range = 0,
  37. inventory_image = "rangedweapons_ak47.png",
  38. RW_gun_capabilities = {
  39. automatic_gun = 1,
  40. gun_damage = {fleshy=7,knockback=5},
  41. gun_crit = 12,
  42. gun_critEffc = 2.9,
  43. suitable_ammo = {{"rangedweapons:762mm",30}},
  44. gun_skill = {"arifle_skill",50},
  45. gun_magazine = "rangedweapons:assaultrifle_mag",
  46. gun_icon = "rangedweapons_ak47_icon.png",
  47. gun_unloaded = "rangedweapons:ak47_r",
  48. gun_velocity = 40,
  49. gun_accuracy = 77,
  50. gun_cooldown = 0.1,
  51. gun_reload = 1.4/4,
  52. gun_projectiles = 1,
  53. has_shell = 1,
  54. gun_gravity = 0,
  55. gun_durability = 1200,
  56. gun_smokeSize = 5,
  57. gun_mob_penetration = 15,
  58. gun_node_penetration = 5,
  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_ak47.png",
  67. })