Commit 4713576d75de8e93be4463dcecb73d00e1305972

Authored by DarkGod
1 parent d2a24e0d

Fixed wooden baricades to correctly show even when they are one tile long (fix for Embers of Rage)

... ... @@ -1561,6 +1561,8 @@ wooden_barricade = { method="road", marker="barricade",
1561 1561 default6={add_mos={{image="terrain/wooden_barricade/barricade_end_a_01.png"}}, min=1, max=1},
1562 1562 default2={add_mos={{image="terrain/wooden_barricade/barricade_end_a_03.png"}}, min=1, max=1},
1563 1563 default8={add_mos={{image="terrain/wooden_barricade/barricade_end_a_04.png"}}, min=1, max=1},
  1564 +
  1565 + pillar={add_mos={{image="terrain/wooden_barricade/barricade_pillar.png"}}, min=1, max=1},
1564 1566 },
1565 1567 }
1566 1568 _M.generic_roads_defs = defs
... ... @@ -1581,7 +1583,8 @@ function _M:editTileGenericRoad(level, i, j, g, nt, type)
1581 1583 local id = "genroad:"..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)}, ",")
1582 1584
1583 1585 -- Cross & semi cross
1584   - if g5 == g8 and g5 == g2 and g5 == g4 and g5 == g6 then self:edit(i, j, id, nt["default8246"])
  1586 + if g5 ~= g8 and g5 ~= g2 and g5 ~= g4 and g5 ~= g6 and nt["pillar"] then self:edit(i, j, id, nt["pillar"])
  1587 + elseif g5 == g8 and g5 == g2 and g5 == g4 and g5 == g6 then self:edit(i, j, id, nt["default8246"])
1585 1588 elseif g5 ~= g8 and g5 == g2 and g5 == g4 and g5 == g6 then self:edit(i, j, id, nt["default246"])
1586 1589 elseif g5 == g8 and g5 ~= g2 and g5 == g4 and g5 == g6 then self:edit(i, j, id, nt["default846"])
1587 1590 elseif g5 == g8 and g5 == g2 and g5 ~= g4 and g5 == g6 then self:edit(i, j, id, nt["default826"])
... ...