From 1ae352ec6d074d5a1b0716b51b35947594bc00eb Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Sun, 5 Jun 2022 01:38:30 +0200 Subject: [PATCH] Generate algae (WIP) --- mods/rp_default/mapgen_deco.lua | 132 +++++++++++++++++- .../rp_default_algae_blocks_3step.mts | Bin 0 -> 71 bytes .../rp_default_algae_blocks_3x3.mts | Bin 0 -> 75 bytes .../rp_default_algae_blocks_4x4.mts | Bin 0 -> 81 bytes .../rp_default_algae_blocks_big.mts | Bin 0 -> 103 bytes .../rp_default_algae_blocks_cross.mts | Bin 0 -> 75 bytes .../rp_default_algae_blocks_diamond.mts | Bin 0 -> 93 bytes 7 files changed, 129 insertions(+), 3 deletions(-) create mode 100644 mods/rp_default/schematics/rp_default_algae_blocks_3step.mts create mode 100644 mods/rp_default/schematics/rp_default_algae_blocks_3x3.mts create mode 100644 mods/rp_default/schematics/rp_default_algae_blocks_4x4.mts create mode 100644 mods/rp_default/schematics/rp_default_algae_blocks_big.mts create mode 100644 mods/rp_default/schematics/rp_default_algae_blocks_cross.mts create mode 100644 mods/rp_default/schematics/rp_default_algae_blocks_diamond.mts diff --git a/mods/rp_default/mapgen_deco.lua b/mods/rp_default/mapgen_deco.lua index 67ad2a66..268779b6 100644 --- a/mods/rp_default/mapgen_deco.lua +++ b/mods/rp_default/mapgen_deco.lua @@ -1692,23 +1692,149 @@ default.register_decoration( y_max = default.GLOBAL_Y_MAX, }) + -- Algae (selected biomes) +default.register_decoration( + { + deco_type = "schematic", + place_on = {"rp_default:swamp_dirt", "rp_default:dirt", "rp_default:sand"}, + sidelen = 16, + fill_ratio = 0.005, + schematic = minetest.get_modpath("rp_default").."/schematics/rp_default_algae_blocks_big.mts", + rotation = "random", + y_min = default.GLOBAL_Y_MIN, + y_max = -9, + place_offset_y = 0, + spawn_by = { "rp_default:water_source", "rp_default:river_water_source", "rp_default:swamp_water_source" }, + num_spawn_by = 1, + flags = "force_placement,place_center_x,place_center_z", +}) +default.register_decoration( + { + deco_type = "schematic", + place_on = {"rp_default:swamp_dirt", "rp_default:dirt", "rp_default:sand"}, + sidelen = 16, + fill_ratio = 0.005, + schematic = minetest.get_modpath("rp_default").."/schematics/rp_default_algae_blocks_diamond.mts", + rotation = "random", + y_min = default.GLOBAL_Y_MIN, + y_max = -5, + place_offset_y = 0, + spawn_by = { "rp_default:water_source", "rp_default:river_water_source", "rp_default:swamp_water_source" }, + num_spawn_by = 1, + flags = "force_placement,place_center_x,place_center_z", +}) +default.register_decoration( + { + deco_type = "schematic", + place_on = {"rp_default:swamp_dirt", "rp_default:dirt", "rp_default:sand"}, + sidelen = 16, + fill_ratio = 0.005, + schematic = minetest.get_modpath("rp_default").."/schematics/rp_default_algae_blocks_4x4.mts", + rotation = "random", + y_min = default.GLOBAL_Y_MIN, + y_max = -4, + place_offset_y = 0, + spawn_by = { "rp_default:water_source", "rp_default:river_water_source", "rp_default:swamp_water_source" }, + num_spawn_by = 1, + flags = "force_placement,place_center_x,place_center_z", +}) +default.register_decoration( + { + deco_type = "schematic", + place_on = {"rp_default:swamp_dirt", "rp_default:dirt", "rp_default:sand"}, + sidelen = 16, + fill_ratio = 0.005, + schematic = minetest.get_modpath("rp_default").."/schematics/rp_default_algae_blocks_cross.mts", + rotation = "random", + y_min = default.GLOBAL_Y_MIN, + y_max = -2, + place_offset_y = 0, + spawn_by = { "rp_default:water_source", "rp_default:river_water_source", "rp_default:swamp_water_source" }, + num_spawn_by = 1, + flags = "force_placement,place_center_x,place_center_z", +}) +default.register_decoration( + { + deco_type = "schematic", + place_on = {"rp_default:swamp_dirt", "rp_default:dirt", "rp_default:sand"}, + sidelen = 16, + fill_ratio = 0.005, + schematic = minetest.get_modpath("rp_default").."/schematics/rp_default_algae_blocks_3x3.mts", + rotation = "random", + y_min = default.GLOBAL_Y_MIN, + y_max = -2, + place_offset_y = 0, + spawn_by = { "rp_default:water_source", "rp_default:river_water_source", "rp_default:swamp_water_source" }, + num_spawn_by = 1, + flags = "force_placement,place_center_x,place_center_z", +}) +default.register_decoration( + { + deco_type = "schematic", + place_on = {"rp_default:swamp_dirt", "rp_default:dirt", "rp_default:sand"}, + sidelen = 16, + fill_ratio = 0.005, + schematic = minetest.get_modpath("rp_default").."/schematics/rp_default_algae_blocks_3step.mts", + rotation = "random", + y_min = default.GLOBAL_Y_MIN, + y_max = -3, + place_offset_y = 0, + spawn_by = { "rp_default:water_source", "rp_default:river_water_source", "rp_default:swamp_water_source" }, + num_spawn_by = 1, + flags = "force_placement,place_center_x,place_center_z", +}) + + for h=1,5 do default.register_decoration( { deco_type = "simple", place_on = "rp_default:dirt", sidelen = 16, - fill_ratio = 0.04, + fill_ratio = 0.01, decoration = {"rp_default:alga_on_dirt"}, y_min = default.GLOBAL_Y_MIN, - y_max = -1, + y_max = -h + 1, spawn_by = { "rp_default:water_source", "rp_default:river_water_source", "rp_default:swamp_water_source" }, num_spawn_by = 1, place_offset_y = -1, - param2 = 1*16, + param2 = h*16, flags = "force_placement", }) + + default.register_decoration( + { + deco_type = "simple", + place_on = "rp_default:swamp_dirt", + sidelen = 16, + fill_ratio = 0.01, + decoration = {"rp_default:alga_on_swamp_dirt"}, + y_min = default.GLOBAL_Y_MIN, + y_max = -(h+2) + 1, + spawn_by = { "rp_default:water_source", "rp_default:river_water_source", "rp_default:swamp_water_source" }, + num_spawn_by = 1, + place_offset_y = -1, + param2 = (h+2)*16, + flags = "force_placement", + }) + + default.register_decoration( + { + deco_type = "simple", + place_on = {"rp_default:alga_block"}, + sidelen = 16, + fill_ratio = 0.005, + decoration = {"rp_default:alga_on_alga_block"}, + y_min = default.GLOBAL_Y_MIN, + y_max = -h, + spawn_by = { "rp_default:water_source", "rp_default:river_water_source", "rp_default:swamp_water_source" }, + place_offset = -1, + num_spawn_by = 1, + param2 = h*16, + flags = "force_placement", + }) + end diff --git a/mods/rp_default/schematics/rp_default_algae_blocks_3step.mts b/mods/rp_default/schematics/rp_default_algae_blocks_3step.mts new file mode 100644 index 0000000000000000000000000000000000000000..19722b0911174d1e933c6e58e36ebfdb26ca48f5 GIT binary patch literal 71 zcmeYb3HD`RVPIllW?-tXuLm+jiwfdXQqvMkb4sidbJ7#zlXCKtvl*BZGm9$bBqua5 ZxmmCs{`IS+s*R51`4Ir+)i49tm{MHO?B6BwA? dG~Cz|KK}Yu)yBf6Fmu8LhQwqhhRyzLF#rs<7U%!~ literal 0 HcmV?d00001 diff --git a/mods/rp_default/schematics/rp_default_algae_blocks_4x4.mts b/mods/rp_default/schematics/rp_default_algae_blocks_4x4.mts new file mode 100644 index 0000000000000000000000000000000000000000..ea54aee39df2bf7484e6e1e64b0b8803cf25ddc7 GIT binary patch literal 81 zcmeYb3HD`R0YWAQmil@i$()#3#2{K!5TBBomROooVwISao*18$lb@VjF()}8A%Vq- hC85QMO+{#C|GItq6IYpnCvE@$ literal 0 HcmV?d00001 diff --git a/mods/rp_default/schematics/rp_default_algae_blocks_cross.mts b/mods/rp_default/schematics/rp_default_algae_blocks_cross.mts new file mode 100644 index 0000000000000000000000000000000000000000..9f64c622f5899982ca709bdd7c8ab3894e21fac9 GIT binary patch literal 75 zcmeYb3HD`RVPIxpVqmVX2a$=HMGT@v1@S4VX^EvdC0251`4Ir+)i6?2jk5)x7x c7~Kq7Iu(uxA8@H<>X>+-L6m{P)tV^{00sCK&;S4c literal 0 HcmV?d00001 diff --git a/mods/rp_default/schematics/rp_default_algae_blocks_diamond.mts b/mods/rp_default/schematics/rp_default_algae_blocks_diamond.mts new file mode 100644 index 0000000000000000000000000000000000000000..bab8f38128a51d3800361a4f0b64e445efb721e0 GIT binary patch literal 93 zcmeYb3HD`RVPIuoVqmSW2a?Q*nMDkuMFsIGscDI&IVDz!Iq8Y w*h&s?v>BK=u_$#-I2zJ^bq|ZhVmrn|zAM(V8wm>uO*k^)%0wOp`!DQy0MeWt_5c6? literal 0 HcmV?d00001