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

Add overlays for eye equipment #17859

Closed

Conversation

PrPleGoo
Copy link
Contributor

@PrPleGoo PrPleGoo commented Jul 6, 2023

About the PR

Add overlays for eye equipment

Media
ezgif com-optimize (2)

  • I have added screenshots/videos to this PR showcasing its changes ingame

Changelog
🆑

  • add: added an overlay for the diagnostic hud that displays relative health for inorganics
  • add: added an overlay for the medical hud that displays relative health for biologicals

@PrPleGoo PrPleGoo requested a review from PaulRitter as a code owner July 6, 2023 18:39
@github-actions github-actions bot added Status: Needs Review This PR requires new reviews before it can be merged. Changes: Sprites Should be reviewed or fixed by people who are knowledgeable with spriting or visual design. Changes: UI Can be reviewed or fixed by people who are knowledgeable with UI design labels Jul 6, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2023

RSI Diff Bot; head commit 1ed5397 merging into 805a7c7
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Interface/Misc/health_bar.rsi

State Old New Status
icon Removed

Resources/Textures/Interface/Misc/health_icons.rsi

State Old New Status
Fine Added

Edit: diff updated after 1ed5397

@lzk228
Copy link
Contributor

lzk228 commented Jul 6, 2023

that icon looking bad, and what differences between #17807 ?

@Aisu9
Copy link

Aisu9 commented Jul 6, 2023

it's even harder to read the current health status than on the other PR

@PrPleGoo
Copy link
Contributor Author

PrPleGoo commented Jul 6, 2023

that icon looking bad

it's even harder to read the current health status than on the other PR

Thanks, I hate it too

what differences between #17807 ?

That one allows you to do this:
image

@EmoGarbage404
Copy link
Member

for the icon, have you considered just doing a super minimalist bar? not really having a large border around it at all? it might look a lot cleaner.

@lzk228
Copy link
Contributor

lzk228 commented Jul 6, 2023

icon should be previous, but health line maybe bolder

@PrPleGoo
Copy link
Contributor Author

PrPleGoo commented Jul 6, 2023

for the icon, have you considered just doing a super minimalist bar? not really having a large border around it at all? it might look a lot cleaner.

Nah I'm not going to step into the domain of aesthetics.

icon should be previous, but health line maybe bolder

What do you mean "bolder"?

@github-actions github-actions bot removed the Changes: Sprites Should be reviewed or fixed by people who are knowledgeable with spriting or visual design. label Jul 6, 2023
@PrPleGoo
Copy link
Contributor Author

PrPleGoo commented Jul 6, 2023

image
image

@PrPleGoo
Copy link
Contributor Author

PrPleGoo commented Jul 6, 2023

icon should be previous, but health line maybe bolder

This?
image

@github-actions github-actions bot added the Changes: Sprites Should be reviewed or fixed by people who are knowledgeable with spriting or visual design. label Jul 6, 2023
@lzk228
Copy link
Contributor

lzk228 commented Jul 6, 2023

yeah

@PrPleGoo
Copy link
Contributor Author

PrPleGoo commented Jul 6, 2023

yeah

I thought 3 px was a little much so I did 2 px. Removed the center px from the icon to make it fit.

@PrPleGoo
Copy link
Contributor Author

PrPleGoo commented Jul 6, 2023

(update gif in PR desc)

@github-actions github-actions bot added Status: Needs Review This PR requires new reviews before it can be merged. and removed Status: Awaiting Changes This PR needs its reviews addressed or changes to be made in order to be merged. labels Sep 5, 2023
@github-actions github-actions bot removed the Merge Conflict This PR currently has conflicts that need to be addressed. label Sep 5, 2023
@github-actions github-actions bot added the Merge Conflict This PR currently has conflicts that need to be addressed. label Sep 23, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the Merge Conflict This PR currently has conflicts that need to be addressed. label Sep 27, 2023
Comment on lines +17 to +49
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var player = _playerManager.LocalPlayer;
if (player == null)
{
shell.WriteLine("You aren't a player.");
return;
}

var playerEntity = player?.ControlledEntity;
if (playerEntity == null)
{
shell.WriteLine("You do not have an attached entity.");
return;
}

if (!_entityManager.HasComponent<ShowHealthBarsComponent>(playerEntity))
{
using var showHealthBarsComponent = _entityManager.AddComponentUninitialized<ShowHealthBarsComponent>(playerEntity.Value);
showHealthBarsComponent.Comp.DamageContainers = args.ToList();

shell.WriteLine($"Enabled health overlay for DamageContainers: {string.Join(", ", args)}.");
return;
}
else
{
_entityManager.RemoveComponentDeferred<ShowHealthBarsComponent>(playerEntity.Value);
shell.WriteLine("Disabled health overlay.");
}

return;
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs localisation please.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah, none of the other commands localize their shell output.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay well if you don't want to apply our code conventions to new code the pr can't be merged bud.

Comment on lines +35 to +39
using var showHealthBarsComponent = _entityManager.AddComponentUninitialized<ShowHealthBarsComponent>(playerEntity.Value);
showHealthBarsComponent.Comp.DamageContainers = args.ToList();

shell.WriteLine($"Enabled health overlay for DamageContainers: {string.Join(", ", args)}.");
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use the comp handles as they rely on directly calling component methods upon disposal and will be obsolete at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay but they're not now. Do you have an alternative?

Copy link
Contributor

@metalgearsloth metalgearsloth Oct 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use either a system or the other method for an uninitialized entity, or construct directly and add it.

Content.Client/Overlays/ShowHealthBarsSystem.cs Outdated Show resolved Hide resolved
Content.Client/Overlays/ShowHealthIconsSystem.cs Outdated Show resolved Hide resolved
@metalgearsloth metalgearsloth added Status: Awaiting Changes This PR needs its reviews addressed or changes to be made in order to be merged. and removed Status: Needs Review This PR requires new reviews before it can be merged. labels Sep 28, 2023
@github-actions github-actions bot added Status: Needs Review This PR requires new reviews before it can be merged. and removed Status: Awaiting Changes This PR needs its reviews addressed or changes to be made in order to be merged. labels Oct 4, 2023
@github-actions github-actions bot added the Merge Conflict This PR currently has conflicts that need to be addressed. label Oct 19, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@metalgearsloth metalgearsloth added Status: Stale This PR has been abandoned and will be closed within a week. Status: Awaiting Changes This PR needs its reviews addressed or changes to be made in order to be merged. and removed Status: Needs Review This PR requires new reviews before it can be merged. labels Oct 25, 2023
@CatMagic1
Copy link

Why is a health bar the only option? (I mean in terms of tweaking how the hud works). Why should someone else be able to glance at you and tell what your health is in greater detail than you can? It would work much better if the health was just displayed as a job icon-like visual that shows green, yellow, or red depending on your damage (maybe some kind of inner symbol for the icon so it isn't just a colored square). Health analyzers are for in-depth checkups and the hud should just be for quickly identifying people in need (more like the onion glasses and beer goggles).

@metalgearsloth metalgearsloth added Status: Derelict This PR appears to be abandoned but might contain something that can be salvaged. and removed Status: Stale This PR has been abandoned and will be closed within a week. labels Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: Sprites Should be reviewed or fixed by people who are knowledgeable with spriting or visual design. Changes: UI Can be reviewed or fixed by people who are knowledgeable with UI design Merge Conflict This PR currently has conflicts that need to be addressed. Status: Awaiting Changes This PR needs its reviews addressed or changes to be made in order to be merged. Status: Derelict This PR appears to be abandoned but might contain something that can be salvaged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.