diff --git a/code/game/machinery/computer/almayer_control.dm b/code/game/machinery/computer/almayer_control.dm index d38ccd725785..1f3338e15bf7 100644 --- a/code/game/machinery/computer/almayer_control.dm +++ b/code/game/machinery/computer/almayer_control.dm @@ -193,6 +193,19 @@ . = TRUE if("ship_announce") + var/mob/living/carbon/human/human_user = usr + var/obj/item/card/id/idcard = human_user.get_active_hand() + var/bio_fail = FALSE + if(!istype(idcard)) + idcard = human_user.wear_id + if(!istype(idcard)) + bio_fail = TRUE + else if(!idcard.check_biometrics(human_user)) + bio_fail = TRUE + if(bio_fail) + to_chat(human_user, SPAN_WARNING("Biometrics failure! You require an authenticated ID card to perform this action!")) + return FALSE + if(!COOLDOWN_FINISHED(src, cooldown_message)) to_chat(usr, SPAN_WARNING("Please allow at least [COOLDOWN_TIMELEFT(src, cooldown_message)/10] second\s to pass between announcements.")) return FALSE @@ -201,12 +214,8 @@ return FALSE var/signed = null - if(ishuman(usr)) - var/mob/living/carbon/human/human_user = usr - var/obj/item/card/id/id = human_user.wear_id - if(istype(id)) - var/paygrade = get_paygrades(id.paygrade, FALSE, human_user.gender) - signed = "[paygrade] [id.registered_name]" + var/paygrade = get_paygrades(idcard.paygrade, FALSE, human_user.gender) + signed = "[paygrade] [idcard.registered_name]" COOLDOWN_START(src, cooldown_message, COOLDOWN_COMM_MESSAGE) shipwide_ai_announcement(input, COMMAND_SHIP_ANNOUNCE, signature = signed) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 77c9bbacc293..beed3610b53f 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -113,6 +113,19 @@ if("announce") if(authenticated == 2) + var/mob/living/carbon/human/human_user = usr + var/obj/item/card/id/idcard = human_user.get_active_hand() + var/bio_fail = FALSE + if(!istype(idcard)) + idcard = human_user.wear_id + if(!istype(idcard)) + bio_fail = TRUE + else if(!idcard.check_biometrics(human_user)) + bio_fail = TRUE + if(bio_fail) + to_chat(human_user, SPAN_WARNING("Biometrics failure! You require an authenticated ID card to perform this action!")) + return FALSE + if(usr.client.prefs.muted & MUTE_IC) to_chat(usr, SPAN_DANGER("You cannot send Announcements (muted).")) return diff --git a/code/game/machinery/computer/groundside_operations.dm b/code/game/machinery/computer/groundside_operations.dm index 0fd843008e24..95ea46177ca2 100644 --- a/code/game/machinery/computer/groundside_operations.dm +++ b/code/game/machinery/computer/groundside_operations.dm @@ -210,6 +210,19 @@ return if("announce") + var/mob/living/carbon/human/human_user = usr + var/obj/item/card/id/idcard = human_user.get_active_hand() + var/bio_fail = FALSE + if(!istype(idcard)) + idcard = human_user.wear_id + if(!istype(idcard)) + bio_fail = TRUE + else if(!idcard.check_biometrics(human_user)) + bio_fail = TRUE + if(bio_fail) + to_chat(human_user, SPAN_WARNING("Biometrics failure! You require an authenticated ID card to perform this action!")) + return FALSE + if(usr.client.prefs.muted & MUTE_IC) to_chat(usr, SPAN_DANGER("You cannot send Announcements (muted).")) return @@ -295,6 +308,19 @@ usr.RegisterSignal(cam, COMSIG_PARENT_QDELETING, TYPE_PROC_REF(/mob, reset_observer_view_on_deletion)) if("activate_echo") + var/mob/living/carbon/human/human_user = usr + var/obj/item/card/id/idcard = human_user.get_active_hand() + var/bio_fail = FALSE + if(!istype(idcard)) + idcard = human_user.wear_id + if(!istype(idcard)) + bio_fail = TRUE + else if(!idcard.check_biometrics(human_user)) + bio_fail = TRUE + if(bio_fail) + to_chat(human_user, SPAN_WARNING("Biometrics failure! You require an authenticated ID card to perform this action!")) + return FALSE + var/reason = strip_html(input(usr, "What is the purpose of Echo Squad?", "Activation Reason")) if(!reason) return diff --git a/code/game/objects/items/devices/cictablet.dm b/code/game/objects/items/devices/cictablet.dm index 4d6db2f7772d..664054fb59e2 100644 --- a/code/game/objects/items/devices/cictablet.dm +++ b/code/game/objects/items/devices/cictablet.dm @@ -43,10 +43,10 @@ add_pmcs = FALSE UnregisterSignal(SSdcs, COMSIG_GLOB_MODE_PRESETUP) -/obj/item/device/cotablet/attack_self(mob/user as mob) +/obj/item/device/cotablet/attack_self(mob/living/carbon/human/user as mob) ..() - if(src.allowed(user)) + if(src.allowed(user) && user.wear_id?.check_biometrics(user)) tgui_interact(user) else to_chat(user, SPAN_DANGER("Access denied."))