ID:2236208
 
Not a bug
BYOND Version:510
Operating System:Windows 10 Home
Web Browser:Firefox 45.9
Applies to:DM Language
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:
I've tried using img in maptext but it seems that it most of the time doesn't display any images, no matter if I size maptext width or height to ridiculous amounts. It either gives no image at all or it displays the image, but the maptext isn't displayed (happens most of the time after calling the proc a second time). This happens no matter if I use .dmi or .png files.

I use the most recent beta.

Numbered Steps to Reproduce Problem:
Call a proc which creates a hud object in

Code Snippet (if applicable) to Reproduce Problem:
Well, I made a little project, but need time to upload it. For now, please be satisfied with this:
mob/Login()
src << "hello"
..()

turf
grass
icon='img/icon.dmi'
icon_state="grass"

obj/hud/littlehud
icon='img/littlehud.dmi'
maptext_width=9000
maptext_height=9000
screen_loc="1,1"
maptext="<img src='img/icon.dmi' iconstate='stickmayor'><br>StickMAYOR!"
maptext_x=10
maptext_y=10

obj/hud/bighud
icon='img/bighud.png'
maptext_width=9000
maptext_height=9000
screen_loc="1,1"
maptext="<img src='img/dankmemes.png'><br>Pretty valid complaint."
maptext_x=10
maptext_y=10


mob/var/obj/hud/littlehud/littlehud
mob/var/obj/hud/bighud/bighud

mob
verb
showdankmemes()
set name="Read game review"
src.bighud=new
src.client.screen+=bighud

showstickman()
set name="I prefer boring stickmen"
src.littlehud=new
src.client.screen+=littlehud

closeit()
set name="Get that thing off my screen!"
for(var/obj/hud/h in src.client.screen)
del(h)


Expected Results:
Show the image and the text added to the maptext.

Actual Results:
Either show maptext or icon only.

Does the problem occur:
Every time? Or how often?
It always does for me.
All the time nearly.
In other games?
No idea.
In other user accounts?
No idea.
On other computers?
No idea.

When does the problem NOT occur?
It always does.

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.)

Workarounds:

You might want to browse_rsc() the file first so it's actually included in the project resources.
Well, it should be included since the icon shows from time to time, just not 100%. And when it does, it somehow eats up my maptext.
Loading from your local files is a bit iffy on things, and since there's nothing in that code above that would include the file in the rsc, it's gonna try to pull from a local version of the file (maybe, I'm doubtful it's that smart).

I'm surprised it's showing at all, honestly.
*Looks up browse_rsc in the manual, then facepalms*

Okay, that explains a lot of things. Thanks, bro!
Lummox JR resolved issue (Not a bug)