mirror of
https://codeberg.org/tenplus1/bakedclay.git
synced 2025-05-11 05:10:29 +02:00
defer technic_cnc registrations and rm dep on it
- Resolves the multi-mod dependency cycle: ethereal --> bakedclay --> technic_cnc --> technic --> i3 --> 3d_armor --> ethereal - Defers technic_cnc registrations until after mods are loaded - Removes dep on technic_cnc
This commit is contained in:
parent
4af6f35734
commit
0ed5487802
18
init.lua
18
init.lua
@ -20,7 +20,6 @@ local clay = {
|
||||
{"dark_green", "Dark Green"}
|
||||
}
|
||||
|
||||
local techcnc_mod = minetest.get_modpath("technic_cnc")
|
||||
local stairs_mod = minetest.get_modpath("stairs")
|
||||
local stairsplus_mod = minetest.get_modpath("moreblocks")
|
||||
and minetest.global_exists("stairsplus")
|
||||
@ -89,13 +88,16 @@ for _, clay in pairs(clay) do
|
||||
end
|
||||
|
||||
-- register bakedclay for use in technic_cnc mod
|
||||
if techcnc_mod then
|
||||
|
||||
technic_cnc.register_all("bakedclay:" .. clay[1],
|
||||
{cracky = 3, not_in_creative_inventory = 1},
|
||||
{"baked_clay_" .. clay[1] .. ".png"},
|
||||
clay[2] .. " Baked Clay")
|
||||
end
|
||||
-- defer registration until after all mods are loaded to avoid downstream
|
||||
-- dependency cycles on ethereal.
|
||||
core.register_on_mods_loaded(function()
|
||||
if minetest.get_modpath("technic_cnc") then
|
||||
technic_cnc.register_all("bakedclay:" .. clay[1],
|
||||
{cracky = 3, not_in_creative_inventory = 1},
|
||||
{"baked_clay_" .. clay[1] .. ".png"},
|
||||
clay[2] .. " Baked Clay")
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
-- Terracotta blocks
|
||||
|
Loading…
x
Reference in New Issue
Block a user