|
678 | 678 | gain_text = span_danger("You remember your allergic reaction to a common medicine.") |
679 | 679 | lose_text = span_notice("You no longer are allergic to medicine.") |
680 | 680 |
|
681 | | - var/allergy_chem_list = list( |
| 681 | + var/allergy_chem_list = list( |
682 | 682 | /datum/reagent/medicine/inacusiate, |
683 | 683 | /datum/reagent/medicine/silver_sulfadiazine, |
684 | 684 | /datum/reagent/medicine/styptic_powder, |
|
707 | 707 | var/reagent_id |
708 | 708 | COOLDOWN_DECLARE(allergies) |
709 | 709 | /// how long allergies last after getting rid of the allergen |
710 | | - var/cooldown_duration = 10 SECONDS |
| 710 | + var/cooldown_duration = 10 SECONDS |
711 | 711 | /// Wether the person is experiencing anaphylatic shock or not |
712 | 712 | COOLDOWN_DECLARE(anaphylaxis) |
713 | 713 | /// How long anaphylactic shock lasts |
|
751 | 751 |
|
752 | 752 | else if(!COOLDOWN_FINISHED(src, allergies)) //if the cooldown is going |
753 | 753 | //external indicator that it's happening |
754 | | - if(prob(50)) |
| 754 | + if(prob(50)) |
755 | 755 | switch(rand(0, 2)) |
756 | 756 | if(0) |
757 | 757 | H.emote("cough") |
|
1017 | 1017 |
|
1018 | 1018 | /datum/quirk/lactose_intolerance/proc/on_species_gain(datum/source, datum/species/new_species) |
1019 | 1019 | new_species.toxic_food |= DAIRY // no escape from your terrible fate |
| 1020 | + |
| 1021 | +/datum/quirk/blindspot |
| 1022 | + name = "Blindspot" |
| 1023 | + desc = "You lack the sixth sense and cannot see behind yourself." |
| 1024 | + icon = "arrows-to-eye" |
| 1025 | + gain_text = span_danger("You can't see behind yourself anymore.") |
| 1026 | + lose_text = span_notice("You can see behind yourself again.") |
| 1027 | + value = -2 |
| 1028 | + medical_record_text = "Patient has trouble with spatial awareness." |
| 1029 | + |
| 1030 | +#define BLINDSPOT_NORTH "blindspotN" |
| 1031 | +#define BLINDSPOT_SOUTH "blindspotS" |
| 1032 | +#define BLINDSPOT_EAST "blindspotE" |
| 1033 | +#define BLINDSPOT_WEST "blindspotW" |
| 1034 | + |
| 1035 | +/datum/quirk/blindspot/add() |
| 1036 | + quirk_holder.blindspot_overlay = new/list(10) |
| 1037 | + var/atom/movable/screen/fullscreen/blindspot/north_blindspot = quirk_holder.overlay_fullscreen(BLINDSPOT_NORTH, /atom/movable/screen/fullscreen/blindspot) |
| 1038 | + var/atom/movable/screen/fullscreen/blindspot/south_blindspot = quirk_holder.overlay_fullscreen(BLINDSPOT_SOUTH, /atom/movable/screen/fullscreen/blindspot) |
| 1039 | + var/atom/movable/screen/fullscreen/blindspot/east_blindspot = quirk_holder.overlay_fullscreen(BLINDSPOT_EAST, /atom/movable/screen/fullscreen/blindspot) |
| 1040 | + var/atom/movable/screen/fullscreen/blindspot/west_blindspot = quirk_holder.overlay_fullscreen(BLINDSPOT_WEST, /atom/movable/screen/fullscreen/blindspot) |
| 1041 | + quirk_holder.blindspot_overlay[NORTH] = WEAKREF(north_blindspot) |
| 1042 | + quirk_holder.blindspot_overlay[SOUTH] = WEAKREF(south_blindspot) |
| 1043 | + quirk_holder.blindspot_overlay[EAST] = WEAKREF(east_blindspot) |
| 1044 | + quirk_holder.blindspot_overlay[WEST] = WEAKREF(west_blindspot) |
| 1045 | + north_blindspot.dir = NORTH |
| 1046 | + south_blindspot.dir = SOUTH |
| 1047 | + east_blindspot.dir = EAST |
| 1048 | + west_blindspot.dir = WEST |
| 1049 | + north_blindspot.alpha = (quirk_holder.dir == NORTH) * 255 |
| 1050 | + south_blindspot.alpha = (quirk_holder.dir == SOUTH) * 255 |
| 1051 | + east_blindspot.alpha = (quirk_holder.dir == EAST) * 255 |
| 1052 | + west_blindspot.alpha = (quirk_holder.dir == WEST) * 255 |
| 1053 | + RegisterSignal(quirk_holder, COMSIG_ATOM_DIR_CHANGE, PROC_REF(change_dir)) |
| 1054 | + |
| 1055 | +/datum/quirk/blindspot/remove() |
| 1056 | + quirk_holder.clear_fullscreen(BLINDSPOT_NORTH) |
| 1057 | + quirk_holder.clear_fullscreen(BLINDSPOT_SOUTH) |
| 1058 | + quirk_holder.clear_fullscreen(BLINDSPOT_EAST) |
| 1059 | + quirk_holder.clear_fullscreen(BLINDSPOT_WEST) |
| 1060 | + quirk_holder.blindspot_overlay = null |
| 1061 | + UnregisterSignal(quirk_holder, COMSIG_ATOM_DIR_CHANGE) |
| 1062 | + |
| 1063 | +/datum/quirk/blindspot/proc/change_dir(atom/movable/source, olddir, newdir) |
| 1064 | + SIGNAL_HANDLER |
| 1065 | + if(olddir == 0 || newdir == 0) |
| 1066 | + return |
| 1067 | + if(olddir == newdir) |
| 1068 | + return |
| 1069 | + if(!quirk_holder.blindspot_overlay) |
| 1070 | + return |
| 1071 | + var/atom/movable/screen/fullscreen/blindspot/old_spot = quirk_holder.blindspot_overlay[olddir]?.resolve() |
| 1072 | + var/atom/movable/screen/fullscreen/blindspot/new_spot = quirk_holder.blindspot_overlay[newdir]?.resolve() |
| 1073 | + if(!istype(old_spot) || !istype(new_spot)) |
| 1074 | + return |
| 1075 | + animate(old_spot, 0.5 SECONDS, easing = CIRCULAR_EASING|EASE_IN, alpha = 0) |
| 1076 | + animate(new_spot, 0.5 SECONDS, easing = CIRCULAR_EASING|EASE_OUT, alpha = 255) |
| 1077 | + |
| 1078 | +#undef BLINDSPOT_NORTH |
| 1079 | +#undef BLINDSPOT_SOUTH |
| 1080 | +#undef BLINDSPOT_EAST |
| 1081 | +#undef BLINDSPOT_WEST |
0 commit comments