Added Pastures along with some minor changes
This commit is contained in:
parent
5f7db900e3
commit
84f11ac64e
@ -41,6 +41,8 @@ Other Game Changes:
|
||||
- Add healing information to food descriptions
|
||||
- Replaced Grassland biome with Plains
|
||||
- Added FrozenPeaks biome
|
||||
- Added Peach color
|
||||
- Replaced single Haybales blocks spawning in Plains biome with Haybale and Pumpkin pastures
|
||||
|
||||
Code Changes:
|
||||
|
||||
|
@ -10,13 +10,18 @@ PyuTest.BLOCK_SLOW = 1
|
||||
PyuTest.OVERWORLD_SURFACE_BOTTOM = 1
|
||||
PyuTest.OVERWORLD_TOP = 4096
|
||||
PyuTest.OVERWORLD_BOTTOM = -200
|
||||
|
||||
-- these values are yoinked from VoxeLibre
|
||||
-- (https://git.minetest.land/VoxeLibre/VoxeLibre/src/branch/master/mods/MAPGEN/mcl_biomes/init.lua)
|
||||
PyuTest.OVERWORLD_OCEAN_MIN = -15
|
||||
PyuTest.OVERWORLD_DEEP_OCEAN_MAX = PyuTest.OVERWORLD_OCEAN_MIN - 1
|
||||
PyuTest.OVERWORLD_DEEP_OCEAN_MIN = -31
|
||||
|
||||
PyuTest.CAVE_TOP = PyuTest.OVERWORLD_DEEP_OCEAN_MIN - 1
|
||||
PyuTest.CAVE_BOTTOM = -50
|
||||
PyuTest.CAVE_BOTTOM = -55
|
||||
|
||||
PyuTest.WATER_FREEZING_TEMPERATURE = 0
|
||||
PyuTest.WATER_EVAPORATING_TEMPERATURE = 1000
|
||||
|
||||
PyuTest.WORLD_TOP = 31000
|
||||
PyuTest.WORLD_BOTTOM = -31000
|
||||
@ -62,6 +67,7 @@ PyuTest.COLORS = {
|
||||
ecru = { "Ecru", "#C2B280" },
|
||||
khaki = { "Khaki", "khaki" },
|
||||
indigo = { "Indigo", "#4000FF" },
|
||||
peach = { "Peach", "#FFE5B4"}
|
||||
}
|
||||
|
||||
PyuTest.WORLD_GRAVITY = core.settings:get("movement_gravity")
|
||||
|
@ -31,8 +31,7 @@ local function on_rightclick(pos, node, clicker)
|
||||
core.sound_play({
|
||||
name = "crate_open",
|
||||
gain = 1,
|
||||
pos = pos
|
||||
})
|
||||
}, {pos = pos})
|
||||
end
|
||||
|
||||
PyuTest.make_door = function(name, desc, craftitem, texture, groups, extra)
|
||||
|
@ -1,5 +1,5 @@
|
||||
core.register_abm({
|
||||
label = "Water freezing/evaporating",
|
||||
label = "Water freezing",
|
||||
nodenames = { "group:water" },
|
||||
interval = 1.2,
|
||||
chance = 1.8,
|
||||
@ -15,7 +15,7 @@ core.register_abm({
|
||||
local heat = def.heat_point or 50
|
||||
local found = core.find_node_near(pos, 2, { "group:emits_heat" }) ~= nil
|
||||
|
||||
if heat <= 12 and not found then
|
||||
if heat <= PyuTest.WATER_FREEZING_TEMPERATURE and not found then
|
||||
core.set_node(pos, { name = "pyutest_blocks:ice_block" })
|
||||
end
|
||||
end
|
||||
@ -32,7 +32,7 @@ core.register_abm({
|
||||
|
||||
local heat = def.heat_point or 50
|
||||
|
||||
if heat >= 85 then
|
||||
if heat >= PyuTest.WATER_EVAPORATING_TEMPERATURE then
|
||||
core.remove_node(pos)
|
||||
end
|
||||
end
|
||||
|
@ -250,10 +250,9 @@ PyuTest.register_overworld_biome = function(name, type, opts, only_base)
|
||||
humidity_point = nopts["humidity_point"],
|
||||
y_max = PyuTest.CAVE_TOP,
|
||||
y_min = PyuTest.CAVE_BOTTOM,
|
||||
}, {
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.CAVE,
|
||||
_pyutest_cave_type = type
|
||||
}))
|
||||
}, nopts["_pyutest_cave_opts"] or {}))
|
||||
|
||||
core.register_biome(PyuTest.util.tableconcat({
|
||||
name = name .. "_deep_cave",
|
||||
@ -261,9 +260,8 @@ PyuTest.register_overworld_biome = function(name, type, opts, only_base)
|
||||
humidity_point = nopts["humidity_point"],
|
||||
y_max = PyuTest.CAVE_BOTTOM,
|
||||
y_min = PyuTest.OVERWORLD_BOTTOM,
|
||||
node_stone = "pyutest_blocks:darkstone_block"
|
||||
}, {
|
||||
node_stone = "pyutest_blocks:darkstone_block",
|
||||
_pyutest_biome_type = PyuTest.BIOME_TYPES.CAVE,
|
||||
_pyutest_cave_type = type
|
||||
}))
|
||||
}, nopts["_pyutest_cave_opts"] or {}))
|
||||
end
|
||||
|
@ -303,7 +303,9 @@ PyuTest.register_overworld_biome("FrozenPeaks", PyuTest.BIOME_TYPES.COLD, {
|
||||
|
||||
heat_point = 0,
|
||||
humidity_point = 75,
|
||||
|
||||
|
||||
vertical_blend = 8,
|
||||
|
||||
weight = PyuTest.BIOME_WEIGHTS.large,
|
||||
|
||||
_enable_beaches = false
|
||||
|
0
mods/WORLD/pyutest_overworld/caves.lua
Normal file
0
mods/WORLD/pyutest_overworld/caves.lua
Normal file
@ -44,3 +44,42 @@ core.register_ore({
|
||||
column_height_min = 8,
|
||||
column_midpoint_factor = 1,
|
||||
})
|
||||
|
||||
-- Pastures
|
||||
PyuTest.generate_pasture_schematic = function(size, node, param2)
|
||||
local schem = {
|
||||
size = { x = size, y = 2, z = size },
|
||||
data = {},
|
||||
}
|
||||
|
||||
for _ = 1, size do
|
||||
for _ = 1, size do
|
||||
table.insert(schem.data, {name = node, prob = 256 / 3, param2 = param2})
|
||||
table.insert(schem.data, {name = node, prob = 256 / 3, param2 = param2})
|
||||
end
|
||||
end
|
||||
|
||||
return schem
|
||||
end
|
||||
|
||||
core.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0006,
|
||||
biomes = {"Plains"},
|
||||
schematic = PyuTest.generate_pasture_schematic(4, "pyutest_farming:pumpkin", 0),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_y"
|
||||
})
|
||||
|
||||
core.register_decoration({
|
||||
deco_type = "schematic",
|
||||
place_on = {"group:grass"},
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0006,
|
||||
biomes = {"Plains"},
|
||||
schematic = PyuTest.generate_pasture_schematic(4, "pyutest_blocks:haybale_block", 0),
|
||||
rotation = "random",
|
||||
flags = "place_center_x, place_center_y"
|
||||
})
|
||||
|
@ -16,15 +16,6 @@ core.register_decoration({
|
||||
decoration = PyuTest.registered_flowers
|
||||
})
|
||||
|
||||
core.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = { "group:grass" },
|
||||
sidelen = 16,
|
||||
fill_ratio = 0.0018,
|
||||
biomes = { "Plains" },
|
||||
decoration = "pyutest_blocks:haybale_block"
|
||||
})
|
||||
|
||||
core.register_decoration({
|
||||
deco_type = "simple",
|
||||
place_on = { "pyutest_blocks:dirt_block", "pyutest_blocks:sand_block" },
|
||||
|
@ -3,6 +3,7 @@ local modpath = core.get_modpath("pyutest_overworld")
|
||||
dofile(modpath .. "/biomes.lua")
|
||||
|
||||
if not PyuTest.is_flat() then
|
||||
dofile(modpath .. "/caves.lua")
|
||||
dofile(modpath .. "/features.lua")
|
||||
dofile(modpath .. "/structures.lua")
|
||||
dofile(modpath .. "/trees.lua")
|
||||
|
@ -1 +1 @@
|
||||
depends = pyutest_mapgen,pyutest_blocks,pyutest_flowers,pyutest_lootboxes,pyutest_ores,pyutest_worlds
|
||||
depends = pyutest_mapgen,pyutest_blocks,pyutest_flowers,pyutest_lootboxes,pyutest_ores,pyutest_worlds,pyutest_farming
|
||||
|
@ -13,13 +13,13 @@ local node_stones = {
|
||||
|
||||
local lava_cavern = PyuTest.LavaWorld:register_biome("LavaCavern", PyuTest.BIOME_TYPES.HOT, {
|
||||
node_stone = "pyutest_blocks:molten_rock_block",
|
||||
heat_point = 85,
|
||||
heat_point = PyuTest.WATER_EVAPORATING_TEMPERATURE,
|
||||
humidity_point = 0,
|
||||
})
|
||||
|
||||
local basalt_volcano = PyuTest.LavaWorld:register_biome("BasaltVolcano", PyuTest.BIOME_TYPES.HOT, {
|
||||
node_stone = "pyutest_blocks:basalt_block",
|
||||
heat_point = 95,
|
||||
heat_point = PyuTest.WATER_EVAPORATING_TEMPERATURE + 20,
|
||||
humidity_point = 0,
|
||||
})
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user