new nodebox and textures

master
octacian 2016-07-14 08:13:03 -07:00
parent 5a07f0962e
commit 7a139ee9f9
15 changed files with 78 additions and 20 deletions

12
api.lua
View File

@ -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 = {

23
compute.lua Normal file
View File

@ -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
}
}
})

View File

@ -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
}
},
})

17
os/bios.lua Normal file
View File

@ -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

BIN
textures/back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

BIN
textures/back_off.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 293 B

BIN
textures/bios.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

BIN
textures/front.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

BIN
textures/front_off.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

BIN
textures/left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 B

BIN
textures/right.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 B

BIN
textures/updown.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B