Make skin_api return a simple table and assign in init.lua

This commit is contained in:
Hugues Ross 2020-06-01 18:00:02 -04:00
parent 7c667b04e7
commit a9aa8d1891
2 changed files with 5 additions and 5 deletions

View File

@ -1,5 +1,8 @@
local mod_storage = minetest.get_mod_storage();
-- The path to this mod, for including files
local modpath = minetest.get_modpath("cartographer");
-- The API object
cartographer = {
scan_queue = {},
@ -46,11 +49,8 @@ function fromchunk(coord)
return math.floor(coord * _cartographer.CHUNK_SIZE);
end
-- The path to this mod, for including files
local modpath = minetest.get_modpath("cartographer");
-- Includes
loadfile(modpath .. "/skin_api.lua") ();
cartographer.skin = loadfile(modpath .. "/skin_api.lua") ();
loadfile(modpath .. "/scanner.lua") (map_data);
loadfile(modpath .. "/map_api.lua") ();
loadfile(modpath .. "/items.lua") ();

View File

@ -1,5 +1,5 @@
-- Table used for skinning cartographer's look and feel
cartographer.skin = {
return {
-- The textures to use in maps for the sides of tiles
cliff_textures = {
"cartographer_simple_cliff",