ID:1493932
 
BYOND Version:503
Operating System:Windows 7 Pro 64-bit
Web Browser:Firefox 27.0
Applies to:Dream Maker
Status: Verified

A member of our crack team of bug testers has verified that this issue is reproducible, and has handed it off to the development team for investigation.
Descriptive Problem Summary:
If you specify the default control in screen_loc using screen_loc= "[control]:[x]:[offset_x],[y]:[offset_y]" for a screen object, it will not appear on the screen. Setting the control to null will cause it to use y as the x position while placing the screen_loc at the top of the screen.

Numbered Steps to Reproduce Problem:
1: Inside of a proc or verb, have screen_loc accept a variable control in its argument and have screen_loc use it, but pass the default map control (I kept it as "map1".

Code Snippet (if applicable) to Reproduce Problem:
HUD
parent_type = /obj
layer = 50
icon = 'hud.dmi'
var id //Common attributes for all HUD objects
var pos_x
var pos_y
var offset_x
var offset_y
var control
ButtonFrame
Draw(mob/m)
screen_loc = "[control]:[pos_x]:[offset_x],[pos_y]:[offset_y]"
m.client.screen += src


Expected Results:
When using the default map control as an argument, it should appear at the specified location.
Actual Results:
It does not appear on the default map control, but it does appear on other map controls.

Does the problem occur:
Every time? Or how often?
Every time.
In other games?
N/A
In other user accounts?
N/A
On other computers?
N/A
When does the problem NOT occur?
When a map control is not specified in screen_loc in the format screen_loc = "[x]:[offset_x],[y]:[offset_y]".

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.)
N/A

Workarounds:
Use an if statement if a control is specified and declare screen_loc depending if control is null.
if (!control)
p.screen_loc = "[pos_x]:[offset_x],[pos_y]:[offset_y]"
else
p.screen_loc = "[control]:[pos_x]:[offset_x],[pos_y]:[offset_y]"
Are you certain this was different prior to 503? I don't recall that code changing at all.

Based on the way map icons get filled in, in fact, I would expect this was always the case. The icons get filled at a level "below" the skin where the default map name isn't actually known, and the lack of a map name is what ties the screen object to the main map.
In response to Lummox JR
Ack, my apologies. I should have put N/A there. I first discovered it in 503 since, well, I haven't used that code for earlier versions. Sorry about that!
Lummox JR changed status to 'Verified'