Charakterbewegungen hinzugefügt, Deko hinzugefügt, Kochrezepte angepasst
This commit is contained in:
parent
95945c0306
commit
a0c893ca0b
1124 changed files with 64294 additions and 763 deletions
25
mods/moreblocks/stairsplus/api/whitelist.lua
Normal file
25
mods/moreblocks/stairsplus/api/whitelist.lua
Normal file
|
@ -0,0 +1,25 @@
|
|||
local f = string.format
|
||||
|
||||
local s = stairsplus.settings
|
||||
local api = stairsplus.api
|
||||
|
||||
if s.whitelist_mode then
|
||||
api.whitelisted = {}
|
||||
local filename = futil.path_concat(minetest.get_worldpath(), "stairsplus.whitelist")
|
||||
local contents = futil.load_file(filename)
|
||||
if not contents then
|
||||
error(f("error initializing stairsplus whitelist: %s does not exist", filename))
|
||||
end
|
||||
local items = contents:split("\n")
|
||||
for i = 1, #items do
|
||||
api.whitelisted[items[i]] = true
|
||||
end
|
||||
stairsplus.log("action", f("%s nodes whitelisted", #api.whitelisted))
|
||||
end
|
||||
|
||||
function api.is_whitelisted(name)
|
||||
if not s.whitelist_mode then
|
||||
return true
|
||||
end
|
||||
return api.whitelisted[name]
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue