From 00fc613f07d91c08310f248cf3db1f6c71a9e60f Mon Sep 17 00:00:00 2001 From: lessthanthree <83487515+lessthnthree@users.noreply.github.com> Date: Fri, 22 Sep 2023 13:36:02 -0700 Subject: [PATCH] Dusting Poly causes a power surge (#78495) ## About The Pull Request With surges now added, causes a power surge event when Poly is dusted on the supermatter crystal. Requires https://github.com/tgstation/tgstation/pull/78492 ## Why It's Good For The Game Adds some flavor to killing the engineering department's pet. ## Changelog :cl: LT3 add: Poly now causes a power surge when dusted by the supermatter crystal /:cl: --- code/__DEFINES/events.dm | 2 ++ code/datums/components/supermatter_crystal.dm | 3 +++ code/modules/events/_event.dm | 2 -- code/modules/events/supermatter_surge.dm | 23 +++++++++++++++++-- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/code/__DEFINES/events.dm b/code/__DEFINES/events.dm index ac86e77a4e0..2b1755b22c4 100644 --- a/code/__DEFINES/events.dm +++ b/code/__DEFINES/events.dm @@ -36,6 +36,8 @@ /// Return from admin setup to stop the event from triggering entirely. #define ADMIN_CANCEL_EVENT "cancel event" +/// Event can never be triggered by wizards +#define NEVER_TRIGGERED_BY_WIZARDS -1 /// Event can only run on a map set in space #define EVENT_SPACE_ONLY (1 << 0) /// Event can only run on a map which is a planet diff --git a/code/datums/components/supermatter_crystal.dm b/code/datums/components/supermatter_crystal.dm index 65c11ce2417..bfb29593269 100644 --- a/code/datums/components/supermatter_crystal.dm +++ b/code/datums/components/supermatter_crystal.dm @@ -252,6 +252,9 @@ message_admins("[atom_source] has consumed [key_name_admin(consumed_mob)] [ADMIN_JMP(atom_source)].") atom_source.investigate_log("has consumed [key_name(consumed_mob)].", INVESTIGATE_ENGINE) consumed_mob.investigate_log("has been dusted by [atom_source].", INVESTIGATE_DEATHS) + if(istype(consumed_mob, /mob/living/simple_animal/parrot/poly)) // Dusting Poly creates a power surge + force_event(/datum/round_event_control/supermatter_surge/poly, "Poly's revenge") + notify_ghosts("[consumed_mob] has been dusted by [atom_source]!", source = atom_source, action = NOTIFY_JUMP, header = "Polytechnical Difficulties") consumed_mob.dust(force = TRUE) matter_increase += 100 * object_size if(is_clown_job(consumed_mob.mind?.assigned_role)) diff --git a/code/modules/events/_event.dm b/code/modules/events/_event.dm index 64ff81da598..46353b80ea5 100644 --- a/code/modules/events/_event.dm +++ b/code/modules/events/_event.dm @@ -1,5 +1,4 @@ #define RANDOM_EVENT_ADMIN_INTERVENTION_TIME (10 SECONDS) -#define NEVER_TRIGGERED_BY_WIZARDS -1 //this singleton datum is used by the events controller to dictate how it selects events /datum/round_event_control @@ -312,4 +311,3 @@ Runs the event return ..() #undef RANDOM_EVENT_ADMIN_INTERVENTION_TIME -#undef NEVER_TRIGGERED_BY_WIZARDS diff --git a/code/modules/events/supermatter_surge.dm b/code/modules/events/supermatter_surge.dm index f8e1f2698f7..56f4b11c058 100644 --- a/code/modules/events/supermatter_surge.dm +++ b/code/modules/events/supermatter_surge.dm @@ -80,8 +80,8 @@ end_when = rand(SURGE_DURATION_MIN, SURGE_DURATION_MAX) -/datum/round_event/supermatter_surge/announce() - priority_announce("The Crystal Integrity Monitoring System has detected unusual atmospheric properties in the supermatter chamber and energy output from the supermatter crystal has increased significantly. Engineering intervention is required to stabilize the engine.", "Class [surge_class] Supermatter Surge Alert", 'sound/machines/engine_alert3.ogg') +/datum/round_event/supermatter_surge/announce(fake) + priority_announce("The Crystal Integrity Monitoring System has detected unusual atmospheric properties in the supermatter chamber, energy output from the supermatter crystal has increased significantly. Engineering intervention is required to stabilize the engine.", "Class [surge_class] Supermatter Surge Alert", 'sound/machines/engine_alert3.ogg') /datum/round_event/supermatter_surge/start() engine.bullet_energy = surge_class + SURGE_BULLET_ENERGY_ADDITION @@ -99,6 +99,25 @@ engine = null sm_gas = null +/datum/round_event_control/supermatter_surge/poly + name = "Supermatter Surge: Poly's Revenge" + typepath = /datum/round_event/supermatter_surge/poly + category = EVENT_CATEGORY_ENGINEERING + weight = 0 + max_occurrences = 0 + description = "For when Poly is sacrificed to the SM. Not really useful to run manually." + min_wizard_trigger_potency = NEVER_TRIGGERED_BY_WIZARDS + max_wizard_trigger_potency = NEVER_TRIGGERED_BY_WIZARDS + admin_setup = null + +/datum/round_event/supermatter_surge/poly + announce_when = 4 + surge_class = 4 + fakeable = FALSE + +/datum/round_event/supermatter_surge/poly/announce(fake) + priority_announce("The Crystal Integrity Monitoring System has detected unusual parrot type resonance in the supermatter chamber, energy output from the supermatter crystal has increased significantly. Engineering intervention is required to stabilize the engine.", "Class P Supermatter Surge Alert", 'sound/machines/engine_alert3.ogg') + #undef SURGE_DURATION_MIN #undef SURGE_DURATION_MAX #undef SURGE_SEVERITY_MIN