From dde45a406da4ffce4b20c8f8e5bfe858e5d1add3 Mon Sep 17 00:00:00 2001 From: msgerbs Date: Fri, 11 Sep 2020 12:43:53 -0500 Subject: [PATCH] Fixes several things not unlocking when hit with an ID in a tablet. (#53600) The following will now be unlockable by hitting them with an ID in a tablet: Bots Express supply console Air Alarms --- code/modules/atmospherics/machinery/airalarm.dm | 2 +- code/modules/cargo/expressconsole.dm | 2 +- code/modules/mob/living/silicon/robot/robot_defense.dm | 2 +- code/modules/mob/living/simple_animal/bot/bot.dm | 2 +- code/modules/mob/living/simple_animal/bot/cleanbot.dm | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm index 942405c24b9..4ff36e8d798 100644 --- a/code/modules/atmospherics/machinery/airalarm.dm +++ b/code/modules/atmospherics/machinery/airalarm.dm @@ -745,7 +745,7 @@ to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"].") update_icon() return - else if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))// trying to unlock the interface with an ID card + else if(W.GetID())// trying to unlock the interface with an ID card togglelock(user) return else if(panel_open && is_wire_tool(W)) diff --git a/code/modules/cargo/expressconsole.dm b/code/modules/cargo/expressconsole.dm index 59ede454696..468d1e88684 100644 --- a/code/modules/cargo/expressconsole.dm +++ b/code/modules/cargo/expressconsole.dm @@ -36,7 +36,7 @@ return ..() /obj/machinery/computer/cargo/express/attackby(obj/item/W, mob/living/user, params) - if((istype(W, /obj/item/card/id) || istype(W, /obj/item/pda)) && allowed(user)) + if(W.GetID() && allowed(user)) locked = !locked to_chat(user, "You [locked ? "lock" : "unlock"] the interface.") return diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index 37dbb56358e..3ec0361191e 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -161,7 +161,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real to_chat(user, "Unable to locate a radio!") return - if (istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) // trying to unlock the interface with an ID card + if (W.GetID()) // trying to unlock the interface with an ID card if(opened) to_chat(user, "You must close the cover to swipe an ID card!") else diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index bcfdd6fe341..8bdfab537d7 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -332,7 +332,7 @@ to_chat(user, "The maintenance panel is now [open ? "opened" : "closed"].") else to_chat(user, "The maintenance panel is locked!") - else if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda)) + else if(W.GetID()) unlock_with_id(user) else if(istype(W, /obj/item/paicard)) insertpai(user, W) diff --git a/code/modules/mob/living/simple_animal/bot/cleanbot.dm b/code/modules/mob/living/simple_animal/bot/cleanbot.dm index 93bd84ca503..04a816e098a 100644 --- a/code/modules/mob/living/simple_animal/bot/cleanbot.dm +++ b/code/modules/mob/living/simple_animal/bot/cleanbot.dm @@ -160,7 +160,7 @@ C.Knockdown(20) /mob/living/simple_animal/bot/cleanbot/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) + if(W.GetID()) if(bot_core.allowed(user) && !open && !emagged) locked = !locked to_chat(user, "You [ locked ? "lock" : "unlock"] \the [src] behaviour controls.")