From d399162fc1b66e5dc57edefd3af408057837b016 Mon Sep 17 00:00:00 2001 From: Kyle Date: Fri, 24 Aug 2012 23:23:44 -0700 Subject: =?UTF-8?q?Reduced=20the=20number=20of=20=C2=B5C=20images.=20Inste?= =?UTF-8?q?ad=20of=2016=20top=20images,=20there=20is=20one=20off=20image,?= =?UTF-8?q?=20then=20four=20port=20images=20that=20can=20be=20overlaid=20o?= =?UTF-8?q?n=20top=20of=20the=20blank.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mesecons_microcontroller/init.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'mesecons_microcontroller') diff --git a/mesecons_microcontroller/init.lua b/mesecons_microcontroller/init.lua index 00a8f55..a4c2741 100644 --- a/mesecons_microcontroller/init.lua +++ b/mesecons_microcontroller/init.lua @@ -11,6 +11,19 @@ for b = 0, 1 do for c = 0, 1 do for d = 0, 1 do local nodename = "mesecons_microcontroller:microcontroller"..tostring(d)..tostring(c)..tostring(b)..tostring(a) +local top = "jeija_microcontroller_top.png" +if tostring(a) == "1" then + top = top.."^jeija_microcontroller_LED_A.png" +end +if tostring(b) == "1" then + top = top.."^jeija_microcontroller_LED_B.png" +end +if tostring(c) == "1" then + top = top.."^jeija_microcontroller_LED_C.png" +end +if tostring(d) == "1" then + top = top.."^jeija_microcontroller_LED_D.png" +end if tostring(d)..tostring(c)..tostring(b)..tostring(a) ~= "0000" then groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon = 3} else @@ -20,7 +33,7 @@ minetest.register_node(nodename, { description = "Microcontroller", drawtype = "nodebox", tiles = { - "jeija_microcontroller_top_"..tostring(d)..tostring(c)..tostring(b)..tostring(a)..".png", + top, "jeija_microcontroller_bottom.png", "jeija_microcontroller_sides.png", "jeija_microcontroller_sides.png", -- cgit v1.2.3