Cleanup
This commit is contained in:
parent
4db155bd9b
commit
da35fb58ac
16
init.lua
16
init.lua
@ -27,25 +27,23 @@ sneeker.log = function(lvl, msg)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
sneeker.log("debug", "Debugging is on")
|
||||||
|
|
||||||
if core.settings:get_bool("log_mods", false) then
|
if core.settings:get_bool("log_mods", false) then
|
||||||
core.log("action", "Loading mod \"" .. sneeker.modname .. "\" ...")
|
core.log("action", "Loading mod \"" .. sneeker.modname .. "\" ...")
|
||||||
end
|
end
|
||||||
|
|
||||||
dofile(sneeker.modpath .. "/functions.lua")
|
sneeker.mob_name = "sneeker:sneeker"
|
||||||
|
local old_spawnegg_name = "sneeker:spawnegg"
|
||||||
sneeker.log("debug", "Debugging is on")
|
|
||||||
|
|
||||||
sneeker.mob_name = sneeker.modname .. ":" .. sneeker.modname
|
|
||||||
sneeker.spawnegg_name = sneeker.modname .. ":spawnegg"
|
|
||||||
|
|
||||||
local scripts = {
|
local scripts = {
|
||||||
|
"functions",
|
||||||
"tnt_function",
|
"tnt_function",
|
||||||
"spawn",
|
"spawn",
|
||||||
}
|
}
|
||||||
|
|
||||||
for I in pairs(scripts) do
|
for _, script in ipairs(scripts) do
|
||||||
dofile(sneeker.modpath .. "/" .. scripts[I] .. ".lua")
|
dofile(sneeker.modpath .. "/" .. script .. ".lua")
|
||||||
end
|
end
|
||||||
|
|
||||||
local function jump(self,pos,direction)
|
local function jump(self,pos,direction)
|
||||||
@ -389,7 +387,7 @@ if core.global_exists("asm") then
|
|||||||
spawn = "sneeker:sneeker",
|
spawn = "sneeker:sneeker",
|
||||||
})
|
})
|
||||||
|
|
||||||
core.register_alias(sneeker.spawnegg_name, "spawneggs:sneeker")
|
core.register_alias(old_spawnegg_name, "spawneggs:sneeker")
|
||||||
|
|
||||||
if core.registered_items["tnt:tnt"] then
|
if core.registered_items["tnt:tnt"] then
|
||||||
asm.addEggRecipe("sneeker", "tnt:tnt")
|
asm.addEggRecipe("sneeker", "tnt:tnt")
|
||||||
|
Loading…
Reference in New Issue
Block a user