[MIRROR] Move death(), gib(), and dust() from /mob to /mob/living (#1634)

* Move death(), gib(), and dust() from /mob to /mob/living

* a

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
SkyratBot
2020-11-10 22:01:47 +01:00
committed by GitHub
co-authored by Jared-Fogle Azarak
parent a144a5e9e2
commit 2ff5f9b259
37 changed files with 169 additions and 137 deletions
+18 -11
View File
@@ -664,7 +664,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
else
return
/client/proc/cmd_admin_gib(mob/M in GLOB.mob_list)
/client/proc/cmd_admin_gib(mob/victim in GLOB.mob_list)
set category = "Admin.Fun"
set name = "Gib"
@@ -675,19 +675,23 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(confirm == "Cancel")
return
//Due to the delay here its easy for something to have happened to the mob
if(!M)
if(!victim)
return
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]")
log_admin("[key_name(usr)] has gibbed [key_name(victim)]")
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(victim)]")
if(isobserver(M))
new /obj/effect/gibspawner/generic(get_turf(M))
if(isobserver(victim))
new /obj/effect/gibspawner/generic(get_turf(victim))
return
if(confirm == "Yes")
M.gib()
else
M.gib(1)
var/mob/living/living_victim = victim
if (istype(living_victim))
if(confirm == "Yes")
living_victim.gib()
else
living_victim.gib(TRUE)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Gib") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_gib_self()
@@ -699,7 +703,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
log_admin("[key_name(usr)] used gibself.")
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used gibself.</span>")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Gib Self") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
mob.gib(1, 1, 1)
var/mob/living/ourself = mob
if (istype(ourself))
ourself.gib(TRUE, TRUE, TRUE)
/client/proc/cmd_admin_check_contents(mob/living/M in GLOB.mob_list)
set category = "Debug"
+1 -1
View File
@@ -49,7 +49,7 @@
button_icon_state = "blob"
/datum/action/innate/blobpop/Activate()
var/mob/old_body = owner
var/mob/living/old_body = owner
var/datum/antagonist/blob/blobtag = owner.mind.has_antag_datum(/datum/antagonist/blob)
if(!blobtag)
Remove()
@@ -7,7 +7,7 @@
dna_cost = 1
req_human = 1
/datum/action/changeling/headcrab/sting_action(mob/user)
/datum/action/changeling/headcrab/sting_action(mob/living/user)
set waitfor = FALSE
if(alert("Are we sure we wish to kill ourself and create a headslug?",,"Yes", "No") == "No")
return
@@ -55,14 +55,14 @@
var/datum/antagonist/heretic/master = user.mind.has_antag_datum(/datum/antagonist/heretic)
heretic_monster.set_owner(master)
atoms -= humie
RegisterSignal(humie,COMSIG_MOB_DEATH,.proc/remove_ghoul)
RegisterSignal(humie,COMSIG_LIVING_DEATH,.proc/remove_ghoul)
ghouls += humie
/datum/eldritch_knowledge/flesh_ghoul/proc/remove_ghoul(datum/source)
var/mob/living/carbon/human/humie = source
ghouls -= humie
humie.mind.remove_antag_datum(/datum/antagonist/heretic_monster)
UnregisterSignal(source,COMSIG_MOB_DEATH)
UnregisterSignal(source,COMSIG_LIVING_DEATH)
/datum/eldritch_knowledge/flesh_grasp
name = "Grasp of Flesh"
@@ -102,7 +102,7 @@
log_game("[key_name_admin(human_target)] has become a ghoul, their master is [user.real_name]")
//we change it to true only after we know they passed all the checks
. = TRUE
RegisterSignal(human_target,COMSIG_MOB_DEATH,.proc/remove_ghoul)
RegisterSignal(human_target,COMSIG_LIVING_DEATH,.proc/remove_ghoul)
human_target.revive(full_heal = TRUE, admin_revive = TRUE)
human_target.setMaxHealth(25)
human_target.health = 25
@@ -131,7 +131,7 @@
var/mob/living/carbon/human/humie = source
spooky_scaries -= humie
humie.mind.remove_antag_datum(/datum/antagonist/heretic_monster)
UnregisterSignal(source, COMSIG_MOB_DEATH)
UnregisterSignal(source, COMSIG_LIVING_DEATH)
/datum/eldritch_knowledge/flesh_mark
name = "Mark of flesh"
@@ -585,9 +585,10 @@
/proc/KillEveryoneOnZLevel(z)
if(!z)
return
for(var/mob/M in GLOB.mob_list)
if(M.stat != DEAD && M.z == z)
M.gib()
for(var/_victim in GLOB.mob_living_list)
var/mob/living/victim = _victim
if(victim.stat != DEAD && victim.z == z)
victim.gib()
/*
This is here to make the tiles around the station mininuke change when it's armed.
+12 -11
View File
@@ -297,14 +297,15 @@
victory()
/obj/machinery/capture_the_flag/proc/victory()
for(var/mob/M in GLOB.mob_list)
var/area/mob_area = get_area(M)
for(var/mob/_competitor in GLOB.mob_living_list)
var/mob/living/competitor = _competitor
var/area/mob_area = get_area(competitor)
if(istype(mob_area, /area/ctf))
to_chat(M, "<span class='narsie [team_span]'>[team] team wins!</span>")
to_chat(M, "<span class='userdanger'>Teams have been cleared. Click on the machines to vote to begin another round.</span>")
for(var/obj/item/ctf/W in M)
M.dropItemToGround(W)
M.dust()
to_chat(competitor, "<span class='narsie [team_span]'>[team] team wins!</span>")
to_chat(competitor, "<span class='userdanger'>Teams have been cleared. Click on the machines to vote to begin another round.</span>")
for(var/obj/item/ctf/W in competitor)
competitor.dropItemToGround(W)
competitor.dust()
for(var/obj/machinery/control_point/control in GLOB.machines)
control.icon_state = "dominator"
control.controlling = null
@@ -359,10 +360,10 @@
ctf_enabled = FALSE
arena_reset = FALSE
var/area/A = get_area(src)
for(var/i in GLOB.mob_list)
var/mob/M = i
if((get_area(A) == A) && (M.ckey in team_members))
M.dust()
for(var/_competitor in GLOB.mob_living_list)
var/mob/living/competitor = _competitor
if((get_area(A) == A) && (competitor.ckey in team_members))
competitor.dust()
team_members.Cut()
spawned_mobs.Cut()
recently_dead_ckeys.Cut()
@@ -230,9 +230,9 @@
/obj/machinery/gibber/autogibber/Bumped(atom/movable/AM)
var/atom/input = get_step(src, input_dir)
if(ismob(AM))
var/mob/M = AM
if(isliving(AM))
var/mob/living/victim = AM
if(M.loc == input)
M.forceMove(src)
M.gib()
if(victim.loc == input)
victim.forceMove(src)
victim.gib()
@@ -30,8 +30,8 @@
if (recipe.output && loc && !QDELETED(src))
for(var/i = 0, i < (rating_amount * recipe.multiplier), i++)
new recipe.output(drop_location())
if (ismob(what))
var/mob/themob = what
if (isliving(what))
var/mob/living/themob = what
themob.gib(TRUE,TRUE,TRUE)
else
qdel(what)
+1 -1
View File
@@ -15,7 +15,7 @@
mutatelist = list(/obj/item/seeds/watermelon/holy, /obj/item/seeds/watermelon/barrel)
reagents_add = list(/datum/reagent/water = 0.2, /datum/reagent/consumable/nutriment/vitamin = 0.04, /datum/reagent/consumable/nutriment = 0.2)
/obj/item/seeds/watermelon/suicide_act(mob/user)
/obj/item/seeds/watermelon/suicide_act(mob/living/user)
user.visible_message("<span class='suicide'>[user] is swallowing [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.gib()
new product(drop_location())
-6
View File
@@ -25,12 +25,6 @@ INITIALIZE_IMMEDIATE(/mob/dead)
/mob/dead/canUseStorage()
return FALSE
/mob/dead/dust(just_ash, drop_items, force) //ghosts can't be vaporised.
return
/mob/dead/gib() //ghosts can't be gibbed.
return
/mob/dead/forceMove(atom/destination)
var/turf/old_turf = get_turf(src)
var/turf/new_turf = get_turf(destination)
-14
View File
@@ -1,14 +0,0 @@
//This is the proc for gibbing a mob. Cannot gib ghosts.
//added different sort of gibs and animations. N
/mob/proc/gib()
return
//This is the proc for turning a mob into ash. Mostly a copy of gib code (above).
//Originally created for wizard disintegrate. I've removed the virus code since it's irrelevant here.
//Dusting robots does not eject the MMI, so it's a bit more powerful than gib() /N
/mob/proc/dust(just_ash, drop_items, force)
return
/mob/proc/death(gibbed)
SEND_SIGNAL(src, COMSIG_MOB_DEATH, gibbed)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_MOB_DEATH, src , gibbed)
@@ -620,7 +620,7 @@
var/datum/action/innate/linked_speech/action = new(src)
linked_actions.Add(action)
action.Grant(M)
RegisterSignal(M, COMSIG_MOB_DEATH , .proc/unlink_mob)
RegisterSignal(M, COMSIG_LIVING_DEATH , .proc/unlink_mob)
RegisterSignal(M, COMSIG_PARENT_QDELETING, .proc/unlink_mob)
return TRUE
@@ -628,7 +628,7 @@
var/link_id = linked_mobs.Find(M)
if(!(link_id))
return
UnregisterSignal(M, list(COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETING))
UnregisterSignal(M, list(COMSIG_LIVING_DEATH, COMSIG_PARENT_QDELETING))
var/datum/action/innate/linked_speech/action = linked_actions[link_id]
action.Remove(M)
to_chat(M, "<span class='notice'>You are no longer connected to [slimelink_owner.real_name]'s Slime Link.</span>")
+28 -5
View File
@@ -1,4 +1,12 @@
/mob/living/gib(no_brain, no_organs, no_bodyparts)
/**
* Blow up the mob into giblets
*
* Arguments:
* * no_brain - Should the mob NOT drop a brain?
* * no_organs - Should the mob NOT drop organs?
* * no_bodyparts - Should the mob NOT drop bodyparts?
*/
/mob/living/proc/gib(no_brain, no_organs, no_bodyparts)
var/prev_lying = lying_angle
if(stat != DEAD)
death(TRUE)
@@ -26,7 +34,16 @@
/mob/living/proc/spread_bodyparts()
return
/mob/living/dust(just_ash, drop_items, force)
/**
* This is the proc for turning a mob into ash.
* Dusting robots does not eject the MMI, so it's a bit more powerful than gib()
*
* Arguments:
* * just_ash - If TRUE, ash will spawn where the mob was, as opposed to remains
* * drop_items - Should the mob drop their items before dusting?
* * force - Should this mob be FORCABLY dusted?
*/
/mob/living/proc/dust(just_ash, drop_items, force)
death(TRUE)
if(drop_items)
@@ -45,8 +62,13 @@
/mob/living/proc/spawn_dust(just_ash = FALSE)
new /obj/effect/decal/cleanable/ash(loc)
/mob/living/death(gibbed)
/*
* Called when the mob dies. Can also be called manually to kill a mob.
*
* Arguments:
* * gibbed - Was the mob gibbed?
*/
/mob/living/proc/death(gibbed)
set_stat(DEAD)
unset_machine()
timeofdeath = world.time
@@ -70,7 +92,8 @@
med_hud_set_status()
stop_pulling()
. = ..()
SEND_SIGNAL(src, COMSIG_LIVING_DEATH, gibbed)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_MOB_DEATH, src, gibbed)
if (client)
client.move_delay = initial(client.move_delay)
+2 -2
View File
@@ -958,7 +958,7 @@
return
else if(mind)
RegisterSignal(target, COMSIG_MOB_DEATH, .proc/disconnect_shell)
RegisterSignal(target, COMSIG_LIVING_DEATH, .proc/disconnect_shell)
deployed_shell = target
target.deploy_init(src)
mind.transfer_to(target)
@@ -996,7 +996,7 @@
if(deployed_shell) //Forcibly call back AI in event of things such as damage, EMP or power loss.
to_chat(src, "<span class='danger'>Your remote connection has been reset!</span>")
deployed_shell.undeploy()
UnregisterSignal(deployed_shell, COMSIG_MOB_DEATH)
UnregisterSignal(deployed_shell, COMSIG_LIVING_DEATH)
diag_hud_set_deployed()
/mob/living/silicon/ai/resist()
@@ -85,7 +85,7 @@
var/datum/action/innate/mansus_speech/action = new(src)
linked_mobs[mob_linked] = action
action.Grant(mob_linked)
RegisterSignal(mob_linked, list(COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETING), .proc/unlink_mob)
RegisterSignal(mob_linked, list(COMSIG_LIVING_DEATH, COMSIG_PARENT_QDELETING), .proc/unlink_mob)
return TRUE
/mob/living/simple_animal/hostile/eldritch/raw_prophet/proc/unlink_mob(mob/living/mob_linked)
@@ -93,7 +93,7 @@
if(!linked_mobs[mob_linked])
return
UnregisterSignal(mob_linked, list(COMSIG_MOB_DEATH, COMSIG_PARENT_QDELETING))
UnregisterSignal(mob_linked, list(COMSIG_LIVING_DEATH, COMSIG_PARENT_QDELETING))
var/datum/action/innate/mansus_speech/action = linked_mobs[mob_linked]
action.Remove(mob_linked)
qdel(action)
@@ -817,7 +817,7 @@ Difficulty: Very Hard
action_icon_state = "exit_possession"
sound = null
/obj/effect/proc_holder/spell/targeted/exit_possession/cast(list/targets, mob/user = usr)
/obj/effect/proc_holder/spell/targeted/exit_possession/cast(list/targets, mob/living/user = usr)
if(!isfloorturf(user.loc))
return
var/datum/mind/target_mind = user.mind
@@ -286,7 +286,7 @@ Difficulty: Extremely Hard
return
forceMove(user)
to_chat(user, "<span class='notice'>You feel a bit safer... but a demonic presence lurks in the back of your head...</span>")
RegisterSignal(user, COMSIG_MOB_DEATH, .proc/resurrect)
RegisterSignal(user, COMSIG_LIVING_DEATH, .proc/resurrect)
/// Resurrects the target when they die by moving them and dusting a clone in their place, one life for another
/obj/item/resurrection_crystal/proc/resurrect(mob/living/carbon/user, gibbed)
@@ -207,7 +207,7 @@
///Register for owner death
/datum/action/consume/New(Target)
. = ..()
RegisterSignal(owner, COMSIG_MOB_DEATH, .proc/on_owner_death)
RegisterSignal(owner, COMSIG_LIVING_DEATH, .proc/on_owner_death)
RegisterSignal(owner, COMSIG_PARENT_PREQDELETED, .proc/handle_mob_deletion)
/datum/action/consume/proc/handle_mob_deletion()
+24 -18
View File
@@ -11,25 +11,24 @@
name = "bolt of death"
icon_state = "pulse1_bl"
/obj/projectile/magic/death/on_hit(target)
/obj/projectile/magic/death/on_hit(mob/living/target)
. = ..()
if(ismob(target))
var/mob/M = target
if(M.anti_magic_check())
M.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
return BULLET_ACT_BLOCK
if(isliving(M))
var/mob/living/L = M
if(L.mob_biotypes & MOB_UNDEAD) //negative energy heals the undead
if(L.revive(full_heal = TRUE, admin_revive = TRUE))
L.grab_ghost(force = TRUE) // even suicides
to_chat(L, "<span class='notice'>You rise with a start, you're undead!!!</span>")
else if(L.stat != DEAD)
to_chat(L, "<span class='notice'>You feel great!</span>")
else
L.death(0)
else
M.death(0)
if(!istype(target))
return
if(target.anti_magic_check())
target.visible_message("<span class='warning'>[src] vanishes on contact with [target]!</span>")
return BULLET_ACT_BLOCK
if(target.mob_biotypes & MOB_UNDEAD) //negative energy heals the undead
if(target.revive(full_heal = TRUE, admin_revive = TRUE))
target.grab_ghost(force = TRUE) // even suicides
to_chat(target, "<span class='notice'>You rise with a start, you're undead!!!</span>")
else if(target.stat != DEAD)
to_chat(target, "<span class='notice'>You feel great!</span>")
return
target.death()
/obj/projectile/magic/resurrection
name = "bolt of resurrection"
@@ -155,6 +154,13 @@
qdel(src)
/proc/wabbajack(mob/living/M, randomize)
// If the mob has a shapeshifted form, we want to pull out the reference of the caster's original body from it.
// We then want to restore this original body through the shapeshift holder itself.
var/obj/shapeshift_holder/shapeshift = locate() in M
if(shapeshift)
M = shapeshift.stored
shapeshift.restore()
if(!istype(M) || M.stat == DEAD || M.notransform || (GODMODE & M.status_flags))
return
@@ -63,8 +63,8 @@ Note: Must be placed within 3 tiles of the R&D Console
var/list/food = thing.GetDeconstructableContents()
for(var/obj/item/innerthing in food)
destroy_item(innerthing, TRUE)
for(var/mob/M in thing)
M.death()
for(var/mob/living/victim in thing)
victim.death()
qdel(thing)
loaded_item = null
@@ -765,7 +765,7 @@
var/prompted = 0
var/animal_type = SENTIENCE_ORGANIC
/obj/item/slimepotion/transference/afterattack(mob/living/M, mob/user, proximity)
/obj/item/slimepotion/transference/afterattack(mob/living/M, mob/living/user, proximity)
if(!proximity)
return
if(prompted || !ismob(M))
@@ -371,7 +371,7 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
return
// Prepare for...
var/mob/unforeseen_consequences = get_atom_on_turf(H, /mob)
var/mob/living/unforeseen_consequences = get_atom_on_turf(H, /mob/living)
// Turns out giving anyone who grabs a Hilbert's Hotel a free, complementary warp whistle is probably bad.
// Let's gib the last person to have selected a room number in it.
+10 -11
View File
@@ -53,35 +53,34 @@
icon_state = "disintegrate"
inhand_icon_state = "disintegrate"
/obj/item/melee/touch_attack/disintegrate/afterattack(atom/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !ismob(target) || !iscarbon(user) || !(user.mobility_flags & MOBILITY_USE)) //exploding after touching yourself would be bad
/obj/item/melee/touch_attack/disintegrate/afterattack(mob/living/target, mob/living/carbon/user, proximity)
if(!proximity || target == user || !istype(target) || !iscarbon(user) || !(user.mobility_flags & MOBILITY_USE)) //exploding after touching yourself would be bad
return
if(!user.can_speak_vocal())
to_chat(user, "<span class='warning'>You can't get the words out!</span>")
return
var/mob/M = target
do_sparks(4, FALSE, M.loc)
do_sparks(4, FALSE, target.loc)
for(var/mob/living/L in view(src, 7))
if(L != user)
L.flash_act(affect_silicon = FALSE)
var/atom/A = M.anti_magic_check()
var/atom/A = target.anti_magic_check()
if(A)
if(isitem(A))
target.visible_message("<span class='warning'>[target]'s [A] glows brightly as it wards off the spell!</span>")
user.visible_message("<span class='warning'>The feedback blows [user]'s arm off!</span>","<span class='userdanger'>The spell bounces from [M]'s skin back into your arm!</span>")
user.visible_message("<span class='warning'>The feedback blows [user]'s arm off!</span>","<span class='userdanger'>The spell bounces from [target]'s skin back into your arm!</span>")
user.flash_act()
var/obj/item/bodypart/part = user.get_holding_bodypart_of_item(src)
if(part)
part.dismember()
return ..()
var/obj/item/clothing/suit/hooded/bloated_human/suit = M.get_item_by_slot(ITEM_SLOT_OCLOTHING)
var/obj/item/clothing/suit/hooded/bloated_human/suit = target.get_item_by_slot(ITEM_SLOT_OCLOTHING)
if(istype(suit))
M.visible_message("<span class='danger'>[M]'s [suit] explodes off of them into a puddle of gore!</span>")
M.dropItemToGround(suit)
target.visible_message("<span class='danger'>[target]'s [suit] explodes off of them into a puddle of gore!</span>")
target.dropItemToGround(suit)
qdel(suit)
new /obj/effect/gibspawner(M.loc)
new /obj/effect/gibspawner(target.loc)
return ..()
M.gib()
target.gib()
return ..()
/obj/item/melee/touch_attack/fleshtostone
+1 -1
View File
@@ -121,7 +121,7 @@
if(!item_turf)
return "[src] is not at a turf? NULLSPACE!?"
var/mob/old_body = mind.current
var/mob/living/old_body = mind.current
var/mob/living/carbon/human/lich = new(item_turf)
lich.equip_to_slot_or_del(new /obj/item/clothing/shoes/sandal/magic(lich), ITEM_SLOT_FEET)
+14 -4
View File
@@ -149,11 +149,12 @@
shape.apply_damage(damapply, source.convert_damage_type, forced = TRUE, wound_bonus=CANT_WOUND);
shape.blood_volume = stored.blood_volume;
stored.RegisterSignal(src, COMSIG_PARENT_QDELETING, .proc/shape_death)
stored.RegisterSignal(shape, list(COMSIG_PARENT_QDELETING, COMSIG_MOB_DEATH), .proc/shape_death)
shape.RegisterSignal(stored, list(COMSIG_PARENT_QDELETING, COMSIG_MOB_DEATH), .proc/shape_death)
RegisterSignal(shape, list(COMSIG_PARENT_QDELETING, COMSIG_LIVING_DEATH), .proc/shape_death)
RegisterSignal(stored, list(COMSIG_PARENT_QDELETING, COMSIG_LIVING_DEATH), .proc/caster_death)
/obj/shapeshift_holder/Destroy()
// Restore manages signal unregistering. If restoring is TRUE, we've already unregistered the signals and we're here
// because restore() qdel'd src.
if(!restoring)
restore()
stored = null
@@ -191,6 +192,10 @@
restore()
/obj/shapeshift_holder/proc/restore(death=FALSE)
// Destroy() calls this proc if it hasn't been called. Unregistering here prevents multiple qdel loops
// when caster and shape both die at the same time.
UnregisterSignal(shape, list(COMSIG_PARENT_QDELETING, COMSIG_LIVING_DEATH))
UnregisterSignal(stored, list(COMSIG_PARENT_QDELETING, COMSIG_LIVING_DEATH))
restoring = TRUE
stored.forceMove(shape.loc)
stored.notransform = FALSE
@@ -207,5 +212,10 @@
stored.apply_damage(damapply, source.convert_damage_type, forced = TRUE, wound_bonus=CANT_WOUND)
if(source.convert_damage)
stored.blood_volume = shape.blood_volume;
QDEL_NULL(shape)
// This guard is important because restore() can also be called on COMSIG_PARENT_QDELETING for shape, as well as on death.
// This can happen in, for example, [/proc/wabbajack] where the mob hit is qdel'd.
if(!QDELETED(shape))
QDEL_NULL(shape)
qdel(src)
+2 -2
View File
@@ -1081,14 +1081,14 @@
/obj/vehicle/sealed/mecha/add_occupant(mob/M, control_flags)
RegisterSignal(M, COMSIG_MOB_DEATH, .proc/mob_exit)
RegisterSignal(M, COMSIG_LIVING_DEATH, .proc/mob_exit)
RegisterSignal(M, COMSIG_MOB_CLICKON, .proc/on_mouseclick)
RegisterSignal(M, COMSIG_MOB_SAY, .proc/display_speech_bubble)
. = ..()
update_icon()
/obj/vehicle/sealed/mecha/remove_occupant(mob/M)
UnregisterSignal(M, COMSIG_MOB_DEATH)
UnregisterSignal(M, COMSIG_LIVING_DEATH)
UnregisterSignal(M, COMSIG_MOB_CLICKON)
UnregisterSignal(M, COMSIG_MOB_SAY)
M.clear_alert("charge")