Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks Much of Android Power #281

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// The starter amount for the android's core
#define ENERGY_START_AMT 5 MEGA JOULES
/// The amount at which mob energy decreases
#define ENERGY_DRAIN_AMT 5 KILO JOULES
#define ENERGY_DRAIN_AMT 2.5 KILO JOULES

/datum/species/android
name = "Android"
Expand Down Expand Up @@ -71,6 +71,8 @@
QDEL_NULL(energy_tracker)

/datum/species/android/spec_revival(mob/living/carbon/human/target)
if(core_energy < 0.5 MEGA JOULES)
core_energy += 0.5 MEGA JOULES
playsound(target.loc, 'sound/machines/chime.ogg', 50, TRUE)
target.visible_message(span_notice("[target]'s LEDs flicker to life!"), span_notice("All systems nominal. You're back online!"))

Expand All @@ -91,11 +93,6 @@
return
if(core_energy > 0)
core_energy -= ENERGY_DRAIN_AMT
// alerts
if(core_energy <= 0.75 MEGA JOULES)
if(prob(10))
target.balloon_alert_to_viewers("power low!")
playsound(target, 'sound/machines/beep/triple_beep.ogg', 50, FALSE)
// alerts end, death begins
if(core_energy <= 0)
target.death() // You can do a lot in a day.
Expand Down
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.
Loading