From 0996a83ba03ebcac22dd08f5ed23f22b447fb943 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20=C3=85str=C3=B6m?= Date: Sat, 20 Mar 2021 19:32:04 +0100 Subject: [PATCH] Assert that both parts of mcl_autogroup exist --- mods/CORE/_mcl_autogroup/init.lua | 2 ++ mods/CORE/mcl_autogroup/init.lua | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mods/CORE/_mcl_autogroup/init.lua b/mods/CORE/_mcl_autogroup/init.lua index 766641ad1d..75ed4ce2b3 100644 --- a/mods/CORE/_mcl_autogroup/init.lua +++ b/mods/CORE/_mcl_autogroup/init.lua @@ -69,6 +69,8 @@ This also means that it is very important that no mod adds _mcl_autogroup as a dependency. --]] +assert(minetest.get_modpath("mcl_autogroup"), "This mod requires the mod mcl_autogroup to function") + -- Returns a table containing the unique "_mcl_hardness" for nodes belonging to -- each diggroup. local function get_hardness_values_for_groups() diff --git a/mods/CORE/mcl_autogroup/init.lua b/mods/CORE/mcl_autogroup/init.lua index 09894dd84c..16dd831c0e 100644 --- a/mods/CORE/mcl_autogroup/init.lua +++ b/mods/CORE/mcl_autogroup/init.lua @@ -12,6 +12,8 @@ as possible. Minetest loads mods in reverse alphabetical order. mcl_autogroup = {} mcl_autogroup.registered_diggroups = {} +assert(minetest.get_modpath("_mcl_autogroup"), "This mod requires the mod _mcl_autogroup to function") + -- Register a group as a digging group. -- -- Parameters: