4c102a70a4
Most spawner functions can now be called without giving a plotmarker. Move scanning functions to places.lua. Places: Cleanup and add more area-scanning functions. Schedules: Bugfix where schedules weren't being executed due to wrong "end" order in the do_custom() function. Data: Moved random data to "data" folder. Textures: Add 14 male textures and 10 female textures. Occupations: Small tweaks to "default_basic" occupation.
46 lines
1.2 KiB
Lua
Executable File
46 lines
1.2 KiB
Lua
Executable File
-- Advanced NPC mod by Zorman2000
|
|
local path = minetest.get_modpath("advanced_npc")
|
|
|
|
-- 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
|
|
|
|
dofile(path .. "/npc.lua")
|
|
dofile(path .. "/utils.lua")
|
|
dofile(path .. "/spawner.lua")
|
|
dofile(path .. "/relationships.lua")
|
|
dofile(path .. "/dialogue.lua")
|
|
dofile(path .. "/trade/trade.lua")
|
|
dofile(path .. "/trade/prices.lua")
|
|
dofile(path .. "/actions/actions.lua")
|
|
dofile(path .. "/actions/places.lua")
|
|
dofile(path .. "/actions/pathfinder.lua")
|
|
dofile(path .. "/actions/node_registry.lua")
|
|
dofile(path .. "/occupations/occupations.lua")
|
|
-- Load random data definitions
|
|
dofile(path .. "/random_data.lua")
|
|
dofile(path .. "/data/dialogues_data.lua")
|
|
dofile(path .. "/data/gift_items_data.lua")
|
|
dofile(path .. "/data/names_data.lua")
|
|
dofile(path .. "/data/occupations_data.lua")
|
|
|
|
print (S("[Mod] Advanced NPC loaded"))
|