Massive changes!
This commit is contained in:
parent
f881682777
commit
7367a01b4f
@ -16,6 +16,11 @@
|
||||
- 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
|
||||
- Added Weak Ice
|
||||
- Adjusted mining speeds of various tools
|
||||
- A lot of other changes that I forgot to document
|
||||
|
||||
## [Oct 19th 2024] Bugfix Update
|
||||
|
||||
|
@ -2,3 +2,4 @@ unified_inventory_lite = false
|
||||
unified_inventory_bags = false
|
||||
unified_inventory_waypoints = false
|
||||
default_stack_max = 999
|
||||
movement_gravity = 10
|
||||
|
@ -102,7 +102,8 @@ PyuTest.make_building_blocks = function(name, desc, tex, colortint, cgroups, ext
|
||||
paramtype2 = "facedir",
|
||||
node_box = PyuTest.NODE_BOXES.CARPET,
|
||||
sounds = PyuTest.make_node_sounds(),
|
||||
buildable_to = true
|
||||
buildable_to = true,
|
||||
floodable = true
|
||||
}, econf))
|
||||
|
||||
minetest.register_node(id_slab, PyuTest.util.tableconcat({
|
||||
@ -235,6 +236,7 @@ PyuTest.make_liquid = function(name, desc, groups, texture, speed, extra_conf)
|
||||
|
||||
local g = groups or {}
|
||||
g["liquid"] = 1
|
||||
g["not_in_creative_inventory"] = 1
|
||||
|
||||
PyuTest.make_node(name .. "_source", desc .. " Source", PyuTest.util.tableconcat(g, {
|
||||
liquid_source = 1
|
||||
|
@ -171,6 +171,9 @@ PyuTest.make_node("pyutest_blocks:ladder", "Ladder", {
|
||||
selection_box = {
|
||||
type = "wallmounted"
|
||||
},
|
||||
collision_box = {
|
||||
type = "wallmounted"
|
||||
},
|
||||
inventory_image = "pyutest-ladder.png"
|
||||
})
|
||||
|
||||
|
@ -49,6 +49,7 @@ PyuTest.make_wire = function(id, desc, groups, color, opts, texture, delay)
|
||||
walkable = false,
|
||||
inventory_image = "pyutest-powder.png",
|
||||
wield_image = "pyutest-powder.png",
|
||||
buildable_to = true,
|
||||
|
||||
__on_electricity_activated = function(pos, node, sender_pos)
|
||||
for _, v in pairs(PyuTest.get_full_neighbours(pos)) do
|
||||
|
@ -17,6 +17,13 @@ PyuTest.make_leaves = function(id, desc, color, overlay, special_drops, drops)
|
||||
drop = drops or {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{
|
||||
tool_groups = {
|
||||
"shears"
|
||||
},
|
||||
items = {leaves_id}
|
||||
},
|
||||
|
||||
{
|
||||
rarity = 2.2,
|
||||
items = {"pyutest_tools:apple"}
|
||||
@ -35,13 +42,6 @@ PyuTest.make_leaves = function(id, desc, color, overlay, special_drops, drops)
|
||||
{
|
||||
rarity = 1.6,
|
||||
items = {"pyutest_tools:stick 1"}
|
||||
},
|
||||
|
||||
{
|
||||
tool_groups = {
|
||||
"shears"
|
||||
},
|
||||
items = {leaves_id}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ PyuTest.make_tool("pyutest_magic:enchanted_pickaxe", "Enchanted Pickaxe", {}, "p
|
||||
cracky = {
|
||||
times = {
|
||||
[PyuTest.BLOCK_FAST] = 0.1,
|
||||
[PyuTest.BLOCK_NORMAL] = 0.4,
|
||||
[PyuTest.BLOCK_NORMAL] = 0.2,
|
||||
[PyuTest.BLOCK_SLOW] = 6
|
||||
}
|
||||
}
|
||||
@ -108,9 +108,9 @@ PyuTest.make_tool("pyutest_magic:enchanted_axe", "Enchanted Axe", {}, "pyutest-e
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {
|
||||
[PyuTest.BLOCK_FAST] = 0.4,
|
||||
[PyuTest.BLOCK_NORMAL] = 0.6,
|
||||
[PyuTest.BLOCK_SLOW] = 0.8
|
||||
[PyuTest.BLOCK_FAST] = 0.1,
|
||||
[PyuTest.BLOCK_NORMAL] = 0.2,
|
||||
[PyuTest.BLOCK_SLOW] = 0.4
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,8 @@ PyuTest.make_tool("pyutest_tools:wooden_pickaxe", "Wooden Pickaxe", {}, "pyutest
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {
|
||||
[PyuTest.BLOCK_FAST] = 1.2,
|
||||
[PyuTest.BLOCK_NORMAL] = 1.4
|
||||
[PyuTest.BLOCK_FAST] = 0.8,
|
||||
[PyuTest.BLOCK_NORMAL] = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -22,8 +22,8 @@ PyuTest.make_tool("pyutest_tools:stone_pickaxe", "Stone Pickaxe", {}, "pyutest-s
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {
|
||||
[PyuTest.BLOCK_FAST] = 1,
|
||||
[PyuTest.BLOCK_NORMAL] = 1.2
|
||||
[PyuTest.BLOCK_FAST] = 0.6,
|
||||
[PyuTest.BLOCK_NORMAL] = 0.8
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -38,8 +38,8 @@ PyuTest.make_tool("pyutest_tools:iron_pickaxe", "Iron Pickaxe", {}, "pyutest-iro
|
||||
groupcaps = {
|
||||
cracky = {
|
||||
times = {
|
||||
[PyuTest.BLOCK_FAST] = 0.8,
|
||||
[PyuTest.BLOCK_NORMAL] = 1
|
||||
[PyuTest.BLOCK_FAST] = 0.4,
|
||||
[PyuTest.BLOCK_NORMAL] = 0.6
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -55,7 +55,7 @@ PyuTest.make_tool("pyutest_tools:diamond_pickaxe", "Diamond Pickaxe", {}, "pyute
|
||||
cracky = {
|
||||
times = {
|
||||
[PyuTest.BLOCK_FAST] = 0.2,
|
||||
[PyuTest.BLOCK_NORMAL] = 0.6,
|
||||
[PyuTest.BLOCK_NORMAL] = 0.4,
|
||||
[PyuTest.BLOCK_SLOW] = 8
|
||||
}
|
||||
}
|
||||
@ -72,9 +72,9 @@ PyuTest.make_tool("pyutest_tools:wooden_axe", "Wooden Axe", {}, "pyutest-wooden-
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {
|
||||
[PyuTest.BLOCK_FAST] = 1.2,
|
||||
[PyuTest.BLOCK_NORMAL] = 1.4,
|
||||
[PyuTest.BLOCK_SLOW] = 1.6
|
||||
[PyuTest.BLOCK_FAST] = 0.8,
|
||||
[PyuTest.BLOCK_NORMAL] = 1,
|
||||
[PyuTest.BLOCK_SLOW] = 1.2
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -90,9 +90,9 @@ PyuTest.make_tool("pyutest_tools:stone_axe", "Stone Axe", {}, "pyutest-stone-axe
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {
|
||||
[PyuTest.BLOCK_FAST] = 1,
|
||||
[PyuTest.BLOCK_NORMAL] = 1.2,
|
||||
[PyuTest.BLOCK_SLOW] = 1.4
|
||||
[PyuTest.BLOCK_FAST] = 0.6,
|
||||
[PyuTest.BLOCK_NORMAL] = 0.8,
|
||||
[PyuTest.BLOCK_SLOW] = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -108,9 +108,9 @@ PyuTest.make_tool("pyutest_tools:iron_axe", "Iron Axe", {}, "pyutest-iron-axe.pn
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {
|
||||
[PyuTest.BLOCK_FAST] = 0.8,
|
||||
[PyuTest.BLOCK_NORMAL] = 1,
|
||||
[PyuTest.BLOCK_SLOW] = 1.2
|
||||
[PyuTest.BLOCK_FAST] = 0.4,
|
||||
[PyuTest.BLOCK_NORMAL] = 0.6,
|
||||
[PyuTest.BLOCK_SLOW] = 0.8
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -126,9 +126,9 @@ PyuTest.make_tool("pyutest_tools:diamond_axe", "Diamond Axe", {}, "pyutest-diamo
|
||||
groupcaps = {
|
||||
choppy = {
|
||||
times = {
|
||||
[PyuTest.BLOCK_FAST] = 0.6,
|
||||
[PyuTest.BLOCK_NORMAL] = 0.8,
|
||||
[PyuTest.BLOCK_SLOW] = 1
|
||||
[PyuTest.BLOCK_FAST] = 0.2,
|
||||
[PyuTest.BLOCK_NORMAL] = 0.4,
|
||||
[PyuTest.BLOCK_SLOW] = 0.6
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,14 @@
|
||||
minetest.register_abm({
|
||||
label = "Water freezing/evaporating",
|
||||
nodenames = {"group:water"},
|
||||
interval = 3,
|
||||
chance = 2.5,
|
||||
interval = 1.2,
|
||||
chance = 1.8,
|
||||
catch_up = true,
|
||||
action = function (pos)
|
||||
if pos.y < PyuTest.OVERWORLD_SURFACE_BOTTOM and pos.y >= PyuTest.OVERWORLD_DEEP_OCEAN_MIN then
|
||||
return
|
||||
end
|
||||
|
||||
local def = PyuTest.get_biome_def(pos)
|
||||
if not def then return end
|
||||
|
||||
@ -28,7 +32,7 @@ minetest.register_abm({
|
||||
|
||||
local heat = def.heat_point or 50
|
||||
|
||||
if heat >= 100 then
|
||||
if heat >= 95 then
|
||||
minetest.remove_node(pos)
|
||||
end
|
||||
end
|
||||
|
@ -40,3 +40,193 @@ end
|
||||
PyuTest.is_flat = function()
|
||||
return minetest.get_mapgen_setting("mg_name") == "flat"
|
||||
end
|
||||
|
||||
PyuTest.SPECIALSTONE_NOISE_PARAMS = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 1536,
|
||||
octaves = 3,
|
||||
persist = 0.4,
|
||||
lacunarity = 2,
|
||||
flags = "defaults"
|
||||
}
|
||||
|
||||
PyuTest.BIOME_TOPS = {
|
||||
lowland = 10,
|
||||
normal = 30,
|
||||
mountains = 1000,
|
||||
skyland = 31000,
|
||||
}
|
||||
|
||||
-- Overworld biome types
|
||||
PyuTest.BIOME_TYPES = {
|
||||
-- Normal biomes (Forests for example)
|
||||
NORMAL = 1,
|
||||
|
||||
-- Chilly biomes, but not snowy (Taigas for example)
|
||||
CHILLY = 2,
|
||||
|
||||
-- Snowy biomes (Frozen Plains for example)
|
||||
COLD = 3,
|
||||
|
||||
-- Warm biomes (Savannas for example)
|
||||
WARM = 4,
|
||||
|
||||
-- Hot biomes (Deserts for example)
|
||||
HOT = 5,
|
||||
|
||||
-- Wasteland biomes (Wastelands and Volcano for example)
|
||||
WASTELAND = 6,
|
||||
|
||||
-- Wetland biomes (Swamps for example)
|
||||
WETLAND = 7,
|
||||
|
||||
-- Ocean biomes (What example do you want?)
|
||||
OCEAN = 8,
|
||||
|
||||
-- Cave biomes (What example do you want?)
|
||||
CAVE = 9,
|
||||
|
||||
-- Beach biomes (What example do you want?)
|
||||
BEACH = 10,
|
||||
}
|
||||
|
||||
PyuTest.get_biomes_from_type = function(type)
|
||||
local biomes = {}
|
||||
|
||||
for k, v in pairs(minetest.registered_biomes) do
|
||||
if v._pyutest_biome_type == type then
|
||||
biomes[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
return biomes
|
||||
end
|
||||
|
||||
PyuTest.get_flowering_biomes = function ()
|
||||
local biomes = {}
|
||||
|
||||
for k, v in pairs(minetest.registered_biomes) do
|
||||
if v._pyutest_biome_flowering == true and v._pyutest_biome_flowering_extra == false then
|
||||
table.insert(biomes, k)
|
||||
end
|
||||
end
|
||||
|
||||
return biomes
|
||||
end
|
||||
|
||||
PyuTest.get_extra_flowering_biomes = function ()
|
||||
local biomes = {}
|
||||
|
||||
for k, v in pairs(minetest.registered_biomes) do
|
||||
if v._pyutest_biome_flowering == true and v._pyutest_biome_flowering_extra == true then
|
||||
table.insert(biomes, k)
|
||||
end
|
||||
end
|
||||
|
||||
return biomes
|
||||
end
|
||||
|
||||
-- wrapper around minetest.register_biome but with defaults, caves and oceans
|
||||
PyuTest.register_overworld_biome = function(name, type, opts, only_base)
|
||||
local nopts = PyuTest.util.tablecopy(opts) or {}
|
||||
nopts["name"] = name
|
||||
nopts["depth_top"] = nopts["depth_top"] or 1
|
||||
nopts["depth_filler"] = nopts["depth_filler"] or 3
|
||||
nopts["depth_riverbed"] = nopts["depth_riverbed"] or 2
|
||||
nopts["depth_water_top"] = nopts["depth_water_top"] or nil -- cant think of a sane default..
|
||||
|
||||
nopts["node_water"] = nopts["node_water"] or "pyutest_blocks:water_source"
|
||||
nopts["node_river_water"] = nopts["node_river_water"] or "pyutest_blocks:river_water_source"
|
||||
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"
|
||||
|
||||
if nopts["enable_beaches"] == nil then
|
||||
nopts["enable_beaches"] = true
|
||||
end
|
||||
|
||||
local y_min = (nopts["enable_beaches"] and not only_base) and nopts["y_min"] + 2 or nopts["y_min"]
|
||||
|
||||
minetest.register_biome(PyuTest.util.tableconcat(nopts, {
|
||||
_pyutest_biome_type = type,
|
||||
y_min = y_min
|
||||
}))
|
||||
|
||||
if only_base then
|
||||
return
|
||||
end
|
||||
|
||||
if nopts["enable_beaches"] then
|
||||
minetest.register_biome(PyuTest.util.tableconcat(nopts, {
|
||||
name = name.."_beach",
|
||||
y_max = y_min,
|
||||
y_min = PyuTest.OVERWORLD_SURFACE_BOTTOM,
|
||||
node_top = nopts["node_sand"],
|
||||
depth_top = 1,
|
||||
node_filler = nopts["node_sandstone"],
|
||||
depth_filler = 1,
|
||||
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.BEACH,
|
||||
}))
|
||||
end
|
||||
|
||||
minetest.register_biome(PyuTest.util.tableconcat({
|
||||
name = name.."_ocean",
|
||||
node_top = nopts["node_riverbed"],
|
||||
depth_top = 2,
|
||||
node_filler = nopts["node_riverbed"],
|
||||
depth_filler = 3,
|
||||
depth_riverbed = 2,
|
||||
|
||||
node_water = nopts["node_water"],
|
||||
node_river_water = nopts["node_river_water"],
|
||||
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
|
||||
y_max = 0,
|
||||
y_min = PyuTest.OVERWORLD_OCEAN_MIN
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.OCEAN,
|
||||
_pyutest_ocean_type = type
|
||||
}))
|
||||
|
||||
minetest.register_biome(PyuTest.util.tableconcat({
|
||||
name = name.."_deep_ocean",
|
||||
|
||||
node_top = nopts["node_riverbed"],
|
||||
depth_top = 2,
|
||||
node_filler = nopts["node_riverbed"],
|
||||
depth_filler = 3,
|
||||
depth_riverbed = 2,
|
||||
|
||||
node_water = nopts["node_water"],
|
||||
node_river_water = nopts["node_river_water"],
|
||||
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
|
||||
y_max = PyuTest.OVERWORLD_DEEP_OCEAN_MAX,
|
||||
y_min = PyuTest.OVERWORLD_DEEP_OCEAN_MIN,
|
||||
vertical_blend = 5
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.OCEAN,
|
||||
_pyutest_ocean_type = type
|
||||
}))
|
||||
|
||||
minetest.register_biome(PyuTest.util.tableconcat({
|
||||
name = name.."_cave",
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
y_max = PyuTest.OVERWORLD_DEEP_OCEAN_MIN - 1,
|
||||
y_min = PyuTest.OVERWORLD_BOTTOM,
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.CAVE,
|
||||
_pyutest_cave_type = type
|
||||
}))
|
||||
end
|
||||
|
@ -2,9 +2,3 @@ local modpath = minetest.get_modpath("pyutest_mapgen")
|
||||
|
||||
dofile(modpath.."/api.lua")
|
||||
dofile(modpath.."/mapgen.lua")
|
||||
dofile(modpath.."/biomes.lua")
|
||||
|
||||
if not PyuTest.is_flat() then
|
||||
dofile(modpath.."/structures.lua")
|
||||
dofile(modpath.."/trees.lua")
|
||||
end
|
||||
|
@ -7,6 +7,7 @@ minetest.register_alias("mapgen_singlenode", "air")
|
||||
local mg_flags = minetest.settings:get_flags("mg_flags")
|
||||
local mg_name = minetest.get_mapgen_setting("mg_name")
|
||||
minetest.set_mapgen_setting(string.format("mg%s_cavern_threshold", mg_name), "0.20", true)
|
||||
minetest.set_mapgen_setting(string.format("mg%s_mount_zero_level", mg_name), "1.1", true)
|
||||
|
||||
mg_flags.caverns = true
|
||||
mg_flags.dungeons = false
|
||||
|
@ -1 +1 @@
|
||||
depends = pyutest_blocks,pyutest_flowers,pyutest_worlds,pyutest_lootboxes
|
||||
depends = pyutest_blocks
|
||||
|
@ -1,14 +1,3 @@
|
||||
PyuTest.SPECIALSTONE_NOISE_PARAMS = {
|
||||
offset = 0,
|
||||
scale = 1,
|
||||
spread = {x = 250, y = 250, z = 250},
|
||||
seed = 1536,
|
||||
octaves = 3,
|
||||
persist = 0.4,
|
||||
lacunarity = 2,
|
||||
flags = "defaults"
|
||||
}
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_blocks:granite_block",
|
||||
|
@ -1 +1 @@
|
||||
depends = pyutest_blocks
|
||||
depends = pyutest_blocks,pyutest_mapgen
|
||||
|
@ -1,153 +1,3 @@
|
||||
PyuTest.BIOME_TOPS = {
|
||||
lowland = 10,
|
||||
normal = 40,
|
||||
mountains = 1000,
|
||||
skyland = 31000,
|
||||
}
|
||||
|
||||
-- Overworld biome types
|
||||
PyuTest.BIOME_TYPES = {
|
||||
-- Normal biomes (Forests for example)
|
||||
NORMAL = 1,
|
||||
|
||||
-- Chilly biomes, but not snowy (Taigas for example)
|
||||
CHILLY = 2,
|
||||
|
||||
-- Snowy biomes (Frozen Plains for example)
|
||||
COLD = 3,
|
||||
|
||||
-- Warm biomes (Savannas for example)
|
||||
WARM = 4,
|
||||
|
||||
-- Hot biomes (Deserts for example)
|
||||
DESERT = 5,
|
||||
|
||||
-- Wasteland biomes (Wastelands and Volcano for example)
|
||||
WASTELAND = 6,
|
||||
|
||||
-- Wetland biomes (Swamps for example)
|
||||
WETLAND = 7,
|
||||
|
||||
-- Ocean biomes (What example do you want?)
|
||||
OCEAN = 8,
|
||||
|
||||
-- Cave biomes (What example do you want?)
|
||||
CAVE = 9
|
||||
}
|
||||
|
||||
PyuTest.get_biomes_from_type = function(type)
|
||||
local biomes = {}
|
||||
|
||||
for k, v in pairs(minetest.registered_biomes) do
|
||||
if v._pyutest_biome_type == type then
|
||||
biomes[k] = v
|
||||
end
|
||||
end
|
||||
|
||||
return biomes
|
||||
end
|
||||
|
||||
PyuTest.get_flowering_biomes = function ()
|
||||
local biomes = {}
|
||||
|
||||
for k, v in pairs(minetest.registered_biomes) do
|
||||
if v._pyutest_biome_flowering == true and v._pyutest_biome_flowering_extra == false then
|
||||
table.insert(biomes, k)
|
||||
end
|
||||
end
|
||||
|
||||
return biomes
|
||||
end
|
||||
|
||||
PyuTest.get_extra_flowering_biomes = function ()
|
||||
local biomes = {}
|
||||
|
||||
for k, v in pairs(minetest.registered_biomes) do
|
||||
if v._pyutest_biome_flowering == true and v._pyutest_biome_flowering_extra == true then
|
||||
table.insert(biomes, k)
|
||||
end
|
||||
end
|
||||
|
||||
return biomes
|
||||
end
|
||||
|
||||
-- wrapper around minetest.register_biome but with defaults, caves and oceans
|
||||
PyuTest.register_overworld_biome = function(name, type, opts, only_base)
|
||||
local nopts = PyuTest.util.tablecopy(opts) or {}
|
||||
nopts["name"] = name
|
||||
nopts["depth_top"] = nopts["depth_top"] or 1
|
||||
nopts["depth_filler"] = nopts["depth_filler"] or 3
|
||||
nopts["depth_riverbed"] = nopts["depth_riverbed"] or 2
|
||||
nopts["depth_water_top"] = nopts["depth_water_top"] or nil -- cant think of a sane default..
|
||||
|
||||
nopts["node_water"] = nopts["node_water"] or "pyutest_blocks:water_source"
|
||||
nopts["node_river_water"] = nopts["node_river_water"] or "pyutest_blocks:river_water_source"
|
||||
nopts["node_riverbed"] = nopts["node_riverbed"] or "pyutest_blocks:gravel_block"
|
||||
|
||||
minetest.register_biome(PyuTest.util.tableconcat(nopts, {
|
||||
_pyutest_biome_type = type,
|
||||
}))
|
||||
|
||||
if only_base then
|
||||
return
|
||||
end
|
||||
|
||||
minetest.register_biome(PyuTest.util.tableconcat({
|
||||
name = name.."_ocean",
|
||||
node_top = nopts["node_riverbed"],
|
||||
depth_top = 2,
|
||||
node_filler = nopts["node_riverbed"],
|
||||
depth_filler = 3,
|
||||
depth_riverbed = 2,
|
||||
|
||||
node_water = nopts["node_water"],
|
||||
node_river_water = nopts["node_river_water"],
|
||||
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
|
||||
y_max = 0,
|
||||
y_min = PyuTest.OVERWORLD_OCEAN_MIN
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.OCEAN,
|
||||
_pyutest_ocean_type = type
|
||||
}))
|
||||
|
||||
minetest.register_biome(PyuTest.util.tableconcat({
|
||||
name = name.."_deep_ocean",
|
||||
|
||||
node_top = nopts["node_riverbed"],
|
||||
depth_top = 2,
|
||||
node_filler = nopts["node_riverbed"],
|
||||
depth_filler = 3,
|
||||
depth_riverbed = 2,
|
||||
|
||||
node_water = nopts["node_water"],
|
||||
node_river_water = nopts["node_river_water"],
|
||||
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
|
||||
y_max = PyuTest.OVERWORLD_DEEP_OCEAN_MAX,
|
||||
y_min = PyuTest.OVERWORLD_DEEP_OCEAN_MIN,
|
||||
vertical_blend = 5
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.OCEAN,
|
||||
_pyutest_ocean_type = type
|
||||
}))
|
||||
|
||||
minetest.register_biome(PyuTest.util.tableconcat({
|
||||
name = name.."_cave",
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
y_max = PyuTest.OVERWORLD_DEEP_OCEAN_MIN - 1,
|
||||
y_min = PyuTest.OVERWORLD_BOTTOM,
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.CAVE,
|
||||
_pyutest_cave_type = type
|
||||
}))
|
||||
end
|
||||
|
||||
if PyuTest.is_flat() then
|
||||
PyuTest.register_overworld_biome("flat", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_grass:dark_grass_block",
|
||||
@ -177,7 +27,7 @@ PyuTest.register_overworld_biome("grassland", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("desert", PyuTest.BIOME_TYPES.DESERT, {
|
||||
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",
|
||||
@ -186,7 +36,9 @@ PyuTest.register_overworld_biome("desert", PyuTest.BIOME_TYPES.DESERT, {
|
||||
y_min = PyuTest.OVERWORLD_SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 80,
|
||||
humidity_point = 5
|
||||
humidity_point = 5,
|
||||
|
||||
enable_beaches = false
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("frozen_plains", PyuTest.BIOME_TYPES.COLD, {
|
||||
@ -237,7 +89,9 @@ PyuTest.register_overworld_biome("mushroom_fields", PyuTest.BIOME_TYPES.NORMAL,
|
||||
y_min = PyuTest.OVERWORLD_SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 50,
|
||||
humidity_point = 90
|
||||
humidity_point = 90,
|
||||
|
||||
enable_beaches = false,
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("large_mushroom_forest", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
@ -248,7 +102,9 @@ PyuTest.register_overworld_biome("large_mushroom_forest", PyuTest.BIOME_TYPES.NO
|
||||
y_min = PyuTest.OVERWORLD_SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 50,
|
||||
humidity_point = 90
|
||||
humidity_point = 90,
|
||||
|
||||
enable_beaches = false,
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("snowy_forest", PyuTest.BIOME_TYPES.COLD, {
|
||||
@ -357,6 +213,8 @@ PyuTest.register_overworld_biome("swamp", PyuTest.BIOME_TYPES.WETLAND, {
|
||||
|
||||
heat_point = 50,
|
||||
humidity_point = 80,
|
||||
|
||||
enable_beaches = false
|
||||
})
|
||||
|
||||
-- Mountainous biomes
|
||||
@ -372,7 +230,7 @@ PyuTest.register_overworld_biome("stony_mountains", PyuTest.BIOME_TYPES.WARM, {
|
||||
humidity_point = 10
|
||||
}, true)
|
||||
|
||||
PyuTest.register_overworld_biome("desert_mountains", PyuTest.BIOME_TYPES.DESERT, {
|
||||
PyuTest.register_overworld_biome("desert_mountains", PyuTest.BIOME_TYPES.HOT, {
|
||||
node_top = "pyutest_blocks:sand_block",
|
||||
node_filler = "pyutest_blocks:sandstone_block",
|
||||
|
23
mods/WORLD/pyutest_overworld/features.lua
Normal file
23
mods/WORLD/pyutest_overworld/features.lua
Normal file
@ -0,0 +1,23 @@
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_blocks:water_source",
|
||||
wherein = PyuTest.ORE_STONES,
|
||||
clust_scarcity = 16 * 16 * 16,
|
||||
clust_num_ores = 1,
|
||||
clust_size = 2,
|
||||
y_max = PyuTest.OVERWORLD_TOP,
|
||||
y_min = PyuTest.BIOME_TOPS.normal,
|
||||
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_blocks:lava_source",
|
||||
wherein = PyuTest.ORE_STONES,
|
||||
clust_scarcity = 16 * 16 * 16,
|
||||
clust_num_ores = 1,
|
||||
clust_size = 2,
|
||||
y_max = PyuTest.OVERWORLD_TOP,
|
||||
y_min = PyuTest.BIOME_TOPS.normal,
|
||||
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
|
||||
})
|
9
mods/WORLD/pyutest_overworld/init.lua
Normal file
9
mods/WORLD/pyutest_overworld/init.lua
Normal file
@ -0,0 +1,9 @@
|
||||
local modpath = minetest.get_modpath("pyutest_overworld")
|
||||
|
||||
dofile(modpath.."/biomes.lua")
|
||||
|
||||
if not PyuTest.is_flat() then
|
||||
dofile(modpath.."/features.lua")
|
||||
dofile(modpath.."/structures.lua")
|
||||
dofile(modpath.."/trees.lua")
|
||||
end
|
1
mods/WORLD/pyutest_overworld/mod.conf
Normal file
1
mods/WORLD/pyutest_overworld/mod.conf
Normal file
@ -0,0 +1 @@
|
||||
depends = pyutest_mapgen,pyutest_blocks,pyutest_flowers,pyutest_lootboxes,pyutest_ores
|
@ -47,23 +47,20 @@ PyuTest.register_world = function (options)
|
||||
biome_names = {}
|
||||
}
|
||||
|
||||
function World:register_biome(o)
|
||||
local name = conf.name .. "-" .. o.name
|
||||
local cfg = PyuTest.util.tablecopy(o)
|
||||
cfg.node_stone = cfg.node_stone or conf.node_stone -- Defaults to nil
|
||||
cfg.node_water = cfg.node_water or "air"
|
||||
function World:register_biome(name, type, opts)
|
||||
local newname = conf.name .. "-" .. name
|
||||
|
||||
minetest.register_biome(PyuTest.util.tableconcat(cfg, {
|
||||
name = name,
|
||||
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,
|
||||
node_river_water = cfg.node_water,
|
||||
node_cave_liquid = cfg.node_water,
|
||||
}))
|
||||
node_water = opts.node_water or "air",
|
||||
node_river_water = opts.node_water or "air",
|
||||
node_cave_liquid = opts.node_water or "air",
|
||||
}), true)
|
||||
|
||||
self.biome_names[#self.biome_names+1] = name
|
||||
self.biome_names[#self.biome_names+1] = newname
|
||||
return name
|
||||
end
|
||||
|
||||
|
@ -5,10 +5,9 @@ PyuTest.IceWorld = PyuTest.register_world({
|
||||
})
|
||||
PyuTest.IceWorld:create_token("pyutest_worlds:ice_world_token", "Ice World", "#cbdbfc", "pyutest_blocks:ice_block")
|
||||
|
||||
local icy_cavern = PyuTest.IceWorld:register_biome({
|
||||
name = "icy_cavern",
|
||||
local icy_cavern = PyuTest.IceWorld:register_biome("icy_cavern", PyuTest.BIOME_TYPES.COLD, {
|
||||
node_stone = "pyutest_blocks:ice_block",
|
||||
heat_point = 1,
|
||||
heat_point = -10,
|
||||
humidity_point = 0
|
||||
})
|
||||
|
||||
|
@ -5,13 +5,23 @@ PyuTest.LavaWorld = PyuTest.register_world({
|
||||
})
|
||||
PyuTest.LavaWorld:create_token("pyutest_worlds:lava_world_token", "Lava World", "#511e1e", "pyutest_tools:ash")
|
||||
|
||||
local lava_cavern = PyuTest.LavaWorld:register_biome({
|
||||
name = "lava_cavern",
|
||||
local node_stones = {
|
||||
"pyutest_blocks:molten_rock_block",
|
||||
"pyutest_blocks:basalt_block"
|
||||
}
|
||||
|
||||
local lava_cavern = PyuTest.LavaWorld:register_biome("lava_cavern", 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, {
|
||||
node_stone = "pyutest_blocks:basalt_block",
|
||||
heat_point = 100,
|
||||
humidity_point = 0,
|
||||
})
|
||||
|
||||
PyuTest.LavaWorld:register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_blocks:magma",
|
||||
@ -26,10 +36,10 @@ PyuTest.LavaWorld:register_ore({
|
||||
PyuTest.LavaWorld:register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_blocks:lava_source",
|
||||
wherein = "pyutest_blocks:molten_rock_block",
|
||||
wherein = node_stones,
|
||||
clust_scarcity = 9 * 9 * 9,
|
||||
clust_num_ores = 1,
|
||||
clust_size = 2,
|
||||
biomes = {lava_cavern},
|
||||
biomes = PyuTest.LavaWorld.biome_names,
|
||||
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
|
||||
})
|
||||
|
@ -1 +1 @@
|
||||
depends = pyutest_tools,pyutest_blocks,pyutest_ores
|
||||
depends = pyutest_tools,pyutest_blocks,pyutest_ores,pyutest_mapgen
|
||||
|
@ -5,8 +5,8 @@ PyuTest.MushroomWorld = PyuTest.register_world({
|
||||
})
|
||||
PyuTest.MushroomWorld:create_token("pyutest_worlds:mushroom_world_token", "Mushroom World", "#ac324c", "pyutest_blocks:mushroom_block")
|
||||
|
||||
local mushroom_forest = PyuTest.MushroomWorld:register_biome({
|
||||
name = "mushroom_forest",
|
||||
|
||||
local mushroom_forest = PyuTest.MushroomWorld:register_biome("mushroom_forest", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
node_stone = "pyutest_blocks:mushroom_block",
|
||||
heat_point = 36,
|
||||
humidity_point = 0
|
||||
|
@ -5,8 +5,7 @@ PyuTest.SlimeWorld = PyuTest.register_world({
|
||||
})
|
||||
PyuTest.SlimeWorld:create_token("pyutest_worlds:slime_world_token", "Slime World", "#7dbd3f", "pyutest_blocks:slime_block")
|
||||
|
||||
local slimey_cavern = PyuTest.SlimeWorld:register_biome({
|
||||
name = "slimey_cavern",
|
||||
local slimey_cavern = PyuTest.SlimeWorld:register_biome("slimey_cavern", PyuTest.BIOME_TYPES.WASTELAND, {
|
||||
node_stone = "pyutest_blocks:slime_block",
|
||||
heat_point = 45,
|
||||
humidity_point = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user