Skip to content
Snippets Groups Projects
Commit cf14a1dc authored by DarkGod's avatar DarkGod
Browse files

plop

parent e6c039fb
No related branches found
No related tags found
No related merge requests found
......@@ -272,7 +272,7 @@ end
function _M:checkConnectivity(dst, src, type, subtype)
local data = {}
if type(src) == "string" then data.check_connectivity = src
if _G.type(src) == "string" then data.check_connectivity = src
else data.check_connectivity = {x=src.x-1, y=src.y-1} end
self:addSpot(dst, type or "static", subtype or "static", data)
end
......
......@@ -1044,7 +1044,7 @@ function _M:merge(x, y, tm, char_order, empty_char)
x = math.floor(x)
y = math.floor(y)
char_order = table.reverse(char_order or {})
if type(char_order) ~= "function" then char_order = table.reverse(char_order or {}) end
empty_char = empty_char or {' '}
if type(empty_char) == "string" then empty_char = {empty_char} end
......@@ -1059,11 +1059,17 @@ function _M:merge(x, y, tm, char_order, empty_char)
local c = tm.data[j][i]
if not empty_char[c] then
local sc = self.data[sj][si]
local sc_o = char_order[sc] or 0
local c_o = char_order[c] or 0
if type(char_order) == "table" then
local sc_o = char_order[sc] or 0
local c_o = char_order[c] or 0
if c_o >= sc_o then
self.data[sj][si] = tm.data[j][i]
if c_o >= sc_o then
self.data[sj][si] = tm.data[j][i]
end
else
if char_order(si, sj, sc, c) then
self.data[sj][si] = tm.data[j][i]
end
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment