1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
-- copied config section from technic
worldpath = minetest.get_worldpath()
landrush.config = Settings(worldpath.."/landrush.conf")
local conf_table = landrush.config:to_table()
local defaults = {
requireClaim = "false",
onlineProtection = "true",
offenseDamage = "4",
autoBan = "false",
banLevel = "40",
banWarning = "25",
offenseReset = "1440",
adminUser = nil,
chunkSize = "16",
enableHud = "true"
}
for k, v in pairs(defaults) do
if conf_table[k] == nil then
landrush.config:set(k, v)
end
end
-- Create the config file if it doesn't exist
landrush.config:write()
-- These are items that can be dug in unclaimed areas when landrush.config:get_bool("requireClaim") is true
landrush.global_dig_list = {["default:ladder"]=true,["default:leaves"]=true,["default:tree"]=true,["default:grass"]=true,["default:grass_1"]=true,["default:grass_2"]=true,["default:grass_3"]=true,["default:grass_4"]=true}
|