diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index 3eb65204d5e..377b03ecd65 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -18,6 +18,15 @@ ..() update_icon() +/obj/item/clipboard/AltClick(mob/user) + if(in_range(user, src) && !user.incapacitated()) + if(is_pen(user.get_active_hand())) + penPlacement(user, user.get_active_hand(), TRUE) + else + removePen(user) + return + . = ..() + /obj/item/clipboard/verb/removePen(mob/user) set category = "Object" set name = "Remove clipboard pen" @@ -77,6 +86,13 @@ . += toppaper.overlays if(containedpen) . += "clipboard_pen" + for(var/obj/O in src) + if(istype(O, /obj/item/photo)) + var/image/img = image('icons/obj/bureaucracy.dmi') + var/obj/item/photo/Ph = O + img = Ph.tiny + . += img + break . += "clipboard_over" /obj/item/clipboard/attackby(obj/item/W, mob/user) @@ -92,19 +108,9 @@ if(!toppaper) //If there's no paper we can write on, just stick the pen into the clipboard penPlacement(user, W, TRUE) return - if(containedpen) //If there's a pen in the clipboard, let's just let them write and not bother asking about the pen - toppaper.attackby(W, user) - return - var/writeonwhat = input(user, "Write on [toppaper.name], or place your pen in [src]?", "Pick one!") as null|anything in list("Write", "Place pen") if(!Adjacent(user) || user.incapacitated()) return - switch(writeonwhat) - if("Write") - toppaper.attackby(W, user) - if("Place pen") - penPlacement(user, W, TRUE) - else - return + toppaper.attackby(W, user) else if(istype(W, /obj/item/stamp) && toppaper) //We can stamp the topmost piece of paper toppaper.attackby(W, user) update_icon() diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index de5987d8f73..8c2f2965b6c 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -53,7 +53,7 @@ for(var/obj/item/photo/Ph in src) dat += "Remove - [Ph.name]
" for(var/obj/item/paper_bundle/Pa in src) - dat += "Remove - [Pa.name]
" + dat += "Remove - [Pa.name]
" for(var/obj/item/documents/doc in src) dat += "Remove - [doc.name]
" user << browse(dat, "window=folder") diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index 1d917a4f326..486035213b8 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -1,6 +1,5 @@ /obj/item/paper_bundle name = "paper bundle" - gender = PLURAL icon = 'icons/obj/bureaucracy.dmi' icon_state = "paper" item_state = "paper" @@ -11,9 +10,12 @@ layer = 4 pressure_resistance = 2 attack_verb = list("bapped") - var/amount = 0 //Amount of items clipped to the paper. Note: If you have 2 paper, this should be 1 + var/amount = 0 //Amount of total items clipped to the paper. Note: If you have 2 paper, this should be 1 + var/photos = 0 //Amount of photos clipped to the paper. var/page = 1 var/screen = 0 + drop_sound = 'sound/items/handling/paper_drop.ogg' + pickup_sound = 'sound/items/handling/paper_pickup.ogg' /obj/item/paper_bundle/New(default_papers = TRUE) . = ..() @@ -46,6 +48,7 @@ H.update_inv_r_hand() else if(istype(W, /obj/item/photo)) amount++ + photos++ if(screen == 2) screen = 1 to_chat(user, "You add [(W.name == "photo") ? "the photo" : W.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].") @@ -69,14 +72,12 @@ P = src[page] P.attackby(W, user, params) - update_icon() if(winget(usr, "PaperBundle[UID()]", "is-visible") == "true") // NOT MY FAULT IT IS A BUILT IN PROC PLEASE DO NOT HIT ME attack_self(usr) //Update the browsed page. add_fingerprint(usr) return - /obj/item/paper_bundle/proc/burnpaper(obj/item/lighter/P, mob/user) var/class = "" @@ -84,13 +85,13 @@ if(istype(P, /obj/item/lighter/zippo)) class = "" - user.visible_message("[class][user] holds [P] up to [src], it looks like [user.p_theyre()] trying to burn it!", \ - "[class]You hold [P] up to [src], burning it slowly.") + user.visible_message("[class][user] holds [P] up to [src], it looks like [user.p_theyre()] trying to burn it!", \ + "[class]You hold [P] up to [src], burning it slowly.") spawn(20) if(get_dist(src, user) < 2 && user.get_active_hand() == P && P.lit) - user.visible_message("[class][user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \ - "[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") + user.visible_message("[class][user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \ + "[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") if(user.is_in_inactive_hand(src)) user.unEquip(src) @@ -140,14 +141,12 @@ /obj/item/paper_bundle/attack_self(mob/user as mob) show_content(user) add_fingerprint(usr) - update_icon() return /obj/item/paper_bundle/Topic(href, href_list) if(..()) return - - if((src in usr.contents) || (istype(src.loc, /obj/item/folder) && (src.loc in usr.contents))) + if(src in usr.contents) if(href_list["next_page"]) if(page == amount) screen = 2 @@ -156,7 +155,7 @@ else if(page == amount+1) return page++ - playsound(src.loc, "pageturn", 50, 1) + playsound(loc, "pageturn", 50, 1) if(href_list["prev_page"]) if(page == 1) @@ -166,7 +165,7 @@ else if(page == amount+1) screen = 1 page-- - playsound(src.loc, "pageturn", 50, 1) + playsound(loc, "pageturn", 50, 1) if(href_list["remove"]) var/obj/item/W = src[page] @@ -177,6 +176,11 @@ usr.unEquip(src) usr.put_in_hands(P) usr.unset_machine() // Ensure the bundle GCs + for(var/obj/O in src) // just in case we somehow lose something (it's happened, especially with photos) + O.forceMove(usr.loc) + O.layer = initial(O.layer) + O.plane = initial(O.plane) + O.add_fingerprint(usr) qdel(src) return @@ -190,11 +194,16 @@ update_icon() else to_chat(usr, "You need to hold it in your hands to change pages.") - if(istype(loc, /mob)) attack_self(loc) +/obj/item/paper_bundle/AltClick(mob/user) + if(in_range(user, src) && !user.incapacitated()) + if(is_pen(user.get_active_hand())) + rename() + return + . = ..() /obj/item/paper_bundle/verb/rename() set name = "Rename bundle" @@ -227,39 +236,48 @@ /obj/item/paper_bundle/update_desc() . = ..() + if(amount == (photos - 1)) + desc = "[photos] photos clipped together." // In case you clip 2 photos together and remove the paper + return + + else if(((amount + 1) - photos) >= 2) // extra papers + original paper - photos + desc = "[(amount + 1) - photos] papers clipped to each other." - if(amount > 1) - desc = "[amount] papers clipped to each other." else desc = "A single sheet of paper." - - if(locate(/obj/item/photo) in src) - desc += "\nThere is a photo attached to it." - + if(photos) + desc += "\nThere [photos == 1 ? "is a photo" : "are [photos] photos"] attached to it." /obj/item/paper_bundle/update_icon_state() - if(contents.len) - var/obj/item/paper/P = src[1] - icon_state = P.overlays + if(length(contents)) + var/obj/item/paper/P = contents[1] + icon_state = P.icon_state // must have an icon_state to show up on clipboards /obj/item/paper_bundle/update_overlays() . = ..() underlays.Cut() - if(contents.len) - var/obj/item/paper/P = src[1] + if(length(contents)) + var/obj/item/paper/P = contents[1] . += P.overlays + var/counter = 0 for(var/obj/O in src) var/image/sheet = image('icons/obj/bureaucracy.dmi') if(istype(O, /obj/item/paper)) + if(length(underlays) == 3) + continue + sheet.icon_state = O.icon_state - sheet.pixel_x -= min(1 * amount, 2) - sheet.pixel_y -= min(1 * amount, 2) - pixel_x = min(0.5 * amount, 1) - pixel_y = min(1 * amount, 2) + sheet.pixel_x -= min(1 * counter, 2) + sheet.pixel_y -= min(1 * counter, 2) + pixel_x = min(0.5 * counter, 1) + pixel_y = min(1 * counter, 2) underlays += sheet + counter++ else if(istype(O, /obj/item/photo)) var/obj/item/photo/picture = O - . += picture.tiny + sheet = picture.tiny + . += sheet . += "clip" + update_desc() diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index d4b40ea7c85..262341e5d86 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -109,6 +109,11 @@ H.emote("scream") /obj/item/paper/AltClick(mob/user, obj/item/I) + if(in_range(user, src) && !user.incapacitated()) + if(is_pen(user.get_active_hand())) + rename() + return + if(ishuman(user)) var/mob/living/carbon/human/H = user I = H.is_in_hands(/obj/item/paper) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index f5b22e49a98..5e0392bab02 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -27,7 +27,7 @@ icon = 'icons/obj/items.dmi' icon_state = "photo" item_state = "paper" - w_class = WEIGHT_CLASS_SMALL + w_class = WEIGHT_CLASS_TINY resistance_flags = FLAMMABLE max_integrity = 50 var/blueprints = 0 // Does this have the blueprints? @@ -56,20 +56,17 @@ if(istype(P, /obj/item/lighter/zippo)) class = "" - user.visible_message("[class][user] holds \the [P] up to \the [src], it looks like [user.p_theyre()] trying to burn it!", \ - "[class]You hold [P] up to [src], burning it slowly.") - - spawn(20) - if(get_dist(src, user) < 2 && user.get_active_hand() == P && P.lit) - user.visible_message("[class][user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \ - "[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") + user.visible_message("[class][user] holds \the [P] up to \the [src], it looks like [user.p_theyre()] trying to burn it!", \ + "[class]You hold [P] up to [src], burning it slowly.") + if(do_after(user, 50, target = src)) + if(user.get_active_hand() == P && P.lit) + user.visible_message("[class][user] burns right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.", \ + "[class]You burn right through \the [src], turning it to ash. It flutters through the air before settling on the floor in a heap.") if(user.is_in_inactive_hand(src)) user.unEquip(src) - new /obj/effect/decal/cleanable/ash(get_turf(src)) qdel(src) - else to_chat(user, "You must hold \the [P] steady to burn \the [src].") @@ -117,11 +114,16 @@ **************/ /obj/item/storage/photo_album name = "Photo album" + desc = "A slim book with little plastic coverings to keep photos from deteriorating, it reminds you of the good ol' days." icon = 'icons/obj/items.dmi' icon_state = "album" - item_state = "briefcase" + item_state = "syringe_kit" can_hold = list(/obj/item/photo) resistance_flags = FLAMMABLE + w_class = WEIGHT_CLASS_SMALL + storage_slots = 14 + drop_sound = 'sound/items/handling/book_drop.ogg' + pickup_sound = 'sound/items/handling/book_pickup.ogg' /obj/item/storage/photo_album/MouseDrop(obj/over_object as obj) @@ -153,7 +155,7 @@ /obj/item/camera name = "camera" icon = 'icons/obj/items.dmi' - desc = "A polaroid camera. 10 photos left." + desc = "A polaroid camera." icon_state = "camera" item_state = "electropack" w_class = WEIGHT_CLASS_SMALL @@ -169,7 +171,12 @@ var/size = 3 var/see_ghosts = FALSE //for the spoop of it var/current_photo_num = 1 + var/digital = FALSE +/obj/item/camera/examine(mob/user) + . = ..() + if(!digital) + . += "There is [pictures_left] photos left." /obj/item/camera/spooky/CheckParts(list/parts_list) ..() @@ -188,6 +195,12 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor desc = "A polaroid camera, some say it can see ghosts!" see_ghosts = TRUE +/obj/item/camera/AltClick(mob/user) + if(in_range(user, src) && !user.incapacitated()) + change_size() + return + . = ..() + /obj/item/camera/verb/change_size() set name = "Set Photo Focus" set category = "Object" @@ -339,7 +352,6 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor set_light(3, 2, LIGHT_COLOR_TUNGSTEN) addtimer(CALLBACK(src, /atom./proc/set_light, 0), 2) pictures_left-- - desc = "A polaroid camera. It has [pictures_left] photos left." to_chat(user, "[pictures_left] photos left.") icon_state = icon_off on = FALSE @@ -452,23 +464,27 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor ******************/ /obj/item/camera/digital name = "digital camera" - desc = "A digital camera. A small screen shows there is space for 10 photos left." + desc = "A digital camera." + digital = TRUE var/list/datum/picture/saved_pictures = list() pictures_left = 30 var/max_storage = 10 -/obj/item/camera/digital/afterattack(atom/target as mob|obj|turf|area, mob/user as mob, flag) - if(!on || !pictures_left || ismob(target.loc)) return - captureimage(target, user, flag) +/obj/item/camera/digital/examine(mob/user) + . = ..() + . += "A small screen shows that there are currently [length(saved_pictures)] pictures stored." +/obj/item/camera/digital/afterattack(atom/target, mob/user, flag) + if(!on || !pictures_left || ismob(target.loc)) + return + + captureimage(target, user, flag) playsound(loc, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 75, 1, -3) - desc = "A digital camera. A small screen shows that there are currently [saved_pictures.len] pictures stored." icon_state = icon_off on = FALSE - spawn(64) - icon_state = icon_on - on = TRUE + on_cooldown = TRUE + addtimer(CALLBACK(src, .proc/reset_cooldown), 6.4 SECONDS) // magic numbers here too /obj/item/camera/digital/captureimage(atom/target, mob/user, flag) if(saved_pictures.len >= max_storage)