-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Crew Credits Antagonists Tab #16185
Crew Credits Antagonists Tab #16185
Conversation
Hell yeah! Looks great. |
43c32da
to
e8cfb63
Compare
<Flex | ||
inline | ||
align="center" | ||
key={index}> | ||
{!!item.icon && ( | ||
<Flex.Item> | ||
<Image | ||
height="32px" | ||
width="32px" | ||
pixelated | ||
src={`data:image/png;base64,${item.icon}`} | ||
/> | ||
</Flex.Item> | ||
)} | ||
<Flex.Item | ||
pr={1} | ||
pl={0.5}> | ||
{item.name} | ||
{`${index === arr.length - 1 ? '' : `, ${index === arr.length - 2 ? 'and ' : ''}`}`} | ||
</Flex.Item> | ||
</Flex> |
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.
Rather than setting pr
, pl
etc., does this work if you use a Stack
instead of Flex
? Unsure how that spacing would look here.
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.
I'm using Flex
so to avoid spacing other than where explicitly stated.
|
||
import { Flex, Image } from '..'; | ||
|
||
export const ItemList = (props: ItemListProps) => { |
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.
Broadly can't see much use for this yet outside of CrewCredits
. Probably put in there rather than in the common spot, and if someone wants it they can pull it out and change the import, it's just one line.
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.
I would rather have ItemList
be located in the common components list; in order to pull it out of the crew credits folder, and individual first has to know it is located there, whereas when in the common list, it is more visible to UI coders, and as a result is more likely to be used.
Thank you kindly for the UI review. |
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.
Overall looks great! Thanks for doing this, have some nitpicks:
@@ -26,6 +26,8 @@ datum/mind | |||
|
|||
/// A list of every antagonist datum that we have. | |||
var/list/datum/antagonist/antagonists = list() | |||
/// A list of every antagonist datum subordinate to this mind. | |||
var/list/datum/antagonist/subordinate/subordinate_antagonists = list() |
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.
Shouldn't this be stored on the antag datum, or are subordinate antags technically linked to the mind instead?
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.
Subordinate antagonists track their master's mind directly.
[UI] [QoL]
About The PR:
Implements an antagonists tab to the end of round crew credits, displaying details regarding each major antagonist of the round, including their antagonist roles; job; status; objectives; general statistics, such as purchased equipment or blood drank; and their subordinate antagonists.
Antagonists not considered major, such as subordinate antagonists, generic antagonists, or revolutionaries will be displayed under the "Other Antagonists" section. If a subordinate antagonist has a master, they will instead be listed under their master's data entry.
Additionally to better facilitate a tab oriented structure, the crew credits datum has been refactored.
Why Is This Needed?
Deprecates the old text window readout of antagonist statistics, and therefore fixes #15870.
Changelog: