mirror of
https://codeberg.org/tenplus1/mobs_monster.git
synced 2024-12-22 08:50:27 +01:00
tidy code
This commit is contained in:
parent
0c4794c446
commit
2661e900e7
@ -1,5 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_monster
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_monster")
|
||||
|
||||
local dirt_types = {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_monster
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_monster")
|
||||
|
||||
local master_types = {
|
||||
|
||||
|
@ -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}
|
||||
|
19
init.lua
19
init.lua
@ -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")
|
||||
|
@ -1,6 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_monster
|
||||
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_monster")
|
||||
|
||||
local guard_types = {
|
||||
|
||||
|
@ -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)
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
local S = mobs.intllib_monster
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_monster")
|
||||
|
||||
local mese_monster_types = {
|
||||
|
||||
|
3
mod.conf
3
mod.conf
@ -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
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_monster
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_monster")
|
||||
|
||||
-- Oerkki by PilzAdam
|
||||
|
||||
|
@ -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)
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_monster
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_monster")
|
||||
|
||||
local get_velocity = function(self)
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_monster
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_monster")
|
||||
|
||||
local stone_types = {
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
local S = mobs.intllib_monster
|
||||
-- Translation support
|
||||
local S = minetest.get_translator("mobs_monster")
|
||||
|
||||
local tree_types = {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user