mirror of
https://codeberg.org/tenplus1/mobs_monster.git
synced 2024-11-13 22:30:20 +01:00
tidy code
This commit is contained in:
parent
0c4794c446
commit
2661e900e7
|
@ -1,5 +1,5 @@
|
||||||
|
-- Translation support
|
||||||
local S = mobs.intllib_monster
|
local S = minetest.get_translator("mobs_monster")
|
||||||
|
|
||||||
local dirt_types = {
|
local dirt_types = {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
-- Translation support
|
||||||
local S = mobs.intllib_monster
|
local S = minetest.get_translator("mobs_monster")
|
||||||
|
|
||||||
local master_types = {
|
local master_types = {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
-- Translation support
|
||||||
local S = mobs.intllib_monster
|
local S = minetest.get_translator("mobs_monster")
|
||||||
|
|
||||||
local mob_drops = {
|
local mob_drops = {
|
||||||
{name = "fireflies:firefly", chance = 1, min = 1, max = 1}
|
{name = "fireflies:firefly", chance = 1, min = 1, max = 1}
|
||||||
|
|
19
init.lua
19
init.lua
|
@ -2,21 +2,8 @@
|
||||||
-- Load support for intllib.
|
-- Load support for intllib.
|
||||||
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
||||||
|
|
||||||
-- Check for translation method
|
-- Translation support
|
||||||
local S
|
local S = minetest.get_translator("mobs_monster")
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
-- Check for custom mob spawn file
|
-- Check for custom mob spawn file
|
||||||
local input = io.open(path .. "spawn.lua", "r")
|
local input = io.open(path .. "spawn.lua", "r")
|
||||||
|
@ -65,4 +52,4 @@ if minetest.get_modpath("lucky_block") then
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
print ("[MOD] Mobs Redo Monsters loaded")
|
print ("[MOD] Mobs Monster loaded")
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
|
-- Translation support
|
||||||
local S = mobs.intllib_monster
|
local S = minetest.get_translator("mobs_monster")
|
||||||
|
|
||||||
|
|
||||||
local guard_types = {
|
local guard_types = {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
-- Translation support
|
||||||
local S = mobs.intllib_monster
|
local S = minetest.get_translator("mobs_monster")
|
||||||
|
|
||||||
-- Lava Flan by Zeg9 (additional textures by JurajVajda)
|
-- 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 = {
|
local mese_monster_types = {
|
||||||
|
|
||||||
|
|
3
mod.conf
3
mod.conf
|
@ -1,4 +1,5 @@
|
||||||
name = mobs_monster
|
name = mobs_monster
|
||||||
|
description = Add many different monsters into your world.
|
||||||
depends = mobs
|
depends = mobs
|
||||||
optional_depends = default, lucky_block, toolranks
|
optional_depends = default, lucky_block, toolranks
|
||||||
description = Adds many types of monsters.
|
min_minetest_version = 5.0
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
-- Translation support
|
||||||
local S = mobs.intllib_monster
|
local S = minetest.get_translator("mobs_monster")
|
||||||
|
|
||||||
-- Oerkki by PilzAdam
|
-- Oerkki by PilzAdam
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
-- Translation support
|
||||||
local S = mobs.intllib_monster
|
local S = minetest.get_translator("mobs_monster")
|
||||||
|
|
||||||
-- custom particle effects
|
-- custom particle effects
|
||||||
local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow)
|
local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
-- Translation support
|
||||||
local S = mobs.intllib_monster
|
local S = minetest.get_translator("mobs_monster")
|
||||||
|
|
||||||
local get_velocity = function(self)
|
local get_velocity = function(self)
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
-- Translation support
|
||||||
local S = mobs.intllib_monster
|
local S = minetest.get_translator("mobs_monster")
|
||||||
|
|
||||||
local stone_types = {
|
local stone_types = {
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
-- Translation support
|
||||||
local S = mobs.intllib_monster
|
local S = minetest.get_translator("mobs_monster")
|
||||||
|
|
||||||
local tree_types = {
|
local tree_types = {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user