Blob fixes, including fixes #9365

This commit is contained in:
Kyep
2018-09-04 19:44:14 -07:00
parent e19bbb0a5f
commit fd2cb10975
3 changed files with 14 additions and 15 deletions

View File

@@ -7,7 +7,7 @@
var/mob/camera/blob/overmind = null
/obj/structure/blob/storage/update_icon()
if(health <= 0)
if(health <= 0 && !QDELETED(src))
overmind.max_blob_points -= 50
qdel(src)

View File

@@ -1,7 +1,6 @@
/datum/event/blob
announceWhen = 60
endWhen = 120
var/obj/structure/blob/core/Blob
announceWhen = 120
endWhen = 180
/datum/event/blob/announce()
event_announcement.Announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/AI/outbreak5.ogg')
@@ -24,11 +23,4 @@
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)
kill()
return
if(IsMultiple(activeFor, 3))
Blob.process()
notify_ghosts("Infected Mouse has appeared in [get_area(B)].", source = B, alert_overlay = alert_overlay)

View File

@@ -186,9 +186,16 @@
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
spawn(20)
// This delay is necessary because /obj/structure/blob/core/proc/create_overmind has a spawn() in it which causes core.overmind not to be defined immediately.
if(core.overmind)
core.overmind.add_points(60)
if(core.overmind.mind)
core.overmind.mind.special_role = SPECIAL_ROLE_BLOB_OVERMIND
else
log_debug("blobinfected/proc/burst: Blob lacks a core.overmind.mind.")
else
log_debug("blobinfected/proc/burst: Blob lacks an core.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.