Skip to content

Commit

Permalink
Merge branch 'master' into Blueprints
Browse files Browse the repository at this point in the history
  • Loading branch information
blackknight954 authored Jan 11, 2025
2 parents aec6a3e + 186e682 commit 7638a67
Show file tree
Hide file tree
Showing 1,358 changed files with 18,691 additions and 4,349 deletions.
30 changes: 17 additions & 13 deletions Content.Client/IconSmoothing/IconSmoothSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,21 +81,25 @@ public void SetStateBase(EntityUid uid, IconSmoothComponent component, string ne

private void SetCornerLayers(SpriteComponent sprite, IconSmoothComponent component)
{
sprite.LayerMapRemove(CornerLayers.SE);
sprite.LayerMapRemove(CornerLayers.NE);
sprite.LayerMapRemove(CornerLayers.NW);
sprite.LayerMapRemove(CornerLayers.SW);

// Frontier: Allow overlays on entities using CornerLayers smoothing - don't remove layers, adjust existing ones or create new ones.
var state0 = $"{component.StateBase}0";
sprite.LayerMapSet(CornerLayers.SE, sprite.AddLayerState(state0));
sprite.LayerSetDirOffset(CornerLayers.SE, DirectionOffset.None);
sprite.LayerMapSet(CornerLayers.NE, sprite.AddLayerState(state0));
sprite.LayerSetDirOffset(CornerLayers.NE, DirectionOffset.CounterClockwise);
sprite.LayerMapSet(CornerLayers.NW, sprite.AddLayerState(state0));
sprite.LayerSetDirOffset(CornerLayers.NW, DirectionOffset.Flip);
sprite.LayerMapSet(CornerLayers.SW, sprite.AddLayerState(state0));
sprite.LayerSetDirOffset(CornerLayers.SW, DirectionOffset.Clockwise);
SetCornerLayerState(sprite, CornerLayers.SE, DirectionOffset.None, state0);
SetCornerLayerState(sprite, CornerLayers.NE, DirectionOffset.CounterClockwise, state0);
SetCornerLayerState(sprite, CornerLayers.NW, DirectionOffset.Flip, state0);
SetCornerLayerState(sprite, CornerLayers.SW, DirectionOffset.Clockwise, state0);
// End Frontier: Allow overlays on entities using CornerLayers smoothing - don't remove layers, adjust existing ones or create new ones.
}

// Frontier: set layer function to remove redundancy
private void SetCornerLayerState(SpriteComponent sprite, CornerLayers corner, DirectionOffset offset, string state)
{
if (sprite.LayerMapTryGet(corner, out var layer))
sprite.LayerSetState(layer, state);
else
sprite.LayerMapSet(corner, sprite.AddLayerState(state));
sprite.LayerSetDirOffset(corner, offset);
}
// End Frontier: set layer function to remove redundancy

private void OnShutdown(EntityUid uid, IconSmoothComponent component, ComponentShutdown args)
{
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Nyanotrasen/Overlays/DogVisionSystem.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Content.Shared.Abilities;
using Content.Shared.DeltaV.CCVars;
using Content.Shared._DV.CCVars;
using Robust.Client.Graphics;
using Robust.Shared.Configuration;
using Robust.Shared.Player;
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Options/UI/OptionsMenu.xaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<DefaultWindow xmlns="https://spacestation14.io"
xmlns:tabs="clr-namespace:Content.Client.Options.UI.Tabs"
xmlns:dtabs="clr-namespace:Content.Client.DeltaV.Options.UI.Tabs"
xmlns:dtabs="clr-namespace:Content.Client._DV.Options.UI.Tabs"
Title="{Loc 'ui-options-title'}"
MinSize="800 450">
<TabContainer Name="Tabs" Access="Public">
Expand Down
41 changes: 41 additions & 0 deletions Content.Client/Stack/StackCustomSplitBoundUserInterface.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Cherry-picked from space-station-14#32938 courtesy of Ilya246
using JetBrains.Annotations;
using Content.Shared.Stacks;
using Robust.Client.GameObjects;
using Robust.Client.UserInterface;

namespace Content.Client.Stack
{
[UsedImplicitly]
public sealed class StackCustomSplitBoundUserInterface : BoundUserInterface
{
private IEntityManager _entManager;
private EntityUid _owner;
[ViewVariables]
private StackCustomSplitWindow? _window;

public StackCustomSplitBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
_owner = owner;
_entManager = IoCManager.Resolve<IEntityManager>();
}

protected override void Open()
{
base.Open();
_window = this.CreateWindow<StackCustomSplitWindow>();

if (_entManager.TryGetComponent<StackComponent>(_owner, out var comp))
_window.SetMax(comp.Count);

_window.ApplyButton.OnPressed += _ =>
{
if (int.TryParse(_window.AmountLineEdit.Text, out var i))
{
SendMessage(new StackCustomSplitAmountMessage(i));
_window.Close();
}
};
}
}
}
15 changes: 15 additions & 0 deletions Content.Client/Stack/StackCustomSplitWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<DefaultWindow xmlns="https://spacestation14.io"
Title="{Loc 'ui-custom-stack-split-title'}"
Resizable="False">
<!--Cherry-picked from space-station-14#32938 courtesy of Ilya246-->

<BoxContainer Orientation="Vertical" SeparationOverride="4" MinSize="240 80">
<BoxContainer Orientation="Horizontal">
<LineEdit Name="AmountLineEdit" Access="Public" HorizontalExpand="True" PlaceHolder="{Loc 'ui-custom-stack-split-line-edit-placeholder'}"/>
</BoxContainer>
<BoxContainer Orientation="Horizontal">
<Label Name="MaximumAmount" Access="Public" />
</BoxContainer>
<Button Name="ApplyButton" Access="Public" Text="{Loc 'ui-custom-stack-split-apply'}"/>
</BoxContainer>
</DefaultWindow>
35 changes: 35 additions & 0 deletions Content.Client/Stack/StackCustomSplitWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Cherry-picked from space-station-14#32938 courtesy of Ilya246
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.Stack
{
[GenerateTypedNameReferences]
public sealed partial class StackCustomSplitWindow : DefaultWindow
{
private int _max = Int32.MaxValue;
private int _min = 1;

public StackCustomSplitWindow()
{
RobustXamlLoader.Load(this);
AmountLineEdit.OnTextChanged += OnValueChanged;
}

public void SetMax(int max)
{
_max = max;
MaximumAmount.Text = Loc.GetString("comp-stack-split-size", ("size", _max));
}

private void OnValueChanged(LineEdit.LineEditEventArgs args)
{
if (!int.TryParse(AmountLineEdit.Text, out var amount) || amount > _max || amount < _min)
ApplyButton.Disabled = true;
else
ApplyButton.Disabled = false;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public sealed class GuidebookUIController : UIController, IOnStateEntered<LobbyS
[Dependency] private readonly IConfigurationManager _configuration = default!;
[Dependency] private readonly JobRequirementsManager _jobRequirements = default!;

private const int PlaytimeOpenGuidebook = 60;
private const int PlaytimeOpenGuidebook = 180; // Frontier 60<180

private GuidebookWindow? _guideWindow;
private MenuButton? GuidebookButton => UIManager.GetActiveUIWidgetOrNull<MenuBar.Widgets.GameTopMenuBar>()?.GuidebookButton;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Content.Shared.DeltaV.Abilities;
using Content.Shared._DV.Abilities;
using Content.Shared.Popups;
using Robust.Client.GameObjects;
using DrawDepth = Content.Shared.DrawDepth.DrawDepth;

namespace Content.Client.DeltaV.Abilities;
namespace Content.Client._DV.Abilities;

public sealed partial class HideUnderTableAbilitySystem : SharedCrawlUnderObjectsSystem
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<PanelContainer
xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.DeltaV.Administration.UI"
xmlns:cc="clr-namespace:Content.Client._DV.Administration.UI"
StyleClasses="BackgroundDark"
HorizontalExpand="True"
Margin="4">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Prototypes;

namespace Content.Client.DeltaV.Administration.UI;
namespace Content.Client._DV.Administration.UI;

[GenerateTypedNameReferences]
public sealed partial class DepartmentWhitelistPanel : PanelContainer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<PanelContainer
xmlns="https://spacestation14.io"
xmlns:cc="clr-namespace:Content.Client.DeltaV.Administration.UI"
xmlns:cc="clr-namespace:Content.Client._DV.Administration.UI"
StyleClasses="BackgroundDark"
HorizontalExpand="True"
Margin="4"> <!-- Frontier: ghost role set whitelist -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Prototypes;

namespace Content.Client.DeltaV.Administration.UI;
namespace Content.Client._DV.Administration.UI;

// Frontier: ghost role whitelist set
[GenerateTypedNameReferences]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Content.Client.Eui;
using Content.Shared.DeltaV.Administration;
using Content.Shared._DV.Administration;
using Content.Shared.Eui;

namespace Content.Client.DeltaV.Administration.UI;
namespace Content.Client._DV.Administration.UI;

public sealed class JobWhitelistsEui : BaseEui
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Content.Client.UserInterface.Controls;
using Content.Shared.Database;
using Content.Shared.DeltaV.Administration;
using Content.Shared._DV.Administration;
using Content.Shared.Roles;
using Content.Shared.DeltaV.Whitelist;
using Content.Shared._DV.Whitelist;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
Expand All @@ -11,7 +11,7 @@
using Robust.Shared.Prototypes;
using Content.Shared.Ghost.Roles;

namespace Content.Client.DeltaV.Administration.UI;
namespace Content.Client._DV.Administration.UI;

/// <summary>
/// An admin panel to toggle whitelists for individual jobs or entire departments.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Content.Client.UserInterface.Fragments;
using Content.Shared.CartridgeLoader.Cartridges;

namespace Content.Client.DeltaV.CartridgeLoader.Cartridges;
namespace Content.Client._DV.CartridgeLoader.Cartridges;

public sealed partial class MailMetricUi : UIFragment
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<cartridges:MailMetricUiFragment
xmlns:cartridges="clr-namespace:Content.Client.DeltaV.CartridgeLoader.Cartridges"
xmlns:cartridges="clr-namespace:Content.Client._DV.CartridgeLoader.Cartridges"
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns="https://spacestation14.io"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;

namespace Content.Client.DeltaV.CartridgeLoader.Cartridges;
namespace Content.Client._DV.CartridgeLoader.Cartridges;

[GenerateTypedNameReferences]
public sealed partial class MailMetricUiFragment : BoxContainer
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Content.Client.DeltaV.Harpy;
namespace Content.Client._DV.Harpy;

[RegisterComponent]
public sealed partial class HarpyVisualsComponent : Component
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Content.Shared.DeltaV.Mail;
using Content.Shared._DV.Mail;

namespace Content.Client.DeltaV.Mail
namespace Content.Client._DV.Mail
{
[RegisterComponent]
public sealed partial class MailComponent : SharedMailComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using Content.Shared.DeltaV.Mail;
using Content.Shared._DV.Mail;
using Content.Shared.StatusIcon;
using Robust.Client.GameObjects;
using Robust.Shared.Prototypes;

namespace Content.Client.DeltaV.Mail;
namespace Content.Client._DV.Mail;

/// <summary>
/// Display a cool stamp on the parcel based on the job of the recipient.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<tabs:DeltaTab xmlns="https://spacestation14.io"
<tabs:DeltaTab xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
xmlns:tabs="clr-namespace:Content.Client.DeltaV.Options.UI.Tabs"
xmlns:tabs="clr-namespace:Content.Client._DV.Options.UI.Tabs"
xmlns:xNamespace="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="clr-namespace:Content.Client.Stylesheets">
<BoxContainer Orientation="Vertical">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using Content.Shared.DeltaV.CCVars;
using Content.Shared._DV.CCVars;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Configuration;

namespace Content.Client.DeltaV.Options.UI.Tabs;
namespace Content.Client._DV.Options.UI.Tabs;

[GenerateTypedNameReferences]
public sealed partial class DeltaTab : Control
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Content.Shared.Abilities;
using System.Numerics;

namespace Content.Client.DeltaV.Overlays;
namespace Content.Client._DV.Overlays;

public sealed partial class UltraVisionOverlay : Overlay
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Content.Shared.Abilities;
using Content.Shared.DeltaV.CCVars;
using Content.Shared._DV.CCVars;
using Robust.Client.Graphics;
using Robust.Shared.Configuration;
using Robust.Shared.Player;

namespace Content.Client.DeltaV.Overlays;
namespace Content.Client._DV.Overlays;

public sealed partial class UltraVisionSystem : EntitySystem
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using Content.Client.UserInterface.Controls;
using Content.Shared.DeltaV.CCVars;
using Content.Shared._DV.CCVars;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Configuration;
using Robust.Shared.Timing;
using Robust.Shared.Utility;

namespace Content.Client.DeltaV.RoundEnd;
namespace Content.Client._DV.RoundEnd;

[GenerateTypedNameReferences]
public sealed partial class NoEorgPopup : FancyWindow
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Content.Shared.GameTicking;
using Content.Shared.DeltaV.CCVars;
using Content.Shared._DV.CCVars;
using Robust.Shared.Configuration;

namespace Content.Client.DeltaV.RoundEnd;
namespace Content.Client._DV.RoundEnd;

public sealed class NoEorgPopupSystem : EntitySystem
{
Expand Down
Loading

0 comments on commit 7638a67

Please sign in to comment.