Commit Graph

15 Commits

Author SHA1 Message Date
Tayrtahn
6f925dd610 Fix prototypes so they pass analyzer checks (#35435) 2025-02-24 15:21:59 +11:00
slarticodefast
e0d30aff4e Add tooltips to the agent ID job icons and improve status icon prototypes (#28575)
* add tooltips to agentid job icons

* forgot to stage this

* make StatusIconPrototype abstract

* minor visual improvements

* cleanup

* use currentculture to sort job names

* review
2024-08-09 16:14:07 +10:00
AJCM-git
8c10581010 Cleans up StatusIconSystem and fixing some bugs (#28270) 2024-06-03 12:12:21 -04:00
DrSmugleaf
5eae6335e1 Make remaining IPrototypes partial (#27157) 2024-04-20 17:48:38 +10:00
PrPleGoo
d314a41e4f Task/fix nightvision huds (#26726)
* StatusIcon: add field to set if icon should be rendered with shading

* set/unset shader based on icon field

* set new field to true for hud icons

* re-shade health bars
2024-04-05 01:05:01 +02:00
Golinth
21de5e9a08 Criminal Record Icons below Job Icons (#26203)
SS13 Criminal Record Icon Location REAL

Adds a new Offset DataField to the StatusIcon Prototype. It effects status icon location on a per-pixel level. Not sure what else it could be used for, but hey, nothing wrong with generalizing. Also moves the mindshield icon priority to one, to fix an unreported bug with them covering non-job icons.
2024-03-17 21:37:00 -04:00
Golinth
bced73f676 Kill Seperated Mindshield Icons (#25303)
* Unghettoify mindshield icons

Adds support for layers in status icons, through the StatusIconLayer enum and the new "layer" datafield. Defaults to the Base layer where functionally remains unchanged.

* TG icon for shield

probably better than the shitty one I made in paint

* forgor meta.json

I forgor

* Emo review

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>

---------

Co-authored-by: Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
2024-02-16 10:58:28 -05:00
nikthechampiongr
8b19b7fab9 Rev Components are no longer leaked + Rev and Zombie icon visibility to ghosts is now controlled by a cvar (#22194)
* Initial work on having the Rev icons not be visible to ghosts depending on a Cvar and a component.

This commit just makes it so that the revcomponent and headrev component
are not shared with clients that shouldn't know about them. This is due
to the concern that clients having access to those components, even if
no image was displayed could allow modified clients to have meta
knowledge of revs.

Currently this has the issue that if a player later
for example becomes a rev, none of the existing rev components get
networked to them. I am not sure there is currently an effecient
solution to this.

This is probably in an issue for a lot more stuff. I might just make it
so all the logic just moves to the client on whether to put the icon
again.

Also this commit adds the ShowRevIconsComponent to allow anyone with it to just
view rev icons.

* Rev components now get communicated to clients that didn't have them previously and the AntagIconSystem is now properly checking whether to give the icons.

We now dirty all the rev/headrev components when someone gets converted
or gets the ViewRevIcons component. The AntagIconSystem now checks
whether it should draw the icons mostly based on an event, this is still done
client side.

This is not a full proof solution to make it so clients can't know
someone is an antag when they shouldn't because:
1. There are other components that need similar treatment, to my
   knowledge not to for revs but for other antags. Maybe even the mind
   component. This could be addressed in future PRs.
2. We cannot ensure that clients forget about these components if the
   client gets deconverted for example. We can of course have code that
   does this, but it will necessarily need to be done on the client and
   if the client is modified then there is no way to ensure this.
   Of course at that point they should already know who their fellow
   revs are so this might not be an issue.

I now need to do the same thing for zombies in a future commit.
A similar system for nukies also needs to be looked at but I will not be
doing that in the PR this commit ends up in.

* Misc name changes and cleaning up the ZombieSystem

Changed some names around and decoupled the ZombieSystem from the
AntagStatusIconsystem. Now there is a cvar for ghost visibility for them
as well. The Zombie Component was not made SessionSpecific because:
1. Zombies are pretty visible anyways
2. The Component is needed to change the appearance of zombie players.

* Misc name changes and cleaning up the ZombieSystem

Changed some names around and decoupled the ZombieSystem from the
AntagStatusIconsystem. Now there is a cvar for ghost visibility for them
as well. The Zombie Component was not made SessionSpecific because:
1. Zombies are pretty visible anyways
2. The Component is needed to change the appearance of zombie players.

* Merged 2 if statements into 1 on the Zombiesystem.

* Cut down on code duplication in AntagStatusIconSystem

Now instead of having a seperate function for each component, there is 1 generic function. Functions for special cases
like the Rev/Headrev comp can have a separate function that does the special check and then calls the generic one.
This is done through the IAntagStatusIconComponent interface which provides a common interface to get the Icon.

* Removed some duplication from the SharedRevolutionarySystem with generics.

I have no idea why I didn't think of this sooner.

* Addressed Reviews I think

I think events get unsubbed automatically but I am probably missing something that I have not understood.
Either way this is a requested change.

* Replace war crimes with actual fixes for reviews

It was not clear to me what the reviews meant

* Addressed reviews by removing need for cvars.

Whether icons are visible to ghosts is now determined by a bool in IAntagStatusIcon which all antag components
with status icons should implement.

* Update Content.Shared/Revolutionary/SharedRevolutionarySystem.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-02-02 00:08:03 +11:00
DrSmugleaf
a88e747a0b Refactor serialization copying to use source generators (#19412) 2023-08-22 18:14:33 -07:00
PrPleGoo
e083b33aae security HUD now shows a job icon on entities with a body (#18054) 2023-08-02 07:17:03 +10:00
PrPleGoo
7c088ac1de Job icons are stored on ID cards (#18233) 2023-07-29 18:25:27 +10:00
Visne
ee4809a222 Revert "Hunger and thirst HUDs" (#18125) 2023-07-18 17:28:28 +02:00
PrPleGoo
67e4b626c1 Hunger and thirst HUDs (#18066)
* security HUD now shows a job icon on entities with a body

* thirst goggles

* set starting hud gear
2023-07-18 00:01:22 -06:00
Leon Friedrich
8143b9d87a Slight status icons performance improvement. (#18076) 2023-07-17 18:22:35 +10:00
Nemanja
044d5f6853 Status Icons (#17529) 2023-06-27 20:31:53 -04:00