Minetest mod that adds scifi themed nodes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

638 lines
18 KiB

  1. --nodes
  2. minetest.register_node("scifi_nodes:grassblk", {
  3. description = "Dirt With Alien Grass",
  4. tiles = {"default_grass.png^[colorize:cyan:80", "default_dirt.png",
  5. {name = "default_dirt.png^(default_grass_side.png^[colorize:cyan:80)",
  6. tileable_vertical = false}},
  7. light_source = 2,
  8. groups = {crumbly=1, oddly_breakable_by_hand=1, soil=1}
  9. })
  10. minetest.register_node("scifi_nodes:light", {
  11. description = "blue lightbox",
  12. sunlight_propagates = false,
  13. tiles = {
  14. "scifi_nodes_lighttop.png",
  15. "scifi_nodes_lighttop.png",
  16. "scifi_nodes_light.png",
  17. "scifi_nodes_light.png",
  18. "scifi_nodes_light.png",
  19. "scifi_nodes_light.png"
  20. },
  21. light_source = 10,
  22. paramtype = "light",
  23. groups = {cracky=1}
  24. })
  25. minetest.register_node("scifi_nodes:rfloor", {
  26. description = "rusty floor",
  27. tiles = {
  28. "scifi_nodes_rustfloor.png",
  29. },
  30. paramtype = "light",
  31. paramtype2 = "facedir",
  32. light_source = 10,
  33. groups = {cracky=1},
  34. sounds = default.node_sound_metal_defaults()
  35. })
  36. minetest.register_node("scifi_nodes:bfloor", {
  37. description = "blue floor",
  38. tiles = {
  39. "scifi_nodes_bluefloor.png",
  40. },
  41. paramtype = "light",
  42. paramtype2 = "facedir",
  43. light_source = 10,
  44. groups = {cracky=1},
  45. sounds = default.node_sound_metal_defaults()
  46. })
  47. minetest.register_node("scifi_nodes:stripes2", {
  48. description = "hazard stripes2",
  49. sunlight_propagates = false,
  50. tiles = {
  51. "scifi_nodes_stripes2top.png",
  52. "scifi_nodes_stripes2top.png",
  53. "scifi_nodes_stripes2.png",
  54. "scifi_nodes_stripes2.png",
  55. "scifi_nodes_stripes2.png",
  56. "scifi_nodes_stripes2.png"
  57. },
  58. paramtype = "light",
  59. groups = {cracky=1},
  60. sounds = default.node_sound_metal_defaults()
  61. })
  62. minetest.register_node("scifi_nodes:gblock", {
  63. description = "Green metal block",
  64. sunlight_propagates = false,
  65. tiles = {
  66. "scifi_nodes_gblock.png",
  67. "scifi_nodes_gblock.png",
  68. "scifi_nodes_gblock.png",
  69. "scifi_nodes_gblock.png",
  70. "scifi_nodes_gblock.png",
  71. "scifi_nodes_gblock.png"
  72. },
  73. paramtype = "light",
  74. groups = {cracky=1};
  75. sounds = default.node_sound_metal_defaults()
  76. })
  77. minetest.register_node("scifi_nodes:gblock2", {
  78. description = "Green metal block 2",
  79. sunlight_propagates = false,
  80. tiles = {
  81. "scifi_nodes_gblock2_top.png",
  82. "scifi_nodes_gblock.png",
  83. "scifi_nodes_gblock2.png",
  84. "scifi_nodes_gblock2_fx.png",
  85. "scifi_nodes_gblock.png",
  86. "scifi_nodes_gblock2_front1.png"
  87. },
  88. paramtype = "light",
  89. paramtype2 = "facedir",
  90. groups = {cracky=1},
  91. sounds = default.node_sound_metal_defaults()
  92. })
  93. minetest.register_node("scifi_nodes:gblock3", {
  94. description = "Green metal block 3",
  95. sunlight_propagates = false,
  96. tiles = {
  97. "scifi_nodes_gblock2_top.png",
  98. "scifi_nodes_gblock.png",
  99. "scifi_nodes_gblock2.png",
  100. "scifi_nodes_gblock2_fx.png",
  101. "scifi_nodes_gblock.png",
  102. "scifi_nodes_gblock2_screen.png"
  103. },
  104. paramtype = "light",
  105. paramtype2 = "facedir",
  106. groups = {cracky=1},
  107. sounds = default.node_sound_metal_defaults()
  108. })
  109. minetest.register_node("scifi_nodes:green_light", {
  110. description = "green lightbox",
  111. sunlight_propagates = false,
  112. tiles = {
  113. "scifi_nodes_lighttop.png",
  114. "scifi_nodes_lighttop.png",
  115. "scifi_nodes_greenlight.png",
  116. "scifi_nodes_greenlight.png",
  117. "scifi_nodes_greenlight.png",
  118. "scifi_nodes_greenlight.png"
  119. },
  120. light_source = 10,
  121. paramtype = "light",
  122. groups = {cracky=1},
  123. sounds = default.node_sound_glass_defaults()
  124. })
  125. minetest.register_node("scifi_nodes:red_light", {
  126. description = "red lightbox",
  127. sunlight_propagates = false,
  128. tiles = {
  129. "scifi_nodes_lighttop.png",
  130. "scifi_nodes_lighttop.png",
  131. "scifi_nodes_redlight.png",
  132. "scifi_nodes_redlight.png",
  133. "scifi_nodes_redlight.png",
  134. "scifi_nodes_redlight.png"
  135. },
  136. light_source = 10,
  137. paramtype = "light",
  138. groups = {cracky=1},
  139. sounds = default.node_sound_glass_defaults()
  140. })
  141. minetest.register_node("scifi_nodes:discs", {
  142. description = "disc shelves",
  143. sunlight_propagates = false,
  144. tiles = {
  145. "scifi_nodes_box_top.png",
  146. "scifi_nodes_box_top.png",
  147. "scifi_nodes_discs.png",
  148. "scifi_nodes_discs.png",
  149. "scifi_nodes_discs.png",
  150. "scifi_nodes_discs.png"
  151. },
  152. paramtype = "light",
  153. groups = {cracky=1},
  154. sounds = default.node_sound_glass_defaults()
  155. })
  156. minetest.register_node("scifi_nodes:disc", {
  157. description = "disc",
  158. drawtype = "torchlike",
  159. sunlight_propagates = false,
  160. tiles = {
  161. "scifi_nodes_disc.png"
  162. },
  163. inventory_image = "scifi_nodes_disc.png",
  164. wield_image = "scifi_nodes_disc.png",
  165. paramtype = "light",
  166. groups = {cracky=1}
  167. })
  168. minetest.register_node("scifi_nodes:blink", {
  169. description = "blinking light",
  170. sunlight_propagates = false,
  171. tiles = {{
  172. name="scifi_nodes_lightbox.png",
  173. animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.00},
  174. }},
  175. paramtype = "light",
  176. groups = {cracky=1},
  177. light_source = 5,
  178. sounds = default.node_sound_glass_defaults()
  179. })
  180. minetest.register_node("scifi_nodes:black_lights", {
  181. description = "black wallpanel",
  182. sunlight_propagates = false,
  183. tiles = {{
  184. name="scifi_nodes_black_lights.png",
  185. animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.50},
  186. }},
  187. paramtype = "light",
  188. groups = {cracky=1},
  189. sounds = default.node_sound_glass_defaults()
  190. })
  191. minetest.register_node("scifi_nodes:black_screen", {
  192. description = "black wall screen",
  193. sunlight_propagates = false,
  194. tiles = {{
  195. name="scifi_nodes_black_screen.png",
  196. animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.00},
  197. }},
  198. paramtype = "light",
  199. groups = {cracky=1},
  200. light_source = 1,
  201. sounds = default.node_sound_stone_defaults()
  202. })
  203. minetest.register_node("scifi_nodes:screen", {
  204. description = "electronic screen",
  205. sunlight_propagates = false,
  206. tiles = {{
  207. name="scifi_nodes_screen.png",
  208. animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.50},
  209. }},
  210. paramtype = "light",
  211. groups = {cracky=1},
  212. light_source = 5,
  213. sounds = default.node_sound_glass_defaults()
  214. })
  215. minetest.register_node("scifi_nodes:screen2", {
  216. description = "electronic screen 2",
  217. sunlight_propagates = false,
  218. tiles = {{
  219. name="scifi_nodes_screen2.png",
  220. animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.50},
  221. }},
  222. paramtype = "light",
  223. groups = {cracky=1},
  224. light_source = 5,
  225. sounds = default.node_sound_glass_defaults()
  226. })
  227. minetest.register_node("scifi_nodes:white_pad", {
  228. description = "white keypad",
  229. sunlight_propagates = false,
  230. tiles = {
  231. "scifi_nodes_white2.png",
  232. "scifi_nodes_white2.png",
  233. "scifi_nodes_white2.png",
  234. "scifi_nodes_white2.png",
  235. "scifi_nodes_white2.png",
  236. "scifi_nodes_white_pad.png"
  237. },
  238. paramtype = "light",
  239. paramtype2 = "facedir",
  240. groups = {cracky=1},
  241. sounds = default.node_sound_glass_defaults()
  242. })
  243. minetest.register_node("scifi_nodes:white_base", {
  244. description = "white wall base",
  245. sunlight_propagates = false,
  246. tiles = {
  247. "scifi_nodes_white2.png",
  248. "scifi_nodes_white2.png",
  249. "scifi_nodes_white_side.png",
  250. "scifi_nodes_white_side.png",
  251. "scifi_nodes_white_side.png",
  252. "scifi_nodes_white_side.png"
  253. },
  254. paramtype = "light",
  255. paramtype2 = "facedir",
  256. groups = {cracky=1},
  257. sounds = default.node_sound_glass_defaults()
  258. })
  259. minetest.register_node("scifi_nodes:grnpipe", {
  260. description = "green pipe",
  261. sunlight_propagates = false,
  262. tiles = {
  263. "scifi_nodes_greenpipe_front.png",
  264. "scifi_nodes_greenpipe_front.png",
  265. "scifi_nodes_greenpipe_top.png",
  266. "scifi_nodes_greenpipe_top.png",
  267. "scifi_nodes_greenpipe_top.png",
  268. "scifi_nodes_greenpipe_top.png"
  269. },
  270. paramtype = "light",
  271. paramtype2 = "facedir",
  272. groups = {cracky=1},
  273. sounds = default.node_sound_metal_defaults(),
  274. on_place = minetest.rotate_node
  275. })
  276. minetest.register_node("scifi_nodes:grnpipe2", {
  277. description = "broken green pipe",
  278. sunlight_propagates = false,
  279. tiles = {
  280. "scifi_nodes_greenpipe_front.png",
  281. "scifi_nodes_greenpipe_front.png",
  282. "scifi_nodes_greenpipe2_top.png",
  283. "scifi_nodes_greenpipe2_top.png",
  284. "scifi_nodes_greenpipe2_top.png",
  285. "scifi_nodes_greenpipe2_top.png"
  286. },
  287. paramtype = "light",
  288. paramtype2 = "facedir",
  289. groups = {cracky=1},
  290. sounds = default.node_sound_metal_defaults(),
  291. on_place = minetest.rotate_node
  292. })
  293. minetest.register_node("scifi_nodes:octrng", {
  294. description = "Orange Octagon Glass",
  295. sunlight_propagates = false,
  296. drawtype = "glasslike",
  297. tiles = {
  298. "scifi_nodes_octrng.png",
  299. },
  300. paramtype = "light",
  301. paramtype2 = "facedir",
  302. use_texture_alpha = true,
  303. light_source = 10,
  304. groups = {cracky=2},
  305. sounds = default.node_sound_glass_defaults(),
  306. })
  307. minetest.register_node("scifi_nodes:octgrn", {
  308. description = "Green Octagon Glass",
  309. sunlight_propagates = false,
  310. drawtype = "glasslike",
  311. tiles = {
  312. "scifi_nodes_octgrn.png",
  313. },
  314. paramtype = "light",
  315. paramtype2 = "facedir",
  316. use_texture_alpha = true,
  317. light_source = 10,
  318. groups = {cracky=2},
  319. sounds = default.node_sound_glass_defaults(),
  320. })
  321. minetest.register_node("scifi_nodes:octbl", {
  322. description = "Blue Octagon Glass",
  323. sunlight_propagates = false,
  324. drawtype = "glasslike",
  325. tiles = {
  326. "scifi_nodes_octbl.png",
  327. },
  328. paramtype = "light",
  329. paramtype2 = "facedir",
  330. use_texture_alpha = true,
  331. light_source = 10,
  332. groups = {cracky=2},
  333. sounds = default.node_sound_glass_defaults(),
  334. })
  335. minetest.register_node("scifi_nodes:octppl", {
  336. description = "Purple Octagon Glass",
  337. sunlight_propagates = false,
  338. drawtype = "glasslike",
  339. tiles = {
  340. "scifi_nodes_octppl.png",
  341. },
  342. paramtype = "light",
  343. paramtype2 = "facedir",
  344. use_texture_alpha = true,
  345. light_source = 10,
  346. groups = {cracky=2},
  347. sounds = default.node_sound_glass_defaults(),
  348. })
  349. minetest.register_node("scifi_nodes:tower", {
  350. description = "Wind tower",
  351. sunlight_propagates = false,
  352. drawtype = "plantlike",
  353. tiles = {{
  354. name = "scifi_nodes_tower_anim.png",
  355. animation = {type = "vertical_frames", aspect_w = 32, aspect_h = 32, length = 1.00},
  356. }},
  357. visual_scale = 2,
  358. inventory_image = "scifi_nodes_tower.png",
  359. paramtype = "light",
  360. groups = {cracky=2},
  361. sounds = default.node_sound_metal_defaults()
  362. })
  363. minetest.register_node("scifi_nodes:junk", {
  364. description = "Junk",
  365. sunlight_propagates = true,
  366. paramtype = "light",
  367. liquid_viscosity = 8,
  368. liquidtype = "source",
  369. liquid_alternative_flowing = "scifi_nodes:junk",
  370. liquid_alternative_source = "scifi_nodes:junk",
  371. liquid_renewable = false,
  372. liquid_range = 0,
  373. walkable = false,
  374. tiles = {
  375. "scifi_nodes_junk.png"
  376. },
  377. groups = {snappy=1, oddly_breakable_by_hand=1, liquid=3, dig_immediate=1}
  378. })
  379. minetest.register_node("scifi_nodes:blumetlight", {
  380. description = "blue metal light",
  381. sunlight_propagates = false,
  382. tiles = {
  383. "scifi_nodes_bluemetal.png",
  384. "scifi_nodes_bluemetal.png",
  385. "scifi_nodes_blue_metal_light.png",
  386. "scifi_nodes_blue_metal_light.png",
  387. "scifi_nodes_blue_metal_light.png",
  388. "scifi_nodes_blue_metal_light.png"
  389. },
  390. light_source = 10,
  391. paramtype = "light",
  392. groups = {cracky=1},
  393. sounds = default.node_sound_glass_defaults()
  394. })
  395. minetest.register_node("scifi_nodes:lightstp", {
  396. description = "twin lights",
  397. sunlight_propagates = false,
  398. tiles = {
  399. "scifi_nodes_lightstripe.png"
  400. },
  401. light_source = default.LIGHT_MAX,
  402. paramtype = "light",
  403. groups = {cracky=1},
  404. sounds = default.node_sound_glass_defaults()
  405. })
  406. minetest.register_node("scifi_nodes:blklt2", {
  407. description = "black stripe light",
  408. sunlight_propagates = false,
  409. tiles = {
  410. "scifi_nodes_black_light2.png"
  411. },
  412. light_source = 10,
  413. paramtype = "light",
  414. groups = {cracky=1},
  415. sounds = default.node_sound_glass_defaults()
  416. })
  417. minetest.register_node("scifi_nodes:blumetstr", {
  418. description = "blue stripe light",
  419. sunlight_propagates = false,
  420. tiles = {
  421. "scifi_nodes_blue_metal_stripes2.png"
  422. },
  423. light_source = 10,
  424. paramtype = "light",
  425. groups = {cracky=1},
  426. sounds = default.node_sound_glass_defaults()
  427. })
  428. minetest.register_node("scifi_nodes:glass", {
  429. description = "dark glass",
  430. drawtype = "glasslike",
  431. sunlight_propagates = true,
  432. tiles = {
  433. "scifi_nodes_glass.png"
  434. },
  435. use_texture_alpha = true,
  436. paramtype = "light",
  437. groups = {cracky=1},
  438. sounds = default.node_sound_glass_defaults()
  439. })
  440. minetest.register_node("scifi_nodes:whtlightbnd", {
  441. description = "white light stripe",
  442. sunlight_propagates = false,
  443. tiles = {
  444. "scifi_nodes_lightband.png"
  445. },
  446. light_source = 10,
  447. paramtype = "light",
  448. groups = {cracky=1},
  449. sounds = default.node_sound_glass_defaults()
  450. })
  451. --edited wool code (Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com>)
  452. -- This uses a trick: you can first define the recipes using all of the base
  453. -- colors, and then some recipes using more specific colors for a few non-base
  454. -- colors available. When crafting, the last recipes will be checked first.
  455. --add new block using texture name(without "scifi_nodes_" prefix) then the description, and then the name of the block
  456. local nodetypes = {
  457. -- { name, description, shortname?, light, colorable }
  458. {"blue", "blue lines", "blue"},
  459. {"holes", "metal with holes","holes"},
  460. {"white2", "plastic", "white2", 0, true},
  461. {"super_white", "Super Plastic", "super_white", 11},
  462. {"ultra_white", "Ultra Plastic", "ultra_white", default.LIGHT_MAX},
  463. {"engine", "engine", "engine"},
  464. {"wall", "metal wall", "wall"},
  465. {"white", "plastic wall", "white", 0, true},
  466. {"stripes2top", "dirty metal block","metal2"},
  467. {"rough", "rough metal", "rough"},
  468. {"lighttop", "metal block", "metal"},
  469. {"red", "red lines", "red"},
  470. {"green", "green lines", "green"},
  471. {"vent2", "vent", "vent"},
  472. {"stripes", "hazard stripes", "stripes"},
  473. {"rust", "rusty metal", "rust"},
  474. {"mesh", "metal mesh", "mesh"},
  475. {"black", "black wall", "black"},
  476. {"blackoct", "black octagon", "blackoct"},
  477. {"blackpipe", "black pipe", "blackpipe"},
  478. {"blacktile", "black tile", "blktl"},
  479. {"blacktile2", "black tile 2", "blktl2"},
  480. {"blackvent", "black vent", "blkvnt"},
  481. {"bluebars", "blue bars", "bluebars"},
  482. {"bluemetal", "blue metal", "blumtl"},
  483. {"bluetile", "blue tile", "blutl"},
  484. {"greytile", "grey tile", "grytl"},
  485. {"mesh2", "metal floormesh", "mesh2"},
  486. {"pipe", "wall pipe", "pipe2"},
  487. {"pipeside", "side pipe", "pipe3"},
  488. {"tile", "white tile", "tile"},
  489. {"whiteoct", "white octagon", "whiteoct", 0, true},
  490. {"whitetile", "white tile2", "whttl", 0, true},
  491. {"black_detail", "black detail", "blckdtl"},
  492. {"green_square", "green metal block", "grnblck"},
  493. {"red_square", "red metal block", "redblck"},
  494. {"grey_square", "grey metal block", "greyblck"},
  495. {"blue_square", "blue metal block", "blublck"},
  496. {"black_mesh", "black vent block", "blckmsh"},
  497. {"dent", "dented metal block", "dent"},
  498. {"greenmetal", "green metal wall", "grnmetl"},
  499. {"greenmetal2", "green metal wall2", "grnmetl2"},
  500. {"greenlights", "green wall lights", "grnlt", 10},
  501. {"greenlights2", "green wall lights2", "grnlt2", 10},
  502. {"greenbar", "green light bar", "grnlghtbr", 10},
  503. {"green2", "green wall panel", "grn2"},
  504. {"greentubes", "green pipes", "grntubes"},
  505. {"grey", "grey wall", "gry"},
  506. {"greybolts", "grey wall bolts", "gryblts"},
  507. {"greybars", "grey bars", "grybrs"},
  508. {"greydots", "grey wall dots", "grydts"},
  509. {"greygreenbar", "gray power pipe", "grygrnbr", 10},
  510. {"octofloor", "Doom floor", "octofloor"},
  511. {"octofloor2", "Brown Doom floor", "octofloor2"},
  512. {"doomwall1", "Doom wall 1", "doomwall1"},
  513. {"doomwall2", "Doom wall 2", "doomwall2"},
  514. {"doomwall3", "Doom wall 3", "doomwall3"},
  515. {"doomwall4", "Doom wall 4", "doomwall4"},
  516. {"doomwall41", "Doom wall 4.1", "doomwall4.1"},
  517. {"doomwall42", "Doom wall 4.2", "doomwall4.2"},
  518. {"doomwall43", "Doom wall 4.3", "doomwall4.3"},
  519. {"doomwall431", "Doom wall 4.3.1", "doomwall4.3.1"},
  520. {"doomwall44", "Doom wall 4.4", "doomwall4.4"},
  521. {"blackdmg", "Damaged black wall", "blckdmg"},
  522. {"blackdmgstripe", "Damaged black wall(stripes)", "blckdmgstripe"},
  523. {"doomengine", "Doom engine wall", "doomengine"},
  524. {"monitorwall", "Wall monitors", "monitorwall"},
  525. {"screen3", "Wall monitor", "screen3"},
  526. {"doomlight", "Doom light", "doomlight", 12},
  527. {"bluwllight", "Blue wall light", "capsule3", default.LIGHT_MAX},
  528. {"bluegrid", "Blue Grid", "bluegrid", 5},
  529. {"fan", "Fan", "fan"},
  530. {"ppllght", "Purple wall light", "", default.LIGHT_MAX},
  531. {"pplwll", "Purple wall", "", 0},
  532. {"pplwll2", "Purple wall2", "", 0},
  533. {"pplwll3", "Purple wall3", "", 0},
  534. {"pplwll4", "Purple wall4", "", 0},
  535. {"pplblk", "Purple tile", "", 0},
  536. {"purple", "Purple node", "", 0},
  537. {"rock", "Moonstone", "", 0},
  538. {"rock2", "Moonstone2", "", 0},
  539. {"blackvnt", "Black vent", "", 0},
  540. {"blackplate", "Black plate", "", 0},
  541. }
  542. local has_unifieddyes_mod = minetest.get_modpath("unifieddyes")
  543. for _, row in ipairs(nodetypes) do
  544. local name = row[1]
  545. local desc = row[2]
  546. local light = row[4]
  547. local is_colorable = row[5]
  548. -- Node Definition
  549. local node_def = {
  550. description = desc,
  551. tiles = {"scifi_nodes_"..name..".png"},
  552. groups = {cracky=1},
  553. paramtype = "light",
  554. paramtype2 = "facedir",
  555. light_source = light,
  556. sounds = default.node_sound_glass_defaults()
  557. }
  558. if is_colorable and has_unifieddyes_mod then
  559. -- overwrite attributes on the "uncolored" node
  560. node_def.palette = "unifieddyes_palette_extended.png"
  561. node_def.groups.ud_param2_colorable = 1
  562. node_def.airbrush_replacement_node = "scifi_nodes:"..name.."_colored"
  563. end
  564. -- register node
  565. minetest.register_node("scifi_nodes:"..name, node_def)
  566. if is_colorable and has_unifieddyes_mod then
  567. -- register colored node
  568. minetest.register_node("scifi_nodes:"..name.."_colored", {
  569. description = desc,
  570. tiles = {"scifi_nodes_"..name..".png"},
  571. groups = {
  572. cracky = 1,
  573. ud_param2_colorable = 1,
  574. not_in_creative_inventory = 1
  575. },
  576. palette = "unifieddyes_palette_extended.png",
  577. paramtype = "light",
  578. paramtype2 = "color",
  579. light_source = light,
  580. sounds = default.node_sound_glass_defaults(),
  581. on_construct = unifieddyes.on_construct,
  582. on_dig = unifieddyes.on_dig
  583. })
  584. end
  585. end