Merge pull request 'Fix a couple of warnings (game.conf, shipwreck get_mapgen_params)' (#2277) from fix_warnings into master

Reviewed-on: MineClone2/MineClone2#2277
Reviewed-by: MysticTempest <mystictempest@noreply.git.minetest.land>
This commit is contained in:
cora 2022-06-07 01:19:10 +00:00
commit 61ddec5a85
2 changed files with 8 additions and 7 deletions

View File

@ -1,2 +1,2 @@
name = MineClone 2 title = MineClone 2
description = A survival sandbox game. Survive, gather, hunt, build, explore, and do much more. description = A survival sandbox game. Survive, gather, hunt, build, explore, and do much more.

View File

@ -2,10 +2,11 @@ local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname) local modpath = minetest.get_modpath(modname)
--local S = minetest.get_translator(modname) --local S = minetest.get_translator(modname)
local mgp = minetest.get_mapgen_params() local seed = minetest.get_mapgen_setting("seed")
local pr = PseudoRandom(mgp.seed) local water_level = minetest.get_mapgen_setting("water_level")
local pr = PseudoRandom(seed)
--schematics by chmodsayshello --schematics by chmodsayshello
local schems = { local schems = {
"shipwreck_full_damaged", "shipwreck_full_damaged",
"shipwreck_full_normal", "shipwreck_full_normal",
@ -101,7 +102,7 @@ minetest.register_decoration({
fill_ratio = 0.00002, fill_ratio = 0.00002,
flags = "place_center_x, place_center_z, force_placement", flags = "place_center_x, place_center_z, force_placement",
biomes = get_ocean_biomes(), biomes = get_ocean_biomes(),
y_max=mgp.water_level-4, y_max=water_level-4,
}) })
--rare beached variant --rare beached variant
@ -115,8 +116,8 @@ minetest.register_decoration({
fill_ratio=0.000001, fill_ratio=0.000001,
flags = "place_center_x, place_center_z, force_placement", flags = "place_center_x, place_center_z, force_placement",
biomes = get_beach_biomes(), biomes = get_beach_biomes(),
y_max = mgp.water_level + 4, y_max = water_level + 4,
y_min = mgp.water_level - 1, y_min = water_level - 1,
}) })
minetest.register_lbm({ minetest.register_lbm({