m60.lua 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. minetest.register_tool("rangedweapons:m60_r", {
  2. stack_max= 1,
  3. wield_scale = {x=2.0,y=2.0,z=1.4},
  4. description = "",
  5. rw_next_reload = "rangedweapons:m60",
  6. load_sound = "rangedweapons_rifle_clip_in",
  7. range = 0,
  8. groups = {not_in_creative_inventory = 1},
  9. inventory_image = "rangedweapons_m60_rld.png",
  10. })
  11. minetest.register_tool("rangedweapons:m60", {
  12. stack_max= 1,
  13. wield_scale = {x=2.0,y=2.0,z=1.4},
  14. description = "" ..core.colorize("#35cdff","m60\n") ..core.colorize("#FFFFFF", "Gun damage: 9\n") ..core.colorize("#FFFFFF", "accuracy: 65%\n") ..core.colorize("#FFFFFF", "Gun knockback: 7\n") ..core.colorize("#FFFFFF", "Gun Critical chance: 13%\n")..core.colorize("#FFFFFF", "Critical efficiency: 3.0x\n") ..core.colorize("#FFFFFF", "Reload delay: 1.0\n") ..core.colorize("#FFFFFF", "Clip size: 100\n") ..core.colorize("#FFFFFF", "Ammunition: 7.62mm rounds\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.09(full-auto)\n") ..core.colorize("#FFFFFF", "Gun type: heavy machinegun\n") ..core.colorize("#FFFFFF", "Block penetration: 12%\n")
  15. ..core.colorize("#FFFFFF", "Enemy penetration: 27%\n") ..core.colorize("#FFFFFF", "Bullet velocity: 64"),
  16. range = 0,
  17. inventory_image = "rangedweapons_m60.png",
  18. RW_gun_capabilities = {
  19. automatic_gun = 1,
  20. gun_damage = {fleshy=9,knockback=7},
  21. gun_crit = 13,
  22. gun_critEffc = 3.0,
  23. suitable_ammo = {{"rangedweapons:762mm",100}},
  24. gun_skill = {"heavy_skill",60},
  25. gun_icon = "rangedweapons_m60_icon.png",
  26. gun_unloaded = "rangedweapons:m60_r",
  27. gun_velocity = 64,
  28. gun_accuracy = 65,
  29. gun_cooldown = 0.09,
  30. gun_reload = 1.0,
  31. gun_projectiles = 1,
  32. has_shell = 1,
  33. gun_gravity = 0,
  34. gun_durability = 2750,
  35. gun_smokeSize = 5,
  36. gun_mob_penetration = 27,
  37. gun_node_penetration = 12,
  38. gun_unload_sound = "rangedweapons_rifle_clip_out",
  39. gun_sound = "rangedweapons_machinegun",
  40. },
  41. on_secondary_use = function(itemstack, user, pointed_thing)
  42. rangedweapons_reload_gun(itemstack, user)
  43. return itemstack
  44. end,
  45. inventory_image = "rangedweapons_m60.png",
  46. })