mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-28 23:59:40 +01:00
more icon2html (#8021)
This commit is contained in:
@@ -42,7 +42,7 @@
|
||||
else return "[jointext(input, comma_text, 1, -1)][final_comma_text][and_text][input[input.len]]"
|
||||
|
||||
//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, 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 = ",")
|
||||
/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
|
||||
var/list/counts = list() // counted input items
|
||||
var/list/items = list() // actual objects for later reference (for icons and formatting)
|
||||
|
||||
@@ -69,7 +69,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 += "[bicon(A)] "
|
||||
item_str += "[icon2html(A,user)] " //CHOMPEdit
|
||||
switch(determiners)
|
||||
if(DET_NONE) item_str += A.name
|
||||
if(DET_DEFINITE) item_str += "\the [A]"
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
. += "It is full."
|
||||
|
||||
if(!opened && isobserver(user))
|
||||
. += "It contains: [counting_english_list(contents)]"
|
||||
. += "It contains: [counting_english_list(contents, user)]" //CHOMPEdit
|
||||
|
||||
/obj/structure/closet/CanPass(atom/movable/mover, turf/target)
|
||||
if(wall_mounted)
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
/obj/item/clothing/examine(var/mob/user)
|
||||
. = ..(user)
|
||||
if(LAZYLEN(accessories))
|
||||
. += "It has the following attached: [counting_english_list(accessories)]"
|
||||
. += "It has the following attached: [counting_english_list(accessories, user)]" //CHOMPEdit
|
||||
|
||||
/**
|
||||
* Attach accessory A to src
|
||||
@@ -158,4 +158,4 @@
|
||||
if(LAZYLEN(accessories))
|
||||
for(var/obj/item/clothing/accessory/A in accessories)
|
||||
A.emp_act(severity)
|
||||
..()
|
||||
..()
|
||||
|
||||
@@ -98,13 +98,13 @@
|
||||
"foreground" = colors[color],
|
||||
)))
|
||||
|
||||
fail_message = "<span class='notice'>[bicon(src)] a [pick("loud","soft","sinister","eery","triumphant","depressing","cheerful","angry")] \
|
||||
fail_message = "<span class='notice'>[icon2html(src,viewers(src))] a [pick("loud","soft","sinister","eery","triumphant","depressing","cheerful","angry")] \
|
||||
[pick("horn","beep","bing","bleep","blat","honk","hrumph","ding")] sounds and a \
|
||||
[pick("yellow","purple","green","blue","red","orange","white")] \
|
||||
[pick("light","dial","meter","window","protrusion","knob","antenna","swirly thing")] \
|
||||
[pick("swirls","flashes","whirrs","goes schwing","blinks","flickers","strobes","lights up")] on the \
|
||||
[pick("front","side","top","bottom","rear","inside")] of [src]. A [pick("slot","funnel","chute","tube")] opens up in the \
|
||||
[pick("front","side","top","bottom","rear","inside")].</span>"
|
||||
[pick("front","side","top","bottom","rear","inside")].</span>" //CHOMPEdit
|
||||
|
||||
/obj/machinery/replicator/process()
|
||||
if(spawning_types.len && powered())
|
||||
|
||||
Reference in New Issue
Block a user