mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Merge branch 'master' into zefix
This commit is contained in:
@@ -279,7 +279,8 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
dat += "<b>You are banned from using custom names and appearances. \
|
||||
You can continue to adjust your characters, but you will be randomised once you join the game.\
|
||||
</b><br>"
|
||||
dat += "<b>Gender:</b> <a href='?_src_=prefs;preference=gender'>[gender == MALE ? "Male" : "Female"]</a><br>"
|
||||
dat += "<b>Gender:</b> <a href='?_src_=prefs;preference=gender'>[gender == MALE ? "Male" : (gender == FEMALE ? "Female" : "Genderless")]</a>"
|
||||
dat += "<br>"
|
||||
dat += "<b>Age:</b> <a href='?_src_=prefs;preference=age;task=input'>[age]</a><br>"
|
||||
dat += "<b>Body:</b> <a href='?_src_=prefs;preference=all;task=random'>(®)</a><br>"
|
||||
dat += "<b>Species:</b> <a href='?_src_=prefs;preference=species;task=input'>[species]</a><br>"
|
||||
@@ -1031,6 +1032,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
/datum/preferences/proc/process_link(mob/user, list/href_list)
|
||||
if(!user) return
|
||||
|
||||
var/datum/species/S = all_species[species]
|
||||
if(href_list["preference"] == "job")
|
||||
switch(href_list["task"])
|
||||
if("close")
|
||||
@@ -1266,9 +1268,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
// var/whitelisted = 0
|
||||
|
||||
if(config.usealienwhitelist) //If we're using the whitelist, make sure to check it!
|
||||
for(var/S in whitelisted_species)
|
||||
if(is_alien_whitelisted(user,S))
|
||||
new_species += S
|
||||
for(var/Spec in whitelisted_species)
|
||||
if(is_alien_whitelisted(user,Spec))
|
||||
new_species += Spec
|
||||
// whitelisted = 1
|
||||
// if(!whitelisted)
|
||||
// alert(user, "You cannot change your species as you need to be whitelisted. If you wish to be whitelisted contact an admin in-game, on the forums, or on IRC.")
|
||||
@@ -1276,8 +1278,10 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
new_species += whitelisted_species
|
||||
|
||||
species = input("Please select a species", "Character Generation", null) in new_species
|
||||
|
||||
var/datum/species/NS = all_species[species]
|
||||
if(prev_species != species)
|
||||
if(NS.has_gender && gender == PLURAL)
|
||||
gender = pick(MALE,FEMALE)
|
||||
var/datum/robolimb/robohead
|
||||
if(species == "Machine")
|
||||
var/head_model = "[!rlimb_data["head"] ? "Morpheus Cyberkinetics" : rlimb_data["head"]]"
|
||||
@@ -1315,16 +1319,16 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
m_colours["tail"] = "#000000"
|
||||
|
||||
// Don't wear another species' underwear!
|
||||
var/datum/sprite_accessory/S = underwear_list[underwear]
|
||||
if(!S || !(species in S.species_allowed))
|
||||
var/datum/sprite_accessory/SA = underwear_list[underwear]
|
||||
if(!SA || !(species in SA.species_allowed))
|
||||
underwear = random_underwear(gender, species)
|
||||
|
||||
S = undershirt_list[undershirt]
|
||||
if(!S || !(species in S.species_allowed))
|
||||
SA = undershirt_list[undershirt]
|
||||
if(!SA || !(species in SA.species_allowed))
|
||||
undershirt = random_undershirt(gender, species)
|
||||
|
||||
S = socks_list[socks]
|
||||
if(!S || !(species in S.species_allowed))
|
||||
SA = socks_list[socks]
|
||||
if(!SA || !(species in SA.species_allowed))
|
||||
socks = random_socks(gender, species)
|
||||
|
||||
//reset skin tone and colour
|
||||
@@ -1402,7 +1406,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("h_style")
|
||||
var/list/valid_hairstyles = list()
|
||||
for(var/hairstyle in hair_styles_list)
|
||||
var/datum/sprite_accessory/S = hair_styles_list[hairstyle]
|
||||
var/datum/sprite_accessory/SA = hair_styles_list[hairstyle]
|
||||
|
||||
if(hairstyle == "Bald") //Just in case.
|
||||
valid_hairstyles += hairstyle
|
||||
@@ -1414,14 +1418,14 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
else
|
||||
head_model = rlimb_data["head"]
|
||||
var/datum/robolimb/robohead = all_robolimbs[head_model]
|
||||
if((species in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
|
||||
if((species in SA.species_allowed) && robohead.is_monitor && ((SA.models_allowed && (robohead.company in SA.models_allowed)) || !SA.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
|
||||
valid_hairstyles += hairstyle //Give them their hairstyles if they do.
|
||||
else
|
||||
if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
|
||||
if(!robohead.is_monitor && ("Human" in SA.species_allowed)) /*If the hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
|
||||
But if the user has a robotic humanoid head and the hairstyle can fit humans, let them use it as a wig. */
|
||||
valid_hairstyles += hairstyle
|
||||
else //If the user is not a species who can have robotic heads, use the default handling.
|
||||
if(species in S.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list.
|
||||
if(species in SA.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list.
|
||||
valid_hairstyles += hairstyle
|
||||
|
||||
var/new_h_style = input(user, "Choose your character's hair style:", "Character Preference") as null|anything in valid_hairstyles
|
||||
@@ -1609,14 +1613,14 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("f_style")
|
||||
var/list/valid_facial_hairstyles = list()
|
||||
for(var/facialhairstyle in facial_hair_styles_list)
|
||||
var/datum/sprite_accessory/S = facial_hair_styles_list[facialhairstyle]
|
||||
var/datum/sprite_accessory/SA = facial_hair_styles_list[facialhairstyle]
|
||||
|
||||
if(facialhairstyle == "Shaved") //Just in case.
|
||||
valid_facial_hairstyles += facialhairstyle
|
||||
continue
|
||||
if(gender == MALE && S.gender == FEMALE)
|
||||
if(gender == MALE && SA.gender == FEMALE)
|
||||
continue
|
||||
if(gender == FEMALE && S.gender == MALE)
|
||||
if(gender == FEMALE && SA.gender == MALE)
|
||||
continue
|
||||
if(species == "Machine") //Species that can use prosthetic heads.
|
||||
var/head_model
|
||||
@@ -1625,14 +1629,14 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
else
|
||||
head_model = rlimb_data["head"]
|
||||
var/datum/robolimb/robohead = all_robolimbs[head_model]
|
||||
if((species in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a facial hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
|
||||
if((species in SA.species_allowed) && robohead.is_monitor && ((SA.models_allowed && (robohead.company in SA.models_allowed)) || !SA.models_allowed)) //If this is a facial hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
|
||||
valid_facial_hairstyles += facialhairstyle //Give them their facial hairstyles if they do.
|
||||
else
|
||||
if(!robohead.is_monitor && ("Human" in S.species_allowed)) /*If the facial hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
|
||||
if(!robohead.is_monitor && ("Human" in SA.species_allowed)) /*If the facial hairstyle is not native to the user's species and they're using a head with an ipc-style screen, don't let them access it.
|
||||
But if the user has a robotic humanoid head and the facial hairstyle can fit humans, let them use it as a wig. */
|
||||
valid_facial_hairstyles += facialhairstyle
|
||||
else //If the user is not a species who can have robotic heads, use the default handling.
|
||||
if(species in S.species_allowed) //If the user's head is of a species the facial hair style allows, add it to the list.
|
||||
if(species in SA.species_allowed) //If the user's head is of a species the facial hair style allows, add it to the list.
|
||||
valid_facial_hairstyles += facialhairstyle
|
||||
|
||||
var/new_f_style = input(user, "Choose your character's facial-hair style:", "Character Preference") as null|anything in valid_facial_hairstyles
|
||||
@@ -1642,12 +1646,12 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("underwear")
|
||||
var/list/valid_underwear = list()
|
||||
for(var/underwear in underwear_list)
|
||||
var/datum/sprite_accessory/S = underwear_list[underwear]
|
||||
if(gender == MALE && S.gender == FEMALE)
|
||||
var/datum/sprite_accessory/SA = underwear_list[underwear]
|
||||
if(gender == MALE && SA.gender == FEMALE)
|
||||
continue
|
||||
if(gender == FEMALE && S.gender == MALE)
|
||||
if(gender == FEMALE && SA.gender == MALE)
|
||||
continue
|
||||
if(!(species in S.species_allowed))
|
||||
if(!(species in SA.species_allowed))
|
||||
continue
|
||||
valid_underwear[underwear] = underwear_list[underwear]
|
||||
var/new_underwear = input(user, "Choose your character's underwear:", "Character Preference") as null|anything in valid_underwear
|
||||
@@ -1657,12 +1661,12 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("undershirt")
|
||||
var/list/valid_undershirts = list()
|
||||
for(var/undershirt in undershirt_list)
|
||||
var/datum/sprite_accessory/S = undershirt_list[undershirt]
|
||||
if(gender == MALE && S.gender == FEMALE)
|
||||
var/datum/sprite_accessory/SA = undershirt_list[undershirt]
|
||||
if(gender == MALE && SA.gender == FEMALE)
|
||||
continue
|
||||
if(gender == FEMALE && S.gender == MALE)
|
||||
if(gender == FEMALE && SA.gender == MALE)
|
||||
continue
|
||||
if(!(species in S.species_allowed))
|
||||
if(!(species in SA.species_allowed))
|
||||
continue
|
||||
valid_undershirts[undershirt] = undershirt_list[undershirt]
|
||||
var/new_undershirt = input(user, "Choose your character's undershirt:", "Character Preference") as null|anything in valid_undershirts
|
||||
@@ -1673,12 +1677,12 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
if("socks")
|
||||
var/list/valid_sockstyles = list()
|
||||
for(var/sockstyle in socks_list)
|
||||
var/datum/sprite_accessory/S = socks_list[sockstyle]
|
||||
if(gender == MALE && S.gender == FEMALE)
|
||||
var/datum/sprite_accessory/SA = socks_list[sockstyle]
|
||||
if(gender == MALE && SA.gender == FEMALE)
|
||||
continue
|
||||
if(gender == FEMALE && S.gender == MALE)
|
||||
if(gender == FEMALE && SA.gender == MALE)
|
||||
continue
|
||||
if(!(species in S.species_allowed))
|
||||
if(!(species in SA.species_allowed))
|
||||
continue
|
||||
valid_sockstyles[sockstyle] = socks_list[sockstyle]
|
||||
var/new_socks = input(user, "Choose your character's socks:", "Character Preference") as null|anything in valid_sockstyles
|
||||
@@ -1909,10 +1913,20 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
toggles ^= DONATOR_PUBLIC
|
||||
|
||||
if("gender")
|
||||
if(gender == MALE)
|
||||
gender = FEMALE
|
||||
if(!S.has_gender)
|
||||
var/newgender = input(user, "Choose Gender:") as null|anything in list("Male", "Female", "Genderless")
|
||||
switch(newgender)
|
||||
if("Male")
|
||||
gender = MALE
|
||||
if("Female")
|
||||
gender = FEMALE
|
||||
if("Genderless")
|
||||
gender = PLURAL
|
||||
else
|
||||
gender = MALE
|
||||
if(gender == MALE)
|
||||
gender = FEMALE
|
||||
else
|
||||
gender = MALE
|
||||
underwear = random_underwear(gender)
|
||||
|
||||
if("hear_adminhelps")
|
||||
@@ -2153,7 +2167,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
character.backbag = backbag
|
||||
|
||||
//Debugging report to track down a bug, which randomly assigned the plural gender to people.
|
||||
if(character.gender in list(PLURAL, NEUTER))
|
||||
if(S.has_gender && (character.gender in list(PLURAL, NEUTER)))
|
||||
if(isliving(src)) //Ghosts get neuter by default
|
||||
message_admins("[key_name_admin(character)] has spawned with their gender as plural or neuter. Please notify coders.")
|
||||
character.change_gender(MALE)
|
||||
|
||||
@@ -270,6 +270,7 @@
|
||||
gear = params2list(query.item[65])
|
||||
|
||||
//Sanitize
|
||||
var/datum/species/SP = all_species[species]
|
||||
metadata = sanitize_text(metadata, initial(metadata))
|
||||
real_name = reject_bad_name(real_name, 1)
|
||||
if(isnull(species)) species = "Human"
|
||||
@@ -278,7 +279,7 @@
|
||||
if(isnull(speciesprefs)) speciesprefs = initial(speciesprefs)
|
||||
if(!real_name) real_name = random_name(gender,species)
|
||||
be_random_name = sanitize_integer(be_random_name, 0, 1, initial(be_random_name))
|
||||
gender = sanitize_gender(gender)
|
||||
gender = sanitize_gender(gender, FALSE, !SP.has_gender)
|
||||
age = sanitize_integer(age, AGE_MIN, AGE_MAX, initial(age))
|
||||
r_hair = sanitize_integer(r_hair, 0, 255, initial(r_hair))
|
||||
g_hair = sanitize_integer(g_hair, 0, 255, initial(g_hair))
|
||||
|
||||
Reference in New Issue
Block a user