Fix remaining luacheck warnings

This commit is contained in:
Hugues Ross 2020-06-10 20:10:15 -04:00
parent 9099390842
commit 412e214f88
3 changed files with 16 additions and 11 deletions

View File

@ -30,3 +30,8 @@ read_globals = {
} }
}, },
} }
files["init.lua"] = {
globals = {
"cartographer",
}
};

View File

@ -3,10 +3,6 @@ local mod_storage = minetest.get_mod_storage();
-- The path to this mod, for including files -- The path to this mod, for including files
local modpath = minetest.get_modpath("cartographer"); local modpath = minetest.get_modpath("cartographer");
-- The API object
cartographer = {
};
local map_data = { local map_data = {
generated = minetest.deserialize(mod_storage:get_string("map")) or {}, generated = minetest.deserialize(mod_storage:get_string("map")) or {},
@ -62,9 +58,12 @@ local map_item = loadfile(modpath .. "/items.lua") (chunk, marker_lookup, gui, s
loadfile(modpath .. "/commands.lua") (chunk, audio, map_formspec); loadfile(modpath .. "/commands.lua") (chunk, audio, map_formspec);
loadfile(modpath .. "/table.lua") (gui, skin, audio, maps, materials, map_item); loadfile(modpath .. "/table.lua") (gui, skin, audio, maps, materials, map_item);
cartographer.skin = skin; -- The API object
cartographer.biomes = biomes; cartographer = {
cartographer.markers = markers; skin = skin;
cartographer.maps = maps; biomes = biomes;
cartographer.map_item = map_item; markers = markers;
cartographer.materials = materials; maps = maps;
map_item = map_item;
materials = materials;
};

View File

@ -193,7 +193,8 @@ function map_formspec.from_map(map, x, y, height_mode)
w = formspec_width, w = formspec_width,
h = formspec_height, h = formspec_height,
generate_map(map.x, map.z, map.w, map.h, x, y, map.detail, map.scale, height_mode, map_is_filled, map_get_marker, map), generate_map(map.x, map.z, map.w, map.h,
x, y, map.detail, map.scale, height_mode, map_is_filled, map_get_marker, map),
}, formspec_width, formspec_height; }, formspec_width, formspec_height;
end end