Skip to content

Commit

Permalink
Merge pull request TS-Rogue-Star#485 from Poojawa/smes-maintenence-panel
Browse files Browse the repository at this point in the history
Enables maintenance hatch sprites for SMES units
  • Loading branch information
lm40 authored Aug 5, 2024
2 parents bcb92cb + 69fa28c commit 5057f85
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 22 deletions.
11 changes: 9 additions & 2 deletions code/modules/power/smes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,14 @@ GLOBAL_LIST_EMPTY(smeses)

/obj/machinery/power/smes/update_icon()
cut_overlays()
if(stat & BROKEN) return
icon_state = "smes" //more sanity than anything else.

if(stat & BROKEN)
icon_state = "smes-off" //for the "hybrid"/fancy SMES units mostly since they have a working screen animation
return
if(panel_open)
icon_state = "smes-o"
return //effectively off, but visually update.

add_overlay("smes-op[outputting]")

Expand Down Expand Up @@ -511,4 +518,4 @@ GLOBAL_LIST_EMPTY(smeses)
// Description: Sets output setting on this SMES. Trims it if limits are exceeded.
/obj/machinery/power/smes/proc/set_output(var/new_output = 0)
output_level = between(0, new_output, output_level_max)
update_icon()
update_icon()
21 changes: 1 addition & 20 deletions code/modules/power/smes_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,8 @@
to_chat(user,"<span class='warning'>\The [src] full of weird alien technology that's best not messed with.</span>")
return 0

/obj/machinery/power/smes/buildable/hybrid/update_icon()
cut_overlays()
if(stat & BROKEN) return

add_overlay("smes-op[outputting]")

if(inputting == 2)
add_overlay("smes-oc2")
else if (inputting == 1)
add_overlay("smes-oc1")
else
if(input_attempt)
add_overlay("smes-oc0")

var/clevel = chargedisplay()
if(clevel>0)
add_overlay("smes-og[clevel]")
return
//removed update icon process, due to redundant code.

/obj/machinery/power/smes/buildable/hybrid/process()
charge += min(recharge_rate, capacity - charge)
..()

//hey travis wake up
Binary file modified icons/obj/power.dmi
Binary file not shown.
Binary file modified icons/obj/power_vr.dmi
Binary file not shown.

0 comments on commit 5057f85

Please sign in to comment.