mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-17 19:14:15 +01:00
Changes APC's/air alarm's lock/unlock hotkey from alt+click to right click (#64352)
* APCs and air alarms lock/unlock with right click
This commit is contained in:
@@ -155,7 +155,7 @@
|
||||
if(AIRALARM_BUILD_NO_WIRES)
|
||||
. += span_notice("It is missing wiring.")
|
||||
if(AIRALARM_BUILD_COMPLETE)
|
||||
. += span_notice("Alt-click to [locked ? "unlock" : "lock"] the interface.")
|
||||
. += span_notice("Right-click to [locked ? "unlock" : "lock"] the interface.")
|
||||
|
||||
/obj/machinery/airalarm/ui_status(mob/user)
|
||||
if(user.has_unlimited_silicon_privilege && aidisabled)
|
||||
@@ -764,14 +764,14 @@
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/airalarm/AltClick(mob/user)
|
||||
/obj/machinery/airalarm/attack_hand_secondary(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(!can_interact(user))
|
||||
return
|
||||
if(!user.canUseTopic(src, !issilicon(user)) || !isturf(loc))
|
||||
return
|
||||
else
|
||||
togglelock(user)
|
||||
togglelock(user)
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
/obj/machinery/airalarm/proc/togglelock(mob/living/user)
|
||||
if(machine_stat & (NOPOWER|BROKEN))
|
||||
|
||||
@@ -337,7 +337,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/power/apc/auto_name, APC_PIXEL_OFFSET
|
||||
else
|
||||
. += "The cover is closed."
|
||||
|
||||
. += span_notice("Alt-Click the APC to [ locked ? "unlock" : "lock"] the interface.")
|
||||
. += span_notice("Right-click the APC to [ locked ? "unlock" : "lock"] the interface.")
|
||||
|
||||
if(issilicon(user))
|
||||
. += span_notice("Ctrl-Click the APC to switch the breaker [ operating ? "off" : "on"].")
|
||||
@@ -775,14 +775,14 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/power/apc/auto_name, APC_PIXEL_OFFSET
|
||||
return FALSE
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/power/apc/AltClick(mob/user)
|
||||
/obj/machinery/power/apc/attack_hand_secondary(mob/user, list/modifiers)
|
||||
. = ..()
|
||||
if(!can_interact(user))
|
||||
return
|
||||
if(!user.canUseTopic(src, !issilicon(user)) || !isturf(loc))
|
||||
return
|
||||
else
|
||||
togglelock(user)
|
||||
togglelock(user)
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
/obj/machinery/power/apc/proc/togglelock(mob/living/user)
|
||||
if(obj_flags & EMAGGED)
|
||||
|
||||
Reference in New Issue
Block a user