Makes psyker playable (#91490)

-# so help me space jesus if this doesn't compile despite working fine
on my local machine
Makes burdened chaplain and psyker pirates not blind, so that someone
playing them isnt assaulted by irregularly flashing monochromatic lights
on a black background. Instead the echolocation outlines will simply
pulse to highlight nearby objects regardless of lighting conditions or
other vision obscuring effects. adds support for if you want
psykerization to blind people or not.
keeps bitrunner psykers blind, since that's the point of the domain.
Just avoid those domains if you can't handle the effect, sorry.
A. It makes psyker an actual useful ability. I have personally seen, as
a ghost, psyker pirates fail to navigate out of their ship for a full
five minutes, and then die horribly because they are unable to actually
do anything because they're **Worse than blinded** since blindness has a
small radius of working vision.

B. In-game effects should not cause **real world eye pain and nausea**
thank you very much.

neat fact: blind seers only really work when the seer-ing makes up for
the blindness.

example of outline highlighting hidden underfloor objects (like that
satchel!) while user is not horribly blinded

![image](https://github.com/user-attachments/assets/04ce713d-5e4a-434d-b41a-5206240a27ff)

🆑
fix: blind psykers are not blinded twice by two different sources, head
and brain.
qol: Psyker bounty hunters and chaplains are no longer blinded by
default, so as to reduce the amount of eye strain from the echolocation
effect. The echolocation virtual domains remain as they are.
/🆑

---------

Co-authored-by: ThrowawayUseless <notarealemail@emailservice.fake>
This commit is contained in:
throwawayuseless
2025-06-15 15:52:11 -04:00
committed by Roxy
co-authored by ThrowawayUseless
parent 29abb725a9
commit 82eed58e9d
4 changed files with 39 additions and 28 deletions
+24 -10
View File
@@ -11,6 +11,8 @@
var/fade_out_time = 0.3 SECONDS
/// Are images static? If yes, spawns them on the turf and makes them not change location. Otherwise they change location and pixel shift with the original.
var/images_are_static = TRUE
/// Does this echolocation cause us to go blind?
var/blinding = TRUE
/// With mobs that have this echo group in their echolocation receiver trait, we share echo images.
var/echo_group = null
/// This trait blocks us from receiving echolocation.
@@ -32,7 +34,7 @@
/// Cooldown for the echolocation.
COOLDOWN_DECLARE(cooldown_last)
/datum/component/echolocation/Initialize(echo_range, cooldown_time, image_expiry_time, fade_in_time, fade_out_time, images_are_static, blocking_trait, echo_group, echo_icon, color_path, use_echo = TRUE, show_own_outline = FALSE, personal_color = "#ffffff") // SKYRAT EDIT CHANGE - ORIGINAL: /datum/component/echolocation/Initialize(echo_range, cooldown_time, image_expiry_time, fade_in_time, fade_out_time, images_are_static, blocking_trait, echo_group, echo_icon = "echo", color_path)
/datum/component/echolocation/Initialize(echo_range, cooldown_time, image_expiry_time, fade_in_time, fade_out_time, images_are_static, blocking_trait, echo_group, echo_icon, color_path, blinding, use_echo = TRUE, show_own_outline = FALSE, personal_color = "#ffffff") // SKYRAT EDIT CHANGE - ORIGINAL: /datum/component/echolocation/Initialize(echo_range, cooldown_time, image_expiry_time, fade_in_time, fade_out_time, images_are_static, blocking_trait, echo_group, echo_icon = "echo", color_path, blinding)
. = ..()
var/mob/living/echolocator = parent
if(!istype(echolocator))
@@ -51,6 +53,8 @@
src.fade_in_time = fade_in_time
if(!isnull(fade_out_time))
src.fade_out_time = fade_out_time
if(!isnull(blinding))
src.blinding = blinding
if(!isnull(images_are_static))
src.images_are_static = images_are_static
if(!isnull(blocking_trait))
@@ -63,7 +67,8 @@
if(ispath(color_path))
client_colour = echolocator.add_client_colour(color_path, src.echo_group)
echolocator.add_traits(list(TRAIT_ECHOLOCATION_RECEIVER, TRAIT_TRUE_NIGHT_VISION), src.echo_group) //so they see all the tiles they echolocated, even if they are in the dark
echolocator.become_blind(ECHOLOCATION_TRAIT)
if(blinding)
echolocator.become_blind(ECHOLOCATION_TRAIT)
// SKYRAT EDIT ADDITION START
if (use_echo) // add constructor toggle to not use the eye overlay
echolocator.overlay_fullscreen("echo", /atom/movable/screen/fullscreen/echo, echo_icon)
@@ -75,8 +80,9 @@
var/mob/living/echolocator = parent
QDEL_NULL(client_colour)
echolocator.remove_traits(list(TRAIT_ECHOLOCATION_RECEIVER, TRAIT_TRUE_NIGHT_VISION), echo_group)
echolocator.cure_blind(ECHOLOCATION_TRAIT)
echolocator.clear_fullscreen("echo")
if(blinding)
echolocator.cure_blind(ECHOLOCATION_TRAIT)
echolocator.clear_fullscreen("echo")
for(var/mob/living/echolocate_receiver as anything in receivers)
if(!echolocate_receiver.client)
continue
@@ -101,11 +107,19 @@
real_echo_range += 2
var/list/filtered = list()
var/list/seen = dview(real_echo_range, get_turf(echolocator.client?.eye || echolocator), invis_flags = echolocator.see_invisible)
for(var/atom/seen_atom as anything in seen)
if(!seen_atom.alpha)
continue
if(allowed_paths[seen_atom.type])
filtered += seen_atom
if(blinding)
for(var/atom/seen_atom as anything in seen)
if(!seen_atom.alpha)
continue
if(allowed_paths[seen_atom.type])
filtered += seen_atom
else
var/list/ranged_atoms = range(real_echo_range, get_turf(echolocator.client?.eye || echolocator))
for(var/atom/possible_atom as anything in ranged_atoms)
if(!possible_atom.alpha)
continue
if(allowed_paths[possible_atom.type])
filtered += possible_atom
if(!length(filtered))
return
var/current_time = "[world.time]"
@@ -120,7 +134,7 @@
/datum/component/echolocation/proc/show_image(image/input_appearance, atom/input, current_time)
var/image/final_image = image(input_appearance)
final_image.layer += EFFECTS_LAYER
//final_image.layer += FOV_EFFECT_LAYER
final_image.plane = FULLSCREEN_PLANE
final_image.loc = images_are_static ? get_turf(input) : input
final_image.dir = input.dir