Refactored underwear to use datum/sprite_accessory/underwear similar to hair and facial_hair.

People may select any underwear (regardless of gender) at a dresser, but not in preferences.
random_underwear(gender) will return a random pair of underwear suitable for your gender.
Removed an unused variable in sprite_accessory

The new_player preferences screen now randomizes character slots for which there is no data (so no more bald, fat, white guys in diapers greeting new players)
datum/preferences character settings are randomised at New().
replaced /datum/preferences/proc/randomize_appearance_for(human/H) with /datum/preferences/proc/random_character(), it does the same stuff without the copying to a mob. Basically, now when you want to make a random character you just do var/datum/preferences/A = new(); A.copy_to(human_mob), randomisation of appearance and name will already be done. Easy.

Reworked the savefile updating/versioning code to make it easier to work with. I've used it to update underwear preferences to the new system as an example.

Signed-off-by: carnie <elly1989@rocketmail.com>
This commit is contained in:
carnie
2013-03-28 11:11:40 +00:00
parent 2c9283dd05
commit 5ca166cae0
23 changed files with 387 additions and 212 deletions
+5 -12
View File
@@ -10,18 +10,11 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.gender == MALE)
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_m
if(!in_range(src, usr))//no tele-grooming
return
if(new_undies)
H.underwear = underwear_m.Find(new_undies)
else
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_f
if(!in_range(src, usr))
return
if(new_undies)
H.underwear = underwear_f.Find(new_undies)
var/new_undies = input(user, "Select your underwear", "Changing") as null|anything in underwear_all
if(!in_range(src, user))//no tele-grooming
return
if(new_undies)
H.underwear = new_undies
add_fingerprint(H)
H.update_body()