tmp.lua 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. minetest.register_tool("rangedweapons:tmp_r", {
  2. stack_max= 1,
  3. wield_scale = {x=1.15,y=1.15,z=1.15},
  4. description = "",
  5. range = 0,
  6. rw_next_reload = "rangedweapons:tmp_rr",
  7. load_sound = "rangedweapons_handgun_mag_in",
  8. groups = {not_in_creative_inventory = 1},
  9. inventory_image = "rangedweapons_tmp_rld.png",
  10. })
  11. minetest.register_tool("rangedweapons:tmp_rr", {
  12. stack_max= 1,
  13. wield_scale = {x=1.15,y=1.15,z=1.15},
  14. description = "",
  15. range = 0,
  16. rw_next_reload = "rangedweapons:tmp_rrr",
  17. load_sound = "rangedweapons_reload_a",
  18. groups = {not_in_creative_inventory = 1},
  19. inventory_image = "rangedweapons_tmp.png",
  20. })
  21. minetest.register_tool("rangedweapons:tmp_rrr", {
  22. stack_max= 1,
  23. wield_scale = {x=1.15,y=1.15,z=1.15},
  24. description = "",
  25. range = 0,
  26. rw_next_reload = "rangedweapons:tmp",
  27. load_sound = "rangedweapons_reload_b",
  28. groups = {not_in_creative_inventory = 1},
  29. inventory_image = "rangedweapons_tmp.png",
  30. })
  31. minetest.register_tool("rangedweapons:tmp", {
  32. stack_max= 1,
  33. wield_scale = {x=1.15,y=1.15,z=1.15},
  34. description = "" ..core.colorize("#35cdff","Steyr T.M.P.\n") ..core.colorize("#FFFFFF", "Gun damage: 1\n") ..core.colorize("#FFFFFF", "accuracy: 64%\n") ..core.colorize("#FFFFFF", "Gun knockback: 0\n") ..core.colorize("#FFFFFF", "Gun Critical chance: 4%\n")..core.colorize("#FFFFFF", "Critical efficiency: 1.85x\n") ..core.colorize("#FFFFFF", "Reload delay: 1.0\n") ..core.colorize("#FFFFFF", "Clip size: 30\n") ..core.colorize("#FFFFFF", "Ammunition: 9x19mm parabellum\n") ..core.colorize("#FFFFFF", "Rate of fire: 0.066(full-auto)\n") ..core.colorize("#FFFFFF", "Gun type: machine pistol\n") ..core.colorize("#FFFFFF", "Bullet velocity: 20"),
  35. range = 0,
  36. inventory_image = "rangedweapons_tmp.png",
  37. RW_gun_capabilities = {
  38. automatic_gun = 1,
  39. gun_damage = {fleshy=1,knockback=0},
  40. gun_crit = 4,
  41. gun_critEffc = 1.85,
  42. suitable_ammo = {{"rangedweapons:9mm",30}},
  43. gun_skill = {"mp_skill",85},
  44. gun_magazine = "rangedweapons:machinepistol_mag",
  45. gun_icon = "rangedweapons_tmp_icon.png",
  46. gun_unloaded = "rangedweapons:tmp_r",
  47. gun_velocity = 20,
  48. gun_accuracy = 64,
  49. gun_cooldown = 0.066,
  50. gun_reload = 1.0/4,
  51. gun_projectiles = 1,
  52. has_shell = 1,
  53. gun_gravity = 0,
  54. gun_durability = 1200,
  55. gun_smokeSize = 4,
  56. gun_unload_sound = "rangedweapons_handgun_mag_out",
  57. gun_sound = "rangedweapons_machine_pistol",
  58. },
  59. on_secondary_use = function(itemstack, user, pointed_thing)
  60. rangedweapons_reload_gun(itemstack, user)
  61. return itemstack
  62. end,
  63. })