Skip to content

Commit

Permalink
Someday, surely, I will have it all in hand
Browse files Browse the repository at this point in the history
I am such a greedy idol
  • Loading branch information
Matt Atlas committed Jul 25, 2023
1 parent 446d5f9 commit 64bc5ea
Show file tree
Hide file tree
Showing 15 changed files with 67 additions and 38 deletions.
1 change: 1 addition & 0 deletions code/game/gamemodes/technomancer/spell_objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 6 additions & 0 deletions code/game/objects/structures/full_window_frame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions code/modules/admin/verbs/buildmode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion code/modules/organs/subtypes/augment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
25 changes: 23 additions & 2 deletions code/modules/psionics/abilities/assay.dm
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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(!.)
Expand Down
2 changes: 2 additions & 0 deletions code/modules/psionics/abilities/psi_punch.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 2 additions & 1 deletion code/modules/psionics/abilities/psi_search.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
return TRUE
if(found_apex)
to_chat(L, SPAN_DANGER("<font size=4>You reach out into the Nlom and your senses are overwhelmed by a massive signature!</font>"))
L.adjustHalLoss(10)
L.flash_pain(20)
L.adjustHalLoss(20)
return
var/list/signatures = list()
var/harmonious_signatures = 0
Expand Down
3 changes: 3 additions & 0 deletions code/modules/psionics/abilities/pull.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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')

39 changes: 18 additions & 21 deletions code/modules/psionics/abilities/read_mind.dm
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
. = ..()
Expand All @@ -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)

Expand All @@ -59,20 +52,24 @@
var/started_mindread = world.time
if(target.has_psi_aug())
to_chat(user, SPAN_NOTICE("<b>Your psyche links with [target]'s psi-receiver, seeking an answer from their mind's surface: <i>[question]</i></b>"))
to_chat(target, SPAN_NOTICE("<b>[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."] <i>[question]</i></b>"))
to_chat(target, SPAN_NOTICE("<b>[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."] <i>[question]</i></b>"))
else
to_chat(user, SPAN_NOTICE("<b>You dip your mentality into the surface layer of \the [target]'s mind, seeking an answer: <i>[question]</i></b>"))
to_chat(target, SPAN_NOTICE("<b>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."]: <i>[question]</i></b>"))
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("<b>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."]: <i>[question]</i></b>"))
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("<b>You receive nothing useful from \the [target].</b>"))
to_chat(target, SPAN_NOTICE("Your mind blanks out momentarily."))
else
to_chat(user, SPAN_NOTICE("<b>You skim thoughts from the surface of \the [target]'s mind: <i>[answer]</i></b>"))
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("<b>You skim the first thoughts that come to mind when [target] thinks about your question: <i>[answer]</i></b>"))
else
to_chat(user, SPAN_NOTICE("<b>You pry the answer to your question from [target]'s mind: <i>[answer]</i></b>"))
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..."))
Expand Down
1 change: 1 addition & 0 deletions code/modules/psionics/abilities/rend.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion code/modules/psionics/complexus/complexus_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
7 changes: 2 additions & 5 deletions code/modules/psionics/complexus/complexus_process.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/psionics/equipment/cerebro_enhancers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
. = ..()
Expand All @@ -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

Expand Down
2 changes: 0 additions & 2 deletions code/modules/psionics/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
..()
if(psi)
psi.update(TRUE)
if(!psi.suppressed)
psi.show_auras()

/mob/living/Destroy()
QDEL_NULL(psi)
Expand Down

0 comments on commit 64bc5ea

Please sign in to comment.