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
|
||||
local S
|
||||
if minetest.get_translator then
|
||||
S = minetest.get_translator("nssm") -- 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
|
||||
-- translation and mod path
|
||||
|
||||
local S = minetest.get_translator("nssm")
|
||||
local path = minetest.get_modpath("nssm")
|
||||
|
||||
nssm = {
|
||||
mymapgenis = tonumber(minetest.settings:get("nssm.mymapgenis")) or 7,
|
||||
@ -21,8 +12,8 @@ nssm = {
|
||||
S = S
|
||||
}
|
||||
|
||||
|
||||
-- Mobs
|
||||
|
||||
dofile(path .. "/mobs/ant_queen.lua")
|
||||
dofile(path .. "/mobs/ant_soldier.lua")
|
||||
dofile(path .. "/mobs/ant_worker.lua")
|
||||
@ -74,11 +65,10 @@ dofile(path .. "/mobs/tarantula.lua")
|
||||
dofile(path .. "/mobs/uloboros.lua")
|
||||
dofile(path .. "/mobs/werewolf.lua")
|
||||
dofile(path .. "/mobs/white_werewolf.lua")
|
||||
|
||||
-- Final Boss
|
||||
dofile(path .. "/mobs/mese_dragon.lua")
|
||||
dofile(path .. "/mobs/mese_dragon.lua") -- Final Boss
|
||||
|
||||
-- Others
|
||||
|
||||
dofile(path .. "/darts.lua")
|
||||
dofile(path .. "/nssm_materials.lua")
|
||||
dofile(path .. "/nssm_spears.lua")
|
||||
@ -94,7 +84,7 @@ if minetest.get_modpath("3d_armor") then
|
||||
end
|
||||
|
||||
-- Spawn settings
|
||||
|
||||
dofile(path .. "/spawn.lua")
|
||||
|
||||
|
||||
print("[MOD] Mobs Redo Not So Simple Mobs loaded")
|
||||
|
@ -81,10 +81,8 @@ local function nssm_craftitem_eat(name, descr, gnam)
|
||||
description = S(descr),
|
||||
image = name .. ".png",
|
||||
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
|
||||
|
||||
nssm_craftitem_eat("werewolf_leg", "Werewolf Leg", 3)
|
||||
|
Loading…
Reference in New Issue
Block a user