ID:2192295
 
Not a bug
BYOND Version:511.1366
Operating System:Windows 7 Home Basic 64-bit
Web Browser:Chrome 55.0.2883.87
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:
Checking appearance equality with other appearances does not work unless the two objects being tested are the same type, one is a subtype of the other, or one is a mutable appearance.

Additionally, in the case where one object is a subtype of the other, the pathing of the verb matters. In the following code sample, if the mob is /mob/testing and the verb is defined as /mob/testing/verb/test_appearance_equality(), then the /mob test marked with the asterisk comes out as not equal. If however the verb is just /mob/verb/test_appearance_equality(), then they are equal.

Code Snippet (if applicable) to Reproduce Problem:
/mob/verb/test_appearance_equality()
//uncomment exactly one of these
// var/image/MA = new() //not equal
// var/mutable_appearance/MA = new() //equal
// var/obj/MA = new() //not equal
// var/mob/MA = new() //equal *
// var/mob/testing/MA = new() //equal
// var/turf/MA = loc //not equal
// var/area/MA = loc.loc //not equal

MA.appearance = src.appearance
if(MA.appearance == src.appearance)
world << "Equal"
else
world << "Not equal"


Expected Results:
If you set something's appearance equal to another and then test them for equality, it should either work in all cases or fail in all cases.
Actual Results:
Some cases work, most do not.

Does the problem occur:
Every time? Or how often?
In other games?
In other user accounts?
On other computers?
Not tested anywhere else. Someone asked if appearance equality worked so I whipped together a demo to test. Found it worked weirdly so here we are.

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.)
Not tested, but I'm pretty sure this happened in stable too which is why I put this in the regular bugs instead of beta bugs.
This is not actually a bug, because when you set an object's appearance, the following vars are not changed:

density
dir
screen_loc
verbs

The only time those are changed is if you use a mutable appearance.
Lummox JR resolved issue (Not a bug)