mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-24 21:57:53 +01:00
[MIRROR] Cleanup (#12525)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
co-authored by
Kashargul
parent
e9da721226
commit
45f04c0a27
@@ -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)] " //CHOMPEdit
|
||||
item_str += "[icon2html(A, viewer)] "
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user