init.lua 613 B

12345678910111213141516171819202122232425262728293031323334
  1. local path = minetest.get_modpath("mobs_npc")
  2. -- Intllib
  3. local S
  4. if minetest.get_modpath("intllib") then
  5. S = intllib.Getter()
  6. else
  7. S = function(s, a, ...)
  8. if a == nil then
  9. return s
  10. end
  11. a = {a, ...}
  12. return s:gsub("(@?)@(%(?)(%d+)(%)?)",
  13. function(e, o, n, c)
  14. if e == ""then
  15. return a[tonumber(n)] .. (o == "" and c or "")
  16. else
  17. return "@" .. o .. n .. c
  18. end
  19. end)
  20. end
  21. end
  22. mobs.intllib = S
  23. -- NPC
  24. dofile(path .. "/npc.lua") -- TenPlus1
  25. dofile(path .. "/trader.lua")
  26. dofile(path .. "/igor.lua")
  27. dofile(path .. "/lucky_block.lua")
  28. print (S("[MOD] Mobs Redo 'NPCs' loaded"))