Added some more keyboards and monitors
224
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 = {}
|
||||
},
|
||||
})
|
||||
|
@ -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" />
|
||||
</pattern>
|
||||
<pattern
|
||||
id="pattern6175-3-5"
|
||||
xlink:href="#sand_bitmap-2-7-0"
|
||||
inkscape:collect="always"
|
||||
patternTransform="translate(4,80)" />
|
||||
<pattern
|
||||
inkscape:stockid="Sand (bitmap)"
|
||||
id="sand_bitmap-2-7-0"
|
||||
@ -570,11 +565,6 @@
|
||||
height="260"
|
||||
width="260" />
|
||||
</pattern>
|
||||
<pattern
|
||||
id="pattern6175-3-5-1"
|
||||
xlink:href="#sand_bitmap-2-7-0-0"
|
||||
inkscape:collect="always"
|
||||
patternTransform="translate(-16,60)" />
|
||||
<pattern
|
||||
inkscape:stockid="Sand (bitmap)"
|
||||
id="sand_bitmap-2-7-0-0"
|
||||
@ -2089,83 +2079,6 @@
|
||||
inkscape:export-filename="/home/pyrollo/dev/minetest-mods/digiterms/textures/digiterms_white_front_off.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96" />
|
||||
<rect
|
||||
style="fill:url(#pattern6175-3-5);fill-opacity:1"
|
||||
y="80"
|
||||
x="4"
|
||||
height="16"
|
||||
width="16"
|
||||
id="rect3729-0-9-8"
|
||||
inkscape:export-filename="/home/pyrollo/dev/minetest-mods/digimons/textures/digimons_amber_top.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
transform="rotate(-90)" />
|
||||
<rect
|
||||
style="opacity:0.9;fill:#e9ddaf;fill-opacity:1"
|
||||
y="80"
|
||||
x="4"
|
||||
height="16"
|
||||
width="16"
|
||||
id="rect3729-7-9-2-71"
|
||||
inkscape:export-filename="/home/pyrollo/dev/minetest-mods/digimons/textures/digimons_amber_top.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
transform="rotate(-90)" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke-width:2.46885371"
|
||||
id="rect6294-1-2-6"
|
||||
width="8"
|
||||
height="16"
|
||||
x="4"
|
||||
y="80"
|
||||
inkscape:export-filename="/home/pyrollo/dev/minetest-mods/digimons/textures/digimons_amber_top.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
transform="rotate(-90)" />
|
||||
<rect
|
||||
style="fill:url(#pattern6175-3-5-1);fill-opacity:1"
|
||||
y="60"
|
||||
x="-16"
|
||||
height="16"
|
||||
width="16"
|
||||
id="rect3729-0-9-8-1"
|
||||
inkscape:export-filename="/home/pyrollo/dev/minetest-mods/digimons/textures/digimons_amber_top.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
transform="rotate(-90)" />
|
||||
<rect
|
||||
style="opacity:0.9;fill:#e9ddaf;fill-opacity:1"
|
||||
y="60"
|
||||
x="-16"
|
||||
height="16"
|
||||
width="16"
|
||||
id="rect3729-7-9-2-71-5"
|
||||
inkscape:export-filename="/home/pyrollo/dev/minetest-mods/digimons/textures/digimons_amber_top.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
transform="rotate(-90)" />
|
||||
<rect
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke-width:3.14718342"
|
||||
id="rect6294-1-2-6-9"
|
||||
width="13"
|
||||
height="16"
|
||||
x="-13"
|
||||
y="60"
|
||||
inkscape:export-filename="/home/pyrollo/dev/minetest-mods/digimons/textures/digimons_amber_top.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
transform="rotate(-90)" />
|
||||
<rect
|
||||
style="opacity:1;fill:#1a1a1a;fill-opacity:0.11764706;stroke-width:1.26491094"
|
||||
id="rect6146-6-8-0-7-4"
|
||||
width="1"
|
||||
height="16"
|
||||
x="-15"
|
||||
y="60"
|
||||
inkscape:export-filename="/home/pyrollo/dev/minetest-mods/digimons/textures/digimons_amber_top.png"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-ydpi="96"
|
||||
transform="rotate(-90)" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 2.4 MiB After Width: | Height: | Size: 2.4 MiB |
6014
svg/keyboards.svg
Before Width: | Height: | Size: 2.8 MiB After Width: | Height: | Size: 3.5 MiB |
Before Width: | Height: | Size: 642 B After Width: | Height: | Size: 642 B |
Before Width: | Height: | Size: 666 B After Width: | Height: | Size: 666 B |
Before Width: | Height: | Size: 571 B After Width: | Height: | Size: 571 B |
Before Width: | Height: | Size: 572 B After Width: | Height: | Size: 572 B |
Before Width: | Height: | Size: 634 B After Width: | Height: | Size: 634 B |
Before Width: | Height: | Size: 590 B After Width: | Height: | Size: 590 B |
BIN
textures/digiterms_black_back.png
Normal file
After Width: | Height: | Size: 620 B |
BIN
textures/digiterms_black_bottom.png
Normal file
After Width: | Height: | Size: 637 B |
BIN
textures/digiterms_black_front.png
Normal file
After Width: | Height: | Size: 555 B |
BIN
textures/digiterms_black_front_off.png
Normal file
After Width: | Height: | Size: 545 B |
BIN
textures/digiterms_black_keyboard_bottom.png
Normal file
After Width: | Height: | Size: 418 B |
BIN
textures/digiterms_black_keyboard_sides.png
Normal file
After Width: | Height: | Size: 278 B |
BIN
textures/digiterms_black_keyboard_top.png
Normal file
After Width: | Height: | Size: 618 B |
BIN
textures/digiterms_black_sides.png
Normal file
After Width: | Height: | Size: 624 B |
BIN
textures/digiterms_black_top.png
Normal file
After Width: | Height: | Size: 594 B |
Before Width: | Height: | Size: 615 B After Width: | Height: | Size: 615 B |
Before Width: | Height: | Size: 622 B After Width: | Height: | Size: 622 B |
Before Width: | Height: | Size: 567 B After Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 566 B After Width: | Height: | Size: 566 B |
BIN
textures/digiterms_white_keyboard_bottom.png
Normal file
After Width: | Height: | Size: 422 B |
BIN
textures/digiterms_white_keyboard_sides.png
Normal file
After Width: | Height: | Size: 265 B |
BIN
textures/digiterms_white_keyboard_top.png
Normal file
After Width: | Height: | Size: 587 B |
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 612 B |
Before Width: | Height: | Size: 576 B After Width: | Height: | Size: 576 B |