ID:2761480
 
Not a bug
BYOND Version:514.1575
Operating System:Windows 7 Pro 64-bit
Web Browser:Chrome 90.0.4430.85
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:
When you add an atom to the client screen with screen_loc of "0:[x], 0:[y]", it's layered beneath other screen elements even tho it was added later.

Numbered Steps to Reproduce Problem:
1 - Add an atom to the client.screen, with a normal screen_loc (not 0)
2 - Add an atom to the client.screen with screen_loc of 0
3 - See that the second atom will be layered beneath the first, even with same plane and layer vars, even tho it was added later

Code Snippet (if applicable) to Reproduce Problem:
var/obj/A =new
A.screen_loc="1, 1"
var/obj/B=new
B.screen_loc="0:32, 0:32"
client.screen+=A
client.screen+=B


Expected Results:
B be above A

Actual Results:
A is above B

Does the problem occur:
Every time? Or how often? Every time
In other games? Yes
In other user accounts? Yes
On other computers? Yes

When does the problem NOT occur? Never

Workarounds:
?
Lummox JR resolved issue (Not a bug)
You're forgetting the drawing is ultimately tile-based. In the pre-render the tiles are added to the list from low to high Y, and low to high X. A HUD item at 0,0 therefore will be the first object to be added to the entire render list. Once sorting is underway, since it has the same plane and layer as the other HUD object, the tie will be broken by whichever one was added to the main list first.

The order of objects in client.screen doesn't actually matter, except in terms of breaking ties between items on the same tile.