Skip to content

Commit

Permalink
adds a cool hud with low power light
Browse files Browse the repository at this point in the history
  • Loading branch information
Paxilmaniac committed Dec 11, 2024
1 parent 3958c3a commit 05371b3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/// 1 tile down
#define UI_ENERGY_DISPLAY "WEST:6,CENTER-1:0"
#define UI_ENERGY_DISPLAY "WEST:0,CENTER-1:0"

///Maptext define for Hemophage HUDs
#define FORMAT_ANDROID_HUD_TEXT(valuecolor, value) MAPTEXT("<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font color='[valuecolor]'>[round((value/1000000), 0.01)]MJ</font></div>")
Expand All @@ -11,9 +11,14 @@
name = "Energy Tracker"
icon_state = "energy_display"
screen_loc = UI_ENERGY_DISPLAY
maptext_width = 48

/atom/movable/screen/android/energy/proc/update_energy_hud(core_energy)
maptext = FORMAT_ANDROID_HUD_TEXT(hud_text_color(core_energy), core_energy)
if(core_energy <= 1.5 MEGA JOULES)
icon_state = "energy_display_low"
else
icon_state = "energy_display"

/atom/movable/screen/android/energy/proc/hud_text_color(core_energy)
return core_energy > 1.5 MEGA JOULES ? "#ffffff" : "#b64b4b"
Expand Down
Binary file not shown.

0 comments on commit 05371b3

Please sign in to comment.