use the mesecons wire texture

This commit is contained in:
HybridDog 2015-09-02 20:02:09 +02:00
parent dccf3f45dd
commit d340b6fece
6 changed files with 50 additions and 37 deletions

View File

@ -33,21 +33,36 @@ local dual_delayer_deactivate = function(pos, node, link)
end
local groups = {}
for i1=0, 1 do
for i2=0, 1 do
for n,i in pairs({{0,0},{1,0},{1,1}}) do
local i1,i2 = unpack(i)
if not(i1 == 0 and i2 == 1) then
if i1 == 0 and i2 == 0 then
groups = {dig_immediate = 2}
else
groups = {dig_immediate = 2, not_in_creative_inventory = 1}
local groups = {dig_immediate = 2}
if n ~= 1 then
groups.not_in_creative_inventory = 1
end
minetest.register_node("moremesecons_dual_delayer:dual_delayer_"..tostring(i1)..tostring(i2), {
local top_texture = "^moremesecons_dual_delayer_overlay.png^[makealpha:255,126,126"
if i1 == i2 then
if i1 == 0 then
top_texture = "mesecons_wire_off.png"..top_texture
else
top_texture = "mesecons_wire_on.png"..top_texture
end
else
local pre = "mesecons_wire_off.png^[lowpart:50:mesecons_wire_on.png^[transformR"
if i1 == 0 then
pre = pre.. 90
else
pre = pre.. 270
end
top_texture = pre..top_texture
end
minetest.register_node("moremesecons_dual_delayer:dual_delayer_"..i1 ..i2, {
description = "Dual Delayer",
drop = "moremesecons_dual_delayer:dual_delayer_00",
inventory_image = "moremesecons_dual_delayer_00.png",
wield_image = "moremesecons_dual_delayer_00.png",
inventory_image = top_texture,
wield_image = top_texture,
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
@ -58,7 +73,7 @@ minetest.register_node("moremesecons_dual_delayer:dual_delayer_"..tostring(i1)..
{8/16, -8/16, -1/16, 6/16, -7/16, 1/16}}
},
groups = groups,
tiles = {"moremesecons_dual_delayer_"..tostring(i1)..tostring(i2)..".png", "moremesecons_dual_delayer_bottom.png", "moremesecons_dual_delayer_side_left.png", "moremesecons_dual_delayer_side_right.png", "moremesecons_dual_delayer_ends.png", "moremesecons_dual_delayer_ends.png"},
tiles = {top_texture, "moremesecons_dual_delayer_bottom.png", "moremesecons_dual_delayer_side_left.png", "moremesecons_dual_delayer_side_right.png", "moremesecons_dual_delayer_ends.png", "moremesecons_dual_delayer_ends.png"},
mesecons = {
receptor = {
state = mesecon.state.off,
@ -72,8 +87,6 @@ minetest.register_node("moremesecons_dual_delayer:dual_delayer_"..tostring(i1)..
}
})
end
end
end
minetest.register_craft({
type = "shapeless",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B