Revert "Psionics Rework: Kyoushiki Murasaki (#16805)" (#16948)

This reverts commit 27c40bdaf6.
This commit is contained in:
Matt Atlas
2023-07-31 03:51:40 +02:00
committed by GitHub
parent 06ca379a91
commit 87f637564f
145 changed files with 1617 additions and 3162 deletions

View File

@@ -1,100 +1,40 @@
var/global/list/psychic_ranks_to_strings = list("Psionically Sensitive", "Psionically Harmonious", "Psionic Apex", "Limitless")
var/global/list/psychic_ranks_to_strings = list("Latent", "Operant", "Masterclass", "Grandmasterclass", "Paramount")
/var/datum/controller/subsystem/processing/psi/SSpsi
/datum/controller/subsystem/processing/psi
name = "Psionics"
name = "Psychics"
priority = SS_PRIORITY_PSYCHICS
flags = SS_BACKGROUND
flags = SS_POST_FIRE_TIMING | SS_BACKGROUND
var/checking_nlom = FALSE
var/last_nlom_awareness_check = 0
var/completing_nlom = FALSE
var/complete_nlom_time = 0
var/list/nlom_votes = list()
var/list/nlom_voters = list()
var/list/all_aura_images = list()
var/list/all_psi_complexes = list()
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()
/datum/controller/subsystem/processing/psi/New()
NEW_SS_GLOBAL(SSpsi)
/datum/controller/subsystem/processing/psi/fire(resumed)
..()
if((world.time >= (last_nlom_awareness_check + 30 MINUTES)) && !checking_nlom && !completing_nlom)
checking_nlom = TRUE
nlom_votes = list(
"Calm" = 0,
"Happy" = 0,
"Sad" = 0,
"Fearful" = 0,
"Angry" = 0,
"Stressed" = 0,
"Confused" = 0
)
for(var/datum/psi_complexus/PC in all_psi_complexes)
if(PC.psionic_rank >= PSI_RANK_SENSITIVE)
to_chat(PC.owner, SPAN_NOTICE(FONT_HUGE("The Nlom field prompts you for your emotional state.")))
to_chat(PC.owner,
"<a href='?src=\ref[src];emotion=Calm;voter=[ref(PC)]'>Calm</a> | <a href='?src=\ref[src];emotion=Happy;voter=[ref(PC)]'>Happy</a> | \
<a href='?src=\ref[src];emotion=Sad;voter=[ref(PC)]'>Sad</a> | <a href='?src=\ref[src];emotion=Fearful;voter=[ref(PC)]'>Fearful</a> | \
<a href='?src=\ref[src];emotion=Angry;voter=[ref(PC)]'>Angry</a> | <a href='?src=\ref[src];emotion=Stressed;voter=[ref(PC)]'>Stressed</a> | \
<a href='?src=\ref[src];emotion=Confused;voter=[ref(PC)]'>Confused</a")
complete_nlom_time = world.time + 2 MINUTES
completing_nlom = TRUE
if(completing_nlom && world.time >= complete_nlom_time)
var/highest_emotion = "Happy"
for(var/emotion in nlom_votes)
if(nlom_votes[highest_emotion] < nlom_votes[emotion])
highest_emotion = emotion
for(var/datum/psi_complexus/PC in all_psi_complexes)
if(PC.psionic_rank >= PSI_RANK_SENSITIVE)
var/static/nlom_to_span = list(
"Calm" = "good",
"Happy" = "good",
"Sad" = "notice",
"Fearful" = "alien",
"Angry" = "danger",
"Stressed" = "warning",
"Confused" = "cult"
)
var/static/nlom_to_chat_text = list(
"Calm" = "calmness",
"Happy" = "happiness",
"Sad" = "sadness",
"Fearful" = "fear",
"Angry" = "anger",
"Stressed" = "stress",
"Confused" = "confusion"
)
if(nlom_votes[highest_emotion] > 0)
to_chat(PC.owner, SPAN_NOTICE(FONT_HUGE("A sense of <b><span class='[nlom_to_span[highest_emotion]]'>[nlom_to_chat_text[highest_emotion]]</span></b> washes over you.")))
else
to_chat(PC.owner, SPAN_WARNING(FONT_HUGE("The Nlom is silent and still. You feel uneasy.")))
checking_nlom = FALSE
completing_nlom = FALSE
last_nlom_awareness_check = world.time
nlom_votes.Cut()
nlom_voters.Cut()
/datum/controller/subsystem/processing/psi/proc/get_faculty(var/faculty)
return faculties_by_name[faculty] || faculties_by_id[faculty]
/datum/controller/subsystem/processing/psi/Topic(href, href_list)
/datum/controller/subsystem/processing/psi/Initialize()
. = ..()
if(.)
return
if(href_list["emotion"])
var/emotion = href_list["emotion"]
var/datum/psi_complexus/PC = locate(href_list["voter"])
if(PC in nlom_voters)
to_chat(PC.owner, SPAN_WARNING("You have already sent your emotional state to the Nlom."))
return
if(emotion in nlom_votes)
var/base_vote = 1
var/psi_rank = PC.get_rank()
if(psi_rank == PSI_RANK_HARMONIOUS)
base_vote = 2
else if(psi_rank == PSI_RANK_APEX)
base_vote = 4
nlom_votes[emotion] += base_vote
to_chat(PC.owner, SPAN_NOTICE("You have transmitted your emotional state to the Nlom."))
nlom_voters |= PC
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