g36.lua 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. minetest.register_tool("rangedweapons:g36_r", {
  2. stack_max= 1,
  3. wield_scale = {x=1.75,y=1.75,z=1.3},
  4. description = "",
  5. rw_next_reload = "rangedweapons:g36_rr",
  6. load_sound = "rangedweapons_handgun_mag_in",
  7. range = 0,
  8. groups = {not_in_creative_inventory = 1},
  9. inventory_image = "rangedweapons_g36_rld.png",
  10. })
  11. minetest.register_tool("rangedweapons:g36_rr", {
  12. stack_max= 1,
  13. wield_scale = {x=1.75,y=1.75,z=1.3},
  14. description = "",
  15. rw_next_reload = "rangedweapons:g36_rrr",
  16. load_sound = "rangedweapons_rifle_reload_a",
  17. range = 0,
  18. groups = {not_in_creative_inventory = 1},
  19. inventory_image = "rangedweapons_g36.png",
  20. })
  21. minetest.register_tool("rangedweapons:g36_rrr", {
  22. stack_max= 1,
  23. wield_scale = {x=1.75,y=1.75,z=1.3},
  24. description = "",
  25. rw_next_reload = "rangedweapons:g36",
  26. load_sound = "rangedweapons_rifle_reload_b",
  27. range = 0,
  28. groups = {not_in_creative_inventory = 1},
  29. inventory_image = "rangedweapons_g36.png",
  30. })
  31. minetest.register_tool("rangedweapons:g36", {
  32. stack_max= 1,
  33. wield_scale = {x=1.75,y=1.75,z=1.3},
  34. description = "" ..core.colorize("#35cdff","g36\n") ..core.colorize("#FFFFFF", "Gun damage: 7\n") ..core.colorize("#FFFFFF", "accuracy: 80%\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.2\n") ..core.colorize("#FFFFFF", "Clip size: 30\n") ..core.colorize("#FFFFFF", "Ammunition: 5.56mm rounds\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.08(full-auto)\n") ..core.colorize("#FFFFFF", "Gun type: assault rifle\n") ..core.colorize("#FFFFFF", "Block penetration: 6%\n")
  35. ..core.colorize("#FFFFFF", "Enemy penetration: 17%\n") ..core.colorize("#FFFFFF", "Bullet velocity: 40"),
  36. range = 0,
  37. inventory_image = "rangedweapons_g36.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:556mm",30}},
  44. gun_skill = {"arifle_skill",55},
  45. gun_magazine = "rangedweapons:assaultrifle_mag",
  46. gun_icon = "rangedweapons_g36_icon.png",
  47. gun_unloaded = "rangedweapons:g36_r",
  48. gun_velocity = 40,
  49. gun_accuracy = 80,
  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 = 5,
  57. gun_mob_penetration = 17,
  58. gun_node_penetration = 6,
  59. gun_unload_sound = "rangedweapons_handgun_mag_out",
  60. gun_sound = "rangedweapons_smg",
  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_g36.png",
  67. })