Skip to content

Add current ship callsign highlight to chat - #4805

Open
TheMikina wants to merge 2 commits into
new-frontiers-14:masterfrom
TheMikina:feature/ship-callsign-highlight
Open

Add current ship callsign highlight to chat#4805
TheMikina wants to merge 2 commits into
new-frontiers-14:masterfrom
TheMikina:feature/ship-callsign-highlight

Conversation

@TheMikina

Copy link
Copy Markdown

About the PR

The PR adds chat highlight for your current ShuttleName and ShuttleNamePrefix, based ShuttleDeed on your currently equipped ID.

Why / Balance

It was an idea discussed on Discord. I've had several cases where I missed someone wanting to interact with me, because they only mentioned my ship name prefix, since that is the readily available information on a mass scanner. A highlight would help with making sure you do not miss any message addressed to you.

It can be also useful for Traffic Control or people doing medical dispatches, and in general being able to notice that someone is trying to talk to you is a plus.

I also wanted something easy to finally get into the codebase.

Technical details

The code is based on the approach used by antag role highlights, implementation of which can be seen here.

I have borrowed the code from CryoSleepSystem for getting the player's current ID (which required adding ClientInventorySystem to the ChatUIController) and then looked up the ShipDeedComponent that it can have. The data on the ShipDeed are then used to highlight keywords when any message is received.

We're highlighting ship name (i.e Searchlight), ship suffix (XX-123) and the suffix number (123).

This is my first time working with the SS14 codebase, so it's possible that something is terribly wrong or there is a better way how to do it. I have no idea how performance heavy the per-message lookup of Inventory is, but this approach was chosen so we do not have to do a lot of handling for various ways how can a ship name change - to be able to cache the name, we would have to listen to renames, selling, ID switches and the like. Simply polling it was way easier, but if it's unacceptable from performance standpoint I can look into other options, I mainly wanted to get something out to get started with the SS14 codebase and start with contributing.

How to test

  • Start the server and connect
  • Go buy a ship and note it's name and suffix/callsign (XX-123)
  • Type either the name, the suffix, the three numbers, or both into chat and see that it's highlighted.
  • Drop your PDA or ID and send the message again, it should not be highlighted.
  • Sell the ship and buy a new one, it should start highlighting the new keyword.
  • Rename the ship, it should highlight the new keyword.

Media

image

Requirements

Breaking changes

Changelog

@github-actions github-actions Bot added S: Untriaged size/S S: Needs Review This PR is awaiting reviews C# and removed S: Needs Review This PR is awaiting reviews labels Aug 20, 2026
@Alkheemist

Copy link
Copy Markdown
Contributor

Thanks for your work on this and welcome to the ss14 development community

one thing to note, it looks like this is a frontier modification to a wizden file. Please see the procedure for marking changes in such files as specified in CONTRIBUTING.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants