mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user