Add alert for low oxygen.
@@ -5,7 +5,9 @@ using System.Linq;
|
|||||||
using Content.Server.Atmos;
|
using Content.Server.Atmos;
|
||||||
using Content.Server.GameObjects.Components.Body.Behavior;
|
using Content.Server.GameObjects.Components.Body.Behavior;
|
||||||
using Content.Server.GameObjects.Components.Body.Circulatory;
|
using Content.Server.GameObjects.Components.Body.Circulatory;
|
||||||
|
using Content.Server.GameObjects.Components.Mobs;
|
||||||
using Content.Server.GameObjects.Components.Temperature;
|
using Content.Server.GameObjects.Components.Temperature;
|
||||||
|
using Content.Shared.Alert;
|
||||||
using Content.Shared.Atmos;
|
using Content.Shared.Atmos;
|
||||||
using Content.Shared.Chemistry;
|
using Content.Shared.Chemistry;
|
||||||
using Content.Shared.Damage;
|
using Content.Shared.Damage;
|
||||||
@@ -389,6 +391,11 @@ namespace Content.Server.GameObjects.Components.Metabolism
|
|||||||
{
|
{
|
||||||
Suffocating = true;
|
Suffocating = true;
|
||||||
|
|
||||||
|
if (Owner.TryGetComponent(out ServerAlertsComponent? alertsComponent))
|
||||||
|
{
|
||||||
|
alertsComponent.ShowAlert(AlertType.LowOxygen);
|
||||||
|
}
|
||||||
|
|
||||||
if (!Owner.TryGetComponent(out IDamageableComponent? damageable))
|
if (!Owner.TryGetComponent(out IDamageableComponent? damageable))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -400,6 +407,11 @@ namespace Content.Server.GameObjects.Components.Metabolism
|
|||||||
private void StopSuffocation()
|
private void StopSuffocation()
|
||||||
{
|
{
|
||||||
Suffocating = false;
|
Suffocating = false;
|
||||||
|
|
||||||
|
if (Owner.TryGetComponent(out ServerAlertsComponent? alertsComponent))
|
||||||
|
{
|
||||||
|
alertsComponent.ClearAlert(AlertType.LowOxygen);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public GasMixture Clean(BloodstreamComponent bloodstream)
|
public GasMixture Clean(BloodstreamComponent bloodstream)
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
{
|
{
|
||||||
Pressure,
|
Pressure,
|
||||||
Temperature,
|
Temperature,
|
||||||
|
Breathing,
|
||||||
Buckled,
|
Buckled,
|
||||||
Health,
|
Health,
|
||||||
Piloting,
|
Piloting,
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
public enum AlertType : byte
|
public enum AlertType : byte
|
||||||
{
|
{
|
||||||
Error,
|
Error,
|
||||||
|
LowOxygen,
|
||||||
LowPressure,
|
LowPressure,
|
||||||
HighPressure,
|
HighPressure,
|
||||||
Fire,
|
Fire,
|
||||||
|
|||||||
@@ -10,12 +10,20 @@
|
|||||||
- alertType: Pulling
|
- alertType: Pulling
|
||||||
- category: Piloting
|
- category: Piloting
|
||||||
- alertType: Stun
|
- alertType: Stun
|
||||||
|
- category: Breathing # Vox gang not calling this oxygen
|
||||||
- category: Pressure
|
- category: Pressure
|
||||||
- category: Temperature
|
- category: Temperature
|
||||||
- category: Hunger
|
- category: Hunger
|
||||||
- category: Thirst
|
- category: Thirst
|
||||||
|
|
||||||
|
- type: alert
|
||||||
|
alertType: LowOxygen
|
||||||
|
category: Breathing
|
||||||
|
icon:
|
||||||
|
sprite: /Textures/Interface/Alerts/breathing.rsi
|
||||||
|
state: not_enough_oxy
|
||||||
|
name: "[color=red]Low Oxygen[/color]"
|
||||||
|
description: "There is not [color=red]not enough oxygen[/color] in the air you are breathing. Put on [color=green]internals[/color]."
|
||||||
|
|
||||||
- type: alert
|
- type: alert
|
||||||
alertType: LowPressure
|
alertType: LowPressure
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA 3.0", "copyright": "https://github.com/tgstation/tgstation/blob/2f18e6232ce5897554351194082469a043c5ab06/icons/hud/screen_alert.dmi", "states": [{"name": "not_enough_co2", "directions": 1, "delays": [[0.5, 0.5]]}, {"name": "not_enough_nitro", "directions": 1, "delays": [[0.5, 0.5]]}, {"name": "not_enough_oxy", "directions": 1, "delays": [[0.5, 0.5]]}, {"name": "not_enough_tox", "directions": 1, "delays": [[0.5, 0.5]]}, {"name": "too_much_co2", "directions": 1, "delays": [[0.5, 0.5]]}, {"name": "too_much_nitro", "directions": 1, "delays": [[0.5, 0.5]]}, {"name": "too_much_oxy", "directions": 1, "delays": [[0.5, 0.5]]}, {"name": "too_much_tox", "directions": 1, "delays": [[0.5, 0.5]]}]}
|
||||||
|
After Width: | Height: | Size: 430 B |
|
After Width: | Height: | Size: 402 B |
|
After Width: | Height: | Size: 395 B |
|
After Width: | Height: | Size: 568 B |
|
After Width: | Height: | Size: 428 B |
|
After Width: | Height: | Size: 388 B |
|
After Width: | Height: | Size: 392 B |
|
After Width: | Height: | Size: 542 B |