From 192ddf052ba496a8ea7cd609338e08105bd62cab Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 27 Feb 2016 04:20:45 +0000 Subject: [PATCH] New map --- minetest.conf | 11 +- mods/default/mapgen.lua | 721 ++++++++++++++++-- mods/default/schematics/acacia_tree.mts | Bin 0 -> 204 bytes .../schematics/acacia_tree_from_sapling.mts | Bin 0 -> 205 bytes mods/default/schematics/apple_tree.mts | Bin 0 -> 163 bytes .../schematics/apple_tree_from_sapling.mts | Bin 0 -> 167 bytes mods/default/schematics/aspen_tree.mts | Bin 0 -> 179 bytes .../schematics/aspen_tree_from_sapling.mts | Bin 0 -> 171 bytes mods/default/schematics/jungle_tree.mts | Bin 0 -> 251 bytes .../schematics/jungle_tree_from_sapling.mts | Bin 0 -> 246 bytes mods/default/schematics/large_cactus.mts | Bin 0 -> 94 bytes mods/default/schematics/papyrus.mts | Bin 0 -> 99 bytes mods/default/schematics/pine_tree.mts | Bin 0 -> 175 bytes .../schematics/pine_tree_from_sapling.mts | Bin 0 -> 172 bytes mods/default/textures/character.png | Bin 0 -> 2754 bytes .../textures/default_acacia_leaves.png | Bin 0 -> 444 bytes .../textures/default_acacia_sapling.png | Bin 0 -> 359 bytes mods/default/textures/default_acacia_tree.png | Bin 0 -> 682 bytes .../textures/default_acacia_tree_top.png | Bin 0 -> 731 bytes mods/default/textures/default_acacia_wood.png | Bin 0 -> 261 bytes .../default/textures/default_aspen_leaves.png | Bin 0 -> 761 bytes .../textures/default_aspen_sapling.png | Bin 0 -> 320 bytes mods/default/textures/default_aspen_tree.png | Bin 0 -> 695 bytes .../textures/default_aspen_tree_top.png | Bin 0 -> 656 bytes mods/default/textures/default_aspen_wood.png | Bin 0 -> 373 bytes .../default/textures/default_book_written.png | Bin 0 -> 228 bytes mods/default/textures/default_chest_front.png | Bin 0 -> 423 bytes mods/default/textures/default_chest_lock.png | Bin 0 -> 469 bytes mods/default/textures/default_chest_side.png | Bin 0 -> 375 bytes mods/default/textures/default_chest_top.png | Bin 0 -> 422 bytes mods/default/textures/default_dry_grass.png | Bin 0 -> 303 bytes mods/default/textures/default_dry_grass_1.png | Bin 0 -> 219 bytes mods/default/textures/default_dry_grass_2.png | Bin 0 -> 265 bytes mods/default/textures/default_dry_grass_3.png | Bin 0 -> 295 bytes mods/default/textures/default_dry_grass_4.png | Bin 0 -> 316 bytes mods/default/textures/default_dry_grass_5.png | Bin 0 -> 339 bytes .../textures/default_dry_grass_side.png | Bin 0 -> 285 bytes mods/default/textures/default_dry_shrub.png | Bin 0 -> 148 bytes mods/default/textures/default_footprint.png | Bin 0 -> 466 bytes mods/default/textures/default_grass_1.png | Bin 0 -> 2944 bytes mods/default/textures/default_grass_2.png | Bin 0 -> 2980 bytes mods/default/textures/default_grass_3.png | Bin 0 -> 3065 bytes mods/default/textures/default_grass_4.png | Bin 0 -> 3134 bytes mods/default/textures/default_grass_5.png | Bin 0 -> 3269 bytes mods/default/textures/default_junglegrass.png | Bin 0 -> 197 bytes .../textures/default_jungleleaves_simple.png | Bin 0 -> 430 bytes .../textures/default_leaves_simple.png | Bin 0 -> 817 bytes .../default_obsidian_glass_detail.png | Bin 0 -> 1167 bytes mods/default/textures/default_pine_tree.png | Bin 0 -> 280 bytes .../textures/default_pine_tree_top.png | Bin 0 -> 574 bytes mods/default/textures/default_pine_wood.png | Bin 0 -> 223 bytes mods/tsm_chests/init.lua | 221 +++--- 52 files changed, 800 insertions(+), 153 deletions(-) mode change 100644 => 100755 mods/default/mapgen.lua create mode 100755 mods/default/schematics/acacia_tree.mts create mode 100755 mods/default/schematics/acacia_tree_from_sapling.mts create mode 100755 mods/default/schematics/apple_tree.mts create mode 100755 mods/default/schematics/apple_tree_from_sapling.mts create mode 100755 mods/default/schematics/aspen_tree.mts create mode 100755 mods/default/schematics/aspen_tree_from_sapling.mts create mode 100755 mods/default/schematics/jungle_tree.mts create mode 100755 mods/default/schematics/jungle_tree_from_sapling.mts create mode 100755 mods/default/schematics/large_cactus.mts create mode 100755 mods/default/schematics/papyrus.mts create mode 100755 mods/default/schematics/pine_tree.mts create mode 100755 mods/default/schematics/pine_tree_from_sapling.mts create mode 100755 mods/default/textures/character.png create mode 100755 mods/default/textures/default_acacia_leaves.png create mode 100755 mods/default/textures/default_acacia_sapling.png create mode 100755 mods/default/textures/default_acacia_tree.png create mode 100755 mods/default/textures/default_acacia_tree_top.png create mode 100755 mods/default/textures/default_acacia_wood.png create mode 100755 mods/default/textures/default_aspen_leaves.png create mode 100755 mods/default/textures/default_aspen_sapling.png create mode 100755 mods/default/textures/default_aspen_tree.png create mode 100755 mods/default/textures/default_aspen_tree_top.png create mode 100755 mods/default/textures/default_aspen_wood.png create mode 100755 mods/default/textures/default_book_written.png create mode 100755 mods/default/textures/default_chest_front.png create mode 100755 mods/default/textures/default_chest_lock.png create mode 100755 mods/default/textures/default_chest_side.png create mode 100755 mods/default/textures/default_chest_top.png create mode 100755 mods/default/textures/default_dry_grass.png create mode 100755 mods/default/textures/default_dry_grass_1.png create mode 100755 mods/default/textures/default_dry_grass_2.png create mode 100755 mods/default/textures/default_dry_grass_3.png create mode 100755 mods/default/textures/default_dry_grass_4.png create mode 100755 mods/default/textures/default_dry_grass_5.png create mode 100755 mods/default/textures/default_dry_grass_side.png create mode 100755 mods/default/textures/default_dry_shrub.png create mode 100755 mods/default/textures/default_footprint.png create mode 100755 mods/default/textures/default_grass_1.png create mode 100755 mods/default/textures/default_grass_2.png create mode 100755 mods/default/textures/default_grass_3.png create mode 100755 mods/default/textures/default_grass_4.png create mode 100755 mods/default/textures/default_grass_5.png create mode 100755 mods/default/textures/default_junglegrass.png create mode 100755 mods/default/textures/default_jungleleaves_simple.png create mode 100755 mods/default/textures/default_leaves_simple.png create mode 100755 mods/default/textures/default_obsidian_glass_detail.png create mode 100755 mods/default/textures/default_pine_tree.png create mode 100755 mods/default/textures/default_pine_tree_top.png create mode 100755 mods/default/textures/default_pine_wood.png mode change 100644 => 100755 mods/tsm_chests/init.lua diff --git a/minetest.conf b/minetest.conf index 8a24057..4f7e502 100644 --- a/minetest.conf +++ b/minetest.conf @@ -1,14 +1,15 @@ give_initial_stuff = true enable_pvp = true -fixed_map_seed = 16790241579520694642 -mg_name = v6 -mgv6_spflags = nojungles, biomeblend, mudflow, nosnowbiomes, noflat +fixed_map_seed = 13389864206935783704 +mg_name = v7 +mg_flags = nocaves,nodungeons,light,decorations map_generation_limit = 160 vote.kick_vote = false -barrier = 102 +barrier = 106 regen_interval = 10 regen_amount = 1 random_messages_interval = 60 +water_level = 43 # # CTF_PVP_ENGINE @@ -30,7 +31,7 @@ ctf.friendly_fire = false ctf.autoalloc_on_joinplayer = true ctf.match = true -ctf.match.teams = red, red, -64, 16, 85; blue, blue, 23, 14, -77 +ctf.match.teams = red, red, 7, 65, 93; blue, blue, -22, 66, -78 ctf.match.build_time = 240 ctf.match.clear_inv = true ctf.match.destroy_team = true diff --git a/mods/default/mapgen.lua b/mods/default/mapgen.lua old mode 100644 new mode 100755 index 5d26273..9cbf169 --- a/mods/default/mapgen.lua +++ b/mods/default/mapgen.lua @@ -2,7 +2,6 @@ -- Aliases for map generator outputs -- - minetest.register_alias("mapgen_stone", "default:stone") minetest.register_alias("mapgen_dirt", "default:dirt") minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass") @@ -19,15 +18,19 @@ minetest.register_alias("mapgen_snow", "default:snow") minetest.register_alias("mapgen_ice", "default:ice") minetest.register_alias("mapgen_sandstone", "default:sandstone") +-- Flora + minetest.register_alias("mapgen_tree", "default:tree") minetest.register_alias("mapgen_leaves", "default:leaves") minetest.register_alias("mapgen_apple", "default:apple") minetest.register_alias("mapgen_jungletree", "default:jungletree") minetest.register_alias("mapgen_jungleleaves", "default:jungleleaves") minetest.register_alias("mapgen_junglegrass", "default:junglegrass") -minetest.register_alias("mapgen_pinetree", "default:pinetree") +minetest.register_alias("mapgen_pine_tree", "default:pine_tree") minetest.register_alias("mapgen_pine_needles", "default:pine_needles") +-- Dungeons + minetest.register_alias("mapgen_cobble", "default:cobble") minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble") minetest.register_alias("mapgen_mossycobble", "default:mossycobble") @@ -39,67 +42,98 @@ minetest.register_alias("mapgen_stair_sandstonebrick", "stairs:stair_sandstonebr -- Register ores -- - +-- All mapgens except singlenode -- Blob ore first to avoid other ores inside blobs function default.register_ores() + + -- Clay + minetest.register_ore({ - ore_type = "blob", - ore = "default:sand", - wherein = {"default:stone"}, - clust_scarcity = 24 * 24 * 24, - clust_size = 7, - y_min = -63, - y_max = 4, - noise_threshhold = 0, - noise_params = { - offset = 0.35, + ore_type = "blob", + ore = "default:clay", + wherein = {"default:sand"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_min = -15, + y_max = 0, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, + scale = 0.2, + spread = {x = 5, y = 5, z = 5}, + seed = -316, + octaves = 1, + persist = 0.0 + }, + }) + + -- Sand + + minetest.register_ore({ + ore_type = "blob", + ore = "default:sand", + wherein = {"default:stone", "default:sandstone", + "default:desert_stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_min = -31, + y_max = 4, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, scale = 0.2, spread = {x = 5, y = 5, z = 5}, seed = 2316, octaves = 1, - persist = 0.5 + persist = 0.0 }, }) + -- Dirt + minetest.register_ore({ - ore_type = "blob", - ore = "default:dirt", - wherein = {"default:stone"}, - clust_scarcity = 24 * 24 * 24, - clust_size = 7, - y_min = -63, - y_max = 31000, - noise_threshhold = 0, - noise_params = { - offset = 0.35, + ore_type = "blob", + ore = "default:dirt", + wherein = {"default:stone", "default:sandstone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_min = -31, + y_max = 31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, scale = 0.2, spread = {x = 5, y = 5, z = 5}, seed = 17676, octaves = 1, - persist = 0.5 + persist = 0.0 }, }) + -- Gravel + minetest.register_ore({ - ore_type = "blob", - ore = "default:gravel", - wherein = {"default:stone"}, - clust_scarcity = 24 * 24 * 24, - clust_size = 7, - y_min = -31000, - y_max = 31000, - noise_threshhold = 0, - noise_params = { - offset = 0.35, + ore_type = "blob", + ore = "default:gravel", + wherein = {"default:stone"}, + clust_scarcity = 16 * 16 * 16, + clust_size = 5, + y_min = -31000, + y_max = 31000, + noise_threshold = 0.0, + noise_params = { + offset = 0.5, scale = 0.2, spread = {x = 5, y = 5, z = 5}, seed = 766, octaves = 1, - persist = 0.5 + persist = 0.0 }, }) + -- Coal + minetest.register_ore({ ore_type = "scatter", ore = "default:stone_with_coal", @@ -122,6 +156,8 @@ function default.register_ores() y_max = 0, }) + -- Iron + minetest.register_ore({ ore_type = "scatter", ore = "default:stone_with_iron", @@ -166,6 +202,8 @@ function default.register_ores() y_max = -64, }) + --Mese + minetest.register_ore({ ore_type = "scatter", ore = "default:stone_with_mese", @@ -199,6 +237,8 @@ function default.register_ores() y_max = -1024, }) + -- Gold + minetest.register_ore({ ore_type = "scatter", ore = "default:stone_with_gold", @@ -221,6 +261,8 @@ function default.register_ores() y_max = -256, }) + -- Diamond + minetest.register_ore({ ore_type = "scatter", ore = "default:stone_with_diamond", @@ -243,6 +285,8 @@ function default.register_ores() y_max = -256, }) + -- Copper + minetest.register_ore({ ore_type = "scatter", ore = "default:stone_with_copper", @@ -271,12 +315,15 @@ end -- Register biomes -- +-- All mapgens except mgv6 and singlenode function default.register_biomes() minetest.clear_registered_biomes() + -- Temperate + minetest.register_biome({ - name = "default:grassland", + name = "stone_grassland", --node_dust = "", node_top = "default:dirt_with_grass", depth_top = 1, @@ -286,25 +333,101 @@ function default.register_biomes() --node_water_top = "", --depth_water_top = , --node_water = "", - y_min = 5, + --node_river_water = "", + y_min = 50, y_max = 31000, - heat_point = 50, - humidity_point = 50, + heat_point = 40, + humidity_point = 35, }) minetest.register_biome({ - name = "default:grassland_ocean", + name = "coniferous_forest", --node_dust = "", - node_top = "default:sand", + node_top = "default:dirt_with_grass", depth_top = 1, - node_filler = "default:sand", - depth_filler = 2, + node_filler = "default:dirt", + depth_filler = 3, --node_stone = "", --node_water_top = "", --depth_water_top = , --node_water = "", + --node_river_water = "", + y_min = 44, + y_max = 55, + heat_point = 40, + humidity_point = 65, + }) + + minetest.register_biome({ + name = "coniferous_forest_ocean", + --node_dust = "", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = -112, + y_max = 44, + heat_point = 40, + humidity_point = 65, + }) + + minetest.register_biome({ + name = "deciduous_forest", + --node_dust = "", + node_top = "default:dirt_with_grass", + depth_top = 1, + node_filler = "default:dirt", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = 44, + y_max = 55, + heat_point = 60, + humidity_point = 65, + }) + + minetest.register_biome({ + name = "deciduous_forest_ocean", + --node_dust = "", + node_top = "default:sand", + depth_top = 1, + node_filler = "default:sand", + depth_filler = 3, + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", + y_min = -112, + y_max = 43, + heat_point = 60, + humidity_point = 65, + }) + + -- Underground + + minetest.register_biome({ + name = "underground", + --node_dust = "", + --node_top = "", + --depth_top = , + --node_filler = "", + --depth_filler = , + --node_stone = "", + --node_water_top = "", + --depth_water_top = , + --node_water = "", + --node_river_water = "", y_min = -31000, - y_max = 4, + y_max = -113, heat_point = 50, humidity_point = 50, }) @@ -312,11 +435,39 @@ end -- --- Register mgv6 decorations +-- Register decorations -- +-- Mgv6 function default.register_mgv6_decorations() + minetest.clear_registered_decorations() + + -- Papyrus + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = -0.3, + scale = 0.7, + spread = {x = 100, y = 100, z = 100}, + seed = 354, + octaves = 3, + persist = 0.7 + }, + y_min = 1, + y_max = 1, + decoration = "default:papyrus", + height = 2, + height_max = 4, + spawn_by = "default:water_source", + num_spawn_by = 1, + }) + + -- Cacti + minetest.register_decoration({ deco_type = "simple", place_on = {"default:desert_sand"}, @@ -335,16 +486,485 @@ function default.register_mgv6_decorations() height = 3, height_max = 4, }) + + -- Long grasses + + for length = 1, 5 do + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.007, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 1, + y_max = 30, + decoration = "default:grass_"..length, + }) + end + + -- Dry shrubs + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:desert_sand", "default:dirt_with_snow"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.035, + spread = {x = 100, y = 100, z = 100}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + y_min = 1, + y_max = 30, + decoration = "default:dry_shrub", + }) +end + +-- All mapgens except mgv6 and singlenode + +local function register_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass", "default:sand"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"stone_grassland", "sandstone_grassland", + "deciduous_forest", "coniferous_forest", + "stone_grassland_dunes", "sandstone_grassland_dunes", + "coniferous_forest_dunes"}, + y_min = 1, + y_max = 31000, + decoration = "default:grass_"..length, + }) +end + +local MAX_TREE_H = 60 +local MAX_GRASS_H = 63 + +local function register_dry_grass_decoration(offset, scale, length) + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = offset, + scale = scale, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"savanna"}, + y_min = 1, + y_max = MAX_GRASS_H, + decoration = "default:dry_grass_"..length, + }) +end + +function default.register_decorations() + minetest.clear_registered_decorations() + + -- Apple tree and log + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.04, + scale = 0.02, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_min = 1, + y_max = MAX_TREE_H, + schematic = minetest.get_modpath("default").."/schematics/apple_tree.mts", + flags = "place_center_x, place_center_z", + }) + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.002, + scale = 0.001, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_min = 1, + y_max = MAX_TREE_H, + schematic = { + size = { x = 3, y = 3, z = 1}, + data = { + { name = "air", prob = 0 }, + { name = "air", prob = 0 }, + { name = "air", prob = 0 }, + { name = "default:tree", param2 = 12, prob = 191 }, + { name = "default:tree", param2 = 12 }, + { name = "default:tree", param2 = 12, prob = 127 }, + { name = "air", prob = 0 }, + { name = "flowers:mushroom_brown", prob = 63 }, + { name = "air", prob = 0 }, + }, + }, + flags = "place_center_x", + rotation = "random", + }) + + -- Jungle tree and log + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass", "default:dirt"}, + sidelen = 40, + fill_ratio = 0.035, + biomes = {"rainforest", "rainforest_swamp"}, + y_min = 0, + y_max = MAX_TREE_H, + schematic = minetest.get_modpath("default").."/schematics/jungle_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + -- Taiga and temperate coniferous forest pine tree and log + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.04, + scale = 0.02, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"taiga", "coniferous_forest"}, + y_min = 2, + y_max = MAX_TREE_H, + schematic = minetest.get_modpath("default").."/schematics/pine_tree.mts", + flags = "place_center_x, place_center_z", + }) + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_snow", "default:dirt_with_grass"}, + sidelen = 80, + fill_ratio = 0.003, + biomes = {"taiga", "coniferous_forest"}, + y_min = 1, + y_max = MAX_TREE_H, + schematic = { + size = { x = 3, y = 3, z = 1}, + data = { + { name = "air", prob = 0 }, + { name = "air", prob = 0 }, + { name = "air", prob = 0 }, + { name = "default:pine_tree", param2 = 12, prob = 191 }, + { name = "default:pine_tree", param2 = 12 }, + { name = "default:pine_tree", param2 = 12, prob = 127 }, + { name = "air", prob = 0 }, + { name = "flowers:mushroom_red", prob = 63 }, + { name = "air", prob = 0 }, + }, + }, + flags = "place_center_x", + rotation = "random", + }) + + -- Acacia tree and log + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.002, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"savanna"}, + y_min = 1, + y_max = MAX_TREE_H, + schematic = minetest.get_modpath("default").."/schematics/acacia_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_dry_grass"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.001, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"savanna"}, + y_min = 1, + y_max = MAX_TREE_H, + schematic = { + size = { x = 3, y = 2, z = 1}, + data = { + { name = "air", prob = 0 }, + { name = "air", prob = 0 }, + { name = "air", prob = 0 }, + { name = "default:acacia_tree", param2 = 12, prob = 191 }, + { name = "default:acacia_tree", param2 = 12 }, + { name = "default:acacia_tree", param2 = 12, prob = 127 }, + }, + }, + flags = "place_center_x", + rotation = "random", + }) + + -- Aspen tree and log + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0, + scale = -0.03, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_min = 1, + y_max = MAX_TREE_H, + schematic = minetest.get_modpath("default").."/schematics/aspen_tree.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + }) + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt_with_grass"}, + sidelen = 16, + noise_params = { + offset = 0.0, + scale = -0.0015, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.66 + }, + biomes = {"deciduous_forest"}, + y_min = 1, + y_max = MAX_TREE_H, + schematic = { + size = { x = 3, y = 3, z = 1}, + data = { + { name = "air", prob = 0 }, + { name = "air", prob = 0 }, + { name = "air", prob = 0 }, + { name = "default:aspen_tree", param2 = 12 }, + { name = "default:aspen_tree", param2 = 12 }, + { name = "default:aspen_tree", param2 = 12, prob = 127 }, + { name = "flowers:mushroom_red", prob = 63 }, + { name = "flowers:mushroom_brown", prob = 63 }, + { name = "air", prob = 0 }, + }, + }, + flags = "place_center_x", + rotation = "random", + }) + -- Large cactus + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:desert_sand"}, + sidelen = 16, + noise_params = { + offset = -0.0003, + scale = 0.0009, + spread = {x = 200, y = 200, z = 200}, + seed = 230, + octaves = 3, + persist = 0.6 + }, + biomes = {"desert"}, + y_min = 5, + y_max = MAX_TREE_H, + schematic = minetest.get_modpath("default").."/schematics/large_cactus.mts", + flags = "place_center_x", + rotation = "random", + }) + + -- Cactus + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:desert_sand"}, + sidelen = 16, + noise_params = { + offset = -0.0003, + scale = 0.0009, + spread = {x = 200, y = 200, z = 200}, + seed = 230, + octaves = 3, + persist = 0.6 + }, + biomes = {"desert"}, + y_min = 5, + y_max = MAX_TREE_H, + decoration = "default:cactus", + height = 2, + height_max = 5, + }) + + -- Papyrus + + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"default:dirt"}, + sidelen = 16, + noise_params = { + offset = -0.3, + scale = 0.7, + spread = {x = 200, y = 200, z = 200}, + seed = 354, + octaves = 3, + persist = 0.7 + }, + biomes = {"savanna_swamp"}, + y_min = 0, + y_max = 0, + schematic = minetest.get_modpath("default").."/schematics/papyrus.mts", + }) + + -- Grasses + + register_grass_decoration(-0.03, 0.09, 5) + register_grass_decoration(-0.015, 0.075, 4) + register_grass_decoration(0, 0.06, 3) + register_grass_decoration(0.015, 0.045, 2) + register_grass_decoration(0.03, 0.03, 1) + + -- Dry grasses + + register_dry_grass_decoration(0.01, 0.05, 5) + register_dry_grass_decoration(0.03, 0.03, 4) + register_dry_grass_decoration(0.05, 0.01, 3) + register_dry_grass_decoration(0.07, -0.01, 2) + register_dry_grass_decoration(0.09, -0.03, 1) + + -- Junglegrass + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:dirt_with_grass"}, + sidelen = 80, + fill_ratio = 0.1, + biomes = {"rainforest"}, + y_min = 1, + y_max = MAX_GRASS_H, + decoration = "default:junglegrass", + }) + + -- Dry shrub + + minetest.register_decoration({ + deco_type = "simple", + place_on = {"default:desert_sand", "default:dirt_with_snow"}, + sidelen = 16, + noise_params = { + offset = 0, + scale = 0.02, + spread = {x = 200, y = 200, z = 200}, + seed = 329, + octaves = 3, + persist = 0.6 + }, + biomes = {"desert", "tundra"}, + y_min = 2, + y_max = MAX_GRASS_H, + decoration = "default:dry_shrub", + }) end -- --- Register decorations +-- Generate nyan cats -- +-- All mapgens except singlenode -function default.register_decorations() +function default.make_nyancat(pos, facedir, length) + local tailvec = {x = 0, y = 0, z = 0} + if facedir == 0 then + tailvec.z = 1 + elseif facedir == 1 then + tailvec.x = 1 + elseif facedir == 2 then + tailvec.z = -1 + elseif facedir == 3 then + tailvec.x = -1 + else + facedir = 0 + tailvec.z = 1 + end + local p = {x = pos.x, y = pos.y, z = pos.z} + minetest.set_node(p, {name = "default:nyancat", param2 = facedir}) + for i = 1, length do + p.x = p.x + tailvec.x + p.z = p.z + tailvec.z + minetest.set_node(p, {name = "default:nyancat_rainbow", param2 = facedir}) + end +end +function default.generate_nyancats(minp, maxp, seed) + local height_min = -31000 + local height_max = -32 + if maxp.y < height_min or minp.y > height_max then + return + end + local y_min = math.max(minp.y, height_min) + local y_max = math.min(maxp.y, height_max) + local volume = (maxp.x - minp.x + 1) * (y_max - y_min + 1) * (maxp.z - minp.z + 1) + local pr = PseudoRandom(seed + 9324342) + local max_num_nyancats = math.floor(volume / (16 * 16 * 16)) + for i = 1, max_num_nyancats do + if pr:next(0, 1000) == 0 then + local x0 = pr:next(minp.x, maxp.x) + local y0 = pr:next(minp.y, maxp.y) + local z0 = pr:next(minp.z, maxp.z) + local p0 = {x = x0, y = y0, z = z0} + default.make_nyancat(p0, pr:next(0, 3), pr:next(3, 15)) + end + end end @@ -352,7 +972,6 @@ end -- Detect mapgen to select functions -- - -- Mods using singlenode mapgen can call these functions to enable -- the use of minetest.generate_ores or minetest.generate_decorations @@ -360,8 +979,10 @@ local mg_params = minetest.get_mapgen_params() if mg_params.mgname == "v6" then default.register_ores() default.register_mgv6_decorations() + minetest.register_on_generated(default.generate_nyancats) elseif mg_params.mgname ~= "singlenode" then - default.register_ores() default.register_biomes() + default.register_ores() default.register_decorations() + minetest.register_on_generated(default.generate_nyancats) end diff --git a/mods/default/schematics/acacia_tree.mts b/mods/default/schematics/acacia_tree.mts new file mode 100755 index 0000000000000000000000000000000000000000..4732ade3d9df99c4f543ad168dc090e551cfdee5 GIT binary patch literal 204 zcmeYb3HD`RVc=xoVBoB;x332Q24)84#LOZF(UjD*#L}D+tHk8Q)YOVOZztU4Yf#{Dn=1ZHu%;wys@gvT-A!jJ_b_hUtluNqvDdFQXx7;|?5iqI z3BR>bxcBXix_RbZj~j1ZFguwWwX>*Py)YOVOZzm-3H7IbnP310T>5E%?$z@9B#N2hyUt?T1xBr;- xU%TSbQdgVF(tK=EpIrhU-M)W+2CwlY!zJqTW*k3t*>?8)`O_mA<#y}H0RTx+Sp)z8 literal 0 HcmV?d00001 diff --git a/mods/default/schematics/apple_tree.mts b/mods/default/schematics/apple_tree.mts new file mode 100755 index 0000000000000000000000000000000000000000..ac09b46694037b0824dd4c0e3762d66d0fff1a76 GIT binary patch literal 163 zcmeYb3HD`RVPIw8U|_AUx333bAfGugvxtE&B{eOvG^fNWCpEDwwU~hi#xE&KO=aMP z@e&IPa#AbiBqt~c89ZuT!tBPT#+IgVELCpPPM?C<9g#f_mlbAgsJv1pU-)dIY~9D7 zKYxDYU|PQG&+kv)KYxDx`n4hpbAVyM7kg%_iTd&S{fpMw&1d<1qWpdU3q#oi&5Hmn CszL(* literal 0 HcmV?d00001 diff --git a/mods/default/schematics/apple_tree_from_sapling.mts b/mods/default/schematics/apple_tree_from_sapling.mts new file mode 100755 index 0000000000000000000000000000000000000000..5d35a1545f38836395782ea132c4fc582725b11f GIT binary patch literal 167 zcmeYb3HD`RVPIw8U|_AUx333bAfGugvxtE&B{eOvG^fNWCpEDwwU~hi#xE&KO=aMP z@e&IPa#AbiBqt~c89ZuT!tBPT#+IgVELCpPPM?C<9g#f_mlbAgsJv1pU-)dIY~9D7 zKYxDYU|PQGPetW|reD9RI1Vy|@QAEs_xzjQu(82qU(H^du3f)sgw816uXPq=UuKC!0=)ObE}B3iW*SanJ52 z+x+4aPHOIL(hlMBTo_ne^z)c_anIwm{}W6!UoG)k825XN$>z5BzU0Z1uGI94rEyP| UefDCm+Pw;!Ii zd+$CsEah7EK%~oQ@voB~`}E)K=-U3TS<^F6Ih4!v+slhS{MqYbKR-L2Khg53*JA5= NcRot%+;7!q2LKWxO56Yd literal 0 HcmV?d00001 diff --git a/mods/default/schematics/jungle_tree.mts b/mods/default/schematics/jungle_tree.mts new file mode 100755 index 0000000000000000000000000000000000000000..329364a87ed26d90edad83c4f88e029ef1d742c0 GIT binary patch literal 251 zcmeYb3HD`RVPIttWMHj_0(&3;GZ~l}m=iOL7(`N1(-KQ_O02R<^U`xtb5aw_Qi~ac zP(@3MQd2ADybWUHYc}8rv3n(4!Q}rsxP~jtO?`{&?4^;LQrwqZsVdmJLnr=#*2Vi< z@BjSJa679lsK84xgzHzt(&=l6Ip22F`mf!-*;aR-%e}jwll-46 z|2u!Ia{dQxg@uuEHv|eNFVX)o_fkM`l2JF`txR{7Q_V%s@AO3mKYEgOrPHX_zcaOZ ku9tnTmbpaetfiKvVp}gIK3J)$U^4IDM_~(wP33OM0Q;_Q9RL6T literal 0 HcmV?d00001 diff --git a/mods/default/schematics/jungle_tree_from_sapling.mts b/mods/default/schematics/jungle_tree_from_sapling.mts new file mode 100755 index 0000000000000000000000000000000000000000..babaa45f7a11de1fc017b341cea0751974ce2ab4 GIT binary patch literal 246 zcmeYb3HD`RVPIttWMHj_0(&3;GZ~l}m=iOL7(`N1(-KQ_O02R<^U`xtb5aw_Qi~ac zP(@3MQd2ADyba>!JFLL5HRjCX3YNYPefu;IU*j)HGxVPJW}=c;a^^-JXjJr-*iyR;MnV gZ#GqWjZy1?bG<&(54Ls(8)W`E?*D-EIiu-g0L#vBY5)KL literal 0 HcmV?d00001 diff --git a/mods/default/schematics/large_cactus.mts b/mods/default/schematics/large_cactus.mts new file mode 100755 index 0000000000000000000000000000000000000000..b71077b3c5a0f397aade8d76cbe2f0a081d80b9f GIT binary patch literal 94 zcmeYb3HD`RVPIuoXJD*{00t%o=ETe*2ELTkw8YY!6079Iu=Eaw1mSn`I7bO-K mGw{PC3K9z{i%N?t<|HR1B%~xX9sK|QwPOP#6NAYzmR11jJR+O` literal 0 HcmV?d00001 diff --git a/mods/default/schematics/pine_tree.mts b/mods/default/schematics/pine_tree.mts new file mode 100755 index 0000000000000000000000000000000000000000..3a3fa7ad0e7f7c3bbd3282856d1985734b62d702 GIT binary patch literal 175 zcmeYb3HD`RVPIw8V_>bXx3{kc5@1x%z|6p$m|4Uil9HO1SejE}RgjsN8lRV%nv#=R z%piy&T2hpnS}`X%K|#{skmALrknWQ<;oQTm zCEG8U?>+MT`t#$$r;l=edM)|tv*fGSuR9+a8T>i!cZHdA!KMFSf9yyIexMfkPE4l3 P>Y)+W3I>L{ohG~h4u?sD literal 0 HcmV?d00001 diff --git a/mods/default/schematics/pine_tree_from_sapling.mts b/mods/default/schematics/pine_tree_from_sapling.mts new file mode 100755 index 0000000000000000000000000000000000000000..629c5da027a0c3d1532a867b611a27357499c0df GIT binary patch literal 172 zcmeYb3HD`RVPIw8V_>bXx3{kc5@1x%z|6p$m|4Uil9HO1SejE}RgjsN8lRV%nv#=R z%piy&T2hpnS}`X%K|#{skmALrknWQ<;oQTm zCEG8U?>+MT`t#$$r;l=edM)|tv*fGSuR9+a88k@#f2bo7$lsVy%ChrH5jUU1+yY6~ L5C#V2DSEvC-*7}5 literal 0 HcmV?d00001 diff --git a/mods/default/textures/character.png b/mods/default/textures/character.png new file mode 100755 index 0000000000000000000000000000000000000000..05021781e03fbb71cb309d5ac233c6c90f332fda GIT binary patch literal 2754 zcmV;z3O)6SP)2uX*6~`Is8-X;*&E0SAO>&cvke%!y3xOmA1X`so?O2^U+G=e9kx~mtSV|M1>{}P0 z6tr}4X|WZxTJ;a`g>NiW*4CH)5y$g6w}*Qt8RupuDVh1s@A;i`o`-wBXM29k$@kY+ zT_PRjMY1?qD2r2t(os7`&f#QNIw0MOPIVqq za1wcI%A7}z-ffUgi-4)m>>tkJ+(1o8hIKux4lh^d-C3N67}m(qk7R9TP5{mkNiv~d zqu^LlRbo!w{QYUUaruZ`d*=oD_|4t&@ugjc>z5D9tv|jpV*+rFNRkO(X-VA0Xj9Cb zobyHh5q%uR>B%7djez%$$@O;+$kjK;4FCS^e!20xqjKvHFVFY~lKMD`)045HF?J6K zNKGZ6SEEk`7y(yKYqXCz0UG_E%fH^(i3|c}+5^adDFm!+ipywY?A{PSjkhas7RPx) z2v7P08F1}a6Y|NgC*<1Od*$j|d$b((%FXwWPbq=?r7-nxpvGz)XGwdW5WqL3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f;xPp|gZYo=*39kz0000CHpIZX;h`|j0S*NUspZZe7`b&YyDy=YI~pCvE66Yh%O2Hyj^}xBl)wo9a@{D8{VP z%6Nu*;^(jbo~Nozn8tTO^k7Vbzp?TiU4Eb;)_C#QaYseSe5kLJ6g7?zz$d&nHSBmn4t22WQ%mvv4FO#s8{k+1*& literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_acacia_tree.png b/mods/default/textures/default_acacia_tree.png new file mode 100755 index 0000000000000000000000000000000000000000..169823d41612d29e16c7faa44baae5d51b842de3 GIT binary patch literal 682 zcmV;b0#*HqP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^n? z2^1XGbQyO500JsWL_t(I%Po^jj@(ELL?4+SWvZ%e_(Zdt?cDzk#sEfFNy;DTg=$9- zAQ=&ikpKSu$2CN1t!RjplF2EvY?1QD|G$6p^Vd&auY*zwL50`rK*V{!->3mGXL_HQ zP0Wlj2aXeia=c&Ul!-ACLI6?bnurQ4LscL~MWcc!tu@A6m>K4VnbCV^uZ6W1$9Vv- z<^lmll$au_O3;A2v({qGg*l{{Xst2lWQ~ED0elXC3eFspQVPo!b4+54_t5Cn=NHHO zAcVlxE*vL?z!(bvb$7;GhzM&f93iJjyG}+Q)V+czSL@8y*-PQ-9b5BWfG9}=DF&|N zz};_ds+{LZ*)oDtw#?$DH+n-wQ9#8VjY_*3W)ruChR9YQxH~R#i)K#B+oxVETNvDL zOet|37h9?H-ocF&!>4~RTPNqtUJI=c9?vh_*9QTPi*vkQl)9q|=FrZ@^ZDdF-;6l` zh$%Dsq}EEz$vWl2W)uRNy>L%D(gc z{mt|1$#GnS7{FoMD*)GZ0pRXj=RvI%$I)fZ`F^uMc6#fyF;L+)&RlG@^7!$^abBd9 zsC#A1MQPx#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i^n? z2_zerR=Otu00LV{L_t(I%YBo}iW5N;hQF$=PSWl4WG)@e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pRpS$UrGT% ryHf5ta(4NMzWmlxdTjon@;~?!-@`}`k9r=l00000NkvXXu0mjfvp{<5 literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_aspen_sapling.png b/mods/default/textures/default_aspen_sapling.png new file mode 100755 index 0000000000000000000000000000000000000000..f8d9136a0b5c0397e3feb54f1abce3e44e75ec47 GIT binary patch literal 320 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4(FKU}X1naSX9Iot$uh$t(Qk|8xZ* zgGAw)PhXXtzayQ5*pPOs&FM9vUqwQFRQ?(1cez>s0^ MboFyt=akR{08U_&&Hw-a literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_aspen_tree.png b/mods/default/textures/default_aspen_tree.png new file mode 100755 index 0000000000000000000000000000000000000000..933b9cad5eee86718a3c916251725c6324ac5824 GIT binary patch literal 695 zcmV;o0!aOdP)Pr9mrKsMQmSp+JkJM%K~+^+>o|^sAXu$d2q9}NA*A2$7e(Q4&NrJ4gs?2j z@9*#D=jWzr;y89)*BH|@jpupRS^$8Q5&!@nA0MMA!WbK4T-U9t%JaOYX^b(9F+xb! zby7;-_wzg_gdoP)Y&O$c0|2($ZQHh-b89Wexa&Hl6vh|;ptYuy{`~wPYwi2{`_G~Jiy6hQkLb($w{x*n@*?K*VkbfYOM(&JF2_8 zyTxLWrs?VFX_6%H_VyMbG@VY5kB@gG2%#iNthGl+N5+_4m43f(jJdhFfuEnBd7cl4 z!>Xzr$H}rR2m%PGZ zthHenc3r2n?z)arikqfs+qNvrD2jF|eBTEED5ZSguj{(1DhMGVq;1>PYUM;xB!s{i zd!FaIE&w3UbEQ-mhFO*sMS&3N^?ICh0KjN8LKhbo|Ni}R9H*{p&+{OJ>-GBJ;9x$V zzrMaoDa*2?lmkH=%zb@%r6>bg$T z^y%pdo}HaB#s-4{A>{J%^8EaKI2?{fBT8wOWe~!us)P_PFE5M5;`jF#-rwJ2j1LbF zqbMST2q7SZl+xV~=bR8y*EM4dLO7q#;c~f@QfjSt_MGz|2$WLB7)mLn)N!2cb{j=aKk133K*L}%P*&?qHS0i}wP8c;MhU(cV{%ZK0U z+n-ekp}YLv{qSv^U)IM_cL$8LZ&y)C(o&$5x?=d;bkc6UFh*HxuR;heVF~?r-&5EC zK)=eWGDT?t0szA0UyWatQr2Zr^E@{Pn+u2aT5pYezP7^+I~OAfluWVidH~3I2LaYv zrL_*hmsET?G%iQa2Bki|5g@W(;=U>h*eHR85(y%lrb!A>m@9aZO;!@K56eG)r};|G zF%b&j5HkUaB7{)GFx1#*XwZHGB?IQ@){@Kh(`dS?qyzwzqRs_nHLt6x>w24?TbUJY z0$OrOexdcDZV`!@kvT_Z%%%K)z;PUd3#BlpltL<;*l%%OKYf^hBPxVU*(KD9GdE46 z&gb(o)c}PkXqM)tV?ZU~WElXo7QyXp-$Je=hH0AAIF2efQ@zD=`~3Kqs^z*LS_}e9 zVUhK*!nHY{fXU6*{J93HJO9@VOr!-%;iaw6-g|?^T(R;6!Wl>7CZ5ygzjJ1kr+qMAE qG>x(L@$qpOhW+X3csvpjGyeza5{5fc{>$(H0000KP)a(Q6^WAQ`lC-7wi&FU}meApBRSr#+|tcUpRR zegexEy<{we#DTo8%EBFHq*>2NL?8gLX4|9#g0DFw5dr(9)K?<_nKgPi0sU#;)Yc9F zMT!GKkpiHvW*`Y)#BmH?@LqF6r1%U6GSseraZ`MKa%#8RLG%eA3UM##AOVnelV-*+ z17OZG%pM+bPTp5#z78P(khxv5#g^}=C{k=f0#J$OY+c3aYM}k z{PomC1A?zV-rpE6vqlc|n(iaz`R+U!Y-V0Xjcf>2c}O!!E2JRi&LC TFEZ)J00000NkvXXu0mjfULl|; literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_book_written.png b/mods/default/textures/default_book_written.png new file mode 100755 index 0000000000000000000000000000000000000000..d843e5f6d7c7cc0a7a0740aed086390f33713d7e GIT binary patch literal 228 zcmeAS@N?(olHy`uVBq!ia0vp^0zfRt!VDzU8V$b#Dct~{5LX~=r@>Yh!0T_wQ4_>< z`TF_2ySHuGvSR9l+S@m-tXn&O?#%WGYtHv?Ud))(`Ssg7R-gvPk|4ie28U-i(tw;) zPZ!4!j_b(>_*hsMY?-9gk;HPzk4a(Q#tDl%lmZ+)E7o-_n8eV$VDhYwDypuGYzvjW z&hyB+N=vjP%@OH!JuEFD;q5BZdQ`gc))FSy)`MzBdc4AIGj#R_3M8>FX1GwIlAXxF Y@W+}@MPN@vC(uF$Pgg&ebxsLQ07*AZ#Q*>R literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_chest_front.png b/mods/default/textures/default_chest_front.png new file mode 100755 index 0000000000000000000000000000000000000000..85227d8fd636ace9592070a2f7e86df531dc03a8 GIT binary patch literal 423 zcmV;Y0a*TtP)i&K4LJ(h4fd|)}Lf=h&H zLXT)Oby_pmu656)Y`~XZu7*#Kb4!G4MT>1goOVBpWiV}2FKSRK-QC@|u%qC!dc~Y& zzLs61d_{+CM1p2Nz__cUqocE{p6j=Mc6N54fmoDxPm^{|mw8KwZcBJ!K5tn$lWaGU zYBh#mEPz=jWJ@J{RU=tkP^|y}0JKR&K~xyiWzI#i!!Qs<(JxtGvCM3T^TSO0-&i_h z-{GmQuJfE_l-{oE`T}5=5$C4V3&q&H0!WvEqLgLXY__8{K&+!MG8kioLN@@6 zN>kDk@*aBGOD_RVl&R|knQ6>5Cjg{HdNti|CKb)I1AvErQM3I&FVvh>0Bdbfh?>Um zAmA$iTLe&1C`R-A2rxJ}fDLU}me>LiC%WV=gmA9K@ef4uc|E)2k#quJ)ECCe4HTG& R7=Qo(002ovPDHLkV1m!~wG03N literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_chest_lock.png b/mods/default/textures/default_chest_lock.png new file mode 100755 index 0000000000000000000000000000000000000000..73f46c7864e7878d4724cc166d9035291eee845f GIT binary patch literal 469 zcmV;`0V@89P)3qathbYJkPalU4KY$ zo(v(wjJkwUVo50a8i}pw7PnfbP?unvz=vBQjzdT%^Y5WrZN2=?)vE9Nn^kk4O+BxW z&T6L^bts{$4D~S)P}eN%+kNse%wn2hF{)00000 LNkvXXu0mjfS`O4= literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_chest_side.png b/mods/default/textures/default_chest_side.png new file mode 100755 index 0000000000000000000000000000000000000000..44a65a43d3c3f2ba44bceb519a0696e1ba441800 GIT binary patch literal 375 zcmV--0f_#IP)n`5knO{RcJoOVB!a5-&MFKSRK;In$zuXoa@aHD)h zf@VK%ST=rFCF{3-pn+J3ZcC(oM}}W4WJ@JsV)uan0065=L_t&-(`C+A5`!=dMbXH@ z-MB%3P}BSV*B6mr?&lfJ= zdsUum4#6X1C?EZJP^f8bSOa-|wF`=iC+qn|{rj V3gJ4$MZo|7002ovPDHLkV1iD9pBn%G literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_chest_top.png b/mods/default/textures/default_chest_top.png new file mode 100755 index 0000000000000000000000000000000000000000..f1a5cb594f4ee6ef23813aeb68ddd38a472c4801 GIT binary patch literal 422 zcmV;X0a^ZuP)nsh*fXFYILEX|{8#G7NJgI1=1NtAU-k#a-k;In$zuXoa@aJiCM zwU1VxfK#S~QIT*zdtp40Y&wEtIDB0)iDE8wS1oK%C}&9`>$iThkYbm5Q>TGSifA}x zPAvL-GKl~H0KZ8@K~xyiWzRpvO*Xn4gj!}X-yqMA^g3&c<+Tw>6G+$>&I~@9(`XF=Y0PBA6xtl!a z+j`x$_j~S{;&)(H(BavkCl*DWU6FWYO) z^mS#w&nC($!d=lbD-kF(+tbA{gyTBn1cvYh7ML)4Eal|aXmR^K;5eHl%+WjVFimdKI;Vst E0L8FByZ`_I literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_dry_grass_2.png b/mods/default/textures/default_dry_grass_2.png new file mode 100755 index 0000000000000000000000000000000000000000..c925aceb891921ae4808b3489c77720f76c239e9 GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!aez;Vt8QlA-noJM=La8J7<711 z@QLMNr&olYT@`*|ZN#N@5mz@x-q;jzYfIGK?a}vlL_gXU^LTe`>LP21s-)EC%*XLirAtVbF z^7nLc43W5ew%1Xp!GME#`xdcm*1!L=S&#p7Y-9E;WBOB8BYVvC-L^FoFG-4idlKV( zUMxXs?;^M9Y*7hC4i`C;#9B{jp5!&*dbj=7e*JF@Y3+=s`x;iL0*z+yboFyt=akR{ E0HnTK9smFU literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_dry_grass_3.png b/mods/default/textures/default_dry_grass_3.png new file mode 100755 index 0000000000000000000000000000000000000000..4e4d84e4382a9eb2d9540fff6ea5ab6db738bb89 GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!aez;Vt8QlA-noJM=La8J7<711 z@QLMNr&olYT@`*|ZN#N@5mz@x-q;jzYfIGK?a}vlL_gXU^LTe`>LP21s-)EC%*Ri@gt@STZ zDA&`)F+}3>*4~3mhYdKK;CGAD*j$&SML>%gJYD@<);T3K0RT#GaYFzA literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_dry_grass_4.png b/mods/default/textures/default_dry_grass_4.png new file mode 100755 index 0000000000000000000000000000000000000000..d315849e0b655c9908bbf278d1b7389af7d9e3cc GIT binary patch literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!aez;Vt8QlA-noJM=La8J7<711 z@QLMNr&olYT@`*|ZN#N@5mz@x-q;jzYfIGK?a}vlL_gXU^LTe`>LP21s-)EC%H&EU7@@gnh zsL9jCF+}3>RKG^SBMKbdtz6r9cl_VNpZB4v!Bc_bPqk2Bq*j>g1HBVT(r)2mYkOsO z?7Da%MN#^|XQsouk{7AYtV^k_zP8Bb&y1tJ0&7D3Eu({s=JH%HDbL{5wOUr==5zU5 z`M$@D?HAquKGt&mvOCLK+~>gCSuPW%ta`re!;WRYp79?qX60S(6EqL#8U{~SKbLh* G2~7ZCq=hj4BSQm47L-f^6u{XBF-QE^^cSrn#U2zY0CqCVm_-ucY!521s-)EC$Q4yWF`LZTZ zXr`x&V~E7%(0)gu!v-A8*V~R*a9aGY&wctWZ331s$2~b9|ovnFT?Ymj~Wl6Z&{V_=Bwx zuXaWq;`9&)n#NcXllZ|~ZQe$>>>b9=<|{aK=9`CV;}17>}lJ_=58OyUnCsz3jg Zw-L!=&fK+UO0?3CkG(Eal|aXt9}qlm&3HfCpL=E=;$6Eu$;VH8OVOn8tmu^=JgQ2~%B pC}i>C@JmU!5F*05DJWQiA@exPD#POe4M0N}JYD@<);T3K0RVObCcppy literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_footprint.png b/mods/default/textures/default_footprint.png new file mode 100755 index 0000000000000000000000000000000000000000..41d954630b1c16679fcc5e83645ea10c0c739d6a GIT binary patch literal 466 zcmV;@0WJQCP)|jj+W38K+H|Mgu`Ddf{;XIOn|Q70c@>q)<_eA$C*;pkD4^$22rkP_MKJ z#RC|Iq}z3Hdmio(tbnA|=p$7HjNPO`UzrVZSl$HV0dx+ze?0~LUyy($3Ws>W0z06;LNbFfvyE%uq!B>=Uv zXCk))PIvFoi*2OUb|$WhM4Wu)CY{fSQSD^E`Vn5tnHITR5rAkU{5j}(-pGLTyC3f- zzY|)HE(>Y3qVgiRl?ga&SV*ES+AS^FG6K8EbB0}hI#62kLRS}Yd zuQ&2S8a2yl2-obhF0#z0pz7oc#Y_T*2o_=e7)iF|$C6~pq0OdhzMxhK|Jw3Uy= z@Q|a7+6MQ9R9j_Lw+-2a$dv5UqGKD?{gT(7yvT1yKe3Hm;JFWW=z&R21RJhV%^g4q;6VC?%256(p286^;10;p*HtYl>@&9hX?j-#4PTX*?ip_Mve{* zZ#suP>xPGo7TP_Xg_oPL$2SurJ|jQG=rVYUccaKh8O{%2K(Zam|9&Kyy3SgNh5}oR z=23M%CWzd!!(odJqbPAv$^_C`303Xt>(f{WvTdJ@IW9V(Z)oleF_NkDV_Ck*d}51G z8Q0Qm1DR$u5Fh!#lZ{9%I(HPFa1!{-`DLq09I<64IIK9~-jDRa@WkT#+oO&k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1}6>_B>1FaDC7wwiR>bMn^(pM>q#jMH@5Q&U~Z4 zyKiIegmzr1$3`_a_P_nGCiCv)_@DQO6YPF$+5w|eOJGOsu=|~urLQ*`xmf`RKO3SW z#@4=E>t6qP{^?oqPu)$|!j*TYx)1FbixPfe3DLHHk;|xgbZN(~?#j_mZ8unu=U`OL zy2%oe9bG|QY<551a;0p@9bo3;mJtK54(8}`{pIKS?_59kuwXMXx?#zN?#yWX9<|vT z(AT`%i|9*ko@;j8Z`{fF`mXhZk~6NKtyd?SxaS#7+JFCb;^O+5^#{|&l$Y84$M_?Q zUDP^yM5fuCPn0Gia?Hw{z5Q21jF0y3OtN_C-_!>H^3%ve6!Bk%pplk00pNiY0N`T* z;Naw+(*Yn<1pt;^06;q%07L`QoT*0tx>OT{zI9lh+uxHDU1li&g3p$v@v;CQ1R3=I zL0g&zHBa9yoDecxWxPq>1C9c literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_grass_2.png b/mods/default/textures/default_grass_2.png new file mode 100755 index 0000000000000000000000000000000000000000..0ffa8fc2c6377b9501954f70305ec6ee0f3f6fde GIT binary patch literal 2980 zcmV;V3tRMwP)uJ@VVD_U zC<6{NG_fI~0ue<-1QkJoA_k0xBC#Thg@9ne9*`iQ#9$OrQF$}6R&?d%y_c8YA7_1Q zpS|}zXYYO1x&V;8{kgn!SPFnNo`4_X z6{c}T{8k*B#$jdxfFg<9uYy1K45IaYvHg`_dOZM)Sy63ve6hvv1)yUy0P^?0*fb9UASvow z`@mQCp^4`uNg&9uGcn1|&Nk+9SjOUl{-OWr@Hh0;_l(8q{wNRKos+;6rV8ldy0Owz z(}jF`W(JeRp&R{qi2rfmU!TJ;gp(Kmm5I1s5m_f-n#TRsj}B0%?E` zvOzxB2#P=n*a3EfYETOrKoe*ICqM@{4K9Go;5xVgZi5G41dM~{UdP z6d+Yd3o?MrAqM0Kc|iV92owdyL5UC#5<>aVCa44|hpM4Es0sQWIt5*Tu0n&*J!lk~ zf_{hI!w5`*sjx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Q z%kSJBju{@g%f35#FZJHb`&swrA8dGtepviS>QUumrN{L@>;2q1Vm)$Z)P1z?N$8UY zW2~{~zhwUMVZ87u`Dx{Z>O|9|`Q+&->FRy-Sjp7DHsy69KwU-!MxeeuI@&cF4| zM9z%ARI+y?e7jKeZ#YO-C0fR|IK~#90V*LOAKLaHIAb^-C(hURv z0YtF@00Bg?0RRC+u>k-9M6m$?0mRa<$Oc8=Hw(vq);~WOVSGUWp8xMZd||{U2Lb>A zgy8~^0+2$O2AF1aIT!#4AQS^&l5alzMllrR3Un7-e*OI)3@-e;EJSr{DkIJ$MUd0|XG0tRy=~ z0L&2(UI00a=z!-ucn&U*6(;vHUL zW(IWd7fI;d*S}y(KmZ_sm_R09xb_O{cXmcd7=pxr2LJ!?;V)Pbn~)gTbx<#W<#miC z!5n}9Vgi{Aa+(w$E7)eBVPHv+Ye1TS&i()E-75wrHhu<{9}ok70*e5UH`1n<{|5*# Y0JQ?YKfQTx5&!@I07*qoM6N<$f=-O_WB>pF literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_grass_5.png b/mods/default/textures/default_grass_5.png new file mode 100755 index 0000000000000000000000000000000000000000..7fd6838805d5e6ef99eec788e061793e3eaa7665 GIT binary patch literal 3269 zcmV;$3_A0PP)uJ@VVD_U zC<6{NG_fI~0ue<-1QkJoA_k0xBC#Thg@9ne9*`iQ#9$OrQF$}6R&?d%y_c8YA7_1Q zpS|}zXYYO1x&V;8{kgn!SPFnNo`4_X z6{c}T{8k*B#$jdxfFg<9uYy1K45IaYvHg`_dOZM)Sy63ve6hvv1)yUy0P^?0*fb9UASvow z`@mQCp^4`uNg&9uGcn1|&Nk+9SjOUl{-OWr@Hh0;_l(8q{wNRKos+;6rV8ldy0Owz z(}jF`W(JeRp&R{qi2rfmU!TJ;gp(Kmm5I1s5m_f-n#TRsj}B0%?E` zvOzxB2#P=n*a3EfYETOrKoe*ICqM@{4K9Go;5xVgZi5G41dM~{UdP z6d+Yd3o?MrAqM0Kc|iV92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+9++s?NEDe`%Fht$4F;X=in*dQ{7$mU2Q)a|9JSc+Uc4zvS-T9 z63!N$T{xF_ZuWe}`RNOZ7sk3{yB}PPym+f8xTpV;-=!;;JuhGEb?H5K#o@~7t9DmU zU1MD9xNd#Dz0azz?I)|B+WM{g+Xrk0I&awC=o(x)cy`EX=)z6+o0o6-+`4{y+3mqQ z%kSJBju{@g%f35#FZJHb`&swrA8dGtepviS>QUumrN{L@>;2q1Vm)$Z)P1z?N$8UY zW2~{~zhwUMVZ87u`Dx{Z>O|9|`Q+&->FRy-Sjp7DHsy69KwU-!MxeeuI@&cF4| zM9z%ARI+y?e7jKeZ#YO-C0t!h)K~#90V*LOAKLaHIAb?mJ7TFM` z@HY#`f7U-g7}3Q60*DD+;OQ?8tWE-H1{s1b4iG?0$bulYG#kX0M;{n56hD9S6T@JD z0Ad1}EGWS9A7;y|4@_V-GZ#CC7vu!~Gs4&~aex2alrEG$6s009K|f*2P>A;^{ouRp_F1QvU6|Hpqxp1)vCf0%xv7z7YNOfY|~UwsGR z*B76_^s`UDQM_^d=&S!ye5_!D#036BE+75W`GAM&}ILDd@ukAAg0I9e}V;g1z8wAe1d2Mxc~$}E&v+{ z6qn>h@Iip>>n|`35I{__lI#pZTr3ccd=QO1>;hmzVJ-lPzkTrw?jn$SVF@-c8z6v~ zKmqmeDI~g>M7Y3C1xdnO0|S3pAlcyMo8SLIVFEG`1ONhv1r&IHI9M3ubp^qKU*5f9 zxN@G6K>+9_4oM!cOV|_y8N`8Jc+L)?-~Qo-y8s}7nEo;|f}QsH&0DbG`9S zuKDr&3xlP#7})=yu!8yf!L1Jr!1Tb7HpTouK!5=NS2p|Rwkd)b00000NkvXXu0mjf Dt1U4% literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_junglegrass.png b/mods/default/textures/default_junglegrass.png new file mode 100755 index 0000000000000000000000000000000000000000..25abb714602b1e7975514886f6ce20000328be4f GIT binary patch literal 197 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHV5AX?b1=11*EGi!CcBzt)eHx}l zx~V`R#*!evU)OOG)?utBHuD-LC10<0Dy)6A qp(X#^3*{51lh?A@Z>^a1n*Z_`Or#+{>9C9MZfYr_}&JGfqJOAjg7qyBnxrlW_`? z<_*ltX*H~~O!k9=?>iZ%AUUmOUkdi6Jdpr^X8^#4Hpg;MiUoBLiOK!<$LoD8u++&F z0DRvG0FWk&*+_@YX*IQWU6A9^STocz%{T@5{aFl=$%2}-nY`29*fekd%wv)+(5q%* zeBX)I$30PrbY*5!>!bS~ov@gu)@HWBp{cdLo5Gcu0FE*0$8t3Vg81RjWIs4GEPm2H znY?>g`%-|j0Rb9PrZKgF9>-`2)J7*7z`p#%^OuosJ=$>!qDPw3YOH?OT7Ny2njH;) Y09fN5kp`c2RR91007*qoM6N<$f|8`JVE_OC literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_leaves_simple.png b/mods/default/textures/default_leaves_simple.png new file mode 100755 index 0000000000000000000000000000000000000000..e492a32ee1600072ea2c5886785ba2a4f329d614 GIT binary patch literal 817 zcmV-11J3-3P)>rDUv0=`K^ zK~y-)Ws=)&6K52KzuEtI4n7SIc4GpDP(hLlOGGWbt0IvX=ri}OD!r&^)smJH5K%=A z*q&2nJTw2EUbu;n*blJQUTb~McxTJ$&w5(MYlh=Ki?=K3M}4hLg=t)@+pu0#(vSMe zu%*-Wh~LDhRRNH_qp|Kj9S}r5MZV_dY@@VcOC2}NkEaS?D+NHU%HGjfNBbj{%X7=S zzfQe&&#BX9uUwHk?6$dXSYOTffTz&9eq}hjD zlCzBahaq0zu{>Fd>$(i?4UjC(q)8ePBlPZcX_7`hU0RH5c=UY0>MzS^f20H(=T=(| zUQE;(IHad3&fyP_+dL7LCrjBo8tdh`rCgPC!VYy&V@g97XVM*ZwGG>iN)AOw4gp#}^cn6B?e(IhGwMJa z0uY1&^W&-h@#6(a;@~_wn6>M2P20AF(*Q?=Xwu{3t1Hwh(i4Kn$1arFw>{2&y{7jt zp!iTxn+nO3T$-v8KlBMBAIEXHalLmqK`OykN|6`x_NNsRIh1Kl7H47_7x$+5<;haY zKT8E}T^FwtsypaGOv?sady6*wzF?~tm_TuXD?&p1)epLp*SzT zm@l}$0U|w3Irx5z+#m^X@mm4VdXo+|woK+*U(C0?<2s*HE8U$glyLb^f#-XK+o6gv vhzNe*F_{O{>)K7uGCHFU7w>C6qt^TfatDGMH{u{H00000NkvXXu0mjf=PYfx literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_obsidian_glass_detail.png b/mods/default/textures/default_obsidian_glass_detail.png new file mode 100755 index 0000000000000000000000000000000000000000..a8bbec98d877d4df1130847e873d9c167bb033db GIT binary patch literal 1167 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`oCO|{#S9DvULeeP$l}IhprBM{ zNJNQqer|4RUI~!Pz~GyhlB!UiS(2gPo|#(^r~B_60|Se+r;B5Vg&?B<%lqG8Ringc g2#kinXb1p9fJK0TQR@n-B6lC~-{7CUZ0?hkzhXCjFmNxm`?5dh?T-ZyKQ|h`pEi5foD7>AhSILZ zHw)_)oIRTTT1djq!bLA)joJ>o4e3Uf*Qa_g)^2c)+!5o)YA?ZlJRs!75oTM(X`-If b9DgylSg_5@k7{TKx|PAx)z4*}Q$iB}eJx~| literal 0 HcmV?d00001 diff --git a/mods/default/textures/default_pine_tree_top.png b/mods/default/textures/default_pine_tree_top.png new file mode 100755 index 0000000000000000000000000000000000000000..8705710ed825fcf7cbbf6edf0de6b5b5ddb8b4f5 GIT binary patch literal 574 zcmV-E0>S->P)DQSwTtT2tLMz6=gy+x#+={6nb@+5^5)F#+qv%B zvhUlk?Aov6%A(`Pn%=*d-Mf&~se!P7VDaS1@ZrSk*t6-=vgp#T>({I2(5vFepy9-u z;KG*Nyq4g>l-|9O)~C_+`^pY!IRjylGU}3+p~||xsKho zjL)r$)~$%erG?9BtagZNU$m zooDc#TuBKj7V@^OxwoLa`;s+^TDep$Xzm>-b2W*MN!}(k!n_oesUFj2IVx362UiB5 z%*<xFN*kwJ2WLQu3>6UXMNLmf0o?WN#%)`mv9FZ+fB6+{lgPc)bo7q z&4UkBGjq2{%x!6B*?Uj^fX35l=@zlU9p2Yx92491(E5wc!H~t4+y3U4xLa>%|H57! WDpDF-_+bao1q`09elF{r5}E*%iCzBy literal 0 HcmV?d00001 diff --git a/mods/tsm_chests/init.lua b/mods/tsm_chests/init.lua old mode 100644 new mode 100755 index bde97b8..0aa3d69 --- a/mods/tsm_chests/init.lua +++ b/mods/tsm_chests/init.lua @@ -78,22 +78,116 @@ minetest.register_node("tsm_chests:chest", { --[[ here are some configuration variables ]] -local chests_per_chunk = 5 -- number of chests per chunk. 15 is a bit high, an actual mod might have a lower number +local chests_per_chunk = 6 -- number of chests per chunk. 15 is a bit high, an actual mod might have a lower number local h_min = -1 -- minimum chest spawning height, relative to water_level -local h_max = 15 -- maximum chest spawning height, relative to water_level +local h_max = 64-43 -- maximum chest spawning height, relative to water_level local t_min = 3 -- minimum amount of treasures found in a chest local t_max = 6 -- maximum amount of treasures found in a chest +local r_max = tonumber(minetest.setting_get("barrier")) +local water_level = tonumber(minetest.setting_get("water_level")) +local get_node = minetest.get_node +local env = minetest.env + +local function findGroundLevel(pos, y_min, y_max) + local ground = nil + local top = y_max + for y = y_max, y_min, -1 do + local p = {x=pos.x,y=y,z=pos.z} + local name = get_node(p).name + if name == "air" or name == "default:water_source" or name == "default:lava_source" then + top = y + break + end + end + for y=top,y_min,-1 do + local p = {x=pos.x,y=y,z=pos.z} + local name = get_node(p).name + if name ~= "air" and name ~= "default:water_source" and name ~= "default:lava_source" then + ground = y + break + end + end + return ground +end + +local function getFacedirs(pos, ground) + -- secondly: rotate the chest + -- find possible faces + local xp, xm, zp, zm + xp = minetest.get_node({x=pos.x+1, y=ground+1, z=pos.z}) + xm = minetest.get_node({x=pos.x-1, y=ground+1, z=pos.z}) + zp = minetest.get_node({x=pos.x, y=ground+1, z=pos.z+1}) + zm = minetest.get_node({x=pos.x, y=ground+1, z=pos.z-1}) + + -- Set Facedirs + local facedirs = {} + if xp.name=="air" or xp.name=="default:water_source" then + table.insert(facedirs, minetest.dir_to_facedir({x=-1,y=0,z=0})) + end + if xm.name=="air" or xm.name=="default:water_source" then + table.insert(facedirs, minetest.dir_to_facedir({x=1,y=0,z=0})) + end + if zp.name=="air" or zp.name=="default:water_source" then + table.insert(facedirs, minetest.dir_to_facedir({x=0,y=0,z=-1})) + end + if zm.name=="air" or zm.name=="default:water_source" then + table.insert(facedirs, minetest.dir_to_facedir({x=0,y=0,z=1})) + end + + return facedirs +end + +local function placeChest(pos, chest_pos, ground, nn) + local chest = {name = "tsm_chests:chest"} + local facedirs = getFacedirs(pos, ground) + + -- choose a random face (if possible) + if #facedirs == 0 then + minetest.set_node({x=pos.x,y=ground+1, z=pos.z+1}, {name=nn}) + chest.param2 = minetest.dir_to_facedir({x=0,y=0,z=1}) + else + chest.param2 = facedirs[math.floor(math.random(#facedirs))] + end + + -- Lastly: place the chest + minetest.set_node(chest_pos, chest) + + -- Get treasure + local treasure_amount = math.ceil(math.random(t_min, t_max)) + local height = math.abs(h_min) - math.abs(h_max) + local y_norm = (ground+1) - h_min + local scale = 1 - (y_norm/height) + local minp = 0 --scale*4 -- minimal preciousness: 0..4 + local maxp = 10 --scale*4+2.1 -- maximum preciousness: 2.1..6.1 + local treasures = treasurer.select_random_treasures(treasure_amount, minp, maxp) + + -- Add Treasure to Chst + local meta = minetest.get_meta(chest_pos) + local inv = meta:get_inventory() + for i=1, #treasures do + inv:set_stack("main", i, treasures[i]) + end +end + --[[ here comes the generation code the interesting part which involes treasurer comes way below ]] -minetest.register_on_generated(function(minp, maxp, seed) - -- get the water level and convert it to a number - local water_level = minetest.setting_get("water_level") - if water_level == nil or type(water_level) ~= "number" then - water_level = 1 - else - water_level = tonumber(water_level) +minetest.register_on_generated(function(minp, maxp, seed) + minp = {x=minp.x, y=minp.y, z=minp.z} + maxp = {x=maxp.x, y=maxp.y, z=maxp.z} + + if minp.x <= -r_max then + minp.x = -r_max + 1 + end + if minp.z <= -r_max then + minp.z = -r_max + 1 + end + if minp.x >= r_max then + minp.x = r_max - 1 + end + if minp.z >= r_max then + minp.z = r_max - 1 end -- chests minimum and maximum spawn height @@ -105,103 +199,34 @@ minetest.register_on_generated(function(minp, maxp, seed) end local y_min = math.max(minp.y, height_min) local y_max = math.min(maxp.y, height_max) - local get_node = minetest.get_node - local env = minetest.env - for i=1, chests_per_chunk do - local pos = {x=math.random(minp.x,maxp.x),z=math.random(minp.z,maxp.z), y=minp.y} + local attempts = 0 + local chests_placed = 0 + while chests_placed < chests_per_chunk and attempts < chests_per_chunk + 6 do + attempts = attempts + 1 + local pos = { + x = math.random(minp.x, maxp.x), + y = minp.y, + z = math.random(minp.z, maxp.z) + } -- Find ground level - local ground = nil - local top = y_max - for y=y_max,y_min,-1 do - local p = {x=pos.x,y=y,z=pos.z} - local name = get_node(p).name - if name == "air" or name == "default:water_source" or name == "default:lava_source" then - top = y - break - end - end - for y=top,y_min,-1 do - local p = {x=pos.x,y=y,z=pos.z} - local name = get_node(p).name - if name ~= "air" and name ~= "default:water_source" and name ~= "default:lava_source" then - ground = y - break - end - end - - if ground~=nil then - local chest_pos = {x=pos.x,y=ground+1, z=pos.z} + local ground = findGroundLevel(pos, y_min, y_max) + if ground ~= nil then + local chest_pos = {x = pos.x, y = ground + 1, z = pos.z} + + -- Don't spawn at barrier if chest_pos.z == 0 then chest_pos.z = -1 end + local nn = minetest.get_node(chest_pos).name -- chest node name (before it becomes a chest) if nn == "air" or nn == "default:water_source" then - -->>>> chest spawning starts here <<<<-- - - -- first: spawn the chest - local chest = {name = "tsm_chests:chest"} - - -- secondly: rotate the chest - -- find possible faces - local xp, xm, zp, zm - xp = minetest.get_node({x=pos.x+1,y=ground+1, z=pos.z}) - xm = minetest.get_node({x=pos.x-1,y=ground+1, z=pos.z}) - zp = minetest.get_node({x=pos.x,y=ground+1, z=pos.z+1}) - zm = minetest.get_node({x=pos.x,y=ground+1, z=pos.z-1}) - - local facedirs = {} - if(xp.name=="air" or xp.name=="default:water_source") then - table.insert(facedirs, minetest.dir_to_facedir({x=-1,y=0,z=0})) - end - if(xm.name=="air" or xm.name=="default:water_source") then - - table.insert(facedirs, minetest.dir_to_facedir({x=1,y=0,z=0})) - end - if(zp.name=="air" or zp.name=="default:water_source") then - table.insert(facedirs, minetest.dir_to_facedir({x=0,y=0,z=-1})) - end - if(zm.name=="air" or zm.name=="default:water_source") then - table.insert(facedirs, minetest.dir_to_facedir({x=0,y=0,z=1})) - end - - -- choose a random face (if possible) - if(#facedirs == 0) then - minetest.set_node({x=pos.x,y=ground+1, z=pos.z+1},{name=nn}) - chest.param2 = minetest.dir_to_facedir({x=0,y=0,z=1}) - else - chest.param2 = facedirs[math.floor(math.random(#facedirs))] - end - - -- Lastly: place the chest - minetest.set_node(chest_pos,chest) - --minetest.chat_send_all("Placed chest! " .. dump(chest_pos)) - - --->>>>>>>>>> At this point we are finally going to involve Treasurer. <<<<<<<<<<<<<<-- - -- determine a random amount of treasures - local treasure_amount = math.ceil(math.random(t_min, t_max)) - - -- calculate preciousness of treasures based on height. higher = more precious - local height = math.abs(h_min) - math.abs(h_max) - local y_norm = (ground+1) - h_min - local scale = 1 - (y_norm/height) - local minp = 0 --scale*4 -- minimal preciousness: 0..4 - local maxp = 10 --scale*4+2.1 -- maximum preciousness: 2.1..6.1 - - -- now use these values to finally request the treasure(s) - local treasures = treasurer.select_random_treasures(treasure_amount,minp,maxp) - -- That’s it! - - -- Get the inventory of the chest to place the treasures in - local meta = minetest.get_meta(chest_pos) - local inv = meta:get_inventory() - - --[[ Now that we got both our treasures and the chest’s inventory, - let’s place the treasures one for one into it. ]] - for i=1,#treasures do - inv:set_stack("main",i,treasures[i]) - end + placeChest(pos, chest_pos, ground, nn) + + chests_placed = chests_placed + 1 end end end + + print("Spawned " .. chests_placed .. " chests after " .. attempts .. " attempts!") end)