diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm index a6c86a35763..5f5972bed35 100644 --- a/code/controllers/subsystem/processing/quirks.dm +++ b/code/controllers/subsystem/processing/quirks.dm @@ -11,10 +11,12 @@ PROCESSING_SUBSYSTEM_DEF(quirks) var/list/quirks = list() //Assoc. list of all roundstart quirk datum types; "name" = /path/ var/list/quirk_points = list() //Assoc. list of quirk names and their "point cost"; positive numbers are good traits, and negative ones are bad var/list/quirk_objects = list() //A list of all quirk objects in the game, since some may process + var/list/quirk_blacklist = list() //A list a list of quirks that can not be used with each other. Format: list(quirk1,quirk2),list(quirk3,quirk4) /datum/controller/subsystem/processing/quirks/Initialize(timeofday) if(!quirks.len) SetupQuirks() + quirk_blacklist = list(list("Blind","Nearsighted")) return ..() /datum/controller/subsystem/processing/quirks/proc/SetupQuirks() diff --git a/code/datums/traits/negative.dm b/code/datums/traits/negative.dm index ec8c5c60309..d950c4f73a6 100644 --- a/code/datums/traits/negative.dm +++ b/code/datums/traits/negative.dm @@ -305,3 +305,21 @@ dumb_thing = FALSE //only once per life if(prob(1)) new/obj/item/reagent_containers/food/snacks/pastatomato(get_turf(H)) //now that's what I call spaghetti code + +/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(glasses, SLOT_GLASSES)) //if you can't put it on the user's eyes, put it in their hands, otherwise put it on their eyes + H.put_in_hands(glasses) + H.regenerate_icons() diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 17c3e8f603d..3cd6d573260 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1003,6 +1003,12 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/quirk = href_list["trait"] if(!SSquirks.quirks[quirk]) return + for(var/V in SSquirks.quirk_blacklist) //V is a list + var/list/L = V + for(var/Q in all_quirks) + if((quirk in L) && (Q in L) && !(Q == quirk)) //two quirks have lined up in the list of the list of quirks that conflict with each other, so return (see quirks.dm for more details) + to_chat(user, "[quirk] is incompatible with [Q].") + return var/value = SSquirks.quirk_points[quirk] if(value == 0) if(quirk in neutral_quirks) diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index bbb8d687d90..1bff4890fe7 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -270,6 +270,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)) + 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)) + 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 627d2bc94c0..21c53550129 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 e7bec8dbe4e..8505c01189a 100644 Binary files a/icons/obj/clothing/glasses.dmi and b/icons/obj/clothing/glasses.dmi differ