/datum/game_mode/blob/check_finished() if(!declared)//No blobs have been spawned yet return 0 if(blobwincount <= blobs.len)//Blob took over return 1 if(!blob_cores.len) // blob is dead return 1 if(station_was_nuked)//Nuke went off return 1 return 0 /datum/game_mode/blob/declare_completion() if(blobwincount <= blobs.len) feedback_set_details("round_end_result","loss - blob took over") world << "The blob has taken over the station!" world << "The entire station was eaten by the Blob" check_quarantine() else if(station_was_nuked) feedback_set_details("round_end_result","halfwin - nuke") world << "Partial Win: The station has been destroyed!" world << "Directive 7-12 has been successfully carried out preventing the Blob from spreading." else if(!blob_cores.len) feedback_set_details("round_end_result","win - blob eliminated") world << "The staff has won!" world << "The alien organism has been eradicated from the station" var/datum/station_state/end_state = new /datum/station_state() end_state.count() var/percent = round( 100.0 * start_state.score(end_state), 0.1) world << "The station is [percent]% intact." log_game("Blob mode was won with station [percent]% intact.") world << "\blue Rebooting in 30s" ..() return 1 datum/game_mode/proc/auto_declare_completion_blob() if(istype(ticker.mode,/datum/game_mode/blob) ) var/datum/game_mode/blob/blob_mode = src if(blob_mode.infected_crew.len) var/text = "The blob[(blob_mode.infected_crew.len > 1 ? "s were" : " was")]:" for(var/datum/mind/blob in blob_mode.infected_crew) text += "
[blob.key] was [blob.name]" world << text return 1 /datum/game_mode/blob/proc/check_quarantine() var/numDead = 0 var/numAlive = 0 var/numSpace = 0 var/numOffStation = 0 for (var/mob/living/silicon/ai/aiPlayer in mob_list) for(var/mob/living/carbon/human/M in mob_list) if ((M != aiPlayer && M.client)) if (M.stat == 2) numDead += 1 else var/T = M.loc if (istype(T, /turf/space)) numSpace += 1 else if(istype(T, /turf)) if (M.z!=1) numOffStation += 1 else numAlive += 1 if (numSpace==0 && numOffStation==0) world << "The AI has won!" world << "The AI successfully maintained the quarantine - no players were in space or were off-station (as far as we can tell)." log_game("AI won at Blob mode despite overall loss.") else world << "The AI has lost!" world << text("The AI failed to maintain the quarantine - [] were in space and [] were off-station (as far as we can tell).", numSpace, numOffStation) log_game("AI lost at Blob mode.") log_game("Blob mode was lost.") return 1