Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/wizards/master'
Browse files Browse the repository at this point in the history
# Conflicts:
#	Content.Client/Launcher/LauncherConnecting.cs
#	Content.Client/Launcher/LauncherConnectingGui.xaml
#	Content.Client/Launcher/LauncherConnectingGui.xaml.cs
#	Content.Server/Administration/Managers/BanManager.cs
#	Content.Server/Medical/Components/HealthAnalyzerComponent.cs
#	Content.Server/Medical/HealthAnalyzerSystem.cs
#	Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs
#	Content.Server/StationEvents/Events/RandomSentienceRule.cs
#	Content.Shared/Interaction/Components/BlockMovementComponent.cs
#	Content.Shared/Interaction/SharedInteractionSystem.Blocking.cs
#	Content.Shared/Materials/SharedMaterialReclaimerSystem.cs
#	Resources/Prototypes/Accents/word_replacements.yml
#	Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml
#	Resources/Prototypes/Entities/Mobs/Customization/Markings/cat_parts.yml
#	Resources/Prototypes/Entities/Mobs/NPCs/silicon.yml
#	Resources/Prototypes/Entities/Objects/Weapons/Guns/Projectiles/projectiles.yml
#	Resources/Prototypes/Entities/Structures/Machines/lathe.yml
#	Resources/Prototypes/Objectives/objectiveGroups.yml
#	Resources/Prototypes/Objectives/stealTargetGroups.yml
#	Resources/Prototypes/Roles/Jobs/Security/detective.yml
#	Resources/Prototypes/Species/human.yml
#	Resources/Prototypes/Voice/speech_emotes.yml
#	Resources/ServerInfo/Guidebook/Antagonist/Antagonists.xml
#	Resources/ServerInfo/Guidebook/Antagonist/MinorAntagonists.xml
#	Resources/ServerInfo/Guidebook/Antagonist/Nuclear Operatives.xml
#	Resources/ServerInfo/Guidebook/Antagonist/Revolutionaries.xml
#	Resources/ServerInfo/Guidebook/Antagonist/SpaceNinja.xml
#	Resources/ServerInfo/Guidebook/Antagonist/Traitors.xml
#	Resources/ServerInfo/Guidebook/Antagonist/Zombies.xml
#	Resources/migration.yml
  • Loading branch information
VigersRay committed Aug 22, 2024
2 parents 33c1783 + ed7ae5c commit 0441b8b
Show file tree
Hide file tree
Showing 403 changed files with 17,861 additions and 9,791 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
MinSize="400 225">
<BoxContainer Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True" Margin="5">
<TextEdit Name="MessageInput" HorizontalExpand="True" VerticalExpand="True" Margin="0 0 0 5" MinHeight="100" />
<Button Name="AnnounceButton" Text="{Loc 'comms-console-menu-announcement-button'}" StyleClasses="OpenLeft" Access="Public" />
<Button Name="BroadcastButton" Text="{Loc 'comms-console-menu-broadcast-button'}" StyleClasses="OpenLeft" Access="Public" />
<Button Name="AnnounceButton" Text="{Loc 'comms-console-menu-announcement-button'}" ToolTip="{Loc 'comms-console-menu-announcement-button-tooltip'}" StyleClasses="OpenLeft" Access="Public" />
<Button Name="BroadcastButton" Text="{Loc 'comms-console-menu-broadcast-button'}" ToolTip="{Loc 'comms-console-menu-broadcast-button-tooltip'}" StyleClasses="OpenLeft" Access="Public" />

<OptionButton Name="AlertLevelButton" StyleClasses="OpenRight" Access="Public" />
<OptionButton Name="AlertLevelButton" ToolTip="{Loc 'comms-console-menu-alert-level-button-tooltip'}" StyleClasses="OpenRight" Access="Public" />

<Control MinSize="10 10" />

<RichTextLabel Name="CountdownLabel" VerticalExpand="True" />
<Button Name="EmergencyShuttleButton" Text="Placeholder Text" Access="Public" />
<Button Name="EmergencyShuttleButton" Text="Placeholder Text" ToolTip="{Loc 'comms-console-menu-emergency-shuttle-button-tooltip'}" Access="Public" />
</BoxContainer>
</controls:FancyWindow>
4 changes: 2 additions & 2 deletions Content.Client/Ghost/GhostSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ private void OnToggleGhosts(EntityUid uid, GhostComponent component, ToggleGhost
if (args.Handled)
return;

Popup.PopupEntity(Loc.GetString("ghost-gui-toggle-ghost-visibility-popup"), args.Performer);

var locId = GhostVisibility ? "ghost-gui-toggle-ghost-visibility-popup-off" : "ghost-gui-toggle-ghost-visibility-popup-on";
Popup.PopupEntity(Loc.GetString(locId), args.Performer);
if (uid == _playerManager.LocalEntity)
ToggleGhostVisibility();

Expand Down
3 changes: 2 additions & 1 deletion Content.Client/Launcher/LauncherConnecting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public sealed class LauncherConnecting : Robust.Client.State.State
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly IClipboardManager _clipboard = default!;
[Dependency] private readonly ServersHubManager _serversHubManager = default!;

private LauncherConnectingGui? _control;
Expand Down Expand Up @@ -60,7 +61,7 @@ private set

protected override void Startup()
{
_control = new LauncherConnectingGui(this, _random, _prototypeManager, _cfg, _serversHubManager);
_control = new LauncherConnectingGui(this, _random, _prototypeManager, _cfg, _clipboard, _serversHubManager);

_userInterfaceManager.StateRoot.AddChild(_control);

Expand Down
95 changes: 55 additions & 40 deletions Content.Client/Launcher/LauncherConnectingGui.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,51 +7,67 @@
<parallax:ParallaxControl />
<Control HorizontalAlignment="Center" VerticalAlignment="Center">
<BoxContainer Orientation="Vertical">
<PanelContainer StyleClasses="AngleRect">
<BoxContainer Orientation="Vertical" MinSize="300 200">
<BoxContainer Orientation="Horizontal">
<Label Margin="8 0 0 0" Text="{Loc 'connecting-title'}"
StyleClasses="LabelHeading" VAlign="Center" />
<Button Name="ExitButton" Text="{Loc 'connecting-exit'}"
HorizontalAlignment="Right" HorizontalExpand="True" />
</BoxContainer>
<controls:HighDivider />
<BoxContainer Orientation="Vertical" VerticalExpand="True" Margin="4 4 4 0">
<Control VerticalExpand="True" Margin="0 0 0 8">
<BoxContainer Orientation="Vertical" Name="ConnectingStatus">
<Label Text="{Loc 'connecting-in-progress'}" Align="Center" />
<!-- Who the fuck named these cont- oh wait I did -->
<Label Name="ConnectStatus" StyleClasses="LabelSubText" Align="Center" />
</BoxContainer>
<BoxContainer Orientation="Vertical" Name="ConnectFail" Visible="False">
<RichTextLabel Name="ConnectFailReason" VerticalAlignment="Stretch"/>
<Button Name="RetryButton" Text="{Loc 'connecting-retry'}"
<PanelContainer StyleClasses="AngleRect" />
<BoxContainer Orientation="Vertical" MinSize="300 200">
<BoxContainer Orientation="Horizontal">
<Label Margin="8 0 0 0" Text="{Loc 'connecting-title'}"
StyleClasses="LabelHeading" VAlign="Center" />
<Button Name="ExitButton" Text="{Loc 'connecting-exit'}"
HorizontalAlignment="Right" HorizontalExpand="True" />
</BoxContainer>
<controls:HighDivider />
<BoxContainer Orientation="Vertical" VerticalExpand="True" Margin="4 4 4 0">
<Control VerticalExpand="True" Margin="0 0 0 8">
<BoxContainer Orientation="Vertical" Name="ConnectingStatus">
<Label Text="{Loc 'connecting-in-progress'}" Align="Center" />
<Label Name="ConnectStatus" StyleClasses="LabelSubText" Align="Center" />
</BoxContainer>
<BoxContainer Orientation="Vertical" Name="ConnectFail" Visible="False" SeparationOverride="10">
<RichTextLabel Name="ConnectFailReason" VerticalAlignment="Stretch"/>
<BoxContainer Orientation="Horizontal" Align="Center">
<Button Name="RetryButton"
Text="{Loc 'connecting-retry'}"
HorizontalAlignment="Center"
VerticalExpand="True" VerticalAlignment="Bottom" />
VerticalAlignment="Bottom"
StyleClasses="OpenRight"/>
<Button Name="CopyButton"
Text="{Loc 'connecting-copy'}"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
StyleClasses="OpenLeft"/>
</BoxContainer>
<BoxContainer Orientation="Vertical" Name="Disconnected">
<Label Text="{Loc 'connecting-disconnected'}" Align="Center" />
<Label Name="DisconnectReason" Align="Center" />
<Button Name="ReconnectButton" Text="{Loc 'connecting-reconnect'}"
</BoxContainer>
<BoxContainer Orientation="Vertical" Name="Disconnected" Visible="False" SeparationOverride="10">
<Label Text="{Loc 'connecting-disconnected'}" Align="Center" />
<Label Name="DisconnectReason" Align="Center" />
<BoxContainer Orientation="Horizontal" Align="Center" VerticalAlignment="Bottom">
<Button Name="ReconnectButton"
Text="{Loc 'connecting-reconnect'}"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
StyleClasses="OpenRight"/>
<Button Name="CopyButtonDisconnected"
Text="{Loc 'connecting-copy'}"
HorizontalAlignment="Center"
VerticalExpand="True" VerticalAlignment="Bottom" />
VerticalAlignment="Bottom"
StyleClasses="OpenLeft"/>
</BoxContainer>
</Control>
<Label Name="ConnectingAddress" StyleClasses="LabelSubText" HorizontalAlignment="Center" />
</BoxContainer>
<PanelContainer>
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#444" ContentMarginTopOverride="2" />
</PanelContainer.PanelOverride>
</PanelContainer>
</BoxContainer>
</Control>
<Label Name="ConnectingAddress" StyleClasses="LabelSubText" HorizontalAlignment="Center" />
</BoxContainer>
<PanelContainer>
<PanelContainer.PanelOverride>
<gfx:StyleBoxFlat BackgroundColor="#444" ContentMarginTopOverride="2" />
</PanelContainer.PanelOverride>
</PanelContainer>

<BoxContainer Orientation="Horizontal" Margin="12 0 4 0" VerticalAlignment="Bottom">
<Label Text="{Loc 'connecting-tip'}" StyleClasses="LabelSubText" />
<Label Text="{Loc 'connecting-version'}" StyleClasses="LabelSubText"
HorizontalAlignment="Right" HorizontalExpand="True" />
</BoxContainer>
<BoxContainer Orientation="Horizontal" Margin="12 0 4 0" VerticalAlignment="Bottom">
<Label Text="{Loc 'connecting-tip'}" StyleClasses="LabelSubText" />
<Label Text="{Loc 'connecting-version'}" StyleClasses="LabelSubText"
HorizontalAlignment="Right" HorizontalExpand="True" />
</BoxContainer>
</PanelContainer>
</BoxContainer>
<PanelContainer StyleClasses="AngleRect" HorizontalExpand="True" Margin="0 10 0 0" Visible="False" Name="ServersHub" MinWidth="600" MinHeight="220">
<BoxContainer Orientation="Vertical" VerticalExpand="True" HorizontalExpand="True" Margin="3 3 3 3">
<controls:StripeBack>
Expand All @@ -67,7 +83,6 @@
</PanelContainer>
</BoxContainer>
</Control>

<!-- Bottom window for tips -->
<PanelContainer Name="LoginTips" StyleClasses="AngleRect" Margin="0 10" MaxWidth="600" VerticalExpand="True" VerticalAlignment="Bottom">
<BoxContainer Orientation="Vertical" VerticalExpand="True">
Expand Down
36 changes: 31 additions & 5 deletions Content.Client/Launcher/LauncherConnectingGui.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,19 @@ public sealed partial class LauncherConnectingGui : Control
private readonly IRobustRandom _random;
private readonly IPrototypeManager _prototype;
private readonly IConfigurationManager _cfg;
private readonly ServersHubManager _serversHubManager;
private readonly IClipboardManager _clipboard;
private readonly ServersHubManager _serversHubManager; // Sunrise-Edit

public LauncherConnectingGui(LauncherConnecting state, IRobustRandom random,
IPrototypeManager prototype, IConfigurationManager config, ServersHubManager serversHubManager)
IPrototypeManager prototype, IConfigurationManager config, IClipboardManager clipboard,
ServersHubManager serversHubManager) // Sunrise-Edit
{
_state = state;
_random = random;
_prototype = prototype;
_cfg = config;
_serversHubManager = serversHubManager;
_clipboard = clipboard;
_serversHubManager = serversHubManager; // Sunrise-Edit

RobustXamlLoader.Load(this);

Expand All @@ -48,8 +51,11 @@ public LauncherConnectingGui(LauncherConnecting state, IRobustRandom random,
Stylesheet = IoCManager.Resolve<IStylesheetManager>().SheetSpace;

ChangeLoginTip();
ReconnectButton.OnPressed += ReconnectButtonPressed;
RetryButton.OnPressed += ReconnectButtonPressed;
ReconnectButton.OnPressed += ReconnectButtonPressed;

CopyButton.OnPressed += CopyButtonPressed;
CopyButtonDisconnected.OnPressed += CopyButtonDisconnectedPressed;
ExitButton.OnPressed += _ => _state.Exit();

var addr = state.Address;
Expand All @@ -68,15 +74,17 @@ public LauncherConnectingGui(LauncherConnecting state, IRobustRandom random,
edim.LastNetDisconnectedArgsChanged += LastNetDisconnectedArgsChanged;
LastNetDisconnectedArgsChanged(edim.LastNetDisconnectedArgs);

_serversHubManager.ServersDataListChanged += RefreshServersHubHeader;
_serversHubManager.ServersDataListChanged += RefreshServersHubHeader; // Sunrise-Edit
}

// Sunrise-Start
private void RefreshServersHubHeader(List<ServerHubEntry> servers)
{
var totalPlayers = servers.Sum(server => server.CurrentPlayers);
var maxPlayers = servers.Sum(server => server.MaxPlayers);
ServersHubHeaderLabel.Text = Loc.GetString("serverhub-playingnow", ("total", totalPlayers), ("max", maxPlayers)); // Sunrise-Edit
}
// Sunrise-End

// Just button, there's only one at once anyways :)
private void ReconnectButtonPressed(BaseButton.ButtonEventArgs args)
Expand All @@ -91,6 +99,24 @@ private void ReconnectButtonPressed(BaseButton.ButtonEventArgs args)
_state.RetryConnect();
}

private void CopyButtonPressed(BaseButton.ButtonEventArgs args)
{
CopyText(ConnectFailReason.Text);
}

private void CopyButtonDisconnectedPressed(BaseButton.ButtonEventArgs args)
{
CopyText(DisconnectReason.Text);
}

private void CopyText(string? text)
{
if (!string.IsNullOrEmpty(text))
{
_clipboard.SetText(text);
}
}

private void ConnectFailReasonChanged(string? reason)
{
ConnectFailReason.SetMessage(reason == null
Expand Down
27 changes: 27 additions & 0 deletions Content.Client/Materials/RecyclerVisualizerSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using Content.Shared.Conveyor;
using Content.Shared.Materials;
using Robust.Client.GameObjects;

namespace Content.Client.Materials;

public sealed class RecyclerVisualizerSystem : VisualizerSystem<RecyclerVisualsComponent>
{
protected override void OnAppearanceChange(EntityUid uid, RecyclerVisualsComponent component, ref AppearanceChangeEvent args)
{
if (args.Sprite == null || !args.Sprite.LayerMapTryGet(RecyclerVisualLayers.Main, out var layer))
return;

AppearanceSystem.TryGetData<ConveyorState>(uid, ConveyorVisuals.State, out var running);
AppearanceSystem.TryGetData<bool>(uid, RecyclerVisuals.Bloody, out var bloody);
AppearanceSystem.TryGetData<bool>(uid, RecyclerVisuals.Broken, out var broken);

var activityState = running == ConveyorState.Off ? 0 : 1;
if (broken) //breakage overrides activity
activityState = 2;

var bloodyKey = bloody ? component.BloodyKey : string.Empty;

var state = $"{component.BaseKey}{activityState}{bloodyKey}";
args.Sprite.LayerSetState(layer, state);
}
}
17 changes: 17 additions & 0 deletions Content.Client/Materials/RecyclerVisualsComponent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
namespace Content.Client.Materials;

[RegisterComponent]
public sealed partial class RecyclerVisualsComponent : Component
{
/// <summary>
/// Key appended to state string if bloody.
/// </summary>
[DataField]
public string BloodyKey = "bld";

/// <summary>
/// Base key for the visual state.
/// </summary>
[DataField]
public string BaseKey = "grinder-o";
}
6 changes: 5 additions & 1 deletion Content.Client/Shuttles/UI/ShuttleNavControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public sealed partial class ShuttleNavControl : BaseShuttleControl

public bool ShowIFF { get; set; } = true;
public bool ShowDocks { get; set; } = true;
public bool RotateWithEntity { get; set; } = true;

/// <summary>
/// Raised if the user left-clicks on the radar control with the relevant entitycoordinates.
Expand Down Expand Up @@ -109,6 +110,8 @@ public void UpdateState(NavInterfaceState state)

ActualRadarRange = Math.Clamp(ActualRadarRange, WorldMinRange, WorldMaxRange);

RotateWithEntity = state.RotateWithEntity;

_docks = state.Docks;
}

Expand Down Expand Up @@ -138,7 +141,8 @@ protected override void Draw(DrawingHandleScreen handle)
var mapPos = _transform.ToMapCoordinates(_coordinates.Value);
var offset = _coordinates.Value.Position;
var posMatrix = Matrix3Helpers.CreateTransform(offset, _rotation.Value);
var (_, ourEntRot, ourEntMatrix) = _transform.GetWorldPositionRotationMatrix(_coordinates.Value.EntityId);
var ourEntRot = RotateWithEntity ? _transform.GetWorldRotation(xform) : _rotation.Value;
var ourEntMatrix = Matrix3Helpers.CreateTransform(_transform.GetWorldPosition(xform), ourEntRot);
var ourWorldMatrix = Matrix3x2.Multiply(posMatrix, ourEntMatrix);
Matrix3x2.Invert(ourWorldMatrix, out var ourWorldMatrixInvert);

Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Voting/UI/VotePopup.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Control xmlns="https://spacestation14.io" MinWidth="300">
<Control xmlns="https://spacestation14.io" MinWidth="300" MaxWidth="500">
<PanelContainer StyleClasses="AngleRect" />
<BoxContainer Margin="4" Orientation="Vertical">
<Label Name="VoteCaller" />
<Label Name="VoteTitle" />
<RichTextLabel Name="VoteTitle" />

<GridContainer Columns="3" Name="VoteOptionsContainer" />
<BoxContainer Orientation="Horizontal">
Expand Down
3 changes: 2 additions & 1 deletion Content.Client/Voting/UI/VotePopup.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using Robust.Shared.Localization;
using Robust.Shared.Maths;
using Robust.Shared.Timing;
using Robust.Shared.Utility;

namespace Content.Client.Voting.UI
{
Expand Down Expand Up @@ -48,7 +49,7 @@ public VotePopup(VoteManager.ActiveVote vote)

public void UpdateData()
{
VoteTitle.Text = _vote.Title;
VoteTitle.SetMessage(FormattedMessage.FromUnformatted(_vote.Title));
VoteCaller.Text = Loc.GetString("ui-vote-created", ("initiator", _vote.Initiator));

for (var i = 0; i < _voteButtons.Length; i++)
Expand Down
1 change: 1 addition & 0 deletions Content.Packaging/ServerPackaging.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public static class ServerPackaging
new PlatformReg("win-x86", "Windows", false),
new PlatformReg("linux-x86", "Linux", false),
new PlatformReg("linux-arm", "Linux", false),
new PlatformReg("freebsd-x64", "FreeBSD", false),
};

private static List<string> PlatformRids => Platforms
Expand Down
Loading

0 comments on commit 0441b8b

Please sign in to comment.