Browse Source

Fix remaining luacheck warnings

tags/1.0
Hugues Ross 2 months ago
parent
commit
412e214f88
3 changed files with 16 additions and 10 deletions
  1. +5
    -0
      .luacheckrc
  2. +9
    -9
      init.lua
  3. +2
    -1
      map_formspec.lua

+ 5
- 0
.luacheckrc View File

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

+ 9
- 9
init.lua 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");

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;
};

+ 2
- 1
map_formspec.lua 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



Loading…
Cancel
Save