Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/__DEFINES/~darkpack/guestbook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
#define GUESTBOOK_FORGETMENOT (1 << 3)

/// Differs from GET_GUESTBOOK_NAME_TRUE as it returns the known name OR the whole mob for situations where we directly embed into a string for text macros.
#define GET_GUESTBOOK_NAME(mob, guest) (mob?.mind?.guestbook?.get_known_name(mob, guest) || guest)
#define GET_GUESTBOOK_NAME(mob, guest) (mob?.mind?.guestbook?.get_known_name(mob, guest) || guest.name)
/// Macro to get a STRING (never a mob) of the name we refer to them as.
#define GET_GUESTBOOK_NAME_TRUE(mob, guest) (mob?.mind?.guestbook?.get_known_name(mob, guest) || guest.name)
2 changes: 1 addition & 1 deletion code/__HELPERS/stack_trace.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/// Returns an ordered list of all our parent procs, highest to deepest.
///
/// introspection like this is mostly useful for debugging, if you have another use I suspect you are just creating god's strongest footgun and should rethink things
/proc/dump_stack(max_depth = STACK_DEPTH_SEARCH_LIMIT)
/proc/dump_stack(max_depth = STACK_DEPTH_SEARCH_LIMIT) as /list // DARKPACK EDIT CHANGE
var/list/proc_paths = list()
var/crashed = FALSE
var/depth = 0
Expand Down
12 changes: 12 additions & 0 deletions modular_darkpack/modules/guestbook/code/human_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,15 @@
if(prefixed)
final_string = "\A [final_string]"
return lowercase ? LOWER_TEXT(final_string) : final_string

GLOBAL_LIST_EMPTY(living_ref_stacktraces)
/mob/living/proc/operator""()
var/dump = jointext(dump_stack(1), ": ")
if(GLOB.living_ref_stacktraces[dump])
GLOB.living_ref_stacktraces[dump]++
else
GLOB.living_ref_stacktraces[dump] = 1
sortTim(GLOB.living_ref_stacktraces, GLOBAL_PROC_REF(cmp_numeric_dsc), associative = TRUE)
logger.Log(LOG_CATEGORY_DEBUG, "Operator Test: [dump]")
return usr?.mind?.guestbook?.get_known_name(usr, src) || name

Loading