2019-03-02 14:24:48 +03:00
|
|
|
|
2019-04-28 17:04:45 +03:00
|
|
|
if minetest.global_exists("tubelib") then
|
|
|
|
minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!")
|
|
|
|
elseif minetest.global_exists("ironage") then
|
|
|
|
minetest.log("error", "[techage] Techage can't be used together with the mod ironage!")
|
|
|
|
elseif minetest.global_exists("techpack") then
|
|
|
|
minetest.log("error", "[techage] Techage can't be used together with the modpack techpack!")
|
2019-07-13 00:27:29 +03:00
|
|
|
elseif minetest.global_exists("tubelib2") and tubelib2.version < 1.5 then
|
|
|
|
minetest.log("error", "[techage] Techage requires tubelib2 version 1.5 or newer!")
|
2019-04-28 17:04:45 +03:00
|
|
|
else
|
2019-07-02 22:33:12 +03:00
|
|
|
techage = {
|
|
|
|
NodeDef = {}, -- node registration info
|
|
|
|
}
|
|
|
|
techage.max_num_forceload_blocks = tonumber(minetest.setting_get("techage_max_num_forceload_blocks")) or 16
|
2019-04-28 17:04:45 +03:00
|
|
|
techage.basalt_stone_enabled = minetest.setting_get("techage_basalt_stone_enabled") == "true"
|
|
|
|
techage.ore_rarity = tonumber(minetest.setting_get("techage_ore_rarity")) or 1
|
|
|
|
techage.modified_recipes_enabled = minetest.setting_get("techage_modified_recipes_enabled") == "true"
|
2019-03-02 14:24:48 +03:00
|
|
|
|
2019-07-02 22:33:12 +03:00
|
|
|
-- Load support for I18n.
|
|
|
|
techage.S = minetest.get_translator("techage")
|
2019-08-17 14:33:46 +03:00
|
|
|
|
2019-09-08 22:54:34 +03:00
|
|
|
-- Debugging via "techage.Debug.dbg(text)"
|
|
|
|
techage.Debug = {
|
|
|
|
dbg = function(text, ...)
|
|
|
|
local t = string.format("%.4f %4s: ", minetest.get_us_time() / 1000000.0, topic)
|
|
|
|
if type(text) ~= "string" then
|
|
|
|
text = dump(text)
|
|
|
|
end
|
|
|
|
print(t..text, unpack({...}))
|
|
|
|
end,
|
2019-08-17 14:33:46 +03:00
|
|
|
--con = true, -- consumer modell
|
|
|
|
--pwr = true, -- power distribution
|
2019-08-18 19:02:14 +03:00
|
|
|
--sts = true, -- status plots
|
2019-08-18 02:24:34 +03:00
|
|
|
--dbg2 = true,
|
2019-08-18 19:02:14 +03:00
|
|
|
--tst = true,
|
|
|
|
--bot = true -- Signs Bot
|
2019-08-17 14:33:46 +03:00
|
|
|
}
|
2019-04-28 17:04:45 +03:00
|
|
|
|
|
|
|
-- Basis features
|
2019-07-02 22:33:12 +03:00
|
|
|
local MP = minetest.get_modpath("techage")
|
2019-04-28 17:04:45 +03:00
|
|
|
dofile(MP.."/basis/lib.lua") -- helper functions
|
2019-04-30 23:45:28 +03:00
|
|
|
dofile(MP.."/basis/gravel_lib.lua") -- ore probability
|
2019-04-28 17:04:45 +03:00
|
|
|
dofile(MP.."/basis/guide.lua") -- construction guide
|
|
|
|
dofile(MP.."/basis/node_states.lua") -- state model
|
|
|
|
dofile(MP.."/basis/tubes.lua") -- tubelib replacement
|
|
|
|
dofile(MP.."/basis/command.lua") -- tubelib replacement
|
2019-05-04 14:16:16 +03:00
|
|
|
dofile(MP.."/basis/firebox_lib.lua") -- common firebox functions
|
2019-05-27 22:12:17 +03:00
|
|
|
dofile(MP.."/basis/mark.lua")
|
2019-06-08 23:57:01 +03:00
|
|
|
dofile(MP.."/basis/assemble.lua")
|
2019-07-02 22:33:12 +03:00
|
|
|
|
|
|
|
-- Main doc
|
|
|
|
dofile(MP.."/doc/doc.lua")
|
|
|
|
dofile(MP.."/doc/ta1_doc.lua")
|
|
|
|
dofile(MP.."/doc/ta2_doc.lua")
|
|
|
|
dofile(MP.."/doc/ta3_doc.lua")
|
2019-08-31 22:19:09 +03:00
|
|
|
dofile(MP.."/doc/ta4_doc.lua")
|
2019-04-28 22:34:21 +03:00
|
|
|
|
2019-06-09 23:29:59 +03:00
|
|
|
-- Nodes1
|
2019-05-03 23:30:06 +03:00
|
|
|
dofile(MP.."/nodes/baborium.lua")
|
2019-05-11 02:21:03 +03:00
|
|
|
dofile(MP.."/nodes/usmium.lua")
|
2019-05-03 23:30:06 +03:00
|
|
|
|
2019-04-28 17:04:45 +03:00
|
|
|
-- Power networks
|
2019-05-21 01:05:53 +03:00
|
|
|
dofile(MP.."/power/power.lua")
|
2019-08-15 18:06:58 +03:00
|
|
|
dofile(MP.."/power/power2.lua")
|
2019-05-21 01:05:53 +03:00
|
|
|
dofile(MP.."/power/junction.lua")
|
2019-04-28 17:04:45 +03:00
|
|
|
dofile(MP.."/power/drive_axle.lua")
|
|
|
|
dofile(MP.."/power/steam_pipe.lua")
|
|
|
|
dofile(MP.."/power/electric_cable.lua")
|
2019-06-22 00:04:27 +03:00
|
|
|
dofile(MP.."/power/power_line.lua")
|
2019-05-21 01:05:53 +03:00
|
|
|
dofile(MP.."/power/junctionbox.lua")
|
2019-05-21 23:04:05 +03:00
|
|
|
dofile(MP.."/power/powerswitch.lua")
|
2019-08-31 02:35:46 +03:00
|
|
|
dofile(MP.."/power/protection.lua")
|
2019-09-02 23:19:34 +03:00
|
|
|
dofile(MP.."/power/ta4_pipe.lua")
|
|
|
|
dofile(MP.."/power/ta4_junction.lua")
|
2019-04-28 17:04:45 +03:00
|
|
|
|
|
|
|
-- Iron Age
|
|
|
|
dofile(MP.."/iron_age/main.lua")
|
|
|
|
dofile(MP.."/iron_age/gravelsieve.lua")
|
2019-05-01 13:01:24 +03:00
|
|
|
dofile(MP.."/iron_age/hopper.lua")
|
2019-04-28 17:04:45 +03:00
|
|
|
dofile(MP.."/iron_age/hammer.lua")
|
|
|
|
dofile(MP.."/iron_age/lighter.lua")
|
|
|
|
dofile(MP.."/iron_age/charcoalpile.lua")
|
|
|
|
dofile(MP.."/iron_age/coalburner.lua")
|
|
|
|
dofile(MP.."/iron_age/meltingpot.lua")
|
|
|
|
if techage.modified_recipes_enabled then
|
|
|
|
dofile(MP.."/iron_age/tools.lua")
|
|
|
|
end
|
|
|
|
dofile(MP.."/iron_age/recipes.lua")
|
|
|
|
if minetest.global_exists("wielded_light") then
|
|
|
|
dofile(MP.."/iron_age/meridium.lua")
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Steam Engine
|
2019-05-02 00:01:14 +03:00
|
|
|
dofile(MP.."/steam_engine/help.lua")
|
2019-04-28 17:04:45 +03:00
|
|
|
dofile(MP.."/steam_engine/firebox.lua")
|
|
|
|
dofile(MP.."/steam_engine/boiler.lua")
|
|
|
|
dofile(MP.."/steam_engine/cylinder.lua")
|
|
|
|
dofile(MP.."/steam_engine/flywheel.lua")
|
|
|
|
dofile(MP.."/steam_engine/gearbox.lua")
|
2019-05-02 00:01:14 +03:00
|
|
|
|
2019-04-28 17:04:45 +03:00
|
|
|
-- Basic Machines
|
2019-06-16 22:06:16 +03:00
|
|
|
dofile(MP.."/basis/consumer.lua") -- consumer base model
|
2019-05-21 14:15:13 +03:00
|
|
|
dofile(MP.."/basic_machines/source.lua")
|
|
|
|
dofile(MP.."/basic_machines/pusher.lua")
|
|
|
|
dofile(MP.."/basic_machines/legacy_nodes.lua")
|
|
|
|
dofile(MP.."/basic_machines/grinder.lua")
|
|
|
|
dofile(MP.."/basic_machines/distributor.lua")
|
|
|
|
dofile(MP.."/basic_machines/gravelsieve.lua")
|
|
|
|
dofile(MP.."/basic_machines/gravelrinser.lua")
|
|
|
|
dofile(MP.."/basic_machines/chest.lua")
|
|
|
|
dofile(MP.."/basic_machines/autocrafter.lua")
|
|
|
|
dofile(MP.."/basic_machines/electronic_fab.lua")
|
2019-08-29 22:43:00 +03:00
|
|
|
dofile(MP.."/basic_machines/funnel.lua")
|
2019-09-05 23:47:29 +03:00
|
|
|
dofile(MP.."/basic_machines/liquidsampler.lua")
|
2019-04-28 17:04:45 +03:00
|
|
|
|
|
|
|
-- Coal power station
|
2019-05-21 17:37:05 +03:00
|
|
|
dofile(MP.."/coal_power_station/firebox.lua")
|
|
|
|
dofile(MP.."/coal_power_station/boiler_base.lua")
|
|
|
|
dofile(MP.."/coal_power_station/boiler_top.lua")
|
|
|
|
dofile(MP.."/coal_power_station/generator.lua")
|
|
|
|
dofile(MP.."/coal_power_station/turbine.lua")
|
|
|
|
dofile(MP.."/coal_power_station/cooler.lua")
|
|
|
|
dofile(MP.."/coal_power_station/akkubox.lua")
|
2019-08-20 00:22:49 +03:00
|
|
|
dofile(MP.."/coal_power_station/power_terminal.lua")
|
2019-06-29 00:46:44 +03:00
|
|
|
|
2019-06-10 22:31:58 +03:00
|
|
|
-- Industrial Furnace
|
2019-06-11 21:31:53 +03:00
|
|
|
dofile(MP.."/furnace/help.lua")
|
2019-06-10 22:31:58 +03:00
|
|
|
dofile(MP.."/furnace/firebox.lua")
|
|
|
|
dofile(MP.."/furnace/cooking.lua")
|
|
|
|
dofile(MP.."/furnace/furnace_top.lua")
|
|
|
|
dofile(MP.."/furnace/booster.lua")
|
|
|
|
dofile(MP.."/furnace/recipes.lua")
|
|
|
|
|
2019-07-02 22:33:12 +03:00
|
|
|
-- Tools
|
|
|
|
dofile(MP.."/doc/ta_doc.lua")
|
|
|
|
dofile(MP.."/tools/trowel.lua")
|
|
|
|
dofile(MP.."/tools/repairkit.lua")
|
|
|
|
dofile(MP.."/basic_machines/blackhole.lua")
|
|
|
|
dofile(MP.."/basic_machines/forceload.lua")
|
|
|
|
|
2019-05-21 23:04:05 +03:00
|
|
|
-- Lamps
|
|
|
|
dofile(MP.."/lamps/lib.lua")
|
|
|
|
dofile(MP.."/lamps/simplelamp.lua")
|
|
|
|
dofile(MP.."/lamps/streetlamp.lua")
|
2019-05-27 00:22:29 +03:00
|
|
|
dofile(MP.."/lamps/ceilinglamp.lua")
|
|
|
|
dofile(MP.."/lamps/industriallamp1.lua")
|
|
|
|
dofile(MP.."/lamps/industriallamp2.lua")
|
2019-06-15 17:14:46 +03:00
|
|
|
dofile(MP.."/lamps/industriallamp3.lua")
|
2019-05-27 00:22:29 +03:00
|
|
|
|
|
|
|
-- Oil
|
|
|
|
dofile(MP.."/oil/explore.lua")
|
2019-06-08 23:57:01 +03:00
|
|
|
dofile(MP.."/oil/tower.lua")
|
|
|
|
dofile(MP.."/oil/drillbox.lua")
|
2019-06-09 18:20:40 +03:00
|
|
|
dofile(MP.."/oil/pumpjack.lua")
|
2019-06-29 00:46:44 +03:00
|
|
|
dofile(MP.."/oil/generator.lua")
|
2019-05-21 23:04:05 +03:00
|
|
|
|
2019-06-09 23:29:59 +03:00
|
|
|
-- Nodes2
|
|
|
|
if techage.basalt_stone_enabled then
|
|
|
|
dofile(MP.."/nodes/basalt.lua")
|
|
|
|
end
|
2019-08-25 22:16:42 +03:00
|
|
|
dofile(MP.."/nodes/gateblock.lua")
|
|
|
|
dofile(MP.."/nodes/doorblock.lua")
|
2019-09-09 23:04:16 +03:00
|
|
|
dofile(MP.."/nodes/steelmat.lua")
|
2019-06-09 23:29:59 +03:00
|
|
|
|
2019-08-07 23:26:38 +03:00
|
|
|
-- Logic
|
2019-08-24 00:35:37 +03:00
|
|
|
dofile(MP.."/logic/lib.lua")
|
2019-08-22 21:22:52 +03:00
|
|
|
dofile(MP.."/logic/terminal.lua")
|
2019-08-24 00:35:37 +03:00
|
|
|
dofile(MP.."/logic/button.lua")
|
|
|
|
dofile(MP.."/logic/detector.lua")
|
|
|
|
dofile(MP.."/logic/repeater.lua")
|
|
|
|
dofile(MP.."/logic/programmer.lua")
|
2019-08-24 11:28:58 +03:00
|
|
|
dofile(MP.."/logic/signallamp.lua")
|
2019-08-24 15:12:33 +03:00
|
|
|
dofile(MP.."/logic/sequencer.lua")
|
|
|
|
dofile(MP.."/logic/timer.lua")
|
2019-08-28 23:47:53 +03:00
|
|
|
dofile(MP.."/logic/lua_logic.lua")
|
|
|
|
dofile(MP.."/logic/node_detector.lua")
|
|
|
|
dofile(MP.."/logic/player_detector.lua")
|
2019-08-29 22:43:00 +03:00
|
|
|
dofile(MP.."/logic/cart_detector.lua")
|
2019-08-07 23:26:38 +03:00
|
|
|
|
2019-06-15 17:14:46 +03:00
|
|
|
-- Test
|
|
|
|
dofile(MP.."/recipe_checker.lua")
|
2019-08-01 23:31:43 +03:00
|
|
|
dofile(MP.."/.test/sink.lua")
|
|
|
|
dofile(MP.."/.test/source.lua")
|
|
|
|
dofile(MP.."/.test/akku.lua")
|
2019-06-16 22:06:16 +03:00
|
|
|
--dofile(MP.."/.test/switch.lua")
|
2019-08-18 02:24:34 +03:00
|
|
|
|
|
|
|
-- Solar
|
|
|
|
dofile(MP.."/nodes/silicon.lua")
|
|
|
|
dofile(MP.."/solar/minicell.lua")
|
|
|
|
|
2019-08-31 02:35:46 +03:00
|
|
|
-- Wind
|
|
|
|
dofile(MP.."/wind_turbine/rotor.lua")
|
|
|
|
dofile(MP.."/nodes/pillar.lua")
|
2019-08-31 22:19:09 +03:00
|
|
|
dofile(MP.."/wind_turbine/signallamp.lua")
|
2019-09-02 23:19:34 +03:00
|
|
|
|
|
|
|
-- TA4 Energy Storage
|
2019-09-14 00:01:55 +03:00
|
|
|
dofile(MP.."/energy_storage/heatexchanger.lua")
|
|
|
|
dofile(MP.."/energy_storage/generator.lua")
|
|
|
|
dofile(MP.."/energy_storage/turbine.lua")
|
|
|
|
dofile(MP.."/energy_storage/inlet.lua")
|
|
|
|
dofile(MP.."/energy_storage/nodes.lua")
|
|
|
|
dofile(MP.."/energy_storage/help.lua")
|
2019-09-02 23:19:34 +03:00
|
|
|
|
2019-04-28 17:04:45 +03:00
|
|
|
end
|