diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm
index 208b93c0c53..3e2448fa8fe 100644
--- a/code/game/objects/items/weapons/cosmetics.dm
+++ b/code/game/objects/items/weapons/cosmetics.dm
@@ -91,14 +91,15 @@
/obj/item/weapon/razor/attack(mob/living/carbon/M as mob, mob/user as mob)
if(ishuman(M))
var/mob/living/carbon/human/H = M
+ var/obj/item/organ/external/head/C = H.organs_by_name["head"]
+ var/datum/robolimb/robohead = all_robolimbs[C.model]
if(user.zone_sel.selecting == "mouth")
if(!get_location_accessible(H, "mouth"))
to_chat(user, "The mask is in the way.")
return
- if(H.species && H.species.flags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, but doesn't have one...
- if(!H.client.prefs.rlimb_data["head"])
- to_chat(user, "You find yourself disappointed at the appalling lack of facial hair.")
- return
+ if((H.species && H.species.flags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
+ to_chat(user, "You find yourself disappointed at the appalling lack of facial hair.")
+ return
if(H.f_style == "Shaved")
to_chat(user, "Already clean-shaven.")
return
@@ -127,10 +128,9 @@
if(!get_location_accessible(H, "head"))
to_chat(user, "The headgear is in the way.")
return
- if(H.species && H.species.flags & ALL_RPARTS) //If the target is of a species that can have prosthetic heads, but doesn't have one...
- if(!H.client.prefs.rlimb_data["head"])
- to_chat(user, "You find yourself disappointed at the appalling lack of hair.")
- return
+ if((H.species && H.species.flags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'...
+ to_chat(user, "You find yourself disappointed at the appalling lack of hair.")
+ return
if(H.h_style == "Bald" || H.h_style == "Balding Hair" || H.h_style == "Skinhead")
to_chat(user, "There is not enough hair left to shave...")
return
diff --git a/code/game/objects/items/weapons/scissors.dm b/code/game/objects/items/weapons/scissors.dm
index 34b700d440d..3032d636d19 100644
--- a/code/game/objects/items/weapons/scissors.dm
+++ b/code/game/objects/items/weapons/scissors.dm
@@ -30,18 +30,23 @@
//this is largely copypasted from there.
//handle facial hair (if necessary)
var/list/species_facial_hair = list()
+ var/obj/item/organ/external/head/C = H.organs_by_name["head"]
+ var/datum/robolimb/robohead = all_robolimbs[C.model]
if(H.gender == MALE || H.get_species() == "Vulpkanin")
if(H.species)
for(var/i in facial_hair_styles_list)
var/datum/sprite_accessory/facial_hair/tmp_facial = facial_hair_styles_list[i]
if(H.species.name in tmp_facial.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human hair styles.
+ if((H.species.flags & ALL_RPARTS) && robohead.is_monitor) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
+ to_chat(user, "You are unable to find anything on [H]'s face worth cutting. How disappointing.")
+ return
species_facial_hair += i
else
- if(H.species.flags & ALL_RPARTS)
- if(("head" in H.client.prefs.rlimb_data) && ("Human" in tmp_facial.species_allowed))
- species_facial_hair += i
- else
- return
+ if((H.species.flags & ALL_RPARTS) && !robohead.is_monitor && ("Human" in tmp_facial.species_allowed)) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
+ species_facial_hair += i
+ else //Otherwise, they won't be getting any hairstyles.
+ to_chat(user, "You are unable to find anything on [H]'s face worth cutting. How disappointing.")
+ return
else
species_facial_hair = facial_hair_styles_list
var/f_new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in species_facial_hair
@@ -51,15 +56,16 @@
for(var/i in hair_styles_list)
var/datum/sprite_accessory/hair/tmp_hair = hair_styles_list[i]
if(H.species.name in tmp_hair.species_allowed) //If the species is allowed to have the style, add the style to the list. Or, if the character has a prosthetic head, give them the human facial hair styles.
- if((H.species.flags & ALL_RPARTS) && !("head" in H.client.prefs.rlimb_data))
+ if((H.species.flags & ALL_RPARTS) && robohead.is_monitor) //If the character is of a species that can have full body prosthetics and their head doesn't suport human hair 'wigs', don't add the style to the list.
+ to_chat(user, "You are unable to find anything on [H]'s head worth cutting. How disappointing.")
return
species_hair += i
else
- if(H.species.flags & ALL_RPARTS)
- if(("head" in H.client.prefs.rlimb_data) && ("Human" in tmp_hair.species_allowed))
- species_facial_hair += i
- else
- return
+ if((H.species.flags & ALL_RPARTS) && !robohead.is_monitor && ("Human" in tmp_hair.species_allowed)) //If the target is of a species that can have prosthetic heads, and the head supports human hair 'wigs' AND the hair-style is human-suitable, add it to the list.
+ species_facial_hair += i
+ else //Otherwise, they won't be getting any hairstyles.
+ to_chat(user, "You are unable to find anything on [H]'s head worth cutting. How disappointing.")
+ return
else
species_hair = hair_styles_list
var/h_new_style = input(user, "Select a hair style", "Grooming") as null|anything in species_hair
@@ -103,7 +109,7 @@
playsound(loc, "sound/items/Wirecutter.ogg", 50, 1, -1)
if(do_after(user, 50, target = H))
playsound(loc, "sound/weapons/bladeslice.ogg", 50, 1, -1)
- user.visible_message("[user] abruptly stops cutting [M]'s hair and slices their throat!", "You stop cutting [M]'s hair and slice their throat!")
+ user.visible_message("[user] abruptly stops cutting [M]'s hair and slices their throat!", "You stop cutting [M]'s hair and slice their throat!") //Just a little off the top.
H.losebreath += 10 //30 Oxy damage over time
H.apply_damage(18, BRUTE, "head", sharp =1, edge =1, used_weapon = "scissors")
var/turf/location = get_turf(H)
diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm
index 2d430c19328..767fa014910 100644
--- a/code/modules/client/preferences.dm
+++ b/code/modules/client/preferences.dm
@@ -1204,12 +1204,12 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
H.model = rlimb_data["head"]
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(species in S.species_allowed)
- if((!rlimb_data["head"] || robohead.is_monitor) && (robohead.company in S.models_allowed)) //If the Machine character has the default Morpheus screen head or another screen head
+ if(robohead.is_monitor && (robohead.company in S.models_allowed)) //If the Machine character has the default Morpheus screen head or another screen head
//and said head is in the hair style's allowed models list...
valid_hairstyles[hairstyle] = S //Allow them to select the hairstyle.
continue
else
- if(!rlimb_data["head"] || robohead.is_monitor) //Monitors (incl. the default morpheus head) cannot have wigs (human hairstyles).
+ if(robohead.is_monitor) //Monitors (incl. the default morpheus head) cannot have wigs (human hairstyles).
continue
else if(!robohead.is_monitor && ("Human" in S.species_allowed) || S.name == "Bald")
valid_hairstyles[hairstyle] = S
@@ -1268,9 +1268,9 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
var/obj/item/organ/external/head/H = new()
H.model = rlimb_data["head"]
var/datum/robolimb/robohead = all_robolimbs[H.model]
- if((!("head" in rlimb_data) || robohead.is_monitor) && M.name != "None") //If the character can have prosthetic heads and they have the default Morpheus head (or another monitor-head), no optic markings.
+ if(robohead.is_monitor && M.name != "None") //If the character can have prosthetic heads and they have the default Morpheus head (or another monitor-head), no optic markings.
continue
- else if(("head" in rlimb_data || !robohead.is_monitor) && M.name != "None") //Otherwise, if they DON'T have the default head and the head's not a monitor but the head's not in the style's list of allowed models, skip.
+ else if(!robohead.is_monitor && M.name != "None") //Otherwise, if they DON'T have the default head and the head's not a monitor but the head's not in the style's list of allowed models, skip.
if(!(robohead.company in M.models_allowed))
continue
@@ -1317,11 +1317,11 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
H.model = rlimb_data["head"]
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(species in S.species_allowed)
- if(!rlimb_data["head"] || robohead.is_monitor) //If the Machine character has the default Morpheus screen head or another screen head and they're allowed to have the style, let them have it.
+ if(robohead.is_monitor) //If the Machine character has the default Morpheus screen head or another screen head and they're allowed to have the style, let them have it.
valid_facialhairstyles[facialhairstyle] = S
continue
else
- if(!rlimb_data["head"] || robohead.is_monitor) //Monitors (incl. the default morpheus head) cannot have wigs (human facial hairstyles).
+ if(robohead.is_monitor) //Monitors (incl. the default morpheus head) cannot have wigs (human facial hairstyles).
continue
else if(!robohead.is_monitor && ("Human" in S.species_allowed) || S.name == "Shaved")
valid_facialhairstyles[facialhairstyle] = S
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 6a5cca19723..0af960d9538 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -1589,20 +1589,28 @@
to_chat(src, "You cannot change your monitor or optical display in your current state.")
return
+ var/obj/item/organ/external/head/head_organ = get_organ("head")
+ if(!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED)) //If the rock'em-sock'em robot's head came off during a fight, they shouldn't be able to change their screen/optics.
+ to_chat(src, "Where's your head at? Can't change your monitor/display without one.")
+ return
+
if(species.flags & ALL_RPARTS) //If they can have a fully cybernetic body...
var/obj/item/organ/external/head/H = organs_by_name["head"]
var/datum/robolimb/robohead = all_robolimbs[H.model]
if(!H)
return
- if(!robohead.is_monitor) //If head is present here, that means it's not the default Morpheus. Thus, no screen to adjust. Instead, let them change the colour of their optics!
+ if(!robohead.is_monitor) //If they've got a prosthetic head and it isn't a monitor, they've no screen to adjust. Instead, let them change the colour of their optics!
var/optic_colour = input(src, "Select optic colour", rgb(r_markings, g_markings, b_markings)) as color|null
+ if(incapacitated())
+ to_chat(src, "You were interrupted while changing the colour of your optics.")
+ return
if(optic_colour)
r_markings = hex2num(copytext(optic_colour, 2, 4))
g_markings = hex2num(copytext(optic_colour, 4, 6))
b_markings = hex2num(copytext(optic_colour, 6, 8))
update_markings()
- else if(robohead.is_monitor)//Means that the character has the default Morpheus head, which has a screen. Time to customize.
+ else if(robohead.is_monitor) //Means that the character's head is a monitor (has a screen). Time to customize.
var/list/hair = list()
for(var/i in hair_styles_list)
var/datum/sprite_accessory/hair/tmp_hair = hair_styles_list[i]
@@ -1611,6 +1619,7 @@
var/new_style = input(src, "Select a monitor display", "Monitor Display", h_style) as null|anything in hair
if(incapacitated())
+ to_chat(src, "You were interrupted while changing your monitor display.")
return
if(new_style)
h_style = new_style
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index 623cc9df1e9..48f5701a671 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -365,6 +365,9 @@ var/global/list/damage_icon_parts = list()
if(m_style && m_style != "None")
var/datum/sprite_accessory/marking_style = marking_styles_list[m_style]
if(marking_style)
+ var/obj/item/organ/external/head/head_organ = get_organ("head")
+ if((!head_organ || head_organ.is_stump() || (head_organ.status & ORGAN_DESTROYED)) && marking_style.marking_location == "head")
+ return //If the head is destroyed and it is the organ the marking is located on, get us out of here. This prevents floating optical markings on decapitated IPCs, for example.
var/icon/markings_s = new/icon("icon" = marking_style.icon, "icon_state" = "[marking_style.icon_state]_s")
if(marking_style.do_colouration)
markings_s.Blend(rgb(r_markings, g_markings, b_markings), ICON_ADD)
diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm
index a1e764eb2b3..e5c0c6ab38c 100644
--- a/code/modules/mob/new_player/sprite_accessories.dm
+++ b/code/modules/mob/new_player/sprite_accessories.dm
@@ -44,6 +44,7 @@
// Restrict some styles to specific species
var/list/species_allowed = list("Human", "Slime People")
var/models_allowed = list() //Specifies which, if any, hairstyles can be accessed by which prosthetics. Should equal the manufacturing company name in robolimbs.dm.
+ var/marking_location //Specifies which bodypart a body marking is located on.
// Whether or not the accessory can be affected by colouration
var/do_colouration = 1
@@ -1911,6 +1912,7 @@
species_allowed = list("Machine")
icon_state = "optics"
models_allowed = list("Bishop Cybernetics", "Hesphiastos Industries", "Ward-Takahashi", "Xion Manufacturing Group", "Zeng-Hu Pharmaceuticals") //Should be the same as the manufacturing company of the limb in robolimbs.dm
+ marking_location = "head"
/datum/sprite_accessory/body_markings/optics/bishop_alt
name = "Bishop Alt. Optics"