code tidy
This commit is contained in:
parent
db704cec54
commit
c3fa75daca
26
init.lua
26
init.lua
@ -1,17 +1,8 @@
|
|||||||
local path = minetest.get_modpath("nssm")
|
|
||||||
|
|
||||||
-- translation
|
-- translation and mod path
|
||||||
local S
|
|
||||||
if minetest.get_translator then
|
local S = minetest.get_translator("nssm")
|
||||||
S = minetest.get_translator("nssm") -- 5.x translation function
|
local path = minetest.get_modpath("nssm")
|
||||||
else -- boilerplate function
|
|
||||||
S = function(str, ...)
|
|
||||||
local args = {...}
|
|
||||||
return str:gsub("@%d+", function(match)
|
|
||||||
return args[tonumber(match:sub(2))]
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
nssm = {
|
nssm = {
|
||||||
mymapgenis = tonumber(minetest.settings:get("nssm.mymapgenis")) or 7,
|
mymapgenis = tonumber(minetest.settings:get("nssm.mymapgenis")) or 7,
|
||||||
@ -21,8 +12,8 @@ nssm = {
|
|||||||
S = S
|
S = S
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
-- Mobs
|
-- Mobs
|
||||||
|
|
||||||
dofile(path .. "/mobs/ant_queen.lua")
|
dofile(path .. "/mobs/ant_queen.lua")
|
||||||
dofile(path .. "/mobs/ant_soldier.lua")
|
dofile(path .. "/mobs/ant_soldier.lua")
|
||||||
dofile(path .. "/mobs/ant_worker.lua")
|
dofile(path .. "/mobs/ant_worker.lua")
|
||||||
@ -74,11 +65,10 @@ dofile(path .. "/mobs/tarantula.lua")
|
|||||||
dofile(path .. "/mobs/uloboros.lua")
|
dofile(path .. "/mobs/uloboros.lua")
|
||||||
dofile(path .. "/mobs/werewolf.lua")
|
dofile(path .. "/mobs/werewolf.lua")
|
||||||
dofile(path .. "/mobs/white_werewolf.lua")
|
dofile(path .. "/mobs/white_werewolf.lua")
|
||||||
|
dofile(path .. "/mobs/mese_dragon.lua") -- Final Boss
|
||||||
-- Final Boss
|
|
||||||
dofile(path .. "/mobs/mese_dragon.lua")
|
|
||||||
|
|
||||||
-- Others
|
-- Others
|
||||||
|
|
||||||
dofile(path .. "/darts.lua")
|
dofile(path .. "/darts.lua")
|
||||||
dofile(path .. "/nssm_materials.lua")
|
dofile(path .. "/nssm_materials.lua")
|
||||||
dofile(path .. "/nssm_spears.lua")
|
dofile(path .. "/nssm_spears.lua")
|
||||||
@ -94,7 +84,7 @@ if minetest.get_modpath("3d_armor") then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- Spawn settings
|
-- Spawn settings
|
||||||
|
|
||||||
dofile(path .. "/spawn.lua")
|
dofile(path .. "/spawn.lua")
|
||||||
|
|
||||||
|
|
||||||
print("[MOD] Mobs Redo Not So Simple Mobs loaded")
|
print("[MOD] Mobs Redo Not So Simple Mobs loaded")
|
||||||
|
@ -81,10 +81,8 @@ local function nssm_craftitem_eat(name, descr, gnam)
|
|||||||
description = S(descr),
|
description = S(descr),
|
||||||
image = name .. ".png",
|
image = name .. ".png",
|
||||||
on_use = minetest.item_eat(gnam),
|
on_use = minetest.item_eat(gnam),
|
||||||
groups = {food_meat = 1, meat = 1}
|
groups = {food_meat = 1, meat = 1, eatable = gnam, flammable = 2}
|
||||||
})
|
})
|
||||||
|
|
||||||
mobs.add_eatable("nssm:" .. name, gnam)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
nssm_craftitem_eat("werewolf_leg", "Werewolf Leg", 3)
|
nssm_craftitem_eat("werewolf_leg", "Werewolf Leg", 3)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user