armor.lua 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. -- support for i18n
  2. local S = armor_i18n.gettext
  3. if armor.materials.wood then
  4. armor:register_armor("3d_armor:helmet_wood", {
  5. description = S("Wood Helmet"),
  6. inventory_image = "3d_armor_inv_helmet_wood.png",
  7. groups = {armor_head=1, armor_block=4, armor_use=2000, flammable=1, armor_dmg_resist=.25, physics_speed=-0.02},
  8. armor_groups = {fleshy=5},
  9. damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
  10. })
  11. armor:register_armor("3d_armor:chestplate_wood", {
  12. description = S("Wood Chestplate"),
  13. inventory_image = "3d_armor_inv_chestplate_wood.png",
  14. groups = {armor_torso=1, armor_block=8, armor_use=2000, flammable=1, armor_dmg_resist=.25, physics_speed=-0.02},
  15. armor_groups = {fleshy=10},
  16. damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
  17. })
  18. armor:register_armor("3d_armor:leggings_wood", {
  19. description = S("Wood Leggings"),
  20. inventory_image = "3d_armor_inv_leggings_wood.png",
  21. groups = {armor_legs=1, armor_block=8, armor_use=2000, flammable=1, armor_dmg_resist=.25, physics_speed=-0.02},
  22. armor_groups = {fleshy=10},
  23. damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
  24. })
  25. armor:register_armor("3d_armor:boots_wood", {
  26. description = S("Wood Boots"),
  27. inventory_image = "3d_armor_inv_boots_wood.png",
  28. groups = {armor_feet=1, armor_block=4, armor_use=2000, flammable=1, armor_dmg_resist=.25, physics_speed=-0.02},
  29. armor_groups = {fleshy=5},
  30. damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
  31. })
  32. end
  33. --Steel
  34. armor:register_armor("3d_armor:helmet_steel", {
  35. description = S("Steel Helmet"),
  36. inventory_image = "3d_armor_inv_helmet_steel.png",
  37. groups = {armor_head=1, armor_block=6, armor_use=800, armor_dmg_resist=.5, physics_speed=-0.01, physics_gravity=0.01},
  38. armor_groups = {fleshy=9},
  39. damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
  40. })
  41. armor:register_armor("3d_armor:chestplate_steel", {
  42. description = S("Steel Chestplate"),
  43. inventory_image = "3d_armor_inv_chestplate_steel.png",
  44. groups = {armor_torso=1, armor_block=12, armor_use=800, armor_dmg_resist=.5, physics_speed=-0.04, physics_gravity=0.04},
  45. armor_groups = {fleshy=12},
  46. damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
  47. })
  48. armor:register_armor("3d_armor:leggings_steel", {
  49. description = S("Steel Leggings"),
  50. inventory_image = "3d_armor_inv_leggings_steel.png",
  51. groups = {armor_legs=1, armor_block=12, armor_use=800, armor_dmg_resist=.5, physics_speed=-0.03, physics_gravity=0.03},
  52. armor_groups = {fleshy=12},
  53. damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
  54. })
  55. armor:register_armor("3d_armor:boots_steel", {
  56. description = S("Steel Boots"),
  57. inventory_image = "3d_armor_inv_boots_steel.png",
  58. groups = {armor_feet=1, armor_block=6, armor_use=800, armor_dmg_resist=.5, physics_speed=-0.01, physics_gravity=0.01},
  59. armor_groups = {fleshy=9},
  60. damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
  61. })
  62. --Bronze
  63. armor:register_armor("3d_armor:helmet_bronze", {
  64. description = S("Bronze Helmet"),
  65. inventory_image = "3d_armor_inv_helmet_bronze.png",
  66. groups = {armor_head=1, armor_block=8, armor_use=400, armor_dmg_resist=.75, physics_speed=-0.01, physics_gravity=0.01},
  67. armor_groups = {fleshy=10},
  68. damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2},
  69. })
  70. armor:register_armor("3d_armor:chestplate_bronze", {
  71. description = S("Bronze Chestplate"),
  72. inventory_image = "3d_armor_inv_chestplate_bronze.png",
  73. groups = {armor_torso=1, armor_block=16, armor_use=400, armor_dmg_resist=.75, physics_speed=-0.04, physics_gravity=0.04},
  74. armor_groups = {fleshy=15},
  75. damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2},
  76. })
  77. armor:register_armor("3d_armor:leggings_bronze", {
  78. description = S("Bronze Leggings"),
  79. inventory_image = "3d_armor_inv_leggings_bronze.png",
  80. groups = {armor_legs=1, armor_block=16, armor_use=400, armor_dmg_resist=.75, physics_speed=-0.03, physics_gravity=0.03},
  81. armor_groups = {fleshy=15},
  82. damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2},
  83. })
  84. armor:register_armor("3d_armor:boots_bronze", {
  85. description = S("Bronze Boots"),
  86. inventory_image = "3d_armor_inv_boots_bronze.png",
  87. groups = {armor_feet=1, armor_block=8, armor_use=400, armor_dmg_resist=.75, physics_speed=-0.01, physics_gravity=0.01},
  88. armor_groups = {fleshy=10},
  89. damage_groups = {cracky=3, snappy=2, choppy=2, crumbly=1, level=2},
  90. })
  91. --Gold
  92. armor:register_armor("3d_armor:helmet_gold", {
  93. description = S("Gold Helmet"),
  94. inventory_image = "3d_armor_inv_helmet_gold.png",
  95. groups = {armor_head=1, armor_block=10, armor_use=300, armor_dmg_resist=1, physics_speed=-0.04, physics_gravity=0.02},
  96. armor_groups = {fleshy=11},
  97. damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2},
  98. })
  99. armor:register_armor("3d_armor:chestplate_gold", {
  100. description = S("Gold Chestplate"),
  101. inventory_image = "3d_armor_inv_chestplate_gold.png",
  102. groups = {armor_torso=1, armor_block=20, armor_use=300, armor_dmg_resist=1, physics_speed=-0.1, physics_gravity=0.05},
  103. armor_groups = {fleshy=16},
  104. damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2},
  105. })
  106. armor:register_armor("3d_armor:leggings_gold", {
  107. description = S("Gold Leggings"),
  108. inventory_image = "3d_armor_inv_leggings_gold.png",
  109. groups = {armor_legs=1, armor_block=20, armor_use=300, armor_dmg_resist=1, physics_speed=-0.08, physics_gravity=0.04},
  110. armor_groups = {fleshy=16},
  111. damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2},
  112. })
  113. armor:register_armor("3d_armor:boots_gold", {
  114. description = S("Gold Boots"),
  115. inventory_image = "3d_armor_inv_boots_gold.png",
  116. groups = {armor_feet=1, armor_block=10, armor_use=300, armor_dmg_resist=1, physics_speed=-0.04, physics_gravity=0.02},
  117. armor_groups = {fleshy=11},
  118. damage_groups = {cracky=1, snappy=2, choppy=2, crumbly=3, level=2},
  119. })
  120. --Diamond
  121. armor:register_armor("3d_armor:helmet_diamond", {
  122. description = S("Diamond Helmet"),
  123. inventory_image = "3d_armor_inv_helmet_diamond.png",
  124. groups = {armor_head=1, armor_block=12, armor_use=200, armor_dmg_resist=1.25},
  125. armor_groups = {fleshy=15},
  126. damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
  127. })
  128. armor:register_armor("3d_armor:chestplate_diamond", {
  129. description = S("Diamond Chestplate"),
  130. inventory_image = "3d_armor_inv_chestplate_diamond.png",
  131. groups = {armor_torso=1, armor_block=24, armor_use=200, armor_dmg_resist=1.25},
  132. armor_groups = {fleshy=20},
  133. damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
  134. })
  135. armor:register_armor("3d_armor:leggings_diamond", {
  136. description = S("Diamond Leggings"),
  137. inventory_image = "3d_armor_inv_leggings_diamond.png",
  138. groups = {armor_legs=1, armor_block=24, armor_use=200, armor_dmg_resist=1.25},
  139. armor_groups = {fleshy=20},
  140. damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
  141. })
  142. armor:register_armor("3d_armor:boots_diamond", {
  143. description = S("Diamond Boots"),
  144. inventory_image = "3d_armor_inv_boots_diamond.png",
  145. groups = {armor_feet=1, armor_block=12, armor_use=200, armor_dmg_resist=1.25},
  146. armor_groups = {fleshy=15},
  147. damage_groups = {cracky=2, snappy=1, choppy=1, level=3},
  148. })
  149. for k, v in pairs(armor.materials) do
  150. minetest.register_craft({
  151. output = "3d_armor:helmet_"..k,
  152. recipe = {
  153. {v, v, v},
  154. {v, "", v},
  155. {"", "", ""},
  156. },
  157. })
  158. minetest.register_craft({
  159. output = "3d_armor:chestplate_"..k,
  160. recipe = {
  161. {v, "", v},
  162. {v, v, v},
  163. {v, v, v},
  164. },
  165. })
  166. minetest.register_craft({
  167. output = "3d_armor:leggings_"..k,
  168. recipe = {
  169. {v, v, v},
  170. {v, "", v},
  171. {v, "", v},
  172. },
  173. })
  174. minetest.register_craft({
  175. output = "3d_armor:boots_"..k,
  176. recipe = {
  177. {v, "", v},
  178. {v, "", v},
  179. },
  180. })
  181. end