Commit ef0a8903a83e45f51beaad39330ad1016c98d4c4

Authored by DarkGod
1 parent f3cec063

to the sky

... ... @@ -1344,10 +1344,17 @@ function _M:editTileGenericBorders(level, i, j, g, nt, type)
1344 1344 local id = rng.range(1,NB_VARIATIONS).."genbord:"..table.concat({g.define_as or "--",type,tostring(g1==g5),tostring(g2==g5),tostring(g3==g5),tostring(g4==g5),tostring(g5==g5),tostring(g6==g5),tostring(g7==g5),tostring(g8==g5),tostring(g9==g5)}, ",")
1345 1345
1346 1346 -- Sides
1347   - if g5 ~= g8 then self:edit(i, j, id, nt[g8.."8"] or nt["default8"]) end
1348   - if g5 ~= g2 then self:edit(i, j, id, nt[g2.."2"] or nt["default2"]) end
1349   - if g5 ~= g4 then self:edit(i, j, id, nt[g4.."4"] or nt["default4"]) end
1350   - if g5 ~= g6 then self:edit(i, j, id, nt[g6.."6"] or nt["default6"]) end
  1347 + if nt.no_overlap_sides then
  1348 + if g5 ~= g8 and g5 ~= g7 and g5 ~= g9 then self:edit(i, j, id, nt[g8.."8"] or nt["default8"]) end
  1349 + if g5 ~= g2 and g5 ~= g1 and g5 ~= g3 then self:edit(i, j, id, nt[g2.."2"] or nt["default2"]) end
  1350 + if g5 ~= g4 and g5 ~= g7 and g5 ~= g1 then self:edit(i, j, id, nt[g4.."4"] or nt["default4"]) end
  1351 + if g5 ~= g6 and g5 ~= g9 and g5 ~= g3 then self:edit(i, j, id, nt[g6.."6"] or nt["default6"]) end
  1352 + else
  1353 + if g5 ~= g8 then self:edit(i, j, id, nt[g8.."8"] or nt["default8"]) end
  1354 + if g5 ~= g2 then self:edit(i, j, id, nt[g2.."2"] or nt["default2"]) end
  1355 + if g5 ~= g4 then self:edit(i, j, id, nt[g4.."4"] or nt["default4"]) end
  1356 + if g5 ~= g6 then self:edit(i, j, id, nt[g6.."6"] or nt["default6"]) end
  1357 + end
1351 1358 -- Corners
1352 1359 if g5 ~= g7 and g5 == g4 and g5 == g8 then self:edit(i, j, id, nt[g7.."7"] or nt["default7"]) end
1353 1360 if g5 ~= g9 and g5 == g6 and g5 == g8 then self:edit(i, j, id, nt[g9.."9"] or nt["default9"]) end
... ...