-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Conversation
that icon looking bad, and what differences between #17807 ? |
it's even harder to read the current health status than on the other PR |
Thanks, I hate it too
|
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. |
icon should be previous, but health line maybe bolder |
Nah I'm not going to step into the domain of aesthetics.
What do you mean "bolder"? |
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. |
(update gif in PR desc) |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
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; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs localisation please.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
using var showHealthBarsComponent = _entityManager.AddComponentUninitialized<ShowHealthBarsComponent>(playerEntity.Value); | ||
showHealthBarsComponent.Comp.DamageContainers = args.ToList(); | ||
|
||
shell.WriteLine($"Enabled health overlay for DamageContainers: {string.Join(", ", args)}."); | ||
return; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
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). |
About the PR
Add overlays for eye equipment
Media
Changelog
🆑