Refactors stack traces, tiny bit of cleanup (#18773)

This commit is contained in:
AffectedArc07
2022-08-14 02:11:40 +01:00
committed by GitHub
parent 5d819ac1a9
commit 34ed47ae74
50 changed files with 228 additions and 175 deletions
+1 -1
View File
@@ -51,7 +51,7 @@
if(holder.dna)
dna = holder.dna.Clone()
else
log_runtime(EXCEPTION("[holder] spawned without a proper DNA."), holder)
stack_trace("[holder] spawned without a proper DNA.")
var/mob/living/carbon/human/H = holder
if(istype(H))
if(dna)
@@ -33,7 +33,7 @@
var/mob/living/carbon/human/H = M
parent = H.get_organ(check_zone(parent_organ))
if(!istype(parent))
log_runtime(EXCEPTION("[src] attempted to insert into a [parent_organ], but [parent_organ] wasn't an organ! [atom_loc_line(M)]"), src)
stack_trace("[src] attempted to insert into a [parent_organ], but [parent_organ] wasn't an organ! [atom_loc_line(M)]")
else
parent.internal_organs |= src
loc = null
@@ -49,7 +49,7 @@
// However, you MUST set the object's positiion yourself when you call this!
/obj/item/organ/internal/remove(mob/living/carbon/M, special = 0)
if(!owner)
log_runtime(EXCEPTION("\'remove\' called on [src] without an owner! Mob: [M], [atom_loc_line(M)]"), src)
stack_trace("\'remove\' called on [src] without an owner! Mob: [M], [atom_loc_line(M)]")
owner = null
if(M)
M.internal_organs -= src
@@ -63,7 +63,7 @@
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/parent = H.get_organ(check_zone(parent_organ))
if(!istype(parent))
log_runtime(EXCEPTION("[src] attempted to remove from a [parent_organ], but [parent_organ] didn't exist! [atom_loc_line(M)]"), src)
stack_trace("[src] attempted to remove from a [parent_organ], but [parent_organ] didn't exist! [atom_loc_line(M)]")
else
parent.internal_organs -= src
H.update_int_organs()