Add health bar overlays for eye equipment (#21980)

* PR 1

* fix an error with health bar overlay (#1292)

* Revert "Revert "Replace `ResourcePath` with `ResPath` (#15308)" (#155… (#15566)

* [1612] change ShowHealthBarsComponent's DamageContainer field to a list (#1662)

* fix build

* no crit entities from not updating

* cleanup

* namespace

* undu irrelevant changes

* undo icon change

* make health bar 1 px taller and icon 1 px shorter

* fix medibot

* fix comment

* don't show health bar ratio when in crit

* fix build

* put the crit bar back

* don't render healthbars for mobs that are in containers

* draw more boxes without the background sprite

* fine status icon for all bio mobs

* add wacky mandatory things

* attempt 2

* whoops wrong file

* cool, this works too

* move null check to top

* only 1 init

* security huds

* remove shader

* fix build after cleanup

* slight cleanup

* little more cleanup

* Remove clothing grant component system

* security HUD now shows a job icon on entities with a body

* remove sec stuff and do similar changes to split off PR + remove unused comp

* process comments

* don't return

* update to ComponentAddedOverlaySystemBase

* no cache

* colors and not rendering out of sight

* touch ups

* fix build & cleanup

* undo

* remove shader from icons

* process comments

* documentation

* fix licence

* validate prototype id

* just use args

* rename method and append in method

* type

* just fucken delete the command

* space

* undo

* remove

* don't use LocalPlayer

* re-add showhealthbars command, but working

* rename icon lists and conform health icon code to the others

* space

* undo

* update command

* oops

---------

Co-authored-by: Rane <60792108+Elijahrane@users.noreply.github.com>
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
PrPleGoo
2024-01-04 17:48:57 +01:00
committed by GitHub
parent a9b797a091
commit eed663e8b4
27 changed files with 468 additions and 361 deletions

View File

@@ -0,0 +1,6 @@
cmd-showhealthbars-desc = Toggles health bars above mobs.
cmd-showhealthbars-help = Usage: {$command} [<DamageContainerId>]
cmd-showhealthbars-error-not-player = You aren't a player.
cmd-showhealthbars-error-no-entity = You do not have an attached entity.
cmd-showhealthbars-notify-enabled = Enabled health overlay for DamageContainers: {$args}.
cmd-showhealthbars-notify-disabled = Disabled health overlay.

View File

@@ -1,3 +0,0 @@
cmd-togglehealthoverlay-desc = Toggles a health bar above mobs.
cmd-togglehealthoverlay-help = Usage: {$command}
cmd-togglehealthoverlay-notify = Health overlay system {$state}.

View File

@@ -8,6 +8,9 @@
sprite: Clothing/Eyes/Hud/diag.rsi
- type: Clothing
sprite: Clothing/Eyes/Hud/diag.rsi
- type: ShowHealthBars
damageContainers:
- Inorganic
- type: entity
parent: ClothingEyesBase
@@ -19,6 +22,12 @@
sprite: Clothing/Eyes/Hud/med.rsi
- type: Clothing
sprite: Clothing/Eyes/Hud/med.rsi
- type: ShowHealthBars
damageContainers:
- Biological
- type: ShowHealthIcons
damageContainers:
- Biological
- type: entity
parent: ClothingEyesBase
@@ -94,6 +103,12 @@
sprite: Clothing/Eyes/Hud/medonion.rsi
- type: Clothing
sprite: Clothing/Eyes/Hud/medonion.rsi
- type: ShowHealthBars
damageContainers:
- Biological
- type: ShowHealthIcons
damageContainers:
- Biological
- type: ShowHungerIcons
- type: entity
@@ -106,6 +121,12 @@
sprite: Clothing/Eyes/Hud/medonionbeer.rsi
- type: Clothing
sprite: Clothing/Eyes/Hud/medonionbeer.rsi
- type: ShowHealthBars
damageContainers:
- Biological
- type: ShowHealthIcons
damageContainers:
- Biological
- type: ShowHungerIcons
- type: ShowThirstIcons
@@ -132,6 +153,13 @@
- type: Clothing
sprite: Clothing/Eyes/Hud/medsecengi.rsi
- type: ShowSecurityIcons
- type: ShowHealthBars
damageContainers:
- Biological
- Inorganic
- type: ShowHealthIcons
damageContainers:
- Biological
- type: ShowSyndicateIcons
- type: entity
@@ -145,6 +173,13 @@
- type: Clothing
sprite: Clothing/Eyes/Hud/omni.rsi
- type: ShowSecurityIcons
- type: ShowHealthBars
damageContainers:
- Biological
- Inorganic
- type: ShowHealthIcons
damageContainers:
- Biological
- type: ShowHungerIcons
- type: ShowThirstIcons
- type: ShowSyndicateIcons

View File

@@ -349,7 +349,13 @@
interactFailureString: petting-failure-medibot
interactSuccessSound:
path: /Audio/Ambience/Objects/periodic_beep.ogg
- type: ShowHealthBars
damageContainers:
- Biological
- type: ShowHealthIcons
damageContainers:
- Biological
- type: entity
parent: MobSiliconBase
id: MobMimeBot

View File

@@ -0,0 +1,7 @@
- type: statusIcon
id: HealthIconFine
priority: 1
icon:
sprite: Interface/Misc/health_icons.rsi
state: Fine
locationPreference: Right

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1,14 +0,0 @@
{
"version": 1,
"size": {
"y": 7,
"x": 24
},
"license": "CC-BY-SA-3.0",
"copyright": "https://github.com/tgstation/tgstation/blob/886ca0f8dddf83ecaf10c92ff106172722352192/icons/effects/progessbar.dmi",
"states": [
{
"name": "icon"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,14 @@
{
"version": 1,
"size": {
"x": 8,
"y": 8
},
"license": "CC-BY-SA-3.0",
"copyright": "https://github.com/tgstation/tgstation/blob/master/icons/mob/huds/hud.dmi",
"states": [
{
"name": "Fine"
}
]
}