From 64bc5ea1f4afbbdee5e9ee5c0302fab4a321264c Mon Sep 17 00:00:00 2001 From: Matt Atlas Date: Tue, 25 Jul 2023 16:41:18 +0200 Subject: [PATCH] Someday, surely, I will have it all in hand I am such a greedy idol --- .../game/gamemodes/technomancer/spell_objs.dm | 1 + .../objects/structures/full_window_frame.dm | 6 +++ code/modules/admin/verbs/buildmode.dm | 5 ++- .../loadout/loadout_augments.dm | 2 +- code/modules/organs/subtypes/augment.dm | 1 - code/modules/psionics/abilities/assay.dm | 25 +++++++++++- code/modules/psionics/abilities/psi_punch.dm | 2 + code/modules/psionics/abilities/psi_search.dm | 3 +- code/modules/psionics/abilities/pull.dm | 3 ++ code/modules/psionics/abilities/read_mind.dm | 39 +++++++++---------- code/modules/psionics/abilities/rend.dm | 1 + .../psionics/complexus/complexus_helpers.dm | 4 +- .../psionics/complexus/complexus_process.dm | 7 +--- .../psionics/equipment/cerebro_enhancers.dm | 4 +- code/modules/psionics/mob/mob.dm | 2 - 15 files changed, 67 insertions(+), 38 deletions(-) diff --git a/code/game/gamemodes/technomancer/spell_objs.dm b/code/game/gamemodes/technomancer/spell_objs.dm index 908d1ec267a..e6d6cb4cee5 100644 --- a/code/game/gamemodes/technomancer/spell_objs.dm +++ b/code/game/gamemodes/technomancer/spell_objs.dm @@ -33,6 +33,7 @@ ) throwforce = 0 force = 0 + flags = NOBLUDGEON var/mob/living/carbon/human/owner var/obj/item/technomancer_core/core var/cast_methods = null // Controls how the spell is casted. diff --git a/code/game/objects/structures/full_window_frame.dm b/code/game/objects/structures/full_window_frame.dm index 38446ceb9f8..c460b87fe5f 100644 --- a/code/game/objects/structures/full_window_frame.dm +++ b/code/game/objects/structures/full_window_frame.dm @@ -163,6 +163,12 @@ else to_chat(user, SPAN_WARNING("You need at least [glass_needed] sheets of [MATERIAL_GLASS_REINFORCED_PHORON] to finished the window.")) +/obj/structure/window_frame/hitby(atom/movable/AM, speed) + . = ..() + var/obj/structure/window/W = locate() in get_turf(src) + if(istype(W)) + W.hitby(AM) + /obj/structure/window_frame/unanchored // Used during in-game construction. should_check_mapload = FALSE // No glass. anchored = FALSE diff --git a/code/modules/admin/verbs/buildmode.dm b/code/modules/admin/verbs/buildmode.dm index 78fe6034eb9..a0015ebc3e0 100644 --- a/code/modules/admin/verbs/buildmode.dm +++ b/code/modules/admin/verbs/buildmode.dm @@ -42,10 +42,11 @@ /obj/effect/bmode//Cleaning up the tree a bit density = 1 anchored = 1 - layer = SCREEN_LAYER + layer = SCREEN_LAYER + 1 dir = NORTH icon = 'icons/misc/buildmode.dmi' - var/obj/effect/bmode/buildholder/master = null + mouse_opacity = MOUSE_OPACITY_OPAQUE + var/obj/effect/bmode/buildholder/master /obj/effect/bmode/Destroy() if(master && master.cl) diff --git a/code/modules/client/preference_setup/loadout/loadout_augments.dm b/code/modules/client/preference_setup/loadout/loadout_augments.dm index 89aa5bd7e9d..cbdbfb8a1d0 100644 --- a/code/modules/client/preference_setup/loadout/loadout_augments.dm +++ b/code/modules/client/preference_setup/loadout/loadout_augments.dm @@ -144,7 +144,7 @@ display_name = "psionic receiver" description = "An augment installed into the head that functions as a surrogate for a missing zona bovinae, also functioning as a filter for the psionically-challenged." path = /obj/item/organ/internal/augment/psi - whitelisted = list(SPECIES_HUMAN, SPECIES_HUMAN_OFFWORLD, SPECIES_TAJARA, SPECIES_TAJARA_ZHAN, SPECIES_TAJARA_MSAI, SPECIES_VAURCA_WORKER, SPECIES_VAURCA_WARRIOR, SPECIES_VAURCA_BULWARK, SPECIES_VAURCA_BREEDER, SPECIES_IPC, SPECIES_IPC_G1, SPECIES_IPC_G2, SPECIES_IPC_XION, SPECIES_IPC_ZENGHU, SPECIES_IPC_BISHOP, SPECIES_IPC_SHELL) + whitelisted = list(SPECIES_HUMAN, SPECIES_HUMAN_OFFWORLD, SPECIES_TAJARA, SPECIES_TAJARA_ZHAN, SPECIES_TAJARA_MSAI) /datum/gear/augment/memory_inhibitor display_name = "memory inhibitor" diff --git a/code/modules/organs/subtypes/augment.dm b/code/modules/organs/subtypes/augment.dm index 686bf169609..a1db016ee69 100644 --- a/code/modules/organs/subtypes/augment.dm +++ b/code/modules/organs/subtypes/augment.dm @@ -529,7 +529,6 @@ organ_tag = BP_AUG_COCHLEAR parent_organ = BP_HEAD -// Snakebitten! /obj/item/organ/internal/augment/psi name = "psionic receiver" desc = "An augment installed into the head that functions as a surrogate for a missing zona bovinae, also functioning as a filter for the psionically-challenged." diff --git a/code/modules/psionics/abilities/assay.dm b/code/modules/psionics/abilities/assay.dm index e654eaf5df0..9bccca88634 100644 --- a/code/modules/psionics/abilities/assay.dm +++ b/code/modules/psionics/abilities/assay.dm @@ -1,6 +1,6 @@ /singleton/psionic_power/assay name = "Assay" - desc = "Assay a creature's psionic level." + desc = "Assay a creature's psionic level. Using Assay will also allow you to see psionic auras." icon_state = "wiz_blind" point_cost = 0 ability_flags = PSI_FLAG_FOUNDATIONAL @@ -10,11 +10,32 @@ name = "assay" desc = "Read someone's psionic potential." icon_state = "generic" - cast_methods = CAST_MELEE + cast_methods = CAST_MELEE|CAST_INNATE aspect = ASPECT_PSIONIC cooldown = 10 psi_cost = 2 +/obj/item/spell/assay/on_innate_cast(mob/user) + if(!isliving(user)) + return + + . = ..() + if(!.) + return + + var/mob/living/L = user + + to_chat(user, SPAN_NOTICE("You can now see psionic auras.")) + L.psi.show_auras() + +/obj/item/spell/assay/Destroy() + if(isliving(owner)) + var/mob/living/L = owner + to_chat(L, SPAN_NOTICE("You can no longer see psionic auras.")) + L.psi.hide_auras() + + return ..() + /obj/item/spell/assay/on_melee_cast(atom/hit_atom, mob/living/user, def_zone) . = ..() if(!.) diff --git a/code/modules/psionics/abilities/psi_punch.dm b/code/modules/psionics/abilities/psi_punch.dm index 26652646f55..94f16151ff4 100644 --- a/code/modules/psionics/abilities/psi_punch.dm +++ b/code/modules/psionics/abilities/psi_punch.dm @@ -15,6 +15,8 @@ armor_penetration = 20 cooldown = 0 psi_cost = 3 + flags = 0 + hitsound = 'sound/weapons/resonator_blast.ogg' /obj/item/spell/punch/on_melee_cast(atom/hit_atom, mob/living/user, def_zone) if(!isliving(hit_atom)) diff --git a/code/modules/psionics/abilities/psi_search.dm b/code/modules/psionics/abilities/psi_search.dm index b8b81f2ad2e..5c3d702fa51 100644 --- a/code/modules/psionics/abilities/psi_search.dm +++ b/code/modules/psionics/abilities/psi_search.dm @@ -42,7 +42,8 @@ return TRUE if(found_apex) to_chat(L, SPAN_DANGER("You reach out into the Nlom and your senses are overwhelmed by a massive signature!")) - L.adjustHalLoss(10) + L.flash_pain(20) + L.adjustHalLoss(20) return var/list/signatures = list() var/harmonious_signatures = 0 diff --git a/code/modules/psionics/abilities/pull.dm b/code/modules/psionics/abilities/pull.dm index a12b7b82c43..2e1931f5d36 100644 --- a/code/modules/psionics/abilities/pull.dm +++ b/code/modules/psionics/abilities/pull.dm @@ -30,6 +30,9 @@ if(length(get_line(hit_atom, user))) if(H.put_in_any_hand_if_possible(hit_atom)) return + user.visible_message(SPAN_WARNING("[user] extends [user.get_pronoun("his")] hand at [hit_atom]and pulls!"), SPAN_WARNING("You mimic pulling at [hit_atom]!")) if(ismob(hit_atom)) to_chat(hit_atom, SPAN_WARNING("A psychic force pulls you!")) AM.throw_at(user, 10, 7) + playsound(user, 'sound/effects/psi/power_evoke.ogg') + diff --git a/code/modules/psionics/abilities/read_mind.dm b/code/modules/psionics/abilities/read_mind.dm index bc62c684176..639ecb0c897 100644 --- a/code/modules/psionics/abilities/read_mind.dm +++ b/code/modules/psionics/abilities/read_mind.dm @@ -1,8 +1,7 @@ /singleton/psionic_power/read_mind name = "Read Mind" - desc = "Rip thoughts from someone's mind. This spell has two modes, switched by activating it in hand: for the first, they are required to answer truthfully, \ - and this deals brain damage and confusion; in the second mode, they do not receive the brain damage (only the confusion), but they must willingly accept \ - to have their mind read. Keep in mind that usage of mind reading is extremely illegal, no matter how you do it!" + desc = "Rip thoughts from someone's mind. If your rank is Psionically Sensitive, you may only skim the surface thoughts from a person's mind. \ + If your rank is Psionically Harmonious or above, your target is forced to respond to a five-word question with the truth." icon_state = "tech_illusion" spell_path = /obj/item/spell/read_mind ability_flags = PSI_FLAG_EVENT|PSI_FLAG_CANON @@ -15,17 +14,6 @@ aspect = ASPECT_PSIONIC cooldown = 10 psi_cost = 50 - var/safe_mode = FALSE - -/obj/item/spell/read_mind/on_use_cast(mob/user) - . = ..(user, TRUE) - if(!.) - return - safe_mode = !safe_mode - if(safe_mode) - to_chat(user, SPAN_NOTICE("Your mind reading can now be resisted and will not incur brain damage.")) - else - to_chat(user, SPAN_NOTICE("Your mind reading can no longer be resisted and will incur brain damage.")) /obj/item/spell/read_mind/on_melee_cast(atom/hit_atom, mob/living/user, def_zone) . = ..() @@ -50,6 +38,11 @@ to_chat(user, psi_blocked) return + var/safe_mode = FALSE + var/mob/living/L = user + if(L.psi.get_rank() < PSI_RANK_HARMONIOUS) + safe_mode = TRUE + user.visible_message(SPAN_WARNING("[user] lays a palm on [hit_atom]'s forehead...")) var/question = sanitize(input(user, "Ask your question.", "Read Mind") as null|text) @@ -59,20 +52,24 @@ var/started_mindread = world.time if(target.has_psi_aug()) to_chat(user, SPAN_NOTICE("Your psyche links with [target]'s psi-receiver, seeking an answer from their mind's surface: [question]")) - to_chat(target, SPAN_NOTICE("[user]'s psyche links with your psi-receiver. [safe_mode ? "You may resist, but in case you accept, you must \ - answer truthfully." : "You cannot avoid the question, and must answer truthfully."] [question]")) + to_chat(target, SPAN_NOTICE("[user]'s psyche links with your psi-receiver. [safe_mode ? "You must answer with what you think when the following question comes to mind.\ + It does not have to be the answer, just your immediate thought." : "You cannot avoid the question, and must answer truthfully."] [question]")) else to_chat(user, SPAN_NOTICE("You dip your mentality into the surface layer of \the [target]'s mind, seeking an answer: [question]")) - to_chat(target, SPAN_NOTICE("Your mind is compelled to answer. [safe_mode ? "You may avoid the question, but in case you follow it, you must \ - answer truthfully." : "You cannot avoid the question, and must answer truthfully."]: [question]")) - var/answer = sanitize(input(target, "[question]\n[safe_mode ? "You may avoid the question, but must answer truthfully if you do not." : "You may not resist, \ + to_chat(target, SPAN_NOTICE("Your mind is compelled to answer. [safe_mode ? "You must answer with what you think when the following question comes to mind.\ + It does not have to be the answer, just your immediate thought." : "You cannot avoid the question, and must answer truthfully."]: [question]")) + var/answer = sanitize(input(target, "[question]\n[safe_mode ? "You must answer with your first thoughts when you think about the question. They do not have to be an answer, only \ + your first impression, or thoughts." : "You may not resist, \ and must answer truthfully."]\nYou have 25 seconds to type a response.", "Read Mind") as null|text) if(!answer || world.time > started_mindread + 25 SECONDS || user.stat != CONSCIOUS) to_chat(user, SPAN_NOTICE("You receive nothing useful from \the [target].")) to_chat(target, SPAN_NOTICE("Your mind blanks out momentarily.")) else - to_chat(user, SPAN_NOTICE("You skim thoughts from the surface of \the [target]'s mind: [answer]")) - msg_admin_attack("[key_name(user)] read mind of [key_name(target)] with question \"[question]\" and [answer?"got answer \"[answer]\".":"got no answer."]") + if(safe_mode) + to_chat(user, SPAN_NOTICE("You skim the first thoughts that come to mind when [target] thinks about your question: [answer]")) + else + to_chat(user, SPAN_NOTICE("You pry the answer to your question from [target]'s mind: [answer]")) + msg_admin_attack("[key_name(user)] read mind of [key_name(target)] [safe_mode ? "skimming their surface thoughts" : "forcing them to answer truthfully"] with question \"[question]\" and [answer?"got answer \"[answer]\".":"got no answer."]") if(safe_mode) target.confused += 15 to_chat(target, SPAN_WARNING("You feel somewhat nauseated...")) diff --git a/code/modules/psionics/abilities/rend.dm b/code/modules/psionics/abilities/rend.dm index fb50c564a9b..58bc090a6e8 100644 --- a/code/modules/psionics/abilities/rend.dm +++ b/code/modules/psionics/abilities/rend.dm @@ -19,6 +19,7 @@ psi_cost = 35 attack_verb = list("rends apart", "disintegrates") hitsound = 'sound/weapons/heavysmash.ogg' + flags = 0 var/structure_mode = FALSE /obj/item/spell/rend/on_use_cast(mob/user, bypass_psi_check) diff --git a/code/modules/psionics/complexus/complexus_helpers.dm b/code/modules/psionics/complexus/complexus_helpers.dm index d3051764685..f635f483254 100644 --- a/code/modules/psionics/complexus/complexus_helpers.dm +++ b/code/modules/psionics/complexus/complexus_helpers.dm @@ -70,11 +70,13 @@ stunned(value * 2) set_cooldown(value * 100) - if(prob(value*10)) owner.emote("scream") + if(prob(value*10)) + owner.emote("scream") // Your head asplode. owner.adjustBrainLoss(value) owner.adjustHalLoss(value * 25) //Ouch. + owner.psi.hide_auras() if(ishuman(owner)) var/mob/living/carbon/human/pop = owner if(pop.should_have_organ(BP_BRAIN)) diff --git a/code/modules/psionics/complexus/complexus_process.dm b/code/modules/psionics/complexus/complexus_process.dm index f18bb67e1ef..3cfa4250d5d 100644 --- a/code/modules/psionics/complexus/complexus_process.dm +++ b/code/modules/psionics/complexus/complexus_process.dm @@ -17,9 +17,6 @@ else if(owner.client) owner.client.screen |= ui - if(!suppressed && owner.client) - for(var/thing in SSpsi.all_aura_images) - owner.client.images |= thing var/image/aura_image = get_aura_image() if(psionic_rank >= PSI_RANK_APEX) // spooky boosters @@ -30,7 +27,7 @@ if(psionic_rank == PSI_RANK_SENSITIVE) aura_color = "#cccc33" else if(psionic_rank == PSI_RANK_HARMONIOUS) - aura_color = "#cc3333" + aura_color = "#64c464" if(psionic_rank > PSI_RANK_SENSITIVE && last_psionic_rank < PSI_RANK_HARMONIOUS) switch(psionic_rank) @@ -95,7 +92,7 @@ if(armor_component) spend_power(1) - var/next_aura_size = max(0.1, ((stamina / max_stamina)*min(3, psionic_rank)) / 5) + var/next_aura_size = max(0.1, ((stamina / max_stamina)*min(3, psionic_rank)) / 3) var/next_aura_alpha = round(((suppressed ? max(0, psionic_rank - 2) : psionic_rank) / 5)*255) if(next_aura_alpha != last_aura_alpha || next_aura_size != last_aura_size || aura_color != last_aura_color) diff --git a/code/modules/psionics/equipment/cerebro_enhancers.dm b/code/modules/psionics/equipment/cerebro_enhancers.dm index 31fcab77d19..c16405d209d 100644 --- a/code/modules/psionics/equipment/cerebro_enhancers.dm +++ b/code/modules/psionics/equipment/cerebro_enhancers.dm @@ -125,8 +125,8 @@ desc = "Use this to jumpstart your psionic rank to Psionically Harmonious, enabling you to use the Psionic Point Shop and buy offensive psionic abilities. \ This won't work on species with no Zona Bovinae, like synthetics, vaurcae or dionae! This item is definitely not canon." icon = 'icons/obj/clothing/hats.dmi' - contained_sprite = FALSE icon_state = "amp" + contained_sprite = FALSE /obj/item/psionic_jumpstarter/attack_self(mob/user) . = ..() @@ -137,7 +137,7 @@ to_chat(H, SPAN_WARNING("You don't have a Zona Bovinae!")) return - if(H.psi.get_rank() >= PSI_RANK_HARMONIOUS) + if(H.psi && H.psi.get_rank() >= PSI_RANK_HARMONIOUS) to_chat(H, SPAN_WARNING("You've already awakened your psionic potential!")) return diff --git a/code/modules/psionics/mob/mob.dm b/code/modules/psionics/mob/mob.dm index 19952787925..0b95e90b064 100644 --- a/code/modules/psionics/mob/mob.dm +++ b/code/modules/psionics/mob/mob.dm @@ -5,8 +5,6 @@ ..() if(psi) psi.update(TRUE) - if(!psi.suppressed) - psi.show_auras() /mob/living/Destroy() QDEL_NULL(psi)