diff --git a/code/datums/components/echolocation.dm b/code/datums/components/echolocation.dm index e7e2fab5a1a..7ae0bd49b57 100644 --- a/code/datums/components/echolocation.dm +++ b/code/datums/components/echolocation.dm @@ -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 diff --git a/code/game/machinery/experimental_cloner/experimental_cloner_fuckup.dm b/code/game/machinery/experimental_cloner/experimental_cloner_fuckup.dm index 681dd8c6ccd..96168a953ad 100644 --- a/code/game/machinery/experimental_cloner/experimental_cloner_fuckup.dm +++ b/code/game/machinery/experimental_cloner/experimental_cloner_fuckup.dm @@ -143,7 +143,7 @@ weight = CLONER_FAILURE_RARE /datum/experimental_cloner_fuckup/total_failure/post_emerged(mob/living/carbon/human/victim) - victim.slow_psykerize() + victim.slow_psykerize(blind_them = TRUE) /// Just fuck me up /datum/experimental_cloner_fuckup/total_failure diff --git a/code/modules/bitrunning/outfits.dm b/code/modules/bitrunning/outfits.dm index 5e9f7d12c97..0da85853f51 100644 --- a/code/modules/bitrunning/outfits.dm +++ b/code/modules/bitrunning/outfits.dm @@ -13,7 +13,7 @@ /datum/outfit/echolocator/post_equip(mob/living/carbon/human/user, visuals_only) . = ..() - user.psykerize() + user.psykerize(is_blinding = TRUE) /datum/outfit/bitductor diff --git a/code/modules/religion/burdened/psyker.dm b/code/modules/religion/burdened/psyker.dm index e28be0d4e55..446e794436d 100644 --- a/code/modules/religion/burdened/psyker.dm +++ b/code/modules/religion/burdened/psyker.dm @@ -9,10 +9,11 @@ ) organ_traits = list(TRAIT_ADVANCEDTOOLUSER, TRAIT_LITERATE, TRAIT_CAN_STRIP, TRAIT_ANTIMAGIC_NO_SELFBLOCK) w_class = WEIGHT_CLASS_NORMAL + var/does_it_blind = FALSE /obj/item/organ/brain/psyker/on_mob_insert(mob/living/carbon/inserted_into) . = ..() - inserted_into.AddComponent(/datum/component/echolocation, blocking_trait = TRAIT_DUMB, echo_group = "psyker", echo_icon = "psyker", color_path = /datum/client_colour/psyker) + inserted_into.AddComponent(/datum/component/echolocation, blocking_trait = TRAIT_DUMB, echo_group = "psyker", echo_icon = "psyker", color_path = /datum/client_colour/psyker, blinding = does_it_blind) inserted_into.AddComponent(/datum/component/anti_magic, antimagic_flags = MAGIC_RESISTANCE_MIND) /obj/item/organ/brain/psyker/on_mob_remove(mob/living/carbon/removed_from) @@ -31,6 +32,9 @@ owner.adjust_disgust(33 * seconds_per_tick) apply_organ_damage(5 * seconds_per_tick, 199) +/obj/item/organ/brain/psyker/blinding + does_it_blind = TRUE + /obj/item/bodypart/head/psyker limb_id = BODYPART_ID_PSYKER is_dimorphic = FALSE @@ -38,18 +42,8 @@ bodypart_traits = list(TRAIT_DISFIGURED, TRAIT_BALD, TRAIT_SHAVED) head_flags = HEAD_DEBRAIN -/obj/item/bodypart/head/psyker/try_attach_limb(mob/living/carbon/new_head_owner, special, lazy) - . = ..() - if(!.) - return - new_head_owner.become_blind(bodypart_trait_source) - -/obj/item/bodypart/head/psyker/drop_limb(special, dismembered) - owner.cure_blind(bodypart_trait_source) - return ..() - /// flavorful variant of psykerizing that deals damage and sends messages before calling psykerize() -/mob/living/carbon/human/proc/slow_psykerize() +/mob/living/carbon/human/proc/slow_psykerize(blind_them = FALSE) if(stat == DEAD || !get_bodypart(BODY_ZONE_HEAD) || istype(get_bodypart(BODY_ZONE_HEAD), /obj/item/bodypart/head/psyker)) return to_chat(src, span_userdanger("You feel unwell...")) @@ -60,7 +54,7 @@ emote("scream") apply_damage(30, BRUTE, BODY_ZONE_HEAD) sleep(5 SECONDS) - if(!psykerize()) + if(!psykerize(is_blinding = blind_them)) to_chat(src, span_warning("The transformation subsides...")) return apply_damage(50, BRUTE, BODY_ZONE_HEAD) @@ -69,7 +63,7 @@ emote("scream") /// Proc with no side effects that turns someone into a psyker. returns FALSE if it could not psykerize. -/mob/living/carbon/human/proc/psykerize() +/mob/living/carbon/human/proc/psykerize(is_blinding = FALSE) var/obj/item/bodypart/head/old_head = get_bodypart(BODY_ZONE_HEAD) var/obj/item/organ/brain/old_brain = get_organ_slot(ORGAN_SLOT_BRAIN) var/obj/item/organ/old_eyes = get_organ_slot(ORGAN_SLOT_EYES) @@ -79,12 +73,15 @@ if(!psyker_head.replace_limb(src, special = TRUE)) return FALSE qdel(old_head) - var/obj/item/organ/brain/psyker/psyker_brain = new() + var/obj/item/organ/brain/psyker/psyker_brain = new() /// turns out if you make a flashing monochromatic outline against black background that refreshes on inconsistant intervals, it hurts peoples eyes. Who'da thunk. + if(is_blinding) + var/obj/item/organ/brain/psyker/blinding/dummy = new() + psyker_brain = dummy old_brain.before_organ_replacement(psyker_brain) old_brain.Remove(src, special = TRUE, movement_flags = NO_ID_TRANSFER) qdel(old_brain) psyker_brain.Insert(src, special = TRUE, movement_flags = DELETE_IF_REPLACED) - if(old_eyes) + if(old_eyes && is_blinding) qdel(old_eyes) return TRUE