Skip to content

Commit 928d398

Browse files
authored
Merge branch 'SerbiaStrong-220:master' into FixTiles
2 parents ce3eb00 + 9148647 commit 928d398

File tree

1,610 files changed

+342951
-220826
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,610 files changed

+342951
-220826
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,9 @@ resharper_keep_existing_attribute_arrangement = true
344344
resharper_wrap_chained_binary_patterns = chop_if_long
345345
resharper_wrap_chained_method_calls = chop_if_long
346346
resharper_csharp_trailing_comma_in_multiline_lists = true
347+
resharper_csharp_qualified_using_at_nested_scope = false
348+
resharper_csharp_prefer_qualified_reference = false
349+
resharper_csharp_allow_alias = false
347350

348351
[*.{csproj,xml,yml,yaml,dll.config,msbuildproj,targets,props}]
349352
indent_size = 2

.github/workflows/publish-testing.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Publish Testing
2+
3+
concurrency:
4+
group: publish-testing
5+
6+
on:
7+
workflow_dispatch:
8+
schedule:
9+
- cron: '0 10 * * *'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/[email protected]
17+
with:
18+
submodules: 'recursive'
19+
- name: Setup .NET Core
20+
uses: actions/[email protected]
21+
with:
22+
dotnet-version: 9.0.x
23+
24+
- name: Get Engine Tag
25+
run: |
26+
cd RobustToolbox
27+
git fetch --depth=1
28+
29+
- name: Install dependencies
30+
run: dotnet restore
31+
32+
- name: Build Packaging
33+
run: dotnet build Content.Packaging --configuration Release --no-restore /m
34+
35+
- name: Package server
36+
run: dotnet run --project Content.Packaging server --platform win-x64 --platform linux-x64 --platform osx-x64 --platform linux-arm64
37+
38+
- name: Package client
39+
run: dotnet run --project Content.Packaging client --no-wipe-release
40+
41+
- name: Publish version
42+
run: Tools/publish_multi_request.py --fork-id wizards-testing
43+
env:
44+
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
45+
GITHUB_REPOSITORY: ${{ vars.GITHUB_REPOSITORY }}

BuildChecker/BuildChecker.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ You want to handle the Build, Clean and Rebuild tasks to prevent missing task er
1212
If you want to learn more about these kinds of things, check out Microsoft's official documentation about MSBuild:
1313
https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild
1414
-->
15-
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
15+
<Project Sdk="Microsoft.NET.Sdk">
1616
<PropertyGroup>
1717
<Python>python3</Python>
1818
<Python Condition="'$(OS)'=='Windows_NT' Or '$(OS)'=='Windows'">py -3</Python>
1919
<ProjectGuid>{C899FCA4-7037-4E49-ABC2-44DE72487110}</ProjectGuid>
20-
<TargetFrameworkMoniker>.NETFramework, Version=v4.7.2</TargetFrameworkMoniker>
20+
<TargetFramework>net4.7.2</TargetFramework>
2121
<RestorePackages>false</RestorePackages>
2222
</PropertyGroup>
2323
<PropertyGroup>

Content.Benchmarks/MapLoadBenchmark.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public async Task Cleanup()
4646
PoolManager.Shutdown();
4747
}
4848

49-
public static readonly string[] MapsSource = { "Empty", "Satlern", "Box", "Bagel", "Dev", "CentComm", "Core", "TestTeg", "Packed", "Omega", "Reach", "Meta", "Marathon", "MeteorArena", "Fland", "Oasis", "Cog" };
49+
public static readonly string[] MapsSource = { "Empty", "Satlern", "Box", "Bagel", "Dev", "CentComm", "Core", "TestTeg", "Packed", "Omega", "Reach", "Meta", "Marathon", "MeteorArena", "Fland", "Oasis", "Convex"};
5050

5151
[ParamsSource(nameof(MapsSource))]
5252
public string Map;

Content.Client/Actions/ActionsSystem.cs

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ private void BaseHandleState<T>(EntityUid uid, BaseActionComponent component, Ba
137137
component.Priority = state.Priority;
138138
component.AttachedEntity = EnsureEntity<T>(state.AttachedEntity, uid);
139139
component.RaiseOnUser = state.RaiseOnUser;
140+
component.RaiseOnAction = state.RaiseOnAction;
140141
component.AutoPopulate = state.AutoPopulate;
141142
component.Temporary = state.Temporary;
142143
component.ItemIconStyle = state.ItemIconStyle;

Content.Client/Atmos/EntitySystems/GasTileOverlaySystem.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ public sealed class GasTileOverlaySystem : SharedGasTileOverlaySystem
1616
[Dependency] private readonly IResourceCache _resourceCache = default!;
1717
[Dependency] private readonly IOverlayManager _overlayMan = default!;
1818
[Dependency] private readonly SpriteSystem _spriteSys = default!;
19+
[Dependency] private readonly SharedTransformSystem _xformSys = default!;
1920

2021
private GasTileOverlay _overlay = default!;
2122

@@ -25,7 +26,7 @@ public override void Initialize()
2526
SubscribeNetworkEvent<GasOverlayUpdateEvent>(HandleGasOverlayUpdate);
2627
SubscribeLocalEvent<GasTileOverlayComponent, ComponentHandleState>(OnHandleState);
2728

28-
_overlay = new GasTileOverlay(this, EntityManager, _resourceCache, ProtoMan, _spriteSys);
29+
_overlay = new GasTileOverlay(this, EntityManager, _resourceCache, ProtoMan, _spriteSys, _xformSys);
2930
_overlayMan.AddOverlay(_overlay);
3031
}
3132

Content.Client/Atmos/Overlays/GasTileOverlay.cs

+8-4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public sealed class GasTileOverlay : Overlay
2121
{
2222
private readonly IEntityManager _entManager;
2323
private readonly IMapManager _mapManager;
24+
private readonly SharedTransformSystem _xformSys;
2425

2526
public override OverlaySpace Space => OverlaySpace.WorldSpaceEntities | OverlaySpace.WorldSpaceBelowWorld;
2627
private readonly ShaderInstance _shader;
@@ -46,10 +47,11 @@ public sealed class GasTileOverlay : Overlay
4647

4748
public const int GasOverlayZIndex = (int) Shared.DrawDepth.DrawDepth.Effects; // Under ghosts, above mostly everything else
4849

49-
public GasTileOverlay(GasTileOverlaySystem system, IEntityManager entManager, IResourceCache resourceCache, IPrototypeManager protoMan, SpriteSystem spriteSys)
50+
public GasTileOverlay(GasTileOverlaySystem system, IEntityManager entManager, IResourceCache resourceCache, IPrototypeManager protoMan, SpriteSystem spriteSys, SharedTransformSystem xformSys)
5051
{
5152
_entManager = entManager;
5253
_mapManager = IoCManager.Resolve<IMapManager>();
54+
_xformSys = xformSys;
5355
_shader = protoMan.Index<ShaderPrototype>("unshaded").Instance();
5456
ZIndex = GasOverlayZIndex;
5557

@@ -158,7 +160,8 @@ protected override void Draw(in OverlayDrawArgs args)
158160
_fireFrameCounter,
159161
_shader,
160162
overlayQuery,
161-
xformQuery);
163+
xformQuery,
164+
_xformSys);
162165

163166
var mapUid = _mapManager.GetMapEntityId(args.MapId);
164167

@@ -180,15 +183,16 @@ protected override void Draw(in OverlayDrawArgs args)
180183
int[] fireFrameCounter,
181184
ShaderInstance shader,
182185
EntityQuery<GasTileOverlayComponent> overlayQuery,
183-
EntityQuery<TransformComponent> xformQuery) state) =>
186+
EntityQuery<TransformComponent> xformQuery,
187+
SharedTransformSystem xformSys) state) =>
184188
{
185189
if (!state.overlayQuery.TryGetComponent(uid, out var comp) ||
186190
!state.xformQuery.TryGetComponent(uid, out var gridXform))
187191
{
188192
return true;
189193
}
190194

191-
var (_, _, worldMatrix, invMatrix) = gridXform.GetWorldPositionRotationMatrixWithInv();
195+
var (_, _, worldMatrix, invMatrix) = state.xformSys.GetWorldPositionRotationMatrixWithInv(gridXform);
192196
state.drawHandle.SetTransform(worldMatrix);
193197
var floatBounds = invMatrix.TransformBox(state.WorldBounds).Enlarged(grid.TileSize);
194198
var localBounds = new Box2i(

Content.Client/Atmos/UI/SpaceHeaterWindow.xaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<DefaultWindow xmlns="https://spacestation14.io"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
MinSize="280 160" Title="Temperature Control Unit">
3+
MinSize="280 160" Title="{Loc comp-space-heater-ui-title}">
44

55
<BoxContainer Name="VboxContainer" Orientation="Vertical" Margin="5 5 5 5" SeparationOverride="10">
66

Content.Client/Cargo/BUI/CargoBountyConsoleBoundUserInterface.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,6 @@ protected override void UpdateState(BoundUserInterfaceState message)
3939
if (message is not CargoBountyConsoleState state)
4040
return;
4141

42-
_menu?.UpdateEntries(state.Bounties, state.UntilNextSkip);
42+
_menu?.UpdateEntries(state.Bounties, state.History, state.UntilNextSkip);
4343
}
4444
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<BoxContainer xmlns="https://spacestation14.io"
2+
xmlns:customControls="clr-namespace:Content.Client.Administration.UI.CustomControls"
3+
Margin="10 10 10 0"
4+
HorizontalExpand="True">
5+
<PanelContainer StyleClasses="AngleRect" HorizontalExpand="True">
6+
<BoxContainer Orientation="Vertical"
7+
HorizontalExpand="True">
8+
<BoxContainer Orientation="Horizontal">
9+
<BoxContainer Orientation="Vertical" HorizontalExpand="True">
10+
<RichTextLabel Name="RewardLabel"/>
11+
<RichTextLabel Name="ManifestLabel"/>
12+
</BoxContainer>
13+
<BoxContainer Orientation="Vertical" MinWidth="120" Margin="0 0 10 0">
14+
<RichTextLabel Name="TimestampLabel" HorizontalAlignment="Right" />
15+
<RichTextLabel Name="IdLabel" HorizontalAlignment="Right" />
16+
</BoxContainer>
17+
</BoxContainer>
18+
<customControls:HSeparator Margin="5 10 5 10"/>
19+
<RichTextLabel Name="NoticeLabel" />
20+
</BoxContainer>
21+
</PanelContainer>
22+
</BoxContainer>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
using Content.Client.Message;
2+
using Content.Shared.Cargo;
3+
using Content.Shared.Cargo.Prototypes;
4+
using Robust.Client.AutoGenerated;
5+
using Robust.Client.UserInterface.Controls;
6+
using Robust.Client.UserInterface.XAML;
7+
using Robust.Shared.Prototypes;
8+
using Robust.Shared.Timing;
9+
10+
namespace Content.Client.Cargo.UI;
11+
12+
[GenerateTypedNameReferences]
13+
public sealed partial class BountyHistoryEntry : BoxContainer
14+
{
15+
[Dependency] private readonly IPrototypeManager _prototype = default!;
16+
17+
public BountyHistoryEntry(CargoBountyHistoryData bounty)
18+
{
19+
RobustXamlLoader.Load(this);
20+
IoCManager.InjectDependencies(this);
21+
22+
if (!_prototype.TryIndex(bounty.Bounty, out var bountyPrototype))
23+
return;
24+
25+
var items = new List<string>();
26+
foreach (var entry in bountyPrototype.Entries)
27+
{
28+
items.Add(Loc.GetString("bounty-console-manifest-entry",
29+
("amount", entry.Amount),
30+
("item", Loc.GetString(entry.Name))));
31+
}
32+
33+
ManifestLabel.SetMarkup(Loc.GetString("bounty-console-manifest-label", ("item", string.Join(", ", items))));
34+
RewardLabel.SetMarkup(Loc.GetString("bounty-console-reward-label", ("reward", bountyPrototype.Reward)));
35+
IdLabel.SetMarkup(Loc.GetString("bounty-console-id-label", ("id", bounty.Id)));
36+
37+
TimestampLabel.SetMarkup(bounty.Timestamp.ToString(@"hh\:mm\:ss"));
38+
39+
if (bounty.Result == CargoBountyHistoryData.BountyResult.Completed)
40+
{
41+
NoticeLabel.SetMarkup(Loc.GetString("bounty-console-history-notice-completed-label"));
42+
}
43+
else
44+
{
45+
NoticeLabel.SetMarkup(Loc.GetString("bounty-console-history-notice-skipped-label",
46+
("id", bounty.ActorName ?? "")));
47+
}
48+
}
49+
}

Content.Client/Cargo/UI/CargoBountyMenu.xaml

+22-9
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,28 @@
1111
<PanelContainer.PanelOverride>
1212
<gfx:StyleBoxFlat BackgroundColor="#1B1B1E" />
1313
</PanelContainer.PanelOverride>
14-
<ScrollContainer HScrollEnabled="False"
15-
HorizontalExpand="True"
16-
VerticalExpand="True">
17-
<BoxContainer Name="BountyEntriesContainer"
18-
Orientation="Vertical"
19-
VerticalExpand="True"
20-
HorizontalExpand="True">
21-
</BoxContainer>
22-
</ScrollContainer>
14+
<TabContainer Name="MasterTabContainer" VerticalExpand="True" HorizontalExpand="True">
15+
<ScrollContainer HScrollEnabled="False"
16+
HorizontalExpand="True"
17+
VerticalExpand="True">
18+
<BoxContainer Name="BountyEntriesContainer"
19+
Orientation="Vertical"
20+
VerticalExpand="True"
21+
HorizontalExpand="True" />
22+
</ScrollContainer>
23+
<ScrollContainer HScrollEnabled="False"
24+
HorizontalExpand="True"
25+
VerticalExpand="True">
26+
<Label Name="NoHistoryLabel"
27+
Text="{Loc 'bounty-console-history-empty-label'}"
28+
Visible="False"
29+
Align="Center" />
30+
<BoxContainer Name="BountyHistoryContainer"
31+
Orientation="Vertical"
32+
VerticalExpand="True"
33+
HorizontalExpand="True" />
34+
</ScrollContainer>
35+
</TabContainer>
2336
</PanelContainer>
2437
<!-- Footer -->
2538
<BoxContainer Orientation="Vertical">

Content.Client/Cargo/UI/CargoBountyMenu.xaml.cs

+20-1
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@ public sealed partial class CargoBountyMenu : FancyWindow
1515
public CargoBountyMenu()
1616
{
1717
RobustXamlLoader.Load(this);
18+
19+
MasterTabContainer.SetTabTitle(0, Loc.GetString("bounty-console-tab-available-label"));
20+
MasterTabContainer.SetTabTitle(1, Loc.GetString("bounty-console-tab-history-label"));
1821
}
1922

20-
public void UpdateEntries(List<CargoBountyData> bounties, TimeSpan untilNextSkip)
23+
public void UpdateEntries(List<CargoBountyData> bounties, List<CargoBountyHistoryData> history, TimeSpan untilNextSkip)
2124
{
2225
BountyEntriesContainer.Children.Clear();
2326
foreach (var b in bounties)
@@ -32,5 +35,21 @@ public void UpdateEntries(List<CargoBountyData> bounties, TimeSpan untilNextSkip
3235
{
3336
MinHeight = 10
3437
});
38+
39+
BountyHistoryContainer.Children.Clear();
40+
if (history.Count == 0)
41+
{
42+
NoHistoryLabel.Visible = true;
43+
}
44+
else
45+
{
46+
NoHistoryLabel.Visible = false;
47+
48+
// Show the history in reverse, so last entry is first in the list
49+
for (var i = history.Count - 1; i >= 0; i--)
50+
{
51+
BountyHistoryContainer.AddChild(new BountyHistoryEntry(history[i]));
52+
}
53+
}
3554
}
3655
}

Content.Client/Changelog/ChangelogWindow.xaml.cs

+20-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@
88
using Robust.Client.AutoGenerated;
99
using Robust.Client.UserInterface;
1010
using Robust.Client.UserInterface.XAML;
11+
using Robust.Shared;
12+
using Robust.Shared.Configuration;
1113
using Robust.Shared.Console;
1214

1315
namespace Content.Client.Changelog
1416
{
1517
[GenerateTypedNameReferences]
1618
public sealed partial class ChangelogWindow : FancyWindow
1719
{
18-
[Dependency] private readonly IClientAdminManager _adminManager = default!;
1920
[Dependency] private readonly ChangelogManager _changelog = default!;
21+
[Dependency] private readonly IClientAdminManager _adminManager = default!;
22+
[Dependency] private readonly IConfigurationManager _cfg = default!;
2023

2124
public ChangelogWindow()
2225
{
@@ -67,8 +70,22 @@ private async void PopulateChangelog()
6770
Tabs.SetTabTitle(i++, Loc.GetString($"changelog-tab-title-{changelog.Name}"));
6871
}
6972

70-
var version = typeof(ChangelogWindow).Assembly.GetName().Version ?? new Version(1, 0);
71-
VersionLabel.Text = Loc.GetString("changelog-version-tag", ("version", version.ToString()));
73+
// Try to get the current version from the build.json file
74+
var version = _cfg.GetCVar(CVars.BuildVersion);
75+
var forkId = _cfg.GetCVar(CVars.BuildForkId);
76+
77+
var versionText = Loc.GetString("changelog-version-unknown");
78+
79+
// Make sure these aren't empty, like in a dev env
80+
if (!string.IsNullOrEmpty(version) && !string.IsNullOrEmpty(forkId))
81+
{
82+
versionText = Loc.GetString("changelog-version-tag",
83+
("fork", forkId),
84+
("version", version[..7])); // Only show the first 7 characters
85+
}
86+
87+
// if else statements are ugly, shut up
88+
VersionLabel.Text = versionText;
7289

7390
TabsUpdated();
7491
}

0 commit comments

Comments
 (0)