3 - Move coral bones deco id to biome specific file
This commit is contained in:
commit
23012e3e18
|
@ -36,16 +36,10 @@ local deco_ids_baobab = {
|
||||||
minetest.get_decoration_id('everness:baobab_savanna_baobab_tree_2')
|
minetest.get_decoration_id('everness:baobab_savanna_baobab_tree_2')
|
||||||
}
|
}
|
||||||
|
|
||||||
local deco_id_coral_bones_tree = minetest.get_decoration_id('everness:coral_forest_coral_bones_tree')
|
|
||||||
|
|
||||||
if #deco_ids_baobab > 1 then
|
if #deco_ids_baobab > 1 then
|
||||||
minetest.set_gen_notify('decoration', deco_ids_baobab)
|
minetest.set_gen_notify('decoration', deco_ids_baobab)
|
||||||
end
|
end
|
||||||
|
|
||||||
if deco_id_coral_bones_tree then
|
|
||||||
minetest.set_gen_notify('decoration', { deco_id_coral_bones_tree })
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Localise data buffer table outside the loop, to be re-used for all
|
-- Localise data buffer table outside the loop, to be re-used for all
|
||||||
-- mapchunks, therefore minimising memory use.
|
-- mapchunks, therefore minimising memory use.
|
||||||
local data = {}
|
local data = {}
|
||||||
|
@ -78,13 +72,6 @@ minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
--
|
|
||||||
-- Coral bone tree - fix light
|
|
||||||
--
|
|
||||||
for _, pos in ipairs(gennotify['decoration#' .. deco_id_coral_bones_tree] or {}) do
|
|
||||||
minetest.fix_light(vector.offset(pos, -1, -1, -1), vector.offset(pos, 14, 35, 14))
|
|
||||||
end
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Bamboo
|
-- Bamboo
|
||||||
--
|
--
|
||||||
|
|
|
@ -213,3 +213,22 @@ register_coral_grass_decoration(-0.015, 0.075, 4)
|
||||||
register_coral_grass_decoration(0, 0.06, 3)
|
register_coral_grass_decoration(0, 0.06, 3)
|
||||||
register_coral_grass_decoration(0.015, 0.045, 2)
|
register_coral_grass_decoration(0.015, 0.045, 2)
|
||||||
register_coral_grass_decoration(0.03, 0.03, 1)
|
register_coral_grass_decoration(0.03, 0.03, 1)
|
||||||
|
|
||||||
|
--
|
||||||
|
-- On Generated
|
||||||
|
--
|
||||||
|
|
||||||
|
local deco_id_coral_bones_tree = minetest.get_decoration_id('everness:coral_forest_coral_bones_tree')
|
||||||
|
|
||||||
|
minetest.set_gen_notify('decoration', { deco_id_coral_bones_tree })
|
||||||
|
|
||||||
|
minetest.register_on_generated(function(minp, maxp, blockseed)
|
||||||
|
local gennotify = minetest.get_mapgen_object('gennotify')
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Coral bone tree - fix light
|
||||||
|
--
|
||||||
|
for _, pos in ipairs(gennotify['decoration#' .. deco_id_coral_bones_tree] or {}) do
|
||||||
|
minetest.fix_light(vector.offset(pos, -1, -1, -1), vector.offset(pos, 14, 35, 14))
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
Ŝarĝante…
Reference in New Issue