From 3a31f8fe62c5a5affcc3e4e2bdae91abeb58788b Mon Sep 17 00:00:00 2001 From: Joachim Stolberg Date: Fri, 11 Jan 2019 21:53:56 +0100 Subject: [PATCH] tubelib2 check added --- tubelib/init.lua | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/tubelib/init.lua b/tubelib/init.lua index 418401d..3d8a8de 100644 --- a/tubelib/init.lua +++ b/tubelib/init.lua @@ -93,20 +93,23 @@ minetest.register_craft({ }) -dofile(minetest.get_modpath("tubelib") .. "/tubes.lua") -dofile(minetest.get_modpath("tubelib") .. "/command.lua") --- conversion from v1.16 to v2.00 -dofile(minetest.get_modpath("tubelib") .. "/migrate.lua") -dofile(minetest.get_modpath("tubelib") .. "/states.lua") -dofile(minetest.get_modpath("tubelib") .. "/node_states.lua") -dofile(minetest.get_modpath("tubelib") .. "/pusher.lua") -dofile(minetest.get_modpath("tubelib") .. "/blackhole.lua") -dofile(minetest.get_modpath("tubelib") .. "/button.lua") -dofile(minetest.get_modpath("tubelib") .. "/lamp.lua") -dofile(minetest.get_modpath("tubelib") .. "/distributor.lua") -dofile(minetest.get_modpath("tubelib") .. "/legacy_nodes.lua") -dofile(minetest.get_modpath("tubelib") .. "/repairkit.lua") -dofile(minetest.get_modpath("tubelib") .. "/mark.lua") -dofile(minetest.get_modpath("tubelib") .. "/forceload.lua") -dofile(minetest.get_modpath("tubelib") .. "/basalt.lua") - +if tubelib2.version < 0.8 then + minetest.log("error", "TechPack/Tubelib requires tubelib2 version 0.8 or newer!!!") +else + dofile(minetest.get_modpath("tubelib") .. "/tubes.lua") + dofile(minetest.get_modpath("tubelib") .. "/command.lua") + -- conversion from v1.16 to v2.00 + dofile(minetest.get_modpath("tubelib") .. "/migrate.lua") + dofile(minetest.get_modpath("tubelib") .. "/states.lua") + dofile(minetest.get_modpath("tubelib") .. "/node_states.lua") + dofile(minetest.get_modpath("tubelib") .. "/pusher.lua") + dofile(minetest.get_modpath("tubelib") .. "/blackhole.lua") + dofile(minetest.get_modpath("tubelib") .. "/button.lua") + dofile(minetest.get_modpath("tubelib") .. "/lamp.lua") + dofile(minetest.get_modpath("tubelib") .. "/distributor.lua") + dofile(minetest.get_modpath("tubelib") .. "/legacy_nodes.lua") + dofile(minetest.get_modpath("tubelib") .. "/repairkit.lua") + dofile(minetest.get_modpath("tubelib") .. "/mark.lua") + dofile(minetest.get_modpath("tubelib") .. "/forceload.lua") + dofile(minetest.get_modpath("tubelib") .. "/basalt.lua") +end