mirror of
https://github.com/minetest-mods/MoreMesecons.git
synced 2025-06-30 23:40:31 +02:00
Various code fixes detected by luacheck
* Luablock: Fix the missing position argument when executing the lua code fails * Wireless: Fix the missing id argument * Localize several variables * Some other small changes, e.g. dead code removal
This commit is contained in:
committed by
Pierre-Adrien Langrognet
parent
28292dc2a5
commit
c41d0371c0
@ -243,12 +243,11 @@ MapDataStorage.__index = {
|
||||
indices[i] = ("%.17g"):format(vi)
|
||||
values[i] = v
|
||||
end
|
||||
result = {
|
||||
return minetest.serialize({
|
||||
version = "MapDataStorage_v1",
|
||||
indices = "return {" .. table.concat(indices, ",") .. "}",
|
||||
values = minetest.serialize(values),
|
||||
}
|
||||
return minetest.serialize(result)
|
||||
})
|
||||
end,
|
||||
}
|
||||
MapDataStorage.deserialize = function(txtdata)
|
||||
@ -317,6 +316,7 @@ end
|
||||
|
||||
|
||||
|
||||
--[[
|
||||
-- This testing code shows an example usage of the MapDataStorage code
|
||||
local function do_test()
|
||||
print("Test if iter returns correct positions when a lot is set")
|
||||
@ -377,5 +377,5 @@ local function do_test()
|
||||
|
||||
--~ data:iterAll()
|
||||
end
|
||||
--~ do_test()
|
||||
|
||||
do_test()
|
||||
--]]
|
||||
|
Reference in New Issue
Block a user