mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 18:13:34 +01:00
@@ -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, "<span class='userdanger'>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.</span>")
|
||||
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)
|
||||
|
||||
@@ -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, "<span class='warning'>[timeleft] seconds until you burst, and become a blob...</span>")
|
||||
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, "<span class='userdanger'>You feel ready to burst, but this isn't an appropriate place! You must return to the station!</span>")
|
||||
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, "<span class='warning'>You try to pick up [src], but they slip out of your grasp!</span>")
|
||||
to_chat(src, "<span class='warning'>[src] tries to pick you up, but you wriggle free of their grasp!</span>")
|
||||
Reference in New Issue
Block a user