Convert digilines to a mod (not modpack). (#32)

Digilines is probably used by most people in its entirety.

I've retained the ability to disable inventory, rtc, lightsensor and
LCD by the minetest settings "diglines_enable_rtc" etc.. If set to
"false", these components will not be loaded. It is assumed by default
that these are enabled.

In the conversion the digilines_lcd:lcd node was renamed to
digilines:lcd (same for all the other nodes). To retain backwards
compatibility I've provided aliases for each of these nodes.
This commit is contained in:
Auke Kok 2016-05-27 16:08:53 -07:00
parent 4c743f9c4d
commit 7ecb29e87f
121 changed files with 41 additions and 20 deletions

@ -1 +0,0 @@
digilines

@ -1 +0,0 @@
digilines

@ -1 +0,0 @@
digilines

@ -1,9 +1,11 @@
digiline = {}
dofile(minetest.get_modpath("digilines").."/presetrules.lua")
dofile(minetest.get_modpath("digilines").."/util.lua")
dofile(minetest.get_modpath("digilines").."/internal.lua")
dofile(minetest.get_modpath("digilines").."/wires_common.lua")
dofile(minetest.get_modpath("digilines").."/wire_std.lua")
local modpath = minetest.get_modpath("digilines")
dofile(modpath .. "/presetrules.lua")
dofile(modpath .. "/util.lua")
dofile(modpath .. "/internal.lua")
dofile(modpath .. "/wires_common.lua")
dofile(modpath .. "/wire_std.lua")
function digiline:receptor_send(pos, rules, channel, msg)
local checked = {}
@ -22,4 +24,21 @@ minetest.register_craft({
{'mesecons_insulated:insulated_off', 'mesecons_insulated:insulated_off', 'default:gold_ingot'},
{'mesecons_materials:fiber', 'mesecons_materials:fiber', 'mesecons_materials:fiber'},
}
})
})
-- former submods
if minetest.is_yes(minetest.setting_get("digilines_enable_inventory") or true) then
dofile(modpath .. "/inventory.lua")
end
if minetest.is_yes(minetest.setting_get("digilines_enable_lcd") or true) then
dofile(modpath .. "/lcd.lua")
end
if minetest.is_yes(minetest.setting_get("digilines_enable_lightsensor") or true) then
dofile(modpath .. "/lightsensor.lua")
end
if minetest.is_yes(minetest.setting_get("digilines_enable_rtc") or true) then
dofile(modpath .. "/rtc.lua")
end

@ -26,7 +26,8 @@ end
local tubeconn = minetest.get_modpath("pipeworks") and "^pipeworks_tube_connection_wooden.png" or ""
local tubescan = minetest.get_modpath("pipeworks") and function(pos) pipeworks.scan_for_tube_objects(pos) end or nil
minetest.register_node("digilines_inventory:chest", {
minetest.register_alias("digilines_inventory:chest", "digilines:chest")
minetest.register_node("digilines:chest", {
description = "Digiline Chest",
tiles = {
"default_chest_top.png"..tubeconn,
@ -145,6 +146,6 @@ minetest.register_node("digilines_inventory:chest", {
minetest.register_craft({
type = "shapeless",
output = "digilines_inventory:chest",
output = "digilines:chest",
recipe = {"default:chest", "digilines:wire_std_00000000"}
})

@ -3,11 +3,11 @@
-- Font: 04.jp.org
-- load characters map
local chars_file = io.open(minetest.get_modpath("digilines_lcd").."/characters", "r")
local chars_file = io.open(minetest.get_modpath("digilines").."/characters", "r")
local charmap = {}
local max_chars = 12
if not chars_file then
print("[digilines_lcd] E: character map file not found")
print("[digilines] E: LCD: character map file not found")
else
while true do
local char = chars_file:read("*l")
@ -76,7 +76,8 @@ local lcd_box = {
wall_top = {-8/16, 7/16, -8/16, 8/16, 8/16, 8/16}
}
minetest.register_node("digilines_lcd:lcd", {
minetest.register_alias("digilines_lcd:lcd", "digilines:lcd")
minetest.register_node("digilines:lcd", {
drawtype = "nodebox",
description = "Digiline LCD",
inventory_image = "lcd_lcd.png",
@ -93,7 +94,7 @@ minetest.register_node("digilines_lcd:lcd", {
after_place_node = function (pos, placer, itemstack)
local param2 = minetest.get_node(pos).param2
if param2 == 0 or param2 == 1 then
minetest.add_node(pos, {name = "digilines_lcd:lcd", param2 = 3})
minetest.add_node(pos, {name = "digilines:lcd", param2 = 3})
end
prepare_writing (pos)
end,
@ -128,7 +129,7 @@ minetest.register_node("digilines_lcd:lcd", {
light_source = 6,
})
minetest.register_entity("digilines_lcd:text", {
minetest.register_entity(":digilines_lcd:text", {
collisionbox = { 0, 0, 0, 0, 0, 0 },
visual = "upright_sprite",
textures = {},
@ -202,7 +203,7 @@ generate_line = function(s, ypos)
file = charmap[s:sub(i, i + 1)]
i = i + 2
else
print("[digilines_lcd] W: unknown symbol in '"..s.."' at "..i)
print("[digilines] W: LCD: unknown symbol in '"..s.."' at "..i)
i = i + 1
end
if file ~= nil then
@ -223,7 +224,7 @@ generate_line = function(s, ypos)
end
minetest.register_craft({
output = "digilines_lcd:lcd 2",
output = "digilines:lcd 2",
recipe = {
{"default:steel_ingot", "digilines:wire_std_00000000", "default:steel_ingot"},
{"mesecons_lightstone:lightstone_green_off","mesecons_lightstone:lightstone_green_off","mesecons_lightstone:lightstone_green_off"},

@ -29,7 +29,8 @@ local on_digiline_receive = function (pos, node, channel, msg)
end
end
minetest.register_node("digilines_lightsensor:lightsensor", {
minetest.register_alias("digilines_lightsensor:lightsensor", "digilines:lightsensor")
minetest.register_node("digilines:lightsensor", {
description = "Digiline Lightsensor",
drawtype = "nodebox",
tiles = {"digilines_lightsensor.png"},

1
mod.conf Normal file

@ -0,0 +1 @@
name = digilines

@ -24,7 +24,8 @@ local on_digiline_receive = function (pos, node, channel, msg)
end
end
minetest.register_node("digilines_rtc:rtc", {
minetest.register_alias("digilines_rtc:rtc", "digilines:rtc")
minetest.register_node("digilines:rtc", {
description = "Digiline Real Time Clock (RTC)",
drawtype = "nodebox",
tiles = {"digilines_rtc.png"},

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 239 B

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 238 B

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 235 B

Before

Width:  |  Height:  |  Size: 241 B

After

Width:  |  Height:  |  Size: 241 B

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 237 B

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 243 B

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 235 B

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 245 B

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 238 B

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 251 B

Before

Width:  |  Height:  |  Size: 156 B

After

Width:  |  Height:  |  Size: 156 B

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 238 B

Before

Width:  |  Height:  |  Size: 254 B

After

Width:  |  Height:  |  Size: 254 B

Before

Width:  |  Height:  |  Size: 249 B

After

Width:  |  Height:  |  Size: 249 B

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 237 B

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 237 B

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 236 B

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 239 B

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 231 B

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 233 B

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 226 B

Before

Width:  |  Height:  |  Size: 135 B

After

Width:  |  Height:  |  Size: 135 B

Before

Width:  |  Height:  |  Size: 234 B

After

Width:  |  Height:  |  Size: 234 B

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 243 B

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 239 B

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 239 B

Before

Width:  |  Height:  |  Size: 224 B

After

Width:  |  Height:  |  Size: 224 B

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 235 B

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 242 B

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

Before

Width:  |  Height:  |  Size: 230 B

After

Width:  |  Height:  |  Size: 230 B

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 244 B

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 251 B

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 243 B

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 248 B

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 252 B

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 233 B

Before

Width:  |  Height:  |  Size: 144 B

After

Width:  |  Height:  |  Size: 144 B

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 237 B

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 239 B

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 243 B

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 247 B

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 243 B

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 238 B

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 242 B

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 227 B

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 244 B

Before

Width:  |  Height:  |  Size: 228 B

After

Width:  |  Height:  |  Size: 228 B

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 248 B

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 252 B

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 238 B

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 239 B

Before

Width:  |  Height:  |  Size: 250 B

After

Width:  |  Height:  |  Size: 250 B

Before

Width:  |  Height:  |  Size: 246 B

After

Width:  |  Height:  |  Size: 246 B

Before

Width:  |  Height:  |  Size: 255 B

After

Width:  |  Height:  |  Size: 255 B

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 235 B

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 251 B

Before

Width:  |  Height:  |  Size: 242 B

After

Width:  |  Height:  |  Size: 242 B

Before

Width:  |  Height:  |  Size: 232 B

After

Width:  |  Height:  |  Size: 232 B

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 233 B

Before

Width:  |  Height:  |  Size: 241 B

After

Width:  |  Height:  |  Size: 241 B

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 248 B

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 243 B

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 239 B

Before

Width:  |  Height:  |  Size: 243 B

After

Width:  |  Height:  |  Size: 243 B

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 227 B

Before

Width:  |  Height:  |  Size: 215 B

After

Width:  |  Height:  |  Size: 215 B

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 236 B

Before

Width:  |  Height:  |  Size: 241 B

After

Width:  |  Height:  |  Size: 241 B

Before

Width:  |  Height:  |  Size: 249 B

After

Width:  |  Height:  |  Size: 249 B

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 227 B

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 252 B

Before

Width:  |  Height:  |  Size: 226 B

After

Width:  |  Height:  |  Size: 226 B

Before

Width:  |  Height:  |  Size: 249 B

After

Width:  |  Height:  |  Size: 249 B

Some files were not shown because too many files have changed in this diff Show More