summaryrefslogtreecommitdiff
path: root/lavalamp/init.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-01 21:00:20 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-01 21:10:04 -0400
commit888b0ebfec8c2eff9015163549a7e47443cb8665 (patch)
tree915080159bfaa6ba6e226087c7ce0e8d5464b518 /lavalamp/init.lua
parentda66780a569712c23ae4f2996cfb4608a9f9d69d (diff)
downloaddreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.tar
dreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.tar.gz
dreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.tar.bz2
dreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.tar.xz
dreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.zip
"explode" all modpacks into their individual components
(you can't have a modpack buried inside a modpack)
Diffstat (limited to 'lavalamp/init.lua')
-rw-r--r--lavalamp/init.lua82
1 files changed, 82 insertions, 0 deletions
diff --git a/lavalamp/init.lua b/lavalamp/init.lua
new file mode 100644
index 0000000..8e0c3d5
--- /dev/null
+++ b/lavalamp/init.lua
@@ -0,0 +1,82 @@
+local lavalamps_list = {
+ { "Red Lava Lamp", "red"},
+ { "Orange Lava Lamp", "orange"},
+ { "Yellow Lava Lamp", "yellow"},
+ { "Green Lava Lamp", "green"},
+ { "Blue Lava Lamp", "blue"},
+ { "Violet Lava Lamp", "violet"},
+}
+
+for i in ipairs(lavalamps_list) do
+ local lavalampdesc = lavalamps_list[i][1]
+ local colour = lavalamps_list[i][2]
+
+ minetest.register_node("lavalamp:"..colour, {
+ description = lavalampdesc,
+ drawtype = "mesh",
+ mesh = "lavalamp.obj",
+ tiles = {
+ "lavalamp_metal.png",
+ {
+ name="lavalamp_lamp_anim_"..colour..".png",
+ animation={
+ type="vertical_frames",
+ aspect_w=40,
+ aspect_h=40,
+ length=6.0,
+ },
+ },
+ },
+ inventory_image = "lavalamp_lamp_"..colour.."_inv.png",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ sunlight_propagates = true,
+ walkable = false,
+ light_source = 14,
+ selection_box = {
+ type = "fixed",
+ fixed = { -0.25, -0.5, -0.25, 0.25,0.5, 0.25 },
+ },
+ groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
+ sounds = default.node_sound_glass_defaults(),
+ on_rightclick = function(pos, node, clicker)
+ node.name = "lavalamp:"..colour.."_off"
+ minetest.set_node(pos, node)
+ end,
+ })
+
+ minetest.register_node("lavalamp:"..colour.."_off", {
+ description = lavalampdesc.." off",
+ drawtype = "mesh",
+ mesh = "lavalamp.obj",
+ tiles = {
+ "lavalamp_metal.png",
+ "lavalamp_lamp_off.png",
+ },
+ paramtype = "light",
+ paramtype2 = "facedir",
+ sunlight_propagates = true,
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = { -0.25, -0.5, -0.25, 0.25,0.5, 0.25 },
+ },
+ groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3, not_in_creative_inventory=1},
+ sounds = default.node_sound_glass_defaults(),
+ drop = "lavalamp:"..colour,
+ on_rightclick = function(pos, node, clicker)
+ node.name = "lavalamp:"..colour
+ minetest.set_node(pos, node)
+ end,
+ })
+
+ minetest.register_craft({
+ output = "lavalamp:"..colour,
+ recipe = {
+ {"", "wool:"..colour, "", },
+ {"", "bucket:bucket_water", "", },
+ {"", "wool:black", "", }
+ }
+ })
+
+end