init.lua 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398
  1. -- Ores
  2. minetest.register_node("lottores:rough_rock", {
  3. description = "Rough Rock",
  4. tiles = {"default_stone.png^lottores_rough_rock.png"},
  5. is_ground_content = true,
  6. groups = {cracky=2},
  7. drop = 'lottores:rough_rock_lump',
  8. sounds = default.node_sound_stone_defaults(),
  9. })
  10. minetest.register_node("lottores:silver_ore", {
  11. description = "Silver Ore",
  12. tiles = {"default_stone.png^lottores_silver_ore.png"},
  13. is_ground_content = true,
  14. groups = {cracky=2},
  15. drop = 'lottores:silver_lump',
  16. sounds = default.node_sound_stone_defaults(),
  17. })
  18. minetest.register_node("lottores:tin_ore", {
  19. description = "Tin Ore",
  20. tiles = {"default_stone.png^lottores_tin_ore.png"},
  21. is_ground_content = true,
  22. groups = {cracky=3},
  23. drop = "lottores:tin_lump",
  24. sounds = default.node_sound_stone_defaults(),
  25. })
  26. minetest.register_node("lottores:limestone", {
  27. description = "Limestone",
  28. tiles = {"lottores_limestone.png"},
  29. is_ground_content = true,
  30. groups = {cracky=3, stone=2},
  31. sounds = default.node_sound_stone_defaults(),
  32. })
  33. minetest.register_alias("lottores:limestone_ore", "lottores:limestone")
  34. minetest.register_alias("lottores:limestone_lump", "lottores:limestone")
  35. minetest.register_node("lottores:lead_ore", {
  36. description = "Lead Ore",
  37. tiles = {"default_stone.png^lottores_lead_ore.png"},
  38. is_ground_content = true,
  39. groups = {cracky=2},
  40. drop = "lottores:lead_lump",
  41. sounds = default.node_sound_stone_defaults(),
  42. })
  43. minetest.register_node("lottores:mithril_ore", {
  44. description = "Mithril Ore",
  45. tiles = {"default_stone.png^lottores_mithril_ore.png"},
  46. is_ground_content = true,
  47. groups = {cracky=1},
  48. drop = "lottores:mithril_lump",
  49. sounds = default.node_sound_stone_defaults(),
  50. })
  51. minetest.register_node("lottores:orc_ore", {
  52. description = "Ore Iron Ore",
  53. tiles = {"lottmapgen_mordor_stone.png^default_mineral_iron.png^[colorize:#00000055"},
  54. is_ground_content = true,
  55. groups = {cracky=2},
  56. drop = "lottores:orc_lump",
  57. sounds = default.node_sound_stone_defaults(),
  58. })
  59. minetest.register_node("lottores:mineral_pearl", {
  60. description = "Pearl Ore",
  61. tiles = {"default_sand.png^lottores_mineral_pearl.png"},
  62. paramtype = "light",
  63. is_ground_content = true,
  64. groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
  65. drop = {
  66. items = {
  67. {
  68. items = {'lottores:pearl'},
  69. },
  70. {
  71. items = {'default:sand'},
  72. }
  73. }
  74. },
  75. sounds = default.node_sound_sand_defaults(),
  76. })
  77. minetest.register_node("lottores:mineral_salt", {
  78. description = "Salt Mineral",
  79. tiles = {"default_dirt.png^lottores_mineral_salt.png"},
  80. paramtype = "light",
  81. is_ground_content = true,
  82. groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
  83. drop = {
  84. items = {
  85. {
  86. items = {'lottores:salt'},
  87. },
  88. {
  89. items = {'default:dirt'},
  90. }
  91. }
  92. },
  93. sounds = default.node_sound_dirt_defaults(),
  94. })
  95. -- Craft Items
  96. minetest.register_craftitem("lottores:rough_rock_lump", {
  97. description = "Rough Rock Lump",
  98. inventory_image = "lottores_rough_rock_lump.png",
  99. })
  100. minetest.register_craftitem("lottores:silver_lump", {
  101. description = "Silver Lump",
  102. inventory_image = "lottores_silver_lump.png",
  103. })
  104. minetest.register_craftitem("lottores:silver_ingot", {
  105. description = "Silver Ingot",
  106. inventory_image = "lottores_silver_ingot.png",
  107. })
  108. minetest.register_craftitem("lottores:tin_lump", {
  109. description = "Tin Lump",
  110. inventory_image = "lottores_tin_lump.png",
  111. })
  112. minetest.register_craftitem("lottores:tin_ingot", {
  113. description = "Tin Ingot",
  114. inventory_image = "lottores_tin_ingot.png",
  115. })
  116. minetest.register_craftitem("lottores:lead_lump", {
  117. description = "Lead Lump",
  118. inventory_image = "lottores_lead_lump.png",
  119. })
  120. minetest.register_craftitem("lottores:lead_ingot", {
  121. description = "Lead Ingot",
  122. inventory_image = "lottores_lead_ingot.png",
  123. })
  124. minetest.register_craftitem("lottores:mithril_lump", {
  125. description = "Mithril Lump",
  126. inventory_image = "lottores_mithril_lump.png",
  127. })
  128. minetest.register_craftitem("lottores:mithril_ingot", {
  129. description = "Mithril Ingot",
  130. inventory_image = "lottores_mithril_ingot.png",
  131. })
  132. minetest.register_craftitem("lottores:galvorn_ingot", {
  133. description = "Galvorn Ingot",
  134. inventory_image = "lottores_galvorn_ingot.png",
  135. groups = {forbidden=1},
  136. })
  137. minetest.register_craftitem("lottores:tilkal_ingot", {
  138. description = "Tilkal Ingot",
  139. inventory_image = "lottores_tilkal_ingot.png",
  140. groups = {forbidden=1},
  141. })
  142. minetest.register_craftitem("lottores:orc_lump", {
  143. description = "Orc Iron Lump",
  144. inventory_image = "default_iron_lump.png^[colorize:#00000055",
  145. })
  146. minetest.register_craftitem("lottores:orc_steel_ingot", {
  147. description = "Orc Steel Ingot",
  148. inventory_image = "default_steel_ingot.png^[colorize:#00000055",
  149. })
  150. minetest.register_craftitem("lottores:pearl", {
  151. description = "Pearl",
  152. inventory_image = "lottores_pearl.png",
  153. })
  154. -- Nodes
  155. minetest.register_node("lottores:tilkal", {
  156. description = "Tilkal",
  157. tiles = {"lottores_tilkal.png"},
  158. sounds = default.node_sound_defaults(),
  159. groups = {forbidden=1, very_hard = 1, creative = 1},
  160. })
  161. minetest.register_node("lottores:marble", {
  162. description = "Marble",
  163. tiles = {"lottores_marble.png"},
  164. is_ground_content = true,
  165. groups = {cracky=3},
  166. sounds = default.node_sound_stone_defaults(),
  167. })
  168. minetest.register_node("lottores:silver_block", {
  169. description = "Silver Block",
  170. tiles = {"lottores_silver_block.png"},
  171. is_ground_content = true,
  172. groups = {cracky=1,level=2},
  173. sounds = default.node_sound_stone_defaults(),
  174. })
  175. minetest.register_node("lottores:tin_block", {
  176. description = "Tin Block",
  177. tiles = {"lottores_tin_block.png"},
  178. is_ground_content = true,
  179. groups = {cracky=1},
  180. sounds = default.node_sound_stone_defaults(),
  181. })
  182. minetest.register_node("lottores:lead_block", {
  183. description = "Lead Block",
  184. tiles = {"lottores_lead_block.png"},
  185. is_ground_content = true,
  186. groups = {cracky=1},
  187. sounds = default.node_sound_stone_defaults(),
  188. })
  189. minetest.register_node("lottores:mithril_block", {
  190. description = "Mithril Block",
  191. tiles = {"lottores_mithril_block.png"},
  192. is_ground_content = true,
  193. groups = {cracky=1,level=2},
  194. sounds = default.node_sound_stone_defaults(),
  195. })
  196. minetest.register_node("lottores:galvorn_block", {
  197. description = "Galvorn Block",
  198. tiles = {"lottores_galvorn_block.png"},
  199. is_ground_content = true,
  200. groups = {cracky=1,level=2,forbidden=1},
  201. sounds = default.node_sound_stone_defaults(),
  202. })
  203. minetest.register_node("lottores:salt", {
  204. description = "Salt",
  205. drawtype = "plantlike",
  206. visual_scale = 1.0,
  207. tiles = {"lottores_salt.png"},
  208. inventory_image = "lottores_salt.png",
  209. paramtype = "light",
  210. sunlight_propagates = true,
  211. walkable = false,
  212. groups = {fleshy=3,dig_immediate=3,flammable=1},
  213. on_use = minetest.item_eat(1),
  214. sounds = default.node_sound_defaults(),
  215. })
  216. minetest.register_node( "lottores:pearl_block", {
  217. description = "Pearl Block",
  218. tiles = { "default_sand.png^lottores_pearl_block.png" },
  219. is_ground_content = true,
  220. groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
  221. sounds = default.node_sound_glass_defaults(),
  222. })
  223. minetest.register_node( "lottores:salt_block", {
  224. description = "Salt Block",
  225. tiles = { "default_clay.png^lottores_salt_block.png" },
  226. is_ground_content = true,
  227. groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
  228. on_use = minetest.item_eat(9),
  229. sounds = default.node_sound_stone_defaults(),
  230. })
  231. minetest.register_node("lottores:geodes_crystal_1", {
  232. description = "Geodes Crystal",
  233. drawtype = "nodebox",
  234. tiles = {"lottores_geodes_crystal.png"},
  235. paramtype = "light",
  236. sunlight_propagates = true,
  237. light_source = 8,
  238. alpha = 200,
  239. is_ground_content = false,
  240. groups = {cracky=3,oddly_breakable_by_hand=3},
  241. sounds = default.node_sound_glass_defaults(),
  242. node_box = {
  243. type = "fixed",
  244. fixed = {
  245. {-0.1875,-0.5,-0.125,0.1875,0.3125,0.1875},
  246. {0.0625,-0.5,-0.25,0.3125,0,0},
  247. {0.0625,-0.5,0.1875,0.25,0.1875,0.375},
  248. {-0.3125,-0.5,-0.3125,-0.0625,0.0625,0},
  249. {-0.375,-0.5,0.0625,-0.125,-0.0625,0.3125},
  250. }
  251. },
  252. on_place = function(itemstack, placer, pointed_thing)
  253. local stack = ItemStack("lottores:geodes_crystal_"..math.random(1,5))
  254. local ret = minetest.item_place(stack, placer, pointed_thing)
  255. return ItemStack("lottores:geodes_crystal_1 "..itemstack:get_count()-(1-ret:get_count()))
  256. end,
  257. })
  258. minetest.register_node("lottores:geodes_crystal_2", {
  259. drawtype = "nodebox",
  260. tiles = {"lottores_geodes_crystal.png"},
  261. paramtype = "light",
  262. sunlight_propagates = true,
  263. light_source = 8,
  264. alpha = 200,
  265. is_ground_content = false,
  266. groups = {cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
  267. sounds = default.node_sound_glass_defaults(),
  268. drop = "lottores:geodes_crystal_1",
  269. node_box = {
  270. type = "fixed",
  271. fixed = {
  272. {-0.1875,-0.5,-0.125,0.1875,0.5,0.1875},
  273. {0.1875,-0.5,-0.25,0.5,0.1875,0},
  274. {0.0625,-0.5,0.1875,0.375,0.375,0.375},
  275. {-0.375,-0.5,-0.3125,-0.0625,0.25,0},
  276. {-0.5,-0.5,-0.0625,-0.125,0,0.3125},
  277. {0,-0.5,-0.5,0.3125,-0.0625,-0.1875},
  278. }
  279. }
  280. })
  281. minetest.register_node("lottores:geodes_crystal_3", {
  282. drawtype = "nodebox",
  283. tiles = {"lottores_geodes_crystal.png"},
  284. paramtype = "light",
  285. sunlight_propagates = true,
  286. light_source = 8,
  287. alpha = 200,
  288. is_ground_content = false,
  289. groups = {cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
  290. sounds = default.node_sound_glass_defaults(),
  291. drop = "lottores:geodes_crystal_1",
  292. node_box = {
  293. type = "fixed",
  294. fixed = {
  295. {-0.125,-0.5,-0.25,0.25,0.5,0.1875},
  296. {-0.125,-0.5,-0.4375,0.125,0.25,-0.1875},
  297. {0,-0.5,-0.125,0.461539,0,0.3125},
  298. {-0.5,-0.5,0,-0.0625,0.25,0.413465},
  299. {-0.375,-0.5,-0.25,-0.0625,-0.0625,0.0625},
  300. {0.1875,-0.5,-0.5,0.5,-0.25,-0.1875},
  301. {-0.4375,-0.5,-0.5,-0.0625,-0.25,-0.125},
  302. }
  303. }
  304. })
  305. minetest.register_node("lottores:geodes_crystal_4", {
  306. drawtype = "nodebox",
  307. tiles = {"lottores_geodes_crystal.png"},
  308. paramtype = "light",
  309. sunlight_propagates = true,
  310. light_source = 8,
  311. alpha = 200,
  312. is_ground_content = false,
  313. groups = {cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
  314. sounds = default.node_sound_glass_defaults(),
  315. drop = "lottores:geodes_crystal_1",
  316. node_box = {
  317. type = "fixed",
  318. fixed = {
  319. {0.125,-0.5,-0.25,0.5,-0.125,0.125},
  320. {-0.125,-0.5,-0.0625,0.1875,0.375,0.3125},
  321. {0.0625,-0.5,-0.5,0.375,-0.0625,-0.125},
  322. {-0.3125,-0.5,-0.3125,0,-0.1875,0.0625},
  323. {-0.0625,-0.5,-0.1875,0.375,0.25,0.125},
  324. {-0.375,-0.5,0.125,0,0.25,0.5},
  325. }
  326. }
  327. })
  328. minetest.register_node("lottores:geodes_crystal_5", {
  329. drawtype = "nodebox",
  330. tiles = {"lottores_geodes_crystal.png"},
  331. paramtype = "light",
  332. sunlight_propagates = true,
  333. light_source = 8,
  334. alpha = 200,
  335. is_ground_content = false,
  336. groups = {cracky=3,oddly_breakable_by_hand=3,not_in_creative_inventory=1},
  337. sounds = default.node_sound_glass_defaults(),
  338. drop = "lottores:geodes_crystal_1",
  339. node_box = {
  340. type = "fixed",
  341. fixed = {
  342. {-0.3125,-0.5,-0.1875,0,0.5,0.125},
  343. {-0.1875,-0.5,-0.3125,0.1875,0.125,0},
  344. {-0.25,-0.5,-0.5,0.0625,0.3125,-0.1875},
  345. {0.0625,-0.5,-0.125,0.375,-0.125,0.1875},
  346. {0.0625,-0.5,-0.375,0.3125,-0.25,-0.1875},
  347. {-0.1875,-0.5,0,0.125,0.0625,0.5},
  348. }
  349. }
  350. })
  351. dofile(minetest.get_modpath("lottores") .. "/mapgen.lua")
  352. dofile(minetest.get_modpath("lottores") .. "/tools.lua")
  353. dofile(minetest.get_modpath("lottores") .. "/ithildin.lua")
  354. dofile(minetest.get_modpath("lottores") .. "/stairs.lua")
  355. dofile(minetest.get_modpath("lottores") .. "/crafting.lua")