DO NOT MERGE - Fixes random resetting of file

I did a bad with the direction of >> and <<. My bad.
Fixed now, I will test FURTHER to confirm that old files are not deleted
or ruined.
This commit is contained in:
ktccd
2017-08-11 23:10:05 +02:00
parent d7ac827ea6
commit 1b2f2120ec
+7 -3
View File
@@ -382,11 +382,15 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["feature_has_womb"] >> features["has_womb"]
//flavor text
//Let's make our players NOT cry desperately as we wipe their savefiles of their special snowflake texts:
if(S["flavor_text"] != "" || S["flavor_text"] != null)
if((S["flavor_text"] != "") && (S["flavor_text"] != null) && S["flavor_text"]) //If old text isn't null and isn't "" but still exists.
to_chat(world, "DEBUG: OLD TEXT FOUND, MOVING:[S["flavor_text"]]")
S["flavor_text"] >> features["flavor_text"] //Load old flavortext as current dna-based flavortext
S["flavor_text"] >> S["feature_flavor_text"] //Save it in our new type of flavor-text
null >> S["flavor_text"] //Remove old flavortext, completing the cut-and-paste into the new format.
S["feature_flavor_text"] << features["flavor_text"] //Save it in our new type of flavor-text
S["flavor_text"] << "" //Remove old flavortext, completing the cut-and-paste into the new format.
else //We have no old flavortext, default to new
to_chat(world, "DEBUG: No old text found.")
S["feature_flavor_text"] >> features["flavor_text"]