diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index bd232500d1a..47bd9b467b4 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -7,6 +7,7 @@ mouse_drag_pointer = MOUSE_ACTIVE_POINTER var/giftwrapped = FALSE var/sortTag = 0 + var/obj/item/paper/note /obj/structure/bigDelivery/interact(mob/user) playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, TRUE) @@ -22,6 +23,15 @@ for(var/atom/movable/AM in contents) AM.ex_act() +/obj/structure/bigDelivery/examine(mob/user) + . = ..() + if(note) + if(!in_range(user, src)) + . += "There's a [note.name] attached to it. You can't read it from here." + else + . += "There's a [note.name] attached to it..." + . += note.examine(user) + /obj/structure/bigDelivery/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/destTagger)) var/obj/item/destTagger/O = W @@ -53,6 +63,21 @@ icon_state = "gift[icon_state]" else to_chat(user, "You need more paper!") + + else if(istype(W, /obj/item/paper)) + if(note) + to_chat(user, "This package already has a note attached!") + return + if(!user.transferItemToLoc(W, src)) + to_chat(user, "For some reason, you can't attach [W]!") + return + user.visible_message("[user] attaches [W] to [src].", "You attach [W] to [src].") + note = W + if(giftwrapped) + add_overlay(copytext("[icon_state]_note",5)) + return + add_overlay("[icon_state]_note") + else return ..() @@ -82,6 +107,7 @@ item_state = "deliverypackage" var/giftwrapped = 0 var/sortTag = 0 + var/obj/item/paper/note /obj/item/smallDelivery/contents_explosion(severity, target) for(var/atom/movable/AM in contents) @@ -109,6 +135,15 @@ playsound(src.loc, 'sound/items/poster_ripped.ogg', 50, TRUE) qdel(src) +/obj/item/smallDelivery/examine(mob/user) + . = ..() + if(note) + if(!in_range(user, src)) + . += "There's a [note.name] attached to it. You can't read it from here." + else + . += "There's a [note.name] attached to it..." + . += note.examine(user) + /obj/item/smallDelivery/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/destTagger)) var/obj/item/destTagger/O = W @@ -141,6 +176,19 @@ else to_chat(user, "You need more paper!") + else if(istype(W, /obj/item/paper)) + if(note) + to_chat(user, "This package already has a note attached!") + return + if(!user.transferItemToLoc(W, src)) + to_chat(user, "For some reason, you can't attach [W]!") + return + user.visible_message("[user] attaches [W] to [src].", "You attach [W] to [src].") + note = W + if(giftwrapped) + add_overlay(copytext("[icon_state]_note",5)) + return + add_overlay("[icon_state]_note") /obj/item/destTagger name = "destination tagger" diff --git a/icons/obj/storage.dmi b/icons/obj/storage.dmi index 9b1ec794ea3..d83b57c4a69 100644 Binary files a/icons/obj/storage.dmi and b/icons/obj/storage.dmi differ