|
|
|
@@ -163,6 +163,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|
|
|
|
)
|
|
|
|
|
var/custom_speech_verb = "default" //if your say_mod is to be something other than your races
|
|
|
|
|
var/custom_tongue = "default" //if your tongue is to be something other than your races
|
|
|
|
|
var/modified_limbs = list() //prosthetic/amputated limbs
|
|
|
|
|
var/chosen_limb_id //body sprite selected to load for the users limbs, null means default, is sanitized when loaded
|
|
|
|
|
|
|
|
|
|
/// Security record note section
|
|
|
|
@@ -429,12 +430,19 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|
|
|
|
dat += "<b>Gender:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=gender;task=input'>[gender == MALE ? "Male" : (gender == FEMALE ? "Female" : (gender == PLURAL ? "Non-binary" : "Object"))]</a><BR>"
|
|
|
|
|
if(gender != NEUTER && pref_species.sexes)
|
|
|
|
|
dat += "<b>Body Model:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=body_model'>[features["body_model"] == MALE ? "Masculine" : "Feminine"]</a><BR>"
|
|
|
|
|
dat += "<b>Limb Modification:</b><BR>"
|
|
|
|
|
dat += "<a href='?_src_=prefs;preference=modify_limbs;task=input'>Modify Limbs</a><BR>"
|
|
|
|
|
for(var/modification in modified_limbs)
|
|
|
|
|
if(modified_limbs[modification][1] == LOADOUT_LIMB_PROSTHETIC)
|
|
|
|
|
dat += "<b>[modification]: [modified_limbs[modification][2]]</b><BR>"
|
|
|
|
|
else
|
|
|
|
|
dat += "<b>[modification]: [modified_limbs[modification][1]]</b><BR>"
|
|
|
|
|
dat += "<BR>"
|
|
|
|
|
dat += "<b>Species:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=species;task=input'>[pref_species.name]</a><BR>"
|
|
|
|
|
dat += "<b>Custom Species Name:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=custom_species;task=input'>[custom_species ? custom_species : "None"]</a><BR>"
|
|
|
|
|
dat += "<b>Random Body:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=all;task=random'>Randomize!</A><BR>"
|
|
|
|
|
dat += "<b>Always Random Body:</b><a href='?_src_=prefs;preference=all'>[be_random_body ? "Yes" : "No"]</A><BR>"
|
|
|
|
|
dat += "<br><b>Cycle background:</b><a style='display:block;width:100px' href='?_src_=prefs;preference=cycle_bg;task=input'>[bgstate]</a><BR>"
|
|
|
|
|
|
|
|
|
|
var/use_skintones = pref_species.use_skintones
|
|
|
|
|
if(use_skintones)
|
|
|
|
|
dat += APPEARANCE_CATEGORY_COLUMN
|
|
|
|
@@ -1235,6 +1243,9 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|
|
|
|
for(var/V in all_quirks)
|
|
|
|
|
var/datum/quirk/T = SSquirks.quirks[V]
|
|
|
|
|
bal -= initial(T.value)
|
|
|
|
|
for(var/modification in modified_limbs)
|
|
|
|
|
if(modified_limbs[modification][1] == LOADOUT_LIMB_PROSTHETIC)
|
|
|
|
|
return bal + 1 //max 1 point regardless of how many prosthetics
|
|
|
|
|
return bal
|
|
|
|
|
|
|
|
|
|
/datum/preferences/proc/GetPositiveQuirkCount()
|
|
|
|
@@ -1492,6 +1503,29 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|
|
|
|
if("cycle_bg")
|
|
|
|
|
bgstate = next_list_item(bgstate, bgstate_options)
|
|
|
|
|
|
|
|
|
|
if("modify_limbs")
|
|
|
|
|
var/limb_type = input(user, "Choose the limb to modify:", "Character Preference") as null|anything in LOADOUT_ALLOWED_LIMB_TARGETS
|
|
|
|
|
if(limb_type)
|
|
|
|
|
var/modification_type = input(user, "Choose the modification to the limb:", "Character Preference") as null|anything in LOADOUT_LIMBS
|
|
|
|
|
if(modification_type)
|
|
|
|
|
if(modification_type == LOADOUT_LIMB_PROSTHETIC)
|
|
|
|
|
var/prosthetic_type = input(user, "Choose the type of prosthetic", "Character Preference") as null|anything in (list("prosthetic") + GLOB.prosthetic_limb_types)
|
|
|
|
|
if(prosthetic_type)
|
|
|
|
|
var/number_of_prosthetics = 0
|
|
|
|
|
for(var/modification in modified_limbs)
|
|
|
|
|
if(modified_limbs[modification][1] == LOADOUT_LIMB_PROSTHETIC)
|
|
|
|
|
number_of_prosthetics += 1
|
|
|
|
|
if(number_of_prosthetics >= MAXIMUM_LOADOUT_PROSTHETICS && !(limb_type in modified_limbs && modified_limbs[limb_type][1] == LOADOUT_LIMB_PROSTHETIC))
|
|
|
|
|
to_chat(user, "<span class='danger'>You can only have up to two prosthetic limbs!</span>")
|
|
|
|
|
else
|
|
|
|
|
//save the actual prosthetic data
|
|
|
|
|
modified_limbs[limb_type] = list(modification_type, prosthetic_type)
|
|
|
|
|
else
|
|
|
|
|
if(modification_type == LOADOUT_LIMB_NORMAL)
|
|
|
|
|
modified_limbs -= limb_type
|
|
|
|
|
else
|
|
|
|
|
modified_limbs[limb_type] = list(modification_type)
|
|
|
|
|
|
|
|
|
|
if("underwear")
|
|
|
|
|
var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in GLOB.underwear_list
|
|
|
|
|
if(new_underwear)
|
|
|
|
@@ -2478,7 +2512,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|
|
|
|
ShowChoices(user)
|
|
|
|
|
return 1
|
|
|
|
|
|
|
|
|
|
/datum/preferences/proc/copy_to(mob/living/carbon/human/character, icon_updates = 1, roundstart_checks = TRUE)
|
|
|
|
|
/datum/preferences/proc/copy_to(mob/living/carbon/human/character, icon_updates = 1, roundstart_checks = TRUE, initial_spawn = FALSE)
|
|
|
|
|
if(be_random_name)
|
|
|
|
|
real_name = pref_species.random_name(gender)
|
|
|
|
|
|
|
|
|
@@ -2573,6 +2607,35 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|
|
|
|
if(custom_speech_verb != "default")
|
|
|
|
|
character.dna.species.say_mod = custom_speech_verb
|
|
|
|
|
|
|
|
|
|
//limb stuff, only done when initially spawning in
|
|
|
|
|
if(initial_spawn)
|
|
|
|
|
//delete any existing prosthetic limbs to make sure no remnant prosthetics are left over
|
|
|
|
|
for(var/obj/item/bodypart/part in character.bodyparts)
|
|
|
|
|
if(part.status == BODYPART_ROBOTIC)
|
|
|
|
|
qdel(part)
|
|
|
|
|
character.regenerate_limbs() //regenerate limbs so now you only have normal limbs
|
|
|
|
|
for(var/modified_limb in modified_limbs)
|
|
|
|
|
var/modification = modified_limbs[modified_limb][1]
|
|
|
|
|
var/obj/item/bodypart/old_part = character.get_bodypart(modified_limb)
|
|
|
|
|
if(modification == LOADOUT_LIMB_PROSTHETIC)
|
|
|
|
|
var/obj/item/bodypart/new_limb
|
|
|
|
|
switch(modified_limb)
|
|
|
|
|
if(BODY_ZONE_L_ARM)
|
|
|
|
|
new_limb = new/obj/item/bodypart/l_arm/robot/surplus(character)
|
|
|
|
|
if(BODY_ZONE_R_ARM)
|
|
|
|
|
new_limb = new/obj/item/bodypart/r_arm/robot/surplus(character)
|
|
|
|
|
if(BODY_ZONE_L_LEG)
|
|
|
|
|
new_limb = new/obj/item/bodypart/l_leg/robot/surplus(character)
|
|
|
|
|
if(BODY_ZONE_R_LEG)
|
|
|
|
|
new_limb = new/obj/item/bodypart/r_leg/robot/surplus(character)
|
|
|
|
|
var/prosthetic_type = modified_limbs[modified_limb][2]
|
|
|
|
|
if(prosthetic_type != "prosthetic") //lets just leave the old sprites as they are
|
|
|
|
|
new_limb.icon = file("icons/mob/augmentation/cosmetic_prosthetic/[prosthetic_type].dmi")
|
|
|
|
|
new_limb.replace_limb(character)
|
|
|
|
|
qdel(old_part)
|
|
|
|
|
|
|
|
|
|
if(length(modified_limbs))
|
|
|
|
|
character.regenerate_icons()
|
|
|
|
|
|
|
|
|
|
SEND_SIGNAL(character, COMSIG_HUMAN_PREFS_COPIED_TO, src, icon_updates, roundstart_checks)
|
|
|
|
|
|
|
|
|
@@ -2581,6 +2644,18 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
|
|
|
|
character.update_body()
|
|
|
|
|
character.update_hair()
|
|
|
|
|
|
|
|
|
|
/datum/preferences/proc/post_copy_to(mob/living/carbon/human/character)
|
|
|
|
|
//if no legs, and not a paraplegic or a slime, give them a free wheelchair
|
|
|
|
|
if(modified_limbs[BODY_ZONE_L_LEG] == LOADOUT_LIMB_AMPUTATED && modified_limbs[BODY_ZONE_R_LEG] == LOADOUT_LIMB_AMPUTATED && !character.has_quirk(/datum/quirk/paraplegic) && !isjellyperson(character))
|
|
|
|
|
if(character.buckled)
|
|
|
|
|
character.buckled.unbuckle_mob(character)
|
|
|
|
|
var/turf/T = get_turf(character)
|
|
|
|
|
var/obj/structure/chair/spawn_chair = locate() in T
|
|
|
|
|
var/obj/vehicle/ridden/wheelchair/wheels = new(T)
|
|
|
|
|
if(spawn_chair) // Makes spawning on the arrivals shuttle more consistent looking
|
|
|
|
|
wheels.setDir(spawn_chair.dir)
|
|
|
|
|
wheels.buckle_mob(character)
|
|
|
|
|
|
|
|
|
|
/datum/preferences/proc/get_default_name(name_id)
|
|
|
|
|
switch(name_id)
|
|
|
|
|
if("human")
|
|
|
|
|