python.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. minetest.register_tool("rangedweapons:python_rld", {
  2. stack_max= 1,
  3. range = 0,
  4. wield_scale = {x=1.25,y=1.25,z=1.1},
  5. description = "",
  6. loaded_gun = "rangedweapons:python",
  7. groups = {not_in_creative_inventory = 1},
  8. inventory_image = "rangedweapons_python_rld.png",
  9. })
  10. minetest.register_tool("rangedweapons:python", {
  11. description = "" ..core.colorize("#35cdff","Colt Python \n") ..core.colorize("#FFFFFF", "Ranged damage: 10\n")..core.colorize("#FFFFFF", "Accuracy: 95%\n") ..core.colorize("#FFFFFF", "Gun knockback: 6\n") ..core.colorize("#FFFFFF", "Critical chance: 19%\n") ..core.colorize("#FFFFFF", "Critical efficiency: 2.5x\n") ..core.colorize("#FFFFFF", "Ammunition: .357 Magnum rounds\n") ..core.colorize("#FFFFFF", "Reload time: 0.25\n") ..core.colorize("#FFFFFF", "Clip Size: 6\n")..core.colorize("#FFFFFF", "Gun type: Revolver\n")..core.colorize("#FFFFFF", "Block penetration: 5%\n")
  12. ..core.colorize("#FFFFFF", "penetration: 15%\n") ..core.colorize("#FFFFFF", "Bullet velocity: 55"),
  13. range = 0,
  14. wield_scale = {x=1.25,y=1.25,z=1.1},
  15. inventory_image = "rangedweapons_python.png",
  16. RW_gun_capabilities = {
  17. gun_damage = {fleshy=10,knockback=6},
  18. gun_crit = 19,
  19. gun_critEffc = 2.2,
  20. suitable_ammo = {{"rangedweapons:357",6}},
  21. gun_skill = {"revolver_skill",40},
  22. gun_icon = "rangedweapons_python_icon.png",
  23. gun_unloaded = "rangedweapons:python_rld",
  24. gun_cooling = "rangedweapons:python",
  25. gun_velocity = 55,
  26. gun_accuracy = 95,
  27. gun_cooldown = 0.2,
  28. gun_reload = 0.4,
  29. gun_projectiles = 1,
  30. gun_durability = 1000,
  31. gun_smokeSize = 7,
  32. gun_mob_penetration = 15,
  33. gun_node_penetration = 5,
  34. gun_unload_sound = "rangedweapons_shell_insert",
  35. gun_sound = "rangedweapons_deagle",
  36. },
  37. on_use = function(itemstack, user, pointed_thing)
  38. rangedweapons_shoot_gun(itemstack, user)
  39. return itemstack
  40. end,
  41. on_secondary_use = function(itemstack, user, pointed_thing)
  42. rangedweapons_single_load_gun(itemstack, user)
  43. return itemstack
  44. end,
  45. })