mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-08-17 10:16:23 +01:00
Merge pull request #6580 from Shadow-Quill/APC-AirAlarm-Alt-Click
APCs/Air Alarms can be (un)locked via altclick
This commit is contained in:
+25
-17
@@ -534,23 +534,8 @@
|
||||
update_icon()
|
||||
|
||||
else if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda)) // trying to unlock the interface with an ID card
|
||||
if(emagged)
|
||||
to_chat(user,"The panel is unresponsive.")
|
||||
else if(opened)
|
||||
to_chat(user,"You must close the cover to swipe an ID card.")
|
||||
else if(wiresexposed)
|
||||
to_chat(user,"You must close the wire panel.")
|
||||
else if(stat & (BROKEN|MAINT))
|
||||
to_chat(user,"Nothing happens.")
|
||||
else if(hacker)
|
||||
to_chat(user,"<span class='warning'>Access denied.</span>")
|
||||
else
|
||||
if(src.allowed(usr) && !isWireCut(APC_WIRE_IDSCAN))
|
||||
locked = !locked
|
||||
to_chat(user,"You [ locked ? "lock" : "unlock"] the APC interface.")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user,"<span class='warning'>Access denied.</span>")
|
||||
togglelock()
|
||||
|
||||
else if (istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics!=2)
|
||||
var/turf/T = loc
|
||||
if(istype(T) && !T.is_plating())
|
||||
@@ -686,6 +671,29 @@
|
||||
|
||||
// attack with hand - remove cell (if cover open) or interact with the APC
|
||||
|
||||
/obj/machinery/power/apc/verb/togglelock(mob/user as mob)
|
||||
if(emagged)
|
||||
to_chat(user,"The panel is unresponsive.")
|
||||
else if(opened)
|
||||
to_chat(user,"You must close the cover to swipe an ID card.")
|
||||
else if(wiresexposed)
|
||||
to_chat(user,"You must close the wire panel.")
|
||||
else if(stat & (BROKEN|MAINT))
|
||||
to_chat(user,"Nothing happens.")
|
||||
else if(hacker)
|
||||
to_chat(user,"<span class='warning'>Access denied.</span>")
|
||||
else
|
||||
if(src.allowed(usr) && !isWireCut(APC_WIRE_IDSCAN))
|
||||
locked = !locked
|
||||
to_chat(user,"You [ locked ? "lock" : "unlock"] the APC interface.")
|
||||
update_icon()
|
||||
else
|
||||
to_chat(user,"<span class='warning'>Access denied.</span>")
|
||||
|
||||
/obj/machinery/power/apc/AltClick(mob/user)
|
||||
..()
|
||||
togglelock()
|
||||
|
||||
/obj/machinery/power/apc/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (!(emagged || hacker)) // trying to unlock with an emag card
|
||||
if(opened)
|
||||
|
||||
Reference in New Issue
Block a user