diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 91c2c365149..8ca1e485263 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -1065,7 +1065,10 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai #define TRAIT_TACKLING_TAILED_DEFENDER "tackling_tailed_defender" /// Is runechat for this atom/movable currently disabled, regardless of prefs or anything? -#define TRAIT_RUNECHAT_HIDDEN "runechat_hudden" +#define TRAIT_RUNECHAT_HIDDEN "runechat_hidden" + +/// the object has a label applied +#define TRAIT_HAS_LABEL "labeled" /// some trait sorces dirived from bodyparts BODYPART_TRAIT is generic. #define BODYPART_TRAIT "bodypart" diff --git a/code/_globalvars/traits.dm b/code/_globalvars/traits.dm index 8ef7a9c9e64..abdc90afa1a 100644 --- a/code/_globalvars/traits.dm +++ b/code/_globalvars/traits.dm @@ -231,6 +231,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_VOIDSTORM_IMMUNE" = TRAIT_VOIDSTORM_IMMUNE, "TRAIT_WEATHER_IMMUNE" = TRAIT_WEATHER_IMMUNE, "TRAIT_RUNECHAT_HIDDEN" = TRAIT_RUNECHAT_HIDDEN, + "TRAIT_HAS_LABEL" = TRAIT_HAS_LABEL, ), /obj/item/card/id = list( "TRAIT_MAGNETIC_ID_CARD" = TRAIT_MAGNETIC_ID_CARD, diff --git a/code/datums/components/label.dm b/code/datums/components/label.dm index 822841af22d..576ce82c16d 100644 --- a/code/datums/components/label.dm +++ b/code/datums/components/label.dm @@ -83,9 +83,13 @@ /datum/component/label/proc/apply_label() var/atom/owner = parent owner.name += " ([label_name])" + ADD_TRAIT(owner, TRAIT_HAS_LABEL, src) + owner.update_appearance(UPDATE_ICON) /// Removes the label from the parent's name /datum/component/label/proc/remove_label() var/atom/owner = parent owner.name = replacetext(owner.name, "([label_name])", "") // Remove the label text from the parent's name, wherever it's located. owner.name = trim(owner.name) // Shave off any white space from the beginning or end of the parent's name. + REMOVE_TRAIT(owner, TRAIT_HAS_LABEL, src) + owner.update_appearance(UPDATE_ICON) diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm index d2df58c0095..57bb3115406 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -3,7 +3,9 @@ desc = "A large wooden barrel. You can ferment fruits and such inside it, or just use it to hold reagents." icon = 'icons/obj/objects.dmi' icon_state = "barrel" + base_icon_state = "barrel" resistance_flags = FLAMMABLE + obj_flags = UNIQUE_RENAME density = TRUE anchored = FALSE pressure_resistance = 2 * ONE_ATMOSPHERE @@ -80,6 +82,11 @@ icon_state = open ? "barrel_open" : "barrel" return ..() +/obj/structure/fermenting_barrel/update_overlays() + . = ..() + if(src.renamedByPlayer || HAS_TRAIT(src, TRAIT_HAS_LABEL)) + . += mutable_appearance(icon, "[base_icon_state]_overlay_label") + /// Adds the fruit to the barrel to queue the fermentation /obj/structure/fermenting_barrel/proc/insert_fruit(mob/user, obj/item/food/grown/fruit, obj/item/storage/bag/plants/bag = null) if(reagents.total_volume + potential_volume > reagents.maximum_volume) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 23cb8066c2d..be6b4d2478c 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -186,6 +186,7 @@ label.apply_label() to_chat(user, span_notice("You have successfully renamed \the [oldname] to [O].")) O.renamedByPlayer = TRUE + O.update_appearance(UPDATE_ICON) if(penchoice == "Description") var/input = tgui_input_text(user, "Describe [O]", "Description", "[O.desc]", 280) @@ -198,6 +199,7 @@ O.AddComponent(/datum/component/rename, O.name, input) to_chat(user, span_notice("You have successfully changed [O]'s description.")) O.renamedByPlayer = TRUE + O.update_appearance(UPDATE_ICON) if(penchoice == "Reset") if(QDELETED(O) || !user.can_perform_action(O)) @@ -213,6 +215,7 @@ to_chat(user, span_notice("You have successfully reset [O]'s name and description.")) O.renamedByPlayer = FALSE + O.update_appearance(UPDATE_ICON) /obj/item/pen/get_writing_implement_details() return list( diff --git a/icons/obj/objects.dmi b/icons/obj/objects.dmi index c94be473538..9df8fea4a6a 100644 Binary files a/icons/obj/objects.dmi and b/icons/obj/objects.dmi differ