summaryrefslogtreecommitdiff
path: root/nixie_tubes
diff options
context:
space:
mode:
Diffstat (limited to 'nixie_tubes')
-rw-r--r--nixie_tubes/init.lua53
-rw-r--r--nixie_tubes/textures/numitron_0.pngbin0 -> 435 bytes
-rw-r--r--nixie_tubes/textures/numitron_1.pngbin0 -> 311 bytes
-rw-r--r--nixie_tubes/textures/numitron_2.pngbin0 -> 417 bytes
-rw-r--r--nixie_tubes/textures/numitron_3.pngbin0 -> 390 bytes
-rw-r--r--nixie_tubes/textures/numitron_4.pngbin0 -> 373 bytes
-rw-r--r--nixie_tubes/textures/numitron_5.pngbin0 -> 408 bytes
-rw-r--r--nixie_tubes/textures/numitron_6.pngbin0 -> 441 bytes
-rw-r--r--nixie_tubes/textures/numitron_7.pngbin0 -> 366 bytes
-rw-r--r--nixie_tubes/textures/numitron_8.pngbin0 -> 452 bytes
-rw-r--r--nixie_tubes/textures/numitron_9.pngbin0 -> 437 bytes
-rw-r--r--nixie_tubes/textures/numitron_colon.pngbin0 -> 368 bytes
-rw-r--r--nixie_tubes/textures/numitron_filaments.pngbin0 -> 242 bytes
-rw-r--r--nixie_tubes/textures/numitron_period.pngbin0 -> 369 bytes
14 files changed, 52 insertions, 1 deletions
diff --git a/nixie_tubes/init.lua b/nixie_tubes/init.lua
index 81bfe8f..7f10e5b 100644
--- a/nixie_tubes/init.lua
+++ b/nixie_tubes/init.lua
@@ -43,7 +43,11 @@ local on_digiline_receive_std = function(pos, node, channel, msg)
if setchan ~= channel then return end
local num = tonumber(msg)
if msg == "colon" or msg == "period" or msg == "off" or (num and (num >= 0 and num <= 9)) then
- minetest.swap_node(pos, { name = "nixie_tubes:tube_"..msg, param2 = node.param2})
+ if string.sub(node.name,1,21) == "nixie_tubes:numitron_" then
+ minetest.swap_node(pos, { name = "nixie_tubes:numitron_"..msg, param2 = node.param2})
+ else
+ minetest.swap_node(pos, { name = "nixie_tubes:tube_"..msg, param2 = node.param2})
+ end
end
end
@@ -90,6 +94,7 @@ for _,tube in ipairs(nixie_types) do
local description2 = S("Decatron ("..tube..")")
local cathode = "nixie_tube_cathode_off.png^nixie_tube_cathode_"..tube..".png"
local cathode2 = "decatron_cathode_"..tube..".png"
+ local cathode3 = "numitron_filaments.png^numitron_"..tube..".png"
if tube == "off" then
groups = {cracky = 2}
@@ -97,8 +102,10 @@ for _,tube in ipairs(nixie_types) do
light2 = nil
description = S("Nixie Tube")
description2 = S("Decatron")
+ description3 = S("Numitron Tube")
cathode = "nixie_tube_cathode_off.png"
cathode2 = "nixie_tube_blank.png"
+ cathode3 = "numitron_filaments.png"
end
minetest.register_node("nixie_tubes:tube_"..tube, {
@@ -136,6 +143,41 @@ for _,tube in ipairs(nixie_types) do
drop = "nixie_tubes:tube_off"
})
+ minetest.register_node("nixie_tubes:numitron_"..tube, {
+ description = description3,
+ drawtype = "mesh",
+ mesh = "nixie_tube.obj",
+ tiles = {
+ "nixie_tube_base.png",
+ "nixie_tube_backing.png",
+ cathode3,
+ "nixie_tube_anode.png",
+ "nixie_tube_glass.png",
+ },
+ use_texture_alpha = true,
+ groups = groups,
+ paramtype = "light",
+ paramtype2 = "facedir",
+ light_source = light,
+ selection_box = tube_cbox,
+ collision_box = tube_cbox,
+ on_construct = function(pos)
+ reset_meta(pos)
+ end,
+ on_receive_fields = function(pos, formname, fields, sender)
+ if (fields.channel) then
+ minetest.get_meta(pos):set_string("channel", fields.channel)
+ end
+ end,
+ digiline = {
+ receptor = {},
+ effector = {
+ action = on_digiline_receive_std
+ },
+ },
+ drop = "nixie_tubes:numitron_off"
+ })
+
if tube ~= "colon" and tube ~= "period" then
minetest.register_node("nixie_tubes:decatron_"..tube, {
description = description2,
@@ -411,6 +453,15 @@ minetest.register_craft({
},
})
+minetest.register_craft({
+ output = "nixie_tubes:numitron_off 4",
+ recipe = {
+ { "", "default:glass", "" },
+ { "default:glass", "default:copper_ingot", "default:glass" },
+ { "default:glass", "default:mese_crystal_fragment", "default:glass" }
+ },
+})
+
minetest.register_craft({
output = "nixie_tubes:alnum_32 4",
diff --git a/nixie_tubes/textures/numitron_0.png b/nixie_tubes/textures/numitron_0.png
new file mode 100644
index 0000000..2ff78c9
--- /dev/null
+++ b/nixie_tubes/textures/numitron_0.png
Binary files differ
diff --git a/nixie_tubes/textures/numitron_1.png b/nixie_tubes/textures/numitron_1.png
new file mode 100644
index 0000000..3da4764
--- /dev/null
+++ b/nixie_tubes/textures/numitron_1.png
Binary files differ
diff --git a/nixie_tubes/textures/numitron_2.png b/nixie_tubes/textures/numitron_2.png
new file mode 100644
index 0000000..6748af6
--- /dev/null
+++ b/nixie_tubes/textures/numitron_2.png
Binary files differ
diff --git a/nixie_tubes/textures/numitron_3.png b/nixie_tubes/textures/numitron_3.png
new file mode 100644
index 0000000..67744bc
--- /dev/null
+++ b/nixie_tubes/textures/numitron_3.png
Binary files differ
diff --git a/nixie_tubes/textures/numitron_4.png b/nixie_tubes/textures/numitron_4.png
new file mode 100644
index 0000000..9cc27f7
--- /dev/null
+++ b/nixie_tubes/textures/numitron_4.png
Binary files differ
diff --git a/nixie_tubes/textures/numitron_5.png b/nixie_tubes/textures/numitron_5.png
new file mode 100644
index 0000000..56dfe82
--- /dev/null
+++ b/nixie_tubes/textures/numitron_5.png
Binary files differ
diff --git a/nixie_tubes/textures/numitron_6.png b/nixie_tubes/textures/numitron_6.png
new file mode 100644
index 0000000..4e147c8
--- /dev/null
+++ b/nixie_tubes/textures/numitron_6.png
Binary files differ
diff --git a/nixie_tubes/textures/numitron_7.png b/nixie_tubes/textures/numitron_7.png
new file mode 100644
index 0000000..b701433
--- /dev/null
+++ b/nixie_tubes/textures/numitron_7.png
Binary files differ
diff --git a/nixie_tubes/textures/numitron_8.png b/nixie_tubes/textures/numitron_8.png
new file mode 100644
index 0000000..bf9da7a
--- /dev/null
+++ b/nixie_tubes/textures/numitron_8.png
Binary files differ
diff --git a/nixie_tubes/textures/numitron_9.png b/nixie_tubes/textures/numitron_9.png
new file mode 100644
index 0000000..65b138b
--- /dev/null
+++ b/nixie_tubes/textures/numitron_9.png
Binary files differ
diff --git a/nixie_tubes/textures/numitron_colon.png b/nixie_tubes/textures/numitron_colon.png
new file mode 100644
index 0000000..ca097d8
--- /dev/null
+++ b/nixie_tubes/textures/numitron_colon.png
Binary files differ
diff --git a/nixie_tubes/textures/numitron_filaments.png b/nixie_tubes/textures/numitron_filaments.png
new file mode 100644
index 0000000..8f4d9b3
--- /dev/null
+++ b/nixie_tubes/textures/numitron_filaments.png
Binary files differ
diff --git a/nixie_tubes/textures/numitron_period.png b/nixie_tubes/textures/numitron_period.png
new file mode 100644
index 0000000..335d2a5
--- /dev/null
+++ b/nixie_tubes/textures/numitron_period.png
Binary files differ