diff --git a/_maps/RandomRuins/SpaceRuins/oldstation.dmm b/_maps/RandomRuins/SpaceRuins/oldstation.dmm index 474ef8eea83..f3ae95a673e 100644 --- a/_maps/RandomRuins/SpaceRuins/oldstation.dmm +++ b/_maps/RandomRuins/SpaceRuins/oldstation.dmm @@ -2840,6 +2840,11 @@ /obj/structure/cable, /turf/open/floor/iron, /area/ruin/space/ancientstation/charlie/hall) +"mm" = ( +/obj/machinery/power/supermatter_crystal/shard, +/obj/structure/closet/crate/radiation, +/turf/open/floor/iron/white/textured, +/area/ruin/space/ancientstation/delta/proto) "mo" = ( /turf/open/floor/iron/white/corner{ dir = 1 @@ -3795,32 +3800,6 @@ /obj/effect/mapping_helpers/apc/away_general_access, /turf/open/floor/engine/airless, /area/ruin/space/ancientstation/beta/supermatter) -"rN" = ( -/obj/effect/decal/cleanable/dirt, -/obj/effect/decal/cleanable/dirt, -/obj/structure/table/glass, -/obj/item/reagent_containers/cup/bottle{ - pixel_x = 4; - list_reagents = list(/datum/reagent/growthserum=30); - name = "Experimental solution"; - renamedByPlayer = 1; - pixel_y = 8 - }, -/obj/item/reagent_containers/cup/bottle{ - pixel_x = -4; - list_reagents = list(/datum/reagent/consumable/nutriment/peptides=30); - name = "Solution for Molly"; - renamedByPlayer = 1 - }, -/obj/item/reagent_containers/dropper{ - pixel_x = -7; - pixel_y = 10 - }, -/obj/effect/turf_decal/tile/purple/half/contrasted{ - dir = 1 - }, -/turf/open/floor/iron/white/textured_edge, -/area/ruin/space/ancientstation/delta/biolab) "rP" = ( /obj/effect/spawner/structure/window/reinforced, /turf/open/floor/plating, @@ -5964,11 +5943,6 @@ /obj/machinery/duct, /turf/template_noop, /area/space/nearstation) -"HS" = ( -/obj/machinery/power/supermatter_crystal/shard, -/obj/structure/closet/crate/radiation, -/turf/open/floor/iron/white/textured, -/area/ruin/space/ancientstation/delta/proto) "HT" = ( /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, /obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2, @@ -7737,6 +7711,30 @@ /obj/effect/mapping_helpers/airalarm/away_general_access, /turf/open/floor/iron/white/textured, /area/ruin/space/ancientstation/delta/proto) +"TH" = ( +/obj/effect/decal/cleanable/dirt, +/obj/effect/decal/cleanable/dirt, +/obj/structure/table/glass, +/obj/item/reagent_containers/cup/bottle{ + pixel_x = 4; + list_reagents = list(/datum/reagent/growthserum=30); + name = "Experimental solution"; + pixel_y = 8 + }, +/obj/item/reagent_containers/cup/bottle{ + pixel_x = -4; + list_reagents = list(/datum/reagent/consumable/nutriment/peptides=30); + name = "Solution for Molly" + }, +/obj/item/reagent_containers/dropper{ + pixel_x = -7; + pixel_y = 10 + }, +/obj/effect/turf_decal/tile/purple/half/contrasted{ + dir = 1 + }, +/turf/open/floor/iron/white/textured_edge, +/area/ruin/space/ancientstation/delta/biolab) "TI" = ( /obj/machinery/door/airlock/science, /obj/effect/decal/cleanable/dirt, @@ -14787,7 +14785,7 @@ bD Yr cD uj -HS +mm Oh uj Mx @@ -15299,7 +15297,7 @@ aa aa aa SU -rN +TH Pg zI uI diff --git a/_maps/map_files/NSVBlueshift/Blueshift.dmm b/_maps/map_files/NSVBlueshift/Blueshift.dmm index dfb2e863343..50df0951d45 100644 --- a/_maps/map_files/NSVBlueshift/Blueshift.dmm +++ b/_maps/map_files/NSVBlueshift/Blueshift.dmm @@ -32286,7 +32286,6 @@ /obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4, /obj/structure/disposalpipe/sorting/mail{ name = "Detective Junction"; - renamedByPlayer = 30 }, /turf/open/floor/iron, /area/station/hallway/primary/central/fore) @@ -71348,7 +71347,6 @@ "nGH" = ( /obj/structure/disposalpipe/sorting/mail{ name = "Robotics Junction"; - renamedByPlayer = 14 }, /turf/open/floor/iron, /area/station/hallway/primary/upper) diff --git a/code/__DEFINES/traits/declarations.dm b/code/__DEFINES/traits/declarations.dm index 4aa6f4a74a4..c24e23bf23e 100644 --- a/code/__DEFINES/traits/declarations.dm +++ b/code/__DEFINES/traits/declarations.dm @@ -440,6 +440,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai /// Trait used by fugu glands to avoid double buffing #define TRAIT_FUGU_GLANDED "fugu_glanded" +/// Trait that tracks if something has been renamed. Typically holds a REF() to the object itself (AKA src) for wide addition/removal. +#define TRAIT_WAS_RENAMED "was_renamed" + /// When someone with this trait fires a ranged weapon, their fire delays and click cooldowns are halved #define TRAIT_DOUBLE_TAP "double_tap" diff --git a/code/__DEFINES/traits/sources.dm b/code/__DEFINES/traits/sources.dm index 6be8cdf3f8d..d472b9bed26 100644 --- a/code/__DEFINES/traits/sources.dm +++ b/code/__DEFINES/traits/sources.dm @@ -271,3 +271,6 @@ #define CLOWNOP_TRAIT "clownop" #define ANALYZER_TRAIT "analyzer_trait" + +/// Trait when something was labelled by a pen. +#define PEN_LABEL_TRAIT "pen_label" diff --git a/code/_globalvars/traits/_traits.dm b/code/_globalvars/traits/_traits.dm index 79facdd304c..4b59171cba3 100644 --- a/code/_globalvars/traits/_traits.dm +++ b/code/_globalvars/traits/_traits.dm @@ -61,6 +61,7 @@ GLOBAL_LIST_INIT(traits_by_type, list( "TRAIT_UNDERFLOOR" = TRAIT_UNDERFLOOR, "TRAIT_UNIQUE_IMMERSE" = TRAIT_UNIQUE_IMMERSE, "TRAIT_VOIDSTORM_IMMUNE" = TRAIT_VOIDSTORM_IMMUNE, + "TRAIT_WAS_RENAMED" = TRAIT_WAS_RENAMED, "TRAIT_WEATHER_IMMUNE" = TRAIT_WEATHER_IMMUNE, ), /datum/controller/subsystem/economy = list( diff --git a/code/datums/components/food/ice_cream_holder.dm b/code/datums/components/food/ice_cream_holder.dm index 3e212c52b9a..29625a8a321 100644 --- a/code/datums/components/food/ice_cream_holder.dm +++ b/code/datums/components/food/ice_cream_holder.dm @@ -77,8 +77,7 @@ /datum/component/ice_cream_holder/proc/on_update_name(atom/source, updates) SIGNAL_HANDLER - var/obj/obj = source - if(istype(obj) && obj.renamedByPlayer) //Renamed by the player. + if(HAS_TRAIT(source, TRAIT_WAS_RENAMED)) return var/scoops_len = length(scoops) if(!scoops_len) @@ -93,8 +92,7 @@ /datum/component/ice_cream_holder/proc/on_update_desc(atom/source, updates) SIGNAL_HANDLER - var/obj/obj = source - if(istype(obj) && obj.renamedByPlayer) //Renamed by the player. + if(HAS_TRAIT(source, TRAIT_WAS_RENAMED)) return var/scoops_len = length(scoops) if(!scoops_len) diff --git a/code/datums/components/takes_reagent_appearance.dm b/code/datums/components/takes_reagent_appearance.dm index 6505290b4cb..fd1312ba112 100644 --- a/code/datums/components/takes_reagent_appearance.dm +++ b/code/datums/components/takes_reagent_appearance.dm @@ -89,10 +89,10 @@ * * Returns [NONE] if the name was reset to initial state */ /datum/component/takes_reagent_appearance/proc/update_name(datum/glass_style/style) - var/obj/item/item_parent = parent - if(item_parent.renamedByPlayer) + if(HAS_TRAIT(parent, TRAIT_WAS_RENAMED)) return NONE + var/obj/item/item_parent = parent if(isnull(style)) // no style (reset) item_parent.name = initial(item_parent.name) @@ -111,10 +111,10 @@ * * Returns [NONE] if the description was reset to initial state */ /datum/component/takes_reagent_appearance/proc/update_desc(datum/glass_style/style) - var/obj/item/item_parent = parent - if(item_parent.renamedByPlayer) + if(HAS_TRAIT(parent, TRAIT_WAS_RENAMED)) return NONE + var/obj/item/item_parent = parent if(isnull(style)) // no style (reset) item_parent.desc = initial(item_parent.desc) diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 008ceccc72e..8695845bf47 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -41,8 +41,6 @@ /// Particles this obj uses when burning, if any var/burning_particles - var/renamedByPlayer = FALSE //set when a player uses a pen on a renamable object - var/drag_slowdown // Amont of multiplicative slowdown applied if pulled. >1 makes you slower, <1 makes you faster. /// Map tag for something. Tired of it being used on snowflake items. Moved here for some semblance of a standard. diff --git a/code/modules/hydroponics/fermenting_barrel.dm b/code/modules/hydroponics/fermenting_barrel.dm index d96bc1ec009..af3bbb060d5 100644 --- a/code/modules/hydroponics/fermenting_barrel.dm +++ b/code/modules/hydroponics/fermenting_barrel.dm @@ -84,7 +84,7 @@ /obj/structure/fermenting_barrel/update_overlays() . = ..() - if(src.renamedByPlayer || HAS_TRAIT(src, TRAIT_HAS_LABEL)) + if(HAS_TRAIT(src, TRAIT_WAS_RENAMED) || HAS_TRAIT(src, TRAIT_HAS_LABEL)) . += mutable_appearance(icon, "[base_icon_state]_overlay_label") /// Adds the fruit to the barrel to queue the fermentation diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 40e99eefe6a..5ee432b365e 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -236,7 +236,7 @@ label.remove_label() label.apply_label() to_chat(user, span_notice("You have successfully renamed \the [oldname] to [O].")) - O.renamedByPlayer = TRUE + ADD_TRAIT(O, TRAIT_WAS_RENAMED, PEN_LABEL_TRAIT) O.update_appearance(UPDATE_ICON) if(penchoice == "Description") @@ -249,7 +249,7 @@ else O.AddComponent(/datum/component/rename, O.name, input) to_chat(user, span_notice("You have successfully changed [O]'s description.")) - O.renamedByPlayer = TRUE + ADD_TRAIT(O, TRAIT_WAS_RENAMED, PEN_LABEL_TRAIT) O.update_appearance(UPDATE_ICON) if(penchoice == "Reset") @@ -265,7 +265,7 @@ label.apply_label() to_chat(user, span_notice("You have successfully reset [O]'s name and description.")) - O.renamedByPlayer = FALSE + REMOVE_TRAIT(O, TRAIT_WAS_RENAMED, PEN_LABEL_TRAIT) O.update_appearance(UPDATE_ICON) /obj/item/pen/get_writing_implement_details() diff --git a/code/modules/reagents/reagent_containers/cups/drinkingglass.dm b/code/modules/reagents/reagent_containers/cups/drinkingglass.dm index d795a5e0dcf..8745e61cd92 100644 --- a/code/modules/reagents/reagent_containers/cups/drinkingglass.dm +++ b/code/modules/reagents/reagent_containers/cups/drinkingglass.dm @@ -34,7 +34,7 @@ /obj/item/reagent_containers/cup/glass/drinkingglass/on_reagent_change(datum/reagents/holder, ...) . = ..() if(!length(reagents.reagent_list)) - renamedByPlayer = FALSE //so new drinks can rename the glass + REMOVE_TRAIT(src, TRAIT_WAS_RENAMED, PEN_LABEL_TRAIT) //so new drinks can rename the glass // Having our icon state change removes fill thresholds /obj/item/reagent_containers/cup/glass/drinkingglass/on_cup_change(datum/glass_style/style) @@ -68,13 +68,13 @@ custom_price = PAYCHECK_CREW * 0.4 /obj/item/reagent_containers/cup/glass/drinkingglass/shotglass/update_name(updates) - if(renamedByPlayer) + if(HAS_TRAIT(src, TRAIT_WAS_RENAMED)) return . = ..() name = "[length(reagents.reagent_list) ? "filled " : ""]shot glass" /obj/item/reagent_containers/cup/glass/drinkingglass/shotglass/update_desc(updates) - if(renamedByPlayer) + if(HAS_TRAIT(src, TRAIT_WAS_RENAMED)) return . = ..() if(length(reagents.reagent_list))