Renamed digimons to digiterms
|
@ -1,5 +1,5 @@
|
|||
# Digimons - Digilines Monitors
|
||||
Digilines monitors mod for Minetest using Display API / Font API.
|
||||
# Digiterms - Digilines Terminals
|
||||
Digilines monitors and keyboards mod for Minetest using Display API / Font API.
|
||||
|
||||
**Version**: Alpha
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
--[[
|
||||
digimons mod for Minetest - Digiline monitors using Display API / Font API
|
||||
digiterms mod for Minetest - Digiline monitors using Display API / Font API
|
||||
(c) Pierre-Yves Rollo
|
||||
|
||||
This file is part of digimons.
|
||||
This file is part of digiterms.
|
||||
|
||||
signs is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -18,7 +18,7 @@
|
|||
along with signs. If not, see <http://www.gnu.org/licenses/>.
|
||||
--]]
|
||||
|
||||
digimons.columns = 30
|
||||
digiterms.columns = 30
|
||||
|
||||
local function get_lines(pos)
|
||||
local lines = {}
|
||||
|
@ -58,9 +58,9 @@ local function push_text(lines, text, maxlines, maxcolumns)
|
|||
until (pos > (#text + 1))
|
||||
end
|
||||
|
||||
function digimons.push_text_on_screen(pos, text)
|
||||
function digiterms.push_text_on_screen(pos, text)
|
||||
local lines = get_lines(pos)
|
||||
push_text(lines, text, 6, digimons.columns)
|
||||
push_text(lines, text, 6, digiterms.columns)
|
||||
set_lines(pos, lines)
|
||||
display_api.update_entities(pos)
|
||||
end
|
||||
|
|
22
init.lua
|
@ -1,8 +1,8 @@
|
|||
--[[
|
||||
digimons mod for Minetest - Digiline monitors using Display API / Font API
|
||||
digiterms mod for Minetest - Digiline monitors using Display API / Font API
|
||||
(c) Pierre-Yves Rollo
|
||||
|
||||
This file is part of digimons.
|
||||
This file is part of digiterms.
|
||||
|
||||
signs is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -18,14 +18,14 @@
|
|||
along with signs. If not, see <http://www.gnu.org/licenses/>.
|
||||
--]]
|
||||
|
||||
digimons = {}
|
||||
digimons.name = minetest.get_current_modname()
|
||||
digimons.path = minetest.get_modpath(digimons.name)
|
||||
digimons.font = "mozart"
|
||||
digiterms = {}
|
||||
digiterms.name = minetest.get_current_modname()
|
||||
digiterms.path = minetest.get_modpath(digiterms.name)
|
||||
digiterms.font = "mozart"
|
||||
|
||||
dofile(digimons.path.."/font_mozart.lua")
|
||||
dofile(digimons.path.."/functions.lua")
|
||||
dofile(digimons.path.."/nodes.lua")
|
||||
--dofile(digimons.path.."/crafts.lua")
|
||||
dofile(digiterms.path.."/font_mozart.lua")
|
||||
dofile(digiterms.path.."/functions.lua")
|
||||
dofile(digiterms.path.."/nodes.lua")
|
||||
--dofile(digiterms.path.."/crafts.lua")
|
||||
|
||||
display_api.register_display_entity("digimons:screen")
|
||||
display_api.register_display_entity("digiterms:screen")
|
||||
|
|
36
nodes.lua
|
@ -1,8 +1,8 @@
|
|||
--[[
|
||||
digimons mod for Minetest - Digilines monitors using Display API / Font API
|
||||
digiterms mod for Minetest - Digilines monitors using Display API / Font API
|
||||
(c) Pierre-Yves Rollo
|
||||
|
||||
This file is part of digimons.
|
||||
This file is part of digiterms.
|
||||
|
||||
signs is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -50,13 +50,13 @@ local common_node_def = {
|
|||
if channel ~= minetest.get_meta(pos):get_string("channel") then
|
||||
return
|
||||
end
|
||||
digimons.push_text_on_screen(pos, msg)
|
||||
digiterms.push_text_on_screen(pos, msg)
|
||||
end,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
function digimons.register_monitor(nodename, nodedef)
|
||||
function digiterms.register_monitor(nodename, nodedef)
|
||||
def = table.copy(common_node_def)
|
||||
for key, value in pairs(nodedef) do
|
||||
if key == 'groups' then
|
||||
|
@ -71,14 +71,14 @@ function digimons.register_monitor(nodename, nodedef)
|
|||
minetest.register_node(nodename, def)
|
||||
end
|
||||
|
||||
digimons.register_monitor('digimons:cathodic_amber_monitor', {
|
||||
digiterms.register_monitor('digiterms:cathodic_amber_monitor', {
|
||||
description = "Cathodic amber monitor",
|
||||
sunlight_propagates = false,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = { "digimons_amber_top.png", "digimons_amber_bottom.png",
|
||||
"digimons_amber_sides.png", "digimons_amber_sides.png^[transformFX]",
|
||||
"digimons_amber_back.png", "digimons_amber_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.png",},
|
||||
drawtype = "nodebox",
|
||||
groups = {choppy = 1, oddly_breakable_by_hand = 1},
|
||||
node_box = {
|
||||
|
@ -93,25 +93,25 @@ digimons.register_monitor('digimons:cathodic_amber_monitor', {
|
|||
},
|
||||
},
|
||||
display_entities = {
|
||||
["digimons:screen"] = {
|
||||
["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 = 30, maxlines = 6,
|
||||
color = "#FFA000", font_name = digimons.font, halign="left", valing="top",
|
||||
columns = 20, lines = 6,
|
||||
color = "#FFA000", font_name = digiterms.font, halign="left", valing="top",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
digimons.register_monitor('digimons:cathodic_green_monitor', {
|
||||
digiterms.register_monitor('digiterms:cathodic_green_monitor', {
|
||||
description = "Cathodic green monitor",
|
||||
sunlight_propagates = false,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
tiles = { "digimons_green_top.png", "digimons_green_bottom.png",
|
||||
"digimons_green_sides.png", "digimons_green_sides.png^[transformFX]",
|
||||
"digimons_green_back.png", "digimons_green_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.png",},
|
||||
drawtype = "nodebox",
|
||||
groups = {choppy = 1, oddly_breakable_by_hand = 1},
|
||||
node_box = {
|
||||
|
@ -126,13 +126,13 @@ digimons.register_monitor('digimons:cathodic_green_monitor', {
|
|||
},
|
||||
},
|
||||
display_entities = {
|
||||
["digimons:screen"] = {
|
||||
["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 = 30, lines = 6,
|
||||
color = "#00FF00", font_name = digimons.font, halign="left", valing="top",
|
||||
columns = 20, lines = 6,
|
||||
color = "#00FF00", font_name = digiterms.font, halign="left", valing="top",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
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 |
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 |
Before Width: | Height: | Size: 612 B After Width: | Height: | Size: 612 B |
Before Width: | Height: | Size: 576 B After Width: | Height: | Size: 576 B |