diff --git a/CHANGELOG.md b/CHANGELOG.md index b206ba2..3d65a4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [Jun 13th 2024] Update: Slimey Swamps + +- Added swamps +- Added vines +- Lilypads now spawn naturally in swamps +- Sugarcanes naturally spawn in deserts, swamps, and savannas + ## [Jun 13th 2024] Unnamed Minor Update - Added black roses. diff --git a/mods/pyutest_core/blocks.lua b/mods/pyutest_core/blocks.lua index b9acf1b..d5536b5 100644 --- a/mods/pyutest_core/blocks.lua +++ b/mods/pyutest_core/blocks.lua @@ -189,12 +189,14 @@ PyuTestCore.make_building_blocks("pyutest_core:dark_grass", "Dark Grass", {"dark PyuTestCore.make_building_blocks("pyutest_core:swampy_grass", "Swampy Grass", {"swampy-grass.png"}, nil, { ground = 1, - acid_vulnerable = 1 + acid_vulnerable = 1, + sugarcane_spawn_on = 1 }) PyuTestCore.make_building_blocks("pyutest_core:savanna_grass", "Savanna Grass", {"savanna-grass.png"}, nil, { ground = 1, - acid_vulnerable = 1 + acid_vulnerable = 1, + sugarcane_spawn_on = 1 }) PyuTestCore.make_building_blocks("pyutest_core:dirt", "Dirt", {"dirt.png"}, nil, { @@ -280,7 +282,8 @@ PyuTestCore.make_building_blocks("pyutest_core:snow", "Snow", {"snow.png"}, nil, PyuTestCore.make_building_blocks("pyutest_core:sand", "Sand", {"sand.png"}, nil, { ground = 1, acid_vulnerable = 1, - falling_node = 1 + falling_node = 1, + sugarcane_spawn_on = 1 }) PyuTestCore.make_building_blocks("pyutest_core:sandstone", "Sandstone", {"sandstone.png"}, nil, { @@ -315,6 +318,13 @@ PyuTestCore.make_building_blocks("pyutest_core:cherry_leaves", "Cherry Leaves", is_ground_content = false, }) +PyuTestCore.make_building_blocks("pyutest_core:dark_leaves", "Dark Leaves", {"dark-leaves.png"}, nil, { + acid_vulnerable = 1, + flammable = 1 +}, { + is_ground_content = false, +}) + PyuTestCore.make_building_blocks("pyutest_core:mushroom", "Mushroom", {"mushroom.png"}, nil, { flammable = 1 }, {is_ground_content = false}) @@ -562,7 +572,8 @@ PyuTestCore.make_node("pyutest_core:ladder", "Ladder", { paramtype2 = "wallmounted", selection_box = { type = "wallmounted" - } + }, + inventory_image = "vines.png" }) PyuTestCore.make_liquid = function (name, desc, groups, texture, speed, extra_conf) diff --git a/mods/pyutest_core/flowers.lua b/mods/pyutest_core/flowers.lua index bb7fdee..db38412 100644 --- a/mods/pyutest_core/flowers.lua +++ b/mods/pyutest_core/flowers.lua @@ -61,3 +61,19 @@ PyuTestCore.make_node("pyutest_core:lilypad", "Lily Pad", { PyuTestCore.make_flower("pyutest_core:maybell", "Maybell", "maybell.png", "pyutest_core:white_dye", true) PyuTestCore.make_flower("pyutest_core:orange_tulip", "Orange Tulip", "orange-tulip.png", "pyutest_core:orange_dye", true) PyuTestCore.make_flower("pyutest_core:black_rose", "Black Rose", "black-rose.png", "pyutest_core:black_dye", true) + +PyuTestCore.make_node("pyutest_core:vines", "Vines", { + block = PyuTestCore.BLOCK_BREAKABLE_INSTANT +}, {"vines.png"}, { + drawtype = "signlike", + paramtype = "light", + walkable = false, + climbable = true, + buildable_to = true, + sunlight_propagates = true, + paramtype2 = "wallmounted", + selection_box = { + type = "wallmounted" + }, + inventory_image = "vines.png" +}) diff --git a/mods/pyutest_core/init.lua b/mods/pyutest_core/init.lua index 16c0a28..0662bb4 100644 --- a/mods/pyutest_core/init.lua +++ b/mods/pyutest_core/init.lua @@ -9,6 +9,7 @@ PyuTestCore = { BLOCK_BREAKABLE_FOREVER = 1, -- Barriers. } PyuTestCore_SurfaceBottom = 1 +PyuTestCore_WorldTop = 31000 PyuTestCore_WorldBottom = -31000 PyuTestCore.get_schem_path = function (name) diff --git a/mods/pyutest_core/mapgen.lua b/mods/pyutest_core/mapgen.lua index 0f51cba..5241aa0 100644 --- a/mods/pyutest_core/mapgen.lua +++ b/mods/pyutest_core/mapgen.lua @@ -20,8 +20,8 @@ PyuTestCore_BiomeTops = { mountains = 300, mushroom_fields = 40, volcano = 70, - oillands = 45, - ice_spikes = 250 + ice_spikes = 250, + swamp = 10 } PyuTestCore.BIOME_TYPES = { @@ -43,8 +43,11 @@ PyuTestCore.BIOME_TYPES = { -- Wasteland biomes (Wastelands and Volcano for example) WASTELAND = 6, - -- Wetland biomes (Oceans and Swamps for example) - WETLAND = 7 + -- Wetland biomes (Swamps for example) + WETLAND = 7, + + -- Ocean biomes (What example do you want?) + OCEAN = 8 } PyuTestCore.get_biomes_from_type = function(type) @@ -117,7 +120,7 @@ PyuTestCore.register_biome = function(name, type, opts) y_max = 0, y_min = PyuTestCore_OceanMin }, { - _pyutest_biome_type = PyuTestCore.BIOME_TYPES.WETLAND + _pyutest_biome_type = PyuTestCore.BIOME_TYPES.OCEAN })) minetest.register_biome(PyuTestCore.util.tableconcat({ @@ -140,7 +143,7 @@ PyuTestCore.register_biome = function(name, type, opts) vertical_blend = 5 }, { - _pyutest_biome_type = PyuTestCore.BIOME_TYPES.WETLAND + _pyutest_biome_type = PyuTestCore.BIOME_TYPES.OCEAN })) minetest.register_biome({ @@ -284,10 +287,10 @@ PyuTestCore.register_biome("meadow", PyuTestCore.BIOME_TYPES.NORMAL, { depth_filler = 4, y_max = PyuTestCore_BiomeTops.mountains, - y_min = PyuTestCore_BiomeTops.grassland, + y_min = PyuTestCore_SurfaceBottom, - heat_point = 36, - humidity_point = 54, + heat_point = 32, + humidity_point = 69, _pyutest_biome_flowering = true, _pyutest_biome_flowering_extra = true @@ -368,6 +371,17 @@ PyuTestCore.register_biome("cherry_grove", PyuTestCore.BIOME_TYPES.NORMAL, { _pyutest_biome_flowering_extra = true }) +PyuTestCore.register_biome("swamp", PyuTestCore.BIOME_TYPES.WETLAND, { + node_top = "pyutest_core:swampy_grass_block", + node_filler = "pyutest_core:dirt_block", + + y_max = PyuTestCore_BiomeTops.swamp, + y_min = PyuTestCore_SurfaceBottom, + + heat_point = 30, + humidity_point = 81, +}) + -- Structures dofile(PyuTestCore_Path.."/structures.lua") diff --git a/mods/pyutest_core/schematics/tree9.mts b/mods/pyutest_core/schematics/tree9.mts new file mode 100644 index 0000000..8977724 Binary files /dev/null and b/mods/pyutest_core/schematics/tree9.mts differ diff --git a/mods/pyutest_core/textures/dark-leaves.png b/mods/pyutest_core/textures/dark-leaves.png new file mode 100644 index 0000000..2ff8f29 Binary files /dev/null and b/mods/pyutest_core/textures/dark-leaves.png differ diff --git a/mods/pyutest_core/textures/vines.png b/mods/pyutest_core/textures/vines.png new file mode 100644 index 0000000..9d690c5 Binary files /dev/null and b/mods/pyutest_core/textures/vines.png differ diff --git a/mods/pyutest_core/trees.lua b/mods/pyutest_core/trees.lua index 2c8236b..7ca6d1a 100644 --- a/mods/pyutest_core/trees.lua +++ b/mods/pyutest_core/trees.lua @@ -5,7 +5,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.009, biomes = PyuTestCore.get_flowering_biomes(), - y_max = PyuTestCore_BiomeTops.mountains, + y_max = PyuTestCore_WorldTop, y_min = 1, decoration = PyuTestCore.registered_flowers }) @@ -16,7 +16,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.032, biomes = PyuTestCore.get_extra_flowering_biomes(), - y_max = PyuTestCore_BiomeTops.mountains, + y_max = PyuTestCore_WorldTop, y_min = 1, decoration = PyuTestCore.registered_flowers }) @@ -27,7 +27,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.048, biomes = {"grassland"}, - y_max = PyuTestCore_BiomeTops.grassland, + y_max = PyuTestCore_WorldTop, y_min = 1, decoration = "pyutest_core:grass_plant" }) @@ -38,7 +38,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.0018, biomes = {"grassland"}, - y_max = PyuTestCore_BiomeTops.grassland, + y_max = PyuTestCore_WorldTop, y_min = 1, decoration = "pyutest_core:haybale_block" }) @@ -49,7 +49,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.019, biomes = {"wasteland", "desert"}, - y_max = PyuTestCore_BiomeTops.grassland, + y_max = PyuTestCore_WorldTop, y_min = 1, decoration = "pyutest_core:deadbush" }) @@ -60,11 +60,37 @@ minetest.register_decoration({ fill_ratio = 0.0045, place_on = {"pyutest_core:molten_rock_block"}, biomes = {"volcano"}, - y_max = PyuTestCore_BiomeTops.mountains, + y_max = PyuTestCore_WorldTop, y_min = PyuTestCore_SurfaceBottom, decoration = "pyutest_core:fire" }) +minetest.register_decoration({ + deco_type = "simple", + sidelen = 16, + fill_ratio = 0.03, + place_on = {"pyutest_core:water_source"}, + biomes = {"swamp", "swamp_ocean"}, + y_max = PyuTestCore_WorldTop, + y_min = 0, + decoration = "pyutest_core:lilypad", + flags = "liquid_surface" +}) + +minetest.register_decoration({ + deco_type = "simple", + sidelen = 16, + fill_ratio = 0.04, + place_on = {"group:sugarcane_spawn_on"}, + decoration = "pyutest_core:sugarcane", + y_max = PyuTestCore_SurfaceBottom, + y_min = 0, + spawn_by = {"pyutest_core:water_source"}, + num_spawn_by = 1, + height = 1, + height_max = 4 +}) + -- trees minetest.register_decoration({ deco_type = "schematic", @@ -72,7 +98,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.004, biomes = {"forest", "old_growth_forest"}, - y_max = PyuTestCore_BiomeTops.forest, + y_max = PyuTestCore_WorldTop, y_min = 1, schematic = PyuTestCore.get_schem_path("tree"), rotation = "random", @@ -86,7 +112,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.004, biomes = {"forest", "old_growth_forest"}, - y_max = PyuTestCore_BiomeTops.forest, + y_max = PyuTestCore_WorldTop, y_min = 1, schematic = PyuTestCore.get_schem_path("tree2"), rotation = "random", @@ -100,7 +126,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.00085, biomes = {"savanna"}, - y_max = PyuTestCore_BiomeTops.grassland, + y_max = PyuTestCore_WorldTop, y_min = 1, schematic = PyuTestCore.get_schem_path("tree4"), rotation = "random", @@ -114,7 +140,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.003, biomes = {"mushroom_fields"}, - y_max = PyuTestCore_BiomeTops.mushroom_fields, + y_max = PyuTestCore_WorldTop, y_min = 1, schematic = PyuTestCore.get_schem_path("mushroom"), rotation = "random", @@ -127,7 +153,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.005, biomes = {"old_growth_forest"}, - y_max = PyuTestCore_BiomeTops.forest, + y_max = PyuTestCore_WorldTop, y_min = 1, schematic = PyuTestCore.get_schem_path("mushroom"), rotation = "random", @@ -140,7 +166,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.0015, biomes = {"old_growth_forest"}, - y_max = PyuTestCore_BiomeTops.forest, + y_max = PyuTestCore_WorldTop, y_min = 1, schematic = PyuTestCore.get_schem_path("tree"), rotation = "random", @@ -153,7 +179,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.003, biomes = {"old_growth_forest"}, - y_max = PyuTestCore_BiomeTops.forest, + y_max = PyuTestCore_WorldTop, y_min = 1, schematic = PyuTestCore.get_schem_path("tree3"), rotation = "random", @@ -167,7 +193,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.005, biomes = {"taiga", "snowy_forest"}, - y_max = PyuTestCore_BiomeTops.forest, + y_max = PyuTestCore_WorldTop, y_min = 1, schematic = PyuTestCore.get_schem_path("tree5"), rotation = "random", @@ -181,7 +207,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.005, biomes = {"birch_forest"}, - y_max = PyuTestCore_BiomeTops.forest, + y_max = PyuTestCore_WorldTop, y_min = 1, schematic = PyuTestCore.get_schem_path("tree6"), rotation = "random", @@ -195,7 +221,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.005, biomes = {"birch_forest"}, - y_max = PyuTestCore_BiomeTops.forest, + y_max = PyuTestCore_WorldTop, y_min = 1, schematic = PyuTestCore.get_schem_path("tree7"), rotation = "random", @@ -209,7 +235,7 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.005, biomes = {"cherry_grove"}, - y_max = PyuTestCore_BiomeTops.forest, + y_max = PyuTestCore_WorldTop, y_min = 1, schematic = PyuTestCore.get_schem_path("tree8"), rotation = "random", @@ -223,10 +249,24 @@ minetest.register_decoration({ sidelen = 16, fill_ratio = 0.004, biomes = {"snowy_forest"}, - y_max = PyuTestCore_BiomeTops.forest, + y_max = PyuTestCore_WorldTop, y_min = 1, schematic = PyuTestCore.get_schem_path("stree"), rotation = "random", flags = "place_center_x, place_center_z", place_offset_y = 1 }) + +minetest.register_decoration({ + deco_type = "schematic", + place_on = {"pyutest_core:swampy_grass_block"}, + sidelen = 16, + fill_ratio = 0.004, + biomes = {"swamp"}, + y_max = PyuTestCore_WorldTop, + y_min = 1, + schematic = PyuTestCore.get_schem_path("tree9"), + rotation = "random", + flags = "place_center_x, place_center_z", + place_offset_y = 1 +})