mirror of
git://repo.or.cz/tsm_mines.git
synced 2025-06-28 22:46:17 +02:00
Compare commits
4 Commits
master
...
e696e08de3
Author | SHA1 | Date | |
---|---|---|---|
e696e08de3 | |||
1ddf3c5ed3 | |||
6fba7167b3 | |||
f7b1babdc6 |
22
init.lua
22
init.lua
@ -1,16 +1,10 @@
|
||||
local MINE_DEEP_MIN = tonumber(minetest.setting_get("mines_deep_min"))
|
||||
local MINE_DEEP_MAX = tonumber(minetest.setting_get("mines_deep_max"))
|
||||
local MINE_FACTOR = tonumber(minetest.setting_get("mines_spawnfactor"))
|
||||
local MINE_DEEP_MIN = tonumber(minetest.settings:get("mines_deep_min")) or -64
|
||||
local MINE_DEEP_MAX = tonumber(minetest.settings:get("mines_deep_max")) or -380
|
||||
local MINE_FACTOR = tonumber(minetest.settings:get("mines_spawnfactor")) or 1.5
|
||||
|
||||
if not MINE_DEEP_MIN then
|
||||
MINE_DEEP_MIN = -64
|
||||
end
|
||||
if not MINE_DEEP_MAX then
|
||||
MINE_DEEP_MAX = -380
|
||||
end
|
||||
if not MINE_FACTOR then
|
||||
MINE_FACTOR = 1.5
|
||||
end
|
||||
minetest.log("info", "Mod \"tsm_mines\" set MINE_DEEP_MIN to "..MINE_DEEP_MIN)
|
||||
minetest.log("info", "Mod \"tsm_mines\" set MINE_DEEP_MAX to "..MINE_DEEP_MAX)
|
||||
minetest.log("info", "Mod \"tsm_mines\" set MINE_FACTOR to "..MINE_FACTOR)
|
||||
|
||||
minetest.register_node("tsm_mines:dummy", {
|
||||
description = "tsm_mines dummy node",
|
||||
@ -81,7 +75,7 @@ local function fill_chest(pos)
|
||||
inv:set_size("main", 8*4)
|
||||
local stacks = {}
|
||||
if(minetest.get_modpath("treasurer") ~= nil) then
|
||||
stacks = treasurer.select_random_treasures(3,4,6,{"minetool", "food", "crafting_component"})
|
||||
stacks = treasurer.select_random_treasures(3,4,6,{"minetool", "nourriture", "building_block", "precieux"})
|
||||
else
|
||||
for i=0,2,1 do
|
||||
local stuff = chest_stuff[math.random(1,#chest_stuff)]
|
||||
@ -255,3 +249,5 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
vm:update_liquids()
|
||||
vm:write_to_map()
|
||||
end)
|
||||
|
||||
minetest.log("action", "[tsm_mines] loaded.")
|
||||
|
Reference in New Issue
Block a user