From 1386b5a2cf2c18544bb3d983c23cd0d8f0c0f858 Mon Sep 17 00:00:00 2001 From: D00Med Date: Sat, 10 Sep 2016 07:34:06 +1000 Subject: [PATCH] Plant pots >adds plant pots --- nodeboxes.lua | 115 +++++++++++++++++++++++++++++++ textures/scifi_nodes_glass2.png | Bin 0 -> 107 bytes textures/scifi_nodes_pod_inv.png | Bin 0 -> 150 bytes textures/scifi_nodes_pot.png | Bin 0 -> 381 bytes 4 files changed, 115 insertions(+) create mode 100644 textures/scifi_nodes_glass2.png create mode 100644 textures/scifi_nodes_pod_inv.png create mode 100644 textures/scifi_nodes_pot.png diff --git a/nodeboxes.lua b/nodeboxes.lua index 04d4974..2195d54 100644 --- a/nodeboxes.lua +++ b/nodeboxes.lua @@ -3,6 +3,121 @@ -- Node Box Editor, version 0.9.0 -- Namespace: scifi_nodes +minetest.register_node("scifi_nodes:pot_lid", { + description = "plant pot lid(place above plant)", + tiles = { + "scifi_nodes_glass2.png", + "scifi_nodes_glass2.png", + "scifi_nodes_glass2.png", + "scifi_nodes_glass2.png", + "scifi_nodes_glass2.png", + "scifi_nodes_glass2.png" + }, + inventory_image = "scifi_nodes_pod_inv.png", + wield_image = "scifi_nodes_pod_inv.png", + use_texture_alpha = true, + drawtype = "nodebox", + paramtype = "light", + groups = {cracky=1, not_in_creative_inventory=1}, + sunlight_propagates = true, + selection_box = { + type = "fixed", + fixed = {-0.5, -1, -0.5, 0.5, 0.1, 0.5} + }, + collision_box = { + type = "fixed", + fixed = {-0.5, -1.5, -0.5, 0.5, -0.5, 0.5} + }, + node_box = { + type = "fixed", + fixed = { + {-0.1875, -0.5625, -0.1875, 0.1875, -0.5, 0.1875}, -- NodeBox13 + {-0.25, -0.625, -0.25, 0.25, -0.5625, 0.25}, -- NodeBox14 + {-0.3125, -0.6875, -0.3125, 0.3125, -0.625, 0.3125}, -- NodeBox15 + {-0.375, -0.75, -0.375, 0.375, -0.6875, 0.375}, -- NodeBox16 + {-0.4375, -0.75, 0.375, 0.4375, -1.5, 0.4375}, -- NodeBox17 + {-0.4375, -0.75, -0.4375, 0.4375, -1.5, -0.375}, -- NodeBox18 + {0.375, -0.75, -0.4375, 0.4375, -1.5, 0.4375}, -- NodeBox19 + {-0.4375, -0.75, -0.4375, -0.375, -1.5, 0.4375}, -- NodeBox20 + } + }, + sounds = default.node_sound_glass_defaults() +}) + + + +minetest.register_node("scifi_nodes:pot", { + description = "metal plant pot (right click for lid, shift+rightclick to plant)", + tiles = { + "scifi_nodes_pot.png", + "scifi_nodes_greybolts.png", + "scifi_nodes_greybolts.png", + "scifi_nodes_greybolts.png", + "scifi_nodes_greybolts.png", + "scifi_nodes_greybolts.png" + }, + drawtype = "nodebox", + paramtype = "light", + groups = {crumbly=3, soil=1, sand=1, wet=1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.25, -0.5, 0.5, 0.5, 0.5}, -- NodeBox1 + {0.1875, -0.5, 0.1875, 0.5, -0.25, 0.5}, -- NodeBox2 + {-0.5, -0.5, -0.5, -0.1875, -0.25, -0.1875}, -- NodeBox3 + {-0.5, -0.5, 0.1875, -0.1875, -0.25, 0.5}, -- NodeBox4 + {0.1875, -0.5, -0.5, 0.5, -0.25, -0.1875}, -- NodeBox5 + } + }, + on_rightclick = function(pos, node, clicker, item, _) + local node = minetest.get_node({x=pos.x, y=pos.y+2, z=pos.z}) + if node.name == "scifi_nodes:pot_lid" then + minetest.set_node({x=pos.x, y=pos.y+2, z=pos.z}, {name="air", param2=node.param2}) + elseif node.name ~= "scifi_nodes:pot_lid" and node.name == "air" then + minetest.set_node({x=pos.x, y=pos.y+2, z=pos.z}, {name="scifi_nodes:pot_lid", param2=node.param2}) + end + end, + on_destruct = function(pos, node, _) + minetest.remove_node({x=pos.x, y=pos.y+2, z=pos.z}) + end +}) + +minetest.register_node("scifi_nodes:pot2", { + description = "metal wet plant pot(right click for lid, shift+rightclick to plant)", + tiles = { + "scifi_nodes_pot.png^[colorize:black:100", + "scifi_nodes_greybolts.png", + "scifi_nodes_greybolts.png", + "scifi_nodes_greybolts.png", + "scifi_nodes_greybolts.png", + "scifi_nodes_greybolts.png" + }, + drawtype = "nodebox", + paramtype = "light", + groups = {crumbly=3, soil=3, wet=1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.25, -0.5, 0.5, 0.5, 0.5}, -- NodeBox1 + {0.1875, -0.5, 0.1875, 0.5, -0.25, 0.5}, -- NodeBox2 + {-0.5, -0.5, -0.5, -0.1875, -0.25, -0.1875}, -- NodeBox3 + {-0.5, -0.5, 0.1875, -0.1875, -0.25, 0.5}, -- NodeBox4 + {0.1875, -0.5, -0.5, 0.5, -0.25, -0.1875}, -- NodeBox5 + } + }, + on_rightclick = function(pos, node, clicker, item, _) + local node = minetest.get_node({x=pos.x, y=pos.y+2, z=pos.z}) + if node.name == "scifi_nodes:pot_lid" then + minetest.set_node({x=pos.x, y=pos.y+2, z=pos.z}, {name="air", param2=node.param2}) + elseif node.name ~= "scifi_nodes:pot_lid" and node.name == "air" then + minetest.set_node({x=pos.x, y=pos.y+2, z=pos.z}, {name="scifi_nodes:pot_lid", param2=node.param2}) + end + end, + on_destruct = function(pos, node, _) + minetest.remove_node({x=pos.x, y=pos.y+2, z=pos.z}) + end +}) + minetest.register_node("scifi_nodes:lightbar", { description = "ceiling light", tiles = { diff --git a/textures/scifi_nodes_glass2.png b/textures/scifi_nodes_glass2.png new file mode 100644 index 0000000000000000000000000000000000000000..0aa931351e90a2e421f08d06f3c9dd2c18187883 GIT binary patch literal 107 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP*B#> z#WBR77|M%N6vo>@#IvHdgSi!iMjYo``A!#mi40GMGO+bYVp00i_>zopr0FUY! A{{R30 literal 0 HcmV?d00001 diff --git a/textures/scifi_nodes_pod_inv.png b/textures/scifi_nodes_pod_inv.png new file mode 100644 index 0000000000000000000000000000000000000000..f62ab04958adb6a1c1d512579c08c081aa0a09f4 GIT binary patch literal 150 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9GG!XV7ZFl&wkP|(BE z#WBRFveEco#Y~`?44$rjF6*2UngCCHE8_qF literal 0 HcmV?d00001 diff --git a/textures/scifi_nodes_pot.png b/textures/scifi_nodes_pot.png new file mode 100644 index 0000000000000000000000000000000000000000..2d3634e0c974b2d56239cb36f6992639e44cfab5 GIT binary patch literal 381 zcmV-@0fPRCP)uDIBUu-HTT%dv<1L{d78=zIh-PJQ&fCB=4_(dU$<)`OV<4Ehv;kL=lCO02E4c z*cKu8zMq%Sv<~Y!q=>PuqfnBnHZ-lHP!j7pj{D6#fOQ?_>q?f2aH?ejK$Z%mh-q3k z58%9~%oXR0rpy&@AD>7Oqm89$9a$={uA3g>pwYSx?|ZUTgw6m}ZGt@K{WOEBHtg0b z)G`Sj&le4VS|;q)E3~om5~64kG!C>6+k&b#ND&8?vj8HB!e#IK(5=iB)^(gOI!KxX z80c5Eq0AND_akfXcVKc4cIy>ouF%GE+;7mvB1If5y|;1Xf;M(Eq+x)!^;-u<0K;zo b`)~XKXTO}ouf28L00000NkvXXu0mjfSfHT@ literal 0 HcmV?d00001