From 9f60bb8385178dd664b6a462025faf209abe1721 Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 26 Jul 2018 12:12:08 -0700 Subject: [PATCH 1/4] initial version --- code/modules/events/blob.dm | 20 +++++--- .../living/simple_animal/friendly/mouse.dm | 50 +++++++++++++++++++ 2 files changed, 63 insertions(+), 7 deletions(-) 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..4de5679c720 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -146,3 +146,53 @@ 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 + var/cycles_alive = 0 + var/cycles_limit = 30 + var/has_burst = FALSE + +/mob/living/simple_animal/mouse/blobinfected/Life() + cycles_alive++ + if(prob(20)) + var/timeleft = (cycles_limit - cycles_alive) * 2 + if(timeleft < 1) + burst(FALSE) + else + 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) || istype(T, /turf/space)) + 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() + + From 7805e9c7a9c99cc66ff069b14e005c765c94e1a4 Mon Sep 17 00:00:00 2001 From: Kyep Date: Thu, 26 Jul 2018 15:51:00 -0700 Subject: [PATCH 2/4] isspaceturf --- code/modules/mob/living/simple_animal/friendly/mouse.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 4de5679c720..cdb88e4f5bc 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -175,7 +175,7 @@ if(has_burst) return FALSE var/turf/T = get_turf(src) - if(!is_station_level(T.z) || istype(T, /turf/space)) + 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 From c767ce232813fde10e9a86226ee4aac2b164b084 Mon Sep 17 00:00:00 2001 From: Kyep Date: Fri, 27 Jul 2018 12:59:52 -0700 Subject: [PATCH 3/4] taj eating, gold_core_spawnable, %2 reminders --- .../mob/living/simple_animal/friendly/mouse.dm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index cdb88e4f5bc..e720a8d2cf9 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -153,18 +153,20 @@ 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++ - if(prob(20)) - var/timeleft = (cycles_limit - cycles_alive) * 2 - if(timeleft < 1) - burst(FALSE) - else - to_chat(src, "[timeleft] seconds until you burst, and become a blob...") + var/timeleft = (cycles_limit - cycles_alive) * 2 + if(ismob(loc)) // if some taj/etc ate the mouse, burst instantly. + 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) From d9b606ae3753cd93bddf281932c3881abc25962e Mon Sep 17 00:00:00 2001 From: Kyep Date: Fri, 27 Jul 2018 13:16:34 -0700 Subject: [PATCH 4/4] prevent hand pickup --- code/modules/mob/living/simple_animal/friendly/mouse.dm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index e720a8d2cf9..079ec7df1d2 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -161,7 +161,7 @@ /mob/living/simple_animal/mouse/blobinfected/Life() cycles_alive++ var/timeleft = (cycles_limit - cycles_alive) * 2 - if(ismob(loc)) // if some taj/etc ate the mouse, burst instantly. + if(ismob(loc)) // if someone ate it, burst immediately burst(FALSE) else if(timeleft < 1) // if timer expired, burst. burst(FALSE) @@ -197,4 +197,6 @@ 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