thompson.lua 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. minetest.register_tool("rangedweapons:thompson_r", {
  2. stack_max= 1,
  3. wield_scale = {x=1.9,y=1.9,z=1.25},
  4. description = "",
  5. rw_next_reload = "rangedweapons:thompson_rr",
  6. load_sound = "rangedweapons_handgun_mag_in",
  7. range = 0,
  8. groups = {not_in_creative_inventory = 1},
  9. inventory_image = "rangedweapons_thompson_rld.png",
  10. })
  11. minetest.register_tool("rangedweapons:thompson_rr", {
  12. stack_max= 1,
  13. wield_scale = {x=1.9,y=1.9,z=1.25},
  14. description = "",
  15. rw_next_reload = "rangedweapons:thompson_rrr",
  16. load_sound = "rangedweapons_reload_a",
  17. range = 0,
  18. groups = {not_in_creative_inventory = 1},
  19. inventory_image = "rangedweapons_thompson.png",
  20. })
  21. minetest.register_tool("rangedweapons:thompson_rrr", {
  22. stack_max= 1,
  23. wield_scale = {x=1.9,y=1.9,z=1.25},
  24. description = "",
  25. rw_next_reload = "rangedweapons:thompson",
  26. load_sound = "rangedweapons_reload_b",
  27. range = 0,
  28. groups = {not_in_creative_inventory = 1},
  29. inventory_image = "rangedweapons_thompson.png",
  30. })
  31. -------------------------------------------
  32. minetest.register_tool("rangedweapons:thompson", {
  33. stack_max= 1,
  34. wield_scale = {x=1.9,y=1.9,z=1.25},
  35. description = "" ..core.colorize("#35cdff","Thompson SMG\n") ..core.colorize("#FFFFFF", "Ranged damage: 4\n") ..core.colorize("#FFFFFF", "accuracy: 75%\n") ..core.colorize("#FFFFFF", "knockback: 1\n") ..core.colorize("#FFFFFF", "Reload delay: 1.4\n") ..core.colorize("#FFFFFF", "Clip size: 30/30\n") ..core.colorize("#FFFFFF", "Critical chance: 8%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 2.0x\n") ..core.colorize("#FFFFFF", "Ammunition: 10mm auto/.45acp\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.1 (full-auto)\n") ..core.colorize("#FFFFFF", "Gun type: smg\n") ..core.colorize("#FFFFFF", "Bullet velocity: 30"),
  36. range = 0,
  37. inventory_image = "rangedweapons_thompson.png",
  38. RW_gun_capabilities = {
  39. automatic_gun = 1,
  40. gun_damage = {fleshy=4,knockback=1},
  41. gun_crit = 8,
  42. gun_critEffc = 2.0,
  43. suitable_ammo = {{"rangedweapons:10mm",30},{"rangedweapons:45acp",30}},
  44. gun_skill = {"smg_skill",65},
  45. gun_magazine = "rangedweapons:machinepistol_mag",
  46. gun_icon = "rangedweapons_thompson_icon.png",
  47. gun_unloaded = "rangedweapons:thompson_r",
  48. gun_velocity = 30,
  49. gun_accuracy = 75,
  50. gun_cooldown = 0.1,
  51. gun_reload = 1.4/4,
  52. gun_projectiles = 1,
  53. has_shell = 1,
  54. gun_gravity = 0,
  55. gun_durability = 1250,
  56. gun_smokeSize = 4,
  57. gun_unload_sound = "rangedweapons_handgun_mag_out",
  58. gun_sound = "rangedweapons_smg",
  59. },
  60. on_secondary_use = function(itemstack, user, pointed_thing)
  61. rangedweapons_reload_gun(itemstack, user)
  62. return itemstack
  63. end,
  64. })