minigun.lua 2.1 KB

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