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
local modpath = minetest.get_modpath("cartographer");
-- The API object
cartographer = {
};
local map_data = {
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 .. "/table.lua") (gui, skin, audio, maps, materials, map_item);
cartographer.skin = skin;
cartographer.biomes = biomes;
cartographer.markers = markers;
cartographer.maps = maps;
cartographer.map_item = map_item;
cartographer.materials = materials;
-- The API object
cartographer = {
skin = skin;
biomes = biomes;
markers = markers;
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,
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;
end