[MIRROR] Cleanup (#12525)

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2026-03-14 00:58:50 +01:00
committed by GitHub
co-authored by Kashargul
parent e9da721226
commit 45f04c0a27
25 changed files with 51 additions and 42 deletions
+4 -4
View File
@@ -69,7 +69,7 @@
#define DET_AUTO 0x04
//Returns a newline-separated list that counts equal-ish items, outputting count and item names, optionally with icons and specific determiners
/proc/counting_english_list(var/list/input, var/mob/user, output_icons = TRUE, determiners = DET_NONE, nothing_text = "nothing", line_prefix = "\t", first_item_prefix = "\n", last_item_suffix = "\n", and_text = "\n", comma_text = "\n", final_comma_text = ",") //CHOMPEdit
/proc/counting_english_list(client/viewer, var/list/input, output_icons = TRUE, determiners = DET_NONE, nothing_text = "nothing", line_prefix = "\t", first_item_prefix = "\n", last_item_suffix = "\n", and_text = "\n", comma_text = "\n", final_comma_text = ",")
var/list/counts = list() // counted input items
var/list/items = list() // actual objects for later reference (for icons and formatting)
@@ -96,7 +96,7 @@
// atoms/items/objects can be pretty and whatnot
var/atom/A = item
if(output_icons && isicon(A.icon) && !ismob(A)) // mobs tend to have unusable icons
item_str += "[icon2html(A,user)]&nbsp;" //CHOMPEdit
item_str += "[icon2html(A, viewer)]&nbsp;"
switch(determiners)
if(DET_NONE) item_str += A.name
if(DET_DEFINITE) item_str += "\the [A]"
@@ -118,8 +118,8 @@
return english_list(out, nothing_text, and_text, comma_text, final_comma_text)
//A "preset" for counting_english_list that displays the list "inline" (comma separated)
/proc/inline_counting_english_list(var/list/input, output_icons = TRUE, determiners = DET_NONE, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "", line_prefix = "", first_item_prefix = "", last_item_suffix = "")
return counting_english_list(input, output_icons, determiners, nothing_text, and_text, comma_text, final_comma_text)
/proc/inline_counting_english_list(client/viewer, var/list/input, output_icons = TRUE, determiners = DET_NONE, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "", line_prefix = "", first_item_prefix = "", last_item_suffix = "")
return counting_english_list(viewer, input, output_icons, determiners, nothing_text, and_text, comma_text, final_comma_text)
//Returns list element or null. Should prevent "index out of bounds" error.
/proc/listgetindex(var/list/list,index)