forked from mtcontrib/nether-pack
Add settingtypes.txt to configure player trapping and message logging
There are also some changes to fix problems when trapping is enabled while damage is disabled or the other way round.
This commit is contained in:
@ -19,15 +19,6 @@ end
|
||||
|
||||
--== EDITABLE OPTIONS ==--
|
||||
|
||||
--says some information.
|
||||
nether.info = true
|
||||
|
||||
-- tell everyone about the generation
|
||||
nether.inform_all = minetest.is_singleplayer()
|
||||
|
||||
--1:<a bit of information> 2:<acceptable amount of information> 3:<lots of text>
|
||||
nether.max_spam = 2
|
||||
|
||||
-- Depth of the nether
|
||||
local nether_middle = -20000
|
||||
|
||||
@ -94,9 +85,17 @@ local NETHER_SHROOM_FREQ = 100
|
||||
|
||||
--== END OF EDITABLE OPTIONS ==--
|
||||
|
||||
if nether.info then
|
||||
local path = minetest.get_modpath"nether"
|
||||
dofile(path .. "/settings.lua")
|
||||
local nether_weird_noise = dofile(path .. "/weird_mapgen_noise.lua")
|
||||
dofile(path .. "/items.lua")
|
||||
--dofile(path .. "/furnace.lua")
|
||||
dofile(path .. "/pearl.lua")
|
||||
|
||||
|
||||
if nether.log_level >= 1 then
|
||||
function nether:inform(msg, spam, t)
|
||||
if spam <= self.max_spam then
|
||||
if spam <= self.log_level then
|
||||
local info
|
||||
if t then
|
||||
info = "[nether] " .. msg .. (" after ca. %.3g s"):format(
|
||||
@ -105,7 +104,7 @@ if nether.info then
|
||||
info = "[nether] " .. msg
|
||||
end
|
||||
print(info)
|
||||
if self.inform_all then
|
||||
if self.log_to_chat then
|
||||
minetest.chat_send_all(info)
|
||||
end
|
||||
end
|
||||
@ -116,12 +115,6 @@ else
|
||||
end
|
||||
|
||||
|
||||
local path = minetest.get_modpath"nether"
|
||||
local nether_weird_noise = dofile(path.."/weird_mapgen_noise.lua")
|
||||
dofile(path.."/items.lua")
|
||||
--dofile(path.."/furnace.lua")
|
||||
dofile(path.."/pearl.lua")
|
||||
|
||||
-- Weierstrass function stuff from https://github.com/slemonide/gen
|
||||
local SIZE = 1000
|
||||
local ssize = math.ceil(math.abs(SIZE))
|
||||
|
Reference in New Issue
Block a user