diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index f42fe688c5..178e1aaeb0 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -357,6 +357,7 @@ to_chat(quirk_holder, "Your antagonistic nature has caused your voice to be heard.") qdel(src) + /datum/quirk/unstable name = "Unstable" desc = "Due to past troubles, you are unable to recover your sanity if you lose it. Be very careful managing your mood!" @@ -365,3 +366,21 @@ gain_text = "There's a lot on your mind right now." lose_text = "Your mind finally feels calm." medical_record_text = "Patient's mind is in a vulnerable state, and cannot recover from traumatic events." + +/datum/quirk/blindness + name = "Blind" + desc = "You are completely blind, nothing can counteract this." + value = -4 + gain_text = "You can't see anything." + lose_text = "You miraculously gain back your vision." + medical_record_text = "Subject has permanent blindness." + +/datum/quirk/blindness/add() + quirk_holder.become_blind(ROUNDSTART_TRAIT) + +/datum/quirk/blindness/on_spawn() + var/mob/living/carbon/human/H = quirk_holder + var/obj/item/clothing/glasses/sunglasses/blindfold/white/glasses = new(get_turf(H)) + if(!H.equip_to_slot_if_possible(glasses, SLOT_GLASSES, bypass_equip_delay_self = TRUE)) //if you can't put it on the user's eyes, put it in their hands, otherwise put it on their eyes eyes + H.put_in_hands(glasses) + H.regenerate_icons() diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index 097b10cae5..4928de288f 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -281,6 +281,33 @@ ..() user.cure_blind("blindfold_[REF(src)]") +/obj/item/clothing/glasses/sunglasses/blindfold/white + name = "blind personnel blindfold" + desc = "Indicates that the wearer suffers from blindness." + icon_state = "blindfoldwhite" + item_state = "blindfoldwhite" + var/colored_before = FALSE + +/obj/item/clothing/glasses/sunglasses/blindfold/white/equipped(mob/living/carbon/human/user, slot) + if(ishuman(user) && slot == SLOT_GLASSES) + update_icon(user) + user.update_inv_glasses() //Color might have been changed by update_icon. + ..() + +/obj/item/clothing/glasses/sunglasses/blindfold/white/update_icon(mob/living/carbon/human/user) + if(ishuman(user) && !colored_before) + add_atom_colour("#[user.eye_color]", FIXED_COLOUR_PRIORITY) + colored_before = TRUE + +/obj/item/clothing/glasses/sunglasses/blindfold/white/worn_overlays(isinhands = FALSE, file2use) + . = list() + if(!isinhands && ishuman(loc) && !colored_before) + var/mob/living/carbon/human/H = loc + var/mutable_appearance/M = mutable_appearance('icons/mob/eyes.dmi', "blindfoldwhite") + M.appearance_flags |= RESET_COLOR + M.color = "#[H.eye_color]" + . += M + /obj/item/clothing/glasses/sunglasses/big desc = "Strangely ancient technology used to help provide rudimentary eye cover. Larger than average enhanced shielding blocks flashes." icon_state = "bigsunglasses" diff --git a/icons/mob/eyes.dmi b/icons/mob/eyes.dmi index 6cce82b5f7..b981a18f06 100644 Binary files a/icons/mob/eyes.dmi and b/icons/mob/eyes.dmi differ diff --git a/icons/obj/clothing/glasses.dmi b/icons/obj/clothing/glasses.dmi index 2cdf97bd37..75a03a585c 100644 Binary files a/icons/obj/clothing/glasses.dmi and b/icons/obj/clothing/glasses.dmi differ