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
This commit is contained in:
msgerbs
2020-09-11 18:43:53 +01:00
committed by GitHub
parent 457a3bb414
commit dde45a406d
5 changed files with 5 additions and 5 deletions
@@ -745,7 +745,7 @@
to_chat(user, "<span class='notice'>The wires have been [panel_open ? "exposed" : "unexposed"].</span>")
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))
+1 -1
View File
@@ -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, "<span class='notice'>You [locked ? "lock" : "unlock"] the interface.</span>")
return
@@ -161,7 +161,7 @@ GLOBAL_LIST_INIT(blacklisted_borg_hats, typecacheof(list( //Hats that don't real
to_chat(user, "<span class='warning'>Unable to locate a radio!</span>")
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, "<span class='warning'>You must close the cover to swipe an ID card!</span>")
else
@@ -332,7 +332,7 @@
to_chat(user, "<span class='notice'>The maintenance panel is now [open ? "opened" : "closed"].</span>")
else
to_chat(user, "<span class='warning'>The maintenance panel is locked!</span>")
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)
@@ -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, "<span class='notice'>You [ locked ? "lock" : "unlock"] \the [src] behaviour controls.</span>")