summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <norrepli@googlemail.com>2012-08-01 11:46:59 -0700
committerJeija <norrepli@googlemail.com>2012-08-01 11:46:59 -0700
commit80b2da6c85a05ad23f5e3a07f1c664c6609a9ceb (patch)
tree4ae27ea425d4b88db70a62f727522141803e0ff5
parent150da24db6947306ae09340bb80249f922a84af8 (diff)
parent9f493e8cb723137b7f42c501ba640d128d208fe4 (diff)
downloadmesecons-80b2da6c85a05ad23f5e3a07f1c664c6609a9ceb.tar
mesecons-80b2da6c85a05ad23f5e3a07f1c664c6609a9ceb.tar.gz
mesecons-80b2da6c85a05ad23f5e3a07f1c664c6609a9ceb.tar.bz2
mesecons-80b2da6c85a05ad23f5e3a07f1c664c6609a9ceb.tar.xz
mesecons-80b2da6c85a05ad23f5e3a07f1c664c6609a9ceb.zip
Merge pull request #7 from Kotolegokot/master
Torch selection box and lamp node box
-rw-r--r--mesecons_lamp/init.lua48
-rw-r--r--mesecons_textures/textures/jeija_meselamp.pngbin0 -> 260 bytes
-rw-r--r--mesecons_textures/textures/jeija_meselamp_off.pngbin209 -> 253 bytes
-rw-r--r--mesecons_textures/textures/jeija_meselamp_on.pngbin200 -> 307 bytes
-rw-r--r--mesecons_textures/textures/jeija_meselamp_on_ceiling_off.pngbin196 -> 0 bytes
-rw-r--r--mesecons_textures/textures/jeija_meselamp_on_ceiling_on.pngbin205 -> 0 bytes
-rw-r--r--mesecons_textures/textures/jeija_meselamp_on_floor_off.pngbin194 -> 0 bytes
-rw-r--r--mesecons_textures/textures/jeija_meselamp_on_floor_on.pngbin208 -> 0 bytes
-rw-r--r--mesecons_textures/textures/jeija_torches_off.pngbin214 -> 219 bytes
-rw-r--r--mesecons_textures/textures/jeija_torches_off_ceiling.pngbin216 -> 220 bytes
-rw-r--r--mesecons_textures/textures/jeija_torches_off_side.pngbin202 -> 206 bytes
-rw-r--r--mesecons_textures/textures/jeija_torches_on.pngbin207 -> 210 bytes
-rw-r--r--mesecons_textures/textures/jeija_torches_on_ceiling.pngbin217 -> 220 bytes
-rw-r--r--mesecons_textures/textures/jeija_torches_on_side.pngbin193 -> 197 bytes
-rw-r--r--mesecons_torch/init.lua16
15 files changed, 45 insertions, 19 deletions
diff --git a/mesecons_lamp/init.lua b/mesecons_lamp/init.lua
index fcceeed..1ece13a 100644
--- a/mesecons_lamp/init.lua
+++ b/mesecons_lamp/init.lua
@@ -1,35 +1,49 @@
-- 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",
+ drawtype = "nodebox",
+ tile_images = {"jeija_meselamp_on.png"},
paramtype = "light",
+ paramtype2 = "wallmounted",
+ legacy_wallmounted = true,
sunlight_propagates = true,
walkable = false,
- legacy_wallmounted = true,
- paramtype2 = "wallmounted",
light_source = LIGHT_MAX,
+ node_box = {
+ type = "wallmounted",
+ wall_top = {-0.3125,0.375,-0.3125,0.3125,0.5,0.3125},
+ wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125},
+ wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125},
+ },
selection_box = {
- --type = "wallmounted",
- --type = "fixed",
- fixed = {-0.38, -0.5, -0.1, 0.38, -0.2, 0.1},
+ type = "wallmounted",
+ wall_top = {-0.3125,0.375,-0.3125,0.3125,0.5,0.3125},
+ wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125},
+ wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125},
},
groups = {dig_immediate=3,not_in_creative_inventory=1},
drop='"mesecons_lamp:lamp_off" 1',
})
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",
+ drawtype = "nodebox",
+ tile_images = {"jeija_meselamp_off.png"},
+ inventory_image = "jeija_meselamp.png",
+ wield_image = "jeija_meselamp.png",
paramtype = "light",
+ paramtype2 = "wallmounted",
sunlight_propagates = true,
walkable = false,
- wall_mounted = false,
+ node_box = {
+ type = "wallmounted",
+ wall_top = {-0.3125,0.375,-0.3125,0.3125,0.5,0.3125},
+ wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125},
+ wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125},
+ },
selection_box = {
- --type = "fixed",
- fixed = {-0.38, -0.5, -0.1, 0.38, -0.2, 0.1},
+ type = "wallmounted",
+ wall_top = {-0.3125,0.375,-0.3125,0.3125,0.5,0.3125},
+ wall_bottom = {-0.3125,-0.5,-0.3125,0.3125,-0.375,0.3125},
+ wall_side = {-0.375,-0.3125,-0.3125,-0.5,0.3125,0.3125},
},
groups = {dig_immediate=3},
description="Meselamp",
@@ -46,14 +60,14 @@ minetest.register_craft({
mesecon:register_on_signal_on(function(pos, node)
if node.name == "mesecons_lamp:lamp_off" then
- minetest.env:add_node(pos, {name="mesecons_lamp:lamp_on"})
+ minetest.env:add_node(pos, {name="mesecons_lamp:lamp_on", param2 = node.param2})
nodeupdate(pos)
end
end)
mesecon:register_on_signal_off(function(pos, node)
if node.name == "mesecons_lamp:lamp_on" then
- minetest.env:add_node(pos, {name="mesecons_lamp:lamp_off"})
+ minetest.env:add_node(pos, {name="mesecons_lamp:lamp_off", param2 = node.param2})
nodeupdate(pos)
end
end) \ No newline at end of file
diff --git a/mesecons_textures/textures/jeija_meselamp.png b/mesecons_textures/textures/jeija_meselamp.png
new file mode 100644
index 0000000..5456ee9
--- /dev/null
+++ b/mesecons_textures/textures/jeija_meselamp.png
Binary files differ
diff --git a/mesecons_textures/textures/jeija_meselamp_off.png b/mesecons_textures/textures/jeija_meselamp_off.png
index f3f313e..67bd7fd 100644
--- a/mesecons_textures/textures/jeija_meselamp_off.png
+++ b/mesecons_textures/textures/jeija_meselamp_off.png
Binary files differ
diff --git a/mesecons_textures/textures/jeija_meselamp_on.png b/mesecons_textures/textures/jeija_meselamp_on.png
index 45cb35c..2316e00 100644
--- a/mesecons_textures/textures/jeija_meselamp_on.png
+++ b/mesecons_textures/textures/jeija_meselamp_on.png
Binary files differ
diff --git a/mesecons_textures/textures/jeija_meselamp_on_ceiling_off.png b/mesecons_textures/textures/jeija_meselamp_on_ceiling_off.png
deleted file mode 100644
index bf46297..0000000
--- a/mesecons_textures/textures/jeija_meselamp_on_ceiling_off.png
+++ /dev/null
Binary files differ
diff --git a/mesecons_textures/textures/jeija_meselamp_on_ceiling_on.png b/mesecons_textures/textures/jeija_meselamp_on_ceiling_on.png
deleted file mode 100644
index 3b7c64f..0000000
--- a/mesecons_textures/textures/jeija_meselamp_on_ceiling_on.png
+++ /dev/null
Binary files differ
diff --git a/mesecons_textures/textures/jeija_meselamp_on_floor_off.png b/mesecons_textures/textures/jeija_meselamp_on_floor_off.png
deleted file mode 100644
index d6c7943..0000000
--- a/mesecons_textures/textures/jeija_meselamp_on_floor_off.png
+++ /dev/null
Binary files differ
diff --git a/mesecons_textures/textures/jeija_meselamp_on_floor_on.png b/mesecons_textures/textures/jeija_meselamp_on_floor_on.png
deleted file mode 100644
index deae3db..0000000
--- a/mesecons_textures/textures/jeija_meselamp_on_floor_on.png
+++ /dev/null
Binary files differ
diff --git a/mesecons_textures/textures/jeija_torches_off.png b/mesecons_textures/textures/jeija_torches_off.png
index fe01bfb..537920c 100644
--- a/mesecons_textures/textures/jeija_torches_off.png
+++ b/mesecons_textures/textures/jeija_torches_off.png
Binary files differ
diff --git a/mesecons_textures/textures/jeija_torches_off_ceiling.png b/mesecons_textures/textures/jeija_torches_off_ceiling.png
index f143b01..3934e6e 100644
--- a/mesecons_textures/textures/jeija_torches_off_ceiling.png
+++ b/mesecons_textures/textures/jeija_torches_off_ceiling.png
Binary files differ
diff --git a/mesecons_textures/textures/jeija_torches_off_side.png b/mesecons_textures/textures/jeija_torches_off_side.png
index 8d20e56..ecb2951 100644
--- a/mesecons_textures/textures/jeija_torches_off_side.png
+++ b/mesecons_textures/textures/jeija_torches_off_side.png
Binary files differ
diff --git a/mesecons_textures/textures/jeija_torches_on.png b/mesecons_textures/textures/jeija_torches_on.png
index b4c1797..a93dcc2 100644
--- a/mesecons_textures/textures/jeija_torches_on.png
+++ b/mesecons_textures/textures/jeija_torches_on.png
Binary files differ
diff --git a/mesecons_textures/textures/jeija_torches_on_ceiling.png b/mesecons_textures/textures/jeija_torches_on_ceiling.png
index efe0400..24fe201 100644
--- a/mesecons_textures/textures/jeija_torches_on_ceiling.png
+++ b/mesecons_textures/textures/jeija_torches_on_ceiling.png
Binary files differ
diff --git a/mesecons_textures/textures/jeija_torches_on_side.png b/mesecons_textures/textures/jeija_torches_on_side.png
index 1f20ac7..fe7dfd2 100644
--- a/mesecons_textures/textures/jeija_torches_on_side.png
+++ b/mesecons_textures/textures/jeija_torches_on_side.png
Binary files differ
diff --git a/mesecons_torch/init.lua b/mesecons_torch/init.lua
index 9e03233..e9b9931 100644
--- a/mesecons_torch/init.lua
+++ b/mesecons_torch/init.lua
@@ -15,8 +15,14 @@ minetest.register_node("mesecons_torch:mesecon_torch_off", {
paramtype = "light",
walkable = false,
paramtype2 = "wallmounted",
+ selection_box = {
+ type = "wallmounted",
+ wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},
+ wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
+ wall_side = {-0.5, -0.1, -0.1, -0.5+0.6, 0.1, 0.1},
+ },
legacy_wallmounted = true,
- groups = {dig_immediate=2},
+ groups = {dig_immediate=3,not_in_creative_inventory=1},
drop = '"mesecons_torch:mesecon_torch_on" 1',
description="Mesecon Torch",
})
@@ -30,8 +36,14 @@ minetest.register_node("mesecons_torch:mesecon_torch_on", {
sunlight_propagates = true,
walkable = false,
paramtype2 = "wallmounted",
+ selection_box = {
+ type = "wallmounted",
+ wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},
+ wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
+ wall_side = {-0.5, -0.1, -0.1, -0.5+0.6, 0.1, 0.1},
+ },
legacy_wallmounted = true,
- groups = {dig_immediate=2,not_in_creative_inventory=1},
+ groups = {dig_immediate=3},
light_source = LIGHT_MAX-5,
description="Mesecon Torch",
after_place_node = function(pos)