diff --git a/code/__DEFINES/paper.dm b/code/__DEFINES/paper.dm index feb41c0409c..0d70a2f3ca4 100644 --- a/code/__DEFINES/paper.dm +++ b/code/__DEFINES/paper.dm @@ -16,3 +16,5 @@ #define BARCODE_SCANNER_CHECKIN "check_in" #define BARCODE_SCANNER_INVENTORY "inventory" + +#define IS_WRITING_UTENSIL(thing) (thing?.get_writing_implement_details()?["interaction_mode"] == MODE_WRITING) diff --git a/code/game/machinery/newscaster/newspaper.dm b/code/game/machinery/newscaster/newspaper.dm index d791fac6545..2bd8187b9f8 100644 --- a/code/game/machinery/newscaster/newspaper.dm +++ b/code/game/machinery/newscaster/newspaper.dm @@ -55,7 +55,7 @@ /obj/item/newspaper/add_context(atom/source, list/context, obj/item/held_item, mob/living/user) if(held_item) - if(istype(held_item, /obj/item/pen)) + if(IS_WRITING_UTENSIL(held_item)) context[SCREENTIP_CONTEXT_LMB] = "Scribble" return CONTEXTUAL_SCREENTIP_SET if(held_item.get_temperature()) diff --git a/code/game/machinery/porta_turret/portable_turret_construct.dm b/code/game/machinery/porta_turret/portable_turret_construct.dm index 470aa0501e9..a8fa4e67b2b 100644 --- a/code/game/machinery/porta_turret/portable_turret_construct.dm +++ b/code/game/machinery/porta_turret/portable_turret_construct.dm @@ -181,7 +181,7 @@ build_step = PTURRET_CLOSED return - if(istype(used, /obj/item/pen)) //you can rename turrets like bots! + if(used.get_writing_implement_details()?["interaction_mode"] == MODE_WRITING) //you can rename turrets like bots! var/choice = tgui_input_text(user, "Enter a new turret name", "Turret Classification", finish_name, MAX_NAME_LEN) if(!choice) return diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index ce513c4000f..0b61b81bc11 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -699,7 +699,7 @@ else balloon_alert(user, "set to [choice]") - else if(!state_open && istype(weapon, /obj/item/pen)) + else if(!state_open && IS_WRITING_UTENSIL(weapon)) if(locked) balloon_alert(user, "unlock first!") return diff --git a/code/game/objects/items/devices/beacon.dm b/code/game/objects/items/devices/beacon.dm index ccd8bb413e3..a7c34a92c0d 100644 --- a/code/game/objects/items/devices/beacon.dm +++ b/code/game/objects/items/devices/beacon.dm @@ -48,7 +48,7 @@ return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN /obj/item/beacon/attackby(obj/item/W, mob/user) - if(istype(W, /obj/item/pen)) // needed for things that use custom names like the locator + if(IS_WRITING_UTENSIL(W)) // needed for things that use custom names like the locator var/new_name = tgui_input_text(user, "What would you like the name to be?", "Beacon", max_length = MAX_NAME_LEN) if(!user.can_perform_action(src)) return diff --git a/code/game/objects/items/implants/implantcase.dm b/code/game/objects/items/implants/implantcase.dm index 2695529593f..ffef74de3c1 100644 --- a/code/game/objects/items/implants/implantcase.dm +++ b/code/game/objects/items/implants/implantcase.dm @@ -36,7 +36,7 @@ return ..() /obj/item/implantcase/attackby(obj/item/used_item, mob/living/user, params) - if(istype(used_item, /obj/item/pen)) + if(IS_WRITING_UTENSIL(used_item)) if(!user.can_write(used_item)) return var/new_name = tgui_input_text(user, "What would you like the label to be?", name, max_length = MAX_NAME_LEN) diff --git a/code/game/objects/items/implants/implanter.dm b/code/game/objects/items/implants/implanter.dm index a5242e292a1..1f462527d53 100644 --- a/code/game/objects/items/implants/implanter.dm +++ b/code/game/objects/items/implants/implanter.dm @@ -45,7 +45,7 @@ to_chat(user, span_warning("[src] fails to implant [target].")) /obj/item/implanter/attackby(obj/item/I, mob/living/user, params) - if(!istype(I, /obj/item/pen)) + if(IS_WRITING_UTENSIL(I)) return ..() if(!user.can_write(I)) return diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 367c619333e..d74c9f98dd3 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -376,7 +376,7 @@ if(!locomotion) O.set_lockcharge(TRUE) - else if(istype(W, /obj/item/pen)) + else if(IS_WRITING_UTENSIL(W)) to_chat(user, span_warning("You need to use a multitool to name [src]!")) else return ..() diff --git a/code/game/objects/items/signs.dm b/code/game/objects/items/signs.dm index 3bf5c36048b..85a71dc0e8f 100644 --- a/code/game/objects/items/signs.dm +++ b/code/game/objects/items/signs.dm @@ -30,7 +30,7 @@ desc = "It reads: [label]" /obj/item/picket_sign/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/pen) || istype(W, /obj/item/toy/crayon)) + if(IS_WRITING_UTENSIL(W)) retext(user, W) else return ..() diff --git a/code/game/objects/items/storage/boxes/food_boxes.dm b/code/game/objects/items/storage/boxes/food_boxes.dm index 45de0e58ff6..bab60320c95 100644 --- a/code/game/objects/items/storage/boxes/food_boxes.dm +++ b/code/game/objects/items/storage/boxes/food_boxes.dm @@ -95,7 +95,7 @@ return ..() /obj/item/storage/box/papersack/storage_insert_on_interacted_with(datum/storage, obj/item/inserted, mob/living/user) - if(istype(inserted, /obj/item/pen)) + if(IS_WRITING_UTENSIL(inserted)) var/choice = show_radial_menu(user, src , papersack_designs, custom_check = CALLBACK(src, PROC_REF(check_menu), user, inserted), radius = 36, require_near = TRUE) if(!choice || choice == design_choice) return FALSE diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index f98b29e1932..8fd16036811 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -399,7 +399,7 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets) screentip_change = TRUE if(!locked && !opened) - if(id_card && istype(held_item, /obj/item/pen)) + if(id_card && IS_WRITING_UTENSIL(held_item)) context[SCREENTIP_CONTEXT_LMB] = "Rename" screentip_change = TRUE if(secure && card_reader_installed && !broken) @@ -817,7 +817,7 @@ GLOBAL_LIST_EMPTY(roundstart_station_closets) else balloon_alert(user, "set to [choice]") - else if(!opened && istype(weapon, /obj/item/pen)) + else if(!opened && IS_WRITING_UTENSIL(weapon)) if(locked) balloon_alert(user, "unlock first!") return diff --git a/code/game/objects/structures/crates_lockers/closets/bodybag.dm b/code/game/objects/structures/crates_lockers/closets/bodybag.dm index 38482fcfd9b..8eb5cc3b8c0 100644 --- a/code/game/objects/structures/crates_lockers/closets/bodybag.dm +++ b/code/game/objects/structures/crates_lockers/closets/bodybag.dm @@ -47,7 +47,7 @@ return ..() /obj/structure/closet/body_bag/attackby(obj/item/interact_tool, mob/user, params) - if (istype(interact_tool, /obj/item/pen) || istype(interact_tool, /obj/item/toy/crayon)) + if (IS_WRITING_UTENSIL(interact_tool)) if(!user.can_write(interact_tool)) return var/t = tgui_input_text(user, "What would you like the label to be?", name, max_length = 53) diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index 86d8e01f98e..9493a7c9414 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -82,7 +82,7 @@ . += span_notice("There is a small paper placard on the assembly, written on it is '[created_name]'.") /obj/structure/door_assembly/attackby(obj/item/W, mob/living/user, params) - if(istype(W, /obj/item/pen) && !user.combat_mode) + if(IS_WRITING_UTENSIL(W) && !user.combat_mode) var/t = tgui_input_text(user, "Enter the name for the door", "Airlock Renaming", created_name, MAX_NAME_LEN) if(!t) return diff --git a/code/game/objects/structures/signs/_signs.dm b/code/game/objects/structures/signs/_signs.dm index eefbe49ef32..9268cb9c059 100644 --- a/code/game/objects/structures/signs/_signs.dm +++ b/code/game/objects/structures/signs/_signs.dm @@ -85,7 +85,7 @@ return TRUE /obj/structure/sign/attackby(obj/item/I, mob/user, params) - if(is_editable && istype(I, /obj/item/pen)) + if(is_editable && IS_WRITING_UTENSIL(I)) if(!length(GLOB.editable_sign_types)) CRASH("GLOB.editable_sign_types failed to populate") var/choice = tgui_input_list(user, "Select a sign type", "Sign Customization", GLOB.editable_sign_types) @@ -187,12 +187,12 @@ /obj/item/sign/add_context(atom/source, list/context, obj/item/held_item, mob/user) . = ..() - if(is_editable && istype(held_item, /obj/item/pen)) + if(is_editable && IS_WRITING_UTENSIL(held_item)) context[SCREENTIP_CONTEXT_LMB] = "Change design" return CONTEXTUAL_SCREENTIP_SET /obj/item/sign/attackby(obj/item/I, mob/user, params) - if(is_editable && istype(I, /obj/item/pen)) + if(is_editable && IS_WRITING_UTENSIL(I)) if(!length(GLOB.editable_sign_types)) CRASH("GLOB.editable_sign_types failed to populate") var/choice = tgui_input_list(user, "Select a sign type", "Sign Customization", GLOB.editable_sign_types) diff --git a/code/game/objects/structures/windoor_assembly.dm b/code/game/objects/structures/windoor_assembly.dm index 3437e2a5ae0..195fbbc643e 100644 --- a/code/game/objects/structures/windoor_assembly.dm +++ b/code/game/objects/structures/windoor_assembly.dm @@ -246,7 +246,7 @@ electronics = null ae.forceMove(drop_location()) - else if(istype(W, /obj/item/pen)) + else if(IS_WRITING_UTENSIL(W)) var/t = tgui_input_text(user, "Enter the name for the door", "Windoor Renaming", created_name, MAX_NAME_LEN) if(!t) return diff --git a/code/modules/cards/singlecard.dm b/code/modules/cards/singlecard.dm index 0c228fbbb17..300523254ed 100644 --- a/code/modules/cards/singlecard.dm +++ b/code/modules/cards/singlecard.dm @@ -95,7 +95,7 @@ context[SCREENTIP_CONTEXT_LMB] = "Combine cards" return CONTEXTUAL_SCREENTIP_SET - if(istype(held_item, /obj/item/toy/crayon) || istype(held_item, /obj/item/pen)) + if(IS_WRITING_UTENSIL(held_item)) context[SCREENTIP_CONTEXT_LMB] = blank ? "Write on card" : "Mark card" return CONTEXTUAL_SCREENTIP_SET diff --git a/code/modules/cargo/supplypod_beacon.dm b/code/modules/cargo/supplypod_beacon.dm index 8f1166002de..2d9a618bb41 100644 --- a/code/modules/cargo/supplypod_beacon.dm +++ b/code/modules/cargo/supplypod_beacon.dm @@ -103,7 +103,7 @@ return CLICK_ACTION_SUCCESS /obj/item/supplypod_beacon/attackby(obj/item/W, mob/user) - if(!istype(W, /obj/item/pen)) //give a tag that is visible from the linked express console + if(IS_WRITING_UTENSIL(W)) //give a tag that is visible from the linked express console return ..() var/new_beacon_name = tgui_input_text(user, "What would you like the tag to be?", "Beacon Tag", max_length = MAX_NAME_LEN) if(isnull(new_beacon_name)) diff --git a/code/modules/food_and_drinks/pizzabox.dm b/code/modules/food_and_drinks/pizzabox.dm index a847b15e861..417ac543612 100644 --- a/code/modules/food_and_drinks/pizzabox.dm +++ b/code/modules/food_and_drinks/pizzabox.dm @@ -228,7 +228,7 @@ return else if(bomb) balloon_alert(user, "already rigged!") - else if(istype(I, /obj/item/pen)) + else if(IS_WRITING_UTENSIL(I)) if(!open) if(!user.can_write(I)) return diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index f46f4c3912a..fefd4d99938 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -462,7 +462,7 @@ return /obj/item/seeds/attackby(obj/item/O, mob/user, params) - if(istype(O, /obj/item/pen)) + if(IS_WRITING_UTENSIL(O)) var/choice = tgui_input_list(usr, "What would you like to change?", "Seed Alteration", list("Plant Name", "Seed Description", "Product Description")) if(isnull(choice)) return diff --git a/code/modules/library/book.dm b/code/modules/library/book.dm index 19b65f82489..5ae9afcdcbe 100644 --- a/code/modules/library/book.dm +++ b/code/modules/library/book.dm @@ -101,7 +101,7 @@ if(burn_paper_product_attackby_check(attacking_item, user)) return - if(istype(attacking_item, /obj/item/pen)) + if(IS_WRITING_UTENSIL(attacking_item)) if(!user.can_perform_action(src) || !user.can_write(attacking_item)) return if(user.is_blind()) diff --git a/code/modules/library/bookcase.dm b/code/modules/library/bookcase.dm index 822e4ae583c..16925dd5138 100644 --- a/code/modules/library/bookcase.dm +++ b/code/modules/library/bookcase.dm @@ -130,7 +130,7 @@ atom_storage.attempt_remove(T, src) to_chat(user, span_notice("You empty \the [I] into \the [src].")) update_appearance() - else if(istype(I, /obj/item/pen)) + else if(IS_WRITING_UTENSIL(I)) if(!user.can_perform_action(src) || !user.can_write(I)) return var/newname = tgui_input_text(user, "What would you like to title this bookshelf?", "Bookshelf Renaming", max_length = MAX_NAME_LEN) diff --git a/code/modules/mob/living/simple_animal/bot/construction.dm b/code/modules/mob/living/simple_animal/bot/construction.dm index 7d4565b46f4..a349ca64995 100644 --- a/code/modules/mob/living/simple_animal/bot/construction.dm +++ b/code/modules/mob/living/simple_animal/bot/construction.dm @@ -12,7 +12,7 @@ /obj/item/bot_assembly/attackby(obj/item/I, mob/user, params) ..() - if(istype(I, /obj/item/pen)) + if(IS_WRITING_UTENSIL(I)) rename_bot() return diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 4d0a0efe596..3ee556b3adf 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -77,7 +77,7 @@ return to_chat(user, span_notice("You put [weapon] into [src].")) update_appearance() - else if(istype(weapon, /obj/item/pen)) + else if(IS_WRITING_UTENSIL(weapon)) rename(user, weapon) /obj/item/folder/attack_self(mob/user) diff --git a/code/modules/paperwork/paperplane.dm b/code/modules/paperwork/paperplane.dm index 0b9c4feccb1..7b734c15306 100644 --- a/code/modules/paperwork/paperplane.dm +++ b/code/modules/paperwork/paperplane.dm @@ -78,7 +78,7 @@ /obj/item/paperplane/attackby(obj/item/attacking_item, mob/user, params) if(burn_paper_product_attackby_check(attacking_item, user)) return - if(istype(attacking_item, /obj/item/pen) || istype(attacking_item, /obj/item/toy/crayon)) + if(IS_WRITING_UTENSIL(attacking_item)) to_chat(user, span_warning("You should unfold [src] before changing it!")) return else if(istype(attacking_item, /obj/item/stamp)) //we don't randomize stamps on a paperplane diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 53df8dbd35b..6043890bebd 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -34,6 +34,8 @@ var/dart_insert_icon = 'icons/obj/weapons/guns/toy.dmi' var/dart_insert_casing_icon_state = "overlay_pen" var/dart_insert_projectile_icon_state = "overlay_pen_proj" + /// If this pen can be clicked in order to retract it + var/can_click = TRUE /obj/item/pen/Initialize(mapload) . = ..() @@ -47,6 +49,34 @@ AddElement(/datum/element/tool_renaming) RegisterSignal(src, COMSIG_DART_INSERT_ADDED, PROC_REF(on_inserted_into_dart)) RegisterSignal(src, COMSIG_DART_INSERT_REMOVED, PROC_REF(on_removed_from_dart)) + if (!can_click) + return + create_transform_component() + RegisterSignal(src, COMSIG_TRANSFORMING_ON_TRANSFORM, PROC_REF(on_transform)) + +/// Proc that child classes can override to have custom transforms, like edaggers or pendrivers +/obj/item/pen/proc/create_transform_component() + AddComponent( \ + /datum/component/transforming, \ + sharpness_on = NONE, \ + inhand_icon_change = FALSE, \ + ) + +/* + * Signal proc for [COMSIG_TRANSFORMING_ON_TRANSFORM]. + * + * Clicks the pen to make an annoying sound. Clickity clickery click! + */ +/obj/item/pen/proc/on_transform(obj/item/source, mob/user, active) + SIGNAL_HANDLER + + if(user) + balloon_alert(user, "clicked") + playsound(src, 'sound/machines/click.ogg', 30, TRUE, -3) + icon_state = initial(icon_state) + (active ? "_retracted" : "") + update_appearance(UPDATE_ICON) + + return COMPONENT_NO_DEFAULT_MESSAGE /obj/item/pen/proc/on_inserted_into_dart(datum/source, obj/projectile/dart, mob/user, embedded = FALSE) SIGNAL_HANDLER @@ -90,6 +120,7 @@ name = "four-color pen" icon_state = "pen_4color" colour = COLOR_BLACK + can_click = FALSE /obj/item/pen/fourcolor/attack_self(mob/living/carbon/user) . = ..() @@ -110,6 +141,8 @@ colour = COLOR_BLACK to_chat(user, span_notice("\The [src] will now write in [chosen_color].")) desc = "It's a fancy four-color ink pen, set to [chosen_color]." + balloon_alert(user, "clicked") + playsound(src, 'sound/machines/click.ogg', 30, TRUE, -3) /obj/item/pen/fountain name = "fountain pen" @@ -119,6 +152,7 @@ requires_gravity = FALSE // fancy spess pens dart_insert_casing_icon_state = "overlay_fountainpen" dart_insert_projectile_icon_state = "overlay_fountainpen_proj" + can_click = FALSE /obj/item/pen/charcoal name = "charcoal stylus" @@ -129,6 +163,7 @@ custom_materials = null grind_results = list(/datum/reagent/ash = 5, /datum/reagent/cellulose = 10) requires_gravity = FALSE // this is technically a pencil + can_click = FALSE /datum/crafting_recipe/charcoal_stylus name = "Charcoal Stylus" @@ -187,19 +222,17 @@ insert_comp.casing_overlay_icon_state = overlay_reskin[current_skin] insert_comp.projectile_overlay_icon_state = "[overlay_reskin[current_skin]]_proj" -/obj/item/pen/attack_self(mob/living/carbon/user) - . = ..() - if(.) - return +/obj/item/pen/item_ctrl_click(mob/living/carbon/user) if(loc != user) to_chat(user, span_warning("You must be holding the pen to continue!")) - return + return CLICK_ACTION_BLOCKING var/deg = tgui_input_number(user, "What angle would you like to rotate the pen head to? (0-360)", "Rotate Pen Head", max_value = 360) if(isnull(deg) || QDELETED(user) || QDELETED(src) || !user.can_perform_action(src, FORBID_TELEKINESIS_REACH) || loc != user) - return + return CLICK_ACTION_BLOCKING degrees = deg to_chat(user, span_notice("You rotate the top of the pen to [deg] degrees.")) SEND_SIGNAL(src, COMSIG_PEN_ROTATED, deg, user) + return CLICK_ACTION_SUCCESS /obj/item/pen/attack(mob/living/M, mob/user, params) if(force) // If the pen has a force value, call the normal attack procs. Used for e-daggers and captain's pen mostly. @@ -212,6 +245,8 @@ return TRUE /obj/item/pen/get_writing_implement_details() + if (HAS_TRAIT(src, TRAIT_TRANSFORM_ACTIVE)) + return null return list( interaction_mode = MODE_WRITING, font = font, @@ -287,6 +322,9 @@ speed = 6 SECONDS, \ butcher_sound = 'sound/weapons/blade1.ogg', \ ) + RegisterSignal(src, COMSIG_DETECTIVE_SCANNED, PROC_REF(on_scan)) + +/obj/item/pen/edagger/create_transform_component() AddComponent( \ /datum/component/transforming, \ force_on = 18, \ @@ -296,8 +334,6 @@ w_class_on = WEIGHT_CLASS_NORMAL, \ inhand_icon_change = FALSE, \ ) - RegisterSignal(src, COMSIG_TRANSFORMING_ON_TRANSFORM, PROC_REF(on_transform)) - RegisterSignal(src, COMSIG_DETECTIVE_SCANNED, PROC_REF(on_scan)) /obj/item/pen/edagger/on_inserted_into_dart(datum/source, obj/item/ammo_casing/dart, mob/user) . = ..() @@ -369,9 +405,7 @@ * Handles swapping their icon files to edagger related icon files - * as they're supposed to look like a normal pen. */ -/obj/item/pen/edagger/proc/on_transform(obj/item/source, mob/user, active) - SIGNAL_HANDLER - +/obj/item/pen/edagger/on_transform(obj/item/source, mob/user, active) if(active) name = hidden_name desc = hidden_desc @@ -418,6 +452,7 @@ colour = COLOR_BLUE dart_insert_casing_icon_state = "overlay_survivalpen" dart_insert_projectile_icon_state = "overlay_survivalpen_proj" + can_click = FALSE /obj/item/pen/survival/on_inserted_into_dart(datum/source, obj/item/ammo_casing/dart, mob/user) . = ..() @@ -456,6 +491,9 @@ /obj/item/pen/screwdriver/Initialize(mapload) . = ..() + AddElement(/datum/element/update_icon_updates_onmob) + +/obj/item/pen/screwdriver/create_transform_component() AddComponent( \ /datum/component/transforming, \ throwforce_on = 5, \ @@ -464,12 +502,7 @@ inhand_icon_change = FALSE, \ ) - RegisterSignal(src, COMSIG_TRANSFORMING_ON_TRANSFORM, PROC_REF(toggle_screwdriver)) - AddElement(/datum/element/update_icon_updates_onmob) - -/obj/item/pen/screwdriver/proc/toggle_screwdriver(obj/item/source, mob/user, active) - SIGNAL_HANDLER - +/obj/item/pen/screwdriver/on_transform(obj/item/source, mob/user, active) if(user) balloon_alert(user, active ? "extended" : "retracted") playsound(src, 'sound/weapons/batonextend.ogg', 50, TRUE) diff --git a/code/modules/photography/photos/photo.dm b/code/modules/photography/photos/photo.dm index b34ff459c00..b009c5b2e79 100644 --- a/code/modules/photography/photos/photo.dm +++ b/code/modules/photography/photos/photo.dm @@ -68,7 +68,7 @@ /obj/item/photo/attackby(obj/item/P, mob/user, params) if(burn_paper_product_attackby_check(P, user)) return - if(istype(P, /obj/item/pen) || istype(P, /obj/item/toy/crayon)) + if(IS_WRITING_UTENSIL(P)) if(!user.can_write(P)) return var/txt = tgui_input_text(user, "What would you like to write on the back?", "Photo Writing", max_length = 128) diff --git a/code/modules/reagents/reagent_containers/blood_pack.dm b/code/modules/reagents/reagent_containers/blood_pack.dm index 89b9e7c748c..75fc8aef892 100644 --- a/code/modules/reagents/reagent_containers/blood_pack.dm +++ b/code/modules/reagents/reagent_containers/blood_pack.dm @@ -74,7 +74,7 @@ /obj/item/reagent_containers/blood/snail blood_type = "S" unique_blood = /datum/reagent/lube - + /obj/item/reagent_containers/blood/snail/examine() . = ..() . += span_notice("It's a bit slimy... The label indicates that this is meant for snails.") @@ -100,7 +100,7 @@ blood_type = "U" /obj/item/reagent_containers/blood/attackby(obj/item/tool, mob/user, params) - if (istype(tool, /obj/item/pen) || istype(tool, /obj/item/toy/crayon)) + if (IS_WRITING_UTENSIL(tool)) if(!user.can_write(tool)) return var/custom_label = tgui_input_text(user, "What would you like to label the blood pack?", "Blood Pack", name, MAX_NAME_LEN) diff --git a/code/modules/reagents/reagent_containers/cups/bottle.dm b/code/modules/reagents/reagent_containers/cups/bottle.dm index 0b47a89e4b2..97906b26240 100644 --- a/code/modules/reagents/reagent_containers/cups/bottle.dm +++ b/code/modules/reagents/reagent_containers/cups/bottle.dm @@ -510,7 +510,7 @@ balloon_alert(user, "transferred [transfer_amount] unit\s") flick("syrup_anim",src) - if(istype(attacking_item, /obj/item/pen)) + if(IS_WRITING_UTENSIL(attacking_item)) rename(user, attacking_item) attacking_item.update_appearance() diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index f02bfff4a09..a6be96a43a8 100644 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -113,7 +113,7 @@ sort_tag = dest_tagger.currTag playsound(loc, 'sound/machines/twobeep_high.ogg', 100, TRUE) update_appearance() - else if(istype(item, /obj/item/pen)) + else if(IS_WRITING_UTENSIL(item)) if(!user.can_write(item)) return var/str = tgui_input_text(user, "Label text?", "Set label", max_length = MAX_NAME_LEN) diff --git a/code/modules/vending/_vending.dm b/code/modules/vending/_vending.dm index ed6d085abe5..9ca0d41d853 100644 --- a/code/modules/vending/_vending.dm +++ b/code/modules/vending/_vending.dm @@ -1778,7 +1778,7 @@ GLOBAL_LIST_EMPTY(vending_machines_to_restock) speak("\The [src] has been linked to [card_used].") if(compartmentLoadAccessCheck(user)) - if(istype(attack_item, /obj/item/pen)) + if(IS_WRITING_UTENSIL(attack_item)) name = tgui_input_text(user, "Set name", "Name", name, 20) desc = tgui_input_text(user, "Set description", "Description", desc, 60) slogan_list += tgui_input_text(user, "Set slogan", "Slogan", "Epic", 60) diff --git a/icons/obj/service/bureaucracy.dmi b/icons/obj/service/bureaucracy.dmi index e9f8347b048..b400b7aee8b 100644 Binary files a/icons/obj/service/bureaucracy.dmi and b/icons/obj/service/bureaucracy.dmi differ