cartographer/init.lua
2020-06-13 08:50:36 -04:00

37 lines
1.8 KiB
Lua

-- The path to this mod, for including files
local modpath = minetest.get_modpath("cartographer");
-- Includes
local map_data = loadfile(modpath .. "/storage.lua") ();
local chunk = loadfile(modpath .. "/chunk_api.lua") ();
local gui = loadfile(modpath .. "/formspec.lua") ();
local skin = loadfile(modpath .. "/skin_api.lua") ();
local util = loadfile(modpath .. "/util.lua") ();
local audio = loadfile(modpath .. "/audio.lua") ();
local biomes = loadfile(modpath .. "/biome_api.lua") (util);
local markers = loadfile(modpath .. "/marker_api.lua") ();
local scanner = loadfile(modpath .. "/scanner.lua") (map_data, chunk);
local maps = loadfile(modpath .. "/map_api.lua") (map_data, chunk);
local materials = loadfile(modpath .. "/material_api.lua") ();
local map_formspec = loadfile(modpath .. "/map_formspec.lua") (map_data, gui, skin, util, biomes, markers);
local map_item = loadfile(modpath .. "/items.lua") (chunk, gui, skin, audio, maps, markers, map_formspec);
loadfile(modpath .. "/commands.lua") (chunk, audio, map_formspec);
loadfile(modpath .. "/table.lua") (gui, skin, audio, maps, materials, map_item);
loadfile(modpath .. "/autofill.lua") (chunk, scanner, maps);
-- The API object
cartographer = {
-- skin_api.lua: Allows the visual customization of formspecs
skin = skin;
-- biome_api.lua: Allows biome data to be registered for display in maps
biomes = biomes;
-- marker_api.lua: Allows markers to be registered for placement on maps
markers = markers;
-- map_api.lua: Allows the creation, lookup, and management of map objects
maps = maps;
-- items.lua: Allows the creation of map items with proper metadata
map_item = map_item;
-- materials.lua: Allows items to be registered as mapmaking materials
materials = materials;
};