Drop hardcoded node names
Wuzzy2 opened this issue · comments
The mod currently has some hardcoded node names in it. This essentially makes the mod hard-depend on default
. Not all games which have dirt, stone and dirt-with-grass also do add them in a mod named default
. So this mod will (avoidably) fail in all games without default
.
This is avoidable.
I suggest to drop the hardcoded node names. Instead, read them from mapgen aliases (minetest.registered_aliases
), i.e. mapgen_dirt
, mapgen_stone
and mapgen_dirt_with_grass
, then resolve them to their real node names.
Only if these aliases are empty or non-resolvable, fall back to the default
nodes and (maybe) write an error or warning message on mod start.