Skip to content

Commit

Permalink
You can see and fix short circuits in mechs again (tgstation#72866)
Browse files Browse the repository at this point in the history
## About The Pull Request

Mechs had the ability to short circuit, but lacked the logic to display
and repair that.
Resolves tgstation#72835
## Why It's Good For The Game
## Changelog
:cl:
fix: NanoTrasen Engineering has identified and resolved an issue with
MechOS that prevented diagnostics for internal shorting
/:cl:

Signed-off-by: GitHub <noreply@github.com>
  • Loading branch information
ZephyrTFA committed Jan 23, 2023
1 parent b819011 commit ae26e9f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/_globalvars/bitfields.dm
Expand Up @@ -228,6 +228,7 @@ DEFINE_BITFIELD(internal_damage, list(
"MECHA_INT_TEMP_CONTROL" = MECHA_INT_TEMP_CONTROL,
"MECHA_INT_TANK_BREACH" = MECHA_INT_TANK_BREACH,
"MECHA_INT_CONTROL_LOST" = MECHA_INT_CONTROL_LOST,
"MECHA_INT_SHORT_CIRCUIT" = MECHA_INT_SHORT_CIRCUIT,
))

DEFINE_BITFIELD(mecha_flags, list(
Expand Down
8 changes: 8 additions & 0 deletions code/modules/vehicles/mecha/mecha_damage.dm
Expand Up @@ -56,6 +56,8 @@
return "activating tank sealant..."
if(MECHA_INT_CONTROL_LOST)
return "recalibrating coordination system..."
if(MECHA_INT_SHORT_CIRCUIT)
return "flushing internal capacitor..."

///gets the successful finish balloon alert flufftext
/obj/vehicle/sealed/mecha/proc/get_int_repair_fluff_end(flag)
Expand All @@ -68,6 +70,8 @@
return "air tank sealed"
if(MECHA_INT_CONTROL_LOST)
return "coordination re-established"
if(MECHA_INT_SHORT_CIRCUIT)
return "internal capacitor reset"

///gets the on-fail balloon alert flufftext
/obj/vehicle/sealed/mecha/proc/get_int_repair_fluff_fail(flag)
Expand All @@ -80,6 +84,8 @@
return "sealant deactivated"
if(MECHA_INT_CONTROL_LOST)
return "recalibration failed"
if(MECHA_INT_SHORT_CIRCUIT)
return "capacitor flush failure"

/obj/vehicle/sealed/mecha/proc/set_internal_damage(int_dam_flag)
internal_damage |= int_dam_flag
Expand All @@ -96,5 +102,7 @@
to_chat(occupants, "[icon2html(src, occupants)][span_boldnotice("Internal fire extinguished.")]")
if(MECHA_INT_TANK_BREACH)
to_chat(occupants, "[icon2html(src, occupants)][span_boldnotice("Damaged internal tank has been sealed.")]")
if(MECHA_INT_SHORT_CIRCUIT)
to_chat(occupants, "[icon2html(src, occupants)][span_boldnotice("Internal capacitor has been reset successfully.")]")
internal_damage &= ~int_dam_flag
diag_hud_set_mechstat()
1 change: 1 addition & 0 deletions code/modules/vehicles/mecha/mecha_ui.dm
Expand Up @@ -42,6 +42,7 @@
"MECHA_INT_TEMP_CONTROL" = MECHA_INT_TEMP_CONTROL,
"MECHA_INT_TANK_BREACH" = MECHA_INT_TANK_BREACH,
"MECHA_INT_CONTROL_LOST" = MECHA_INT_CONTROL_LOST,
"MECHA_INT_SHORT_CIRCUIT" = MECHA_INT_SHORT_CIRCUIT,
)
data["mech_electronics"] = list(
"minfreq" = MIN_FREE_FREQ,
Expand Down

0 comments on commit ae26e9f

Please sign in to comment.