From f796a6a51dd6957b8530c8f35f5d37d89ad37816 Mon Sep 17 00:00:00 2001 From: Gabriel Adamson Date: Wed, 25 Aug 2021 16:56:59 -0500 Subject: [PATCH 1/5] Adds emergency spare, a temporary ID with AA that heads can print --- .../game/machinery/computer/communications.dm | 9 ++++++++ code/game/objects/items/cards_ids.dm | 22 +++++++++++++++++++ config/game_options.txt | 4 ++-- .../tgui/interfaces/CommunicationsConsole.js | 9 +++++++- 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 8462041a373a..2449f23b645b 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -330,6 +330,11 @@ log_game("[key_name(usr)] enabled emergency maintenance access.") message_admins("[ADMIN_LOOKUPFLW(usr)] enabled emergency maintenance access.") deadchat_broadcast(" enabled emergency maintenance access at [get_area_name(usr, TRUE)].", "[usr.real_name]", usr) + if ("printSpare") + if (!issilicon(usr)) + playsound(loc, 'sound/items/poster_being_created.ogg', 100, 1) + new /obj/item/card/id/captains_spare/temporary(loc) + priority_announce("The emergency spare ID has been printed by [authorize_name].", "Emergency Spare ID Warning System", SSstation.announcer.get_rand_report_sound()) /obj/machinery/computer/communications/ui_data(mob/user) var/list/data = list( @@ -361,6 +366,7 @@ data["importantActionReady"] = COOLDOWN_FINISHED(src, important_action_cooldown) data["shuttleCalled"] = FALSE data["shuttleLastCalled"] = FALSE + data["canPrintId"] = FALSE data["alertLevel"] = get_security_level() data["authorizeName"] = authorize_name @@ -371,6 +377,9 @@ data["canMessageAssociates"] = TRUE data["canRequestNuke"] = TRUE + if (!issilicon(user)) + data["canPrintId"] = TRUE + if (can_send_messages_to_other_sectors(user)) data["canSendToSectors"] = TRUE diff --git a/code/game/objects/items/cards_ids.dm b/code/game/objects/items/cards_ids.dm index cbf239e9e3bf..204741af900a 100644 --- a/code/game/objects/items/cards_ids.dm +++ b/code/game/objects/items/cards_ids.dm @@ -443,6 +443,28 @@ update_label("John Doe", "Clowny") access = J.get_access() . = ..() +/obj/item/card/id/captains_spare/temporary + name = "emergency id card" + desc = "A temporary ID for access to secure areas in the event of an emergency" + resistance_flags = FLAMMABLE + +/obj/item/card/id/captains_spare/temporary/Initialize() + . = ..() + access -= ACCESS_CHANGE_IDS + access -= ACCESS_HEADS + addtimer(CALLBACK(src, .proc/wipe_id), 50 SECONDS) + +/obj/item/card/id/captains_spare/temporary/proc/wipe_id() + visible_message("The temporary spare begins to smolder", "The temporary spare begins to smolder", "The temporary spare begins to smolder") + sleep(10 SECONDS) + if(isliving(loc)) + var/mob/living/M = loc + M.adjust_fire_stacks(1) + M.IgniteMob() + fire_act() + sleep(2 SECONDS) + burn() + /obj/item/card/id/centcom name = "\improper CentCom ID" desc = "An ID straight from Central Command." diff --git a/config/game_options.txt b/config/game_options.txt index fd55ec6c3aab..aec0d30202f6 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -338,13 +338,13 @@ GATEWAY_DELAY 18000 ## If the number of players ready at round starts exceeds this threshold, JOBS_HAVE_MINIMAL_ACCESS will automatically be enabled. Otherwise, it will be disabled. ## This is useful for accomodating both low and high population rounds on the same server. ## Comment this out or set to 0 to disable this automatic toggle. -MINIMAL_ACCESS_THRESHOLD 18 +MINIMAL_ACCESS_THRESHOLD 0 ## Comment this out this if you wish to use the setup where jobs have more access. ## This is intended for servers with low populations - where there are not enough ## players to fill all roles, so players need to do more than just one job. ## This option is ignored if MINIMAL_ACCESS_THRESHOLD is used. -#JOBS_HAVE_MINIMAL_ACCESS +JOBS_HAVE_MINIMAL_ACCESS ## Uncomment to give assistants maint access. #ASSISTANTS_HAVE_MAINT_ACCESS diff --git a/tgui/packages/tgui/interfaces/CommunicationsConsole.js b/tgui/packages/tgui/interfaces/CommunicationsConsole.js index fea57f37dcbd..df5df9c2272b 100644 --- a/tgui/packages/tgui/interfaces/CommunicationsConsole.js +++ b/tgui/packages/tgui/interfaces/CommunicationsConsole.js @@ -283,6 +283,7 @@ const PageMain = (props, context) => { shuttleCalledPreviously, shuttleCanEvacOrFailReason, shuttleLastCalled, + canPrintId, shuttleRecallable, } = data; @@ -387,6 +388,12 @@ const PageMain = (props, context) => { onClick={() => act("makeVoiceAnnouncement")} />} + {!!canPrintId &&