Supermatter sabotage no longer shows up with no supermatter

This commit is contained in:
Putnam
2020-02-18 11:51:03 -08:00
parent 19ca51a639
commit a9edff6e56
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -1096,7 +1096,7 @@ GLOBAL_LIST_EMPTY(possible_sabotages)
var/approved_targets = list()
check_sabotages:
for(var/datum/sabotage_objective/possible_sabotage in GLOB.possible_sabotages)
if(!is_unique_objective(possible_sabotage.sabotage_type) || possible_sabotage.check_conditions())
if(!is_unique_objective(possible_sabotage.sabotage_type) || possible_sabotage.check_conditions() || !possible_sabotage.can_run())
continue
for(var/datum/mind/M in owners)
if(M.current.mind.assigned_role in possible_sabotage.excludefromjob)
@@ -12,6 +12,9 @@
/datum/sabotage_objective/proc/check_conditions()
return TRUE
/datum/sabotage_objective/proc/can_run()
return TRUE
/datum/sabotage_objective/processing
var/won = FALSE
@@ -79,6 +82,9 @@
won = max(1-((S.get_integrity()-50)/50),won)
return FALSE
/datum/sabotage_objective/processing/supermatter/can_run()
return (locate(/obj/machinery/power/supermatter_crystal) in GLOB.machines)
/datum/sabotage_objective/station_integrity
name = "Make sure the station is at less than 80% integrity by the end. Smash walls, windows etc. to reach this goal."
sabotage_type = "integrity"