107 lines
2.2 KiB
Lua
107 lines
2.2 KiB
Lua
local utils = ...
|
|
local S = utils.S
|
|
|
|
|
|
|
|
local touchscreen = minetest.registered_nodes["digistuff:touchscreen"]
|
|
if touchscreen then
|
|
local touchblock = table.copy (touchscreen)
|
|
|
|
touchblock.description = S("LWComponents Touchscreen")
|
|
|
|
touchblock.node_box = {
|
|
type = "fixed",
|
|
fixed = {
|
|
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
|
}
|
|
}
|
|
|
|
touchblock.selection_box = {
|
|
type = "fixed",
|
|
fixed = {
|
|
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
|
}
|
|
}
|
|
|
|
touchblock.collision_box = {
|
|
type = "fixed",
|
|
fixed = {
|
|
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
|
}
|
|
}
|
|
|
|
minetest.register_node ("lwcomponents:touchscreen", touchblock)
|
|
if core.get_modpath("mcl_core") then
|
|
minetest.register_craft({
|
|
output = "lwcomponents:touchscreen",
|
|
recipe = {
|
|
{"basic_materials:ic","mcl_core:glass","mcl_core:glass"},
|
|
{"mcl_core:glass","digilines:lcd","mcl_core:glass"},
|
|
{"mcl_core:glass","mcl_core:glass","mcl_core:stone"}
|
|
}
|
|
})
|
|
else
|
|
minetest.register_craft({
|
|
output = "lwcomponents:touchscreen",
|
|
recipe = {
|
|
{"basic_materials:ic","mcl_core:glass","mcl_core:glass"},
|
|
{"mcl_core:glass","digilines:lcd","mcl_core:glass"},
|
|
{"mcl_core:glass","mcl_core:glass","mcl_core:stone"}
|
|
}
|
|
})
|
|
end
|
|
end
|
|
|
|
|
|
local panel = minetest.registered_nodes["digistuff:panel"]
|
|
if panel then
|
|
local panelblock = table.copy (panel)
|
|
|
|
panelblock.description = S("LWComponents Control Panel")
|
|
|
|
panelblock.node_box = {
|
|
type = "fixed",
|
|
fixed = {
|
|
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
|
}
|
|
}
|
|
|
|
panelblock.selection_box = {
|
|
type = "fixed",
|
|
fixed = {
|
|
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
|
}
|
|
}
|
|
|
|
panelblock.collision_box = {
|
|
type = "fixed",
|
|
fixed = {
|
|
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }
|
|
}
|
|
}
|
|
|
|
minetest.register_node ("lwcomponents:panel", panelblock)
|
|
if core.get_modpath("mcl_core") then
|
|
minetest.register_craft({
|
|
output = "lwcomponents:panel",
|
|
recipe = {
|
|
{"","mesecons_button:button",""},
|
|
{"mesecons_button:button","digilines:lcd","mesecons_button:button"},
|
|
{"","mesecons_button:button","mcl_core:stone"}
|
|
}
|
|
})
|
|
else
|
|
minetest.register_craft({
|
|
output = "lwcomponents:panel",
|
|
recipe = {
|
|
{"","digistuff:button",""},
|
|
{"digistuff:button","digilines:lcd","digistuff:button"},
|
|
{"","digistuff:button","default:stone"}
|
|
}
|
|
})
|
|
end
|
|
end
|
|
|
|
|
|
|
|
--
|