diff --git a/Content.Shared/Alert/AlertsSystem.cs b/Content.Shared/Alert/AlertsSystem.cs index e2a2924630..8f780af46e 100644 --- a/Content.Shared/Alert/AlertsSystem.cs +++ b/Content.Shared/Alert/AlertsSystem.cs @@ -19,7 +19,7 @@ public abstract class AlertsSystem : EntitySystem public short GetSeverityRange(AlertType alertType) { var minSeverity = _typeToAlert[alertType].MinSeverity; - return (short)MathF.Min(minSeverity,_typeToAlert[alertType].MaxSeverity - minSeverity); + return (short)MathF.Max(minSeverity,_typeToAlert[alertType].MaxSeverity - minSeverity); } public short GetMaxSeverity(AlertType alertType) diff --git a/Content.Shared/Mobs/Systems/MobThresholdSystem.cs b/Content.Shared/Mobs/Systems/MobThresholdSystem.cs index 68583f5b81..c84fd097d9 100644 --- a/Content.Shared/Mobs/Systems/MobThresholdSystem.cs +++ b/Content.Shared/Mobs/Systems/MobThresholdSystem.cs @@ -301,8 +301,6 @@ public sealed class MobThresholdSystem : EntitySystem var severity = _alerts.GetMinSeverity(AlertType.HumanHealth); if (TryGetIncapPercentage(target, damageable.TotalDamage, out var percentage)) { - - severity = (short) MathF.Floor(percentage.Value.Float() * _alerts.GetSeverityRange(AlertType.HumanHealth)); severity += _alerts.GetMinSeverity(AlertType.HumanHealth); diff --git a/Resources/Prototypes/Alerts/alerts.yml b/Resources/Prototypes/Alerts/alerts.yml index 218a583241..4a96d7a257 100644 --- a/Resources/Prototypes/Alerts/alerts.yml +++ b/Resources/Prototypes/Alerts/alerts.yml @@ -142,8 +142,8 @@ id: HumanCrit category: Health icons: - - sprite: /Textures/Interface/Alerts/human_health.rsi - state: health6 + - sprite: /Textures/Interface/Alerts/human_critical.rsi + state: critical name: alerts-crit-name description: alerts-crit-desc @@ -151,8 +151,8 @@ id: HumanDead category: Health icons: - - sprite: /Textures/Interface/Alerts/human_health.rsi - state: health7 + - sprite: /Textures/Interface/Alerts/human_dead.rsi + state: dead name: alerts-dead-name description: alerts-dead-desc @@ -160,26 +160,20 @@ id: HumanHealth category: Health icons: - - sprite: /Textures/Interface/Alerts/human_health.rsi + - sprite: /Textures/Interface/Alerts/human_alive.rsi state: health0 - - sprite: /Textures/Interface/Alerts/human_health.rsi + - sprite: /Textures/Interface/Alerts/human_alive.rsi state: health1 - - sprite: /Textures/Interface/Alerts/human_health.rsi + - sprite: /Textures/Interface/Alerts/human_alive.rsi state: health2 - - sprite: /Textures/Interface/Alerts/human_health.rsi + - sprite: /Textures/Interface/Alerts/human_alive.rsi state: health3 - - sprite: /Textures/Interface/Alerts/human_health.rsi + - sprite: /Textures/Interface/Alerts/human_alive.rsi state: health4 - - sprite: /Textures/Interface/Alerts/human_health.rsi - state: health5 - - sprite: /Textures/Interface/Alerts/human_health.rsi - state: health6 - - sprite: /Textures/Interface/Alerts/human_health.rsi - state: health7 name: alerts-health-name description: alerts-health-desc - minSeverity: 1 - maxSeverity: 6 + minSeverity: 0 + maxSeverity: 4 - type: alert id: Internals diff --git a/Resources/Textures/Interface/Alerts/human_health.rsi/health1.png b/Resources/Textures/Interface/Alerts/human_alive.rsi/health0.png similarity index 100% rename from Resources/Textures/Interface/Alerts/human_health.rsi/health1.png rename to Resources/Textures/Interface/Alerts/human_alive.rsi/health0.png diff --git a/Resources/Textures/Interface/Alerts/human_health.rsi/health2.png b/Resources/Textures/Interface/Alerts/human_alive.rsi/health1.png similarity index 100% rename from Resources/Textures/Interface/Alerts/human_health.rsi/health2.png rename to Resources/Textures/Interface/Alerts/human_alive.rsi/health1.png diff --git a/Resources/Textures/Interface/Alerts/human_health.rsi/health3.png b/Resources/Textures/Interface/Alerts/human_alive.rsi/health2.png similarity index 100% rename from Resources/Textures/Interface/Alerts/human_health.rsi/health3.png rename to Resources/Textures/Interface/Alerts/human_alive.rsi/health2.png diff --git a/Resources/Textures/Interface/Alerts/human_health.rsi/health4.png b/Resources/Textures/Interface/Alerts/human_alive.rsi/health3.png similarity index 100% rename from Resources/Textures/Interface/Alerts/human_health.rsi/health4.png rename to Resources/Textures/Interface/Alerts/human_alive.rsi/health3.png diff --git a/Resources/Textures/Interface/Alerts/human_health.rsi/health5.png b/Resources/Textures/Interface/Alerts/human_alive.rsi/health4.png similarity index 100% rename from Resources/Textures/Interface/Alerts/human_health.rsi/health5.png rename to Resources/Textures/Interface/Alerts/human_alive.rsi/health4.png diff --git a/Resources/Textures/Interface/Alerts/human_health.rsi/meta.json b/Resources/Textures/Interface/Alerts/human_alive.rsi/meta.json similarity index 64% rename from Resources/Textures/Interface/Alerts/human_health.rsi/meta.json rename to Resources/Textures/Interface/Alerts/human_alive.rsi/meta.json index 4a0b50c61d..3c954ddfdc 100644 --- a/Resources/Textures/Interface/Alerts/human_health.rsi/meta.json +++ b/Resources/Textures/Interface/Alerts/human_alive.rsi/meta.json @@ -181,111 +181,6 @@ 0.05 ] ] - }, - { - "name": "health5", - "delays": [ - [ - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05 - ] - ] - }, - { - "name": "health6", - "delays": [ - [ - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05, - 0.05 - ] - ] - }, - { - "name": "health7", - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] } ] -} \ No newline at end of file +} diff --git a/Resources/Textures/Interface/Alerts/human_health.rsi/health6.png b/Resources/Textures/Interface/Alerts/human_critical.rsi/critical.png similarity index 100% rename from Resources/Textures/Interface/Alerts/human_health.rsi/health6.png rename to Resources/Textures/Interface/Alerts/human_critical.rsi/critical.png diff --git a/Resources/Textures/Interface/Alerts/human_critical.rsi/meta.json b/Resources/Textures/Interface/Alerts/human_critical.rsi/meta.json new file mode 100644 index 0000000000..3cd822ca20 --- /dev/null +++ b/Resources/Textures/Interface/Alerts/human_critical.rsi/meta.json @@ -0,0 +1,46 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "https://github.com/tgstation/tgstation/commits/50689f89a40e5e7a2732a0c5fb38c787b69f7d28/icons/hud/screen_gen.dmi", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "critical", + "delays": [ + [ + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05, + 0.05 + ] + ] + } + ] +} diff --git a/Resources/Textures/Interface/Alerts/human_health.rsi/health7.png b/Resources/Textures/Interface/Alerts/human_dead.rsi/dead.png similarity index 100% rename from Resources/Textures/Interface/Alerts/human_health.rsi/health7.png rename to Resources/Textures/Interface/Alerts/human_dead.rsi/dead.png diff --git a/Resources/Textures/Interface/Alerts/human_dead.rsi/meta.json b/Resources/Textures/Interface/Alerts/human_dead.rsi/meta.json new file mode 100644 index 0000000000..a2fbd00aa1 --- /dev/null +++ b/Resources/Textures/Interface/Alerts/human_dead.rsi/meta.json @@ -0,0 +1,46 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "https://github.com/tgstation/tgstation/commits/50689f89a40e5e7a2732a0c5fb38c787b69f7d28/icons/hud/screen_gen.dmi", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "dead", + "delays": [ + [ + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1, + 0.1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Interface/Alerts/human_health.rsi/health0.png b/Resources/Textures/Interface/Alerts/human_health.rsi/health0.png deleted file mode 100644 index 00b1893f17..0000000000 Binary files a/Resources/Textures/Interface/Alerts/human_health.rsi/health0.png and /dev/null differ