Skip to content

Commit

Permalink
make APC repair a little less agonizing
Browse files Browse the repository at this point in the history
  • Loading branch information
TobleroneSwordfish committed Dec 24, 2024
1 parent 1d19b28 commit 7f6a1da
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
36 changes: 18 additions & 18 deletions code/modules/power/apc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -242,21 +242,6 @@ ADMIN_INTERACT_PROCS(/obj/machinery/power/apc, proc/toggle_operating, proc/zapSt

/obj/machinery/power/apc/examine(mob/user)
. = ..()

if(status & BROKEN)
switch(repair_status)
if(0)
. += "<br>It's completely busted! It seems you need to use a screwdriver and disconnect the control board first, to begin the repair process.</br>"
if(1)
. += "<br>The control board has been disconnected. The autotransformer's wiring is all messed up! You need to grab some cables and fix it.</br>"
if(2)
. += "<br>The control panel is disconnected and the autotransformer seems to be in a good condition. You just need to tune it with a wrench now.</br>"
if(3)
. += "<br>The autotransformer seems to be working fine now. The next step is resetting the control board with a multitool.</br>"
if(4)
. += "<br>The autotransformer is working fine and the control board has been reset! Now you just need to reconnect it with a screwdriver, to finish the repair process.</br>"
return

if(user && !user.stat)
. += "A control terminal for the area electrical systems."
if(opened)
Expand Down Expand Up @@ -465,7 +450,7 @@ ADMIN_INTERACT_PROCS(/obj/machinery/power/apc, proc/toggle_operating, proc/zapSt
else
boutput(user, SPAN_ALERT("Not enough cable! <I>(Requires four pieces)</I>"))
return
SETUP_GENERIC_ACTIONBAR(user, src, 10 SECONDS, /obj/machinery/power/apc/proc/fix_wiring,\
SETUP_GENERIC_ACTIONBAR(user, src, 3 SECONDS, /obj/machinery/power/apc/proc/fix_wiring,\
list(theCoil, user), W.icon, W.icon_state, null, null)
return
if (2)
Expand All @@ -481,8 +466,8 @@ ADMIN_INTERACT_PROCS(/obj/machinery/power/apc, proc/toggle_operating, proc/zapSt
if (1)
boutput(user, SPAN_ALERT("You must repair the autotransformer's windings prior to tuning it."))
if (2)
boutput(user, "You begin to carefully tune the autotransformer. This might take a little while.")
SETUP_GENERIC_ACTIONBAR(user, src, 6 SECONDS, /obj/machinery/power/apc/proc/fix_autotransformer,\
boutput(user, "You begin to carefully tune the autotransformer.")
SETUP_GENERIC_ACTIONBAR(user, src, 2 SECONDS, /obj/machinery/power/apc/proc/fix_autotransformer,\
list(user), W.icon, W.icon_state, null, null)
else
boutput(user, "The autotransformer is already tuned.")
Expand Down Expand Up @@ -1655,3 +1640,18 @@ ADMIN_INTERACT_PROCS(/obj/machinery/power/apc, proc/toggle_operating, proc/zapSt
. = ..()
if(Obj == src.cell)
src.cell = null

/obj/machinery/power/apc/get_help_message(dist, mob/user)
if (!(src.status & BROKEN))
return null
switch(repair_status)
if(0)
. += "It's completely busted! It seems you need to use a <b>screwdriver</b> and disconnect the control board first, to begin the repair process."
if(1)
. += "The control board has been disconnected. The autotransformer's wiring is all messed up! You need to grab some cables and fix it."
if(2)
. += "The control panel is disconnected and the autotransformer seems to be in a good condition. You just need to tune it with a <b>wrench</b> now."
if(3)
. += "The autotransformer seems to be working fine now. The next step is resetting the control board with a <b>multitool</b>."
if(4)
. += "<br>The autotransformer is working fine and the control board has been reset! Now you just need to reconnect it with a <b>screwdriver</b>, to finish the repair process.</br>"
4 changes: 3 additions & 1 deletion strings/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

(t)tue dec 24 24
(u)LeahTheTech
(+)APC repair actions are now quicker and use help messages.
(t)mon dec 23 24
(u)FlameArrow57
(p)21264
Expand Down

0 comments on commit 7f6a1da

Please sign in to comment.