Creating an object and saving it to a savefile will write the object reference twice independently rather than writing it once and referencing the object from other areas.
Numbered Steps to Reproduce Problem:
1: Create an object and optionally set at least one variable.
2: Create a /savefile Object and save the object to two separate buffers
3: Load the object from the savefile after saving it.
4: Compare the object references to see if they are equal.
Code Snippet (if applicable) to Reproduce Problem:
proc/thing_test_save()
var obj/O = new
O.name = "Carl"
var savefile/F = new("Test Save.sav")
F["location_1"] << O
F["location_2"] << O
proc/test_thing_load()
var obj/O1
var obj/O2
var savefile/F = new("Test Save.sav")
F["location_1"] >> O1
F["location_2"] >> O2
src << O1
src << O2
if(O1==O2)
src << "The object references are the same."
else
src << "The object references are different."
Test Project
Expected Results: Duplicate References handled as they normally are
Actual Results: Duplicate References are stored as separate objects
Does the problem occur:
Every time? Or how often? Every Time
In other games? Yes
In other user accounts? Yes
On other computers? Haven't Tested
When does the problem NOT occur?
When running a project compiled before 507.1260
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.)
507.1259 and earlier
Workarounds:
Compile in 507.1259 or: Create Separate Buffers in the savefile to load the duplicate references manually. Depending on the method for this second approach, this can render older savefiles incompatible.