diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index ef5a816d2ff..e58b2a861bd 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -11,14 +11,20 @@ if(!T) return kill() var/list/candidates = pollCandidates("Do you want to play as a blob?", ROLE_BLOB, 1) - var/mob/C - if(candidates.len) - C = pick(candidates) - Blob = new /obj/structure/blob/core(T, new_overmind=C.client) - for(var/i in 1 to 5) - Blob.process() - else + if(!candidates.len) return kill() + var/list/vents = list() + for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in all_vent_pumps) + if(is_station_level(temp_vent.loc.z) && !temp_vent.welded) + if(temp_vent.parent.other_atmosmch.len > 50) + vents += temp_vent + var/obj/vent = pick(vents) + var/mob/living/simple_animal/mouse/blobinfected/B = new(vent.loc) + var/mob/M = pick(candidates) + B.key = M.key + to_chat(B, "You are now a mouse, infected with blob spores. Find somewhere isolated... before you burst and become the blob! Use ventcrawl (alt-click on vents) to move around.") + var/image/alert_overlay = image('icons/mob/blob.dmi', "blank_blob") + notify_ghosts("Infected Mouse has appeared in [get_area(B)].", source = B, alert_overlay = alert_overlay) /datum/event/blob/tick() if(!Blob) diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index a7a62c74c0b..079ec7df1d2 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -146,3 +146,57 @@ response_disarm = "gently pushes aside" response_harm = "splats" gold_core_spawnable = CHEM_MOB_SPAWN_INVALID + + +/mob/living/simple_animal/mouse/blobinfected + maxHealth = 100 + health = 100 + atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0) + minbodytemp = 0 + gold_core_spawnable = CHEM_MOB_SPAWN_INVALID + var/cycles_alive = 0 + var/cycles_limit = 30 + var/has_burst = FALSE + +/mob/living/simple_animal/mouse/blobinfected/Life() + cycles_alive++ + var/timeleft = (cycles_limit - cycles_alive) * 2 + if(ismob(loc)) // if someone ate it, burst immediately + burst(FALSE) + else if(timeleft < 1) // if timer expired, burst. + burst(FALSE) + else if(cycles_alive % 2 == 0) // give the mouse/player a countdown reminder every 2 cycles + to_chat(src, "[timeleft] seconds until you burst, and become a blob...") + return ..() + +/mob/living/simple_animal/mouse/blobinfected/death(gibbed) + burst(gibbed) + return ..(gibbed) + +/mob/living/simple_animal/mouse/blobinfected/proc/burst(gibbed) + if(has_burst) + return FALSE + var/turf/T = get_turf(src) + if(!is_station_level(T.z) || isspaceturf(T)) + to_chat(src, "You feel ready to burst, but this isn't an appropriate place! You must return to the station!") + return FALSE + has_burst = TRUE + var/datum/mind/blobmind = mind + var/client/C = client + if(istype(blobmind) && istype(C)) + blobmind.special_role = SPECIAL_ROLE_BLOB + var/obj/structure/blob/core/core = new(T, 200, C, 3) + if(core.overmind && core.overmind.mind) + //core.overmind.mind.name = blob.name + core.overmind.mind.special_role = SPECIAL_ROLE_BLOB_OVERMIND + else + new /obj/structure/blob/core(T) // Ghosts will be prompted to control it. + if(ismob(loc)) // in case some taj/etc ate the mouse. + var/mob/M = loc + M.gib() + if(!gibbed) + gib() + +/mob/living/simple_animal/mouse/blobinfected/get_scooped(mob/living/carbon/grabber) + to_chat(grabber, "You try to pick up [src], but they slip out of your grasp!") + to_chat(src, "[src] tries to pick you up, but you wriggle free of their grasp!") \ No newline at end of file