diff --git a/nodes.lua b/nodes.lua
index 11a519e..fa46261 100644
--- a/nodes.lua
+++ b/nodes.lua
@@ -61,7 +61,7 @@ digiterms.register_monitor('digiterms:lcd_monitor', {
paramtype2 = "facedir",
sunlight_propagates = false,
drawtype = "nodebox",
- groups = {choppy = 1, oddly_breakable_by_hand = 3},
+ groups = {oddly_breakable_by_hand = 3},
node_box = lcd_node_box,
collision_box = lcd_collision_box,
selection_box = lcd_collision_box,
@@ -84,9 +84,8 @@ digiterms.register_monitor('digiterms:lcd_monitor', {
"digiterms_lcd_sides.png", "digiterms_lcd_sides.png",
"digiterms_lcd_back.png", "digiterms_lcd_front_off.png" },
})
-
-digiterms.register_monitor('digiterms:cathodic_amber_monitor', {
- description = "Cathodic amber monitor",
+digiterms.register_monitor('digiterms:cathodic_beige_monitor', {
+ description = "Beige cathodic monitor with amber screen",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = false,
@@ -106,22 +105,24 @@ digiterms.register_monitor('digiterms:cathodic_amber_monitor', {
},
},
}, {
- tiles = { "digiterms_amber_top.png", "digiterms_amber_bottom.png",
- "digiterms_amber_sides.png", "digiterms_amber_sides.png^[transformFX]",
- "digiterms_amber_back.png", "digiterms_amber_front.png",},
+ tiles = { "digiterms_beige_top.png", "digiterms_beige_bottom.png",
+ "digiterms_beige_sides.png", "digiterms_beige_sides.png^[transformFX]",
+ "digiterms_beige_back.png", "digiterms_beige_front.png",},
}, {
- tiles = { "digiterms_amber_top.png", "digiterms_amber_bottom.png",
- "digiterms_amber_sides.png", "digiterms_amber_sides.png^[transformFX]",
- "digiterms_amber_back.png", "digiterms_amber_front_off.png",},
+ tiles = { "digiterms_beige_top.png", "digiterms_beige_bottom.png",
+ "digiterms_beige_sides.png", "digiterms_beige_sides.png^[transformFX]",
+ "digiterms_beige_back.png", "digiterms_beige_front_off.png",},
})
+minetest.register_alias('digiterms:cathodic_amber_monitor', 'digiterms:cathodic_beige_monitor')
+minetest.register_alias('digiterms:cathodic_amber_monitor_off', 'digiterms:cathodic_beige_monitor_off')
-digiterms.register_monitor('digiterms:cathodic_green_monitor', {
- description = "Cathodic green monitor",
+digiterms.register_monitor('digiterms:cathodic_white_monitor', {
+ description = "White cathodic monitor with green screen",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = false,
drawtype = "nodebox",
- groups = {oddly_breakable_by_hand = 1, dig_immediate = 1},
+ groups = {oddly_breakable_by_hand = 3},
node_box = cathodic_node_box,
collision_box = cathodic_collision_box,
selection_box = cathodic_collision_box,
@@ -136,72 +137,84 @@ digiterms.register_monitor('digiterms:cathodic_green_monitor', {
},
},
}, {
- tiles = { "digiterms_green_top.png", "digiterms_green_bottom.png",
- "digiterms_green_sides.png", "digiterms_green_sides.png^[transformFX]",
- "digiterms_green_back.png", "digiterms_green_front.png",},
+ tiles = { "digiterms_white_top.png", "digiterms_white_bottom.png",
+ "digiterms_white_sides.png", "digiterms_white_sides.png^[transformFX]",
+ "digiterms_white_back.png", "digiterms_white_front.png",},
}, {
- tiles = { "digiterms_green_top.png", "digiterms_green_bottom.png",
- "digiterms_green_sides.png", "digiterms_green_sides.png^[transformFX]",
- "digiterms_green_back.png", "digiterms_green_front_off.png",},
+ tiles = { "digiterms_white_top.png", "digiterms_white_bottom.png",
+ "digiterms_white_sides.png", "digiterms_white_sides.png^[transformFX]",
+ "digiterms_white_back.png", "digiterms_white_front_off.png",},
})
+minetest.register_alias('digiterms:cathodic_green_monitor', 'digiterms:cathodic_white_monitor')
+minetest.register_alias('digiterms:cathodic_green_monitor_off', 'digiterms:cathodic_white_monitor_off')
-minetest.register_node('digiterms:beige_keyboard', {
- description = "Beige keyboard",
+digiterms.register_monitor('digiterms:cathodic_black_monitor', {
+ description = "Black cathodic monitor with white screen",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = false,
- tiles = { "digiterms_beige_keyboard_top.png", "digiterms_beige_keyboard_bottom.png",
- "digiterms_beige_keyboard_sides.png", "digiterms_beige_keyboard_sides.png",
- "digiterms_beige_keyboard_sides.png", "digiterms_beige_keyboard_sides.png",},
drawtype = "nodebox",
- groups = {choppy = 1, oddly_breakable_by_hand = 1},
- node_box = {
- type = "fixed",
- fixed = {
- {-8/16, -8/16, -1/16, 8/16, -6/16, 7/16},
- {-7/16, -12/32, 0, 7/16, -11/32, 6/16},
- }
+ groups = {oddly_breakable_by_hand = 3},
+ node_box = cathodic_node_box,
+ collision_box = cathodic_collision_box,
+ selection_box = cathodic_collision_box,
+ display_entities = {
+ ["digiterms:screen"] = {
+ on_display_update = font_api.on_display_update,
+ depth = -7/16 - display_api.entity_spacing,
+ top = -1/16,
+ size = { x = 23/32, y = 10/16 },
+ columns = 20, lines = 6,
+ color = "#D0D0D0", font_name = digiterms.font, halign="left", valing="top",
+ },
},
- digiline =
- {
- receptor = {}
- },
- on_rightclick = function(pos, node, player, itemstack, pointed_thing)
- if not minetest.is_player(player) then
- return
- end
- local name = player:get_player_name()
- local context = digiterms.get_player_context(name)
- context.formname = 'digiterms:keyboard'
- context.pos = pos
-
- local owned = not minetest.is_protected(context.pos, name)
- local protected = minetest.is_protected(context.pos, '')
- local meta = minetest.get_meta(pos)
- local channel = meta:get_string('channel')
- local public = meta:get_string('public')
-
- if owned then
- local fs = "size[8,5]"..
- default.gui_bg..default.gui_bg_img..default.gui_slots..
- "field[1,1;3,1;channel;Chanel;"..channel.."]"..
- "field[1,3;6.5,1;text;Type text:;]"..
- "field_close_on_enter[text;true]button_exit[2.5,4;3,1;send;Send]"
- if protected then
- fs = fs.."checkbox[4,0.6;public;Public keyboard;"..public.."]"
- end
- minetest.show_formspec(name, context.formname, fs)
- else
- if public == 'true' and channel ~= '' then
- minetest.show_formspec(name, context.formname, "size[8,3]"..
- default.gui_bg..default.gui_bg_img..default.gui_slots..
- "field[1,1;6.5,1;text;Type text:;]"..
- "field_close_on_enter[text;true]button_exit[2.5,2;3,1;send;Send]")
- end
- end
- end,
+}, {
+ tiles = { "digiterms_black_top.png", "digiterms_black_bottom.png",
+ "digiterms_black_sides.png", "digiterms_black_sides.png^[transformFX]",
+ "digiterms_black_back.png", "digiterms_black_front.png",},
+}, {
+ tiles = { "digiterms_black_top.png", "digiterms_black_bottom.png",
+ "digiterms_black_sides.png", "digiterms_black_sides.png^[transformFX]",
+ "digiterms_black_back.png", "digiterms_black_front_off.png",},
})
+-- KEYBOARDS
+
+local keyboard_on_rightclick = function(pos, node, player, itemstack, pointed_thing)
+ if not minetest.is_player(player) then
+ return
+ end
+ local name = player:get_player_name()
+ local context = digiterms.get_player_context(name)
+ context.formname = 'digiterms:keyboard'
+ context.pos = pos
+
+ local owned = not minetest.is_protected(context.pos, name)
+ local protected = minetest.is_protected(context.pos, '')
+ local meta = minetest.get_meta(pos)
+ local channel = meta:get_string('channel')
+ local public = meta:get_string('public')
+
+ if owned then
+ local fs = "size[8,5]"..
+ default.gui_bg..default.gui_bg_img..default.gui_slots..
+ "field[1,1;3,1;channel;Chanel;"..channel.."]"..
+ "field[1,3;6.5,1;text;Type text:;]"..
+ "field_close_on_enter[text;true]button_exit[2.5,4;3,1;send;Send]"
+ if protected then
+ fs = fs.."checkbox[4,0.6;public;Public keyboard;"..public.."]"
+ end
+ minetest.show_formspec(name, context.formname, fs)
+ else
+ if public == 'true' and channel ~= '' then
+ minetest.show_formspec(name, context.formname, "size[8,3]"..
+ default.gui_bg..default.gui_bg_img..default.gui_slots..
+ "field[1,1;6.5,1;text;Type text:;]"..
+ "field_close_on_enter[text;true]button_exit[2.5,2;3,1;send;Send]")
+ end
+ end
+end
+
minetest.register_on_player_receive_fields(function(player, formname, fields)
if formname ~= 'digiterms:keyboard' or not minetest.is_player(player) then
return
@@ -232,3 +245,76 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end
return true
end)
+
+
+minetest.register_node('digiterms:beige_keyboard', {
+ description = "Beige keyboard",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ sunlight_propagates = false,
+ tiles = { "digiterms_beige_keyboard_top.png", "digiterms_beige_keyboard_bottom.png",
+ "digiterms_beige_keyboard_sides.png", "digiterms_beige_keyboard_sides.png",
+ "digiterms_beige_keyboard_sides.png", "digiterms_beige_keyboard_sides.png",},
+ drawtype = "nodebox",
+ groups = {oddly_breakable_by_hand = 3},
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-8/16, -8/16, -1/16, 8/16, -6/16, 7/16},
+ {-7/16, -12/32, 0, 7/16, -11/32, 6/16},
+ }
+ },
+ on_rightclick = keyboard_on_rightclick,
+ digiline =
+ {
+ receptor = {}
+ },
+})
+
+minetest.register_node('digiterms:white_keyboard', {
+ description = "White keyboard",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ sunlight_propagates = false,
+ tiles = { "digiterms_white_keyboard_top.png", "digiterms_white_keyboard_bottom.png",
+ "digiterms_white_keyboard_sides.png", "digiterms_white_keyboard_sides.png",
+ "digiterms_white_keyboard_sides.png", "digiterms_white_keyboard_sides.png",},
+ drawtype = "nodebox",
+ groups = {oddly_breakable_by_hand = 3},
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-8/16, -8/16, -1/16, 8/16, -6/16, 7/16},
+ {-7/16, -12/32, 0, 7/16, -11/32, 6/16},
+ }
+ },
+ on_rightclick = keyboard_on_rightclick,
+ digiline =
+ {
+ receptor = {}
+ },
+})
+
+minetest.register_node('digiterms:black_keyboard', {
+ description = "Black keyboard",
+ paramtype = "light",
+ paramtype2 = "facedir",
+ sunlight_propagates = false,
+ tiles = { "digiterms_black_keyboard_top.png", "digiterms_black_keyboard_bottom.png",
+ "digiterms_black_keyboard_sides.png", "digiterms_black_keyboard_sides.png",
+ "digiterms_black_keyboard_sides.png", "digiterms_black_keyboard_sides.png",},
+ drawtype = "nodebox",
+ groups = {oddly_breakable_by_hand = 3},
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-8/16, -8/16, -1/16, 8/16, -6/16, 7/16},
+ {-7/16, -12/32, 0, 7/16, -11/32, 6/16},
+ }
+ },
+ on_rightclick = keyboard_on_rightclick,
+ digiline =
+ {
+ receptor = {}
+ },
+})
diff --git a/svg/cathodic_monitors.svg b/svg/cathodic_monitors.svg
index 9b2ab66..6aa4f82 100644
--- a/svg/cathodic_monitors.svg
+++ b/svg/cathodic_monitors.svg
@@ -27,9 +27,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="22.627417"
- inkscape:cx="66.569337"
- inkscape:cy="19.685565"
+ inkscape:zoom="256"
+ inkscape:cx="53.637858"
+ inkscape:cy="7.7047719"
inkscape:document-units="px"
inkscape:current-layer="g1617"
showgrid="true"
@@ -549,11 +549,6 @@
height="260"
width="260" />
-
-
-
-
-
-
-
-
-
diff --git a/svg/keyboards.svg b/svg/keyboards.svg
index d7190e5..85b0f1a 100644
--- a/svg/keyboards.svg
+++ b/svg/keyboards.svg
@@ -27,9 +27,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="22.627417"
- inkscape:cx="-2.2827096"
- inkscape:cy="16.927466"
+ inkscape:zoom="11.313709"
+ inkscape:cx="6.4007018"
+ inkscape:cy="-44.603021"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -479,6 +479,132 @@
height="260"
width="260" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -514,7 +640,7 @@
width="16"
height="16"
x="-16"
- y="21"
+ y="20"
inkscape:export-filename="/home/pyrollo/dev/minetest-mods/digiterms/textures/digiterms_beige_keyboard_bottom.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
@@ -549,7 +675,7 @@
transform="rotate(-90)" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/textures/digiterms_amber_back.png b/textures/digiterms_beige_back.png
similarity index 100%
rename from textures/digiterms_amber_back.png
rename to textures/digiterms_beige_back.png
diff --git a/textures/digiterms_amber_bottom.png b/textures/digiterms_beige_bottom.png
similarity index 100%
rename from textures/digiterms_amber_bottom.png
rename to textures/digiterms_beige_bottom.png
diff --git a/textures/digiterms_amber_front.png b/textures/digiterms_beige_front.png
similarity index 100%
rename from textures/digiterms_amber_front.png
rename to textures/digiterms_beige_front.png
diff --git a/textures/digiterms_amber_front_off.png b/textures/digiterms_beige_front_off.png
similarity index 100%
rename from textures/digiterms_amber_front_off.png
rename to textures/digiterms_beige_front_off.png
diff --git a/textures/digiterms_amber_sides.png b/textures/digiterms_beige_sides.png
similarity index 100%
rename from textures/digiterms_amber_sides.png
rename to textures/digiterms_beige_sides.png
diff --git a/textures/digiterms_amber_top.png b/textures/digiterms_beige_top.png
similarity index 100%
rename from textures/digiterms_amber_top.png
rename to textures/digiterms_beige_top.png
diff --git a/textures/digiterms_black_back.png b/textures/digiterms_black_back.png
new file mode 100644
index 0000000..56922f3
Binary files /dev/null and b/textures/digiterms_black_back.png differ
diff --git a/textures/digiterms_black_bottom.png b/textures/digiterms_black_bottom.png
new file mode 100644
index 0000000..5e31c7b
Binary files /dev/null and b/textures/digiterms_black_bottom.png differ
diff --git a/textures/digiterms_black_front.png b/textures/digiterms_black_front.png
new file mode 100644
index 0000000..472c8b5
Binary files /dev/null and b/textures/digiterms_black_front.png differ
diff --git a/textures/digiterms_black_front_off.png b/textures/digiterms_black_front_off.png
new file mode 100644
index 0000000..0681779
Binary files /dev/null and b/textures/digiterms_black_front_off.png differ
diff --git a/textures/digiterms_black_keyboard_bottom.png b/textures/digiterms_black_keyboard_bottom.png
new file mode 100644
index 0000000..150c51f
Binary files /dev/null and b/textures/digiterms_black_keyboard_bottom.png differ
diff --git a/textures/digiterms_black_keyboard_sides.png b/textures/digiterms_black_keyboard_sides.png
new file mode 100644
index 0000000..2170fd5
Binary files /dev/null and b/textures/digiterms_black_keyboard_sides.png differ
diff --git a/textures/digiterms_black_keyboard_top.png b/textures/digiterms_black_keyboard_top.png
new file mode 100644
index 0000000..5bf8c9e
Binary files /dev/null and b/textures/digiterms_black_keyboard_top.png differ
diff --git a/textures/digiterms_black_sides.png b/textures/digiterms_black_sides.png
new file mode 100644
index 0000000..993ec58
Binary files /dev/null and b/textures/digiterms_black_sides.png differ
diff --git a/textures/digiterms_black_top.png b/textures/digiterms_black_top.png
new file mode 100644
index 0000000..b7e7c1b
Binary files /dev/null and b/textures/digiterms_black_top.png differ
diff --git a/textures/digiterms_green_back.png b/textures/digiterms_white_back.png
similarity index 100%
rename from textures/digiterms_green_back.png
rename to textures/digiterms_white_back.png
diff --git a/textures/digiterms_green_bottom.png b/textures/digiterms_white_bottom.png
similarity index 100%
rename from textures/digiterms_green_bottom.png
rename to textures/digiterms_white_bottom.png
diff --git a/textures/digiterms_green_front.png b/textures/digiterms_white_front.png
similarity index 100%
rename from textures/digiterms_green_front.png
rename to textures/digiterms_white_front.png
diff --git a/textures/digiterms_green_front_off.png b/textures/digiterms_white_front_off.png
similarity index 100%
rename from textures/digiterms_green_front_off.png
rename to textures/digiterms_white_front_off.png
diff --git a/textures/digiterms_white_keyboard_bottom.png b/textures/digiterms_white_keyboard_bottom.png
new file mode 100644
index 0000000..6e25e61
Binary files /dev/null and b/textures/digiterms_white_keyboard_bottom.png differ
diff --git a/textures/digiterms_white_keyboard_sides.png b/textures/digiterms_white_keyboard_sides.png
new file mode 100644
index 0000000..a378b08
Binary files /dev/null and b/textures/digiterms_white_keyboard_sides.png differ
diff --git a/textures/digiterms_white_keyboard_top.png b/textures/digiterms_white_keyboard_top.png
new file mode 100644
index 0000000..5a0f7db
Binary files /dev/null and b/textures/digiterms_white_keyboard_top.png differ
diff --git a/textures/digiterms_green_sides.png b/textures/digiterms_white_sides.png
similarity index 100%
rename from textures/digiterms_green_sides.png
rename to textures/digiterms_white_sides.png
diff --git a/textures/digiterms_green_top.png b/textures/digiterms_white_top.png
similarity index 100%
rename from textures/digiterms_green_top.png
rename to textures/digiterms_white_top.png