nodes.lua 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  1. --Materials
  2. minetest.register_node("nssb:memoryone", {
  3. description = "Memoryone",
  4. tiles = {"very_mossy_stone_brick.png"},
  5. is_ground_content = false,
  6. sounds = default.node_sound_stone_defaults(),
  7. on_blast = function() end,
  8. })
  9. minetest.register_node("nssb:mossy_stone_brick", {
  10. description = "Mossy Stone Brick",
  11. tiles = {"mossy_stone_brick.png"},
  12. is_ground_content = false,
  13. groups = {cracky=2, stone=2},
  14. sounds = default.node_sound_stone_defaults(),
  15. on_blast = function() end,
  16. })
  17. minetest.register_node("nssb:stone_brick", {
  18. description = "Stone Brick",
  19. tiles = {"default_stone_brick.png"},
  20. is_ground_content = false,
  21. groups = {cracky=2, stone=2},
  22. sounds = default.node_sound_stone_defaults(),
  23. on_blast = function() end,
  24. })
  25. minetest.register_node("nssb:very_mossy_stone_brick", {
  26. description = "Very Mossy Stone Brick",
  27. tiles = {"very_mossy_stone_brick.png"},
  28. is_ground_content = false,
  29. groups = {cracky=2, stone=2},
  30. sounds = default.node_sound_stone_defaults(),
  31. on_blast = function() end,
  32. })
  33. minetest.register_node("nssb:mossy_stone_column", {
  34. description = "Mossy Stone Column",
  35. tiles = {"mossy_stone_column.png"},
  36. is_ground_content = false,
  37. groups = {cracky=2, stone=2},
  38. sounds = default.node_sound_stone_defaults(),
  39. on_blast = function() end,
  40. })
  41. minetest.register_node("nssb:stone_column", {
  42. description = "Stone Column",
  43. tiles = {"stone_column.png"},
  44. is_ground_content = false,
  45. groups = {cracky=2, stone=2},
  46. sounds = default.node_sound_stone_defaults(),
  47. on_blast = function() end,
  48. })
  49. minetest.register_node("nssb:marine_stone", {
  50. description = "Seastone",
  51. tiles = {"marine_stone.png"},
  52. is_ground_content = false,
  53. groups = {cracky=1, stone=2},
  54. sounds = default.node_sound_stone_defaults(),
  55. })
  56. minetest.register_node("nssb:marine_brick", {
  57. description = "Seastone Brick",
  58. tiles = {"marine_brick.png"},
  59. is_ground_content = false,
  60. groups = {stone=2},
  61. sounds = default.node_sound_stone_defaults(),
  62. })
  63. minetest.register_node("nssb:marine_meselamp", {
  64. description = "Sea Meselamp",
  65. tiles = {"marine_meselamp.png"},
  66. is_ground_content = false,
  67. groups = {cracky=3},
  68. drop = "",
  69. light_source = 15,
  70. sounds = default.node_sound_glass_defaults(),
  71. })
  72. minetest.register_node("nssb:morlamp", {
  73. description = "Morlamp",
  74. tiles = {"morlamp.png"},
  75. is_ground_content = false,
  76. groups = {cracky=3},
  77. drop = "",
  78. light_source = 15,
  79. sounds = default.node_sound_glass_defaults(),
  80. })
  81. minetest.register_node("nssb:mantis_clay", {
  82. description = "Mantis Clay",
  83. tiles = {"mantis_clay.png"},
  84. is_ground_content = false,
  85. groups = {cracky=2},
  86. sounds = default.node_sound_stone_defaults(),
  87. })
  88. minetest.register_node("nssb:hardened_mantis_clay", {
  89. description = "Hardened Mantis Clay",
  90. tiles = {"hard_mantis_clay.png"},
  91. is_ground_content = false,
  92. groups = {cracky=1},
  93. sounds = default.node_sound_stone_defaults(),
  94. })
  95. minetest.register_node("nssb:ant_stone", {
  96. description = "Ant Stone",
  97. tiles = {"ant_stone.png"},
  98. is_ground_content = false,
  99. groups = {cracky=1, stone=1},
  100. sounds = default.node_sound_stone_defaults(),
  101. })
  102. minetest.register_node("nssb:vine", {
  103. description = "Vine",
  104. drawtype = "signlike",
  105. tiles = {"climbing_plant.png"},
  106. inventory_image = {"vine.png"},
  107. walkable = false,
  108. climbable = true,
  109. paramtype = "light",
  110. paramtype2 = "wallmounted",
  111. selection_box = {type="wallmounted"},
  112. legacy_wallmounted = true,
  113. groups = {flammable=3, snappy = 3},
  114. sounds = default.node_sound_leaves_defaults()
  115. })
  116. minetest.register_node("nssb:liana", {
  117. description = "Liana",
  118. drawtype = "plantlike",
  119. inventory_image = {"liana.png"},
  120. tiles = {"liana.png"},
  121. paramtype = "light",
  122. walkable = false,
  123. climbable = true,
  124. groups = {flammable=3, snappy = 3},
  125. sounds = default.node_sound_leaves_defaults()
  126. })
  127. minetest.register_node("nssb:vertical_web", {
  128. description = "Vertical Web",
  129. inventory_image = "vertical_web.png",
  130. tile_images = {"vertical_web.png"} ,
  131. drawtype = "plantlike",
  132. paramtype = "light",
  133. walkable = false,
  134. pointable = true,
  135. diggable = true,
  136. buildable_to = false,
  137. drop = "nssm:web",
  138. drowning = 0,
  139. liquid_renewable = false,
  140. liquidtype = "source",
  141. liquid_range= 0,
  142. liquid_alternative_flowing = "nssb:vertical_web",
  143. liquid_alternative_source = "nssb:vertical_web",
  144. liquid_viscosity = 20,
  145. groups = {flammable=2, snappy=1, liquid=1},
  146. })
  147. minetest.register_node("nssb:web_cone_up", {
  148. description = "Web Cone Up",
  149. inventory_image = "web_cone_up.png",
  150. tile_images = {"web_cone_up.png"} ,
  151. drawtype = "plantlike",
  152. paramtype = "light",
  153. walkable = false,
  154. pointable = true,
  155. diggable = true,
  156. buildable_to = false,
  157. drop = "nssm:web",
  158. drowning = 0,
  159. liquid_renewable = false,
  160. liquidtype = "source",
  161. liquid_range= 0,
  162. liquid_alternative_flowing = "nssb:web_cone_up",
  163. liquid_alternative_source = "nssb:web_cone_up",
  164. liquid_viscosity = 20,
  165. groups = {flammable=2, snappy=1, liquid=1},
  166. })
  167. minetest.register_node("nssb:web_cone_down", {
  168. description = "Web Cone Down",
  169. inventory_image = "web_cone_down.png",
  170. tile_images = {"web_cone_down.png"} ,
  171. drawtype = "plantlike",
  172. paramtype = "light",
  173. walkable = false,
  174. pointable = true,
  175. diggable = true,
  176. buildable_to = false,
  177. drop = "nssm:web",
  178. drowning = 0,
  179. liquid_renewable = false,
  180. liquidtype = "source",
  181. liquid_range= 0,
  182. liquid_alternative_flowing = "nssb:web_cone_down",
  183. liquid_alternative_source = "nssb:web_cone_down",
  184. liquid_viscosity = 20,
  185. groups = {flammable=2, snappy=1, liquid=1},
  186. })
  187. minetest.register_craft({
  188. output = 'nssb:marine_meselamp',
  189. recipe = {
  190. {'default:glass', 'bucket:bucket_water', 'default:glass'},
  191. {'default:glass', 'default:mese_crystal', 'default:glass'},
  192. {'default:glass', 'bucket:bucket_water', 'default:glass'},
  193. }
  194. })
  195. minetest.register_craft({
  196. output = 'nssb:morlamp',
  197. recipe = {
  198. {'nssb:morelentir_dust','nssb:morelentir_dust','nssb:morelentir_dust',},
  199. {'nssb:morelentir_dust','nssb:morelentir_dust','nssb:morelentir_dust',},
  200. {'nssb:morelentir_dust','nssb:morelentir_dust','nssb:morelentir_dust',},
  201. }
  202. })
  203. minetest.register_node("nssb:web_cocoon", {
  204. description = "Web Cocoon",
  205. tiles = {"web_cocoon.png"},
  206. drop = {
  207. max_items = 1,
  208. items = {
  209. {
  210. items = {'node "nssm:spider_leg" 2'},
  211. rarity = 4
  212. },
  213. {
  214. items = {'node "nssm:web 1'},
  215. rarity = 4
  216. },
  217. {
  218. items = {'node "nssm:ant_sword" 1'},
  219. rarity = 20
  220. },
  221. {
  222. items = {'node "nssm:sun_sword" 1'},
  223. rarity = 100
  224. },
  225. {
  226. items = {'node "nssm:night_sword" 1'},
  227. rarity = 100
  228. },
  229. {
  230. items = {'node "nssm:spear_ant" 1'},
  231. rarity = 20
  232. },
  233. {
  234. items = {'node "nssm:spear_mantis" 1'},
  235. rarity = 20
  236. },
  237. {
  238. items = {'node "nssm:spear_manticore" 1'},
  239. rarity = 22
  240. },
  241. {
  242. items = {'node "nssm:spear_little_ice_tooth" 1'},
  243. rarity = 20
  244. },
  245. {
  246. items = {'node "nssm:spear_duck_beak" 1'},
  247. rarity = 20
  248. },
  249. {
  250. items = {'node "default:sword_wood" 1'},
  251. rarity = 14
  252. },
  253. {
  254. items = {'node "default:sword_steel" 1'},
  255. rarity = 20
  256. },{
  257. items = {'node "default:sword_mese" 1'},
  258. rarity = 20
  259. },{
  260. items = {'node "default:axe_bronze" 1'},
  261. rarity = 20
  262. },
  263. {
  264. items = {'node "nssm:raw_scrausics_wing" 2'},
  265. rarity = 20
  266. },
  267. {
  268. items = {'node "nssm:nssm:mantis_claw" 1'},
  269. rarity = 20
  270. },
  271. {
  272. items = {'node "default:axe_mese" 1'},
  273. rarity = 20
  274. },
  275. {
  276. items = {'node "nssm:mantis_sword" 1'},
  277. rarity = 20
  278. },
  279. {
  280. items = {'node "default:axe_steel" 1'},
  281. rarity = 20
  282. },
  283. {
  284. items = {'node "nssm:crab_light_mace" 1'},
  285. rarity = 20
  286. },
  287. {
  288. items = {'node "nssm:masticone_fang_sword" 1'},
  289. rarity = 20
  290. }
  291. }
  292. },
  293. is_ground_content = false,
  294. groups = {snappy=1, flammable=2},
  295. })
  296. --Eggs
  297. function nssb_register_eggs (
  298. name, -- name of the mobs and the eggs
  299. descr, -- Description of the mob and eggs
  300. int, -- time interval between each birth
  301. wide, -- the radius in wich mobs are generated
  302. troppi, -- maximun number of mobs spawned
  303. neigh, -- block that need to be near for spawning the mobs
  304. night, --if only at night
  305. lumin) --luminosity parameter of the egg_block
  306. minetest.register_node("nssb:".. name .."_eggs", {
  307. description = descr .." Eggs",
  308. tiles = {name .."_eggs.png"},
  309. light_source = lumin,
  310. is_ground_content = false,
  311. groups = {choppy=1},
  312. })
  313. minetest.register_abm({
  314. nodenames = {"nssb:".. name .."_eggs"},
  315. neighbors = {neigh},
  316. interval = int,
  317. chance = 1,
  318. action = function(pos, node, active_object_count, active_object_count_wider)
  319. local pos1 = {x=pos.x+math.random(-wide,wide), y=pos.y+0.5, z=pos.z+math.random(-wide,wide)}
  320. local n = minetest.env:get_node(pos1).name
  321. if n ~= "air" and n ~= "default:water_source" then
  322. return
  323. end
  324. local count = 0
  325. local objects = minetest.env:get_objects_inside_radius(pos, 12)
  326. for _,obj in ipairs(objects) do
  327. count = count +1
  328. --minetest.chat_send_all("Count: "..count)
  329. end
  330. local t = minetest.get_timeofday()
  331. --minetest.chat_send_all("Time of day: "..t)
  332. if (t>=0.75 and t<=1) or (t>=0 and t<=0.25) or night==false then
  333. if count < troppi then
  334. minetest.add_entity(pos1, "nssm:" .. name)
  335. end
  336. end
  337. end
  338. })
  339. end
  340. nssb_register_eggs ('ant_worker', 'Ant Worker', 16, 2, 4, "air", false, 5)
  341. nssb_register_eggs ('ant_soldier', 'Ant Soldier', 16, 2, 4, "air", false, 5)
  342. nssb_register_eggs ('larva', 'Larva', 16, 2, 4, "air", false, 5)
  343. nssb_register_eggs ('crab', 'Crab', 18, 2, 4, "default:sand", false, 5)
  344. nssb_register_eggs ('black_widow', 'Black Widow', 18, 2, 4, "air", false, 5)
  345. nssb_register_eggs ('uloboros', 'Uloboros', 18, 2, 4, "air", false, 5)
  346. nssb_register_eggs ('daddy_long_legs', 'Daddy Long Legs', 18, 2, 4, "air", false, 5)
  347. nssb_register_eggs ('xgaloctopus', 'Xgaloctopus', 18, 2, 4, "default:water_source", false, 5)
  348. nssb_register_eggs ('bloco', 'Bloco', 14, 2, 4, "default:gravel", false, 5)
  349. nssb_register_eggs ('icesnake', 'Icesnake', 18, 2, 4, "default:ice", false, 5)
  350. nssb_register_eggs ('snow_biter', 'Snowbiter', 18, 2, 4, "default:ice", false, 5)
  351. nssb_register_eggs ('scrausics', 'Scrausics', 18, 2, 4, "air", false, 5)
  352. nssb_register_eggs ('moonheron', 'Moonheron', 18, 2, 4, "air", true, 0)
  353. function nssb_register_eggboss (
  354. name, -- name of the mobs and the eggs
  355. descr, -- Description of the mob and eggs
  356. int, -- time interval between each birth
  357. wide, -- the radius in wich mobs are generated
  358. troppi, -- maximun number of mobs spawned
  359. neigh, -- block that need to be near for spawning the mobs
  360. night, --if only at night
  361. lumin) --luminosity parameter of the egg_block
  362. minetest.register_node("nssb:".. name .."_eggboss", {
  363. description = descr .." Eggs",
  364. tiles = {name .."_eggs.png"},
  365. light_source = lumin,
  366. is_ground_content = false,
  367. groups = {choppy=1},
  368. })
  369. minetest.register_abm({
  370. nodenames = {"nssb:".. name .."_eggboss"},
  371. neighbors = {neigh},
  372. interval = int,
  373. chance = 1,
  374. action = function(pos, node, active_object_count, active_object_count_wider)
  375. local pos1 = {x=pos.x+math.random(-wide,wide), y=pos.y+0.5, z=pos.z+math.random(-wide,wide)}
  376. local n = minetest.env:get_node(pos1).name
  377. if n ~= "air" and n ~= "default:water_source" then
  378. return
  379. end
  380. local count = 0
  381. local objects = minetest.env:get_objects_inside_radius(pos, 12)
  382. for _,obj in ipairs(objects) do
  383. count = count +1
  384. --minetest.chat_send_all("Count: "..count)
  385. end
  386. local t = minetest.get_timeofday()
  387. --minetest.chat_send_all("Time of day: "..t)
  388. if (t>=0.75 and t<=1) or (t>=0 and t<=0.25) or night==false then
  389. if count < troppi then
  390. minetest.add_entity(pos1, "nssm:" .. name)
  391. end
  392. end
  393. end
  394. })
  395. end
  396. --Bosses of the eggs:
  397. nssb_register_eggboss ('phoenix', 'Phoenix', 900, 10, 1, "air", false, 15)
  398. nssb_register_eggboss ('tarantula', 'Tarantula', 900, 2, 1, "air", false, 5)
  399. nssb_register_eggboss ('night_master', 'Night Master', 900, 10, 1, "air", true, 0)
  400. nssb_register_eggboss ('ant_queen', 'Ant Queen', 900, 10, 1, "air", false, 5)
  401. nssb_register_eggboss ('icelamander', 'Icelamander', 900, 10, 1, "air", false, 5)
  402. minetest.register_node("nssb:giant_sandworm_eggs", {
  403. description = "Giant Sandworm Egg",
  404. tiles = {"giant_sandworm_eggs.png"},
  405. is_ground_content = false,
  406. groups = {choppy=1},
  407. })
  408. minetest.register_abm({
  409. nodenames = {"nssb:giant_sandworm_eggs"},
  410. neighbors = {"default:desert_stone"},
  411. interval = 1,
  412. chance = 1,
  413. action = function(pos, node)
  414. local pos1 = {x=pos.x, y=pos.y+1, z=pos.z}
  415. local n = minetest.env:get_node(pos1).name
  416. if n ~= "air" then
  417. return
  418. end
  419. minetest.add_entity(pos1, "nssm:giant_sandworm")
  420. minetest.remove_node(pos)
  421. end
  422. })
  423. --Morlavala nodes
  424. minetest.register_node("nssb:morentir", {
  425. description = "Dark Stone",
  426. tiles = {"morentir.png"},
  427. is_ground_content = true,
  428. groups = {cracky=1},
  429. sounds = default.node_sound_stone_defaults(),
  430. })
  431. minetest.register_node("nssb:boum_morentir", {
  432. description = "Exploding Dark Stone",
  433. tiles = {"morentir.png"},
  434. is_ground_content = true,
  435. groups = {cracky=1},
  436. drop = "nssb:morentir",
  437. sounds = default.node_sound_stone_defaults(),
  438. })
  439. minetest.register_node("nssb:fall_morentir", {
  440. description = "Falling Dark Stone",
  441. tiles = {"morentir.png"},
  442. is_ground_content = true,
  443. groups = {cracky=1,falling_node = 1},
  444. drop = "nssb:morentir",
  445. sounds = default.node_sound_stone_defaults(),
  446. })
  447. minetest.register_node("nssb:indistructible_morentir", {
  448. description = "Dark Indistructible Stone",
  449. tiles = {"morentir.png"},
  450. --groups = {oddly_breakable_by_hand = 2},
  451. is_ground_content = false,
  452. sounds = default.node_sound_stone_defaults(),
  453. on_blast = function() end,
  454. })
  455. minetest.register_node("nssb:morelentir", {
  456. description = "Dark Starred Stone",
  457. inventory_image = minetest.inventorycube("morelentir.png"),
  458. light_source = 10,
  459. drop = "nssm:morelentir_dust",
  460. tiles = {
  461. {
  462. name = "morelentir_animated.png",
  463. animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 6.0},
  464. },},
  465. is_ground_content = false,
  466. groups = {cracky=1},
  467. sounds = default.node_sound_stone_defaults(),
  468. })
  469. minetest.register_node("nssb:morkemen", {
  470. description = "Dark Dirt",
  471. tiles = {"morkemen.png"},
  472. is_ground_content = true,
  473. groups = {crumbly=1},
  474. sounds = default.node_sound_dirt_defaults(),
  475. })
  476. minetest.register_node("nssb:morvilya", {
  477. description = "Dark Air",
  478. drawtype = "airlike",
  479. tiles = {"morvilya.png"},
  480. paramtype = "light",
  481. walkable = false,
  482. sunlight_propagates = true,
  483. pointable = false,
  484. diggable = false,
  485. buildable_to = true,
  486. drop = "",
  487. drowning = 1,
  488. damage_per_second = 2,
  489. post_effect_color = {a=800, r=1, g=1, b=1},
  490. })
  491. minetest.register_node("nssb:mornar", {
  492. description = "Black Flame",
  493. drawtype = "firelike",
  494. tiles = {{
  495. name = "mornar_animated.png",
  496. animation = {type = "vertical_frames",
  497. aspect_w = 16, aspect_h = 16, length = 1},
  498. }},
  499. inventory_image = "mornar.png",
  500. light_source = 12,
  501. groups = {igniter = 2},
  502. drop = '',
  503. walkable = false,
  504. buildable_to = false,
  505. damage_per_second = 4,
  506. })
  507. minetest.register_node("nssb:mornen", {
  508. description = "Black Water",
  509. inventory_image = minetest.inventorycube("mornen.png"),
  510. drawtype = "liquid",
  511. tiles = {
  512. {
  513. name = "mornen_animated.png",
  514. animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 2.0},
  515. },
  516. },
  517. alpha = 650,
  518. paramtype = "light",
  519. walkable = false,
  520. pointable = false,
  521. diggable = false,
  522. buildable_to = true,
  523. is_ground_content = true,
  524. drop = "",
  525. light_source = 14,
  526. liquid_range= 4,
  527. drowning = 1,
  528. liquid_renewable = true,
  529. damage_per_second = 2,
  530. liquidtype = "source",
  531. liquid_alternative_flowing = "nssb:mornen_flowing",
  532. liquid_alternative_source = "nssb:mornen",
  533. liquid_viscosity = 6,
  534. post_effect_color = {a=500, r=1, g=1, b=1},
  535. groups = {liquid=3, puts_out_fire=1},
  536. })
  537. minetest.register_node("nssb:mornen_flowing", {
  538. description = "Flowing Dark Water",
  539. inventory_image = minetest.inventorycube("mornen.png"),
  540. drawtype = "flowingliquid",
  541. tiles= {"mornen.png"},
  542. special_tiles = {
  543. {
  544. name = "mornen_animated.png",
  545. backface_culling = false,
  546. animation = {
  547. type = "vertical_frames",
  548. aspect_w = 16,
  549. aspect_h = 16,
  550. length = 3.3,
  551. },
  552. },
  553. {
  554. name = "mornen_animated.png",
  555. backface_culling = true,
  556. animation = {
  557. type = "vertical_frames",
  558. aspect_w = 16,
  559. aspect_h = 16,
  560. length = 3.3,
  561. },
  562. },
  563. },
  564. paramtype = "light",
  565. paramtype2 = "flowingliquid",
  566. light_source = 10,
  567. alpha = 650,
  568. walkable = false,
  569. pointable = false,
  570. diggable = false,
  571. buildable_to = true,
  572. is_ground_content = false,
  573. drop = "",
  574. drowning = 1,
  575. liquidtype = "flowing",
  576. liquid_alternative_flowing = "nssb:mornen_flowing",
  577. liquid_alternative_source = "nssb:mornen",
  578. liquid_viscosity = 6,
  579. liquid_renewable = true,
  580. damage_per_second = 2,
  581. post_effect_color = {a=500, r=1, g=1, b=1},
  582. groups = {liquid=3, puts_out_fire=1, water=1, not_in_creative_inventory=1},
  583. })
  584. minetest.register_node("nssb:portal", {
  585. description = "Morlendor Portal",
  586. inventory_image = minetest.inventorycube("mornen.png"),
  587. drawtype = "liquid",
  588. tiles = {
  589. {
  590. name = "mornen_animated.png",
  591. animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 2.0},
  592. },
  593. },
  594. alpha = 800,
  595. paramtype = "light",
  596. walkable = false,
  597. pointable = false,
  598. diggable = false,
  599. buildable_to = true,
  600. is_ground_content = false,
  601. drop = "",
  602. light_source = 15,
  603. liquid_range= 0,
  604. drowning = 1,
  605. liquid_renewable = false,
  606. liquidtype = "source",
  607. liquid_alternative_flowing = "nssb:portal",
  608. liquid_alternative_source = "nssb:portal",
  609. liquid_viscosity = 0,
  610. post_effect_color = {a=10, r=1, g=1, b=1},
  611. groups = {liquid=3, puts_out_fire=1},
  612. on_blast = function() end,
  613. })
  614. minetest.register_node("nssb:portalhome", {
  615. description = "Home Portal",
  616. inventory_image = minetest.inventorycube("portalhome.png"),
  617. drawtype = "liquid",
  618. tiles = {
  619. {
  620. name = "portalhome_animated.png",
  621. animation = {type = "vertical_frames", aspect_w = 16, aspect_h = 16, length = 2.0},
  622. },
  623. },
  624. alpha = 800,
  625. paramtype = "light",
  626. walkable = false,
  627. pointable = false,
  628. diggable = false,
  629. buildable_to = true,
  630. is_ground_content = false,
  631. drop = "",
  632. light_source = 15,
  633. liquid_range= 0,
  634. drowning = 1,
  635. liquid_renewable = false,
  636. liquidtype = "source",
  637. liquid_alternative_flowing = "nssb:portalhome",
  638. liquid_alternative_source = "nssb:portalhome",
  639. liquid_viscosity = 0,
  640. post_effect_color = {a=10, r=1, g=1, b=1},
  641. groups = {liquid=3, puts_out_fire=1},
  642. on_blast = function() end,
  643. })
  644. minetest.register_node("nssb:morlote", {
  645. description = "Morlote",
  646. drawtype = "plantlike",
  647. visual_scale = 1.0,
  648. tiles = {"morlote.png"},
  649. inventory_image = "morlote.png",
  650. wield_image = "morlote.png",
  651. paramtype = "light",
  652. light_source= 14,
  653. sunlight_propagates = true,
  654. walkable = false,
  655. buildable_to = false,
  656. groups = {snappy = 3, attached_node = 1},
  657. sounds = default.node_sound_leaves_defaults(),
  658. selection_box = {
  659. type = "fixed",
  660. fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
  661. },
  662. })
  663. minetest.register_node("nssb:moranga", {
  664. description = "Moranga Ore",
  665. tiles = {"morentir.png^moranga.png"},
  666. groups = {cracky = 1},
  667. drop = 'nssb:moranga_lump',
  668. sounds = default.node_sound_stone_defaults(),
  669. })
  670. minetest.register_node("nssb:life_energy_ore", {
  671. description = "Life Energy Ore",
  672. tiles = {"morentir.png^life_energy_ore.png"},
  673. groups = {cracky = 1},
  674. light_source = 4,
  675. drop = 'nssm:energy_globe',
  676. sounds = default.node_sound_stone_defaults(),
  677. })
  678. minetest.register_craftitem("nssb:moranga_lump", {
  679. description = "Moranga Lump",
  680. image = "moranga_lump.png",
  681. })
  682. minetest.register_craft({
  683. type = "cooking",
  684. output = "nssb:moranga_ingot",
  685. recipe = "nssb:moranga_lump",
  686. cooktime = 160,
  687. })
  688. minetest.register_craftitem("nssb:moranga_ingot", {
  689. description = "Moranga Ingot",
  690. image = "moranga_ingot.png",
  691. })
  692. minetest.register_node("nssb:morvalar_block", {
  693. description = "Morvalar Block",
  694. tiles = {"morvalar_block.png"},
  695. light_source = 13,
  696. })
  697. minetest.register_node("nssb:dis_morvalar_block", {
  698. description = "Disactivated Morvalar Block",
  699. tiles = {"dis_morvalar_block.png"},
  700. on_punch = function(pos, node, puncher)
  701. if puncher:get_wielded_item():get_name() == "nssm:superior_energy_globe" then
  702. minetest.set_node(pos, {name="nssb:morvalar_block"})
  703. end
  704. end,
  705. })
  706. minetest.register_abm({
  707. nodenames = {"nssb:morvalar_block"},
  708. neighbors = {"nssb:indistructible_morentir"},
  709. interval = 1,
  710. chance = 1,
  711. action = function(pos, node)
  712. minetest.remove_node(pos)
  713. minetest.add_entity(pos, "nssm:morvalar")
  714. end
  715. })