Add initial holiday settings.
This commit is contained in:
parent
4de7c7ab68
commit
26622dd1dd
2 changed files with 35 additions and 1 deletions
13
init.lua
13
init.lua
|
@ -33,6 +33,19 @@ end
|
|||
fun_caves.DEBUG = false -- for maintenance only
|
||||
|
||||
|
||||
local f_date = io.open(fun_caves.world .. '/date.txt', 'r')
|
||||
if f_date then
|
||||
local s = f_date:read('*a')
|
||||
f_date:close()
|
||||
for y, m, d in s:gmatch('(%d%d%d%d)(%d%d)(%d%d)') do
|
||||
local yn, mn, dn = tonumber(y), tonumber(m), tonumber(d)
|
||||
if yn and mn and dn then
|
||||
fun_caves.date = {yn, mn, dn}
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
local inp = io.open(fun_caves.world..'/fun_caves_data.txt','r')
|
||||
if inp then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue