From 4e77e779921771830dd20e1a96ef7f7487b73fa4 Mon Sep 17 00:00:00 2001 From: Y0SH1M4S73R Date: Wed, 2 Jun 2021 21:31:10 -0400 Subject: [PATCH] Shuttle Insurance can now trigger before the Shuttle Catastrophe it is supposed to protect against (#59438) --- code/game/machinery/computer/communications.dm | 2 ++ code/modules/events/shuttle_insurance.dm | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 10a13391d99..64d52634450 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -211,6 +211,8 @@ if (bank_account.account_balance < shuttle.credit_cost) return SSshuttle.shuttle_purchased = SHUTTLEPURCHASE_PURCHASED + for(var/datum/round_event_control/shuttle_insurance/insurance_event in SSevents.control) + insurance_event.weight *= 20 SSshuttle.unload_preview() SSshuttle.existing_shuttle = SSshuttle.emergency SSshuttle.action_load(shuttle, replace = TRUE) diff --git a/code/modules/events/shuttle_insurance.dm b/code/modules/events/shuttle_insurance.dm index 7fca1881c47..a164ef4622d 100644 --- a/code/modules/events/shuttle_insurance.dm +++ b/code/modules/events/shuttle_insurance.dm @@ -3,13 +3,12 @@ /datum/round_event_control/shuttle_insurance name = "Shuttle Insurance" typepath = /datum/round_event/shuttle_insurance - weight = 200 //you're basically bound to get it max_occurrences = 1 /datum/round_event_control/shuttle_insurance/canSpawnEvent(players) if(!SSeconomy.get_dep_account(ACCOUNT_CAR)) return FALSE //They can't pay? - if(SSshuttle.shuttle_purchased != SHUTTLEPURCHASE_FORCED) + if(SSshuttle.shuttle_purchased == SHUTTLEPURCHASE_FORCED) return FALSE //don't do it if there's nothing to insure if(EMERGENCY_AT_LEAST_DOCKED) return FALSE //catastrophes won't trigger so no point