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

🆑 LT3
add: Poly now causes a power surge when dusted by the supermatter
crystal
/🆑
This commit is contained in:
lessthanthree
2023-09-22 16:36:02 -04:00
committed by GitHub
parent 6c5acf923a
commit 00fc613f07
4 changed files with 26 additions and 4 deletions
+2
View File
@@ -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
@@ -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))
-2
View File
@@ -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
+21 -2
View File
@@ -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