rpg.lua 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. minetest.register_tool("rangedweapons:rpg_rld", {
  2. description = "" ..core.colorize("#35cdff","rpg7\n") ..core.colorize("#FFFFFF", "Direct contact damage: 20\n")..core.colorize("#FFFFFF", "Accuracy: 100%\n") ..core.colorize("#FFFFFF", "direct contact knockback: 35\n") ..core.colorize("#FFFFFF", "Gun crit chance: 10%\n")..core.colorize("#FFFFFF", "Critical efficiency: 3x\n") ..core.colorize("#FFFFFF", "Reload delay: 1.0\n")..core.colorize("#FFFFFF", "Clip size: 1\n") ..core.colorize("#FFFFFF", "Gun gravity: 5\n")..core.colorize("#FFFFFF", "Ammunition: rockets\n")..core.colorize("#FFFFFF", "Gun type: rocket launcher\n") ..core.colorize("#FFFFFF", "Bullet velocity: 25"),
  3. range = 0,
  4. wield_scale = {x=2.5,y=2.5,z=3.75},
  5. groups = {not_in_creative_inventory = 1},
  6. inventory_image = "rangedweapons_rpg_rld.png",
  7. RW_gun_capabilities = {
  8. gun_damage = {fleshy=20,knockback=35},
  9. gun_crit = 10,
  10. gun_critEffc = 3.0,
  11. suitable_ammo = {{"rangedweapons:rocket",1}},
  12. gun_skill = {"",1},
  13. gun_icon = "rangedweapons_rpg_icon.png",
  14. gun_unloaded = "rangedweapons:rpg_rld",
  15. gun_cooling = "rangedweapons:rpg",
  16. gun_velocity = 25,
  17. gun_accuracy = 100,
  18. gun_cooldown = 1.0,
  19. gun_reload = 1.0,
  20. gun_projectiles = 1,
  21. gun_smokeSize = 15,
  22. gun_durability = 150,
  23. gun_unload_sound = "",
  24. gun_sound = "rangedweapons_rocket",
  25. },
  26. on_secondary_use = function(itemstack, user, pointed_thing)
  27. rangedweapons_reload_gun(itemstack, user)
  28. return itemstack
  29. end,
  30. on_use = function(itemstack, user, pointed_thing)
  31. rangedweapons_shoot_gun(itemstack, user)
  32. return itemstack
  33. end,
  34. })
  35. minetest.register_tool("rangedweapons:rpg", {
  36. description = "" ..core.colorize("#35cdff","rpg7\n") ..core.colorize("#FFFFFF", "Direct contact damage: 20\n")..core.colorize("#FFFFFF", "Accuracy: 100%\n") ..core.colorize("#FFFFFF", "direct contact knockback: 35\n") ..core.colorize("#FFFFFF", "Gun crit chance: 10%\n")..core.colorize("#FFFFFF", "Critical efficiency: 3x\n") ..core.colorize("#FFFFFF", "Reload delay: 1.0\n")..core.colorize("#FFFFFF", "Clip size: 1\n") ..core.colorize("#FFFFFF", "Gun gravity: 5\n")..core.colorize("#FFFFFF", "Ammunition: rockets\n")..core.colorize("#FFFFFF", "Gun type: rocket launcher\n") ..core.colorize("#FFFFFF", "Bullet velocity: 25"),
  37. range = 0,
  38. wield_scale = {x=2.5,y=2.5,z=3.75},
  39. inventory_image = "rangedweapons_rpg.png",
  40. RW_gun_capabilities = {
  41. gun_damage = {fleshy=20,knockback=35},
  42. gun_crit = 10,
  43. gun_critEffc = 3.0,
  44. suitable_ammo = {{"rangedweapons:rocket",1}},
  45. gun_skill = {"",1},
  46. gun_icon = "rangedweapons_rpg_icon.png",
  47. gun_unloaded = "rangedweapons:rpg_rld",
  48. gun_cooling = "rangedweapons:rpg",
  49. gun_velocity = 25,
  50. gun_accuracy = 100,
  51. gun_cooldown = 1.0,
  52. gun_reload = 1.0,
  53. gun_projectiles = 1,
  54. gun_smokeSize = 15,
  55. gun_durability = 150,
  56. gun_unload_sound = "",
  57. gun_sound = "rangedweapons_rocket",
  58. gun_unload_sound = "rangedweapons_shell_insert",
  59. },
  60. on_secondary_use = function(itemstack, user, pointed_thing)
  61. rangedweapons_reload_gun(itemstack, user)
  62. return itemstack
  63. end,
  64. on_use = function(itemstack, user, pointed_thing)
  65. rangedweapons_shoot_gun(itemstack, user)
  66. return itemstack
  67. end,
  68. })