Skip to content

Commit

Permalink
Upstream 25.08.2024
Browse files Browse the repository at this point in the history
Merge pull request #61 from Space-Stories/upstream
  • Loading branch information
doublechest0 authored Aug 25, 2024
2 parents ee5a7b3 + a1a57f5 commit a269cc7
Show file tree
Hide file tree
Showing 543 changed files with 40,659 additions and 15,044 deletions.
6 changes: 0 additions & 6 deletions Content.Client/Actions/ActionsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,6 @@ public void TriggerAction(EntityUid actionId, BaseActionComponent action)

if (action.ClientExclusive)
{
if (instantAction.Event != null)
{
instantAction.Event.Performer = user;
instantAction.Event.Action = actionId;
}

PerformAction(user, actions, actionId, instantAction, instantAction.Event, GameTiming.CurTime);
}
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Network;
using Robust.Shared.Utility;
using Robust.Shared.Timing;
using Robust.Shared.Configuration;
using Robust.Shared.Utility;

namespace Content.Client.Administration.UI.Bwoink
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Numerics;
using Content.Client.UserInterface.Controls;
using Content.Shared.Roles;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
Expand Down
6 changes: 0 additions & 6 deletions Content.Client/Atmos/Monitor/UI/AirAlarmBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ protected override void Open()
_window.AirAlarmModeChanged += OnAirAlarmModeChanged;
_window.AutoModeChanged += OnAutoModeChanged;
_window.ResyncAllRequested += ResyncAllDevices;
_window.AirAlarmTabChange += OnTabChanged;
}

private void ResyncAllDevices()
Expand Down Expand Up @@ -63,11 +62,6 @@ private void OnThresholdChanged(string address, AtmosMonitorThresholdType type,
SendMessage(new AirAlarmUpdateAlarmThresholdMessage(address, type, threshold, gas));
}

private void OnTabChanged(AirAlarmTab tab)
{
SendMessage(new AirAlarmTabSetMessage(tab));
}

protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
Expand Down
8 changes: 0 additions & 8 deletions Content.Client/Atmos/Monitor/UI/AirAlarmWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public sealed partial class AirAlarmWindow : FancyWindow
public event Action<AirAlarmMode>? AirAlarmModeChanged;
public event Action<bool>? AutoModeChanged;
public event Action? ResyncAllRequested;
public event Action<AirAlarmTab>? AirAlarmTabChange;

private RichTextLabel _address => CDeviceAddress;
private RichTextLabel _deviceTotal => CDeviceTotal;
Expand Down Expand Up @@ -80,11 +79,6 @@ public AirAlarmWindow()
_tabContainer.SetTabTitle(1, Loc.GetString("air-alarm-ui-window-tab-scrubbers"));
_tabContainer.SetTabTitle(2, Loc.GetString("air-alarm-ui-window-tab-sensors"));

_tabContainer.OnTabChanged += idx =>
{
AirAlarmTabChange!((AirAlarmTab) idx);
};

_resyncDevices.OnPressed += _ =>
{
_ventDevices.RemoveAllChildren();
Expand Down Expand Up @@ -117,8 +111,6 @@ public void UpdateState(AirAlarmUIState state)
{
UpdateDeviceData(addr, dev);
}

_tabContainer.CurrentTab = (int) state.Tab;
}

public void UpdateModeSelector(AirAlarmMode mode)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Shared.CrewManifest;
using Content.Client.CrewManifest.UI;
using Content.Shared.CrewManifest;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Commands/SetMenuVisibilityCommand.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Client.Verbs;
using Content.Shared.Verbs;
using JetBrains.Annotations;
using Robust.Shared.Console;

Expand Down
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>
1 change: 1 addition & 0 deletions Content.Client/Construction/UI/FlatpackCreatorMenu.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Linq;
using Content.Client.Materials;
using Content.Client.Materials.UI;
using Content.Client.Message;
using Content.Client.UserInterface.Controls;
using Content.Shared.Construction.Components;
Expand Down
3 changes: 0 additions & 3 deletions Content.Client/Content.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
<ProjectReference Include="..\RobustToolbox\Robust.Client\Robust.Client.csproj" />
<ProjectReference Include="..\Content.Shared\Content.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<Folder Include="Spawners\" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<Import Project="..\RobustToolbox\MSBuild\XamlIL.targets" />
</Project>
19 changes: 16 additions & 3 deletions Content.Client/ContextMenu/UI/EntityMenuUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using Content.Shared.Examine;
using Content.Shared.IdentityManagement;
using Content.Shared.Input;
using Content.Shared.Verbs;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Input;
Expand Down Expand Up @@ -194,8 +195,20 @@ public override void FrameUpdate(FrameEventArgs args)
return;

// Do we need to do in-range unOccluded checks?
var ignoreFov = !_eyeManager.CurrentEye.DrawFov ||
(_verbSystem.Visibility & MenuVisibility.NoFov) == MenuVisibility.NoFov;
var visibility = _verbSystem.Visibility;

if (!_eyeManager.CurrentEye.DrawFov)
{
visibility &= ~MenuVisibility.NoFov;
}

var ev = new MenuVisibilityEvent()
{
Visibility = visibility,
};

_entityManager.EventBus.RaiseLocalEvent(player, ref ev);
visibility = ev.Visibility;

_entityManager.TryGetComponent(player, out ExaminerComponent? examiner);
var xformQuery = _entityManager.GetEntityQuery<TransformComponent>();
Expand All @@ -209,7 +222,7 @@ public override void FrameUpdate(FrameEventArgs args)
continue;
}

if (ignoreFov)
if ((visibility & MenuVisibility.NoFov) == MenuVisibility.NoFov)
continue;

var pos = new MapCoordinates(_xform.GetWorldPosition(xform, xformQuery), xform.MapID);
Expand Down
1 change: 1 addition & 0 deletions Content.Client/CrewManifest/CrewManifestUi.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Client.CrewManifest.UI;
using Content.Shared.CrewManifest;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
Expand Down
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 @@ -19,6 +19,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!;

private LauncherConnectingGui? _control;

Expand Down Expand Up @@ -58,7 +59,7 @@ private set

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

_userInterfaceManager.StateRoot.AddChild(_control);

Expand Down
35 changes: 26 additions & 9 deletions Content.Client/Launcher/LauncherConnectingGui.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,38 @@
<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">
<BoxContainer Orientation="Vertical" Name="ConnectFail" Visible="False" SeparationOverride="10">
<RichTextLabel Name="ConnectFailReason" VerticalAlignment="Stretch"/>
<Button Name="RetryButton" Text="{Loc 'connecting-retry'}"
HorizontalAlignment="Center"
VerticalExpand="True" VerticalAlignment="Bottom" />
<BoxContainer Orientation="Horizontal" Align="Center">
<Button Name="RetryButton"
Text="{Loc 'connecting-retry'}"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
StyleClasses="OpenRight"/>
<Button Name="CopyButton"
Text="{Loc 'connecting-copy'}"
HorizontalAlignment="Center"
VerticalAlignment="Bottom"
StyleClasses="OpenLeft"/>
</BoxContainer>
</BoxContainer>
<BoxContainer Orientation="Vertical" Name="Disconnected">
<BoxContainer Orientation="Vertical" Name="Disconnected" Visible="False" SeparationOverride="10">
<Label Text="{Loc 'connecting-disconnected'}" Align="Center" />
<Label Name="DisconnectReason" Align="Center" />
<Button Name="ReconnectButton" Text="{Loc 'connecting-reconnect'}"
HorizontalAlignment="Center"
VerticalExpand="True" VerticalAlignment="Bottom" />
<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"
VerticalAlignment="Bottom"
StyleClasses="OpenLeft"/>
</BoxContainer>
</BoxContainer>
</Control>
<Label Name="ConnectingAddress" StyleClasses="LabelSubText" HorizontalAlignment="Center" />
Expand Down
27 changes: 25 additions & 2 deletions Content.Client/Launcher/LauncherConnectingGui.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ public sealed partial class LauncherConnectingGui : Control
private readonly IRobustRandom _random;
private readonly IPrototypeManager _prototype;
private readonly IConfigurationManager _cfg;
private readonly IClipboardManager _clipboard;

public LauncherConnectingGui(LauncherConnecting state, IRobustRandom random,
IPrototypeManager prototype, IConfigurationManager config)
IPrototypeManager prototype, IConfigurationManager config, IClipboardManager clipboard)
{
_state = state;
_random = random;
_prototype = prototype;
_cfg = config;
_clipboard = clipboard;

RobustXamlLoader.Load(this);

Expand All @@ -44,8 +46,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 Down Expand Up @@ -78,6 +83,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
1 change: 1 addition & 0 deletions Content.Client/Lobby/UI/LobbyCharacterPreviewPanel.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Numerics;
using Content.Client.UserInterface.Controls;
using Prometheus;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Lobby/UI/LobbyGui.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Client.UserInterface.Systems.EscapeMenu;
using Robust.Client.AutoGenerated;
using Robust.Client.Console;
using Robust.Client.State;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.XAML;

Expand Down
1 change: 1 addition & 0 deletions Content.Client/MachineLinking/UI/SignalTimerWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Timing;
using Content.Client.TextScreen;
using Robust.Client.UserInterface.Controls;

namespace Content.Client.MachineLinking.UI;

Expand Down
1 change: 1 addition & 0 deletions Content.Client/Options/UI/OptionsMenu.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using Content.Client.Options.UI.Tabs;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
Expand Down
13 changes: 13 additions & 0 deletions Content.Client/Power/EntitySystems/PowerReceiverSystem.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Diagnostics.CodeAnalysis;
using Content.Client.Power.Components;
using Content.Shared.Power.Components;
using Content.Shared.Power.EntitySystems;
Expand Down Expand Up @@ -27,4 +28,16 @@ private void OnHandleState(EntityUid uid, ApcPowerReceiverComponent component, r

component.Powered = state.Powered;
}

public override bool ResolveApc(EntityUid entity, [NotNullWhen(true)] ref SharedApcPowerReceiverComponent? component)
{
if (component != null)
return true;

if (!TryComp(entity, out ApcPowerReceiverComponent? receiver))
return false;

component = receiver;
return true;
}
}
1 change: 1 addition & 0 deletions Content.Client/Power/Generator/GeneratorWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Content.Shared.Power.Generator;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Network;

namespace Content.Client.Power.Generator;

Expand Down
1 change: 1 addition & 0 deletions Content.Client/Radio/Ui/IntercomMenu.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System.Threading.Channels;
using Content.Client.UserInterface.Controls;
using Content.Shared.Radio.Components;
using Robust.Client.AutoGenerated;
Expand Down
8 changes: 8 additions & 0 deletions Content.Client/Roles/RoleCodewordSystem.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
using Content.Shared.Roles.RoleCodeword;

namespace Content.Client.Roles;

public sealed class RoleCodewordSystem : SharedRoleCodewordSystem
{

}
Loading

0 comments on commit a269cc7

Please sign in to comment.