mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
fixes snowflake unmodular ID checks (#15596)
* GetID * Update expressconsole.dm * Update mech_fabricator.dm
This commit is contained in:
@@ -448,7 +448,7 @@
|
|||||||
to_chat(user, span_notice("The wires have been [panel_open ? "exposed" : "unexposed"]."))
|
to_chat(user, span_notice("The wires have been [panel_open ? "exposed" : "unexposed"]."))
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
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)
|
togglelock(user)
|
||||||
return
|
return
|
||||||
else if(panel_open && is_wire_tool(W))
|
else if(panel_open && is_wire_tool(W))
|
||||||
|
|||||||
@@ -96,7 +96,7 @@
|
|||||||
|
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
else if (istype(I, /obj/item/card/id)||istype(I, /obj/item/pda))
|
else if(I.GetID())
|
||||||
if(open)
|
if(open)
|
||||||
if (src.allowed(user))
|
if (src.allowed(user))
|
||||||
src.locked = !src.locked
|
src.locked = !src.locked
|
||||||
|
|||||||
@@ -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>.")
|
. += 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)
|
/obj/machinery/mecha_part_fabricator/attackby(obj/item/I, mob/living/user, params)
|
||||||
if(istype(I, /obj/item/card/id))
|
if(I.GetID())
|
||||||
var/obj/item/card/id/C = I
|
var/obj/item/card/id/C = I.GetID()
|
||||||
if(obj_flags & EMAGGED)
|
if(obj_flags & EMAGGED)
|
||||||
to_chat(user, span_warning("The authentification slot spits sparks at you and the display reads scrambled text!"))
|
to_chat(user, span_warning("The authentification slot spits sparks at you and the display reads scrambled text!"))
|
||||||
do_sparks(1, FALSE, src)
|
do_sparks(1, FALSE, src)
|
||||||
|
|||||||
@@ -742,7 +742,7 @@
|
|||||||
to_chat(user, span_notice("The wires have been [panel_open ? "exposed" : "unexposed"]."))
|
to_chat(user, span_notice("The wires have been [panel_open ? "exposed" : "unexposed"]."))
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
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)
|
togglelock(user)
|
||||||
return
|
return
|
||||||
else if(panel_open && is_wire_tool(W))
|
else if(panel_open && is_wire_tool(W))
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/obj/machinery/computer/cargo/express/attackby(obj/item/W, mob/living/user, params)
|
/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
|
locked = !locked
|
||||||
to_chat(user, span_notice("You [locked ? "lock" : "unlock"] the interface."))
|
to_chat(user, span_notice("You [locked ? "lock" : "unlock"] the interface."))
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -544,7 +544,7 @@
|
|||||||
else
|
else
|
||||||
to_chat(user, span_warning("Unable to locate a radio!"))
|
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)
|
if(opened)
|
||||||
to_chat(user, span_warning("You must close the cover to swipe an ID card!"))
|
to_chat(user, span_warning("You must close the cover to swipe an ID card!"))
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -296,7 +296,7 @@
|
|||||||
to_chat(user, span_notice("The maintenance panel is now [open ? "opened" : "closed"]."))
|
to_chat(user, span_notice("The maintenance panel is now [open ? "opened" : "closed"]."))
|
||||||
else
|
else
|
||||||
to_chat(user, span_warning("The maintenance panel is locked."))
|
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)
|
if(bot_core.allowed(user) && !open && !emagged)
|
||||||
locked = !locked
|
locked = !locked
|
||||||
to_chat(user, "Controls are now [locked ? "locked." : "unlocked."]")
|
to_chat(user, "Controls are now [locked ? "locked." : "unlocked."]")
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
text_dehack_fail = "[name] does not seem to respond to your repair code!"
|
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)
|
/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)
|
if(bot_core.allowed(user) && !open && !emagged)
|
||||||
locked = !locked
|
locked = !locked
|
||||||
to_chat(user, span_notice("You [ locked ? "lock" : "unlock"] \the [src] behaviour controls."))
|
to_chat(user, span_notice("You [ locked ? "lock" : "unlock"] \the [src] behaviour controls."))
|
||||||
|
|||||||
Reference in New Issue
Block a user