diff --git a/code/game/area/areas/depot-areas.dm b/code/game/area/areas/depot-areas.dm index 4a6606d836e..37b45d0b0b1 100644 --- a/code/game/area/areas/depot-areas.dm +++ b/code/game/area/areas/depot-areas.dm @@ -424,18 +424,47 @@ return TRUE return FALSE +/** + * Returns a STRING, containing the NAMES of the mobs in the provided list, JOINED together with ", " + * + * E.g. list_show(depotarea.guard_list) returns a string like: + * "Syndicate Backup (123), Syndicate Backup(456), Syndicate Backup(789)", etc. + * Arguments: + * * list/L, the list of UIDs from which to draw members + * * show_ckeys, bool, if true will display ckeys in addition to names + */ /area/syndicate_depot/core/proc/list_show(list/L, show_ckeys = FALSE) - var/list/formatted = list() + var/list/formatted = list_shownames(L, show_ckeys) + return formatted.Join(", ") + +/** + * Returns a LIST of the NAMES of the mobs in the provided list. + * + * E.g. list_shownames(depotarea.guard_list) returns a list of the names of extra guard mobs in depot. + * Arguments: + * * list/L, the list of UIDs from which to draw members + * * show_ckeys, bool, if true will display ckeys in addition to names + */ +/area/syndicate_depot/core/proc/list_shownames(list/L, show_ckeys = FALSE) + var/list/names = list() for(var/uid in L) var/mob/M = locateUID(uid) if(!istype(M)) continue if(show_ckeys) - formatted += "[M.ckey]([M])" + names += "[M.ckey]([M])" else - formatted += "[M]" - return formatted.Join(", ") + names += "[M]" + return names +/** + * Returns a LIST of the MOBS in one of the depot area's lists. + * + * E.g. list_getmobs(depotarea.guard_list) returns a list of the extra guard mobs in the depot. + * Arguments: + * * list/L, the list of UIDs from which to draw members + * * show_ckeys, bool, if true will display ckeys in addition to names + */ /area/syndicate_depot/core/proc/list_getmobs(list/L, show_ckeys = FALSE) var/list/moblist = list() for(var/uid in L) @@ -444,19 +473,6 @@ continue moblist += M return moblist - -/area/syndicate_depot/core/proc/list_gethtmlmobs(list/L) - var/returntext = "" - var/list/moblist = list_getmobs(L) - if(moblist.len) - returntext += "