Vore fixes (#200)

* wagging tails!

* oh

* also these two runtime things

* some delta too

* maybesorta

* Moves vore stuff lower into modules

* Vore fixes ftw
This commit is contained in:
Poojawa
2017-02-05 05:11:42 -06:00
committed by GitHub
parent 3dd2e8b07b
commit aeeca195c7
32 changed files with 254 additions and 176 deletions
+1
View File
@@ -327,6 +327,7 @@ var/next_external_rsc = 0
if(!tooltips)
tooltips = new /datum/tooltip(src)
hook_vr("client_new",list(src))
//////////////
//DISCONNECT//
+4 -10
View File
@@ -118,8 +118,7 @@ var/list/preferences_datums = list()
var/loaded_preferences_successfully = load_preferences()
if(loaded_preferences_successfully)
if(load_character())
if(load_vore_preferences())
return
return
//we couldn't load character data so just randomize the character appearance + name
random_character() //let's create a random character then - rather than a fat, bald and naked man.
real_name = pref_species.random_name(gender,1)
@@ -1390,10 +1389,10 @@ var/list/preferences_datums = list()
if("load")
load_preferences()
load_character()
load_vore_preferences()
attempt_vr(parent.prefs_vr,"load_vore","")
if("changeslot")
load_vore_preferences(text2num(href_list["num"]))
attempt_vr(parent.prefs_vr,"load_vore","")
if(!load_character(text2num(href_list["num"])))
random_character()
real_name = random_unique_name(gender)
@@ -1453,9 +1452,4 @@ var/list/preferences_datums = list()
if(icon_updates)
character.update_body()
character.update_hair()
character.update_body_parts()
//vore
character.digestable = digestable
character.devourable = devourable
character.vore_organs = belly_prefs
character.update_body_parts()
@@ -176,19 +176,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["parallax"] >> parallax
S["uplink_loc"] >> uplink_spawn_loc
//vore
S["digestable"] >> digestable
S["devourable"] >> devourable
S["belly_prefs"] >> belly_prefs
if(isnull(digestable))
digestable = 1
if(isnull(devourable))
devourable = 1
if(isnull(belly_prefs))
belly_prefs = list()
//try to fix any outdated data if necessary
if(needs_update >= 0)
update_preferences(needs_update, S) //needs_update = savefile_version if we need an update (positive integer)
@@ -245,12 +232,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["clientfps"] << clientfps
S["parallax"] << parallax
//vore
S["digestable"] << digestable
S["devourable"] << devourable
S["belly_prefs"] << belly_prefs
return 1
/datum/preferences/proc/load_character(slot)
@@ -497,43 +478,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
return 1
/datum/preferences/proc/load_vore_preferences(slot)
if(!path) return 0
if(!fexists(path)) return 0
var/savefile/S = new /savefile(path)
if(!S) return 0
S.cd = "/"
if(!slot) slot = default_slot
slot = sanitize_integer(slot, 1, max_save_slots, initial(default_slot))
if(slot != default_slot)
default_slot = slot
S["default_slot"] << slot
S.cd = "/character[slot]"
S["belly_prefs"] >> belly_prefs
S["devourable"] >> devourable
S["digestable"] >> digestable
digestable = sanitize_integer(digestable, 0, 1, initial(digestable))
devourable = sanitize_integer(devourable, 0, 1, initial(devourable))
if(!belly_prefs)
belly_prefs = list()
return 1
/datum/preferences/proc/save_vore_preferences()
if(!path) return 0
var/savefile/S = new /savefile(path)
if(!S) return 0
S.cd = "/character[default_slot]"
S["belly_prefs"] << belly_prefs
S["devourable"] << devourable
S["digestable"] << digestable
return 1
#undef SAVEFILE_VERSION_MAX
#undef SAVEFILE_VERSION_MIN
/*