diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 07c4406f5aa33..0232b64bf461f 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -1188,6 +1188,16 @@ GLOBAL_LIST_INIT(binary, list("0","1")) else . = "" +/proc/weight_class_to_tooltip(w_class) + switch(w_class) + if(WEIGHT_CLASS_TINY to WEIGHT_CLASS_SMALL) + return "This item can fit into pockets, boxes and backpacks." + if(WEIGHT_CLASS_NORMAL) + return "This item can fit into backpacks." + if(WEIGHT_CLASS_BULKY to WEIGHT_CLASS_GIGANTIC) + return "This item is too large to fit into any standard storage." + return "" + /// Removes all non-alphanumerics from the text, keep in mind this can lead to id conflicts /proc/sanitize_css_class_name(name) var/static/regex/regex = new(@"[^a-zA-Z0-9]","g") diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index d957cfe54310e..58b1b1ae34687 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -443,7 +443,7 @@ var/list/parent_tags = ..() parent_tags.Insert(1, weight_class_to_text(w_class)) // To make size display first, otherwise it looks goofy . = parent_tags - .[weight_class_to_text(w_class)] = "[gender == PLURAL ? "They are" : "It is"] a [weight_class_to_text(w_class)] item." + .[weight_class_to_text(w_class)] = weight_class_to_tooltip(w_class) if(item_flags & CRUEL_IMPLEMENT) .[span_red("morbid")] = "It seems quite practical for particularly morbid procedures and experiments."