Shuttle Insurance can now trigger before the Shuttle Catastrophe it is supposed to protect against (#59438)

This commit is contained in:
Y0SH1M4S73R
2021-06-02 18:31:10 -07:00
committed by GitHub
parent b3d1af2866
commit 4e77e77992
2 changed files with 3 additions and 2 deletions
@@ -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)
+1 -2
View File
@@ -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