1
0
mirror of https://codeberg.org/tenplus1/mobs_monster.git synced 2024-11-12 13:50:20 +01:00

tidy code

This commit is contained in:
tenplus1 2023-08-13 11:02:47 +01:00
parent 0c4794c446
commit 2661e900e7
13 changed files with 27 additions and 39 deletions

View File

@ -1,5 +1,5 @@
local S = mobs.intllib_monster
-- Translation support
local S = minetest.get_translator("mobs_monster")
local dirt_types = {

View File

@ -1,5 +1,5 @@
local S = mobs.intllib_monster
-- Translation support
local S = minetest.get_translator("mobs_monster")
local master_types = {

View File

@ -1,5 +1,5 @@
local S = mobs.intllib_monster
-- Translation support
local S = minetest.get_translator("mobs_monster")
local mob_drops = {
{name = "fireflies:firefly", chance = 1, min = 1, max = 1}

View File

@ -2,21 +2,8 @@
-- Load support for intllib.
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_monster") -- 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_monster = S
-- Translation support
local S = minetest.get_translator("mobs_monster")
-- Check for custom mob spawn file
local input = io.open(path .. "spawn.lua", "r")
@ -65,4 +52,4 @@ if minetest.get_modpath("lucky_block") then
end
print ("[MOD] Mobs Redo Monsters loaded")
print ("[MOD] Mobs Monster loaded")

View File

@ -1,6 +1,5 @@
local S = mobs.intllib_monster
-- Translation support
local S = minetest.get_translator("mobs_monster")
local guard_types = {

View File

@ -1,5 +1,5 @@
local S = mobs.intllib_monster
-- Translation support
local S = minetest.get_translator("mobs_monster")
-- Lava Flan by Zeg9 (additional textures by JurajVajda)

View File

@ -1,4 +1,5 @@
local S = mobs.intllib_monster
-- Translation support
local S = minetest.get_translator("mobs_monster")
local mese_monster_types = {

View File

@ -1,4 +1,5 @@
name = mobs_monster
description = Add many different monsters into your world.
depends = mobs
optional_depends = default, lucky_block, toolranks
description = Adds many types of monsters.
min_minetest_version = 5.0

View File

@ -1,5 +1,5 @@
local S = mobs.intllib_monster
-- Translation support
local S = minetest.get_translator("mobs_monster")
-- Oerkki by PilzAdam

View File

@ -1,5 +1,5 @@
local S = mobs.intllib_monster
-- Translation support
local S = minetest.get_translator("mobs_monster")
-- custom particle effects
local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow)

View File

@ -1,5 +1,5 @@
local S = mobs.intllib_monster
-- Translation support
local S = minetest.get_translator("mobs_monster")
local get_velocity = function(self)

View File

@ -1,5 +1,5 @@
local S = mobs.intllib_monster
-- Translation support
local S = minetest.get_translator("mobs_monster")
local stone_types = {

View File

@ -1,5 +1,5 @@
local S = mobs.intllib_monster
-- Translation support
local S = minetest.get_translator("mobs_monster")
local tree_types = {