-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathinit.lua
More file actions
49 lines (37 loc) · 977 Bytes
/
init.lua
File metadata and controls
49 lines (37 loc) · 977 Bytes
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
local f = string.format
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local S = minetest.get_translator(modname)
xocean = {
version = os.time({year = 2022, month = 11, day = 14}),
author = "starninjas",
license = "MIT",
custom_spawn = false,
modname = modname,
modpath = modpath,
S = S,
has = {
mobs = minetest.get_modpath("mobs") and mobs.mod == "redo",
},
log = function(level, message, ...)
message = message:format(...)
minetest.log(level, f("[%s] %s", modname, message))
end,
dofile = function(...)
dofile(table.concat({modpath, ...}, DIR_DELIM) .. ".lua")
end,
}
local input = io.open(modpath .. "/spawn.lua", "r")
if input then
xocean.custom_spawn = true
input:close()
input = nil
end
xocean.dofile("craftitems")
xocean.dofile("nodes", "init")
xocean.dofile("mobs", "init")
xocean.dofile("crafts")
xocean.dofile("mapgen")
if xocean.custom_spawn then
dofile(modpath .. "/spawn.lua")
end