Merge pull request #7 from Kotolegokot/master

Torch selection box and lamp node box
此提交包含在:
Jeija
2012-08-01 11:46:59 -07:00
當前提交 80b2da6c85
共有 15 個檔案被更改,包括 45 行新增19 行删除

查看文件

@@ -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)

未顯示二進位檔案。

之後

寬度:  |  高度:  |  大小: 260 B

未顯示二進位檔案。

之前

寬度:  |  高度:  |  大小: 209 B

之後

寬度:  |  高度:  |  大小: 253 B

未顯示二進位檔案。

之前

寬度:  |  高度:  |  大小: 200 B

之後

寬度:  |  高度:  |  大小: 307 B

未顯示二進位檔案。

之前

寬度:  |  高度:  |  大小: 196 B

未顯示二進位檔案。

之前

寬度:  |  高度:  |  大小: 205 B

未顯示二進位檔案。

之前

寬度:  |  高度:  |  大小: 194 B

未顯示二進位檔案。

之前

寬度:  |  高度:  |  大小: 208 B

未顯示二進位檔案。

之前

寬度:  |  高度:  |  大小: 214 B

之後

寬度:  |  高度:  |  大小: 219 B

未顯示二進位檔案。

之前

寬度:  |  高度:  |  大小: 216 B

之後

寬度:  |  高度:  |  大小: 220 B

未顯示二進位檔案。

之前

寬度:  |  高度:  |  大小: 202 B

之後

寬度:  |  高度:  |  大小: 206 B

未顯示二進位檔案。

之前

寬度:  |  高度:  |  大小: 207 B

之後

寬度:  |  高度:  |  大小: 210 B

未顯示二進位檔案。

之前

寬度:  |  高度:  |  大小: 217 B

之後

寬度:  |  高度:  |  大小: 220 B

未顯示二進位檔案。

之前

寬度:  |  高度:  |  大小: 193 B

之後

寬度:  |  高度:  |  大小: 197 B

查看文件

@@ -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)