HOTFIX: 2 SM event runtimes, 2 instances of unintended behavior (#22074)

* Fixes things

* SM now qualfies as started when done so by gas

* FIxes CI issue

* Reworks event A-2 to fix a runtime.
This commit is contained in:
Silverplate
2023-08-25 16:01:03 +01:00
committed by GitHub
parent f1eb830ee2
commit 3536cbd795
2 changed files with 11 additions and 9 deletions
@@ -218,7 +218,7 @@
///amount of EER to ADD
var/power_additive = 0
/// A list of all previous events
var/list/last_events
var/list/last_events = list()
/// Time of next event
var/next_event_time
/// Run S-Class event? So we can only run one S-class event per round per crystal
@@ -420,7 +420,11 @@
return
try_events()
if(power > 100)
if(!has_been_powered)
investigate_log("has been powered for the first time.", "supermatter")
message_admins("[src] has been powered for the first time [ADMIN_JMP(src)].")
has_been_powered = TRUE
//We vary volume by power, and handle OH FUCK FUSION IN COOLING LOOP noises.
if(power)
soundloop.volume = clamp((50 + (power / 50)), 50, 100)
@@ -587,7 +591,7 @@
//Transitions between one function and another, one we use for the fast inital startup, the other is used to prevent errors with fusion temperatures.
//Use of the second function improves the power gain imparted by using co2
if(power_changes)
power = max(power - min(((power / 500) ** 3) * powerloss_inhibitor, power * 0.83 * powerloss_inhibitor), 0)
power = max((power - min(((power / 500) ** 3) * powerloss_inhibitor, power * 0.83 * powerloss_inhibitor) + power_additive), 0)
//After this point power is lowered
//This wraps around to the begining of the function
//Handle high power zaps/anomaly generation
@@ -671,7 +675,6 @@
//Boom (Mind blown)
if(damage > explosion_point)
countdown()
power += power_additive
return 1
/obj/machinery/atmospherics/supermatter_crystal/bullet_act(obj/item/projectile/Proj)
@@ -1214,7 +1217,6 @@
return
event.start_event()
#undef HALLUCINATION_RANGE
#undef GRAVITATIONAL_ANOMALY
#undef FLUX_ANOMALY
@@ -155,7 +155,7 @@
name = "A-1"
/datum/supermatter_event/alpha_tier/apc_short/on_start()
var/area/current_area = get_area(src)
var/area/current_area = get_area(supermatter)
var/obj/machinery/power/apc/A = current_area.get_apc()
A.apc_short()
@@ -163,9 +163,9 @@
name = "A-2"
/datum/supermatter_event/alpha_tier/air_siphon/on_start()
var/area/current_area = get_area(src)
var/obj/machinery/alarm/engine/A = current_area.master_air_alarm
A.apply_mode(AALARM_MODE_SCRUBBING)
var/area/current_area = get_area(supermatter)
for(var/obj/machinery/alarm/A in current_area)
A.apply_mode(AALARM_MODE_OFF)
/datum/supermatter_event/alpha_tier/gas_multiplier
name = "A-3"