init.lua 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348
  1. dofile(minetest.get_modpath(minetest.get_current_modname()).."/multiskin.lua")
  2. dofile(minetest.get_modpath(minetest.get_current_modname()).."/armor.lua")
  3. dofile(minetest.get_modpath(minetest.get_current_modname()).."/shield.lua")
  4. dofile(minetest.get_modpath(minetest.get_current_modname()).."/wieldview.lua")
  5. --Special Armors
  6. --dofile(minetest.get_modpath(minetest.get_current_modname()).."/racearmor.lua")
  7. -- Wood Armor
  8. minetest.register_tool("lottarmor:helmet_wood", {
  9. description = "Training Helmet",
  10. inventory_image = "lottarmor_inv_helmet_wood.png",
  11. groups = {armor_head=2.5, armor_heal=0, armor_use=2000, armor_healing=0, physics_speed=0.2},
  12. wear = 0,
  13. })
  14. minetest.register_tool("lottarmor:chestplate_wood", {
  15. description = "Training Chestplate",
  16. inventory_image = "lottarmor_inv_chestplate_wood.png",
  17. groups = {armor_torso=5, armor_heal=0, armor_use=2000, armor_healing=0, physics_speed=0.2},
  18. wear = 0,
  19. })
  20. minetest.register_tool("lottarmor:leggings_wood", {
  21. description = "Training Leggings",
  22. inventory_image = "lottarmor_inv_leggings_wood.png",
  23. groups = {armor_legs=2.5, armor_heal=0, armor_use=2000, armor_healing=0, physics_speed=0.2},
  24. wear = 0,
  25. })
  26. minetest.register_tool("lottarmor:boots_wood", {
  27. description = "Training Boots",
  28. inventory_image = "lottarmor_inv_boots_wood.png",
  29. groups = {armor_feet=2.5, armor_heal=0, armor_use=2100, armor_healing=0, physics_speed=0.2},
  30. wear = 0,
  31. })
  32. -- Tin Armor
  33. minetest.register_tool("lottarmor:helmet_tin", {
  34. description = "Tin Helmet",
  35. inventory_image = "lottarmor_inv_helmet_tin.png",
  36. groups = {armor_head=5, armor_heal=0, armor_use=1500, armor_healing=0},
  37. wear = 0,
  38. })
  39. minetest.register_tool("lottarmor:chestplate_tin", {
  40. description = "Tin Chestplate",
  41. inventory_image = "lottarmor_inv_chestplate_tin.png",
  42. groups = {armor_torso=10, armor_heal=0, armor_use=1500, armor_healing=0},
  43. wear = 0,
  44. })
  45. minetest.register_tool("lottarmor:leggings_tin", {
  46. description = "Tin Leggings",
  47. inventory_image = "lottarmor_inv_leggings_tin.png",
  48. groups = {armor_legs=5, armor_heal=0, armor_use=1500, armor_healing=0},
  49. wear = 0,
  50. })
  51. minetest.register_tool("lottarmor:boots_tin", {
  52. description = "Tin Boots",
  53. inventory_image = "lottarmor_inv_boots_tin.png",
  54. groups = {armor_feet=5, armor_heal=0, armor_use=2000, armor_healing=0},
  55. wear = 0,
  56. })
  57. --Copper Armor
  58. minetest.register_tool("lottarmor:helmet_copper", {
  59. description = "Copper Helmet",
  60. inventory_image = "lottarmor_inv_helmet_copper.png",
  61. groups = {armor_head=5, armor_heal=0, armor_use=1500, armor_healing=0},
  62. wear = 0,
  63. })
  64. minetest.register_tool("lottarmor:chestplate_copper", {
  65. description = "Copper Chestplate",
  66. inventory_image = "lottarmor_inv_chestplate_copper.png",
  67. groups = {armor_torso=10, armor_heal=0, armor_use=1500, armor_healing=0},
  68. wear = 0,
  69. })
  70. minetest.register_tool("lottarmor:leggings_copper", {
  71. description = "Copper Leggings",
  72. inventory_image = "lottarmor_inv_leggings_copper.png",
  73. groups = {armor_legs=5, armor_heal=0, armor_use=1500, armor_healing=0},
  74. wear = 0,
  75. })
  76. minetest.register_tool("lottarmor:boots_copper", {
  77. description = "Copper Boots",
  78. inventory_image = "lottarmor_inv_boots_copper.png",
  79. groups = {armor_feet=5, armor_heal=0, armor_use=2000, armor_healing=0},
  80. wear = 0,
  81. })
  82. --Steel Armor
  83. minetest.register_tool("lottarmor:helmet_steel", {
  84. description = "Steel Helmet",
  85. inventory_image = "lottarmor_inv_helmet_steel.png",
  86. groups = {armor_head=10, armor_heal=0, armor_use=500, armor_healing=0},
  87. wear = 0,
  88. })
  89. minetest.register_tool("lottarmor:chestplate_steel", {
  90. description = "Steel Chestplate",
  91. inventory_image = "lottarmor_inv_chestplate_steel.png",
  92. groups = {armor_torso=15, armor_heal=0, armor_use=500, armor_healing=0},
  93. wear = 0,
  94. })
  95. minetest.register_tool("lottarmor:leggings_steel", {
  96. description = "Steel Leggings",
  97. inventory_image = "lottarmor_inv_leggings_steel.png",
  98. groups = {armor_legs=15, armor_heal=0, armor_use=500, armor_healing=0},
  99. wear = 0,
  100. })
  101. minetest.register_tool("lottarmor:boots_steel", {
  102. description = "Steel Boots",
  103. inventory_image = "lottarmor_inv_boots_steel.png",
  104. groups = {armor_feet=10, armor_heal=0, armor_use=500, armor_healing=0},
  105. wear = 0,
  106. })
  107. --Bronze Armor
  108. minetest.register_tool("lottarmor:helmet_bronze", {
  109. description = "Bronze Helmet",
  110. inventory_image = "lottarmor_inv_helmet_bronze.png",
  111. groups = {armor_head=10, armor_heal=6, armor_use=250, armor_healing=0},
  112. wear = 0,
  113. })
  114. minetest.register_tool("lottarmor:chestplate_bronze", {
  115. description = "Bronze Chestplate",
  116. inventory_image = "lottarmor_inv_chestplate_bronze.png",
  117. groups = {armor_torso=15, armor_heal=6, armor_use=250, armor_healing=0},
  118. wear = 0,
  119. })
  120. minetest.register_tool("lottarmor:leggings_bronze", {
  121. description = "Bronze Leggings",
  122. inventory_image = "lottarmor_inv_leggings_bronze.png",
  123. groups = {armor_legs=15, armor_heal=6, armor_use=250, armor_healing=0},
  124. wear = 0,
  125. })
  126. minetest.register_tool("lottarmor:boots_bronze", {
  127. description = "Bronze Boots",
  128. inventory_image = "lottarmor_inv_boots_bronze.png",
  129. groups = {armor_feet=10, armor_heal=6, armor_use=250, armor_healing=0},
  130. wear = 0,
  131. })
  132. --Silver Armor
  133. minetest.register_tool("lottarmor:helmet_silver", {
  134. description = "Silver Helmet",
  135. inventory_image = "lottarmor_inv_helmet_silver.png",
  136. groups = {armor_head=12, armor_heal=3, armor_use=300, armor_healing=0, physics_speed=-0.05},
  137. wear = 0,
  138. })
  139. minetest.register_tool("lottarmor:chestplate_silver", {
  140. description = "Silver Chestplate",
  141. inventory_image = "lottarmor_inv_chestplate_silver.png",
  142. groups = {armor_torso=17, armor_heal=3, armor_use=300, armor_healing=0, physics_speed=-0.05},
  143. wear = 0,
  144. })
  145. minetest.register_tool("lottarmor:leggings_silver", {
  146. description = "Silver Leggings",
  147. inventory_image = "lottarmor_inv_leggings_silver.png",
  148. groups = {armor_legs=17, armor_heal=3, armor_use=300, armor_healing=0, physics_speed=-0.05},
  149. wear = 0,
  150. })
  151. minetest.register_tool("lottarmor:boots_silver", {
  152. description = "Silver Boots",
  153. inventory_image = "lottarmor_inv_boots_silver.png",
  154. groups = {armor_feet=12, armor_heal=3, armor_use=300, armor_healing=0, physics_speed=-0.05},
  155. wear = 0,
  156. })
  157. --Gold Armor
  158. minetest.register_tool("lottarmor:helmet_gold", {
  159. description = "Gold Helmet",
  160. inventory_image = "lottarmor_inv_helmet_gold.png",
  161. groups = {armor_head=10, armor_heal=6, armor_use=250, armor_healing=0, physics_speed=-0.05},
  162. wear = 0,
  163. })
  164. minetest.register_tool("lottarmor:chestplate_gold", {
  165. description = "Gold Chestplate",
  166. inventory_image = "lottarmor_inv_chestplate_gold.png",
  167. groups = {armor_torso=15, armor_heal=6, armor_use=250, armor_healing=0, physics_speed=-0.05},
  168. wear = 0,
  169. })
  170. minetest.register_tool("lottarmor:leggings_gold", {
  171. description = "Gold Leggings",
  172. inventory_image = "lottarmor_inv_leggings_gold.png",
  173. groups = {armor_legs=15, armor_heal=6, armor_use=250, armor_healing=0, physics_speed=-0.05},
  174. wear = 0,
  175. })
  176. minetest.register_tool("lottarmor:boots_gold", {
  177. description = "Gold Boots",
  178. inventory_image = "lottarmor_inv_boots_gold.png",
  179. groups = {armor_feet=10, armor_heal=6, armor_use=250, armor_healing=0, physics_speed=-0.05},
  180. wear = 0,
  181. })
  182. --Galvorn Armor
  183. minetest.register_tool("lottarmor:helmet_galvorn", {
  184. description = "Galvorn Helmet",
  185. inventory_image = "lottarmor_inv_helmet_galvorn.png",
  186. groups = {armor_head=15, armor_heal=12, armor_use=100, armor_healing=0, physics_speed=-0.1, forbidden=1},
  187. wear = 0,
  188. })
  189. minetest.register_tool("lottarmor:chestplate_galvorn", {
  190. description = "Galvorn Chestplate",
  191. inventory_image = "lottarmor_inv_chestplate_galvorn.png",
  192. groups = {armor_torso=20, armor_heal=12, armor_use=100, armor_healing=0, physics_speed=-0.1, forbidden=1},
  193. wear = 0,
  194. })
  195. minetest.register_tool("lottarmor:leggings_galvorn", {
  196. description = "Galvorn Leggings",
  197. inventory_image = "lottarmor_inv_leggings_galvorn.png",
  198. groups = {armor_legs=20, armor_heal=12, armor_use=100, armor_healing=0, physics_speed=-0.1, forbidden=1},
  199. wear = 0,
  200. })
  201. minetest.register_tool("lottarmor:boots_galvorn", {
  202. description = "Galvorn Boots",
  203. inventory_image = "lottarmor_inv_boots_galvorn.png",
  204. groups = {armor_feet=15, armor_heal=12, armor_use=100, armor_healing=0, physics_speed=-0.1, forbidden=1},
  205. wear = 0,
  206. })
  207. --Mithril Armor
  208. minetest.register_tool("lottarmor:helmet_mithril", {
  209. description = "Mithril Helmet",
  210. inventory_image = "lottarmor_inv_helmet_mithril.png",
  211. groups = {armor_head=15, armor_heal=12, armor_use=50, armor_healing=0, physics_speed=-0.1},
  212. wear = 0,
  213. })
  214. minetest.register_tool("lottarmor:chestplate_mithril", {
  215. description = "Mithril Chestplate",
  216. inventory_image = "lottarmor_inv_chestplate_mithril.png",
  217. groups = {armor_torso=20, armor_heal=12, armor_use=50, armor_healing=0, physics_speed=-0.1},
  218. wear = 0,
  219. })
  220. minetest.register_tool("lottarmor:leggings_mithril", {
  221. description = "Mithril Leggings",
  222. inventory_image = "lottarmor_inv_leggings_mithril.png",
  223. groups = {armor_legs=20, armor_heal=12, armor_use=50, armor_healing=0, physics_speed=-0.1},
  224. wear = 0,
  225. })
  226. minetest.register_tool("lottarmor:boots_mithril", {
  227. description = "Mithril Boots",
  228. inventory_image = "lottarmor_inv_boots_mithril.png",
  229. groups = {armor_feet=15, armor_heal=12, armor_use=50, armor_healing=0, physics_speed=-0.1},
  230. wear = 0,
  231. })
  232. -- Register Craft Recipes
  233. local craft_ingreds = {
  234. wood = "group:wood",
  235. tin = "lottores:tin_ingot",
  236. copper = "default:copper_ingot",
  237. steel = "default:steel_ingot",
  238. bronze = "default:bronze_ingot",
  239. silver = "lottores:silver_ingot",
  240. gold = "default:gold_ingot",
  241. galvorn = "lottores:galvorn_ingot",
  242. mithril = "lottores:mithril_ingot",
  243. }
  244. for k, v in pairs(craft_ingreds) do
  245. minetest.register_craft({
  246. output = "lottarmor:helmet_"..k,
  247. recipe = {
  248. {v, v, v},
  249. {v, "", v},
  250. {"", "", ""},
  251. },
  252. })
  253. minetest.register_craft({
  254. type = "cooking",
  255. cooktime = 30,
  256. output = v.." 2",
  257. recipe = "lottarmor:helmet_"..k,
  258. })
  259. minetest.register_craft({
  260. output = "lottarmor:chestplate_"..k,
  261. recipe = {
  262. {v, "", v},
  263. {v, v, v},
  264. {v, v, v},
  265. },
  266. })
  267. minetest.register_craft({
  268. type = "cooking",
  269. cooktime = 30,
  270. output = v.." 5",
  271. recipe = "lottarmor:chestplate_"..k,
  272. })
  273. minetest.register_craft({
  274. output = "lottarmor:leggings_"..k,
  275. recipe = {
  276. {v, v, v},
  277. {v, "", v},
  278. {v, "", v},
  279. },
  280. })
  281. minetest.register_craft({
  282. type = "cooking",
  283. cooktime = 30,
  284. output = v.." 3",
  285. recipe = "lottarmor:leggings_"..k,
  286. })
  287. minetest.register_craft({
  288. output = "lottarmor:boots_"..k,
  289. recipe = {
  290. {v, "", v},
  291. {v, "", v},
  292. },
  293. })
  294. minetest.register_craft({
  295. type = "cooking",
  296. cooktime = 30,
  297. output = v.." 1",
  298. recipe = "lottarmor:boots_"..k,
  299. })
  300. end