fixes snowflake unmodular ID checks (#15596)

* GetID

* Update expressconsole.dm

* Update mech_fabricator.dm
This commit is contained in:
ynot01
2022-09-04 10:50:11 -04:00
committed by GitHub
parent 67d732c514
commit 9a1aadf928
8 changed files with 9 additions and 9 deletions

View File

@@ -448,7 +448,7 @@
to_chat(user, span_notice("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))

View File

@@ -96,7 +96,7 @@
update_icon()
else if (istype(I, /obj/item/card/id)||istype(I, /obj/item/pda))
else if(I.GetID())
if(open)
if (src.allowed(user))
src.locked = !src.locked

View File

@@ -117,8 +117,8 @@
. += span_notice("The status display reads: Storing up to <b>[rmat.local_size]</b> material units.<br>Material consumption at <b>[component_coeff*100]%</b>.<br>Build time reduced by <b>[100-time_coeff*100]%</b>.")
/obj/machinery/mecha_part_fabricator/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/card/id))
var/obj/item/card/id/C = I
if(I.GetID())
var/obj/item/card/id/C = I.GetID()
if(obj_flags & EMAGGED)
to_chat(user, span_warning("The authentification slot spits sparks at you and the display reads scrambled text!"))
do_sparks(1, FALSE, src)

View File

@@ -742,7 +742,7 @@
to_chat(user, span_notice("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))

View File

@@ -35,7 +35,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_notice("You [locked ? "lock" : "unlock"] the interface."))
return

View File

@@ -544,7 +544,7 @@
else
to_chat(user, span_warning("Unable to locate a radio!"))
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
if(opened)
to_chat(user, span_warning("You must close the cover to swipe an ID card!"))
else

View File

@@ -296,7 +296,7 @@
to_chat(user, span_notice("The maintenance panel is now [open ? "opened" : "closed"]."))
else
to_chat(user, span_warning("The maintenance panel is locked."))
else if(istype(W, /obj/item/card/id) || istype(W, /obj/item/pda))
else if(W.GetID())
if(bot_core.allowed(user) && !open && !emagged)
locked = !locked
to_chat(user, "Controls are now [locked ? "locked." : "unlocked."]")

View File

@@ -64,7 +64,7 @@
text_dehack_fail = "[name] does not seem to respond to your repair code!"
/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_notice("You [ locked ? "lock" : "unlock"] \the [src] behaviour controls."))