Merge /vore into /master (#39)
* progress * Compile errors fixed No idea if it's test worthy tho as conflicts with race overhaul and narky removal. * Update admins.txt * efforts continue Fuck grab code, seriously * grab code is cancer * Execute the Narkism Do not hesitate. Show no mercy. * holy shit grab code is awful * have I bitched about grab code My bitching, let me show you it * código de agarre es una mierda No really it is * yeah I don't even know anymore. * Lolnope. Fuck grab code * I'm not even sure what to fix anymore * Self eating is not an acceptable fate * Taste the void, son. * My code doesn't pass it's own sanity check. Maybe it's a sign of things to come. * uncommented and notes * It Works and I Don't Know Why (#38) * shuttle auto call * it works and I don't know why
This commit is contained in:
@@ -105,6 +105,10 @@ var/list/preferences_datums = list()
|
||||
//var/metadata = ""
|
||||
var/flavor_text = ""
|
||||
|
||||
// Vore prefs
|
||||
var/digestable = 1
|
||||
var/list/belly_prefs = list()
|
||||
|
||||
var/unlock_content = 0
|
||||
|
||||
var/list/ignoring = list()
|
||||
@@ -123,6 +127,8 @@ 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.
|
||||
@@ -1252,12 +1258,15 @@ var/list/preferences_datums = list()
|
||||
if("save")
|
||||
save_preferences()
|
||||
save_character()
|
||||
save_vore_preferences()
|
||||
|
||||
if("load")
|
||||
load_preferences()
|
||||
load_character()
|
||||
load_vore_preferences()
|
||||
|
||||
if("changeslot")
|
||||
load_vore_preferences(text2num(href_list["num"]))
|
||||
if(!load_character(text2num(href_list["num"])))
|
||||
random_character()
|
||||
real_name = random_unique_name(gender)
|
||||
@@ -1289,6 +1298,23 @@ var/list/preferences_datums = list()
|
||||
character.name = character.real_name
|
||||
character.flavor_text = flavor_text
|
||||
|
||||
if(!length(belly_prefs))
|
||||
var/datum/belly/B = new /datum/belly(src)
|
||||
B.immutable = 1
|
||||
B.name = "Stomach"
|
||||
B.inside_flavor = "It appears to be rather warm and wet. Makes sense, considering it's inside \the [character]."
|
||||
belly_prefs[B.name] = B
|
||||
|
||||
character.vore_organs = belly_prefs
|
||||
|
||||
character.vore_selected = character.vore_organs[1]
|
||||
|
||||
for(var/I in character.vore_organs)
|
||||
var/datum/belly/B = character.vore_organs[I]
|
||||
B.owner = character
|
||||
|
||||
character.digestable = digestable
|
||||
|
||||
character.gender = gender
|
||||
character.age = age
|
||||
|
||||
|
||||
@@ -172,6 +172,44 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
|
||||
backbag = DBACKPACK
|
||||
|
||||
|
||||
//
|
||||
// Save/Load Vore Preferences
|
||||
//
|
||||
/datum/preferences/proc/load_vore_preferences(slot)
|
||||
if(!path) return 0 //Path couldn't be set?
|
||||
if(!fexists(path)) //Never saved before
|
||||
save_vore_preferences() //Make the file first
|
||||
return 1
|
||||
|
||||
var/savefile/S = new /savefile(path)
|
||||
if(!S) return 0 //Savefile object couldn't be created?
|
||||
|
||||
S.cd = "/character[slot]"
|
||||
|
||||
S["digestable"] >> digestable
|
||||
S["belly_prefs"] >> belly_prefs
|
||||
|
||||
if(isnull(digestable))
|
||||
digestable = 1
|
||||
if(isnull(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["digestable"] << digestable
|
||||
S["belly_prefs"] << belly_prefs
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
/datum/preferences/proc/load_path(ckey,filename="preferences.sav")
|
||||
if(!ckey)
|
||||
return
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
//File isn't currently being used.
|
||||
/datum/preferences
|
||||
var/biological_gender = MALE
|
||||
var/identifying_gender = MALE
|
||||
|
||||
/datum/preferences/proc/set_biological_gender(var/gender)
|
||||
biological_gender = gender
|
||||
identifying_gender = gender
|
||||
Reference in New Issue
Block a user