Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into upstream-sync
Browse files Browse the repository at this point in the history
# Conflicts:
#	Content.Client/Preferences/UI/HumanoidProfileEditor.xaml.cs
#	Content.Shared/Humanoid/HumanoidAppearanceComponent.cs
#	Content.Shared/Humanoid/HumanoidCharacterAppearance.cs
#	Resources/Audio/Announcements/license.txt
#	Resources/Prototypes/Entities/Mobs/Customization/Markings/cat_parts.yml
#	Resources/Textures/Objects/Storage/boxes.rsi/meta.json
  • Loading branch information
Morb0 committed Mar 7, 2023
2 parents 1ae22bc + f57c54c commit 82a466f
Show file tree
Hide file tree
Showing 466 changed files with 6,658 additions and 2,177 deletions.
29 changes: 9 additions & 20 deletions .github/workflows/build-test-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,11 @@ name: Build & Test Debug

on:
push:
branches: [ master ]
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
- '**.git**'
- '**.yml'
# no docs on which one of these is supposed to work, so
# why not just do both
- 'RobustToolbox'
- 'RobustToolbox/**'
branches: [ master, staging, trying ]
merge_group:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
branches: [ master ]
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
- '**.git**'
- '**.yml'
- 'RobustToolbox'
- 'RobustToolbox/**'


jobs:
build:
Expand Down Expand Up @@ -71,3 +52,11 @@ jobs:
run: |
$env:DOTNET_gcServer=1
dotnet test --no-build Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0
ci-success:
name: Build & Test Debug
needs:
- build
runs-on: ubuntu-latest
steps:
- name: CI succeeded
run: exit 0
28 changes: 9 additions & 19 deletions .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,11 @@ name: Build & Test Release

on:
push:
branches: [ master ]
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
- '**.git**'
- '**.yml'
# no docs on which one of these is supposed to work, so
# why not just do both
- 'RobustToolbox'
- 'RobustToolbox/**'
branches: [ master, staging, trying ]
merge_group:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]
branches: [ master ]
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
- '**.git**'
- '**.yml'
- 'RobustToolbox'
- 'RobustToolbox/**'

jobs:
build:
Expand Down Expand Up @@ -70,3 +52,11 @@ jobs:
run: |
$env:DOTNET_gcServer=1
dotnet test --no-build Content.IntegrationTests/Content.IntegrationTests.csproj -- NUnit.ConsoleOut=0
ci-success:
name: Build & Test Release
needs:
- build
runs-on: ubuntu-latest
steps:
- name: CI succeeded
run: exit 0
3 changes: 2 additions & 1 deletion .github/workflows/test-packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

on:
push:
branches: [ master ]
branches: [ master, staging, trying ]
paths:
- '**.cs'
- '**.csproj'
Expand All @@ -28,6 +28,7 @@ on:

jobs:
build:
name: Test Packaging
if: github.actor != 'PJBot' && github.event.pull_request.draft == false
runs-on: ubuntu-latest

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validate-rgas.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: YAML schema validator
on:
push:
branches: [ master, staging, trying ]
merge_group:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]

jobs:
yaml-schema-validation:
name: YAML RGA schema validator
if: github.actor != 'PJBot' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validate-rsis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: RSI Validator

on:
push:
branches: [ staging, trying ]
merge_group:
pull_request:
paths:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/validate_mapfiles.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: YAML schema validator
on:
push:
branches: [ master, staging, trying ]
merge_group:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]

jobs:
yaml-schema-validation:
name: YAML map schema validator
if: github.actor != 'PJBot' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/yaml-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ name: YAML Linter

on:
push:
branches: [ master, staging, trying ]
merge_group:
pull_request:
types: [ opened, reopened, synchronize, ready_for_review ]

jobs:
build:
name: YAML Linter
if: github.actor != 'PJBot' && github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
Expand Down
6 changes: 6 additions & 0 deletions BuildChecker/BuildChecker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<OutputPath>bin\Release\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Tools|AnyCPU' ">
<OutputPath>bin\Tools\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'DebugOpt|AnyCPU' ">
<OutputPath>bin\DebugOpt\</OutputPath>
</PropertyGroup>
<Target Name="Build">
<Exec Command="$(Python) git_helper.py" CustomErrorRegularExpression="^Error" />
</Target>
Expand Down
1 change: 0 additions & 1 deletion Content.Benchmarks/Content.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@
<ProjectReference Include="..\RobustToolbox\Robust.Shared.Maths\Robust.Shared.Maths.csproj" />
<ProjectReference Include="..\RobustToolbox\Robust.Shared\Robust.Shared.csproj" />
</ItemGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.Analyzers.targets" />
</Project>
2 changes: 0 additions & 2 deletions Content.Client/Access/UI/IdCardConsoleBoundUserInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Robust.Client.GameObjects;
using Robust.Shared.Prototypes;
using static Content.Shared.Access.Components.SharedIdCardConsoleComponent;

namespace Content.Client.Access.UI
{
public sealed class IdCardConsoleBoundUserInterface : BoundUserInterface
Expand All @@ -16,7 +15,6 @@ public sealed class IdCardConsoleBoundUserInterface : BoundUserInterface
public IdCardConsoleBoundUserInterface(ClientUserInterfaceComponent owner, Enum uiKey) : base(owner, uiKey)
{
}

private IdCardConsoleWindow? _window;

protected override void Open()
Expand Down
12 changes: 11 additions & 1 deletion Content.Client/Administration/Managers/ClientAdminManager.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
using Content.Shared.Administration;
using Content.Shared.Administration.Managers;
using Robust.Client.Console;
using Robust.Client.Player;
using Robust.Shared.ContentPack;
using Robust.Shared.Network;
using Robust.Shared.Utility;

namespace Content.Client.Administration.Managers
{
public sealed class ClientAdminManager : IClientAdminManager, IClientConGroupImplementation, IPostInjectInit
public sealed class ClientAdminManager : IClientAdminManager, IClientConGroupImplementation, IPostInjectInit, ISharedAdminManager
{
[Dependency] private readonly IPlayerManager _player = default!;
[Dependency] private readonly IClientNetManager _netMgr = default!;
[Dependency] private readonly IClientConGroupController _conGroup = default!;
[Dependency] private readonly IResourceManager _res = default!;
Expand Down Expand Up @@ -111,5 +114,12 @@ void IPostInjectInit.PostInject()
{
_conGroup.Implementation = this;
}

public AdminData? GetAdminData(EntityUid uid, bool includeDeAdmin = false)
{
return uid == _player.LocalPlayer?.ControlledEntity
? _adminData
: null;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void SetRoundSpinBox(int round)
UpdateResetButton();
}

private void RoundSpinBoxChanged(object? sender, ValueChangedEventArgs args)
private void RoundSpinBoxChanged(ValueChangedEventArgs args)
{
UpdateResetButton();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ private void OnResetButtonPressed(BaseButton.ButtonEventArgs obj)
Reset();
}

private void OnRotate(object? sender, ValueChangedEventArgs e)
private void OnRotate(ValueChangedEventArgs e)
{
var newValue = Wraparound(e.Value);

Expand Down
21 changes: 18 additions & 3 deletions Content.Client/Atmos/EntitySystems/AtmosPipeAppearanceSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@ private void OnInit(EntityUid uid, PipeAppearanceComponent component, ComponentI
}
}

private void HideAllPipeConnection(SpriteComponent sprite)
{
foreach (PipeConnectionLayer layerKey in Enum.GetValues(typeof(PipeConnectionLayer)))
{
if (!sprite.LayerMapTryGet(layerKey, out var key))
continue;

var layer = sprite[key];
layer.Visible = false;
}
}

private void OnAppearanceChanged(EntityUid uid, PipeAppearanceComponent component, ref AppearanceChangeEvent args)
{
if (args.Sprite == null)
Expand All @@ -56,11 +68,14 @@ private void OnAppearanceChanged(EntityUid uid, PipeAppearanceComponent componen
return;
}

if (!_appearance.TryGetData<Color>(uid, PipeColorVisuals.Color, out var color, args.Component))
color = Color.White;

if (!_appearance.TryGetData<PipeDirection>(uid, PipeVisuals.VisualState, out var worldConnectedDirections, args.Component))
{
HideAllPipeConnection(args.Sprite);
return;
}

if (!_appearance.TryGetData<Color>(uid, PipeColorVisuals.Color, out var color, args.Component))
color = Color.White;

// transform connected directions to local-coordinates
var connectedDirections = worldConnectedDirections.RotatePipeDirection(-Transform(uid).LocalRotation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ private void RemoveOrder(ButtonEventArgs args)
if (args.Button.Parent?.Parent is not CargoOrderRow row || row.Order == null)
return;

SendMessage(new CargoConsoleRemoveOrderMessage(row.Order.OrderIndex));
SendMessage(new CargoConsoleRemoveOrderMessage(row.Order.OrderId));
}

private void ApproveOrder(ButtonEventArgs args)
Expand All @@ -169,7 +169,7 @@ private void ApproveOrder(ButtonEventArgs args)
if (OrderCount >= OrderCapacity)
return;

SendMessage(new CargoConsoleApproveOrderMessage(row.Order.OrderIndex));
SendMessage(new CargoConsoleApproveOrderMessage(row.Order.OrderId));
// Most of the UI isn't predicted anyway so.
// _menu?.UpdateCargoCapacity(OrderCount + row.Order.Amount, OrderCapacity);
}
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public void PopulateOrders(IEnumerable<CargoOrderData> orders)
Text = Loc.GetString(
"cargo-console-menu-populate-orders-cargo-order-row-product-name-text",
("productName", productName),
("orderAmount", order.Amount),
("orderAmount", order.OrderQuantity),
("orderRequester", order.Requester))
},
Description = {Text = Loc.GetString("cargo-console-menu-order-reason-description",
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Cargo/UI/CargoShuttleMenu.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public void SetOrders(List<CargoOrderData> orders)
Text = Loc.GetString(
"cargo-console-menu-populate-orders-cargo-order-row-product-name-text",
("productName", productName),
("orderAmount", order.Amount),
("orderAmount", order.OrderQuantity - order.NumDispatched),
("orderRequester", order.Requester))
},
Description = {Text = Loc.GetString("cargo-console-menu-order-reason-description",
Expand Down
12 changes: 2 additions & 10 deletions Content.Client/Construction/ConstructionPlacementHijack.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Linq;
using Content.Shared.Construction;
using Content.Shared.Construction.Prototypes;
using Robust.Client.Graphics;
Expand Down Expand Up @@ -49,16 +50,7 @@ public override bool HijackDeletion(EntityUid entity)
public override void StartHijack(PlacementManager manager)
{
base.StartHijack(manager);

var frame = _prototype?.Icon.DirFrame0();
if (frame == null)
{
manager.CurrentTextures = null;
}
else
{
manager.CurrentTextures = new List<IDirectionalTextureProvider> {frame};
}
manager.CurrentTextures = _prototype?.Layers.Select(sprite => sprite.DirFrame0()).ToList();
}
}
}
12 changes: 8 additions & 4 deletions Content.Client/Construction/ConstructionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,14 @@ public void SpawnGhost(ConstructionPrototype prototype, EntityCoordinates loc, D
_ghosts.Add(comp.GhostId, comp);
var sprite = EntityManager.GetComponent<SpriteComponent>(ghost);
sprite.Color = new Color(48, 255, 48, 128);
sprite.AddBlankLayer(0); // There is no way to actually check if this already exists, so we blindly insert a new one
sprite.LayerSetSprite(0, prototype.Icon);
sprite.LayerSetShader(0, "unshaded");
sprite.LayerSetVisible(0, true);

for (int i = 0; i < prototype.Layers.Count; i++)
{
sprite.AddBlankLayer(i); // There is no way to actually check if this already exists, so we blindly insert a new one
sprite.LayerSetSprite(i, prototype.Layers[i]);
sprite.LayerSetShader(i, "unshaded");
sprite.LayerSetVisible(i, true);
}

if (prototype.CanBuildInImpassable)
EnsureComp<WallMountComponent>(ghost).Arc = new(Math.Tau);
Expand Down
9 changes: 8 additions & 1 deletion Content.Client/Construction/UI/ConstructionMenuPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,14 @@ private void BuildButtonToggled(bool pressed)

private void UpdateGhostPlacement()
{
if (_selected == null || _selected.Type != ConstructionType.Structure) return;
if (_selected == null)
return;

if (_selected.Type != ConstructionType.Structure)
{
_placementManager.Clear();
return;
}

var constructSystem = _systemManager.GetEntitySystem<ConstructionSystem>();

Expand Down
7 changes: 4 additions & 3 deletions Content.Client/Content.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<PropertyGroup>
<!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework>
Expand All @@ -10,8 +9,9 @@
<OutputType Condition="'$(FullRelease)' != 'True'">Exe</OutputType>
<WarningsAsErrors>nullable</WarningsAsErrors>
<Nullable>enable</Nullable>
<Configurations>Debug;Release;Tools;DebugOpt</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
<Import Project="..\RobustToolbox\MSBuild\Robust.DefineConstants.targets" />
<ItemGroup>
<PackageReference Include="Nett" Version="0.15.0" />
<PackageReference Include="JetBrains.Annotations" Version="2022.1.0" PrivateAssets="All" />
Expand All @@ -34,6 +34,7 @@
<DependentUpon>StrippingWindow.xaml</DependentUpon>
</Compile>
</ItemGroup>

<Import Project="..\RobustToolbox\MSBuild\Robust.Properties.targets" />
<Import Project="..\RobustToolbox\MSBuild\XamlIL.targets" />
<Import Project="..\RobustToolbox\MSBuild\Robust.Analyzers.targets" />
</Project>
Loading

0 comments on commit 82a466f

Please sign in to comment.