diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 459ff2f3d6..20a45b2102 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -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) diff --git a/code/game/gamemodes/objective_sabotage.dm b/code/game/gamemodes/objective_sabotage.dm index 248524f1d2..1094dd2f36 100644 --- a/code/game/gamemodes/objective_sabotage.dm +++ b/code/game/gamemodes/objective_sabotage.dm @@ -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"