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,46 +33,59 @@ local dual_delayer_deactivate = function(pos, node, link)
end end
local groups = {} for n,i in pairs({{0,0},{1,0},{1,1}}) do
for i1=0, 1 do local i1,i2 = unpack(i)
for i2=0, 1 do
if not(i1 == 0 and i2 == 1) then local groups = {dig_immediate = 2}
if i1 == 0 and i2 == 0 then if n ~= 1 then
groups = {dig_immediate = 2} groups.not_in_creative_inventory = 1
else end
groups = {dig_immediate = 2, not_in_creative_inventory = 1}
end local top_texture = "^moremesecons_dual_delayer_overlay.png^[makealpha:255,126,126"
minetest.register_node("moremesecons_dual_delayer:dual_delayer_"..tostring(i1)..tostring(i2), { if i1 == i2 then
description = "Dual Delayer", if i1 == 0 then
drop = "moremesecons_dual_delayer:dual_delayer_00", top_texture = "mesecons_wire_off.png"..top_texture
inventory_image = "moremesecons_dual_delayer_00.png", else
wield_image = "moremesecons_dual_delayer_00.png", top_texture = "mesecons_wire_on.png"..top_texture
paramtype = "light", end
paramtype2 = "facedir", else
drawtype = "nodebox", local pre = "mesecons_wire_off.png^[lowpart:50:mesecons_wire_on.png^[transformR"
node_box = { if i1 == 0 then
type = "fixed", pre = pre.. 90
fixed = {{-6/16, -8/16, -1/16, 6/16, -7/16, 8/16 }, else
{-8/16, -8/16, 1/16, -6/16, -7/16, -1/16}, pre = pre.. 270
{8/16, -8/16, -1/16, 6/16, -7/16, 1/16}} end
}, top_texture = pre..top_texture
groups = groups, end
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"},
mesecons = { minetest.register_node("moremesecons_dual_delayer:dual_delayer_"..i1 ..i2, {
receptor = { description = "Dual Delayer",
state = mesecon.state.off, drop = "moremesecons_dual_delayer:dual_delayer_00",
rules = dual_delayer_get_output_rules inventory_image = top_texture,
wield_image = top_texture,
paramtype = "light",
paramtype2 = "facedir",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {{-6/16, -8/16, -1/16, 6/16, -7/16, 8/16 },
{-8/16, -8/16, 1/16, -6/16, -7/16, -1/16},
{8/16, -8/16, -1/16, 6/16, -7/16, 1/16}}
}, },
effector = { groups = groups,
rules = dual_delayer_get_input_rules, 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"},
action_on = dual_delayer_activate, mesecons = {
action_off = dual_delayer_deactivate receptor = {
state = mesecon.state.off,
rules = dual_delayer_get_output_rules
},
effector = {
rules = dual_delayer_get_input_rules,
action_on = dual_delayer_activate,
action_off = dual_delayer_deactivate
}
} }
} })
})
end
end
end end
minetest.register_craft({ minetest.register_craft({

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