Skip to content

Commit

Permalink
qol: You can unlock apc with alt click and toggle it with ctrl click (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladisvell authored Dec 25, 2023
1 parent 658487f commit 6978e6c
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion code/modules/power/apc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,24 @@
else
return ..()

/obj/machinery/power/apc/AltClick(mob/user)
var/mob/living/carbon/human/human = user
if(!istype(human))
return

var/obj/item/card/id/card = human.get_id_card()
if(!istype(card))
return

add_fingerprint(user)
togglelock(user)

/obj/machinery/power/apc/CtrlClick(mob/user)
SEND_SIGNAL(src, COMSIG_CLICK_CTRL, user)
if(!can_use(usr, TRUE) || (is_locked(usr)))
return
toggle_breaker(user)


/obj/machinery/power/apc/crowbar_act(mob/living/user, obj/item/I)
. = TRUE
Expand Down Expand Up @@ -1098,7 +1116,7 @@
CHECK_TICK


/obj/machinery/power/apc/proc/toggle_breaker()
/obj/machinery/power/apc/proc/toggle_breaker(mob/user)
operating = !operating
update()
update_icon()
Expand Down

0 comments on commit 6978e6c

Please sign in to comment.