mirror of
https://github.com/minetest-mods/moreores.git
synced 2025-01-03 03:17:31 +01:00
Do not pollute global namespace
This commit is contained in:
parent
58a337ccd6
commit
a4d6418c83
24
_config.txt
24
_config.txt
@ -7,21 +7,21 @@
|
|||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
|
|
||||||
-- Chunk sizes for ore generation (bigger = ore deposits are more scattered around)
|
-- Chunk sizes for ore generation (bigger = ore deposits are more scattered around)
|
||||||
moreores_tin_chunk_size = 7
|
moreores.tin_chunk_size = 7
|
||||||
moreores_silver_chunk_size = 11
|
moreores.silver_chunk_size = 11
|
||||||
moreores_mithril_chunk_size = 11
|
moreores.mithril_chunk_size = 11
|
||||||
|
|
||||||
-- Amount of ore per chunk (higher = bigger ore deposits)
|
-- Amount of ore per chunk (higher = bigger ore deposits)
|
||||||
moreores_tin_ore_per_chunk = 3
|
moreores.tin_ore_per_chunk = 3
|
||||||
moreores_silver_ore_per_chunk = 4
|
moreores.silver_ore_per_chunk = 4
|
||||||
moreores_mithril_ore_per_chunk = 1
|
moreores.mithril_ore_per_chunk = 1
|
||||||
|
|
||||||
-- Minimal depths of ore generation (Y coordinate, 0 being sea level by default)
|
-- Minimal depths of ore generation (Y coordinate, 0 being sea level by default)
|
||||||
moreores_tin_min_depth = -31000
|
moreores.tin_min_depth = -31000
|
||||||
moreores_silver_min_depth = -31000
|
moreores.silver_min_depth = -31000
|
||||||
moreores_mithril_min_depth = -31000
|
moreores.mithril_min_depth = -31000
|
||||||
|
|
||||||
-- Maximal depths of ore generation (Y coordinate, 0 being sea level by default)
|
-- Maximal depths of ore generation (Y coordinate, 0 being sea level by default)
|
||||||
moreores_tin_max_depth = 8
|
moreores.tin_max_depth = 8
|
||||||
moreores_silver_max_depth = -2
|
moreores.silver_max_depth = -2
|
||||||
moreores_mithril_max_depth = -512
|
moreores.mithril_max_depth = -512
|
||||||
|
32
init.lua
32
init.lua
@ -8,6 +8,8 @@ Licensed under the zlib license. See LICENSE.md for more information.
|
|||||||
=====================================================================
|
=====================================================================
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
|
moreores = {}
|
||||||
|
|
||||||
local S
|
local S
|
||||||
if minetest.get_modpath("intllib") then
|
if minetest.get_modpath("intllib") then
|
||||||
S = intllib.Getter()
|
S = intllib.Getter()
|
||||||
@ -235,11 +237,11 @@ local oredefs = {
|
|||||||
silver = {
|
silver = {
|
||||||
description = "Silver",
|
description = "Silver",
|
||||||
makes = {ore = true, block = true, lump = true, ingot = true, chest = true},
|
makes = {ore = true, block = true, lump = true, ingot = true, chest = true},
|
||||||
oredef = {clust_scarcity = moreores_silver_chunk_size * moreores_silver_chunk_size * moreores_silver_chunk_size,
|
oredef = {clust_scarcity = moreores.silver_chunk_size * moreores.silver_chunk_size * moreores.silver_chunk_size,
|
||||||
clust_num_ores = moreores_silver_ore_per_chunk,
|
clust_num_ores = moreores.silver_ore_per_chunk,
|
||||||
clust_size = moreores_silver_chunk_size,
|
clust_size = moreores.silver_chunk_size,
|
||||||
y_min = moreores_silver_min_depth,
|
y_min = moreores.silver_min_depth,
|
||||||
y_max = moreores_silver_max_depth
|
y_max = moreores.silver_max_depth
|
||||||
},
|
},
|
||||||
tools = {
|
tools = {
|
||||||
pick = {
|
pick = {
|
||||||
@ -267,22 +269,22 @@ local oredefs = {
|
|||||||
tin = {
|
tin = {
|
||||||
description = "Tin",
|
description = "Tin",
|
||||||
makes = {ore = true, block = true, lump = true, ingot = true, chest = false},
|
makes = {ore = true, block = true, lump = true, ingot = true, chest = false},
|
||||||
oredef = {clust_scarcity = moreores_tin_chunk_size * moreores_tin_chunk_size * moreores_tin_chunk_size,
|
oredef = {clust_scarcity = moreores.tin_chunk_size * moreores.tin_chunk_size * moreores.tin_chunk_size,
|
||||||
clust_num_ores = moreores_tin_ore_per_chunk,
|
clust_num_ores = moreores.tin_ore_per_chunk,
|
||||||
clust_size = moreores_tin_chunk_size,
|
clust_size = moreores.tin_chunk_size,
|
||||||
y_min = moreores_tin_min_depth,
|
y_min = moreores.tin_min_depth,
|
||||||
y_max = moreores_tin_max_depth
|
y_max = moreores.tin_max_depth
|
||||||
},
|
},
|
||||||
tools = {},
|
tools = {},
|
||||||
},
|
},
|
||||||
mithril = {
|
mithril = {
|
||||||
description = "Mithril",
|
description = "Mithril",
|
||||||
makes = {ore = true, block = true, lump = true, ingot = true, chest = false},
|
makes = {ore = true, block = true, lump = true, ingot = true, chest = false},
|
||||||
oredef = {clust_scarcity = moreores_mithril_chunk_size * moreores_mithril_chunk_size * moreores_mithril_chunk_size,
|
oredef = {clust_scarcity = moreores.mithril_chunk_size * moreores.mithril_chunk_size * moreores.mithril_chunk_size,
|
||||||
clust_num_ores = moreores_mithril_ore_per_chunk,
|
clust_num_ores = moreores.mithril_ore_per_chunk,
|
||||||
clust_size = moreores_mithril_chunk_size,
|
clust_size = moreores.mithril_chunk_size,
|
||||||
y_min = moreores_mithril_min_depth,
|
y_min = moreores.mithril_min_depth,
|
||||||
y_max = moreores_mithril_max_depth
|
y_max = moreores.mithril_max_depth
|
||||||
},
|
},
|
||||||
tools = {
|
tools = {
|
||||||
pick = {
|
pick = {
|
||||||
|
Loading…
Reference in New Issue
Block a user