Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Пси сигнал #2726

Merged
merged 1 commit into from
Nov 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3371,6 +3371,7 @@
#include "mods\_master_files\code\modules\overmap\panicbutton.dm"
#include "mods\_master_files\code\modules\power\gravitygenerator.dm"
#include "mods\_master_files\code\modules\projectiles\projectile\bullets.dm"
#include "mods\_master_files\code\modules\psionics\events\mini_spasm.dm"
#include "mods\_master_files\code\modules\species\species.dm"
#include "mods\_master_files\code\modules\species\station\adherent.dm"
#include "mods\_master_files\code\modules\species\station\human_subspecies.dm"
Expand Down
2 changes: 2 additions & 0 deletions maps/sierra/job/jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@
/datum/mil_rank/civ/civ
)
required_language = LANGUAGE_HUMAN_EURO
psi_latency_chance = 8
give_psionic_implant_on_join = FALSE

/datum/map/sierra
default_assistant_title = "Crewman"
Expand Down
14 changes: 14 additions & 0 deletions maps/sierra/sierra_events.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
#define ASSIGNMENT_MEDICAL "Medical"

/datum/event/prison_break/setup()
areaType = list(
/area/security/sierra/hallway/port,
/area/security/sierra/brig,
/area/security/sierra/prison
)

/datum/event_container/major/sierra
available_events = list(
new /datum/event_meta(EVENT_LEVEL_MAJOR, "Psionic Signal", /datum/event/minispasm, 0, list(ASSIGNMENT_MEDICAL = 10), 1),
)

/datum/map/sierra/setup_events()
map_event_container = list(
num2text(EVENT_LEVEL_MAJOR) = new/datum/event_container/major/sierra,
)

#undef ASSIGNMENT_MEDICAL
54 changes: 54 additions & 0 deletions mods/_master_files/code/modules/psionics/events/mini_spasm.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/datum/event/minispasm
var/alarm_sound = 'packs/infinity/sound/misc/foundation_alarm.ogg'

/datum/event/minispasm/announce()
priority_announcement.Announce( \
"PRIORITY ALERT: SIGMA-[rand(50,80)] PSIONIC SIGNAL LOCAL TRAMISSION DETECTED (97% MATCH, NONVARIANT) \
(SIGNAL SOURCE TRIANGULATED ADJACENT LOCAL SITE): All personnel are advised to avoid \
exposure to active audio transmission equipment including radio headsets and intercoms \
for the duration of the signal broadcast.", \
"Cuchulain Sensor Array Automated Message" \
)
sound_to(world, sound(alarm_sound))

/datum/event/minispasm/end()
priority_announcement.Announce( \
"PRIORITY ALERT: SIGNAL BROADCAST HAS CEASED. Personnel are cleared to resume use of non-hardened radio transmission equipment. Have a nice day.", \
"Cuchulain Sensor Array Automated Message", \
new_sound = 'packs/infinity/sound/misc/foundation_restore.ogg' )

/datum/event/minispasm/do_spasm(mob/living/victim, obj/item/device/radio/source)
set waitfor = 0

if(iscarbon(victim) && !victim.isSynthetic())
var/list/disabilities = list(NEARSIGHTED, EPILEPSY, NERVOUS)
for(var/disability in disabilities)
if(victim.disabilities & disability)
disabilities -= disability
if(length(disabilities))
victim.disabilities |= pick(disabilities)

if(victim.psi)
to_chat(victim, SPAN_DANGER("A hauntingly familiar sound hisses from [icon2html(source, victim)] \the [source], and your vision flickers!"))
victim.psi.backblast(rand(5,15))
victim.Paralyse(5)
victim.make_jittery(100)
else
to_chat(victim, SPAN_DANGER("An indescribable, brain-tearing sound hisses from [icon2html(source, victim)] \the [source], and you collapse in a seizure!"))
victim.seizure()
victim.adjustBrainLoss(rand(5,15))
sleep(45)

if(victim.psi)
victim.psi.check_latency_trigger(100, "a psionic scream", redactive = TRUE)

if(!victim.psi && prob(5))
var/new_latencies = rand(1,4)
var/list/faculties = list(PSI_COERCION, PSI_REDACTION, PSI_ENERGISTICS, PSI_PSYCHOKINESIS)
for(var/i = 1 to new_latencies)
to_chat(victim, SPAN_DANGER(FONT_LARGE(pick(psi_operancy_messages))))
victim.adjustBrainLoss(rand(5,10))
victim.set_psi_rank(pick_n_take(faculties), 1)
sleep(30)
if(victim.psi)
victim.psi.update()
Binary file not shown.
Binary file not shown.