AGHHHHHHHHHHHHH

This commit is contained in:
Fox McCloud
2018-07-17 02:13:52 -04:00
parent 175d42fd58
commit 9c3fcaa53c
41 changed files with 101 additions and 184 deletions
@@ -350,16 +350,16 @@
continue
if((H.gender == MALE && S.gender == FEMALE) || (H.gender == FEMALE && S.gender == MALE))
continue
if(H.species.bodyflags & ALL_RPARTS) //If the user is a species who can have a robotic head...
if(H.dna.species2.bodyflags & ALL_RPARTS) //If the user is a species who can have a robotic head...
var/datum/robolimb/robohead = all_robolimbs[H.model]
if((H.species.name 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((H.dna.species2.name 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.
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.
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(H.species.name in S.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list.
if(H.dna.species2.name in S.species_allowed) //If the user's head is of a species the hairstyle allows, add it to the list.
valid_hairstyles += hairstyle
return valid_hairstyles
@@ -378,17 +378,17 @@
continue
if((H.gender == MALE && S.gender == FEMALE) || (H.gender == FEMALE && S.gender == MALE))
continue
if(H.species.bodyflags & ALL_RPARTS) //If the user is a species who can have a robotic head...
if(H.dna.species2.bodyflags & ALL_RPARTS) //If the user is a species who can have a robotic head...
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(H.species.name in S.species_allowed) //If this is a facial hair style native to the user's species...
if((H.species.name 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(H.dna.species2.name in S.species_allowed) //If this is a facial hair style native to the user's species...
if((H.dna.species2.name 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.
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.
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(H.species.name in S.species_allowed) //If the user's head is of a species the facial hair style allows, add it to the list.
if(H.dna.species2.name in S.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
return valid_facial_hairstyles
@@ -402,7 +402,7 @@
for(var/head_accessory in head_accessory_styles_list)
var/datum/sprite_accessory/S = head_accessory_styles_list[head_accessory]
if(!(H.species.name in S.species_allowed)) //If the user's head is not of a species the head accessory style allows, skip it. Otherwise, add it to the list.
if(!(H.dna.species2.name in S.species_allowed)) //If the user's head is not of a species the head accessory style allows, skip it. Otherwise, add it to the list.
continue
valid_head_accessories += head_accessory
@@ -432,7 +432,7 @@
continue
if(location == "head")
var/datum/sprite_accessory/body_markings/head/M = marking_styles_list[S.name]
if(H.species.bodyflags & ALL_RPARTS)//If the user is a species that can have a robotic head...
if(H.dna.species2.bodyflags & ALL_RPARTS) //If the user is a species that can have a robotic head...
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(!(S.models_allowed && (robohead.company in S.models_allowed))) //Make sure they don't get markings incompatible with their head.
continue
@@ -469,7 +469,7 @@
valid_alt_heads["None"] = alt_heads_list["None"] //The only null entry should be the "None" option, and there should always be a "None" option.
for(var/alternate_head in alt_heads_list)
var/datum/sprite_accessory/alt_heads/head = alt_heads_list[alternate_head]
if(!(H.species.name in head.species_allowed))
if(!(H.dna.species2.name in head.species_allowed))
continue
valid_alt_heads += alternate_head
@@ -56,7 +56,7 @@
found_slime_bodypart = 1
else
for(var/obj/item/organ/external/L in bodyparts) // if your limbs are squishy you can squish too!
if(L.dna.species in list("Slime People"))
if(istype(L.dna.species2, /datum/species/slime))
on_CD = handle_emote_CD()
found_slime_bodypart = 1
break
@@ -910,7 +910,7 @@
emotelist += "\nSlime people specific emotes :- squish(es)-(none)/mob"
else
for(var/obj/item/organ/external/L in bodyparts) // if your limbs are squishy you can squish too!
if(L.dna.species in list("Slime People"))
if(istype(L.dna.species2, /datum/species/slime))
emotelist += "\nSlime people body part specific emotes :- squish(es)-(none)/mob"
break
@@ -1297,9 +1297,9 @@
new_species = "Human"
else
if(!new_species)
new_species = dna.species
new_species = dna.species2
else
dna.species = new_species
dna.species2 = new_species
if(species)
if(species.name && species.name == new_species)
@@ -1380,7 +1380,7 @@
if(!dna)
dna = new /datum/dna(null)
dna.species = species.name
dna.species2 = species.name
dna.real_name = real_name
species.handle_post_spawn(src)
@@ -1497,7 +1497,7 @@
var/list/hair = list()
for(var/i in hair_styles_public_list)
var/datum/sprite_accessory/hair/tmp_hair = hair_styles_public_list[i]
if((head_organ.species.name in tmp_hair.species_allowed) && (robohead.company in tmp_hair.models_allowed)) //Populate the list of available monitor styles only with styles that the monitor-head is allowed to use.
if((head_organ.dna.species2.name in tmp_hair.species_allowed) && (robohead.company in tmp_hair.models_allowed)) //Populate the list of available monitor styles only with styles that the monitor-head is allowed to use.
hair += i
var/new_style = input(src, "Select a monitor display", "Monitor Display", head_organ.h_style) as null|anything in hair
@@ -1964,7 +1964,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X
dna.deserialize(data["dna"])
real_name = dna.real_name
name = real_name
set_species(dna.species)
set_species(dna.species2)
age = data["age"]
undershirt = data["ushirt"]
underwear = data["uwear"]
@@ -617,7 +617,7 @@
if(world.time % SLIMEPERSON_ICON_UPDATE_PERIOD > SLIMEPERSON_ICON_UPDATE_PERIOD - 20) // The 20 is because this gets called every 2 seconds, from the mob controller
for(var/organname in H.bodyparts_by_name)
var/obj/item/organ/external/E = H.bodyparts_by_name[organname]
if(istype(E) && E.dna.species == "Slime People")
if(istype(E) && E.dna && istype(E.dna.species2, /datum/species/slime))
E.sync_colour_to_human(H)
H.update_hair(0)
H.update_body()
@@ -249,7 +249,7 @@ var/global/list/damage_icon_parts = list()
icon_key += "1"
if(part)
icon_key += "[part.species.race_key]"
icon_key += "[part.dna.species2.race_key]"
icon_key += "[part.dna.GetUIState(DNA_UI_GENDER)]"
icon_key += "[part.dna.GetUIValue(DNA_UI_SKIN_TONE)]"
if(part.s_col)
@@ -379,7 +379,7 @@ var/global/list/damage_icon_parts = list()
if(head_organ && m_styles["head"]) //If the head is destroyed, forget the head markings. This prevents floating optical markings on decapitated IPCs, for example.
var/head_marking = m_styles["head"]
var/datum/sprite_accessory/head_marking_style = marking_styles_list[head_marking]
if(head_marking_style && head_marking_style.species_allowed && (head_organ.species.name in head_marking_style.species_allowed))
if(head_marking_style && head_marking_style.species_allowed && (head_organ.dna.species2.name in head_marking_style.species_allowed))
var/icon/h_marking_s = new/icon("icon" = head_marking_style.icon, "icon_state" = "[head_marking_style.icon_state]_s")
if(head_marking_style.do_colouration)
h_marking_s.Blend(m_colours["head"], ICON_ADD)
@@ -407,10 +407,10 @@ var/global/list/damage_icon_parts = list()
//base icons
var/icon/head_accessory_standing = new /icon('icons/mob/body_accessory.dmi',"accessory_none_s")
if(head_organ.ha_style && (head_organ.species.bodyflags & HAS_HEAD_ACCESSORY))
if(head_organ.ha_style && (head_organ.dna.species2.bodyflags & HAS_HEAD_ACCESSORY))
var/datum/sprite_accessory/head_accessory/head_accessory_style = head_accessory_styles_list[head_organ.ha_style]
if(head_accessory_style && head_accessory_style.species_allowed)
if(head_organ.species.name in head_accessory_style.species_allowed)
if(head_organ.dna.species2.name in head_accessory_style.species_allowed)
var/icon/head_accessory_s = new/icon("icon" = head_accessory_style.icon, "icon_state" = "[head_accessory_style.icon_state]_s")
if(head_accessory_style.do_colouration)
head_accessory_s.Blend(head_organ.headacc_colour, ICON_ADD)
@@ -451,9 +451,9 @@ var/global/list/damage_icon_parts = list()
//if(!src.get_int_organ(/obj/item/organ/internal/brain) && src.get_species() != "Machine" )//make it obvious we have NO BRAIN
// hair_standing.Blend(debrained_s, ICON_OVERLAY)
if(hair_style && hair_style.species_allowed)
if((head_organ.species.name in hair_style.species_allowed) || (head_organ.species.bodyflags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics...
if((head_organ.dna.species2.name in hair_style.species_allowed) || (head_organ.dna.species2.bodyflags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics...
var/icon/hair_s = new/icon("icon" = hair_style.icon, "icon_state" = "[hair_style.icon_state]_s")
if(head_organ.species.name == "Slime People") // I am el worstos
if(istype(head_organ.dna.species2, /datum/species/slime)) // I am el worstos
hair_s.Blend("[skin_colour]A0", ICON_AND)
else if(hair_style.do_colouration)
hair_s.Blend(head_organ.hair_colour, ICON_ADD)
@@ -497,9 +497,9 @@ var/global/list/damage_icon_parts = list()
if(head_organ.f_style)
var/datum/sprite_accessory/facial_hair/facial_hair_style = facial_hair_styles_list[head_organ.f_style]
if(facial_hair_style && facial_hair_style.species_allowed)
if((head_organ.species.name in facial_hair_style.species_allowed) || (head_organ.species.bodyflags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics...
if((head_organ.dna.species2.name in facial_hair_style.species_allowed) || (head_organ.dna.species2.bodyflags & ALL_RPARTS)) //If the head's species is in the list of allowed species for the hairstyle, or the head's species is one flagged to have bodies comprised wholly of cybernetics...
var/icon/facial_s = new/icon("icon" = facial_hair_style.icon, "icon_state" = "[facial_hair_style.icon_state]_s")
if(head_organ.species.name == "Slime People") // I am el worstos
if(istype(head_organ.dna.species2, /datum/species/slime)) // I am el worstos
facial_s.Blend("[skin_colour]A0", ICON_AND)
else if(facial_hair_style.do_colouration)
facial_s.Blend(head_organ.facial_colour, ICON_ADD)
@@ -759,8 +759,8 @@ var/global/list/damage_icon_parts = list()
if(glasses.icon_override)
new_glasses = image("icon" = glasses.icon_override, "icon_state" = "[glasses.icon_state]")
else if(glasses.sprite_sheets && glasses.sprite_sheets[head_organ.species.name])
new_glasses = image("icon" = glasses.sprite_sheets[head_organ.species.name], "icon_state" = "[glasses.icon_state]")
else if(glasses.sprite_sheets && glasses.sprite_sheets[head_organ.dna.species2.name])
new_glasses = image("icon" = glasses.sprite_sheets[head_organ.dna.species2.name], "icon_state" = "[glasses.icon_state]")
else
new_glasses = image("icon" = 'icons/mob/eyes.dmi', "icon_state" = "[glasses.icon_state]")
@@ -227,7 +227,7 @@
H.s_tone = s_tone
H.species.updatespeciescolor(H, 0) //The mob's species wasn't set, so it's almost certainly different than the character's species at the moment. Thus, we need to be owner-insensitive.
var/obj/item/organ/external/chest/C = H.get_organ("chest")
icobase = C.icobase ? C.icobase : C.species.icobase
icobase = C.icobase ? C.icobase : C.dna.species2.icobase
if(H.species.bodyflags & HAS_TAIL)
coloured_tail = H.tail ? H.tail : H.species.tail