From 71b0e86deba2bf2459b58b8e6b87ea7c870f8688 Mon Sep 17 00:00:00 2001 From: CatsinHD <31459154+CatsinHD@users.noreply.github.com> Date: Wed, 4 Mar 2026 14:58:35 -0500 Subject: [PATCH] Fixes Stickynotes interacting with noticeboards (#21969) Fixes #21962 Caused by the attackby proc on noticeboards allowing all kinds of paper. Changed this to a guard clause. Any non-paper OR stickynote will kick out of the attackby. Stickynotes can still be attached onto a noticeboard but added to one, as that would be redundant and introduces overlapping persistence. --------- Signed-off-by: CatsinHD <31459154+CatsinHD@users.noreply.github.com> Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com> --- code/game/objects/structures/noticeboard.dm | 23 ++++---- .../CatsinHD - Stickynoticeboard.yml | 58 +++++++++++++++++++ 2 files changed, 70 insertions(+), 11 deletions(-) create mode 100644 html/changelogs/CatsinHD - Stickynoticeboard.yml diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 7388ee1eb2a..18bac5a9725 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -28,17 +28,18 @@ //attaching papers!! /obj/structure/noticeboard/attackby(obj/item/attacking_item, mob/user) - if(istype(attacking_item, /obj/item/paper)) - if(notice_limit > notices) - attacking_item.add_fingerprint(user) - add_fingerprint(user) - user.drop_from_inventory(attacking_item,src) - notices++ - update_icon() - SSpersistence.register_track(attacking_item, ckey(usr.key)) // Add paper to persistent tracker - to_chat(user, SPAN_NOTICE("You pin the paper to the noticeboard.")) - else - to_chat(user, SPAN_NOTICE("You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.")) + if(!istype(attacking_item, /obj/item/paper) || istype(attacking_item, /obj/item/paper/stickynotes)) //Stickynotes on a noticeboard are redundant and have overlapping persistence. + return + if(notice_limit > notices) + attacking_item.add_fingerprint(user) + add_fingerprint(user) + user.drop_from_inventory(attacking_item, src) + notices++ + update_icon() + SSpersistence.register_track(attacking_item, ckey(usr.key)) // Add paper to persistent tracker + to_chat(user, SPAN_NOTICE("You pin the paper to the noticeboard.")) + else + to_chat(user, SPAN_NOTICE("\The [src] is already full of papers and can not fit another.")) /obj/structure/noticeboard/attack_hand(var/mob/user) examine(user) diff --git a/html/changelogs/CatsinHD - Stickynoticeboard.yml b/html/changelogs/CatsinHD - Stickynoticeboard.yml new file mode 100644 index 00000000000..33284fb4e6c --- /dev/null +++ b/html/changelogs/CatsinHD - Stickynoticeboard.yml @@ -0,0 +1,58 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: CatsinHD + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixes stickynotes adding papers to the noticeboard despite not being able to be added to one."