extra.lua 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. local S = ethereal.intllib
  2. -- Etherium Dust
  3. minetest.register_craftitem("ethereal:etherium_dust", {
  4. description = S("Etherium Dust"),
  5. inventory_image = "ethereal_etherium_dust.png",
  6. wield_image = "ethereal_etherium_dust.png",
  7. })
  8. -- Ethereium Ore
  9. minetest.register_node("ethereal:etherium_ore", {
  10. description = S("Etherium Ore"),
  11. tiles = {"default_desert_stone.png^ethereal_etherium_ore.png"},
  12. groups = {cracky = 3},
  13. drop = "ethereal:etherium_dust",
  14. sounds = default.node_sound_stone_defaults(),
  15. })
  16. -- Bamboo Flooring
  17. minetest.register_node("ethereal:bamboo_floor", {
  18. description = S("Bamboo Floor"),
  19. drawtype = "nodebox",
  20. tiles = { "bamboo_floor.png" },
  21. wield_image = "bamboo_floor.png",
  22. inventory_image = "bamboo_floor.png",
  23. paramtype = "light",
  24. paramtype2 = "wallmounted",
  25. walkable = true,
  26. node_box = {
  27. type = "wallmounted",
  28. wall_top = {-0.5, 0.4375, -0.5, 0.5, 0.5, 0.5},
  29. wall_bottom = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
  30. wall_side = {-0.5, -0.5, -0.5, -0.4375, 0.5, 0.5},
  31. },
  32. selection_box = {type = "wallmounted"},
  33. groups = {snappy = 3, choppy = 3 , flammable = 2},
  34. sounds = default.node_sound_wood_defaults(),
  35. })
  36. -- Craft Bamboo into Bamboo Flooring
  37. minetest.register_craft({
  38. output = "ethereal:bamboo_floor 2",
  39. recipe = {
  40. {"ethereal:bamboo", "ethereal:bamboo"},
  41. {"ethereal:bamboo", "ethereal:bamboo"},
  42. }
  43. })
  44. minetest.register_craft({
  45. output = "ethereal:bamboo_block",
  46. recipe = {
  47. {"ethereal:bamboo_floor"},
  48. {"ethereal:bamboo_floor"},
  49. }
  50. })
  51. -- Bamboo Block
  52. minetest.register_node("ethereal:bamboo_block", {
  53. description = S("Bamboo Block"),
  54. tiles = { "bamboo_floor.png" },
  55. paramtype = "light",
  56. groups = {snappy = 3, choppy = 3 , flammable = 2, wood = 1},
  57. sounds = default.node_sound_wood_defaults(),
  58. })
  59. minetest.register_craft({
  60. output = "ethereal:bamboo_block",
  61. recipe = {
  62. {"ethereal:bamboo", "ethereal:bamboo", "ethereal:bamboo"},
  63. {"ethereal:bamboo", "ethereal:bamboo", "ethereal:bamboo"},
  64. {"ethereal:bamboo", "ethereal:bamboo", "ethereal:bamboo"},
  65. }
  66. })
  67. -- Craft Bamboo into Paper
  68. minetest.register_craft({
  69. output = "default:paper 6",
  70. recipe = {
  71. {"ethereal:bamboo", "ethereal:bamboo"},
  72. {"ethereal:bamboo", "ethereal:bamboo"},
  73. {"ethereal:bamboo", "ethereal:bamboo"},
  74. }
  75. })
  76. if ethereal.xcraft == true then
  77. -- X pattern craft recipes (5x 'a' in X pattern gives 5 of 'b')
  78. local cheat = {
  79. {"default:cobble", "default:gravel", 5},
  80. {"default:gravel", "default:dirt", 5},
  81. {"default:dirt", "default:sand", 5},
  82. {"default:ice", "default:snow", 20},
  83. {"ethereal:dry_dirt", "default:desert_sand", 5},
  84. }
  85. for n = 1, #cheat do
  86. minetest.register_craft({
  87. output = cheat[n][2] .. " " .. cheat[n][3],
  88. recipe = {
  89. {cheat[n][1], "", cheat[n][1]},
  90. {"", cheat[n][1], ""},
  91. {cheat[n][1], "", cheat[n][1]},
  92. }
  93. })
  94. end
  95. end -- END if
  96. -- Paper (2x3 string = 4 paper)
  97. minetest.register_craft({
  98. output = "default:paper 4",
  99. recipe = {
  100. {"farming:string", "farming:string"},
  101. {"farming:string", "farming:string"},
  102. {"farming:string", "farming:string"},
  103. }
  104. })
  105. -- Palm Wax
  106. minetest.register_craftitem("ethereal:palm_wax", {
  107. description = S("Palm Wax"),
  108. inventory_image = "palm_wax.png",
  109. wield_image = "palm_wax.png",
  110. })
  111. minetest.register_craft({
  112. type = "cooking",
  113. cooktime = 10,
  114. output = "ethereal:palm_wax",
  115. recipe = "ethereal:palmleaves"
  116. })
  117. -- Candle from Wax and String/Cotton
  118. minetest.register_node("ethereal:candle", {
  119. description = S("Candle"),
  120. drawtype = "plantlike",
  121. inventory_image = "candle_static.png",
  122. wield_image = "candle_static.png",
  123. tiles = {
  124. {
  125. name = "candle.png",
  126. animation={
  127. type="vertical_frames",
  128. aspect_w = 32,
  129. aspect_h = 32,
  130. length = 1.0
  131. }
  132. },
  133. },
  134. paramtype = "light",
  135. light_source = 11,
  136. sunlight_propagates = true,
  137. walkable = false,
  138. groups = {dig_immediate = 3, attached_node = 1},
  139. sounds = default.node_sound_defaults(),
  140. selection_box = {
  141. type = "fixed",
  142. fixed = { -0.15, -0.5, -0.15, 0.15, 0, 0.15 }
  143. },
  144. })
  145. minetest.register_craft({
  146. output = "ethereal:candle 2",
  147. recipe = {
  148. {"farming:cotton"},
  149. {"ethereal:palm_wax"},
  150. {"ethereal:palm_wax"},
  151. }
  152. })
  153. -- Wooden Bowl
  154. minetest.register_craftitem("ethereal:bowl", {
  155. description = S("Bowl"),
  156. inventory_image = "bowl.png",
  157. groups = {food_bowl = 1, flammable = 2},
  158. })
  159. -- use farming redo's recipe if found
  160. if not minetest.registered_items["farming:bowl"] then
  161. minetest.register_craft({
  162. output = "ethereal:bowl 4",
  163. recipe = {
  164. {"group:wood", "", "group:wood"},
  165. {"", "group:wood", ""},
  166. }
  167. })
  168. end
  169. -- stone Ladder
  170. minetest.register_node("ethereal:stone_ladder", {
  171. description = S("Stone Ladder"),
  172. drawtype = "signlike",
  173. tiles = {"stone_ladder.png"},
  174. inventory_image = "stone_ladder.png",
  175. wield_image = "stone_ladder.png",
  176. paramtype = "light",
  177. sunlight_propagates = true,
  178. paramtype2 = "wallmounted",
  179. walkable = false,
  180. climbable = true,
  181. is_ground_content = false,
  182. selection_box = {
  183. type = "wallmounted",
  184. },
  185. groups = {cracky = 3, oddly_breakable_by_hand = 1},
  186. legacy_wallmounted = true,
  187. sounds = default.node_sound_stone_defaults(),
  188. })
  189. minetest.register_craft({
  190. output = "ethereal:stone_ladder 4",
  191. recipe = {
  192. {"group:stone", "", "group:stone"},
  193. {"group:stone", "group:stone", "group:stone"},
  194. {"group:stone", "", "group:stone"},
  195. }
  196. })
  197. -- Paper Wall
  198. minetest.register_node("ethereal:paper_wall", {
  199. drawtype = "nodebox",
  200. description = S("Paper Wall"),
  201. tiles = {"paper_wall.png"},
  202. inventory_image_image = "paper_wall.png",
  203. wield_image = "paper_wall.png",
  204. paramtype = "light",
  205. groups = {snappy = 3},
  206. sounds = default.node_sound_wood_defaults(),
  207. walkable = true,
  208. is_ground_content = false,
  209. sunlight_propagates = true,
  210. paramtype2 = "facedir",
  211. selection_box = {
  212. type = "fixed",
  213. fixed = { -0.5, -0.5, 5/11, 0.5, 0.5, 8/16 }
  214. },
  215. node_box = {
  216. type = "fixed",
  217. fixed = {
  218. { -0.5, -0.5, 5/11, 0.5, 0.5, 8/16 }
  219. }
  220. },
  221. })
  222. minetest.register_craft({
  223. output = "ethereal:paper_wall",
  224. recipe = {
  225. {"group:stick", "default:paper", "group:stick"},
  226. {"group:stick", "default:paper", "group:stick"},
  227. {"group:stick", "default:paper", "group:stick"},
  228. }
  229. })
  230. -- Glostone (A little bit of light decoration)
  231. minetest.register_node("ethereal:glostone", {
  232. description = S("Glo Stone"),
  233. tiles = {"glostone.png"},
  234. groups = {cracky = 3},
  235. light_source = 13,
  236. drop = "ethereal:glostone",
  237. sounds = default.node_sound_stone_defaults(),
  238. })
  239. minetest.register_craft({
  240. type = "shapeless",
  241. output = "ethereal:glostone",
  242. recipe = {"default:torch", "default:stone", "dye:yellow"}
  243. })
  244. -- Charcoal Lump
  245. minetest.register_craftitem("ethereal:charcoal_lump", {
  246. description = S("Lump of Charcoal"),
  247. inventory_image = "charcoal_lump.png",
  248. })
  249. minetest.register_craft({
  250. output = "ethereal:charcoal_lump 2",
  251. recipe = {
  252. {"ethereal:scorched_tree"}
  253. }
  254. })
  255. minetest.register_craft({
  256. output = "ethereal:charcoal_lump 2",
  257. type = "cooking",
  258. recipe = "group:tree",
  259. cooktime = 4
  260. })
  261. minetest.register_craft({
  262. type = "fuel",
  263. recipe = "ethereal:charcoal_lump",
  264. burntime = 10,
  265. })
  266. -- Make Torch from Charcoal Lump
  267. minetest.register_craft({
  268. output = "default:torch 4",
  269. recipe = {
  270. {"ethereal:charcoal_lump"},
  271. {"default:stick"},
  272. }
  273. })
  274. -- Staff of Light (by Xanthin)
  275. minetest.register_tool("ethereal:light_staff", {
  276. description = S("Staff of Light"),
  277. inventory_image = "light_staff.png",
  278. wield_image = "light_staff.png",
  279. sound = {breaks = "default_tool_breaks"},
  280. stack_max = 1,
  281. on_use = function(itemstack, user, pointed_thing)
  282. if pointed_thing.type ~= "node" then
  283. return
  284. end
  285. local pos = pointed_thing.under
  286. local pname = user:get_player_name()
  287. if minetest.is_protected(pos, pname) then
  288. minetest.record_protection_violation(pos, pname)
  289. return
  290. end
  291. local node = minetest.get_node(pos).name
  292. if node == "default:stone"
  293. or node == "default:desert_stone" then
  294. minetest.swap_node(pos, {name = "ethereal:glostone"})
  295. if not ethereal.check_creative(user:get_player_name()) then
  296. itemstack:add_wear(65535 / 149) -- 150 uses
  297. end
  298. return itemstack
  299. end
  300. end,
  301. })
  302. minetest.register_craft({
  303. output = "ethereal:light_staff",
  304. recipe = {
  305. {"ethereal:illumishroom", "default:mese_crystal", "ethereal:illumishroom"},
  306. {"ethereal:illumishroom2", "default:steel_ingot", "ethereal:illumishroom2"},
  307. {"ethereal:illumishroom3", "default:steel_ingot", "ethereal:illumishroom3"}
  308. }
  309. })