Skip to content

Commit

Permalink
Merge pull request #149 from xtray85/upstream2
Browse files Browse the repository at this point in the history
Upstream2
  • Loading branch information
xtray85 authored Nov 22, 2023
2 parents 8a40c10 + adb3e48 commit 01c58f2
Show file tree
Hide file tree
Showing 957 changed files with 643,457 additions and 588,195 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,17 @@ jobs:
cd RobustToolbox
git fetch --depth=1
- name: Package all
run: |
Tools/package_server_build.py -p linux-x64
Tools/package_client_build.py
- name: Install dependencies
run: dotnet restore

- name: Build Packaging
run: dotnet build Content.Packaging --configuration Release --no-restore /m

- name: Package server
run: dotnet run --project Content.Packaging server --platform linux-x64

- name: Package client
run: dotnet run --project Content.Packaging client --no-wipe-release

- name: Update Build Info
run: Tools/gen_build_info.py
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/test-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,15 @@ jobs:
- name: Install dependencies
run: dotnet restore

- name: Package client
run: |
Tools/package_server_build.py -p win-x64 linux-x64 osx-x64 linux-arm64
Tools/package_client_build.py
- name: Build Packaging
run: dotnet build Content.Packaging --configuration Release --no-restore /m

- name: Package server
run: dotnet run --project Content.Packaging server --platform win-x64 --platform linux-x64 --platform osx-x64 --platform linux-arm64

- name: Package client
run: dotnet run --project Content.Packaging client --no-wipe-release

- name: Update Build Info
run: Tools/gen_build_info.py

Expand Down
1 change: 1 addition & 0 deletions Content.Client/Actions/ActionsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Robust.Shared.ContentPack;
using Robust.Shared.GameStates;
using Robust.Shared.Input.Binding;
using Robust.Shared.Player;
using Robust.Shared.Serialization.Manager;
using Robust.Shared.Serialization.Markdown;
using Robust.Shared.Serialization.Markdown.Mapping;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private void PlayerListItemPressed(BaseButton.ButtonEventArgs? args, ListData? d
}
else if (args.Event.Function == EngineKeyFunctions.UseSecondary && selectedPlayer.NetEntity != null)
{
_uiManager.GetUIController<VerbMenuUIController>().OpenVerbMenu(_entManager.GetEntity(selectedPlayer.NetEntity.Value));
_uiManager.GetUIController<VerbMenuUIController>().OpenVerbMenu(selectedPlayer.NetEntity.Value, true);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ namespace Content.Client.Administration.UI.Tabs.PlayerTab
[GenerateTypedNameReferences]
public sealed partial class PlayerTab : Control
{
[Dependency] private readonly IEntityManager _entManager = default!;
[Dependency] private readonly IPlayerManager _playerMan = default!;

private const string ArrowUp = "↑";
private const string ArrowDown = "↓";
private readonly Color _altColor = Color.FromHex("#292B38");
private readonly Color _defaultColor = Color.FromHex("#2F2F3B");
private IEntityManager _entManager;
private readonly AdminSystem _adminSystem;
private IReadOnlyList<PlayerInfo> _players = new List<PlayerInfo>();

Expand All @@ -30,7 +32,7 @@ public sealed partial class PlayerTab : Control

public PlayerTab()
{
_entManager = IoCManager.Resolve<IEntityManager>();
IoCManager.InjectDependencies(this);
_adminSystem = _entManager.System<AdminSystem>();
RobustXamlLoader.Load(this);
RefreshPlayerList(_adminSystem.PlayerList);
Expand Down Expand Up @@ -95,13 +97,11 @@ private void RefreshPlayerList(IReadOnlyList<PlayerInfo> players)
foreach (var child in PlayerList.Children.ToArray())
{
if (child is PlayerTabEntry)
child.Orphan();
child.Dispose();
}

_players = players;

var playerManager = IoCManager.Resolve<IPlayerManager>();
PlayerCount.Text = $"Players: {playerManager.PlayerCount}";
PlayerCount.Text = $"Players: {_playerMan.PlayerCount}";

var sortedPlayers = new List<PlayerInfo>(players);
sortedPlayers.Sort(Compare);
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Alerts/ClientAlertsSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Content.Shared.Alert;
using JetBrains.Annotations;
using Robust.Client.Player;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;

namespace Content.Client.Alerts;
Expand Down
3 changes: 2 additions & 1 deletion Content.Client/Chat/UI/SpeechBubble.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public static SpeechBubble CreateSpeechBubble(SpeechType type, string text, Enti
return new TextSpeechBubble(text, senderEntity, eyeManager, chatManager, entityManager, "whisperBox");

case SpeechType.Looc:
return new TextSpeechBubble(text, senderEntity, eyeManager, chatManager, entityManager, "sayBox", Color.FromHex("#48d1cc"));
return new TextSpeechBubble(text, senderEntity, eyeManager, chatManager, entityManager, "emoteBox", Color.FromHex("#48d1cc"));

default:
throw new ArgumentOutOfRangeException();
Expand Down Expand Up @@ -181,6 +181,7 @@ protected override Control BuildBubble(string text, string speechStyleClass, Col
{
MaxWidth = 256,
};

if (fontColor != null)
{
var msg = new FormattedMessage();
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Construction/ConstructionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
using Robust.Shared.Input;
using Robust.Shared.Input.Binding;
using Robust.Shared.Map;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;

namespace Content.Client.Construction
Expand Down
8 changes: 8 additions & 0 deletions Content.Client/Construction/UI/ConstructionMenuPresenter.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
using System.Linq;
using Content.Client.UserInterface.Systems.MenuBar.Widgets;
using Content.Shared.Construction.Prototypes;
using Content.Shared.Tag;
using Robust.Client.GameObjects;
using Robust.Client.Graphics;
using Robust.Client.Placement;
using Robust.Client.Player;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.Utility;
Expand All @@ -25,6 +27,7 @@ internal sealed class ConstructionMenuPresenter : IDisposable
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;
[Dependency] private readonly IPlacementManager _placementManager = default!;
[Dependency] private readonly IUserInterfaceManager _uiManager = default!;
[Dependency] private readonly IPlayerManager _playerManager = default!;

private readonly IConstructionMenuView _constructionView;

Expand Down Expand Up @@ -152,6 +155,11 @@ private void OnViewPopulateRecipes(object? sender, (string search, string catago
if (recipe.Hide)
continue;

if (_playerManager.LocalSession == null
|| _playerManager.LocalEntity == null
|| (recipe.EntityWhitelist != null && !recipe.EntityWhitelist.IsValid(_playerManager.LocalEntity.Value)))
continue;

if (!string.IsNullOrEmpty(search))
{
if (!recipe.Name.ToLowerInvariant().Contains(search.Trim().ToLowerInvariant()))
Expand Down
1 change: 1 addition & 0 deletions Content.Client/Drugs/DrugOverlaySystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Content.Shared.Drugs;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Player;

namespace Content.Client.Drugs;

Expand Down
1 change: 1 addition & 0 deletions Content.Client/Drunk/DrunkSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Content.Shared.Drunk;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Player;

namespace Content.Client.Drunk;

Expand Down
1 change: 1 addition & 0 deletions Content.Client/Eye/Blinding/BlindingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using Robust.Client.Player;
using Content.Shared.Eye.Blinding.Components;
using Content.Shared.GameTicking;
using Robust.Shared.Player;

namespace Content.Client.Eye.Blinding;

Expand Down
1 change: 1 addition & 0 deletions Content.Client/Eye/Blinding/BlurryVisionSystem.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using Content.Shared.Eye.Blinding.Components;
using Robust.Client.Graphics;
using Robust.Client.Player;
using Robust.Shared.Player;

namespace Content.Client.Eye.Blinding;

Expand Down
1 change: 1 addition & 0 deletions Content.Client/Eye/EyeLerpingSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using Robust.Client.GameObjects;
using Robust.Client.Physics;
using Robust.Client.Player;
using Robust.Shared.Player;
using Robust.Shared.Timing;

namespace Content.Client.Eye;
Expand Down
3 changes: 2 additions & 1 deletion Content.Client/Gateway/UI/GatewayBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ protected override void Open()
{
base.Open();

_window = new GatewayWindow();
_window = new GatewayWindow(EntMan.GetNetEntity(Owner));

_window.OpenPortal += destination =>
{
SendMessage(new GatewayOpenPortalMessage(destination));
Expand Down
25 changes: 20 additions & 5 deletions Content.Client/Gateway/UI/GatewayWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,26 @@
Title="{Loc 'gateway-window-title'}"
MinSize="800 360">
<BoxContainer Orientation="Vertical">
<BoxContainer Orientation="Horizontal">
<Label Name="NextCloseLabel"
Text="{Loc 'gateway-window-portal-closing'}"
Margin="5"></Label>
<ProgressBar Name="NextCloseBar"
<BoxContainer Orientation="Horizontal">
<!-- This is wide as shit but makes it consistent with the cooldown label +
handles localisations a bit better -->
<Label Name="NextUnlockLabel"
Text="{Loc 'gateway-window-portal-unlock'}"
Margin="5"
SetWidth="128"/>
<ProgressBar Name="NextUnlockBar"
HorizontalExpand="True"
MinValue="0"
MaxValue="1"
SetHeight="25"/>
<Label Name="NextUnlockText" Text="0" Margin="5"/>
</BoxContainer>
<BoxContainer Orientation="Horizontal">
<Label Name="NextReadyLabel"
Text="{Loc 'gateway-window-portal-cooldown'}"
Margin="5"
SetWidth="128"/>
<ProgressBar Name="NextReadyBar"
HorizontalExpand="True"
MinValue="0"
MaxValue="1"
Expand Down
Loading

0 comments on commit 01c58f2

Please sign in to comment.