2016-12-18 18:32:39 +01:00
|
|
|
-- Advanced NPC mod by Zorman2000
|
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
|
|
|
|
|
2016-11-29 10:27:07 +01:00
|
|
|
dofile(path .. "/npc.lua")
|
2017-07-14 01:01:28 +02:00
|
|
|
dofile(path .. "/utils.lua")
|
2017-03-27 17:08:18 +02:00
|
|
|
dofile(path .. "/spawner.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-12 02:52:57 +01:00
|
|
|
dofile(path .. "/trade/trade.lua")
|
|
|
|
dofile(path .. "/trade/prices.lua")
|
2016-12-18 18:32:39 +01:00
|
|
|
dofile(path .. "/actions/actions.lua")
|
|
|
|
dofile(path .. "/actions/places.lua")
|
2017-01-06 13:57:42 +01:00
|
|
|
dofile(path .. "/actions/pathfinder.lua")
|
2017-01-09 17:34:38 +01:00
|
|
|
dofile(path .. "/actions/node_registry.lua")
|
2017-08-11 18:03:45 +02:00
|
|
|
dofile(path .. "/occupations/occupations.lua")
|
2017-07-14 01:01:28 +02:00
|
|
|
-- Load random data definitions
|
2017-03-18 15:32:37 +01:00
|
|
|
dofile(path .. "/random_data.lua")
|
2017-08-25 15:31:45 +02:00
|
|
|
dofile(path .. "/data/dialogues_data.lua")
|
|
|
|
dofile(path .. "/data/gift_items_data.lua")
|
|
|
|
dofile(path .. "/data/names_data.lua")
|
2017-09-08 14:31:19 +02:00
|
|
|
dofile(path .. "/data/occupations/default.lua")
|
|
|
|
dofile(path .. "/data/occupations/default_farmer.lua")
|
|
|
|
dofile(path .. "/data/occupations/default_priest.lua")
|
2017-09-09 18:21:31 +02:00
|
|
|
dofile(path .. "/data/occupations/default_miner.lua")
|
2016-11-12 13:06:09 +01:00
|
|
|
|
2016-12-18 18:32:39 +01:00
|
|
|
print (S("[Mod] Advanced NPC loaded"))
|