2020-06-02 00:00:02 +02:00
|
|
|
-- The path to this mod, for including files
|
|
|
|
local modpath = minetest.get_modpath("cartographer");
|
|
|
|
|
2020-02-16 18:55:07 +01:00
|
|
|
-- Includes
|
2020-06-13 14:04:54 +02:00
|
|
|
local map_data = loadfile(modpath .. "/storage.lua") ();
|
2020-06-13 13:50:34 +02:00
|
|
|
local chunk = loadfile(modpath .. "/chunk_api.lua") ();
|
2020-06-09 00:34:57 +02:00
|
|
|
local gui = loadfile(modpath .. "/formspec.lua") ();
|
2020-06-13 14:50:36 +02:00
|
|
|
local skin = loadfile(modpath .. "/skin_api.lua") ();
|
2020-06-11 01:54:28 +02:00
|
|
|
local util = loadfile(modpath .. "/util.lua") ();
|
2020-06-13 14:50:36 +02:00
|
|
|
local audio = loadfile(modpath .. "/audio.lua") ();
|
2020-06-11 01:54:28 +02:00
|
|
|
local biomes = loadfile(modpath .. "/biome_api.lua") (util);
|
2020-06-13 14:50:36 +02:00
|
|
|
local markers = loadfile(modpath .. "/marker_api.lua") ();
|
2020-06-09 02:08:24 +02:00
|
|
|
local scanner = loadfile(modpath .. "/scanner.lua") (map_data, chunk);
|
2020-06-11 02:54:00 +02:00
|
|
|
local maps = loadfile(modpath .. "/map_api.lua") (map_data, chunk);
|
2020-06-11 02:01:58 +02:00
|
|
|
local materials = loadfile(modpath .. "/material_api.lua") ();
|
2020-06-11 01:54:28 +02:00
|
|
|
local map_formspec = loadfile(modpath .. "/map_formspec.lua") (map_data, gui, skin, util, biomes, markers);
|
2020-06-13 14:01:56 +02:00
|
|
|
local map_item = loadfile(modpath .. "/items.lua") (chunk, gui, skin, audio, maps, markers, map_formspec);
|
2020-06-10 13:02:46 +02:00
|
|
|
loadfile(modpath .. "/commands.lua") (chunk, audio, map_formspec);
|
2020-06-11 02:01:58 +02:00
|
|
|
loadfile(modpath .. "/table.lua") (gui, skin, audio, maps, materials, map_item);
|
2020-06-11 02:54:00 +02:00
|
|
|
loadfile(modpath .. "/autofill.lua") (chunk, scanner, maps);
|
2020-06-09 02:05:51 +02:00
|
|
|
|
2020-06-11 02:10:15 +02:00
|
|
|
-- The API object
|
|
|
|
cartographer = {
|
2020-06-13 13:50:34 +02:00
|
|
|
-- skin_api.lua: Allows the visual customization of formspecs
|
2020-06-11 02:10:15 +02:00
|
|
|
skin = skin;
|
2020-06-13 13:50:34 +02:00
|
|
|
-- biome_api.lua: Allows biome data to be registered for display in maps
|
2020-06-11 02:10:15 +02:00
|
|
|
biomes = biomes;
|
2020-06-13 13:50:34 +02:00
|
|
|
-- marker_api.lua: Allows markers to be registered for placement on maps
|
2020-06-11 02:10:15 +02:00
|
|
|
markers = markers;
|
2020-06-13 13:50:34 +02:00
|
|
|
-- map_api.lua: Allows the creation, lookup, and management of map objects
|
2020-06-11 02:10:15 +02:00
|
|
|
maps = maps;
|
2020-06-13 13:50:34 +02:00
|
|
|
-- items.lua: Allows the creation of map items with proper metadata
|
2020-06-11 02:10:15 +02:00
|
|
|
map_item = map_item;
|
2020-06-13 13:50:34 +02:00
|
|
|
-- materials.lua: Allows items to be registered as mapmaking materials
|
2020-06-11 02:10:15 +02:00
|
|
|
materials = materials;
|
|
|
|
};
|