Mudlet/Mudlet

highlight() is drawn below some rooms.

Opened this issue · 1 comments

Brief summary of issue / Description of requested feature:

When calling highlightRoom() with a radius larger than 1 sometimes the highlight circle is drawn under rooms.

Peek 2024-04-14 16-37

Steps to reproduce the issue / Reasons for adding feature:

Code for testing.

function highlightTest()
  local vnum = 45
  for i = 1, 10 do
    tempTimer(i, function()
      highlightRoom(vnum, 100,100,100,100,100,100,i,255,255)
      updateMap()
      end)
  end
  tempTimer(11, function() unHighlightRoom(vnum) end)
  
end

Error output / Expected result of feature

Highlight radius would be drawn above all rooms.

Extra information, such as the Mudlet version, operating system and ideas for how to solve / implement:

Latest dev.

That will be because the order of drawing the rooms is not predictable and the highlighting is done for each room as it is painted - to fix that would require another iteration through the rooms - or some other thing - like making a note of which rooms are highlighted and then doing just that bit of the "painting" after all the rooms themselves have been painted. Since #7189 is open anything to do with this issue should either be incorporated into that - or deferred until that has been merged, IMHO.