1
0
mirror of https://codeberg.org/tenplus1/mobs_animal.git synced 2025-07-27 04:24:35 +02:00

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
2023-11-22 23:53:18 +01:00
31 changed files with 113 additions and 2431 deletions

View File

@ -1,29 +1,7 @@
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
-- Check for translation method
local S
if minetest.get_translator ~= nil then
S = minetest.get_translator("mobs_animal") -- 5.x translation function
else
if minetest.get_modpath("intllib") then
dofile(minetest.get_modpath("intllib") .. "/init.lua")
if intllib.make_gettext_pair then
S = intllib.make_gettext_pair() -- new gettext method
else
S = intllib.Getter() -- old text file method
end
else -- boilerplate function
S = function(str, ...)
local args = {...}
return str:gsub("@%d+", function(match)
return args[tonumber(match:sub(2))]
end)
end
end
end
mobs.intllib_animal = S
-- Translation support
local S = minetest.get_translator("mobs_animal")
-- Check for custom mob spawn file
local input = io.open(path .. "spawn.lua", "r")
@ -35,17 +13,28 @@ if input then
end
-- helper function
local function ddoo(mob)
if minetest.settings:get_bool("mobs_animal." .. mob) == false then
print("[Mobs_Animal] " .. mob .. " disabled!")
return
end
dofile(path .. mob .. ".lua")
end
-- Animals
dofile(path .. "chicken.lua") -- JKmurray
dofile(path .. "cow.lua") -- KrupnoPavel
dofile(path .. "rat.lua") -- PilzAdam
dofile(path .. "sheep.lua") -- PilzAdam
dofile(path .. "warthog.lua") -- KrupnoPavel
dofile(path .. "bee.lua") -- KrupnoPavel
dofile(path .. "bunny.lua") -- ExeterDad
dofile(path .. "kitten.lua") -- Jordach/BFD
dofile(path .. "penguin.lua") -- D00Med
dofile(path .. "panda.lua") -- AspireMint
ddoo("chicken") -- JKmurray
ddoo("cow") -- KrupnoPavel
ddoo("rat") -- PilzAdam
ddoo("sheep") -- PilzAdam
ddoo("warthog") -- KrupnoPavel
ddoo("bee") -- KrupnoPavel
ddoo("bunny") -- ExeterDad
ddoo("kitten") -- Jordach/BFD
ddoo("penguin") -- D00Med
ddoo("panda") -- AspireMint
dofile(path .. "goat.lua") -- NALC(sys4 fork MFF)
@ -60,4 +49,4 @@ if minetest.get_modpath("lucky_block") then
end
print ("[MOD] Mobs Redo Animals loaded")
print ("[MOD] Mobs Animal loaded")