milkor.lua 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. minetest.register_tool("rangedweapons:milkor_rld", {
  2. stack_max= 1,
  3. range = 0,
  4. wield_scale = {x=1.75,y=1.75,z=2.0},
  5. description = "",
  6. loaded_gun = "rangedweapons:milkor",
  7. groups = {not_in_creative_inventory = 1},
  8. inventory_image = "rangedweapons_milkor_rld.png",
  9. })
  10. minetest.register_tool("rangedweapons:milkor", {
  11. description = "" ..core.colorize("#35cdff","Milkor MGL\n") ..core.colorize("#FFFFFF", "Direct contact damage: 15\n")..core.colorize("#FFFFFF", "Accuracy: 96%\n") ..core.colorize("#FFFFFF", "Direct contact knockback: 25\n") ..core.colorize("#FFFFFF", "Critical chance: 9%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 3.0x\n") ..core.colorize("#FFFFFF", "Ammunition: 40mm grenades\n") ..core.colorize("#FFFFFF", "Reload time: 0.75\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.35\n") ..core.colorize("#FFFFFF", "Gun gravity: 1\n") ..core.colorize("#FFFFFF", "Clip Size: 6\n")..core.colorize("#FFFFFF", "Gun type: grenade launcher\n") ..core.colorize("#FFFFFF", "Bullet velocity: 30"),
  12. range = 0,
  13. wield_scale = {x=1.75,y=1.75,z=2.0},
  14. inventory_image = "rangedweapons_milkor.png",
  15. RW_gun_capabilities = {
  16. gun_damage = {fleshy=15,knockback=25},
  17. gun_crit = 9,
  18. gun_critEffc = 3.0,
  19. suitable_ammo = {{"rangedweapons:40mm",6}},
  20. gun_skill = {"",1},
  21. gun_magazine = "rangedweapons:shell_grenadedrop",
  22. gun_icon = "rangedweapons_milkor_icon.png",
  23. gun_unloaded = "rangedweapons:milkor_rld",
  24. gun_cooling = "rangedweapons:milkor",
  25. gun_velocity = 30,
  26. gun_accuracy = 96,
  27. gun_cooldown = 0.35,
  28. gun_reload = 0.75,
  29. gun_projectiles = 1,
  30. gun_durability = 225,
  31. gun_smokeSize = 15,
  32. gun_gravity = 1,
  33. gun_unload_sound = "rangedweapons_shell_insert",
  34. gun_sound = "rangedweapons_rocket",
  35. },
  36. on_use = function(itemstack, user, pointed_thing)
  37. rangedweapons_shoot_gun(itemstack, user)
  38. return itemstack
  39. end,
  40. on_secondary_use = function(itemstack, user, pointed_thing)
  41. rangedweapons_single_load_gun(itemstack, user)
  42. return itemstack
  43. end,
  44. })