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

Make the escort list show ship names as well as callsigns. #5523

Merged

Conversation

MageKing17
Copy link
Member

In #5477, I made the escort list respect hidden names by copying the behavior from message_queue_process(), which already checked those flags; however, this resulted in some dramatic behavioral changes for mods using callsigns for escort ships, so making the "replace ship name with callsign" part of the code optional, and disabled by default, should result in minimal changes for existing mods while still fixing the bug of the escort list not hiding ship names properly, and still allowing mods to show callsigns in the escort list if they do want that.

Tagging this as "regression" because it's not strictly a bug, but affects backwards-compatibility nonetheless. Making this a draft because I don't want to change this again without some proper feedback along the lines of: should it append the callsign instead, like the target window? Should there be more than just two options (like, say, $Escort callsign behavior: NEVER)? @Goober5000 made this suggestion on Discord, but it would be significantly more involved to implement:

How about some game_settings.tbl options allowing the modder to specify formats for the target view, the messages, and the escort list? The format could use tags like $name and $callsign, and that way modders could configure displaying ship name, callsign, either, or both; and with whatever parentheses or special characters they want

Further questions about this concept: would each instance of ship names being shown have three options, one for if a callsign is set, one for if the name is hidden, and one for if neither of the above is true? Or would there be some sort of conditional syntax to make things be/not be shown based on some other thing? You have to do something more, because otherwise $name ($callsign) would result in empty parentheses for ships without callsigns.

@MageKing17 MageKing17 added enhancement A new feature or upgrade of an existing feature to add additional functionality. regression A bug introduced by a new feature that breaks something which used to work. discussion This issue has (or wants) a discussion labels Jul 28, 2023
TRBlount
TRBlount previously approved these changes Aug 6, 2023
Copy link
Contributor

@Goober5000 Goober5000 left a comment

Choose a reason for hiding this comment

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

The game_settings.tbl options would provide the most flexibility, but as a solution to the current issue, I think using the same behavior as the target box would work. This would display "Shipname" for ships without a callsign, and "Shipname (Callsign)" for ships with one. This solution preserves seeing the ship name in all cases, while also satisfying the needs of multiplayer.

@TRBlount
Copy link
Contributor

I share the same opinion as Goober. It would be consistent with other feature(s) in the code at a bare minimum.

In scp-fs2open#5477, I made the escort list respect hidden names by copying the behavior from `message_queue_process()`, which already checked those flags; however, this resulted in some dramatic behavioral changes for mods using callsigns for escort ships, and while making the behavior optional was a possibility, feedback suggested everyone would rather it just behaved like the target box and displayed both. So I replaced the code with similar logic from hudtargetbox.cpp, except with the "replace hidden name with ship class" code taking priority.
@MageKing17 MageKing17 dismissed TRBlount’s stale review September 25, 2023 21:40

Code is no longer the same as reviewed.

@MageKing17 MageKing17 marked this pull request as ready for review September 25, 2023 21:40
@MageKing17 MageKing17 added this to the Release 23.2 milestone Sep 25, 2023
@MageKing17
Copy link
Member Author

I've changed the code to (mostly) match the target box behavior.

@MageKing17 MageKing17 changed the title Make the escort list not show (non-player) callsigns by default. Make the escort list show ship names as well as callsigns. Sep 25, 2023
Copy link
Contributor

@Goober5000 Goober5000 left a comment

Choose a reason for hiding this comment

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

Looks good.

@MageKing17 MageKing17 merged commit 305a7f6 into scp-fs2open:master Sep 26, 2023
14 checks passed
@MageKing17 MageKing17 deleted the cleanup/escort-callsign-option branch September 26, 2023 23:33
Goober5000 added a commit to Goober5000/fs2open.github.com that referenced this pull request Apr 18, 2024
As a follow-up to scp-fs2open#5523, some mods use callsigns for their ships but prefer not to display the callsigns in the escort list.  In lieu of a more flexible way to configure escort lists, a simple flag is sufficient to implement the desired behavior.
@Goober5000 Goober5000 added the HUD A feature or issue related to the HUD label Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion This issue has (or wants) a discussion enhancement A new feature or upgrade of an existing feature to add additional functionality. HUD A feature or issue related to the HUD regression A bug introduced by a new feature that breaks something which used to work.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants