2016-11-12 13:06:09 +01:00
|
|
|
|
2016-11-14 12:28:37 +01:00
|
|
|
local path = minetest.get_modpath("advanced_npc")
|
2016-11-12 13:06:09 +01:00
|
|
|
|
|
|
|
-- Intllib
|
|
|
|
local S
|
|
|
|
if minetest.get_modpath("intllib") then
|
|
|
|
S = intllib.Getter()
|
|
|
|
else
|
|
|
|
S = function(s, a, ...)
|
|
|
|
if a == nil then
|
|
|
|
return s
|
|
|
|
end
|
|
|
|
a = {a, ...}
|
|
|
|
return s:gsub("(@?)@(%(?)(%d+)(%)?)",
|
|
|
|
function(e, o, n, c)
|
|
|
|
if e == ""then
|
|
|
|
return a[tonumber(n)] .. (o == "" and c or "")
|
|
|
|
else
|
|
|
|
return "@" .. o .. n .. c
|
|
|
|
end
|
|
|
|
end)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
mobs.intllib = S
|
|
|
|
|
|
|
|
-- NPC
|
2016-11-29 10:27:07 +01:00
|
|
|
dofile(path .. "/npc.lua")
|
2016-12-12 02:52:57 +01:00
|
|
|
dofile(path .. "/relationships.lua")
|
2016-12-01 20:37:00 +01:00
|
|
|
dofile(path .. "/dialogue.lua")
|
2016-12-01 20:01:47 +01:00
|
|
|
dofile(path .. "/random_data.lua")
|
2016-12-12 02:52:57 +01:00
|
|
|
dofile(path .. "/trade/trade.lua")
|
|
|
|
dofile(path .. "/trade/prices.lua")
|
2016-11-12 13:06:09 +01:00
|
|
|
|
2016-11-14 12:28:37 +01:00
|
|
|
print (S("[MOD] Advanced NPC loaded"))
|