1
0
mirror of https://codeberg.org/tenplus1/mobs_monster.git synced 2025-07-04 17:30:21 +02:00

tweak and tidy code

This commit is contained in:
tenplus1
2024-08-10 14:39:51 +01:00
parent ad470a4ad2
commit 5c956edfe3
13 changed files with 330 additions and 380 deletions

View File

@ -1,11 +1,10 @@
-- Load support for intllib.
-- transpation and get mod path
local S = minetest.get_translator("mobs_monster")
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
-- Translation support
local S = minetest.get_translator("mobs_monster")
-- Check for custom mob spawn file
local input = io.open(path .. "spawn.lua", "r")
if input then
@ -14,8 +13,8 @@ if input then
input = nil
end
-- helper function
local function ddoo(mob)
if minetest.settings:get_bool("mobs_monster." .. mob) == false then
@ -27,6 +26,7 @@ local function ddoo(mob)
end
-- Monsters
ddoo("dirt_monster") -- PilzAdam
ddoo("dungeon_master")
ddoo("oerkki")
@ -39,17 +39,16 @@ ddoo("spider") -- AspireMint
ddoo("land_guard")
ddoo("fire_spirit")
-- Load custom spawning if found
-- Load custom spawning
if mobs.custom_spawn_monster then
dofile(path .. "spawn.lua")
end
-- Lucky Blocks
if minetest.get_modpath("lucky_block") then
dofile(path .. "lucky_block.lua")
end
print ("[MOD] Mobs Monster loaded")