Skip to content

Commit

Permalink
Merge pull request #2401 from space-syndicate/upstream-sync
Browse files Browse the repository at this point in the history
Upstream sync
  • Loading branch information
Morb0 authored Jul 11, 2024
2 parents c463d39 + c058ea1 commit ca60793
Show file tree
Hide file tree
Showing 491 changed files with 16,107 additions and 13,811 deletions.
6 changes: 3 additions & 3 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"Changes: Map":
- changed-files:
- any-glob-to-any-file:
- 'Resources/Maps/*.yml'
- 'Resources/Prototypes/Maps/*.yml'
- 'Resources/Prototypes/Corvax/Maps/*.yml'
- 'Resources/Maps/**/*.yml'
- 'Resources/Prototypes/Maps/**/*.yml'
- 'Resources/Prototypes/Corvax/Maps/**/*.yml'

"Changes: UI":
- changed-files:
Expand Down
4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

4 changes: 1 addition & 3 deletions Content.Client/Administration/UI/AdminMenuWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
xmlns:tabs="clr-namespace:Content.Client.Administration.UI.Tabs"
xmlns:playerTab="clr-namespace:Content.Client.Administration.UI.Tabs.PlayerTab"
xmlns:objectsTab="clr-namespace:Content.Client.Administration.UI.Tabs.ObjectsTab"
xmlns:panic="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab"
xmlns:baby="clr-namespace:Content.Client.Administration.UI.Tabs.BabyJailTab">
xmlns:panic="clr-namespace:Content.Client.Administration.UI.Tabs.PanicBunkerTab">
<TabContainer Name="MasterTabContainer">
<adminTab:AdminTab />
<adminbusTab:AdminbusTab />
<atmosTab:AtmosTab />
<tabs:RoundTab />
<tabs:ServerTab />
<panic:PanicBunkerTab Name="PanicBunkerControl" Access="Public" />
<baby:BabyJailTab Name="BabyJailControl" Access="Public" />
<playerTab:PlayerTab Name="PlayerTabControl" Access="Public" />
<objectsTab:ObjectsTab Name="ObjectsTabControl" Access="Public" />
</TabContainer>
Expand Down
20 changes: 8 additions & 12 deletions Content.Client/Administration/UI/AdminMenuWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,14 @@ public AdminMenuWindow()
MinSize = new Vector2(650, 250);
Title = Loc.GetString("admin-menu-title");
RobustXamlLoader.Load(this);
MasterTabContainer.SetTabTitle((int) TabIndex.Admin, Loc.GetString("admin-menu-admin-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.Adminbus, Loc.GetString("admin-menu-adminbus-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.Atmos, Loc.GetString("admin-menu-atmos-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.Round, Loc.GetString("admin-menu-round-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.Server, Loc.GetString("admin-menu-server-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.PanicBunker, Loc.GetString("admin-menu-panic-bunker-tab"));
/*
* TODO: Remove baby jail code once a more mature gateway process is established. This code is only being issued as a stopgap to help with potential tiding in the immediate future.
*/
MasterTabContainer.SetTabTitle((int) TabIndex.BabyJail, Loc.GetString("admin-menu-baby-jail-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.Players, Loc.GetString("admin-menu-players-tab"));
MasterTabContainer.SetTabTitle((int) TabIndex.Objects, Loc.GetString("admin-menu-objects-tab"));
MasterTabContainer.SetTabTitle(0, Loc.GetString("admin-menu-admin-tab"));
MasterTabContainer.SetTabTitle(1, Loc.GetString("admin-menu-adminbus-tab"));
MasterTabContainer.SetTabTitle(2, Loc.GetString("admin-menu-atmos-tab"));
MasterTabContainer.SetTabTitle(3, Loc.GetString("admin-menu-round-tab"));
MasterTabContainer.SetTabTitle(4, Loc.GetString("admin-menu-server-tab"));
MasterTabContainer.SetTabTitle(5, Loc.GetString("admin-menu-panic-bunker-tab"));
MasterTabContainer.SetTabTitle(6, Loc.GetString("admin-menu-players-tab"));
MasterTabContainer.SetTabTitle(7, Loc.GetString("admin-menu-objects-tab"));
MasterTabContainer.OnTabChanged += OnTabChanged;
}

Expand Down

This file was deleted.

This file was deleted.

26 changes: 0 additions & 26 deletions Content.Client/Administration/UI/Tabs/BabyJailTab/BabyJailTab.xaml

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,36 @@
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Shared.Prototypes;
using Content.Shared.Inventory;

namespace Content.Client.Chat.TypingIndicator;

public sealed class TypingIndicatorVisualizerSystem : VisualizerSystem<TypingIndicatorComponent>
{
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly InventorySystem _inventory = default!;


protected override void OnAppearanceChange(EntityUid uid, TypingIndicatorComponent component, ref AppearanceChangeEvent args)
{
if (args.Sprite == null)
return;

if (!_prototypeManager.TryIndex<TypingIndicatorPrototype>(component.Prototype, out var proto))
var currentTypingIndicator = component.TypingIndicatorPrototype;

var evt = new BeforeShowTypingIndicatorEvent();

if (TryComp<InventoryComponent>(uid, out var inventoryComp))
_inventory.RelayEvent((uid, inventoryComp), ref evt);

var overrideIndicator = evt.GetMostRecentIndicator();

if (overrideIndicator != null)
currentTypingIndicator = overrideIndicator.Value;

if (!_prototypeManager.TryIndex(currentTypingIndicator, out var proto))
{
Log.Error($"Unknown typing indicator id: {component.Prototype}");
Log.Error($"Unknown typing indicator id: {component.TypingIndicatorPrototype}");
return;
}

Expand Down
7 changes: 5 additions & 2 deletions Content.Client/Clickable/ClickableComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public bool CheckClick(SpriteComponent sprite, TransformComponent transform, Ent
Angle cardinalSnapping = sprite.SnapCardinals ? relativeRotation.GetCardinalDir().ToAngle() : Angle.Zero;

// First we get `localPos`, the clicked location in the sprite-coordinate frame.
var entityXform = Matrix3Helpers.CreateInverseTransform(transform.WorldPosition, sprite.NoRotation ? -eye.Rotation : spriteRot - cardinalSnapping);
var entityXform = Matrix3Helpers.CreateInverseTransform(spritePos, sprite.NoRotation ? -eye.Rotation : spriteRot - cardinalSnapping);
var localPos = Vector2.Transform(Vector2.Transform(worldPos, entityXform), invSpriteMatrix);

// Check explicitly defined click-able bounds
Expand All @@ -58,8 +58,11 @@ public bool CheckClick(SpriteComponent sprite, TransformComponent transform, Ent
// Next check each individual sprite layer using automatically computed click maps.
foreach (var spriteLayer in sprite.AllLayers)
{
if (!spriteLayer.Visible || spriteLayer is not Layer layer)
// TODO: Move this to a system and also use SpriteSystem.IsVisible instead.
if (!spriteLayer.Visible || spriteLayer is not Layer layer || layer.CopyToShaderParameters != null)
{
continue;
}

// Check the layer's texture, if it has one
if (layer.Texture != null)
Expand Down
11 changes: 9 additions & 2 deletions Content.Client/Commands/ZoomCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public sealed class ZoomCommand : LocalizedCommands
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
Vector2 zoom;
if (args.Length is not (1 or 2))
if (args.Length is not (1 or 2 or 3))
{
shell.WriteLine(Help);
return;
Expand Down Expand Up @@ -57,11 +57,18 @@ public override void Execute(IConsoleShell shell, string argStr, string[] args)
}
}

var scalePvs = true;
if (args.Length == 3 && !bool.TryParse(args[2], out scalePvs))
{
shell.WriteError(LocalizationManager.GetString("cmd-parse-failure-bool", ("arg", args[2])));
return;
}

var player = _playerManager.LocalSession?.AttachedEntity;

if (_entityManager.TryGetComponent<ContentEyeComponent>(player, out var content))
{
_entityManager.System<ContentEyeSystem>().RequestZoom(player.Value, zoom, true, content);
_entityManager.System<ContentEyeSystem>().RequestZoom(player.Value, zoom, true, scalePvs, content);
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ public void UpdateCountdown()
}

EmergencyShuttleButton.Text = Loc.GetString("comms-console-menu-recall-shuttle");
CountdownLabel.SetMessage($"Time remaining\n{Owner.Countdown.ToString()}s");
var infoText = Loc.GetString($"comms-console-menu-time-remaining",
("time", Owner.Countdown.ToString()));
CountdownLabel.SetMessage(infoText);
}

public override void Close()
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Fax/AdminUI/AdminFaxEui.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public AdminFaxEui()
_window.OnClose += () => SendMessage(new AdminFaxEuiMsg.Close());
_window.OnFollowFax += entity => SendMessage(new AdminFaxEuiMsg.Follow(entity));
_window.OnMessageSend += args => SendMessage(new AdminFaxEuiMsg.Send(args.entity, args.title,
args.stampedBy, args.message, args.stampSprite, args.stampColor));
args.stampedBy, args.message, args.stampSprite, args.stampColor, args.locked));
}

public override void Opened()
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Fax/AdminUI/AdminFaxWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</BoxContainer>
<Label Text="{Loc admin-fax-stamp-color}" />
<ColorSelectorSliders Margin="12 0 0 0" Name="StampColorSelector" Color="#BB3232"/>
<Control MinHeight="10" />
<Button Name="SendButton" Text="{Loc admin-fax-send}"></Button>
<CheckBox Name="LockPageCheckbox" Text="{Loc admin-fax-lock-page}" ToolTip="{Loc admin-fax-lock-page-tooltip}"/>
<Button Name="SendButton" Text="{Loc admin-fax-send}" Margin="0 10 0 0" />
</BoxContainer>
</DefaultWindow>
5 changes: 3 additions & 2 deletions Content.Client/Fax/AdminUI/AdminFaxWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public sealed partial class AdminFaxWindow : DefaultWindow
{
private const string StampsRsiPath = "/Textures/Objects/Misc/bureaucracy.rsi";

public Action<(NetEntity entity, string title, string stampedBy, string message, string stampSprite, Color stampColor)>? OnMessageSend;
public Action<(NetEntity entity, string title, string stampedBy, string message, string stampSprite, Color stampColor, bool locked)>? OnMessageSend;
public Action<NetEntity>? OnFollowFax;

[Dependency] private readonly IResourceCache _resCache = default!;
Expand Down Expand Up @@ -98,6 +98,7 @@ private void SendMessage(BaseButton.ButtonEventArgs obj)

var from = FromEdit.Text;
var stampColor = StampColorSelector.Color;
OnMessageSend?.Invoke((faxEntity.Value, title, from, message, stamp, stampColor));
var locked = LockPageCheckbox.Pressed;
OnMessageSend?.Invoke((faxEntity.Value, title, from, message, stamp, stampColor, locked));
}
}
3 changes: 3 additions & 0 deletions Content.Client/Jittering/JitteringSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ private void OnAnimationCompleted(EntityUid uid, JitteringComponent jittering, A
if(args.Key != _jitterAnimationKey)
return;

if (!args.Finished)
return;

if (TryComp(uid, out AnimationPlayerComponent? animationPlayer)
&& TryComp(uid, out SpriteComponent? sprite))
_animationPlayer.Play(uid, animationPlayer, GetAnimation(jittering, sprite), _jitterAnimationKey);
Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Launcher/LauncherConnectingGui.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private void HandleDisconnectReason(INetStructuredReason? reason)
private void ChangeLoginTip()
{
var tipsDataset = _cfg.GetCVar(CCVars.LoginTipsDataset);
var loginTipsEnabled = _prototype.TryIndex<DatasetPrototype>(tipsDataset, out var tips);
var loginTipsEnabled = _prototype.TryIndex<LocalizedDatasetPrototype>(tipsDataset, out var tips);

LoginTips.Visible = loginTipsEnabled;
if (!loginTipsEnabled)
Expand All @@ -131,7 +131,7 @@ private void ChangeLoginTip()

var randomIndex = _random.Next(tipList.Count);
var tip = tipList[randomIndex];
LoginTip.SetMessage(tip);
LoginTip.SetMessage(Loc.GetString(tip));

LoginTipTitle.Text = Loc.GetString("connecting-window-tip", ("numberTip", randomIndex));
}
Expand Down
3 changes: 3 additions & 0 deletions Content.Client/Light/EntitySystems/LightBehaviorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ public override void Initialize()

private void OnBehaviorAnimationCompleted(EntityUid uid, LightBehaviourComponent component, AnimationCompletedEvent args)
{
if (!args.Finished)
return;

var container = component.Animations.FirstOrDefault(x => x.FullKey == args.Key);

if (container == null)
Expand Down
3 changes: 3 additions & 0 deletions Content.Client/Light/EntitySystems/RotatingLightSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ private void OnAfterAutoHandleState(EntityUid uid, RotatingLightComponent comp,

private void OnAnimationComplete(EntityUid uid, RotatingLightComponent comp, AnimationCompletedEvent args)
{
if (!args.Finished)
return;

PlayAnimation(uid, comp);
}

Expand Down
Loading

0 comments on commit ca60793

Please sign in to comment.