-
Notifications
You must be signed in to change notification settings - Fork 380
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
Nanochat lookup #2794
base: master
Are you sure you want to change the base?
Nanochat lookup #2794
Conversation
82051df
to
22625a7
Compare
Content.Client/_DV/CartridgeLoader/Cartridges/NanoChatLookupUiFragment.xaml.cs
Outdated
Show resolved
Hide resolved
Content.Client/_DV/CartridgeLoader/Cartridges/NanoChatLookupUiFragment.xaml.cs
Outdated
Show resolved
Hide resolved
Content.Client/_DV/CartridgeLoader/Cartridges/NanoChatLookupUiFragment.xaml.cs
Outdated
Show resolved
Hide resolved
Content.Client/_DV/CartridgeLoader/Cartridges/NanoChatLookupUiFragment.xaml.cs
Outdated
Show resolved
Hide resolved
Personally, and this is just me, but I feel this would be better implemented as a tab in the nanochat app. Maybe have the ability to hide your ID to non command. But thats my opinion and this looks great anyways, xaml warrior o7 |
I did consider that, but didn't know how to match that with my thought that not everyone should have access to the Number lookup. (This whole thing was brought on by me playing Courier/Logi and being annoyed at people not responding on Common and me not knowing their PDA) |
I think everyone having access works fine if you can turn off your number for the general public, Imo |
This is true. |
Add it as a button in the Lookup app |
I think you could probably get away with just having it private by default and if people want to reveal their numbers they can. |
That'd end up causing the exact problem I'm trying to avoid, where people's NanoChat is inaccessible unless they share it first. |
I'll wait on popping this over to direction until it's finalized (should be a quick review anyways) |
Yea I'm reworking it to be a tab inside NanoChat instead of a separate cartridge as previously recommended, so I appreciate it :^) |
I've reworked the whole UX now, seems to work pretty nicely |
please do not have it automated by antag roles that will lead to people going through the manifest and seeing whos not there then arresting for being a thief |
var nameLabel = new Label() | ||
{ | ||
Text = contact.Name, | ||
HorizontalAlignment = HAlignment.Left, | ||
HorizontalExpand = true | ||
}; | ||
var numberLabel = new Label() | ||
{ | ||
Text = $"#{contacts[idx].Number:D4}", | ||
HorizontalAlignment = HAlignment.Right, | ||
Margin = new Thickness(0, 0, 36, 0), | ||
}; | ||
var startChatButton = new Button() | ||
{ | ||
Text = "+", | ||
HorizontalAlignment = HAlignment.Right, | ||
MinSize = new Vector2(32, 32), | ||
MaxSize = new Vector2(32, 32), | ||
ToolTip = Loc.GetString("nano-chat-new-chat"), | ||
}; | ||
startChatButton.AddStyleClass("OpenBoth"); | ||
if (contact.Number == _ownNumber || _recipients.ContainsKey(contact.Number)) | ||
{ | ||
startChatButton.Disabled = true; | ||
} | ||
startChatButton.OnPressed += _ => | ||
{ | ||
if (OnMessageSent is { } handler) | ||
{ | ||
handler(NanoChatUiMessageType.NewChat, contact.Number, contact.Name, contact.JobTitle); | ||
SelectChat(contact.Number); | ||
ToggleView(); | ||
} | ||
}; | ||
|
||
var panel = new PanelContainer() | ||
{ | ||
HorizontalExpand = true, | ||
}; | ||
|
||
panel.AddChild(nameLabel); | ||
panel.AddChild(numberLabel); | ||
panel.AddChild(startChatButton); |
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.
move this into a separate control using xaml
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.
Content.Server/_DV/CartridgeLoader/Cartridges/NanoChatCartridgeSystem.cs
Outdated
Show resolved
Hide resolved
Resources/Prototypes/Entities/Objects/Misc/identification_cards.yml
Outdated
Show resolved
Hide resolved
Resources/Textures/_DV/Interface/VerbIcons/magnifying_glass.svg.png
Outdated
Show resolved
Hide resolved
I was trying to only set it based on antags that shouldn't be on the station; I've got next to no experience actually interacting with syndies and the like, so I presumed all of the ones I tagged work like Nukies which aren't supposed to be on the station and presumably don't show up on the manifest. |
About the PR
Adds a NanoChat number lookup to the NanoChat UI, listing numbers of other crew, and a quick-add button for new chats.
NanoChat numbers are listed by default for most PDAs, currently excluding Syndicate, CentComm, ERT, and CBURN.
Also looking for input and feedback on my implementation as this is my first time properly prodding at the codebase, and I feel like things could still be significantly improved. Largely using this as excuse to learn how to work in SS14 code :^)
Why / Balance
NanoChat appears to go chronically underutilized, at least partially because it requires exchanging numbers beforehand. For one-off communications (think: Couriers or Logi orders), it's not feasible and/or sensible to talk just for exchanging numbers.
This lookup is intended to make initiating communication easier.
Technical details
Program requires working Telecomms server on the station, and only shows Numbers of people on this station, wearing IDs with names, and who are set to be listed.
New chats created through this menu do not include a profession.
The "New Chat" button is greyed out for your own number, and for chats you already have created.
Media
Note that
#0179
's listing is turned off, and thus is not listed on any of the other PDAs. This updates in real time.#1682
and#4124
have an open chat, their start chat buttons are thus greyed out on each other's list.Requirements
Breaking changes
Changelog
🆑