new nodebox and textures
12
api.lua
|
@ -38,11 +38,15 @@ function digicompute.register_terminal(termstring, desc)
|
|||
digicompute.os.load(desc.os) -- load os
|
||||
-- off
|
||||
minetest.register_node("digicompute:"..termstring, {
|
||||
drawtype = "nodebox",
|
||||
description = desc.description,
|
||||
tiles = desc.off_tiles,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky = 2},
|
||||
drop = "digicompute:"..termstring,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
node_box = desc.node_box,
|
||||
digiline = {
|
||||
receptor = {},
|
||||
effector = {
|
||||
|
@ -65,19 +69,27 @@ function digicompute.register_terminal(termstring, desc)
|
|||
})
|
||||
-- bios
|
||||
minetest.register_node("digicompute:"..termstring.."_bios", {
|
||||
drawtype = "nodebox",
|
||||
description = desc.description,
|
||||
tiles = desc.bios_tiles,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky = 2},
|
||||
drop = "digicompute:"..termstring,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
node_box = desc.node_box,
|
||||
})
|
||||
-- on
|
||||
minetest.register_node("digicompute:"..termstring.."_on", {
|
||||
drawtype = "nodebox",
|
||||
description = desc.description,
|
||||
tiles = desc.on_tiles,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
groups = {cracky = 2},
|
||||
drop = "digicompute:"..termstring,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
node_box = desc.node_box,
|
||||
digiline = {
|
||||
receptor = {},
|
||||
effector = {
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
-- GENERATED CODE
|
||||
-- Node Box Editor, version 0.9.0
|
||||
-- Namespace: test
|
||||
|
||||
minetest.register_node("test:node_1", {
|
||||
tiles = {
|
||||
"updown.png",
|
||||
"updown.png",
|
||||
"right.png",
|
||||
"left.png",
|
||||
"back_off.png",
|
||||
"front_off.png"
|
||||
},
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.125, 0.5, 0.5, 0.5}, -- computer
|
||||
}
|
||||
}
|
||||
})
|
||||
|
44
nodes.lua
|
@ -1,29 +1,35 @@
|
|||
-- digicompute/nodes.lua
|
||||
|
||||
digiterm.register_terminal("basic", {
|
||||
digicompute.register_terminal("basic", {
|
||||
description = "Basic Digiterm",
|
||||
off_tiles = {
|
||||
"digiterm_side.png",
|
||||
"digiterm_side.png",
|
||||
"digiterm_side.png",
|
||||
"digiterm_side.png",
|
||||
"digiterm_side.png",
|
||||
"digiterm_front_off.png"
|
||||
"updown.png",
|
||||
"updown.png",
|
||||
"right.png",
|
||||
"left.png",
|
||||
"back_off.png",
|
||||
"front_off.png",
|
||||
},
|
||||
bios_tiles = {
|
||||
"digiterm_side.png",
|
||||
"digiterm_side.png",
|
||||
"digiterm_side.png",
|
||||
"digiterm_side.png",
|
||||
"digiterm_side.png",
|
||||
"digiterm_front_off.png^bios.png"
|
||||
"updown.png",
|
||||
"updown.png",
|
||||
"right.png",
|
||||
"left.png",
|
||||
"back_off.png",
|
||||
"front_off.png^bios.png",
|
||||
},
|
||||
on_tiles = {
|
||||
"digiterm_side.png",
|
||||
"digiterm_side.png",
|
||||
"digiterm_side.png",
|
||||
"digiterm_side.png",
|
||||
"digiterm_side.png",
|
||||
"digiterm_front.png"
|
||||
"updown.png",
|
||||
"updown.png",
|
||||
"right.png",
|
||||
"left.png",
|
||||
"back.png",
|
||||
"front.png"
|
||||
},
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.125, 0.5, 0.5, 0.5}, -- computer
|
||||
}
|
||||
},
|
||||
})
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
-- bios os
|
||||
digicompute.os.clear = "clear" -- clear command
|
||||
digicompute.os.off = "shutdown" -- shutdown command
|
||||
digicompute.os.reboot = "reboot" -- reboot command
|
||||
digicompute.os.digiline = false -- do not support digilines
|
||||
digicompute.os.network = false -- do not support network
|
||||
digicompute.os.on = "rightclick" -- on command (rightclick)
|
||||
digicompute.os.clear_on_close = false -- do not clear output on close
|
||||
|
||||
-- process input
|
||||
function digicompute.os.proc_input(pos, input)
|
||||
if digicompute.os.get("output") == "" then local n = "" else local n = "\n" end -- if output blank, do not use \n
|
||||
digicompute.os.set(pos, "output", digicompute.os.get(pos, "output")..n..digicompute.os.get(pos, "name")..":~$ "..input) -- print input
|
||||
-- process command
|
||||
--if input == ""
|
||||
digicompute.os.refresh(pos) -- refresh
|
||||
end
|
After Width: | Height: | Size: 395 B |
After Width: | Height: | Size: 293 B |
After Width: | Height: | Size: 288 B |
Before Width: | Height: | Size: 181 B |
Before Width: | Height: | Size: 186 B |
Before Width: | Height: | Size: 159 B |
After Width: | Height: | Size: 258 B |
After Width: | Height: | Size: 119 B |
After Width: | Height: | Size: 116 B |
After Width: | Height: | Size: 111 B |
After Width: | Height: | Size: 129 B |