Add Mushroom World

This commit is contained in:
IamPyu
2024-10-02 21:26:16 -06:00
parent eaf5841824
commit 45b001ffa4
14 changed files with 176 additions and 103 deletions

Binary file not shown.

View File

@@ -201,12 +201,16 @@ PyuTest.make_building_blocks("pyutest_blocks:mushroom_stem", "Mushroom Stem", {
choppy = PyuTest.BLOCK_FAST
}, { is_ground_content = false })
PyuTest.make_building_blocks("pyutest_blocks:purple_mushroom", "Purple Mushroom", {
PyuTest.make_building_blocks("pyutest_blocks:glowshroom", "Glowshroom", {
"pyutest-purple-mushroom.png"
}, nil, {
flammable = 1,
choppy = PyuTest.BLOCK_FAST
}, { is_ground_content = false })
}, {
is_ground_content = false,
paramtype = "light",
light_source = minetest.LIGHT_MAX
})
-- Breakable by hand
PyuTest.make_building_blocks("pyutest_blocks:haybale", "Haybale", {

View File

@@ -44,7 +44,7 @@ PyuTest.make_node("pyutest_blocks:glass", "Glass", {
sunlight_propagates = true
})
-- FIXME: This has been in the game for a month, implement it already!
-- FIXME: This has been in the game for months, implement it already!
PyuTest.make_node("pyutest_blocks:trapdoor", "Trapdoor", {
choppy = PyuTest.BLOCK_NORMAL,
flammable = 1

View File

@@ -2,7 +2,6 @@ local modpath = minetest.get_modpath("pyutest_mapgen")
dofile(modpath.."/api.lua")
dofile(modpath.."/mapgen.lua")
dofile(modpath.."/worlds.lua")
if not PyuTest.is_flat() then
dofile(modpath.."/structures.lua")

View File

@@ -1 +1 @@
depends = pyutest_blocks,pyutest_flowers
depends = pyutest_blocks,pyutest_flowers,pyutest_worlds

View File

@@ -113,7 +113,7 @@ minetest.register_decoration({
place_on = {"pyutest_blocks:mycelium_block"},
sidelen = 16,
fill_ratio = 0.003,
biomes = {"mushroom_fields", "large_mushroom_forest"},
biomes = PyuTest.util.tableconcat2({"mushroom_fields", "large_mushroom_forest"}, PyuTest.MushroomWorld.biome_names),
schematic = PyuTest.get_schem_path("Mushroom"),
rotation = "random",
flags = "place_center_x, place_center_z",
@@ -261,7 +261,7 @@ minetest.register_decoration({
place_on = {"pyutest_blocks:mycelium_block"},
sidelen = 16,
fill_ratio = 0.006,
biomes = {"large_mushroom_forest"},
biomes = PyuTest.util.tableconcat2({"large_mushroom_forest"}, PyuTest.MushroomWorld.biome_names),
schematic = PyuTest.get_schem_path("TallMushroom"),
rotation = "random",
flags = "place_center_x, place_center_z",
@@ -273,7 +273,7 @@ minetest.register_decoration({
place_on = {"pyutest_blocks:mycelium_block"},
sidelen = 16,
fill_ratio = 0.002,
biomes = {"large_mushroom_forest"},
biomes = PyuTest.util.tableconcat2({"large_mushroom_forest"}, PyuTest.MushroomWorld.biome_names),
schematic = PyuTest.get_schem_path("SmallMushroom"),
rotation = "random",
flags = "place_center_x, place_center_z",

View File

@@ -98,6 +98,8 @@ PyuTest.register_world = function (options)
minetest.set_node(upos + vector.new(0, -1, 0), {
name = "pyutest_blocks:light"
})
user:set_pos(upos)
end)
end
})
@@ -106,98 +108,3 @@ PyuTest.register_world = function (options)
return World
end
PyuTest.IceWorld = PyuTest.register_world({
name = "ice_world",
y_max = -1000,
y_min = -2000
})
PyuTest.IceWorld:create_token("pyutest_mapgen:ice_world_token", "Ice World", "#cbdbfc")
local icy_cavern = PyuTest.IceWorld:register_biome({
name = "icy_cavern",
node_stone = "pyutest_blocks:ice_block",
heat_point = 0,
humidity_point = 0
})
PyuTest.IceWorld:register_ore({
ore_type = "blob",
ore = "pyutest_blocks:snow_block",
wherein = "pyutest_blocks:ice_block",
clust_scarcity = 3 * 3 * 3,
clust_num_ores = 35,
clust_size = 5,
biomes = {icy_cavern},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.IceWorld:register_ore({
ore_type = "blob",
ore = "pyutest_blocks:crystal_lantern_block",
wherein = "pyutest_blocks:ice_block",
clust_scarcity = 4.5 * 4.5 * 4.5,
clust_num_ores = 6,
clust_size = 5,
biomes = {icy_cavern},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.SlimeWorld = PyuTest.register_world({
name = "slime_world",
y_max = -2001,
y_min = -3001
})
PyuTest.SlimeWorld:create_token("pyutest_mapgen:slime_world_token", "Slime World", "#7dbd3f")
local slimey_cavern = PyuTest.SlimeWorld:register_biome({
name = "slimey_cavern",
node_stone = "pyutest_blocks:slime_block",
heat_point = 45,
humidity_point = 0
})
PyuTest.SlimeWorld:register_ore({
ore_type = "blob",
ore = "pyutest_blocks:glowslime_block",
wherein = "pyutest_blocks:slime_block",
clust_scarcity = 4.5 * 4.5 * 4.5,
clust_num_ores = 6,
clust_size = 5,
biomes = {slimey_cavern},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.LavaWorld = PyuTest.register_world({
name = "lava_world",
y_max = -3002,
y_min = -4002
})
PyuTest.LavaWorld:create_token("pyutest_mapgen:lava_world_token", "Lava World", "#511e1e")
local lava_cavern = PyuTest.LavaWorld:register_biome({
name = "lava_cavern",
node_stone = "pyutest_blocks:molten_rock_block",
heat_point = 100,
humidity_point = 0,
})
PyuTest.LavaWorld:register_ore({
ore_type = "blob",
ore = "pyutest_blocks:magma",
wherein = "pyutest_blocks:molten_rock_block",
clust_scarcity = 4.5 * 4.5 * 4.5,
clust_num_ores = 6,
clust_size = 5,
biomes = {lava_cavern},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.LavaWorld:register_decoration({
deco_type = "simple",
sidelen = 16,
fill_ratio = 0.00063,
decoration = {"pyutest_blocks:lava_source"},
place_on = {"pyutest_blocks:molten_rock_block", "pyutest_blocks:magma"},
biomes = {lava_cavern},
flags = "all_ceilings"
})

View File

@@ -0,0 +1,35 @@
PyuTest.IceWorld = PyuTest.register_world({
name = "ice_world",
y_max = -1000,
y_min = -2000
})
PyuTest.IceWorld:create_token("pyutest_worlds:ice_world_token", "Ice World", "#cbdbfc")
local icy_cavern = PyuTest.IceWorld:register_biome({
name = "icy_cavern",
node_stone = "pyutest_blocks:ice_block",
heat_point = 0,
humidity_point = 0
})
PyuTest.IceWorld:register_ore({
ore_type = "blob",
ore = "pyutest_blocks:snow_block",
wherein = "pyutest_blocks:ice_block",
clust_scarcity = 3 * 3 * 3,
clust_num_ores = 35,
clust_size = 5,
biomes = {icy_cavern},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.IceWorld:register_ore({
ore_type = "blob",
ore = "pyutest_blocks:crystal_lantern_block",
wherein = "pyutest_blocks:ice_block",
clust_scarcity = 4.5 * 4.5 * 4.5,
clust_num_ores = 6,
clust_size = 5,
biomes = {icy_cavern},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})

View File

@@ -0,0 +1,8 @@
local modpath = minetest.get_modpath("pyutest_worlds")
dofile(modpath.."/api.lua")
dofile(modpath.."/ice.lua")
dofile(modpath.."/slime.lua")
dofile(modpath.."/lava.lua")
dofile(modpath.."/mushroom.lua")

View File

@@ -0,0 +1,34 @@
PyuTest.LavaWorld = PyuTest.register_world({
name = "lava_world",
y_max = -3002,
y_min = -4002
})
PyuTest.LavaWorld:create_token("pyutest_worlds:lava_world_token", "Lava World", "#511e1e")
local lava_cavern = PyuTest.LavaWorld:register_biome({
name = "lava_cavern",
node_stone = "pyutest_blocks:molten_rock_block",
heat_point = 100,
humidity_point = 0,
})
PyuTest.LavaWorld:register_ore({
ore_type = "blob",
ore = "pyutest_blocks:magma",
wherein = "pyutest_blocks:molten_rock_block",
clust_scarcity = 4.5 * 4.5 * 4.5,
clust_num_ores = 6,
clust_size = 5,
biomes = {lava_cavern},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.LavaWorld:register_decoration({
deco_type = "simple",
sidelen = 16,
fill_ratio = 0.00063,
decoration = {"pyutest_blocks:lava_source"},
place_on = {"pyutest_blocks:molten_rock_block", "pyutest_blocks:magma"},
biomes = {lava_cavern},
flags = "all_ceilings"
})

View File

@@ -0,0 +1 @@
depends = pyutest_tools,pyutest_blocks

View File

@@ -0,0 +1,59 @@
PyuTest.MushroomWorld = PyuTest.register_world({
name = "mushroom_world",
y_max = -4003,
y_min = -5003
})
PyuTest.MushroomWorld:create_token("pyutest_worlds:mushroom_world_token", "Mushroom World", "#ac324c")
local mushroom_forest = PyuTest.MushroomWorld:register_biome({
name = "mushroom_forest",
node_stone = "pyutest_blocks:mycelium_block",
heat_point = 36,
humidity_point = 0
})
PyuTest.MushroomWorld:register_ore({
ore_type = "blob",
ore = "pyutest_blocks:mushroom_block",
wherein = "pyutest_blocks:mycelium_block",
clust_scarcity = 4.5 * 4.5 * 4.5,
clust_num_ores = 6,
clust_size = 5,
biomes = {mushroom_forest},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.MushroomWorld:register_ore({
ore_type = "blob",
ore = "pyutest_blocks:mushroom_stem_block",
wherein = "pyutest_blocks:mycelium_block",
clust_scarcity = 9.5 * 9.5 * 9.5,
clust_num_ores = 6,
clust_size = 5,
biomes = {mushroom_forest},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.MushroomWorld:register_ore({
ore_type = "blob",
ore = "pyutest_blocks:glowshroom_block",
wherein = "pyutest_blocks:mycelium_block",
clust_scarcity = 4.5 * 4.5 * 4.5,
clust_num_ores = 6,
clust_size = 5,
biomes = {mushroom_forest},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})
PyuTest.MushroomWorld:register_decoration({
deco_type = "schematic",
place_on = {"pyutest_blocks:mycelium_block"},
sidelen = 16,
fill_ratio = 0.006,
biomes = PyuTest.MushroomWorld.biome_names,
schematic = PyuTest.get_schem_path("HangingMushroom"),
rotation = "random",
flags = "place_center_x, place_center_z, all_ceilings",
force_placement = true,
place_offset_y = 1
})

View File

@@ -0,0 +1,24 @@
PyuTest.SlimeWorld = PyuTest.register_world({
name = "slime_world",
y_max = -2001,
y_min = -3001
})
PyuTest.SlimeWorld:create_token("pyutest_worlds:slime_world_token", "Slime World", "#7dbd3f")
local slimey_cavern = PyuTest.SlimeWorld:register_biome({
name = "slimey_cavern",
node_stone = "pyutest_blocks:slime_block",
heat_point = 45,
humidity_point = 0
})
PyuTest.SlimeWorld:register_ore({
ore_type = "blob",
ore = "pyutest_blocks:glowslime_block",
wherein = "pyutest_blocks:slime_block",
clust_scarcity = 4.5 * 4.5 * 4.5,
clust_num_ores = 6,
clust_size = 5,
biomes = {slimey_cavern},
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
})