User-loaded icon does not load to all vars if referrenced in multiple vars and stored in text save.
Numbered Steps to Reproduce Problem:
1. Spawn item
2. icon = user-loaded icon
3. any_other_var = same user-loaded icon
4. Save item
5. Export save to text
6. Import save from text
7. Load item
Code Snippet (if applicable) to Reproduce Problem:
/obj/icon_bug
var/icon/icon_test
var/icon/icon_test2
var/icon/icon_test3
/mob/verb/test_bug(I as icon)
set category = "Debug"
set name = "Test Icon Bug"
var/obj/icon_bug/bug = new()
bug.icon_test = I
bug.icon_test2 = I
bug.icon_test3 = I
bug.icon = I
var/savefile/F = new()
var/txtfile = file("temp.sav")
F["save"] << bug
F.ExportText("/", txtfile)
var/savefile/S = new()
S.ImportText("/", txtfile)
bug = null
S["save"] >> bug
bug.loc = src.loc
Expected Results:
Icon being loaded to all vars
Actual Results:
Icon being loaded to one of vars only
When does the problem NOT occur?
When user-loaded icon is referrenced only once. When savefile is not imported from text.
Workarounds:
Some sort of Read() or Write() hack i think.
Not using text savefiles.