Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 806e733

Browse files
committed
blindspot
1 parent 8bf09dd commit 806e733

File tree

5 files changed

+39
-4
lines changed

5 files changed

+39
-4
lines changed

code/__DEFINES/traits/declarations.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
#define TRAIT_BADMAIL "badmail" //Your mail is going to be worse than average
175175
#define TRAIT_SHORT_TELOMERES "short_telomeres" //You cannot be CLOONED
176176
#define TRAIT_LONG_TELOMERES "long_telomeres" //You get CLOONED faster!!!
177+
#define TRAIT_BLINDSPOT "blindspot" // cant see behind you
177178

178179

179180
////////////////////////////////////////////////////////////////////////////////////

code/_onclick/hud/fullscreen.dm

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
if (client && screen.should_show_to(src))
1515
screen.update_for_view(client.view)
1616
client.screen += screen
17-
17+
1818
if(screen.needs_offsetting)
1919
SET_PLANE_EXPLICIT(screen, PLANE_TO_TRUE(screen.plane), src)
2020

@@ -241,3 +241,9 @@
241241
icon_state = "blue_eye"
242242
plane = FULLSCREEN_PLANE
243243
layer = CURSE_LAYER
244+
245+
/// Blindspot quirk - has 4 directions
246+
/atom/movable/screen/fullscreen/blindspot
247+
icon_state = "blindspot"
248+
plane = FULLSCREEN_PLANE
249+
layer = BLIND_LAYER

code/datums/traits/negative.dm

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@
678678
gain_text = span_danger("You remember your allergic reaction to a common medicine.")
679679
lose_text = span_notice("You no longer are allergic to medicine.")
680680

681-
var/allergy_chem_list = list(
681+
var/allergy_chem_list = list(
682682
/datum/reagent/medicine/inacusiate,
683683
/datum/reagent/medicine/silver_sulfadiazine,
684684
/datum/reagent/medicine/styptic_powder,
@@ -707,7 +707,7 @@
707707
var/reagent_id
708708
COOLDOWN_DECLARE(allergies)
709709
/// how long allergies last after getting rid of the allergen
710-
var/cooldown_duration = 10 SECONDS
710+
var/cooldown_duration = 10 SECONDS
711711
/// Wether the person is experiencing anaphylatic shock or not
712712
COOLDOWN_DECLARE(anaphylaxis)
713713
/// How long anaphylactic shock lasts
@@ -751,7 +751,7 @@
751751

752752
else if(!COOLDOWN_FINISHED(src, allergies)) //if the cooldown is going
753753
//external indicator that it's happening
754-
if(prob(50))
754+
if(prob(50))
755755
switch(rand(0, 2))
756756
if(0)
757757
H.emote("cough")
@@ -1017,3 +1017,28 @@
10171017

10181018
/datum/quirk/lactose_intolerance/proc/on_species_gain(datum/source, datum/species/new_species)
10191019
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+
/datum/quirk/blindspot/add()
1031+
quirk_holder.overlay_fullscreen("blindspot", /atom/movable/screen/fullscreen/blindspot)
1032+
quirk_holder.blindspot_overlay = WEAKREF(quirk_holder.screens["blindspot"])
1033+
RegisterSignal(quirk_holder, COMSIG_ATOM_DIR_CHANGE, PROC_REF(change_dir))
1034+
1035+
/datum/quirk/blindspot/remove()
1036+
quirk_holder.clear_fullscreen("blindspot")
1037+
quirk_holder.blindspot_overlay = null
1038+
UnregisterSignal(quirk_holder, COMSIG_ATOM_DIR_CHANGE)
1039+
1040+
/datum/quirk/blindspot/proc/change_dir(atom/movable/source, olddir, newdir)
1041+
SIGNAL_HANDLER
1042+
var/atom/movable/screen/fullscreen/blindspot/fs_ov = quirk_holder.blindspot_overlay?.resolve()
1043+
if(istype(fs_ov))
1044+
fs_ov.dir = newdir

code/modules/mob/mob_defines.dm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@
249249
///Contains the fullscreen overlays the mob can see (from 'code/_onclick/hud/fullscreen.dm')
250250
var/list/screens = list()
251251

252+
/// Contains the blindspot overlay, if one is in use. Here for performance reasons
253+
var/datum/weakref/blindspot_overlay
254+
252255
///The HUD type the mob will gain on Initialize. (from 'code/_onclick/hud/hud.dm')
253256
var/hud_type = /datum/hud
254257

icons/mob/screen_full.dmi

99.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)