From e2ee5c62c7d1f7814ad449bab16ac345c8e9fff8 Mon Sep 17 00:00:00 2001 From: tenplus1 Date: Wed, 26 Jul 2023 14:15:03 +0100 Subject: [PATCH] tidy compat --- api.lua | 13 +++++++++---- compatibility.lua | 10 ---------- init.lua | 5 ----- 3 files changed, 9 insertions(+), 19 deletions(-) delete mode 100644 compatibility.lua diff --git a/api.lua b/api.lua index 9be3d1d..9a25458 100644 --- a/api.lua +++ b/api.lua @@ -23,10 +23,15 @@ end -- CMI support check local use_cmi = minetest.global_exists("cmi") -mobs.mod = "redo" -mobs.version = "20230726" -mobs.intllib = S -mobs.invis = minetest.global_exists("invisibility") and invisibility or {} +mobs = { + mod = "redo", + version = "20230726", + intllib = S, + invis = minetest.global_exists("invisibility") and invisibility or {}, + node_snow = minetest.registered_aliases["mapgen_snow"] or "mcl_core:snow", + node_dirt = minetest.registered_aliases["mapgen_dirt"] or "mcl_core:dirt" +} +mobs.fallback_node = mobs.node_dirt -- localize common functions diff --git a/compatibility.lua b/compatibility.lua deleted file mode 100644 index d863098..0000000 --- a/compatibility.lua +++ /dev/null @@ -1,10 +0,0 @@ - -local mc2 = minetest.get_modpath("mcl_core") - -mobs.node_ice = minetest.registered_aliases["mapgen_ice"] or "mcl_core:ice" -mobs.node_snow = minetest.registered_aliases["mapgen_snow"] or "mcl_core:snow" -mobs.node_snowblock = minetest.registered_aliases["mapgen_snowblock"] or "mcl_core:snowblock" -mobs.node_stone = minetest.registered_aliases["mapgen_stone"] or "mcl_core:stone" -mobs.node_dirt = minetest.registered_aliases["mapgen_dirt"] or "mcl_core:dirt" - -mobs.fallback_node = mobs.node_dirt diff --git a/init.lua b/init.lua index 6539b12..0205b39 100644 --- a/init.lua +++ b/init.lua @@ -7,11 +7,6 @@ minetest.register_privilege("peaceful_player", { give_to_singleplayer = false }) --- global -mobs = {} - --- Compatibility -dofile(path .. "/compatibility.lua") -- Mob API dofile(path .. "/api.lua")