From c42e1b17f49c5267bba020b639fd0b34f1ee2898 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Sat, 21 Oct 2017 14:07:55 -0500 Subject: [PATCH] Blob fixes --- code/game/gamemodes/blob/blobs/core.dm | 4 +++ code/game/gamemodes/blob/overmind.dm | 48 ++++++++++++++++++++++++++ code/modules/admin/player_panel.dm | 5 +++ code/modules/events/blob.dm | 32 +++++++++++++++++ code/modules/mob/transform_procs.dm | 6 ++++ 5 files changed, 95 insertions(+) diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index 3099b6f3f8..91bc8a4f8a 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -24,8 +24,12 @@ if(overmind) update_icon() point_rate = new_rate + addtimer(CALLBACK(src, .proc/generate_announcement), 1800) . = ..() +/obj/structure/blob/core/proc/generate_announcement() + priority_announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/outbreak5.ogg') + /obj/structure/blob/core/scannerreport() return "Directs the blob's expansion, gradually expands, and sustains nearby blob spores and blobbernauts." diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index 9f8a44bed2..9b5585f7b1 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -63,8 +63,56 @@ place_blob_core(base_point_rate, 1) else qdel(src) +<<<<<<< HEAD ..() +======= + else if(!victory_in_progress && (blobs_legit.len >= blobwincount)) + victory_in_progress = TRUE + priority_announce("Biohazard has reached critical mass. Station loss is imminent.", "Biohazard Alert") + set_security_level("delta") + max_blob_points = INFINITY + blob_points = INFINITY + addtimer(CALLBACK(src, .proc/victory), 450) + ..() + + +/mob/camera/blob/proc/victory() + sound_to_playing_players('sound/machines/alarm.ogg') + sleep(100) + for(var/mob/living/L in GLOB.mob_list) + var/turf/T = get_turf(L) + if(!T || !(T.z in GLOB.station_z_levels)) + continue + + if(L in GLOB.overminds || L.checkpass(PASSBLOB)) + continue + + var/area/Ablob = get_area(T) + + if(!Ablob.blob_allowed) + continue + + playsound(L, 'sound/effects/splat.ogg', 50, 1) + L.death() + new/mob/living/simple_animal/hostile/blob/blobspore(T) + + for(var/V in GLOB.sortedAreas) + var/area/A = V + if(!A.blob_allowed) + continue + A.color = blob_reagent_datum.color + A.name = "blob" + A.icon = 'icons/mob/blob.dmi' + A.icon_state = "blob_shield" + A.layer = BELOW_MOB_LAYER + A.invisibility = 0 + A.blend_mode = 0 + to_chat(world, "[real_name] consumed the station in an unstoppable tide!") + SSticker.news_report = BLOB_WIN + SSticker.force_ending = 1 + +>>>>>>> 7034a22... Blob fixes (#31913) /mob/camera/blob/Destroy() for(var/BL in GLOB.blobs) var/obj/structure/blob/B = BL diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index f40b85f7d7..6909f15c3f 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -593,6 +593,7 @@ var/list/blob_minds = list() for(var/mob/camera/blob/B in GLOB.mob_list) blob_minds |= B.mind +<<<<<<< HEAD if(istype(SSticker.mode, /datum/game_mode/blob) || blob_minds.len) dat += "
" @@ -601,6 +602,10 @@ blob_minds |= mode.blob_overminds dat += "" +======= + if(blob_minds.len) + dat += "
Blob
Progress: [GLOB.blobs_legit.len]/[mode.blobwincount]
" +>>>>>>> 7034a22... Blob fixes (#31913) for(var/datum/mind/blob in blob_minds) var/mob/M = blob.current if(M) diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index 42b54f3856..12971f2e35 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /datum/round_event_control/blob name = "Blob" typepath = /datum/round_event/ghost_role/blob @@ -36,3 +37,34 @@ message_admins("[key_name_admin(BC.overmind)] has been made into a blob overmind by an event.") log_game("[key_name(BC.overmind)] was spawned as a blob overmind by an event.") return SUCCESSFUL_SPAWN +======= +/datum/round_event_control/blob + name = "Blob" + typepath = /datum/round_event/ghost_role/blob + weight = 10 + max_occurrences = 1 + + min_players = 20 + + gamemode_blacklist = list("blob") //Just in case a blob survives that long + +/datum/round_event/ghost_role/blob + announceWhen = -1 + role_name = "blob overmind" + +/datum/round_event/ghost_role/blob/announce() + priority_announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/outbreak5.ogg') + +/datum/round_event/ghost_role/blob/spawn_role() + if(!GLOB.blobstart.len) + return MAP_ERROR + var/list/candidates = get_candidates("blob", null, ROLE_BLOB) + if(!candidates.len) + return NOT_ENOUGH_PLAYERS + var/mob/dead/observer/new_blob = pick(candidates) + var/mob/camera/blob/BC = new_blob.become_overmind() + spawned_mobs += BC + message_admins("[key_name_admin(BC)] has been made into a blob overmind by an event.") + log_game("[key_name(BC)] was spawned as a blob overmind by an event.") + return SUCCESSFUL_SPAWN +>>>>>>> 7034a22... Blob fixes (#31913) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index dc87736e5d..f8c262636b 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -462,12 +462,18 @@ . = new_slime qdel(src) +<<<<<<< HEAD /mob/proc/become_overmind(mode_made, starting_points = 60) var/mob/camera/blob/B = new /mob/camera/blob(loc, 0, mode_made, starting_points) if(mind) mind.transfer_to(B) else B.key = key +======= +/mob/proc/become_overmind(starting_points = 60) + var/mob/camera/blob/B = new /mob/camera/blob(loc, starting_points) + B.key = key +>>>>>>> 7034a22... Blob fixes (#31913) . = B qdel(src)
Blob