mirror of
https://codeberg.org/tenplus1/mobs_animal.git
synced 2024-12-22 17:00:26 +01:00
tidy code
This commit is contained in:
parent
47b757abf5
commit
797ad49600
5
bee.lua
5
bee.lua
@ -1,6 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_animal
|
||||
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_animal")
|
||||
|
||||
-- Bee by KrupnoPavel (.b3d model by sirrobzeroone)
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_animal
|
||||
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_animal")
|
||||
|
||||
-- Bunny by ExeterDad
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_animal
|
||||
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_animal")
|
||||
|
||||
-- Chicken by JK Murray and Sirrobzeroone
|
||||
|
||||
|
5
cow.lua
5
cow.lua
@ -1,6 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_animal
|
||||
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_animal")
|
||||
|
||||
-- Cow by sirrobzeroone
|
||||
|
||||
|
19
init.lua
19
init.lua
@ -1,20 +1,7 @@
|
||||
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
||||
|
||||
-- Check for translation method
|
||||
local S
|
||||
if minetest.get_translator then
|
||||
S = minetest.get_translator("mobs_animal") -- 5.x translation function
|
||||
else -- boilerplate function
|
||||
S = function(str, ...)
|
||||
local args = {...}
|
||||
return str:gsub("@%d+", function(match)
|
||||
return args[tonumber(match:sub(2))]
|
||||
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")
|
||||
@ -62,4 +49,4 @@ if minetest.get_modpath("lucky_block") then
|
||||
end
|
||||
|
||||
|
||||
print ("[MOD] Mobs Redo Animals loaded")
|
||||
print ("[MOD] Mobs Animal loaded")
|
||||
|
@ -1,5 +1,6 @@
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_animal")
|
||||
|
||||
local S = mobs.intllib_animal
|
||||
local hairball = minetest.settings:get("mobs_hairball")
|
||||
|
||||
local kitten_types = {
|
||||
|
3
mod.conf
3
mod.conf
@ -1,4 +1,5 @@
|
||||
name = mobs_animal
|
||||
description = Add farm animals and a few extra into your world.
|
||||
depends = mobs
|
||||
optional_depends = default, lucky_block
|
||||
description = Adds farm animals.
|
||||
min_minetest_version = 5.0
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_animal
|
||||
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_animal")
|
||||
|
||||
-- Panda by AspireMint (CC BY-SA 3.0)
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_animal
|
||||
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_animal")
|
||||
|
||||
-- Penguin by D00Med
|
||||
|
||||
|
5
rat.lua
5
rat.lua
@ -1,6 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_animal
|
||||
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_animal")
|
||||
|
||||
-- Rat by KPavel and PilzAdam (B3D model by sirrobzeroone)
|
||||
|
||||
|
@ -1,4 +1,6 @@
|
||||
local S = mobs.intllib_animal
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_animal")
|
||||
|
||||
local random = math.random
|
||||
local all_colours = {
|
||||
{"black", S("Black"), "#212121b0"}, -- referenced down in mobs:spawn
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_animal
|
||||
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_animal")
|
||||
|
||||
-- Warthog originally by KrupnoPavel, B3D model by sirrobzeroone
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user