ikea - Add DEBUG setting
parent
42c88577bd
commit
3d067984a9
|
@ -7,6 +7,7 @@ read_globals = {
|
|||
"ItemStack",
|
||||
"PerlinNoise",
|
||||
"dump",
|
||||
"DEBUG",
|
||||
"ikea",
|
||||
"music",
|
||||
"util",
|
||||
|
@ -43,6 +44,7 @@ files["mods/util/overrides/table.lua"] = {globals = {"table"}}
|
|||
files["mods/util/overrides/string.lua"] = {globals = {"string"}}
|
||||
files["mods/util/overrides/vector.lua"] = {globals = {"vector"}}
|
||||
|
||||
files["mods/ikea/init.lua"] = {globals = {"DEBUG"}}
|
||||
files["mods/ikea/api"] = {globals = {"ikea"}}
|
||||
files["mods/ikea_staff"] = {globals = {"staff"}}
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
DEBUG = minetest.settings:get_bool("DEBUG") or false
|
||||
|
||||
local modpath = minetest.get_modpath("ikea")
|
||||
|
||||
-- Run everything
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
-- SCP-3008-2 IKEA Staff --
|
||||
-- By GreenXenith --
|
||||
-- (Mostly Rewritten By Benrob0329) --
|
||||
local DEBUG = false
|
||||
|
||||
local PATH = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
||||
local helpers = dofile(PATH .. "helpers.lua")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
local STATIC_GROUPCAP
|
||||
|
||||
if minetest.settings:get_bool("creative_mode", false) then
|
||||
if DEBUG then
|
||||
STATIC_GROUPCAP = {times = {[1] = 1.00}, uses = 0}
|
||||
end
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ dofile(modpath .. "overrides/table.lua")
|
|||
dofile(modpath .. "overrides/string.lua")
|
||||
dofile(modpath .. "tests.lua")
|
||||
|
||||
--[[ Mapgen ]]--
|
||||
|
||||
function util.node_or_ignore(node)
|
||||
if type(node) == "string" then
|
||||
return {name = node}
|
||||
|
@ -34,6 +36,8 @@ function util.fill_vmanip_area(data, va, p1, p2, c_id)
|
|||
return data
|
||||
end
|
||||
|
||||
--[[ Noise ]]--
|
||||
|
||||
-- Returns The Decimal Places Of A Random Number
|
||||
function util.tail_perlin(Perlin, x, y, z)
|
||||
local num = Perlin:get_3d({x = x, y = y, z = z})
|
||||
|
@ -46,6 +50,8 @@ function util.bound_perlin(Perlin, limit, x, y, z)
|
|||
return math.floor((num * (limit - 1)) + 0.5) + 1
|
||||
end
|
||||
|
||||
--[[ Misc ]]--
|
||||
|
||||
-- Returns A List Of Nodestrings Filtered By Group
|
||||
function util.get_nodes_by_groups(groups)
|
||||
groups = groups or {}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
DEBUG (DEBUG MODE) bool false
|
Loading…
Reference in New Issue