Document/cleanup legacy thatch support

Eventually these XXX-marked items should be removed once the
official release has supported the newer features for long enough.
This commit is contained in:
Aaron Suen 2021-12-02 07:22:41 -05:00
parent a7d4b709d5
commit d9e94ca2c0
3 changed files with 44 additions and 37 deletions

View File

@ -23,6 +23,7 @@ All features from WintersKnight's original NodeCore Nature mod, plus...
- Tall Grass -> Sedges - Tall Grass -> Sedges
- Flowers (N.B. some colors were changed to maintain balance) - Flowers (N.B. some colors were changed to maintain balance)
- Reeds -> Rushes (added dormant state) - Reeds -> Rushes (added dormant state)
- Thatch
- Recipe to grind vanilla dry flora into plant fibers - Recipe to grind vanilla dry flora into plant fibers
- Preserve mod flora consistent with vanilla mechanics - Preserve mod flora consistent with vanilla mechanics
- Moss Complete Overhaul - Moss Complete Overhaul

View File

@ -71,6 +71,7 @@ nodecore.register_mossy = register_mossy
register_mossy("cobble", "nc_terrain:cobble") register_mossy("cobble", "nc_terrain:cobble")
register_mossy("stone", "nc_terrain:stone") register_mossy("stone", "nc_terrain:stone")
-- XXX: LEGACY PRE-THATCH SUPPORT
register_mossy("thatch", minetest.registered_nodes["nc_flora:thatch"] register_mossy("thatch", minetest.registered_nodes["nc_flora:thatch"]
and "nc_flora:thatch" or modname .. ":thatch") and "nc_flora:thatch" or modname .. ":thatch")
register_mossy("trunk", "nc_tree:tree") register_mossy("trunk", "nc_tree:tree")

View File

@ -5,11 +5,9 @@ local include, minetest, nodecore
local modname = minetest.get_current_modname() local modname = minetest.get_current_modname()
local floraswap = include("lib_floraswap") -- ================================================================== --
if minetest.registered_nodes["nc_flora:thatch"] then -- XXX: LEGACY PRE-THATCH SUPPORT
return floraswap(modname .. ":thatch", "nc_flora:thatch") if not minetest.registered_nodes["nc_flora:thatch"] then
end
minetest.register_node(modname .. ":thatch", { minetest.register_node(modname .. ":thatch", {
description = "Thatch", description = "Thatch",
tiles = {modname .. "_thatch.png"}, tiles = {modname .. "_thatch.png"},
@ -46,3 +44,10 @@ nodecore.register_craft({
{name = modname .. ":plant_fibers 2", count = 4, scatter = 3} {name = modname .. ":plant_fibers 2", count = 4, scatter = 3}
} }
}) })
return
end
-- ================================================================== --
local floraswap = include("lib_floraswap")
floraswap(modname .. ":thatch", "nc_flora:thatch")