diff options
Diffstat (limited to 'games/minimal/mods/mapgen')
-rw-r--r-- | games/minimal/mods/mapgen/init.lua | 81 | ||||
-rw-r--r-- | games/minimal/mods/mapgen/mod.conf | 3 |
2 files changed, 84 insertions, 0 deletions
diff --git a/games/minimal/mods/mapgen/init.lua b/games/minimal/mods/mapgen/init.lua new file mode 100644 index 000000000..13a186a50 --- /dev/null +++ b/games/minimal/mods/mapgen/init.lua @@ -0,0 +1,81 @@ +-- +-- Aliases for map generator outputs +-- + +-- ESSENTIAL node aliases +-- Basic nodes +minetest.register_alias("mapgen_stone", "basenodes:stone") +minetest.register_alias("mapgen_water_source", "basenodes:water_source") +minetest.register_alias("mapgen_river_water_source", "basenodes:river_water_source") + +-- Additional essential aliases for v6 +minetest.register_alias("mapgen_lava_source", "basenodes:lava_source") +minetest.register_alias("mapgen_dirt", "basenodes:dirt") +minetest.register_alias("mapgen_dirt_with_grass", "basenodes:dirt_with_grass") +minetest.register_alias("mapgen_sand", "basenodes:sand") +minetest.register_alias("mapgen_tree", "basenodes:tree") +minetest.register_alias("mapgen_leaves", "basenodes:leaves") +minetest.register_alias("mapgen_apple", "basenodes:apple") + +-- Essential alias for dungeons +minetest.register_alias("mapgen_cobble", "basenodes:cobble") + +-- Optional aliases for v6 (they all have fallback values in the engine) +if minetest.settings:get_bool("devtest_v6_mapgen_aliases", false) then + minetest.register_alias("mapgen_gravel", "basenodes:gravel") + minetest.register_alias("mapgen_desert_stone", "basenodes:desert_stone") + minetest.register_alias("mapgen_desert_sand", "basenodes:desert_sand") + minetest.register_alias("mapgen_dirt_with_snow", "basenodes:dirt_with_snow") + minetest.register_alias("mapgen_snowblock", "basenodes:snowblock") + minetest.register_alias("mapgen_snow", "basenodes:snow") + minetest.register_alias("mapgen_ice", "basenodes:ice") + minetest.register_alias("mapgen_junglegrass", "basenodes:junglegrass") + minetest.register_alias("mapgen_jungletree", "basenodes:jungletree") + minetest.register_alias("mapgen_jungleleaves", "basenodes:jungleleaves") + minetest.register_alias("mapgen_pine_tree", "basenodes:pine_tree") + minetest.register_alias("mapgen_pine_needles", "basenodes:pine_needles") +end +-- Optional alias for mossycobble (should fall back to cobble) +if minetest.settings:get_bool("devtest_dungeon_mossycobble", false) then + minetest.register_alias("mapgen_mossycobble", "basenodes:mossycobble") +end +-- Optional aliases for dungeon stairs (should fall back to full nodes) +if minetest.settings:get_bool("devtest_dungeon_stairs", false) then + minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble") + if minetest.settings:get_bool("devtest_v6_mapgen_aliases", false) then + minetest.register_alias("mapgen_stair_desert_stone", "stairs:stair_desert_stone") + end +end + +-- +-- Register biomes for biome API +-- + +minetest.clear_registered_biomes() +minetest.clear_registered_decorations() + +if minetest.settings:get_bool("devtest_register_biomes", true) then + minetest.register_biome({ + name = "mapgen:grassland", + node_top = "basenodes:dirt_with_grass", + depth_top = 1, + node_filler = "basenodes:dirt", + depth_filler = 1, + y_min = 5, + y_max = 31000, + heat_point = 50, + humidity_point = 50, + }) + + minetest.register_biome({ + name = "mapgen:grassland_ocean", + node_top = "basenodes:sand", + depth_top = 1, + node_filler = "basenodes:sand", + depth_filler = 2, + y_min = -31000, + y_max = 4, + heat_point = 50, + humidity_point = 50, + }) +end diff --git a/games/minimal/mods/mapgen/mod.conf b/games/minimal/mods/mapgen/mod.conf new file mode 100644 index 000000000..15750ccbe --- /dev/null +++ b/games/minimal/mods/mapgen/mod.conf @@ -0,0 +1,3 @@ +name = mapgen +description = Minimal map generator +depends = basenodes |