summaryrefslogtreecommitdiff
path: root/mesecons_lamp
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2012-03-05 19:21:26 +0100
committerJeija <norrepli@gmail.com>2012-03-05 19:21:26 +0100
commit36ae0cc1a54538742f1d1f3709bb2c1840a33539 (patch)
tree2865e2f7240108c0b82e45ef7c2f8e4a833929ba /mesecons_lamp
parentf8ac52c35073875e2ba1872532577c27f9677c3d (diff)
downloadmesecons-36ae0cc1a54538742f1d1f3709bb2c1840a33539.tar
mesecons-36ae0cc1a54538742f1d1f3709bb2c1840a33539.tar.gz
mesecons-36ae0cc1a54538742f1d1f3709bb2c1840a33539.tar.bz2
mesecons-36ae0cc1a54538742f1d1f3709bb2c1840a33539.tar.xz
mesecons-36ae0cc1a54538742f1d1f3709bb2c1840a33539.zip
Upload after major code reorganization - Version 0.6 DEV - Split mesecons mod into several modules - [BUGGY?]
Diffstat (limited to 'mesecons_lamp')
-rw-r--r--mesecons_lamp/depends.txt1
-rw-r--r--mesecons_lamp/init.lua46
2 files changed, 47 insertions, 0 deletions
diff --git a/mesecons_lamp/depends.txt b/mesecons_lamp/depends.txt
new file mode 100644
index 0000000..acaa924
--- /dev/null
+++ b/mesecons_lamp/depends.txt
@@ -0,0 +1 @@
+mesecons
diff --git a/mesecons_lamp/init.lua b/mesecons_lamp/init.lua
new file mode 100644
index 0000000..1ff51bf
--- /dev/null
+++ b/mesecons_lamp/init.lua
@@ -0,0 +1,46 @@
+-- MESELAMPS
+minetest.register_node("mesecons_lamp:lamp_on", {
+ drawtype = "torchlike",
+ tile_images = {"jeija_meselamp_on_ceiling_on.png", "jeija_meselamp_on_floor_on.png", "jeija_meselamp_on.png"},
+ inventory_image = "jeija_meselamp_on_floor_on.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ legacy_wallmounted = true,
+ paramtype2 = "wallmounted",
+ light_source = LIGHT_MAX,
+ selection_box = {
+ --type = "wallmounted",
+ --type = "fixed",
+ fixed = {-0.38, -0.5, -0.1, 0.38, -0.2, 0.1},
+ },
+ material = minetest.digprop_constanttime(0.1),
+ drop='"mesecons_lamp:lamp_off" 1',
+ description="Meselamp",
+})
+
+minetest.register_node("mesecons_lamp:lamp_off", {
+ drawtype = "torchlike",
+ tile_images = {"jeija_meselamp_on_ceiling_off.png", "jeija_meselamp_on_floor_off.png", "jeija_meselamp_off.png"},
+ inventory_image = "jeija_meselamp_on_floor_off.png",
+ wield_image = "jeija_meselamp_on_ceiling_off.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ wall_mounted = false,
+ selection_box = {
+ --type = "fixed",
+ fixed = {-0.38, -0.5, -0.1, 0.38, -0.2, 0.1},
+ },
+ material = minetest.digprop_constanttime(0.1),
+ description="Meselamp",
+})
+
+minetest.register_craft({
+ output = '"mesecons_lamp:lamp_off" 1',
+ recipe = {
+ {'', '"default:glass"', ''},
+ {'"mesecons:mesecon_off"', '"default:steel_ingot"', '"mesecons:mesecon_off"'},
+ {'', '"default:glass"', ''},
+ }
+})