[Where do I even begin?] Add tick to electricity, add 3 new dimensions,
add new blocks, and more!
This commit is contained in:
parent
9c2a25cbb4
commit
c005cc4169
@ -5,9 +5,11 @@
|
||||
This update completely breaks the API lol.
|
||||
|
||||
- Added "Worlds" which are like Minecraft's own Dimensions
|
||||
- Added Special Cave world
|
||||
- Added Icy Caves
|
||||
- Added Ice World
|
||||
- Added Slime World
|
||||
- Added Darkstone
|
||||
- Added Glowslime
|
||||
- Added Magma
|
||||
|
||||
# [Sep 29th 2024] Unnamed Minor Update
|
||||
|
||||
|
@ -1 +1,20 @@
|
||||
PyuTest = {}
|
||||
Translate = minetest.get_translator("pyutest")
|
||||
|
||||
PyuTest.BLOCK_FAST = 3
|
||||
PyuTest.BLOCK_NORMAL = 2
|
||||
PyuTest.BLOCK_SLOW = 1
|
||||
|
||||
PyuTest.SURFACE_BOTTOM = 1
|
||||
PyuTest.OVERWORLD_TOP = 4096
|
||||
PyuTest.OVERWORLD_BOTTOM = -65
|
||||
|
||||
-- these values are yoinked from VoxeLibre
|
||||
-- (https://git.minetest.land/VoxeLibre/VoxeLibre/src/branch/master/mods/MAPGEN/mcl_biomes/init.lua)
|
||||
PyuTest.OCEAN_MIN = -15
|
||||
PyuTest.DEEP_OCEAN_MAX = PyuTest.OCEAN_MIN - 1
|
||||
PyuTest.DEEP_OCEAN_MIN = -31
|
||||
|
||||
PyuTest.get_schem_path = function (name)
|
||||
return minetest.get_modpath("pyutest_mapgen") .. "/schematics/"..name..".mts"
|
||||
end
|
||||
|
@ -327,7 +327,8 @@ PyuTest.make_building_blocks("pyutest_core:obsidian", "Obsidian", {"pyutest-obsi
|
||||
PyuTest.make_building_blocks("pyutest_core:crystal_lantern", "Crystal Lantern", {"pyutest-crystal-lantern.png"}, nil, {
|
||||
cracky = PyuTest.BLOCK_FAST
|
||||
}, {
|
||||
light_source = minetest.LIGHT_MAX
|
||||
light_source = minetest.LIGHT_MAX,
|
||||
paramtype = "light"
|
||||
})
|
||||
|
||||
PyuTest.make_building_blocks("pyutest_core:bone", "Bone", {
|
||||
@ -390,6 +391,14 @@ PyuTest.make_building_blocks("pyutest_core:slime", "Slime", {"pyutest-slime.png"
|
||||
oddly_breakable_by_hand = PyuTest.BLOCK_FAST
|
||||
})
|
||||
|
||||
PyuTest.make_building_blocks("pyutest_core:glowslime", "Glowslime", {"pyutest-glowslime.png"}, nil, {
|
||||
bouncy = 85,
|
||||
oddly_breakable_by_hand = PyuTest.BLOCK_FAST
|
||||
}, {
|
||||
paramtype = "light",
|
||||
light_source = minetest.LIGHT_MAX
|
||||
})
|
||||
|
||||
PyuTest.make_node("pyutest_core:sponge", "Sponge", {
|
||||
oddly_breakable_by_hand = PyuTest.BLOCK_FAST
|
||||
}, {"pyutest-sponge.png"})
|
||||
@ -560,3 +569,11 @@ PyuTest.make_node("pyutest_core:ladder", "Ladder", {
|
||||
},
|
||||
inventory_image = "pyutest-ladder.png"
|
||||
})
|
||||
|
||||
PyuTest.make_node("pyutest_core:magma", "Magma", {
|
||||
cracky = PyuTest.BLOCK_NORMAL
|
||||
}, {"pyutest-magma.png"}, {
|
||||
paramtype = "light",
|
||||
light_source = 11,
|
||||
damage_per_second = 3
|
||||
})
|
||||
|
@ -1,3 +1,4 @@
|
||||
local ELECTRICITY_TICK = 0.02 -- Maybe this will prevent stack overflows?
|
||||
local function get_neighbours(pos)
|
||||
return {
|
||||
vector.new(pos.x + 1, pos.y, pos.z),
|
||||
@ -25,19 +26,20 @@ PyuTest.make_button = function (id, desc, groups, tiles)
|
||||
}), tiles, {
|
||||
is_ground_content = false,
|
||||
on_rightclick = function (pos, node, clicker)
|
||||
for _, v in pairs(get_neighbours(pos)) do
|
||||
local n = minetest.get_node(v)
|
||||
local def = minetest.registered_nodes[n.name]
|
||||
|
||||
if def.__on_electricity_activated then
|
||||
def.__on_electricity_activated(v, n, clicker, pos)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.sound_play("button", {
|
||||
pos = pos,
|
||||
gain = 1
|
||||
})
|
||||
|
||||
for _, v in pairs(get_neighbours(pos)) do
|
||||
local n = minetest.get_node(v)
|
||||
local def = minetest.registered_nodes[n.name]
|
||||
minetest.after(ELECTRICITY_TICK, function ()
|
||||
if def.__on_electricity_activated then
|
||||
def.__on_electricity_activated(v, n, clicker, pos)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
})
|
||||
end
|
||||
@ -49,14 +51,14 @@ PyuTest.make_wire = function (id, desc, groups, color, efn)
|
||||
|
||||
PyuTest.make_node(id, desc, PyuTest.util.tableconcat(groups, {
|
||||
electric = 1
|
||||
}), {"pyutest-wire.png"}, {
|
||||
drawtype = "signlike",
|
||||
}), {"pyutest-wire.png", "pyutest-wire.png", "pyutest-wire.png", "pyutest-wire.png"}, {
|
||||
drawtype = "raillike",
|
||||
color = color,
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
selection_box = {
|
||||
type = "wallmounted"
|
||||
},
|
||||
-- selection_box = {
|
||||
-- type = "wallmounted"
|
||||
-- },
|
||||
walkable = false,
|
||||
inventory_image = "pyutest-wire.png",
|
||||
|
||||
@ -70,9 +72,11 @@ PyuTest.make_wire = function (id, desc, groups, color, efn)
|
||||
goto continue
|
||||
end
|
||||
|
||||
if def.__on_electricity_activated then
|
||||
fn(def, v, n, clicker, pos)
|
||||
end
|
||||
minetest.after(ELECTRICITY_TICK, function ()
|
||||
if def.__on_electricity_activated then
|
||||
fn(def, v, n, clicker, pos)
|
||||
end
|
||||
end)
|
||||
|
||||
::continue::
|
||||
end
|
||||
|
@ -1,21 +1,3 @@
|
||||
Translate = minetest.get_translator("pyutest_core")
|
||||
PyuTest.BLOCK_FAST = 3
|
||||
PyuTest.BLOCK_NORMAL = 2
|
||||
PyuTest.BLOCK_SLOW = 1
|
||||
|
||||
PyuTest.SURFACE_BOTTOM = 1
|
||||
PyuTest.OVERWORLD_TOP = 4096
|
||||
PyuTest.OVERWORLD_BOTTOM = -70
|
||||
|
||||
-- these values are yoinked from VoxeLibre
|
||||
-- (https://git.minetest.land/VoxeLibre/VoxeLibre/src/branch/master/mods/MAPGEN/mcl_biomes/init.lua)
|
||||
PyuTest.OCEAN_MIN = -15
|
||||
PyuTest.DEEP_OCEAN_MAX = PyuTest.OCEAN_MIN - 1
|
||||
PyuTest.DEEP_OCEAN_MIN = -31
|
||||
|
||||
PyuTest.get_schem_path = function (name)
|
||||
return minetest.get_modpath("pyutest_mapgen") .. "/schematics/"..name..".mts"
|
||||
end
|
||||
PyuTestCore_Path = minetest.get_modpath("pyutest_core")
|
||||
|
||||
dofile(PyuTestCore_Path.."/utils.lua") -- Utilities
|
||||
|
@ -4,9 +4,26 @@ minetest.register_alias("mapgen_river_water_source", "pyutest_core:water_source"
|
||||
minetest.register_alias("mapgen_lava_source", "pyutest_core:lava_source")
|
||||
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)
|
||||
|
||||
mg_flags.caverns = true
|
||||
mg_flags.dungeons = false
|
||||
|
||||
-- https://git.minetest.land/VoxeLibre/VoxeLibre/src/branch/master/mods/MAPGEN/mcl_mapgen_core/init.lua#L127
|
||||
local mg_flags_str = ""
|
||||
for k,v in pairs(mg_flags) do
|
||||
if v == false then
|
||||
k = "no" .. k
|
||||
end
|
||||
mg_flags_str = mg_flags_str .. k .. ","
|
||||
end
|
||||
if string.len(mg_flags_str) > 0 then
|
||||
mg_flags_str = string.sub(mg_flags_str, 1, string.len(mg_flags_str)-1)
|
||||
end
|
||||
minetest.set_mapgen_setting("mg_flags", mg_flags_str, true)
|
||||
|
||||
-- Biomes
|
||||
|
||||
PyuTest.BIOME_TOPS = {
|
||||
@ -20,6 +37,7 @@ PyuTest.BIOME_TOPS = {
|
||||
swamp = 10
|
||||
}
|
||||
|
||||
-- Overworld biome types
|
||||
PyuTest.BIOME_TYPES = {
|
||||
-- Normal biomes (Forests for example)
|
||||
NORMAL = 1,
|
||||
@ -99,372 +117,372 @@ PyuTest.register_overworld_biome = function(name, type, opts)
|
||||
nopts["node_riverbed"] = nopts["node_riverbed"] or "pyutest_core:gravel_block"
|
||||
|
||||
minetest.register_biome(PyuTest.util.tableconcat(nopts, {
|
||||
_pyutest_biome_type = type,
|
||||
_pyutest_biome_type = type,
|
||||
}))
|
||||
|
||||
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,
|
||||
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"],
|
||||
node_water = nopts["node_water"],
|
||||
node_river_water = nopts["node_river_water"],
|
||||
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
|
||||
y_max = 0,
|
||||
y_min = PyuTest.OCEAN_MIN
|
||||
y_max = 0,
|
||||
y_min = PyuTest.OCEAN_MIN
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.OCEAN,
|
||||
_pyutest_ocean_type = type
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.OCEAN,
|
||||
_pyutest_ocean_type = type
|
||||
}))
|
||||
|
||||
minetest.register_biome(PyuTest.util.tableconcat({
|
||||
name = name.."_deep_ocean",
|
||||
name = name.."_deep_ocean",
|
||||
|
||||
node_top = nopts["node_riverbed"],
|
||||
depth_top = 2,
|
||||
node_filler = nopts["node_riverbed"],
|
||||
depth_filler = 3,
|
||||
depth_riverbed = 2,
|
||||
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"],
|
||||
node_water = nopts["node_water"],
|
||||
node_river_water = nopts["node_river_water"],
|
||||
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
|
||||
y_max = PyuTest.DEEP_OCEAN_MAX,
|
||||
y_min = PyuTest.DEEP_OCEAN_MIN,
|
||||
vertical_blend = 5
|
||||
y_max = PyuTest.DEEP_OCEAN_MAX,
|
||||
y_min = PyuTest.DEEP_OCEAN_MIN,
|
||||
vertical_blend = 5
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.OCEAN,
|
||||
_pyutest_ocean_type = type
|
||||
_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.DEEP_OCEAN_MIN - 1,
|
||||
y_min = PyuTest.OVERWORLD_BOTTOM,
|
||||
name = name.."_cave",
|
||||
heat_point = nopts["heat_point"],
|
||||
humidity_point = nopts["humidity_point"],
|
||||
y_max = PyuTest.DEEP_OCEAN_MIN - 1,
|
||||
y_min = PyuTest.OVERWORLD_BOTTOM,
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.CAVE,
|
||||
_pyutest_cave_type = type
|
||||
_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_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.grassland,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.grassland,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
})
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
PyuTest.register_overworld_biome("grassland", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.grassland,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.grassland,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 53,
|
||||
humidity_point = 57,
|
||||
heat_point = 53,
|
||||
humidity_point = 57,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("forest", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 50,
|
||||
humidity_point = 65,
|
||||
_pyutest_biome_flowering = true
|
||||
heat_point = 50,
|
||||
humidity_point = 65,
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("stony_mountains", PyuTest.BIOME_TYPES.WARM, {
|
||||
node_top = "pyutest_core:stone_block",
|
||||
node_filler = "pyutest_core:stone_block",
|
||||
node_top = "pyutest_core:stone_block",
|
||||
node_filler = "pyutest_core:stone_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.mountains,
|
||||
y_min = PyuTest.BIOME_TOPS.grassland,
|
||||
y_max = PyuTest.BIOME_TOPS.mountains,
|
||||
y_min = PyuTest.BIOME_TOPS.grassland,
|
||||
|
||||
heat_point = 65,
|
||||
humidity_point = 8
|
||||
heat_point = 65,
|
||||
humidity_point = 8
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("desert", PyuTest.BIOME_TYPES.DESERT, {
|
||||
node_top = "pyutest_core:sand_block",
|
||||
node_filler = "pyutest_core:sandstone_block",
|
||||
node_riverbed = "pyutest_core:sand_block",
|
||||
node_top = "pyutest_core:sand_block",
|
||||
node_filler = "pyutest_core:sandstone_block",
|
||||
node_riverbed = "pyutest_core:sand_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.desert,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.desert,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 84,
|
||||
humidity_point = 4
|
||||
heat_point = 84,
|
||||
humidity_point = 4
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("desert_mountains", PyuTest.BIOME_TYPES.DESERT, {
|
||||
node_top = "pyutest_core:sand_block",
|
||||
node_filler = "pyutest_core:sandstone_block",
|
||||
node_top = "pyutest_core:sand_block",
|
||||
node_filler = "pyutest_core:sandstone_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.mountains,
|
||||
y_min = PyuTest.BIOME_TOPS.desert,
|
||||
y_max = PyuTest.BIOME_TOPS.mountains,
|
||||
y_min = PyuTest.BIOME_TOPS.desert,
|
||||
|
||||
heat_point = 83,
|
||||
humidity_point = 6
|
||||
heat_point = 83,
|
||||
humidity_point = 6
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("snowy_mountains", PyuTest.BIOME_TYPES.COLD, {
|
||||
node_dust = "pyutest_core:snow_carpet",
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:snow_block",
|
||||
node_dust = "pyutest_core:snow_carpet",
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:snow_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.mountains,
|
||||
y_min = PyuTest.BIOME_TOPS.frozen_plains,
|
||||
y_max = PyuTest.BIOME_TOPS.mountains,
|
||||
y_min = PyuTest.BIOME_TOPS.frozen_plains,
|
||||
|
||||
heat_point = 6,
|
||||
humidity_point = 72
|
||||
heat_point = 6,
|
||||
humidity_point = 72
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("frozen_plains", PyuTest.BIOME_TYPES.COLD, {
|
||||
node_dust = "pyutest_core:snow_carpet",
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:snow_block",
|
||||
node_dust = "pyutest_core:snow_carpet",
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:snow_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.frozen_plains,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.frozen_plains,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
|
||||
heat_point = 9,
|
||||
humidity_point = 67
|
||||
heat_point = 9,
|
||||
humidity_point = 67
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("mushroom_fields", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:mycelium_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:mycelium_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.mushroom_fields,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.mushroom_fields,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 53,
|
||||
humidity_point = 94
|
||||
heat_point = 53,
|
||||
humidity_point = 94
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("ice_spikes", PyuTest.BIOME_TYPES.COLD, {
|
||||
node_top = "pyutest_core:ice_block",
|
||||
node_filler = "pyutest_core:ice_block",
|
||||
node_top = "pyutest_core:ice_block",
|
||||
node_filler = "pyutest_core:ice_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.ice_spikes,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.ice_spikes,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
|
||||
heat_point = 9,
|
||||
humidity_point = 70
|
||||
heat_point = 9,
|
||||
humidity_point = 70
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("meadow", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
depth_filler = 4,
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
depth_filler = 4,
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.mountains,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.mountains,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 52,
|
||||
humidity_point = 83,
|
||||
heat_point = 52,
|
||||
humidity_point = 83,
|
||||
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("old_growth_forest", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 45,
|
||||
humidity_point = 92,
|
||||
heat_point = 45,
|
||||
humidity_point = 92,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("snowy_forest", PyuTest.BIOME_TYPES.COLD, {
|
||||
node_dust = "pyutest_core:snow_carpet",
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_dust = "pyutest_core:snow_carpet",
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
|
||||
heat_point = 8,
|
||||
humidity_point = 69
|
||||
heat_point = 8,
|
||||
humidity_point = 69
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("savanna", PyuTest.BIOME_TYPES.WARM, {
|
||||
node_top = "pyutest_core:savanna_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:savanna_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.grassland,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.grassland,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 72,
|
||||
humidity_point = 9
|
||||
heat_point = 72,
|
||||
humidity_point = 9
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("taiga", PyuTest.BIOME_TYPES.CHILLY, {
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:dark_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 28,
|
||||
humidity_point = 72,
|
||||
heat_point = 28,
|
||||
humidity_point = 72,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("birch_forest", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 48,
|
||||
humidity_point = 85,
|
||||
heat_point = 48,
|
||||
humidity_point = 85,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("cherry_grove", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 52,
|
||||
humidity_point = 78,
|
||||
heat_point = 52,
|
||||
humidity_point = 78,
|
||||
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("swamp", PyuTest.BIOME_TYPES.WETLAND, {
|
||||
node_top = "pyutest_core:swampy_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:swampy_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.swamp,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.swamp,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 52,
|
||||
humidity_point = 88,
|
||||
heat_point = 52,
|
||||
humidity_point = 88,
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("old_growth_birch_forest", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 47,
|
||||
humidity_point = 73,
|
||||
heat_point = 47,
|
||||
humidity_point = 73,
|
||||
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("aspen_forest", PyuTest.BIOME_TYPES.CHILLY, {
|
||||
node_top = "pyutest_core:aspen_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:aspen_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 25,
|
||||
humidity_point = 63,
|
||||
heat_point = 25,
|
||||
humidity_point = 63,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("redwood_forest", PyuTest.BIOME_TYPES.CHILLY, {
|
||||
node_top = "pyutest_core:podzol_block",
|
||||
node_filler = "pyutest_core:podzol_block",
|
||||
node_top = "pyutest_core:podzol_block",
|
||||
node_filler = "pyutest_core:podzol_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 21,
|
||||
humidity_point = 65,
|
||||
heat_point = 21,
|
||||
humidity_point = 65,
|
||||
|
||||
_pyutest_biome_flowering = true
|
||||
_pyutest_biome_flowering = true
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("jungle", PyuTest.BIOME_TYPES.WARM, {
|
||||
node_top = "pyutest_core:jungle_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:jungle_grass_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 52,
|
||||
humidity_point = 103,
|
||||
heat_point = 52,
|
||||
humidity_point = 103,
|
||||
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
_pyutest_biome_flowering = true,
|
||||
_pyutest_biome_flowering_extra = true
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("large_mushroom_forest", PyuTest.BIOME_TYPES.NORMAL, {
|
||||
node_top = "pyutest_core:mycelium_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_top = "pyutest_core:mycelium_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.mushroom_fields,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.mushroom_fields,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 53,
|
||||
humidity_point = 98
|
||||
heat_point = 53,
|
||||
humidity_point = 98
|
||||
})
|
||||
|
||||
PyuTest.register_overworld_biome("vyn_forest", PyuTest.BIOME_TYPES.COLD, {
|
||||
node_dust = "pyutest_core:snow_carpet",
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
node_dust = "pyutest_core:snow_carpet",
|
||||
node_top = "pyutest_core:snow_block",
|
||||
node_filler = "pyutest_core:dirt_block",
|
||||
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
y_max = PyuTest.BIOME_TOPS.forest,
|
||||
y_min = PyuTest.SURFACE_BOTTOM,
|
||||
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
node_water_top = "pyutest_core:ice_block",
|
||||
depth_water_top = 5,
|
||||
|
||||
heat_point = 11,
|
||||
humidity_point = 68
|
||||
heat_point = 11,
|
||||
humidity_point = 68
|
||||
})
|
||||
|
@ -26,17 +26,18 @@ PyuTest.register_world = function (options)
|
||||
y_min = conf.y_min,
|
||||
register_biome = function (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"
|
||||
|
||||
minetest.register_biome(PyuTest.util.tableconcat(o, {
|
||||
minetest.register_biome(PyuTest.util.tableconcat(cfg, {
|
||||
name = name,
|
||||
depth_top = 0,
|
||||
depth_filler = 0,
|
||||
y_max = conf.y_max,
|
||||
y_min = conf.y_min,
|
||||
node_water = "air",
|
||||
node_river_water = "air",
|
||||
node_cave_liquid = "air",
|
||||
vertical_blend = 5
|
||||
node_river_water = cfg.node_water,
|
||||
node_cave_liquid = cfg.node_water,
|
||||
}))
|
||||
|
||||
return name
|
||||
@ -47,30 +48,106 @@ PyuTest.register_world = function (options)
|
||||
y_max = conf.y_max,
|
||||
y_min = conf.y_min,
|
||||
}))
|
||||
end,
|
||||
|
||||
register_decoration = function (o)
|
||||
minetest.register_decoration(PyuTest.util.tableconcat(o, {
|
||||
y_max = conf.y_max,
|
||||
y_min = conf.y_min
|
||||
}))
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
SpecialCaveWorld = PyuTest.register_world({
|
||||
name = "special_cave_world",
|
||||
y_max = PyuTest.OVERWORLD_BOTTOM,
|
||||
y_min = PyuTest.OVERWORLD_BOTTOM * 2
|
||||
IceWorld = PyuTest.register_world({
|
||||
name = "ice_world",
|
||||
y_max = -400,
|
||||
y_min = -800
|
||||
})
|
||||
|
||||
local icy_cave = SpecialCaveWorld.register_biome({
|
||||
local icy_cavern = IceWorld.register_biome({
|
||||
name = "icy_cave",
|
||||
node_stone = "pyutest_core:ice_block",
|
||||
heat_point = 14,
|
||||
humidity_point = 0
|
||||
})
|
||||
|
||||
SpecialCaveWorld.register_ore({
|
||||
IceWorld.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_core:snow_block",
|
||||
wherein = "pyutest_core:ice_block",
|
||||
clust_scarcity = 3 * 3 * 3,
|
||||
clust_num_ores = 35,
|
||||
clust_size = 5,
|
||||
biomes = {icy_cave},
|
||||
biomes = {icy_cavern},
|
||||
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
|
||||
})
|
||||
|
||||
IceWorld.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_core:crystal_lantern_block",
|
||||
wherein = "pyutest_core:ice_block",
|
||||
clust_scarcity = 5.5 * 5.5 * 5.5,
|
||||
clust_num_ores = 6,
|
||||
clust_size = 5,
|
||||
biomes = {icy_cavern},
|
||||
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
|
||||
})
|
||||
|
||||
SlimeWorld = PyuTest.register_world({
|
||||
name = "slime_world",
|
||||
y_max = -1400,
|
||||
y_min = -1800
|
||||
})
|
||||
|
||||
local slimey_cavern = SlimeWorld.register_biome({
|
||||
name = "slimey_cavern",
|
||||
node_stone = "pyutest_core:slime_block",
|
||||
heat_point = 45,
|
||||
humidity_point = 0
|
||||
})
|
||||
|
||||
SlimeWorld.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_core:glowslime_block",
|
||||
wherein = "pyutest_core:slime_block",
|
||||
clust_scarcity = 4 * 4 * 4,
|
||||
clust_num_ores = 6,
|
||||
clust_size = 5,
|
||||
biomes = {slimey_cavern},
|
||||
noise_params = PyuTest.SPECIALSTONE_NOISE_PARAMS
|
||||
})
|
||||
|
||||
LavaWorld = PyuTest.register_world({
|
||||
name = "lava_world",
|
||||
y_max = -2000,
|
||||
y_min = -2400
|
||||
})
|
||||
|
||||
local lava_cavern = LavaWorld.register_biome({
|
||||
name = "lava_cavern",
|
||||
node_stone = "pyutest_core:molten_rock_block",
|
||||
heat_point = 100,
|
||||
humidity_point = 0,
|
||||
})
|
||||
|
||||
LavaWorld.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_core:magma",
|
||||
wherein = "pyutest_core: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
|
||||
})
|
||||
|
||||
LavaWorld.register_decoration({
|
||||
deco_type = "simple",
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.00063,
|
||||
decoration = {"pyutest_core:lava_source"},
|
||||
place_on = {"pyutest_core:molten_rock_block", "pyutest_core:magma"},
|
||||
biomes = {lava_cavern},
|
||||
flags = "all_ceilings"
|
||||
})
|
||||
|
BIN
textures/pyutest-glowslime.png
Normal file
BIN
textures/pyutest-glowslime.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 227 B |
BIN
textures/pyutest-magma.png
Normal file
BIN
textures/pyutest-magma.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 346 B |
Loading…
x
Reference in New Issue
Block a user