Locate doesn't seem to find atoms in contents after being re-loaded.
Numbered Steps to Reproduce Problem:
Create an object. Manually set it's tag. Save the object in contents.
Reload the save file and try to grab the object by what should be it's tag.
(Doesn't work.)
Code Snippet (if applicable) to Reproduce Problem:
var/obj/Skill/S=locate(wh) in src.contents
if(S)
world<<"Found"
Expected Results:
Upon creating a new item and setting it's tag it works, only seems to happen to saved atoms that have been stored in a save file then loaded.
Actual Results:
The atom isn't located by it's tag.
Does the problem occur:
Every time? Or how often?
Has been occurring for a while now even before I switched to 508
In other games?
Yes.
In other user accounts?
Yes.
On other computers?
Yes.
When does the problem NOT occur?
The code works as expected with new objects. Even after "prepping" the saved objects by making sure the tag is the corect value, searching an object in contents doesn't seem to work.
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:
Loop through the list and directly compare the value of the tag(works fine.)
As seen below
for(var/obj/Skill/S in src.contents)
if(S.tag==.)
S.Use(src)
break