From 348dad3d4d48cdfc771d6104e4b5b81a943e49e2 Mon Sep 17 00:00:00 2001 From: stujones11 Date: Tue, 21 Mar 2017 15:16:58 +0000 Subject: [PATCH] Log warning of unused mods when dependencies are missing --- hazmat_suit/depends.txt | 2 +- hazmat_suit/init.lua | 5 +++++ technic_armor/depends.txt | 2 +- technic_armor/init.lua | 5 +++++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/hazmat_suit/depends.txt b/hazmat_suit/depends.txt index c83abc0..773b3fe 100644 --- a/hazmat_suit/depends.txt +++ b/hazmat_suit/depends.txt @@ -1,2 +1,2 @@ 3d_armor -technic +technic? diff --git a/hazmat_suit/init.lua b/hazmat_suit/init.lua index 9e84aef..37a747c 100644 --- a/hazmat_suit/init.lua +++ b/hazmat_suit/init.lua @@ -1,3 +1,8 @@ +if not minetest.get_modpath("technic") then + minetest.log("warning", "hazmat_suit: Mod loaded but unused.") + return +end + local part_count = 4 local level = 35 diff --git a/technic_armor/depends.txt b/technic_armor/depends.txt index 2546a84..9ccefed 100644 --- a/technic_armor/depends.txt +++ b/technic_armor/depends.txt @@ -1,3 +1,3 @@ 3d_armor -technic_worldgen +technic_worldgen? moreores? diff --git a/technic_armor/init.lua b/technic_armor/init.lua index e1a663d..9a925f7 100644 --- a/technic_armor/init.lua +++ b/technic_armor/init.lua @@ -1,3 +1,8 @@ +if not minetest.get_modpath("technic_worldgen") then + minetest.log("warning", "technic_armor: Mod loaded but unused.") + return +end + local stats = { lead = { name="Lead", material="technic:lead_ingot", armor=1.6, heal=0, use=500, radiation=80*1.1 }, brass = { name="Brass", material="technic:brass_ingot", armor=1.8, heal=0, use=650, radiation=43 },