improve world generation
This commit is contained in:
parent
60cc4c1c63
commit
93716edf1f
22
mods/PLAYER/pyutest_effects/init.lua
Normal file
22
mods/PLAYER/pyutest_effects/init.lua
Normal file
@ -0,0 +1,22 @@
|
||||
core.register_globalstep(function ()
|
||||
for _, v in pairs(core.get_connected_players()) do
|
||||
local name = v:get_player_name()
|
||||
|
||||
local speed_multiplier = 1
|
||||
local sprint_addition = 0.35
|
||||
|
||||
if v:get_player_control().aux1 and PyuTest.hunger_get(name) > 6 then
|
||||
speed_multiplier = speed_multiplier + sprint_addition
|
||||
PyuTest.hunger_multiplier(name, 4)
|
||||
else
|
||||
PyuTest.hunger_multiplier(name, 1)
|
||||
end
|
||||
|
||||
v:set_physics_override({
|
||||
speed = 1.15 * speed_multiplier,
|
||||
})
|
||||
|
||||
local fovm = (1 + (speed_multiplier) * sprint_addition)
|
||||
v:set_fov(fovm, true, 0.15)
|
||||
end
|
||||
end)
|
1
mods/PLAYER/pyutest_effects/mod.conf
Normal file
1
mods/PLAYER/pyutest_effects/mod.conf
Normal file
@ -0,0 +1 @@
|
||||
depends = pyutest_hunger
|
@ -43,30 +43,6 @@ core.register_item(":", {
|
||||
}
|
||||
})
|
||||
|
||||
-- player effects (TODO)
|
||||
core.register_globalstep(function ()
|
||||
for _, v in pairs(core.get_connected_players()) do
|
||||
local name = v:get_player_name()
|
||||
|
||||
local speed_multiplier = 1
|
||||
local sprint_addition = 0.35
|
||||
|
||||
if v:get_player_control().aux1 and PyuTest.hunger_get(name) > 6 then
|
||||
speed_multiplier = speed_multiplier + sprint_addition
|
||||
PyuTest.hunger_multiplier(name, 4)
|
||||
else
|
||||
PyuTest.hunger_multiplier(name, 1)
|
||||
end
|
||||
|
||||
v:set_physics_override({
|
||||
speed = 1.15 * speed_multiplier,
|
||||
})
|
||||
|
||||
local fovm = (1 + (speed_multiplier - sprint_addition) / 2)
|
||||
v:set_fov(fovm, true, 0.15)
|
||||
end
|
||||
end)
|
||||
|
||||
PyuTest.HAND_TOOL_CAPS = PyuTest.tool_caps({
|
||||
uses = 0,
|
||||
attck_uses = 0,
|
||||
|
@ -6,7 +6,8 @@ local function do_wind(player)
|
||||
if pl[n] == nil then
|
||||
pl[n] = core.sound_play("pyutest-wind", {
|
||||
player = n,
|
||||
loop = true
|
||||
loop = true,
|
||||
gain = 0.5
|
||||
})
|
||||
end
|
||||
end
|
||||
|
@ -4,10 +4,13 @@ core.register_alias("mapgen_river_water_source", "pyutest_blocks:water_source")
|
||||
core.register_alias("mapgen_lava_source", "pyutest_blocks:lava_source")
|
||||
core.register_alias("mapgen_singlenode", "air")
|
||||
|
||||
local mg_flags = core.settings:get_flags("mg_flags")
|
||||
local settings = core.settings
|
||||
local mg_flags = settings:get_flags("mg_flags")
|
||||
local mg_name = core.get_mapgen_setting("mg_name")
|
||||
core.set_mapgen_setting(string.format("mg%s_cavern_threshold", mg_name), "0.20", true)
|
||||
core.set_mapgen_setting(string.format("mg%s_mount_zero_level", mg_name), "1.4", true)
|
||||
core.set_mapgen_setting(string.format("mg%s_mount_zero_level", mg_name), "0.42", true)
|
||||
core.set_mapgen_setting(string.format("mg%s_large_cave_num_min", mg_name), "1", true)
|
||||
core.set_mapgen_setting(string.format("mg%s_large_cave_num_max", mg_name), "4", true)
|
||||
|
||||
mg_flags.caverns = true
|
||||
mg_flags.dungeons = false
|
||||
@ -24,3 +27,71 @@ if string.len(mg_flags_str) > 0 then
|
||||
mg_flags_str = string.sub(mg_flags_str, 1, string.len(mg_flags_str) - 1)
|
||||
end
|
||||
core.set_mapgen_setting("mg_flags", mg_flags_str, true)
|
||||
|
||||
local function change_np_group(key, fn)
|
||||
local np = settings:get_np_group(key)
|
||||
|
||||
if np then
|
||||
np = PyuTest.util.tableconcat(fn(np), np)
|
||||
|
||||
settings:set_np_group(key, np)
|
||||
end
|
||||
end
|
||||
|
||||
change_np_group(string.format("mg%s_np_cave1", mg_name), function ()
|
||||
return {
|
||||
spread = {
|
||||
x = 122,
|
||||
y = 122,
|
||||
z = 122
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
||||
change_np_group(string.format("mg%s_np_cave2", mg_name), function ()
|
||||
return {
|
||||
spread = {
|
||||
x = 135,
|
||||
y = 135,
|
||||
z = 135
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
||||
change_np_group(string.format("mg%s_np_mountain", mg_name), function ()
|
||||
return {
|
||||
spread = {
|
||||
x = 400,
|
||||
y = 520,
|
||||
z = 400,
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
||||
change_np_group(string.format("mg%s_np_mount_height", mg_name), function ()
|
||||
return {
|
||||
spread = {
|
||||
x = 1350,
|
||||
z = 1350,
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
||||
change_np_group(string.format("mg%s_np_terrain_base", mg_name), function ()
|
||||
return {
|
||||
spread = {
|
||||
x = 925,
|
||||
z = 925,
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
||||
|
||||
change_np_group(string.format("mg%s_np_terrain_alt", mg_name), function ()
|
||||
return {
|
||||
spread = {
|
||||
x = 725,
|
||||
z = 725,
|
||||
}
|
||||
}
|
||||
end)
|
||||
|
@ -1,13 +1,13 @@
|
||||
PyuTest.register_overworld_biome("GravelBeach", PyuTest.BIOME_TYPES.CHILLY, {
|
||||
depth_top = 0,
|
||||
node_filler = "pyutest_blocks:gravel_block",
|
||||
depth_filler = 7,
|
||||
|
||||
y_max = PyuTest.OVERWORLD_BIOME_TOPS.extreme_lowland,
|
||||
y_min = PyuTest.OVERWORLD_SURFACE_BOTTOM,
|
||||
|
||||
heat_point = 20,
|
||||
humidity_point = 50,
|
||||
|
||||
weight = PyuTest.BIOME_WEIGHTS.tiny
|
||||
}, true)
|
||||
-- PyuTest.register_overworld_biome("GravelBeach", PyuTest.BIOME_TYPES.CHILLY, {
|
||||
-- depth_top = 0,
|
||||
-- node_filler = "pyutest_blocks:gravel_block",
|
||||
-- depth_filler = 7,
|
||||
--
|
||||
-- y_max = PyuTest.OVERWORLD_BIOME_TOPS.extreme_lowland,
|
||||
-- y_min = PyuTest.OVERWORLD_SURFACE_BOTTOM,
|
||||
--
|
||||
-- heat_point = 20,
|
||||
-- humidity_point = 50,
|
||||
--
|
||||
-- weight = PyuTest.BIOME_WEIGHTS.tiny
|
||||
-- }, true)
|
||||
|
BIN
textures/pyutest-bottle-overlay.png
Normal file
BIN
textures/pyutest-bottle-overlay.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 138 B |
Binary file not shown.
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 170 B |
Loading…
x
Reference in New Issue
Block a user