mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
Adds better logging for to_chat. Fixes update_inv_wear_mask runtime (#15276)
Co-authored-by: joep van der velden <15887760+farie82@users.noreply.github.com>
This commit is contained in:
co-authored by
joep van der velden
parent
522b7fd026
commit
256abb5375
@@ -926,6 +926,8 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
|
||||
if(wear_mask && (istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/accessory)))
|
||||
if(!(slot_wear_mask in check_obscured_slots()))
|
||||
var/obj/item/organ/external/head/head_organ = get_organ("head")
|
||||
if(!head_organ)
|
||||
return // Nothing to update here
|
||||
var/datum/sprite_accessory/alt_heads/alternate_head
|
||||
if(head_organ.alt_head && head_organ.alt_head != "None")
|
||||
alternate_head = GLOB.alt_heads_list[head_organ.alt_head]
|
||||
|
||||
@@ -296,13 +296,11 @@ var/to_chat_src
|
||||
targetstring += ", [D.type]"
|
||||
|
||||
// The final output
|
||||
log_runtime(new/exception("DEBUG: to_chat called with invalid message/target.", to_chat_filename, to_chat_line), to_chat_src, list("Message: '[message]'", "Target: [targetstring]"))
|
||||
return
|
||||
CRASH("DEBUG: to_chat called with invalid message/target. Message: '[message]'. Target: [targetstring].")
|
||||
|
||||
else if(is_valid_tochat_message(message))
|
||||
if(istext(target))
|
||||
log_runtime(EXCEPTION("Somehow, to_chat got a text as a target"))
|
||||
return
|
||||
CRASH("Somehow, to_chat got a text as a target, message: '[message]', target: '[target]'")
|
||||
|
||||
message = replacetext(message, "\n", "<br>")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user