Skip to content

Commit

Permalink
oregen adapted to mcl
Browse files Browse the repository at this point in the history
  • Loading branch information
nonfreegithub committed Sep 14, 2023
1 parent 5fd2621 commit 1ad7780
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ read_globals = {
"unifieddyes", "digiline_remote",
"drawers", "mg",
"craftguide", "i3", "mtt",
"vizlib", "mcl_sounds",
"vizlib", "mcl_sounds", "mcl_vars",

-- Only used in technic/machines/MV/lighting.lua (disabled)
"isprotect", "homedecor_expect_infinite_stacks",
Expand Down
2 changes: 1 addition & 1 deletion technic_worldgen/mod.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name = technic_worldgen
depends =
optional_depends = default, mcl_core, mcl_sounds, mg
optional_depends = default, mcl_core, mcl_sounds, mcl_init, mg
27 changes: 13 additions & 14 deletions technic_worldgen/oregen.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

local has_mcl = minetest.get_modpath("mcl_core")
local stones = {"default:stone", "mcl_core:stone", "mcl_deepslate:deepslate"}

local uranium_params = {
Expand Down Expand Up @@ -48,8 +49,8 @@ minetest.register_ore({
clust_scarcity = 8*8*8,
clust_num_ores = 4,
clust_size = 3,
y_min = -300,
y_max = -80,
y_min = has_mcl and mcl_vars.mg_overworld_min or -300,
y_max = has_mcl and -30 or -80,
noise_params = uranium_params,
noise_threshold = uranium_threshold,
})
Expand All @@ -61,8 +62,8 @@ minetest.register_ore({
clust_scarcity = 8*8*8,
clust_num_ores = 2,
clust_size = 3,
y_min = -200,
y_max = -100,
y_min = has_mcl and mcl_vars.mg_overworld_min or -200,
y_max = has_mcl and -30 or -100,
noise_params = chromium_params,
noise_threshold = chromium_threshold,
})
Expand All @@ -74,8 +75,8 @@ minetest.register_ore({
clust_scarcity = 6*6*6,
clust_num_ores = 2,
clust_size = 3,
y_min = -31000,
y_max = -200,
y_min = has_mcl and mcl_vars.mg_overworld_min or -31000,
y_max = has_mcl and -30 or -200,
flags = "absheight",
noise_params = chromium_params,
noise_threshold = chromium_threshold,
Expand All @@ -101,7 +102,7 @@ minetest.register_ore({
clust_scarcity = 6*6*6,
clust_num_ores = 4,
clust_size = 3,
y_min = -31000,
y_min = has_mcl and mcl_vars.mg_overworld_min or -31000,
y_max = -32,
flags = "absheight",
noise_params = zinc_params,
Expand All @@ -128,7 +129,7 @@ minetest.register_ore({
clust_scarcity = 8*8*8,
clust_num_ores = 5,
clust_size = 3,
y_min = -128,
y_min = has_mcl and mcl_vars.mg_overworld_min or -128,
y_max = -16,
noise_params = lead_params,
noise_threshold = lead_threshold,
Expand All @@ -141,8 +142,8 @@ minetest.register_ore({
clust_scarcity = 6*6*6,
clust_num_ores = 5,
clust_size = 3,
y_min = -31000,
y_max = -128,
y_min = has_mcl and mcl_vars.mg_overworld_min or -31000,
y_max = has_mcl and -30 or -128,
flags = "absheight",
noise_params = lead_params,
noise_threshold = lead_threshold,
Expand All @@ -152,8 +153,6 @@ minetest.register_ore({
local sulfur_buf = {}
local sulfur_noise

local has_mcl = minetest.get_modpath("mcl_core")

minetest.register_on_generated(function(minp, maxp)
local vm, emin, emax = minetest.get_mapgen_object("voxelmanip")
local a = VoxelArea:new({MinEdge=emin, MaxEdge=emax})
Expand Down Expand Up @@ -206,8 +205,8 @@ if technic.config:get_bool("enable_marble_generation") then
clust_scarcity = 1,
clust_num_ores = 1,
clust_size = 3,
y_min = -31000,
y_max = -50,
y_min = has_mcl and mcl_vars.mg_overworld_min or -31000,
y_max = has_mcl and -30 or -50,
noise_threshold = 0.4,
noise_params = {
offset = 0, scale = 15, spread = {x = 150, y = 150, z = 150},
Expand Down

0 comments on commit 1ad7780

Please sign in to comment.