mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 15:08:02 +01:00
Makes blob spores/blobbers and mice GC properly (#17237)
This commit is contained in:
@@ -24,6 +24,4 @@
|
||||
spore_delay = world.time + 100 // 10 seconds
|
||||
var/mob/living/simple_animal/hostile/blob/blobspore/BS = new/mob/living/simple_animal/hostile/blob/blobspore(src.loc, src)
|
||||
if(overmind)
|
||||
BS.color = overmind.blob_reagent_datum?.complementary_color
|
||||
BS.overmind = overmind
|
||||
overmind.blob_mobs.Add(BS)
|
||||
overmind.add_mob_to_overmind(BS)
|
||||
|
||||
@@ -77,6 +77,15 @@
|
||||
|
||||
blob_talk(message)
|
||||
|
||||
/mob/camera/blob/proc/add_mob_to_overmind(mob/living/simple_animal/hostile/blob/B)
|
||||
B.color = blob_reagent_datum?.complementary_color
|
||||
B.overmind = src
|
||||
blob_mobs += B
|
||||
RegisterSignal(B, COMSIG_PARENT_QDELETING, .proc/on_blob_mob_death)
|
||||
|
||||
/mob/camera/blob/proc/on_blob_mob_death(mob/living/simple_animal/hostile/blob/B)
|
||||
blob_mobs -= B
|
||||
|
||||
/mob/camera/blob/proc/blob_talk(message)
|
||||
log_say("(BLOB) [message]", src)
|
||||
|
||||
|
||||
@@ -231,9 +231,7 @@
|
||||
var/mob/living/simple_animal/hostile/blob/blobbernaut/blobber = new /mob/living/simple_animal/hostile/blob/blobbernaut (get_turf(B))
|
||||
if(blobber)
|
||||
qdel(B)
|
||||
blobber.color = blob_reagent_datum.complementary_color
|
||||
blobber.overmind = src
|
||||
blob_mobs.Add(blobber)
|
||||
add_mob_to_overmind(blobber)
|
||||
blobber.AIStatus = AI_OFF
|
||||
blobber.LoseTarget()
|
||||
spawn()
|
||||
|
||||
@@ -212,9 +212,9 @@
|
||||
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, C, 3)
|
||||
core.lateblobtimer()
|
||||
qdel(blobmind) // Delete the old mind. THe blob will make a new one
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user