-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
181 changed files
with
3,192 additions
and
1,808 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ on: | |
|
||
permissions: | ||
pull-requests: write | ||
issues: write | ||
contents: write | ||
|
||
jobs: | ||
|
15 changes: 15 additions & 0 deletions
15
Content.Client/_DV/CartridgeLoader/Cartridges/NanoChatLookupView.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<cartridges:NanoChatLookupView | ||
xmlns="https://spacestation14.io" | ||
xmlns:cartridges="clr-namespace:Content.Client._DV.CartridgeLoader.Cartridges" | ||
HorizontalExpand="True" | ||
VerticalExpand="True" | ||
StyleClasses="AngleRect"> | ||
<ScrollContainer Margin="-10" | ||
VerticalExpand="True" | ||
HorizontalExpand="True"> | ||
<BoxContainer Name="ContactsList" | ||
Orientation="Vertical" | ||
VerticalExpand="True" | ||
HorizontalExpand="True" /> | ||
</ScrollContainer> | ||
</cartridges:NanoChatLookupView> |
73 changes: 73 additions & 0 deletions
73
Content.Client/_DV/CartridgeLoader/Cartridges/NanoChatLookupView.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
using System.Numerics; | ||
using Content.Shared._DV.CartridgeLoader.Cartridges; | ||
using Robust.Client.AutoGenerated; | ||
using Robust.Client.UserInterface.Controls; | ||
using Robust.Client.UserInterface.XAML; | ||
|
||
namespace Content.Client._DV.CartridgeLoader.Cartridges; | ||
|
||
[GenerateTypedNameReferences] | ||
public sealed partial class NanoChatLookupView : PanelContainer | ||
{ | ||
public NanoChatLookupView() | ||
{ | ||
RobustXamlLoader.Load(this); | ||
} | ||
|
||
public event Action<NanoChatRecipient>? OnStartChat; | ||
|
||
public void UpdateContactList(NanoChatUiState state) | ||
{ | ||
ContactsList.RemoveAllChildren(); | ||
if (state.Contacts is not { } contacts) | ||
{ | ||
ContactsList.AddChild(new Label() { Text = Loc.GetString("nano-chat-look-up-no-server") }); | ||
return; | ||
} | ||
|
||
for (var idx = 0; idx < contacts.Count; idx++) | ||
{ | ||
var contact = contacts[idx]; | ||
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 == state.OwnNumber || state.Recipients.ContainsKey(contact.Number) || state.MaxRecipients <= state.Recipients.Count) | ||
{ | ||
startChatButton.Disabled = true; | ||
} | ||
startChatButton.OnPressed += _ => OnStartChat?.Invoke(contact); | ||
|
||
var panel = new PanelContainer() | ||
{ | ||
HorizontalExpand = true, | ||
}; | ||
|
||
panel.AddChild(nameLabel); | ||
panel.AddChild(numberLabel); | ||
panel.AddChild(startChatButton); | ||
|
||
var styleClass = idx % 2 == 0 ? "PanelBackgroundBaseDark" : "PanelBackgroundLight"; | ||
panel.StyleClasses.Add(styleClass); | ||
|
||
ContactsList.AddChild(panel); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Content.Shared._DV.Surgery; | ||
|
||
namespace Content.Client._DV.Surgery; | ||
|
||
/// <summary> | ||
/// This gets the examine tooltip and sanitize verb predicted on the client so there's no pop-in after latency | ||
/// </summary> | ||
public sealed class SurgeryCleanSystem : SharedSurgeryCleanSystem | ||
{ | ||
public override bool RequiresCleaning(EntityUid target) | ||
{ | ||
// Predict that it can be cleaned if it has dirt on it | ||
return TryComp<SurgeryDirtinessComponent>(target, out var dirtiness) && dirtiness.Dirtiness > 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 0 additions & 22 deletions
22
Content.Server/Nyanotrasen/Abilities/Boxer/Boxer/BoxerComponent.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.