ID:1661779
 
Keywords: color, tmp
Resolved
The color, alpha, and blend_mode vars were not saved properly in savefiles.
BYOND Version:506
Operating System:Windows 7 Home Basic
Web Browser:Firefox 31.0
Applies to:DM Language
Status: Resolved (507.1248)

This issue has been resolved.
Descriptive Problem Summary:
color var is not stored in savefiles


Numbered Steps to Reproduce Problem:
1. spawn object
2. object.color = "#FFBBAA"
3. save object
4. load object

Code Snippet (if applicable) to Reproduce Problem:
var/savefile/F = new()
var/txtfile = file("temp.sav")

var/obj/O = new /obj()
O.name = "test"
O.color = "#FFBBAA"

F["obj"] << O

fdel(txtfile)
F.ExportText("/", txtfile)
usr << ftp(txtfile, "[O].sav")


Expected Results:
Color in save file.

Actual Results:
No color in save file.

When does the problem NOT occur?
When saved object has no color.

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.)
Earlier versions had no built-in color var, color var was saving.

Workarounds:
Saving color separately. But this is hard to do when you need to save colored item with colored item inside with a bunch of colored items inside.
I confirm this. Had this issue and the only workaround is as mentionned in the first post.
ACCount12 wrote:
Workarounds:
Saving color separately. But this is hard to do when you need to save colored item with colored item inside with a bunch of colored items inside.

That should be a non-issue using Read/Write, something to the effect of:

atom/Write(savefile/F)
. = ..()
F["color"] << color

atom/Read(savefile/F)
. = ..()
F["color"] >> color
Nadrew changed status to 'Verified'
Not sure if this is intentional or not, but if it's not it's pretty obviously happening (and can be worked around easily enough as noted), so I'm going to mark it verified until Tom or Lummox chimes in.

I can see the benefits of either functionality really, but most other variables that effect appearance do save by default (overlays, underlays), so it might not hurt for consistency-sake.
Lummox JR resolved issue with message:
The color, alpha, and blend_mode vars were not saved properly in savefiles.