spawners/spawners_mobs/init.lua

54 lines
1.8 KiB
Lua
Raw Permalink Normal View History

2023-04-24 17:56:28 +03:00
--[[
Let the player craft Mob Spawners. Mobs are spawning randomly in a short intervals, giving the option of creating mob farms and grinders.
Copyright (C) 2016 - 2023 SaKeL <juraj.vajda@gmail.com>
2016-10-08 21:54:26 +03:00
2023-04-24 17:56:28 +03:00
This library is free software; you can redistribute it and/or
modify it pos the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to juraj.vajda@gmail.com
--]]
local mod_start_time = minetest.get_us_time()
local path = minetest.get_modpath('spawners_mobs')
2016-10-08 21:54:26 +03:00
-- API
2023-04-24 17:56:28 +03:00
dofile(path .. '/api.lua')
2023-04-25 07:34:49 +03:00
-- custom mobs
2023-04-24 17:56:28 +03:00
if minetest.get_modpath('mobs') then
2023-04-25 07:34:49 +03:00
dofile(path .. '/nodes.lua')
2023-04-24 17:56:28 +03:00
dofile(path .. '/mob_mummy.lua')
dofile(path .. '/mob_bunny_evil.lua')
dofile(path .. '/mob_uruk_hai.lua')
dofile(path .. '/mob_balrog.lua')
2023-04-25 07:34:49 +03:00
end
-- Register spawners
if minetest.get_modpath('animalia') then
dofile(path .. '/mod_support_animalia.lua')
end
if minetest.get_modpath('mobs') then
dofile(path .. '/mod_support_spawners_mobs.lua')
end
if minetest.get_modpath('mobs_animal') then
dofile(path .. '/mod_support_mobs_animal.lua')
end
if minetest.get_modpath('mobs_monster') then
dofile(path .. '/mod_support_mobs_monster.lua')
2016-10-08 21:54:26 +03:00
end
2023-04-24 17:56:28 +03:00
local mod_end_time = (minetest.get_us_time() - mod_start_time) / 1000000
2023-04-24 18:55:32 +03:00
print('[Mod] Spawners Mobs Loaded. [' .. mod_end_time .. 's]')