Upload files to "lwcomponents"
This commit is contained in:
parent
b20501ef6a
commit
5852229fd0
5 changed files with 2122 additions and 0 deletions
107
lwcomponents/extras.lua
Normal file
107
lwcomponents/extras.lua
Normal file
|
@ -0,0 +1,107 @@
|
|||
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
|
||||
|
||||
|
||||
|
||||
--
|
Loading…
Add table
Add a link
Reference in a new issue