mirror of
https://codeberg.org/tenplus1/bakedclay.git
synced 2025-05-11 21:30: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"}
|
{"dark_green", "Dark Green"}
|
||||||
}
|
}
|
||||||
|
|
||||||
local techcnc_mod = minetest.get_modpath("technic_cnc")
|
|
||||||
local stairs_mod = minetest.get_modpath("stairs")
|
local stairs_mod = minetest.get_modpath("stairs")
|
||||||
local stairsplus_mod = minetest.get_modpath("moreblocks")
|
local stairsplus_mod = minetest.get_modpath("moreblocks")
|
||||||
and minetest.global_exists("stairsplus")
|
and minetest.global_exists("stairsplus")
|
||||||
@ -89,13 +88,16 @@ for _, clay in pairs(clay) do
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- register bakedclay for use in technic_cnc mod
|
-- register bakedclay for use in technic_cnc mod
|
||||||
if techcnc_mod then
|
-- defer registration until after all mods are loaded to avoid downstream
|
||||||
|
-- dependency cycles on ethereal.
|
||||||
technic_cnc.register_all("bakedclay:" .. clay[1],
|
core.register_on_mods_loaded(function()
|
||||||
{cracky = 3, not_in_creative_inventory = 1},
|
if minetest.get_modpath("technic_cnc") then
|
||||||
{"baked_clay_" .. clay[1] .. ".png"},
|
technic_cnc.register_all("bakedclay:" .. clay[1],
|
||||||
clay[2] .. " Baked Clay")
|
{cracky = 3, not_in_creative_inventory = 1},
|
||||||
end
|
{"baked_clay_" .. clay[1] .. ".png"},
|
||||||
|
clay[2] .. " Baked Clay")
|
||||||
|
end
|
||||||
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Terracotta blocks
|
-- Terracotta blocks
|
||||||
|
2
mod.conf
2
mod.conf
@ -1,4 +1,4 @@
|
|||||||
name = bakedclay
|
name = bakedclay
|
||||||
depends = default
|
depends = default
|
||||||
optional_depends = stairs, moreblocks, lucky_block, technic_cnc, flowerpot
|
optional_depends = stairs, moreblocks, lucky_block, flowerpot
|
||||||
description = Adds the ability to bake clay into blocks and colour them with dye.
|
description = Adds the ability to bake clay into blocks and colour them with dye.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user