Should allow savefiles to work.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5167 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-11-23 00:18:45 +00:00
parent 76ede03966
commit 65a2126d9f
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -89,8 +89,8 @@ datum/preferences
if(!IsGuestKey(C.key))
load_path(C.ckey)
if(load_preferences())
load_character()
return
if(load_character())
return
gender = pick(MALE, FEMALE)
real_name = random_name(gender)
+2 -2
View File
@@ -18,7 +18,7 @@
if(delpath && fexists(delpath))
fdel(delpath)
break
savefile_version = 8
return 0
if(savefile_version == SAVEFILE_VERSION_MAX) //update successful.
save_preferences()
@@ -29,6 +29,7 @@
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
if(!ckey) return
path = "data/player_saves/[copytext(ckey,1,2)]/[ckey]/[filename]"
savefile_version = SAVEFILE_VERSION_MAX
/datum/preferences/proc/load_preferences()
if(!path) return 0
@@ -40,7 +41,6 @@
//Conversion
if(!savefile_version || !isnum(savefile_version) || savefile_version < SAVEFILE_VERSION_MIN || savefile_version > SAVEFILE_VERSION_MAX)
if(!savefile_update()) //handles updates
fdel(path) //handles deleting old files for which an update clause has not been defined
savefile_version = SAVEFILE_VERSION_MAX
save_preferences()
save_character()