Skip to content

Commit

Permalink
Your unbeatable smile wrecks the media
Browse files Browse the repository at this point in the history
 We wanna know your secret, so mysterious
  • Loading branch information
Matt Atlas committed Jul 15, 2023
1 parent f47e586 commit 1421abd
Show file tree
Hide file tree
Showing 32 changed files with 109 additions and 1,432 deletions.
10 changes: 0 additions & 10 deletions aurorastation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2876,29 +2876,19 @@
#include "code\modules\psionics\complexus\complexus.dm"
#include "code\modules\psionics\complexus\complexus_helpers.dm"
#include "code\modules\psionics\complexus\complexus_latency.dm"
#include "code\modules\psionics\complexus\complexus_power_cache.dm"
#include "code\modules\psionics\complexus\complexus_process.dm"
#include "code\modules\psionics\equipment\cerebro_enhancers.dm"
#include "code\modules\psionics\equipment\psipower.dm"
#include "code\modules\psionics\equipment\psipower_blade.dm"
#include "code\modules\psionics\equipment\psipower_tinker.dm"
#include "code\modules\psionics\equipment\psipower_tk.dm"
#include "code\modules\psionics\events\_psi.dm"
#include "code\modules\psionics\events\mini_spasm.dm"
#include "code\modules\psionics\events\psi_balm.dm"
#include "code\modules\psionics\events\psi_wail.dm"
#include "code\modules\psionics\faculties\_faculty.dm"
#include "code\modules\psionics\faculties\_power.dm"
#include "code\modules\psionics\faculties\coercion.dm"
#include "code\modules\psionics\faculties\energistics.dm"
#include "code\modules\psionics\faculties\psychokinesis.dm"
#include "code\modules\psionics\faculties\redaction.dm"
#include "code\modules\psionics\interface\ui.dm"
#include "code\modules\psionics\interface\ui_hub.dm"
#include "code\modules\psionics\mob\mob.dm"
#include "code\modules\psionics\mob\mob_assay.dm"
#include "code\modules\psionics\mob\mob_helpers.dm"
#include "code\modules\psionics\mob\mob_interactions.dm"
#include "code\modules\radiation\radiation.dm"
#include "code\modules\random_map\_random_map_setup.dm"
#include "code\modules\random_map\random_map.dm"
Expand Down
18 changes: 8 additions & 10 deletions code/__defines/psi.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#define PSI_COERCION "coercion"
#define PSI_PSYCHOKINESIS "psychokinesis"
#define PSI_REDACTION "redaction"
#define PSI_ENERGISTICS "energistics"
#define PSI_RANK_DEAF 0 // Psionically deaf.
#define PSI_RANK_PERCEPTIVE 1 // Psionically perceptive.
#define PSI_RANK_SENSITIVE 2 // Psionically sensitive.
#define PSI_RANK_HARMONIOUS 3 // Psionically harmonious.
#define PSI_RANK_APEX 4 // Psionic apex.

#define PSI_FLAG_CANON 1 // An ability that can be selected by a ship character.
#define PSI_FLAG_EVENT 2 // An ability for events, not selectable by ship characters.

#define PSI_RANK_BLUNT 0
#define PSI_RANK_LATENT 1
#define PSI_RANK_OPERANT 2
#define PSI_RANK_MASTER 3
#define PSI_RANK_GRANDMASTER 4
#define PSI_RANK_PARAMOUNT 5
33 changes: 7 additions & 26 deletions code/controllers/subsystems/processing/psi.dm
Original file line number Diff line number Diff line change
@@ -1,40 +1,21 @@
var/global/list/psychic_ranks_to_strings = list("Latent", "Operant", "Masterclass", "Grandmasterclass", "Paramount")
var/global/list/psychic_ranks_to_strings = list("Psionically Deaf", "Psionically Sensitive", "Psionically Harmonious", "Psionic Apex")

/var/datum/controller/subsystem/processing/psi/SSpsi

/datum/controller/subsystem/processing/psi
name = "Psychics"
priority = SS_PRIORITY_PSYCHICS
flags = SS_POST_FIRE_TIMING | SS_BACKGROUND

var/list/faculties_by_id = list()
var/list/faculties_by_name = list()
var/list/all_aura_images = list()
var/list/all_psi_complexes = list()
var/list/psi_dampeners = list()
var/list/psi_monitors = list()
var/list/armor_faculty_by_type = list()
var/list/faculties_by_intent = list()
var/last_nlom_awareness_check = 0
var/list/all_aura_images = list()
var/list/all_psi_complexes = list()

/datum/controller/subsystem/processing/psi/New()
NEW_SS_GLOBAL(SSpsi)

/datum/controller/subsystem/processing/psi/proc/get_faculty(var/faculty)
return faculties_by_name[faculty] || faculties_by_id[faculty]

/datum/controller/subsystem/processing/psi/Initialize()
. = ..()

var/list/faculties = subtypesof(/datum/psionic_faculty)
for(var/ftype in faculties)
var/datum/psionic_faculty/faculty = new ftype
faculties_by_id[faculty.id] = faculty
faculties_by_name[faculty.name] = faculty
faculties_by_intent[faculty.associated_intent] = faculty.id

var/list/powers = subtypesof(/datum/psionic_power)
for(var/ptype in powers)
var/datum/psionic_power/power = new ptype
if(power.faculty)
var/datum/psionic_faculty/faculty = get_faculty(power.faculty)
if(faculty)
faculty.powers |= power
/datum/controller/subsystem/processing/psi/process()
/// nlom awareness check here
7 changes: 1 addition & 6 deletions code/datums/mind.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
new_character.make_vampire()
if(active)
new_character.key = key //now transfer the key to link the client to our new body


/datum/mind/proc/store_memory(new_text)
. = length(memory + new_text)
Expand Down Expand Up @@ -179,11 +179,6 @@
/datum/mind/Topic(href, href_list)
if(!check_rights(R_ADMIN)) return

if(current && isliving(current))
if(href_list["set_psi_faculty"] && href_list["set_psi_faculty_rank"])
current.set_psi_rank(href_list["set_psi_faculty"], text2num(href_list["set_psi_faculty_rank"]))
return TRUE

if(href_list["add_antagonist"])
var/datum/antagonist/antag = all_antag_types[href_list["add_antagonist"]]
if(antag)
Expand Down
4 changes: 2 additions & 2 deletions code/game/antagonist/outsider/loner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ var/datum/antagonist/loner/loners
antag_indicator = "loner"
landmark_id = "lonerspawn"
welcome_text = "You are a Loner, someone underequipped to deal with the station. You will probably not survive for the whole round, so don't sweat it if you die!<br>\
You are equipped with a lesser cerebro-enhancer, which allows you to unlock your psionic potential. Use it in-hand to choose your boosted faculty, then install it on your head."
You are equipped with a lesser cerebro-enhancer, which allows you to unlock your psionic potential."
flags = ANTAG_OVERRIDE_JOB | ANTAG_CLEAR_EQUIPMENT | ANTAG_CHOOSE_NAME | ANTAG_VOTABLE | ANTAG_SET_APPEARANCE
antaghud_indicator = "hudloner"
required_age = 7
Expand Down Expand Up @@ -43,4 +43,4 @@ var/datum/antagonist/loner/loners
player.update_eyes()
player.regenerate_icons()

return TRUE
return TRUE
3 changes: 1 addition & 2 deletions code/game/gamemodes/technomancer/spell_objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@
core = owner.get_technomancer_core()
if(!core)
to_chat(owner, "<span class='warning'>You need a Core to do that.</span>")
qdel(src)
return
return INITIALIZE_HINT_QDEL
update_icon()

// Proc: Destroy()
Expand Down
18 changes: 0 additions & 18 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -101,24 +101,6 @@ var/global/enabled_spooking = 0
"}

body += "<br><br>"
body += "<b>Psionics:</b><br/>"
if(isliving(M))
var/mob/living/psyker = M
if(psyker.psi)
body += "<a href='?src=\ref[src];remove_psionics=\ref[psyker.psi]'>Remove psionics.</a><br/><br/>"
body += "<a href='?src=\ref[src];trigger_psi_latencies\ref[psyker.psi]'>Trigger latencies.</a><br/>"
body += "<table width = '100%'>"
for(var/faculty in list(PSI_COERCION, PSI_PSYCHOKINESIS, PSI_REDACTION, PSI_ENERGISTICS))
var/datum/psionic_faculty/faculty_decl = SSpsi.get_faculty(faculty)
var/faculty_rank = psyker.psi ? psyker.psi.get_rank(faculty) : 0
body += "<tr><td><b>[faculty_decl.name]</b></td>"
for(var/i = 1 to LAZYLEN(psychic_ranks_to_strings))
var/psi_title = psychic_ranks_to_strings[i]
if(i == faculty_rank)
psi_title = "<b>[psi_title]</b>"
body += "<td><a href='?src=\ref[psyker.mind];set_psi_faculty_rank=[i];set_psi_faculty=[faculty]'>[psi_title]</a></td>"
body += "</tr>"
body += "</table>"

if (M.client)
if(!istype(M, /mob/abstract/new_player))
Expand Down
4 changes: 2 additions & 2 deletions code/modules/admin/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@

else if(href_list["trigger_psi_latencies"])
var/datum/psi_complexus/psi = locate(href_list["trigger_psi_latencies"])
log_and_message_admins("triggered psi latencies for [key_name(psi.owner)].")
psi.check_latency_trigger(100, "outside intervention", redactive = TRUE)
log_and_message_admins("triggered psionics for [key_name(psi.owner)].")
psi.check_psionic_trigger(100, "outside intervention", redactive = TRUE)

else if(href_list["monkeyone"])
if(!check_rights(R_SPAWN)) return
Expand Down
13 changes: 5 additions & 8 deletions code/modules/mob/living/carbon/human/human_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@

return O

/mob/living/carbon/human/proc/awaken_psi_basic(var/source, var/allow_latency = TRUE)
/mob/living/carbon/human/proc/awaken_psi_basic(var/source)
var/static/list/psi_operancy_messages = list(
"There's something in your skull!",
"Something is eating your thoughts!",
Expand All @@ -197,13 +197,10 @@
)
to_chat(src, SPAN_DANGER("An indescribable, brain-tearing sound hisses from [source], and you collapse in a seizure!"))
seizure()
var/new_latencies = rand(2,4)
var/list/faculties = list(PSI_COERCION, PSI_REDACTION, PSI_ENERGISTICS, PSI_PSYCHOKINESIS)
for(var/i = 1 to new_latencies)
custom_pain(SPAN_DANGER("<font size = 3>[pick(psi_operancy_messages)]</font>"), 25)
set_psi_rank(pick_n_take(faculties), allow_latency ? PSI_RANK_LATENT : PSI_RANK_OPERANT) // if set to latent, it spikes anywhere from OPERANT to PARAMOUNT
sleep(30)
addtimer(CALLBACK(psi, TYPE_PROC_REF(/datum/psi_complexus, check_latency_trigger), 100, source, TRUE), 4.5 SECONDS)
custom_pain(SPAN_DANGER("<font size = 3>[pick(psi_operancy_messages)]</font>"), 25)
set_psi_rank(pick(PSI_RANK_HARMONIOUS, PSI_RANK_SENSITIVE))
sleep(30)
addtimer(CALLBACK(psi, TYPE_PROC_REF(/datum/psi_complexus, check_psionic_trigger), 100, source, TRUE), 4.5 SECONDS)

/mob/living/carbon/human/get_resist_power()
return species.resist_mod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@

/datum/species/skrell/handle_post_spawn(mob/living/carbon/human/H)
..()
H.set_psi_rank(PSI_COERCION, PSI_RANK_OPERANT)
H.set_psi_rank(PSI_RANK_SENSITIVE)

/datum/species/skrell/handle_strip(var/mob/user, var/mob/living/carbon/human/H, var/action)
switch(action)
Expand Down
39 changes: 16 additions & 23 deletions code/modules/mob/living/simple_animal/borer/borer_powers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -481,20 +481,23 @@
return

to_chat(src, SPAN_NOTICE("You succeed in interfacing with the host's zona bovinae, this will be a painful process for them."))
host.awaken_psi_basic("something in your head", FALSE)
host.awaken_psi_basic("something in your head")
host.add_language(LANGUAGE_TCB) // if we don't have TCB, give them TCB | this allows monkey borers to RP

/mob/living/simple_animal/borer/verb/advance_faculty()
/mob/living/simple_animal/borer/verb/advance_psionics()
set category = "Abilities"
set name = "Advance Psionic Faculty (75)"
set desc = "Advance one of your host's psionic faculties by one step."
set name = "Advance Psionics (75)"
set desc = "Advance your host's psionic capability by one step."

if(!host)
to_chat(src, SPAN_NOTICE("You are not inside a host body."))
return
if(!host.psi)
to_chat(src, SPAN_WARNING("Your host has not been psionically awakened!"))
return
if(host.psi.get_rank() >= PSI_RANK_HARMONIOUS)
to_chat(src, SPAN_WARNING("Your host is at the peak of their psionic power!"))
return
if(stat)
to_chat(src, SPAN_NOTICE("You cannot do that in your current state."))
return
Expand All @@ -507,38 +510,28 @@
to_chat(src, SPAN_WARNING("\The [host]'s mind is shielded against your powers."))
return

var/list/faculties = list(capitalize(PSI_COERCION), capitalize(PSI_REDACTION), capitalize(PSI_ENERGISTICS), capitalize(PSI_PSYCHOKINESIS))
var/selected_faculty = input(src, "Choose a faculty to upgrade.") as null|anything in faculties
if(!selected_faculty)
return
selected_faculty = lowertext(selected_faculty)
var/max_rank = islesserform(host) ? PSI_RANK_OPERANT : PSI_RANK_MASTER
if(host.psi.get_rank(selected_faculty) >= max_rank)
to_chat(src, SPAN_NOTICE("This faculty has already been pushed to the max potential you can achieve!"))
return

var/faculty_time = 10 SECONDS
if(!start_ability(host, faculty_time))
var/upgrade_time = 10 SECONDS
if(!start_ability(host, upgrade_time))
to_chat(src, SPAN_WARNING("You're busy doing something else, complete that task first."))
return

chemicals -= 75
to_chat(src, SPAN_NOTICE("You probe your tendrils deep within your host's zona bovinae, seeking to upgrade their abilities."))
to_chat(host, SPAN_WARNING("You feel a burning, tingling sensation at the back of your head..."))

addtimer(CALLBACK(src, PROC_REF(faculty_upgrade), selected_faculty), faculty_time)
addtimer(CALLBACK(src, PROC_REF(upgrade_rank)), upgrade_time)

/mob/living/simple_animal/borer/proc/faculty_upgrade(var/selected_faculty)
/mob/living/simple_animal/borer/proc/upgrade_rank()
if(!host)
return

var/host_psi_rank = host.psi.get_rank(selected_faculty)
var/next_rank = host_psi_rank > PSI_RANK_BLUNT ? host_psi_rank + 1 : PSI_RANK_OPERANT
host.psi.set_rank(selected_faculty, next_rank)
var/host_psi_rank = host.psi.get_rank()
var/next_rank = host_psi_rank > PSI_RANK_DEAF ? host_psi_rank + 1 : PSI_RANK_DEAF
host.psi.set_rank(next_rank)
host.psi.update(TRUE)
to_chat(src, SPAN_NOTICE("You successfully manage to upgrade your host to [psychic_ranks_to_strings[host.psi.ranks[selected_faculty]]] [selected_faculty]."))
to_chat(src, SPAN_NOTICE("You successfully manage to upgrade your host to [psychic_ranks_to_strings[host.psi.get_rank()]]."))
to_chat(host, SPAN_GOOD("A breeze of fresh air washes over your mind, you feel powerful!"))
to_chat(host, SPAN_NOTICE("You have been psionically enlightened. You are now a [psychic_ranks_to_strings[host.psi.ranks[selected_faculty]]] in the [selected_faculty] faculty."))
to_chat(host, SPAN_NOTICE("You have been psionically enlightened. You are now [psychic_ranks_to_strings[host.psi.get_rank()]]."))

/mob/living/simple_animal/borer/verb/host_health_scan()
set category = "Abilities"
Expand Down
5 changes: 0 additions & 5 deletions code/modules/mob/mob_grab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,6 @@
if(!affecting)
return

if(ishuman(user) && affecting == M)
var/mob/living/carbon/human/H = user
if(H.check_psi_grab(src))
return

if(world.time < (last_action + 20))
return

Expand Down
13 changes: 13 additions & 0 deletions code/modules/psionics/abilities/_ability.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/decl/psionic_power
/// Ability name.
var/name
/// Description of what the ability does.
var/desc
/// Spell object to spawn.
var/obj/item/spell/spell_to_spawn
/// Ability flags define who can pick an ability - ship characters, adminspawn characters, antags.
var/ability_flags
/// Minimum required rank to use an ability.
var/minimum_rank = PSI_RANK_SENSITIVE
/// Point shop cost.
var/point_cost = 1
16 changes: 4 additions & 12 deletions code/modules/psionics/complexus/complexus.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
var/use_psi_armor = TRUE // Whether or not we should automatically deflect/block incoming damage.
var/rebuild_power_cache = TRUE // Whether or not we need to rebuild our cache of psi powers.

var/rating = 0 // Overall psi rating.
var/cost_modifier = 1 // Multiplier for power use stamina costs.
var/stun = 0 // Number of process ticks we are stunned for.
var/next_power_use = 0 // world.time minimum before next power use.
var/stamina = 50 // Current psi pool.
var/max_stamina = 50 // Max psi pool.

var/list/latencies // List of all currently latent faculties.
var/list/ranks // Assoc list of psi faculties to current rank.
var/list/base_ranks // Assoc list of psi faculties to base rank, in case reset is needed
var/psionic_rank
var/last_psionic_rank
var/list/manifested_items // List of atoms manifested/maintained by psychic power.
var/next_latency_trigger = 0 // world.time minimum before a trigger can be attempted again.
var/last_armor_check // world.time of last armor check.
Expand All @@ -23,13 +21,6 @@
var/last_aura_color
var/aura_color = "#ff0022"

// Cached powers.
var/list/melee_powers // Powers used in melee range.
var/list/grab_powers // Powers use by using a grab.
var/list/ranged_powers // Powers used at range.
var/list/manifestation_powers // Powers that create an item.
var/list/powers_by_faculty // All powers within a given faculty.

var/obj/screen/psi/hub/ui // Reference to the master psi UI object.
var/mob/living/owner // Reference to our owner.
var/image/_aura_image // Client image
Expand Down Expand Up @@ -70,13 +61,14 @@

/datum/psi_complexus/New(var/mob/_owner)
owner = _owner
SSpsi.all_psi_complexes |= src
START_PROCESSING(SSpsi, src)

/datum/psi_complexus/Destroy()
destroy_aura_image(_aura_image)
SSpsi.all_psi_complexes -= src
STOP_PROCESSING(SSpsi, src)
if(owner)
cancel()
if(owner.client)
owner.client.screen -= ui
for(var/thing in SSpsi.all_aura_images)
Expand Down
Loading

0 comments on commit 1421abd

Please sign in to comment.