ID:2336372
 
Not a bug
BYOND Version:512.1402
Operating System:Windows 10 Pro
Web Browser:Chrome 63.0.3239.132
Applies to:Dream Seeker
Status: Not a bug

This is not a bug. It may be an incorrect use of syntax or a limitation in the software. For further discussion on the matter, please consult the BYOND forums.
Descriptive Problem Summary:
Using \icon inside Maptext = "",results all text to not be displayed only the icon itself.

Code Snippet (if applicable) to Reproduce Problem:
obj
PlayerMoney
icon = 'PlayerMoney.dmi'
icon_state = "Background"
maptext_width = 442
maptext_height = 64
var/CurrencyIcon = 'CurrencyIcon.dmi' //16x16 icon
New()
..()
//Test 1
maptext = "\icon[CurrencyIcon]: 9999" //This only displays the icon, and text is ignored.

//Test 2
maptext = "<BR>\icon[CurrencyIcon]<BR>: 9999" // Displays the Icon above and text below, but ofcourse its not the result we want. Just to demonstrate you can have icon and text working.


Expected Results:
When using maptext = "\icon[CurrencyIcon]: 9999" the expected result should be Icon: 9999 displayed on screen
Actual Results:
When using maptext = "\icon[CurrencyIcon]: 9999" the actual result is Icon displayed on screen
Does the problem occur:
Every time? Or how often?
every time

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Tested on 512.1395 and Stable, both resulted in same issue.
Workarounds:
No workarounds

Do you have a test case for this? I tried to put something together but the only time I had a problem was when I didn't define the vertical alignment for the image.

If you use <img src=\ref[CurrencyIcon] align=middle> instead of the \icon macro, it's possible you'll find there's no issue at all. But if the problem goes deeper than that, a simple test case would help a lot.
Lummox JR changed status to 'Unverified'
Using "img src=\ref[CurrencyIcon] align=middle>" doesn't give the desierd output, it always ends up not being aligned with the text.

Try other alignments, like top and bottom. It sounds though like there's no bug here after all, so I'll close the issue.
Lummox JR resolved issue (Not a bug)
The result is the same regardless of what align is used, the icon is always slighly up then being alighned with the text.