mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 22:50:26 +01:00
[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:
co-authored by
Jared-Fogle
Azarak
parent
a144a5e9e2
commit
2ff5f9b259
@@ -14,7 +14,7 @@
|
||||
#define COMSIG_GLOB_EXPLOSION "!explosion"
|
||||
/// mob was created somewhere : (mob)
|
||||
#define COMSIG_GLOB_MOB_CREATED "!mob_created"
|
||||
/// mob died somewhere : (mob , gibbed)
|
||||
/// mob died somewhere : (mob/living, gibbed)
|
||||
#define COMSIG_GLOB_MOB_DEATH "!mob_death"
|
||||
/// global living say plug - use sparingly: (mob/speaker , message)
|
||||
#define COMSIG_GLOB_LIVING_SAY_SPECIAL "!say_special"
|
||||
@@ -310,8 +310,6 @@
|
||||
#define COMSIG_MOB_LOGIN "mob_login"
|
||||
///from base of /mob/Logout(): ()
|
||||
#define COMSIG_MOB_LOGOUT "mob_logout"
|
||||
///from base of mob/death(): (gibbed)
|
||||
#define COMSIG_MOB_DEATH "mob_death"
|
||||
///from base of mob/set_stat(): (new_stat)
|
||||
#define COMSIG_MOB_STATCHANGE "mob_statchange"
|
||||
///from base of mob/clickon(): (atom/A, params)
|
||||
@@ -387,6 +385,9 @@
|
||||
///Sent when bloodcrawl ends in mob/living/phasein(): (phasein_decal)
|
||||
#define COMSIG_LIVING_AFTERPHASEIN "living_phasein"
|
||||
|
||||
///from base of mob/living/death(): (gibbed)
|
||||
#define COMSIG_LIVING_DEATH "living_death"
|
||||
|
||||
///sent from borg recharge stations: (amount, repairs)
|
||||
#define COMSIG_PROCESS_BORGCHARGER_OCCUPANT "living_charge"
|
||||
///sent when a mob/login() finishes: (client)
|
||||
|
||||
@@ -33,14 +33,14 @@
|
||||
RegisterSignal(parent, COMSIG_CARBON_GAIN_ORGAN, .proc/check_added_organ)
|
||||
RegisterSignal(parent, COMSIG_CARBON_LOSE_ORGAN, .proc/check_removed_organ)
|
||||
RegisterSignal(parent, COMSIG_LIVING_REVIVE, .proc/restart)
|
||||
RegisterSignal(parent, COMSIG_MOB_DEATH, .proc/pause)
|
||||
RegisterSignal(parent, COMSIG_LIVING_DEATH, .proc/pause)
|
||||
|
||||
/datum/component/manual_blinking/UnregisterFromParent()
|
||||
UnregisterSignal(parent, COMSIG_MOB_EMOTE)
|
||||
UnregisterSignal(parent, COMSIG_CARBON_GAIN_ORGAN)
|
||||
UnregisterSignal(parent, COMSIG_CARBON_LOSE_ORGAN)
|
||||
UnregisterSignal(parent, COMSIG_LIVING_REVIVE)
|
||||
UnregisterSignal(parent, COMSIG_MOB_DEATH)
|
||||
UnregisterSignal(parent, COMSIG_LIVING_DEATH)
|
||||
|
||||
/datum/component/manual_blinking/proc/restart()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -33,14 +33,14 @@
|
||||
RegisterSignal(parent, COMSIG_CARBON_GAIN_ORGAN, .proc/check_added_organ)
|
||||
RegisterSignal(parent, COMSIG_CARBON_LOSE_ORGAN, .proc/check_removed_organ)
|
||||
RegisterSignal(parent, COMSIG_LIVING_REVIVE, .proc/restart)
|
||||
RegisterSignal(parent, COMSIG_MOB_DEATH, .proc/pause)
|
||||
RegisterSignal(parent, COMSIG_LIVING_DEATH, .proc/pause)
|
||||
|
||||
/datum/component/manual_breathing/UnregisterFromParent()
|
||||
UnregisterSignal(parent, COMSIG_MOB_EMOTE)
|
||||
UnregisterSignal(parent, COMSIG_CARBON_GAIN_ORGAN)
|
||||
UnregisterSignal(parent, COMSIG_CARBON_LOSE_ORGAN)
|
||||
UnregisterSignal(parent, COMSIG_LIVING_REVIVE)
|
||||
UnregisterSignal(parent, COMSIG_MOB_DEATH)
|
||||
UnregisterSignal(parent, COMSIG_LIVING_DEATH)
|
||||
|
||||
/datum/component/manual_breathing/proc/restart()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
if(isliving(parent))
|
||||
RegisterSignal(parent, COMSIG_ATOM_EMP_ACT, .proc/on_emp)
|
||||
RegisterSignal(parent, COMSIG_MOB_DEATH, .proc/on_death)
|
||||
RegisterSignal(parent, COMSIG_LIVING_DEATH, .proc/on_death)
|
||||
RegisterSignal(parent, COMSIG_MOB_ALLOWED, .proc/check_access)
|
||||
RegisterSignal(parent, COMSIG_LIVING_ELECTROCUTE_ACT, .proc/on_shock)
|
||||
RegisterSignal(parent, COMSIG_LIVING_MINOR_SHOCK, .proc/on_minor_shock)
|
||||
@@ -85,7 +85,7 @@
|
||||
COMSIG_NANITE_SCAN,
|
||||
COMSIG_NANITE_SYNC,
|
||||
COMSIG_ATOM_EMP_ACT,
|
||||
COMSIG_MOB_DEATH,
|
||||
COMSIG_LIVING_DEATH,
|
||||
COMSIG_MOB_ALLOWED,
|
||||
COMSIG_LIVING_ELECTROCUTE_ACT,
|
||||
COMSIG_LIVING_MINOR_SHOCK,
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
spawned_mobs += L
|
||||
if(faction != null)
|
||||
L.faction = faction
|
||||
RegisterSignal(L, COMSIG_MOB_DEATH, .proc/on_spawned_death) // so we can remove them from the list, etc (for mobs with corpses)
|
||||
RegisterSignal(L, COMSIG_LIVING_DEATH, .proc/on_spawned_death) // so we can remove them from the list, etc (for mobs with corpses)
|
||||
playsound(spawn_location,spawn_sound, 50, TRUE)
|
||||
spawn_location.visible_message("<span class='danger'>[L] [spawn_text].</span>")
|
||||
|
||||
|
||||
+2
-2
@@ -101,7 +101,7 @@
|
||||
original_character = null
|
||||
if(current) // remove ourself from our old body's mind variable
|
||||
current.mind = null
|
||||
UnregisterSignal(current, COMSIG_MOB_DEATH)
|
||||
UnregisterSignal(current, COMSIG_LIVING_DEATH)
|
||||
SStgui.on_transfer(current, new_character)
|
||||
|
||||
if(key)
|
||||
@@ -128,7 +128,7 @@
|
||||
transfer_antag_huds(hud_to_transfer) //inherit the antag HUD
|
||||
transfer_actions(new_character)
|
||||
transfer_martial_arts(new_character)
|
||||
RegisterSignal(new_character, COMSIG_MOB_DEATH, .proc/set_death_time)
|
||||
RegisterSignal(new_character, COMSIG_LIVING_DEATH, .proc/set_death_time)
|
||||
if(active || force_key_move)
|
||||
new_character.key = key //now transfer the key to link the client to our new body
|
||||
if(new_character.client)
|
||||
|
||||
@@ -560,7 +560,9 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
|
||||
playsound(loc, 'sound/arcade/lose.ogg', 50, TRUE)
|
||||
xp_gained += 10//pity points
|
||||
if(obj_flags & EMAGGED)
|
||||
user.gib()
|
||||
var/mob/living/living_user = user
|
||||
if (istype(living_user))
|
||||
living_user.gib()
|
||||
SSblackbox.record_feedback("nested tally", "arcade_results", 1, list("loss", "hp", (obj_flags & EMAGGED ? "emagged":"normal")))
|
||||
|
||||
if(gameover)
|
||||
@@ -775,8 +777,11 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
|
||||
R.fields["m_stat"] = "*Unstable*"
|
||||
return
|
||||
|
||||
/obj/machinery/computer/arcade/orion_trail/ui_interact(mob/user)
|
||||
/obj/machinery/computer/arcade/orion_trail/ui_interact(mob/_user)
|
||||
. = ..()
|
||||
if (!isliving(_user))
|
||||
return
|
||||
var/mob/living/user = _user
|
||||
if(fuel <= 0 || food <=0 || settlers.len == 0)
|
||||
gameStatus = ORION_STATUS_GAMEOVER
|
||||
event = null
|
||||
@@ -1025,11 +1030,12 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
|
||||
playsound(loc,'sound/weapons/gun/pistol/shot.ogg', 100, TRUE)
|
||||
killed_crew++
|
||||
|
||||
var/mob/living/user = usr
|
||||
|
||||
if(settlers.len == 0 || alive == 0)
|
||||
say("The last crewmember [sheriff], shot themselves, GAME OVER!")
|
||||
if(obj_flags & EMAGGED)
|
||||
usr.death(0)
|
||||
obj_flags &= EMAGGED
|
||||
user.death()
|
||||
gameStatus = ORION_STATUS_GAMEOVER
|
||||
event = null
|
||||
|
||||
@@ -1039,7 +1045,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
|
||||
else if(obj_flags & EMAGGED)
|
||||
if(usr.name == sheriff)
|
||||
say("The crew of the ship chose to kill [usr.name]!")
|
||||
usr.death(0)
|
||||
user.death()
|
||||
|
||||
if(event == ORION_TRAIL_LING) //only ends the ORION_TRAIL_LING event, since you can do this action in multiple places
|
||||
event = null
|
||||
|
||||
@@ -188,7 +188,7 @@
|
||||
user.visible_message("<span class='warning'>\The [src] breaks off [user]'s arm!</span>", "<span class='warning'>\The [src] breaks off your arm!</span>")
|
||||
playsound(user, "desecration", 50, TRUE, -1)
|
||||
|
||||
/obj/item/food/proc/i_kill_you(obj/item/I, mob/user)
|
||||
/obj/item/food/proc/i_kill_you(obj/item/I, mob/living/user)
|
||||
if(istype(I, /obj/item/reagent_containers/food/snacks/pineappleslice))
|
||||
to_chat(user, "<font color='red' size='7'>If you want something crazy like pineapple, I'll kill you.</font>") //this is in bigger text because it's hard to spam something that gibs you, and so that you're perfectly aware of the reason why you died
|
||||
user.gib() //if you want something crazy like pineapple, i'll kill you
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
message_say = "FOR THE FEDERATION!"
|
||||
M.say(message_say, forced="C4 suicide")
|
||||
|
||||
/obj/item/grenade/c4/suicide_act(mob/user)
|
||||
/obj/item/grenade/c4/suicide_act(mob/living/user)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] suicided with [src] at [ADMIN_VERBOSEJMP(user)]")
|
||||
log_game("[key_name(user)] suicided with [src] at [AREACOORD(user)]")
|
||||
user.visible_message("<span class='suicide'>[user] activates [src] and holds it above [user.p_their()] head! It looks like [user.p_theyre()] going out with a bang!</span>")
|
||||
|
||||
@@ -177,13 +177,12 @@
|
||||
..()
|
||||
if(!isliving(user) || user.status_flags & GODMODE) //try to keep this in sync with supermatter's consume fail conditions
|
||||
return FALSE
|
||||
var/mob/ded = user
|
||||
user.visible_message("<span class='danger'>[ded] reaches out and tries to pick up [src]. [ded.p_their()] body starts to glow and bursts into flames before flashing into dust!</span>",\
|
||||
user.visible_message("<span class='danger'>[user] reaches out and tries to pick up [src]. [user.p_their()] body starts to glow and bursts into flames before flashing into dust!</span>",\
|
||||
"<span class='userdanger'>You reach for [src] with your hands. That was dumb.</span>",\
|
||||
"<span class='hear'>Everything suddenly goes silent.</span>")
|
||||
radiation_pulse(user, 500, 2)
|
||||
playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE)
|
||||
ded.dust()
|
||||
user.dust()
|
||||
|
||||
/obj/item/nuke_core_container/supermatter
|
||||
name = "supermatter bin"
|
||||
@@ -270,7 +269,7 @@
|
||||
update_icon()
|
||||
return ..()
|
||||
|
||||
/obj/item/hemostat/supermatter/proc/Consume(atom/movable/AM, mob/user)
|
||||
/obj/item/hemostat/supermatter/proc/Consume(atom/movable/AM, mob/living/user)
|
||||
if(ismob(AM))
|
||||
if(!isliving(AM))
|
||||
return
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -2207,7 +2207,6 @@
|
||||
#include "code\modules\mining\lavaland\ash_flora.dm"
|
||||
#include "code\modules\mining\lavaland\necropolis_chests.dm"
|
||||
#include "code\modules\mining\lavaland\ruins\gym.dm"
|
||||
#include "code\modules\mob\death.dm"
|
||||
#include "code\modules\mob\emote.dm"
|
||||
#include "code\modules\mob\inventory.dm"
|
||||
#include "code\modules\mob\login.dm"
|
||||
|
||||
Reference in New Issue
Block a user