mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 12:05:28 +01:00
Adds Trait Genetics (#16921)
* Adds Trait Genetics from Outpost21 Adds trait genetics from Outpost 21 - Tried to update each file it touched to be equivalent to their Chomp specific variants in order to maintain functionality and make sure no oddities would happen due to code differences. (Some things like the eardeaf loop were left there but commented out) * Morph trait * Fixes a server crashing bug with flip aa * flip * Makes morph superpower better - Makes it use the appearance_changer instead of 1000 different procs - Makes cocoon weaver able to change eye and skin color. I did NOT select you. BAD * begone * fix dna modifier * Fixes massive memory leak * Brain Runtime Fix * There was no reason for this to be a spawn(0) And no I didn't spawn with no blood - https://i.imgur.com/vPizqCD.png * revert revert the dna changes there * Deconf * gets rid of unused proc vars that did nothing * expects enough free slots * glob * fixed and added two other tests * another few tests * this is a list * fixed bad injector * lets wrap these for sanity * better feedback * wrong name * don't allow multiple occupants into the dna pod * future traits will have activation levels instead of binary on/off --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> Co-authored-by: Willburd <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
@@ -56,9 +56,11 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
var/datum/sprite_accessory/instance = style_list[path]
|
||||
if(!istype(instance))
|
||||
continue
|
||||
if(instance.name == DEVELOPER_WARNING_NAME)
|
||||
continue
|
||||
if(instance.ckeys_allowed && (!client || !(client.ckey in instance.ckeys_allowed)))
|
||||
continue
|
||||
if(instance.species_allowed && (!species || !(species in instance.species_allowed)) && (!client || !check_rights(R_ADMIN | R_EVENT | R_FUN, 0, client)) && (!custom_base || !(custom_base in instance.species_allowed))) //VOREStation Edit: Custom Species
|
||||
if(instance.species_allowed && (!species || !(species in instance.species_allowed)) && (!client || !check_rights(R_ADMIN | R_EVENT | R_FUN, 0, client)) && (!custom_base || !(custom_base in instance.species_allowed)))
|
||||
continue
|
||||
.[instance.name] = instance
|
||||
|
||||
@@ -83,7 +85,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
pref.f_style = save_data["facial_style_name"]
|
||||
pref.grad_style = save_data["grad_style_name"]
|
||||
pref.b_type = save_data["b_type"]
|
||||
pref.disabilities = save_data["disabilities"]
|
||||
pref.organ_data = check_list_copy(save_data["organ_data"])
|
||||
pref.rlimb_data = check_list_copy(save_data["rlimb_data"])
|
||||
pref.body_markings = check_list_copy(save_data["body_markings"])
|
||||
@@ -109,7 +110,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
save_data["facial_style_name"] = pref.f_style
|
||||
save_data["grad_style_name"] = pref.grad_style
|
||||
save_data["b_type"] = pref.b_type
|
||||
save_data["disabilities"] = pref.disabilities
|
||||
save_data["organ_data"] = check_list_copy(pref.organ_data)
|
||||
save_data["rlimb_data"] = check_list_copy(pref.rlimb_data)
|
||||
var/list/body_markings = check_list_copy(pref.body_markings)
|
||||
@@ -138,12 +138,11 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
pref.grad_style = sanitize_inlist(pref.grad_style, GLOB.hair_gradients, initial(pref.grad_style))
|
||||
pref.b_type = sanitize_text(pref.b_type, initial(pref.b_type))
|
||||
|
||||
pref.disabilities = sanitize_integer(pref.disabilities, 0, 65535, initial(pref.disabilities))
|
||||
if(!pref.organ_data) pref.organ_data = list()
|
||||
if(!pref.rlimb_data) pref.rlimb_data = list()
|
||||
if(!pref.body_markings) pref.body_markings = list()
|
||||
else pref.body_markings &= body_marking_styles_list
|
||||
for (var/M in pref.body_markings) //VOREStation Edit
|
||||
for (var/M in pref.body_markings)
|
||||
if (!islist(pref.body_markings[M]))
|
||||
var/col = istext(pref.body_markings[M]) ? pref.body_markings[M] : "#000000"
|
||||
pref.body_markings[M] = pref.mass_edit_marking_list(M,color=col)
|
||||
@@ -198,8 +197,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
|
||||
character.set_gender(pref.biological_gender)
|
||||
|
||||
// Destroy/cyborgize organs and limbs.
|
||||
//VOREStation Edit
|
||||
character.synthetic = pref.species == "Protean" ? all_robolimbs["protean"] : null //Clear the existing var. (unless protean, then switch it to the normal protean limb)
|
||||
var/list/organs_to_edit = list()
|
||||
for (var/name in list(BP_TORSO, BP_HEAD, BP_GROIN, BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND, BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT))
|
||||
@@ -210,7 +207,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
organs_to_edit += name
|
||||
else
|
||||
organs_to_edit.Insert(x+(O.robotic == ORGAN_NANOFORM ? 1 : 0), name)
|
||||
for(var/name in organs_to_edit) //VOREStation edit end
|
||||
for(var/name in organs_to_edit)
|
||||
var/status = pref.organ_data[name]
|
||||
var/obj/item/organ/external/O = character.organs_by_name[name]
|
||||
if(O)
|
||||
@@ -247,7 +244,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
for(var/M in pref.body_markings)
|
||||
priority += 1
|
||||
var/datum/sprite_accessory/marking/mark_datum = body_marking_styles_list[M]
|
||||
//var/mark_color = "[pref.body_markings[M]]" //VOREStation Edit
|
||||
|
||||
for(var/BP in mark_datum.body_parts)
|
||||
var/obj/item/organ/external/O = character.organs_by_name[BP]
|
||||
@@ -275,16 +271,14 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
|
||||
var/datum/species/mob_species = GLOB.all_species[pref.species]
|
||||
. += "<table><tr style='vertical-align:top'><td><b>Body</b> "
|
||||
. += "(<a href='byond://?src=\ref[src];random=1'>®</A>)"
|
||||
. += "(<a title='Randomize' href='byond://?src=\ref[src];random=1'>®</A>)"
|
||||
. += "<br>"
|
||||
. += "Species: <a href='byond://?src=\ref[src];show_species=1'>[pref.species]</a><br>"
|
||||
. += "Blood Type: <a href='byond://?src=\ref[src];blood_type=1'>[pref.b_type]</a><br>"
|
||||
if(has_flag(mob_species, HAS_SKIN_TONE))
|
||||
. += "Skin Tone: <a href='byond://?src=\ref[src];skin_tone=1'>[-pref.s_tone + 35]/220</a><br>"
|
||||
. += "Needs Glasses: <a href='byond://?src=\ref[src];disabilities=[NEARSIGHTED]'><b>[pref.disabilities & NEARSIGHTED ? "Yes" : "No"]</b></a><br>"
|
||||
. += "Limbs: <a href='byond://?src=\ref[src];limbs=1'>Adjust</a> <a href='byond://?src=\ref[src];reset_limbs=1'>Reset</a><br>"
|
||||
. += "Internal Organs: <a href='byond://?src=\ref[src];organs=1'>Adjust</a><br>"
|
||||
|
||||
//display limbs below
|
||||
var/ind = 0
|
||||
for(var/name in pref.organ_data)
|
||||
@@ -545,7 +539,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
else
|
||||
return TOPIC_NOACTION
|
||||
|
||||
if(((!(setting_species.spawn_flags & SPECIES_CAN_JOIN)) || (!is_alien_whitelisted(preference_mob(),setting_species))) && !check_rights(R_ADMIN|R_EVENT, 0) && !(setting_species.spawn_flags & SPECIES_WHITELIST_SELECTABLE)) //VOREStation Edit: selectability
|
||||
if(((!(setting_species.spawn_flags & SPECIES_CAN_JOIN)) || (!is_alien_whitelisted(preference_mob(),setting_species))) && !check_rights(R_ADMIN|R_EVENT, 0) && !(setting_species.spawn_flags & SPECIES_WHITELIST_SELECTABLE))
|
||||
return TOPIC_NOACTION
|
||||
|
||||
var/prev_species = pref.species
|
||||
@@ -553,7 +547,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
if(prev_species != pref.species)
|
||||
if(!(pref.biological_gender in mob_species.genders))
|
||||
pref.set_biological_gender(mob_species.genders[1])
|
||||
pref.custom_species = null //VOREStation Edit - This is cleared on species changes
|
||||
pref.custom_species = null
|
||||
//grab one of the valid hair styles for the newly chosen species
|
||||
var/list/valid_hairstyles = pref.get_valid_hairstyles(user)
|
||||
|
||||
@@ -586,7 +580,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
var/min_age = get_min_age()
|
||||
var/max_age = get_max_age()
|
||||
pref.update_preference_by_type(/datum/preference/numeric/human/age, max(min(pref.read_preference(/datum/preference/numeric/human/age), max_age), min_age))
|
||||
pref.blood_color = setting_species.blood_color // VOREstation edit
|
||||
pref.blood_color = setting_species.blood_color
|
||||
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
@@ -713,15 +707,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
|
||||
else if(href_list["marking_style"])
|
||||
var/list/usable_markings = pref.body_markings.Copy() ^ body_marking_styles_list.Copy()
|
||||
/* VOREStation Removal - No markings whitelist, let people mix/match
|
||||
for(var/M in usable_markings)
|
||||
var/datum/sprite_accessory/S = usable_markings[M]
|
||||
var/datum/species/spec = GLOB.all_species[pref.species]
|
||||
if(!S.species_allowed.len)
|
||||
continue
|
||||
else if(!(pref.species in S.species_allowed) && !(pref.custom_base in S.species_allowed) && !(spec.base_species in S.species_allowed))
|
||||
usable_markings -= M
|
||||
*/ //VOREStation Removal End
|
||||
var/new_marking = tgui_input_list(user, "Choose a body marking:", "Character Preference", usable_markings)
|
||||
if(new_marking && CanUseTopic(user))
|
||||
pref.body_markings[new_marking] = pref.mass_edit_marking_list(new_marking) //New markings start black
|
||||
@@ -919,10 +904,8 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
continue
|
||||
if(tmp_species in M.species_cannot_use)
|
||||
continue
|
||||
//VOREStation Add - Cyberlimb whitelisting.
|
||||
if(M.whitelisted_to && !(user.ckey in M.whitelisted_to))
|
||||
continue
|
||||
//VOREStation Add End
|
||||
usable_manufacturers[company] = M
|
||||
if(!usable_manufacturers.len)
|
||||
return
|
||||
@@ -1019,11 +1002,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["disabilities"])
|
||||
var/disability_flag = text2num(href_list["disabilities"])
|
||||
pref.disabilities ^= disability_flag
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
else if(href_list["toggle_preview_value"])
|
||||
pref.equip_preview_mob ^= text2num(href_list["toggle_preview_value"])
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
@@ -1158,7 +1136,6 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
if(new_wingc)
|
||||
pref.update_preference_by_type(/datum/preference/color/human/wing_color3, new_wingc)
|
||||
return TOPIC_REFRESH_UPDATE_PREVIEW
|
||||
|
||||
return ..()
|
||||
|
||||
/datum/category_item/player_setup_item/general/body/proc/reset_limbs()
|
||||
@@ -1186,12 +1163,10 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
dat += "<center><h2>[current_species.name] \[<a href='byond://?src=\ref[src];show_species=1'>change</a>\]</h2></center><hr/>"
|
||||
dat += "<table padding='8px'>"
|
||||
dat += "<tr>"
|
||||
//vorestation edit begin
|
||||
if(current_species.wikilink)
|
||||
dat += "<td width = 400>[current_species.blurb]<br><br>See <a href=[current_species.wikilink]>the wiki</a> for more details.</td>"
|
||||
else
|
||||
dat += "<td width = 400>[current_species.blurb]</td>"
|
||||
//vorestation edit end
|
||||
dat += "<td width = 200 align='center'>"
|
||||
if("preview" in cached_icon_states(current_species.icobase))
|
||||
user << browse_rsc(icon(current_species.icobase,"preview"), "species_preview_[current_species.name].png")
|
||||
@@ -1248,7 +1223,7 @@ var/global/list/valid_bloodtypes = list("A+", "A-", "B+", "B-", "AB+", "AB-", "O
|
||||
dat += "<font color='red'><b>You cannot play as this species.</br><small>If you wish to be whitelisted, you can make an application post on <a href='byond://?src=\ref[user];preference=open_whitelist_forum'>the forums</a>.</small></b></font></br>"
|
||||
else if(restricted == 2)
|
||||
dat += "<font color='red'><b>You cannot play as this species.</br><small>This species is not available for play as a station race..</small></b></font></br>"
|
||||
if(!restricted || check_rights(R_ADMIN|R_EVENT, 0) || current_species.spawn_flags & SPECIES_WHITELIST_SELECTABLE) //VOREStation Edit: selectability
|
||||
if(!restricted || check_rights(R_ADMIN|R_EVENT, 0) || current_species.spawn_flags & SPECIES_WHITELIST_SELECTABLE)
|
||||
dat += "\[<a href='byond://?src=\ref[src];set_species=[pref.species_preview]'>select</a>\]"
|
||||
dat += "</center></body></html>"
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
character_name = list("Cappy Fuzzlyfeathers")
|
||||
|
||||
/datum/gear/fluff/james_disk
|
||||
path = /obj/item/disk/data
|
||||
path = /obj/item/disk/body_record
|
||||
display_name = "James' Disk"
|
||||
ckeywhitelist = list("cockatricexl")
|
||||
character_name = list("James Holder")
|
||||
|
||||
Reference in New Issue
Block a user