Rename biomes, add fire animation, new world, and more

This commit is contained in:
IamPyu 2024-11-03 20:39:38 -06:00
parent c7dc41ed5f
commit 696d8e8636
29 changed files with 210 additions and 103 deletions

View File

@ -1,5 +1,13 @@
# Changelog
## [Nov 3rd - STILL UNDERDEVELOPMENT] Update: The "Another update with no special name" Update
I should just start giving updates a version number to avoid naming updates.
- Added various new sounds
- Give Fire an animated texture
- Added a Sky Dimension for people using `floatlands` mapgen setting in v7
## [Oct 20th - Nov 2nd] Update: The Something Update
- Make some changes to world generation
@ -13,8 +21,8 @@
- Add Time Device, it is not craftable in Survival mode and is only for Creative mode.
- Improve death messages
- Added stats which can improve your defense and attack capabilities
- Defense stat is only applied when your health is greater than one fourth of it!
- Added upgrade runes which can be used to improve your defense and attack stats
- Defense stat is only applied when your health is greater than one fourth of it!
- Added upgrade runes which can be used to improve your defense and attack stats
- Added buckets
- Added beaches
- Added various small overworld features

View File

@ -0,0 +1,23 @@
PyuTest.deal_damage = function(target, damage, reason)
local hp = target:get_hp()
if hp > 0 then
target:set_hp(hp - damage, reason)
end
end
PyuTest.DAMAGE_TYPES = {
explosion = function (range)
return {
type = "set_hp",
_pyutest = {
type = "explosion",
range = range
}
}
end
}
PyuTest.mt_damage_to_pyutest_damage = function(reason)
end

View File

@ -35,9 +35,10 @@ PyuTest.DEFAULT_EFFECTS = {
PyuTest.WORLD_GRAVITY = minetest.settings:get("movement_gravity")
PyuTest.get_schem_path = function (name)
PyuTest.get_schematic_path = function (name)
return minetest.get_modpath("pyutest") .. "/schematics/"..name..".mts"
end
local modpath = minetest.get_modpath("pyutest")
dofile(modpath.."/damage.lua")
dofile(modpath.."/util.lua")

Binary file not shown.

View File

@ -113,6 +113,7 @@ PyuTest.create_explosion = function (pos, range, rm_pos, dmg, damage_whitelist)
v:punch(v, nil, {
damage_groups = {fleshy = dmg}
}, nil)
PyuTest.deal_damage(v, dmg, PyuTest.DAMAGE_TYPES.explosion(range))
end
if damage_whitelist ~= nil then
@ -275,14 +276,6 @@ PyuTest.register_interval = function(fn, time)
interval()
end
PyuTest.deal_damage = function(target, damage, reason)
local hp = target:get_hp()
if hp > 0 then
target:set_hp(hp - damage, reason)
end
end
PyuTest.give_item_or_drop = function(stack, inventory, listname, pos)
local leftover = inventory:add_item(listname, stack)

View File

@ -259,7 +259,11 @@ PyuTest.make_mob = function (name, properties, options)
local pos = self.object:get_pos()
for _, v in pairs(self.options.drops) do
minetest.add_item(pos, v)
local o = minetest.add_item(pos, v)
if o then
o:add_velocity(vector.new(math.random(-2, 2), 5, math.random(-2, 2)))
end
end
end
}, {__index = class}))

View File

@ -28,4 +28,11 @@ PyuTest.make_mob("pyutest_entities:dummy", {
"player.png", "player_back.png"
},
nametag = "Dummy",
}, {})
}, {
drops = {
"pyutest_tools:apple 3",
"pyutest_ores:diamond_shard 3",
"pyutest_ores:emerald_shard 3",
"pyutest_magic:windball 3"
}
})

View File

@ -9,7 +9,7 @@ mobs:register_arrow("pyutest_mobs:arrow_snowball", {
visual_size = {x = 1, y = 1},
textures = {"pyutest-snowball.png"},
hit_node = function (self, pos)
PyuTest.create_explosion(pos, 1, false, 9, self.object, false)
PyuTest.create_explosion(pos, 1, false, 9, {self.object})
end,
hit_player = snowball_hit_player,
hit_mob = snowball_hit_player,

View File

@ -99,7 +99,7 @@ PyuTest.make_building_blocks = function(name, desc, tex, colortint, cgroups, ext
}),
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
paramtype2 = "colorfacedir",
node_box = PyuTest.NODE_BOXES.CARPET,
sounds = PyuTest.make_node_sounds(),
buildable_to = true,
@ -112,7 +112,7 @@ PyuTest.make_building_blocks = function(name, desc, tex, colortint, cgroups, ext
groups = groups,
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
paramtype2 = "colorfacedir",
node_box = PyuTest.NODE_BOXES.SLAB,
sounds = PyuTest.make_node_sounds(),
}, econf))
@ -133,7 +133,7 @@ PyuTest.make_building_blocks = function(name, desc, tex, colortint, cgroups, ext
groups = groups,
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
paramtype2 = "colorfacedir",
node_box = PyuTest.NODE_BOXES.STAIRS,
sounds = PyuTest.make_node_sounds(),
}, econf))

View File

@ -144,7 +144,6 @@ PyuTest.make_building_blocks("pyutest_blocks:tuff_bricks", "Tuff Bricks", {
cracky = PyuTest.BLOCK_NORMAL,
}, {
is_ground_content = false,
paramtype2 = "color",
})
PyuTest.make_building_blocks("pyutest_blocks:sandstone", "Sandstone", { "pyutest-sandstone.png" }, nil, {

View File

@ -68,7 +68,17 @@ PyuTest.make_node("pyutest_blocks:fire", "Fire", {
dig_immediate = 1,
oddly_breakable_by_hand = PyuTest.BLOCK_FAST,
emits_heat = 1
}, { "pyutest-fire.png" }, {
}, {
{
name = "pyutest-fire-animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 1
}
}
}, {
drawtype = "firelike",
walkable = false,
buildable_to = true,
@ -159,7 +169,8 @@ PyuTest.make_node("pyutest_blocks:workbench", "Workbench", {
})
PyuTest.make_node("pyutest_blocks:ladder", "Ladder", {
dig_immediate = 1
dig_immediate = 1,
oddly_breakable_by_hand = PyuTest.BLOCK_FAST
}, { "pyutest-ladder.png" }, {
drawtype = "signlike",
paramtype = "light",

View File

@ -268,6 +268,15 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "pyutest_blocks:ladder 16",
recipe = {
{"pyutest_tools:stick", "", "pyutest_tools:stick"},
{"pyutest_tools:stick", "pyutest_tools:stick", "pyutest_tools:stick"},
{"pyutest_tools:stick", "", "pyutest_tools:stick"}
}
})
minetest.register_craft({
output = "pyutest_tools:wheat 4",
recipe = {

View File

@ -170,7 +170,7 @@ PyuTest.make_item("pyutest_tools:bomb", "Bomb", {}, "pyutest-bomb.png", {
return
end
local pos = user:get_pos()
PyuTest.create_explosion(pos, 2, false, 6, user)
PyuTest.create_explosion(pos, 2, false, 6, {user})
local stack = user:get_wielded_item()
stack:set_count(stack:get_count() - 1)

View File

@ -17,7 +17,7 @@ minetest.register_chatcommand("explode", {
return false, "Please use a number for the range."
end
PyuTest.create_explosion(player:get_pos(), range, false, range, player, true)
PyuTest.create_explosion(player:get_pos(), range, false, range, {player})
end
})

View File

@ -53,7 +53,7 @@ minetest.register_chatcommand("place", {
func = function(name, param)
local player = minetest.get_player_by_name(name)
minetest.place_schematic(player:get_pos(),
PyuTest.get_schem_path(param),
PyuTest.get_schematic_path(param),
"random",
nil,
false,
@ -61,3 +61,23 @@ minetest.register_chatcommand("place", {
)
end
})
minetest.register_chatcommand("drain", {
params = "<range>",
description = "Drain all liquid in RANGE",
privs = {
builder = true
},
func = function (name, param)
local player = minetest.get_player_by_name(name)
local range = tonumber(param) or 1
PyuTest.dorange(player:get_pos(), range, function (p)
local node = minetest.get_node(p)
if minetest.get_item_group(node.name, "liquid") ~= 0 then
minetest.remove_node(p)
end
end)
end
})

View File

@ -32,7 +32,7 @@ PyuTest.register_structure = function (name, schematic, def)
nodenames = {id},
action = function (pos, node)
minetest.remove_node(pos)
minetest.place_schematic(pos, PyuTest.get_schem_path(schematic), def.rotation or "random", def.replacements or {}, def.force_placement or true, def.flags or "place_center_x, place_center_z")
minetest.place_schematic(pos, PyuTest.get_schematic_path(schematic), def.rotation or "random", def.replacements or {}, def.force_placement or true, def.flags or "place_center_x, place_center_z")
end
})
end
@ -153,6 +153,9 @@ PyuTest.register_overworld_biome = function(name, type, opts, only_base)
nopts["node_riverbed"] = nopts["node_riverbed"] or "pyutest_blocks:gravel_block"
nopts["node_sand"] = nopts["node_sand"] or "pyutest_blocks:sand_block"
nopts["node_sandstone"] = nopts["node_sandstone"] or "pyutest_blocks:sandstone_block"
nopts["_pyutest_biome_flowering"] = nopts["_pyutest_biome_flowering"] or false
nopts["_pyutest_biome_flowering_extra"] = nopts["_pyutest_biome_flowering_extra"] or false
if nopts["enable_beaches"] == nil then
nopts["enable_beaches"] = true

View File

@ -71,6 +71,8 @@ PyuTest.make_ore = function(id, desc, options)
y_max = conf.y_max,
y_min = conf.y_min,
})
return conf
end
PyuTest.make_ore_and_item = function(id, desc, item_id_suffix, item_description_suffix, options)
@ -108,8 +110,8 @@ PyuTest.make_ore_and_item = function(id, desc, item_id_suffix, item_description_
local iid = id.."_"..item_id_suffix
local rid = conf.make_raw and id.."_raw" or nil
PyuTest.make_ore(oid, desc .. " Ore", PyuTest.util.tableconcat(conf.ore_options, {
ore_drop = conf.ore_drop or (rid or iid)
local ore_conf = PyuTest.make_ore(oid, desc .. " Ore", PyuTest.util.tableconcat(conf.ore_options, {
ore_drop = conf.ore_options.ore_drop or (rid or iid)
}))
minetest.register_craftitem(iid, PyuTest.util.tableconcat({
@ -140,7 +142,7 @@ PyuTest.make_ore_and_item = function(id, desc, item_id_suffix, item_description_
end
PyuTest.make_building_blocks(id, desc, conf.block_tiles, conf.block_color, PyuTest.util.tableconcat({
cracky = conf.ore_strength
cracky = ore_conf.ore_strength
}, conf.block_groups), PyuTest.util.tableconcat(conf.block_conf, {
overlay_tiles = conf.block_shiny and {
"pyutest-shiny-metal-overlay.png"

View File

@ -66,7 +66,8 @@ PyuTest.ORE_STONES = {
"pyutest_blocks:granite_block",
"pyutest_blocks:andesite_block",
"pyutest_blocks:diorite_block",
"pyutest_blocks:tuff_block"
"pyutest_blocks:tuff_block",
"pyutest_blocks:calcite_block"
}
minetest.register_ore({

View File

@ -14,7 +14,7 @@ if PyuTest.is_flat() then
end
-- Plains like biomes
PyuTest.register_overworld_biome("grassland", PyuTest.BIOME_TYPES.NORMAL, {
PyuTest.register_overworld_biome("Grassland", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_grass:grass_block",
node_filler = "pyutest_blocks:dirt_block",
@ -27,7 +27,7 @@ PyuTest.register_overworld_biome("grassland", PyuTest.BIOME_TYPES.NORMAL, {
_pyutest_biome_flowering = true
})
PyuTest.register_overworld_biome("desert", PyuTest.BIOME_TYPES.HOT, {
PyuTest.register_overworld_biome("Desert", PyuTest.BIOME_TYPES.HOT, {
node_top = "pyutest_blocks:sand_block",
node_filler = "pyutest_blocks:sandstone_block",
node_riverbed = "pyutest_blocks:sand_block",
@ -41,7 +41,7 @@ PyuTest.register_overworld_biome("desert", PyuTest.BIOME_TYPES.HOT, {
enable_beaches = false
})
PyuTest.register_overworld_biome("frozen_plains", PyuTest.BIOME_TYPES.COLD, {
PyuTest.register_overworld_biome("FrozenPlains", PyuTest.BIOME_TYPES.COLD, {
node_dust = "pyutest_blocks:snow_carpet",
node_top = "pyutest_blocks:snow_block",
node_filler = "pyutest_blocks:snow_block",
@ -56,7 +56,7 @@ PyuTest.register_overworld_biome("frozen_plains", PyuTest.BIOME_TYPES.COLD, {
humidity_point = 60
})
PyuTest.register_overworld_biome("savanna", PyuTest.BIOME_TYPES.WARM, {
PyuTest.register_overworld_biome("Savanna", PyuTest.BIOME_TYPES.WARM, {
node_top = "pyutest_grass:savanna_grass_block",
node_filler = "pyutest_blocks:dirt_block",
@ -68,7 +68,7 @@ PyuTest.register_overworld_biome("savanna", PyuTest.BIOME_TYPES.WARM, {
})
-- Forest like biomes
PyuTest.register_overworld_biome("forest", PyuTest.BIOME_TYPES.NORMAL, {
PyuTest.register_overworld_biome("Forest", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_grass:dark_grass_block",
node_filler = "pyutest_blocks:dirt_block",
@ -81,7 +81,7 @@ PyuTest.register_overworld_biome("forest", PyuTest.BIOME_TYPES.NORMAL, {
_pyutest_biome_flowering = true
})
PyuTest.register_overworld_biome("mushroom_fields", PyuTest.BIOME_TYPES.NORMAL, {
PyuTest.register_overworld_biome("MushroomFields", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_blocks:mycelium_block",
node_filler = "pyutest_blocks:dirt_block",
@ -95,7 +95,7 @@ PyuTest.register_overworld_biome("mushroom_fields", PyuTest.BIOME_TYPES.NORMAL,
_pyutest_fog_distance = 40,
})
PyuTest.register_overworld_biome("large_mushroom_forest", PyuTest.BIOME_TYPES.NORMAL, {
PyuTest.register_overworld_biome("LargeMushroomForest", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_blocks:mycelium_block",
node_filler = "pyutest_blocks:dirt_block",
@ -109,7 +109,7 @@ PyuTest.register_overworld_biome("large_mushroom_forest", PyuTest.BIOME_TYPES.NO
_pyutest_fog_distance = 40,
})
PyuTest.register_overworld_biome("snowy_forest", PyuTest.BIOME_TYPES.COLD, {
PyuTest.register_overworld_biome("SnowyForest", PyuTest.BIOME_TYPES.COLD, {
node_dust = "pyutest_blocks:snow_carpet",
node_top = "pyutest_blocks:snow_block",
node_filler = "pyutest_blocks:dirt_block",
@ -124,7 +124,7 @@ PyuTest.register_overworld_biome("snowy_forest", PyuTest.BIOME_TYPES.COLD, {
humidity_point = 60
})
PyuTest.register_overworld_biome("taiga", PyuTest.BIOME_TYPES.CHILLY, {
PyuTest.register_overworld_biome("Taiga", PyuTest.BIOME_TYPES.CHILLY, {
node_top = "pyutest_grass:dark_grass_block",
node_filler = "pyutest_blocks:dirt_block",
@ -137,7 +137,7 @@ PyuTest.register_overworld_biome("taiga", PyuTest.BIOME_TYPES.CHILLY, {
_pyutest_biome_flowering = true
})
PyuTest.register_overworld_biome("cherry_grove", PyuTest.BIOME_TYPES.NORMAL, {
PyuTest.register_overworld_biome("CherryGrove", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_grass:grass_block",
node_filler = "pyutest_blocks:dirt_block",
@ -152,7 +152,7 @@ PyuTest.register_overworld_biome("cherry_grove", PyuTest.BIOME_TYPES.NORMAL, {
})
PyuTest.register_overworld_biome("birch_forest", PyuTest.BIOME_TYPES.NORMAL, {
PyuTest.register_overworld_biome("BirchForest", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_grass:grass_block",
node_filler = "pyutest_blocks:dirt_block",
@ -165,7 +165,7 @@ PyuTest.register_overworld_biome("birch_forest", PyuTest.BIOME_TYPES.NORMAL, {
_pyutest_biome_flowering = true
})
PyuTest.register_overworld_biome("old_growth_birch_forest", PyuTest.BIOME_TYPES.NORMAL, {
PyuTest.register_overworld_biome("OldGrowthBirchForest", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_grass:grass_block",
node_filler = "pyutest_blocks:dirt_block",
@ -179,7 +179,7 @@ PyuTest.register_overworld_biome("old_growth_birch_forest", PyuTest.BIOME_TYPES.
_pyutest_biome_flowering_extra = true
})
PyuTest.register_overworld_biome("aspen_forest", PyuTest.BIOME_TYPES.CHILLY, {
PyuTest.register_overworld_biome("AspenForest", PyuTest.BIOME_TYPES.CHILLY, {
node_top = "pyutest_grass:aspen_grass_block",
node_filler = "pyutest_blocks:dirt_block",
@ -193,7 +193,7 @@ PyuTest.register_overworld_biome("aspen_forest", PyuTest.BIOME_TYPES.CHILLY, {
_pyutest_fog_distance = 40,
})
PyuTest.register_overworld_biome("redwood_forest", PyuTest.BIOME_TYPES.CHILLY, {
PyuTest.register_overworld_biome("RedwoodForest", PyuTest.BIOME_TYPES.CHILLY, {
node_top = "pyutest_blocks:podzol_block",
node_filler = "pyutest_blocks:podzol_block",
@ -208,7 +208,7 @@ PyuTest.register_overworld_biome("redwood_forest", PyuTest.BIOME_TYPES.CHILLY, {
})
-- Marsh biomes
PyuTest.register_overworld_biome("swamp", PyuTest.BIOME_TYPES.WETLAND, {
PyuTest.register_overworld_biome("Swamp", PyuTest.BIOME_TYPES.WETLAND, {
node_top = "pyutest_grass:swampy_grass_block",
node_filler = "pyutest_blocks:dirt_block",
@ -224,7 +224,7 @@ PyuTest.register_overworld_biome("swamp", PyuTest.BIOME_TYPES.WETLAND, {
-- Mountainous biomes
PyuTest.register_overworld_biome("stony_mountains", PyuTest.BIOME_TYPES.WARM, {
PyuTest.register_overworld_biome("StonyMountains", PyuTest.BIOME_TYPES.WARM, {
node_top = "pyutest_blocks:stone_block",
node_filler = "pyutest_blocks:stone_block",
@ -235,7 +235,7 @@ PyuTest.register_overworld_biome("stony_mountains", PyuTest.BIOME_TYPES.WARM, {
humidity_point = 10
}, true)
PyuTest.register_overworld_biome("desert_mountains", PyuTest.BIOME_TYPES.HOT, {
PyuTest.register_overworld_biome("DesertMountains", PyuTest.BIOME_TYPES.HOT, {
node_top = "pyutest_blocks:sand_block",
node_filler = "pyutest_blocks:sandstone_block",
@ -246,7 +246,7 @@ PyuTest.register_overworld_biome("desert_mountains", PyuTest.BIOME_TYPES.HOT, {
humidity_point = 5
}, true)
PyuTest.register_overworld_biome("snowy_mountains", PyuTest.BIOME_TYPES.COLD, {
PyuTest.register_overworld_biome("SnowyMountains", PyuTest.BIOME_TYPES.COLD, {
node_dust = "pyutest_blocks:snow_carpet",
node_top = "pyutest_blocks:snow_block",
node_filler = "pyutest_blocks:snow_block",
@ -258,7 +258,7 @@ PyuTest.register_overworld_biome("snowy_mountains", PyuTest.BIOME_TYPES.COLD, {
humidity_point = 60
}, true)
PyuTest.register_overworld_biome("ice_spikes", PyuTest.BIOME_TYPES.COLD, {
PyuTest.register_overworld_biome("IceSpikes", PyuTest.BIOME_TYPES.COLD, {
node_top = "pyutest_blocks:ice_block",
node_filler = "pyutest_blocks:ice_block",
@ -272,7 +272,7 @@ PyuTest.register_overworld_biome("ice_spikes", PyuTest.BIOME_TYPES.COLD, {
humidity_point = 60
})
PyuTest.register_overworld_biome("meadow", PyuTest.BIOME_TYPES.NORMAL, {
PyuTest.register_overworld_biome("Meadow", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_grass:dark_grass_block",
node_filler = "pyutest_blocks:dirt_block",
depth_filler = 4,

View File

@ -1 +1 @@
depends = pyutest_mapgen,pyutest_blocks,pyutest_flowers,pyutest_lootboxes,pyutest_ores
depends = pyutest_mapgen,pyutest_blocks,pyutest_flowers,pyutest_lootboxes,pyutest_ores,pyutest_worlds

View File

@ -9,7 +9,7 @@ minetest.register_decoration({
PyuTest.register_structure("igloo", "Igloo", {
place_on = {"pyutest_blocks:snow_block"},
fill_ratio = 0.00004,
biomes = {"frozen_plains"},
biomes = {"FrozenPlains"},
rotation = "random",
flags = "place_center_x, place_center_z",
place_offset_y = 1
@ -18,7 +18,7 @@ PyuTest.register_structure("igloo", "Igloo", {
PyuTest.register_structure("desert_well", "DesertWell", {
place_on = {"pyutest_blocks:sand_block"},
fill_ratio = 0.00006,
biomes = {"desert"},
biomes = {"Desert"},
rotation = "random"
})
@ -28,7 +28,7 @@ PyuTest.register_structure("ice_spike", "IceSpike", {
"pyutest_blocks:ice_block",
},
biomes = {
"ice_spikes",
"IceSpikes",
},
})

View File

@ -22,7 +22,7 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.048,
biomes = {"grassland"},
biomes = {"Grassland"},
decoration = "pyutest_grass:grass_plant"
})
@ -31,7 +31,7 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.0018,
biomes = {"grassland"},
biomes = {"Grassland"},
decoration = "pyutest_blocks:haybale_block"
})
@ -40,7 +40,7 @@ minetest.register_decoration({
place_on = {"pyutest_blocks:dirt_block", "pyutest_blocks:sand_block"},
sidelen = 16,
fill_ratio = 0.019,
biomes = {"desert"},
biomes = {"Desert"},
decoration = "pyutest_flowers:deadbush"
})
@ -49,7 +49,7 @@ minetest.register_decoration({
sidelen = 16,
fill_ratio = 0.03,
place_on = {"pyutest_blocks:water_source"},
biomes = {"swamp", "swamp_ocean"},
biomes = {"Swamp", "Swamp_ocean"},
y_max = PyuTest.OVERWORLD_TOP,
y_min = 0,
decoration = "pyutest_flowers:lilypad",
@ -76,8 +76,8 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.03,
biomes = {"forest"},
schematic = PyuTest.get_schem_path("Tree"),
biomes = {"Forest"},
schematic = PyuTest.get_schematic_path("Tree"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true
@ -88,8 +88,8 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.00045,
biomes = {"grassland"},
schematic = PyuTest.get_schem_path("Tree"),
biomes = {"Grassland"},
schematic = PyuTest.get_schematic_path("Tree"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true
@ -100,8 +100,8 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.00085,
biomes = {"savanna"},
schematic = PyuTest.get_schem_path("SavannaTree"),
biomes = {"Savanna"},
schematic = PyuTest.get_schematic_path("SavannaTree"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true,
@ -113,8 +113,8 @@ minetest.register_decoration({
place_on = {"pyutest_blocks:mycelium_block"},
sidelen = 16,
fill_ratio = 0.003,
biomes = {"mushroom_fields", "large_mushroom_forest"},
schematic = PyuTest.get_schem_path("Mushroom"),
biomes = {"MushroomFields", "LargeMushroomForest"},
schematic = PyuTest.get_schematic_path("Mushroom"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true,
@ -126,8 +126,8 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"taiga"},
schematic = PyuTest.get_schem_path("TaigaTree"),
biomes = {"Taiga"},
schematic = PyuTest.get_schematic_path("TaigaTree"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true,
@ -139,8 +139,8 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.03,
biomes = {"birch_forest"},
schematic = PyuTest.get_schem_path("BirchTree"),
biomes = {"BirchForest"},
schematic = PyuTest.get_schematic_path("BirchTree"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true
@ -151,8 +151,8 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.02,
biomes = {"birch_forest", "old_growth_birch_forest"},
schematic = PyuTest.get_schem_path("TallBirchTree"),
biomes = {"BirchForest", "OldGrowthBirchForest"},
schematic = PyuTest.get_schematic_path("TallBirchTree"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true
@ -163,8 +163,8 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.005,
biomes = {"cherry_grove"},
schematic = PyuTest.get_schem_path("CherryTree"),
biomes = {"CherryGrove"},
schematic = PyuTest.get_schematic_path("CherryTree"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true,
@ -176,8 +176,8 @@ minetest.register_decoration({
place_on = {"pyutest_blocks:snow_block"},
sidelen = 16,
fill_ratio = 0.004,
biomes = {"snowy_forest"},
schematic = PyuTest.get_schem_path("SnowyTree1"),
biomes = {"SnowyForest"},
schematic = PyuTest.get_schematic_path("SnowyTree1"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true
@ -188,8 +188,8 @@ minetest.register_decoration({
place_on = {"pyutest_blocks:snow_block"},
sidelen = 16,
fill_ratio = 0.004,
biomes = {"snowy_forest"},
schematic = PyuTest.get_schem_path("SnowyTree2"),
biomes = {"SnowyForest"},
schematic = PyuTest.get_schematic_path("SnowyTree2"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true,
@ -201,8 +201,8 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.004,
biomes = {"swamp"},
schematic = PyuTest.get_schem_path("SwampTree"),
biomes = {"Swamp"},
schematic = PyuTest.get_schematic_path("SwampTree"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true
@ -213,8 +213,8 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.004,
biomes = {"old_growth_birch_forest"},
schematic = PyuTest.get_schem_path("VeryTallBirchTree"),
biomes = {"OldGrowthBirchForest"},
schematic = PyuTest.get_schematic_path("VeryTallBirchTree"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true
@ -225,8 +225,8 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.016,
biomes = {"aspen_forest"},
schematic = PyuTest.get_schem_path("AspenTree1"),
biomes = {"AspenForest"},
schematic = PyuTest.get_schematic_path("AspenTree1"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true
@ -237,8 +237,8 @@ minetest.register_decoration({
place_on = {"group:grass"},
sidelen = 16,
fill_ratio = 0.008,
biomes = {"aspen_forest"},
schematic = PyuTest.get_schem_path("AspenTree2"),
biomes = {"AspenForest"},
schematic = PyuTest.get_schematic_path("AspenTree2"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true
@ -249,8 +249,8 @@ minetest.register_decoration({
place_on = {"pyutest_blocks:podzol_block"},
sidelen = 16,
fill_ratio = 0.019,
biomes = {"redwood_forest"},
schematic = PyuTest.get_schem_path("RedwoodTree"),
biomes = {"RedwoodForest"},
schematic = PyuTest.get_schematic_path("RedwoodTree"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true
@ -261,8 +261,8 @@ minetest.register_decoration({
place_on = {"pyutest_blocks:mycelium_block"},
sidelen = 16,
fill_ratio = 0.006,
biomes = {"large_mushroom_forest"},
schematic = PyuTest.get_schem_path("TallMushroom"),
biomes = {"LargeMushroomForest"},
schematic = PyuTest.get_schematic_path("TallMushroom"),
rotation = "random",
flags = "place_center_x, place_center_z",
force_placement = true
@ -273,8 +273,8 @@ minetest.register_decoration({
place_on = {"pyutest_blocks:mycelium_block"},
sidelen = 16,
fill_ratio = 0.002,
biomes = {"large_mushroom_forest"},
schematic = PyuTest.get_schem_path("SmallMushroom"),
biomes = {"LargeMushroomForest"},
schematic = PyuTest.get_schematic_path("SmallMushroom"),
rotation = "random",
flags = "place_center_x, place_center_z",
place_offset_y = 1,
@ -286,8 +286,8 @@ minetest.register_decoration({
place_on = {"pyutest_blocks:mycelium_block"},
sidelen = 16,
fill_ratio = 0.007,
biomes = {"large_mushroom_forest"},
schematic = PyuTest.get_schem_path("FallenMushroom"),
biomes = {"LargeMushroomForest"},
schematic = PyuTest.get_schematic_path("FallenMushroom"),
rotation = "random",
flags = "place_center_x, place_center_z",
place_offset_y = 1,

View File

@ -49,7 +49,7 @@ PyuTest.register_world = function (options)
biome_names = {}
}
function World:register_biome(name, type, opts)
function World:register_biome(name, type, opts, overworld)
local newname = conf.name .. "-" .. name
if opts["_pyutest_sky"] == nil then
@ -60,14 +60,14 @@ PyuTest.register_world = function (options)
opts["_pyutest_sky_base_color"] = opts["_pyutest_sky_base_color"] or conf.sky_color or "#000000"
PyuTest.register_overworld_biome(newname, type, PyuTest.util.tableconcat(opts, {
depth_top = 0,
depth_filler = 0,
y_max = conf.y_max,
y_min = conf.y_min,
depth_top = opts.depth_top or 0,
depth_filler = opts.depth_filler or 0,
y_max = opts.y_max or conf.y_max,
y_min = opts.y_min or conf.y_min,
node_water = opts.node_water or "air",
node_river_water = opts.node_water or "air",
node_cave_liquid = opts.node_water or "air",
}), true)
}), not overworld)
self.biome_names[#self.biome_names+1] = newname
return name

View File

@ -1,12 +1,12 @@
PyuTest.IceWorld = PyuTest.register_world({
name = "ice_world",
name = "IceWorld",
y_max = -1000,
y_min = -1999,
sky_color = "#555588"
})
PyuTest.IceWorld:create_token("pyutest_worlds:ice_world_token", "Ice World", "#cbdbfc", "pyutest_blocks:ice_block")
local icy_cavern = PyuTest.IceWorld:register_biome("icy_cavern", PyuTest.BIOME_TYPES.COLD, {
local icy_cavern = PyuTest.IceWorld:register_biome("IcyCavern", PyuTest.BIOME_TYPES.COLD, {
node_stone = "pyutest_blocks:ice_block",
heat_point = -10,
humidity_point = 0

View File

@ -4,3 +4,4 @@ dofile(modpath.."/api.lua")
dofile(modpath.."/ice.lua")
dofile(modpath.."/lava.lua")
dofile(modpath.."/sky.lua")

View File

@ -1,5 +1,5 @@
PyuTest.LavaWorld = PyuTest.register_world({
name = "lava_world",
name = "LavaWorld",
y_max = -3000,
y_min = -3999,
sky_color = "#330000"
@ -11,13 +11,13 @@ local node_stones = {
"pyutest_blocks:basalt_block"
}
local lava_cavern = PyuTest.LavaWorld:register_biome("lava_cavern", PyuTest.BIOME_TYPES.HOT, {
local lava_cavern = PyuTest.LavaWorld:register_biome("LavaCavern", PyuTest.BIOME_TYPES.HOT, {
node_stone = "pyutest_blocks:molten_rock_block",
heat_point = 100,
humidity_point = 0,
})
local basalt_volcano = PyuTest.LavaWorld:register_biome("basalt_volcano", PyuTest.BIOME_TYPES.HOT, {
local basalt_volcano = PyuTest.LavaWorld:register_biome("BasaltVolcano", PyuTest.BIOME_TYPES.HOT, {
node_stone = "pyutest_blocks:basalt_block",
heat_point = 100,
humidity_point = 0,

View File

@ -0,0 +1,25 @@
PyuTest.SkyWorld = PyuTest.register_world({
name = "SkyWorld",
y_max = 4096,
y_min = 1024,
sky_color = "#8888cc"
})
PyuTest.SkyWorld:create_token("pyutest_worlds:sky_world_token", "Sky World", "#ffffff", "pyutest_magic:windball")
PyuTest.SkyWorld:register_biome("SkyMeadow", PyuTest.BIOME_TYPES.NORMAL, {
node_top = "pyutest_grass:dark_grass_block",
depth_top = 1,
node_filler = "pyutest_blocks:dirt_block",
depth_filler = 3,
node_stone = "pyutest_blocks:stone_block",
heat_point = 50,
humidity_point = 50,
_pyutest_flowering = true,
_pyutest_extra_flowering = true
})
PyuTest.SkyWorld:register_biome("CalciteGrove", PyuTest.BIOME_TYPES.NORMAL, {
node_stone = "pyutest_blocks:calcite_block",
heat_point = 50,
humidity_point = 50,
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B