Skip to content

Commit f005608

Browse files
committed
Merge branch 'master' of https://github.com/Stop-Signs/Delta-v
2 parents f623e97 + eba3cd6 commit f005608

3,792 files changed

Lines changed: 450771 additions & 80643 deletions

File tree

Some content is hidden

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

.github/workflows/labeler-needsreview.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ on:
88

99
permissions:
1010
pull-requests: write
11+
issues: write
1112
contents: write
1213

1314
jobs:

BuildChecker/BuildChecker.csproj

Lines changed: 2 additions & 2 deletions
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>

CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,8 @@ Do not use `ADMIN:` as **it will mangle** the upstream admin changelog!
9898
# Additional resources
9999

100100
If you are new to contributing to SS14 in general, have a look at the [SS14 docs](https://docs.spacestation14.io/) or ask for help in `#contribution-help` on [Discord](https://discord.gg/deltav)!
101+
102+
## AI-Generated Content
103+
Code, sprites and any other AI-generated content is not allowed to be submitted to the repository.
104+
105+
Trying to PR AI-generated content may result in you being banned from contributing.

Content.Benchmarks/ComponentQueryBenchmark.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,14 @@
99
using Content.Shared.Clothing.Components;
1010
using Content.Shared.Doors.Components;
1111
using Content.Shared.Item;
12-
using Robust.Server.GameObjects;
1312
using Robust.Shared;
1413
using Robust.Shared.Analyzers;
14+
using Robust.Shared.EntitySerialization;
15+
using Robust.Shared.EntitySerialization.Systems;
1516
using Robust.Shared.GameObjects;
16-
using Robust.Shared.Map;
1717
using Robust.Shared.Map.Components;
1818
using Robust.Shared.Random;
19+
using Robust.Shared.Utility;
1920

2021
namespace Content.Benchmarks;
2122

@@ -32,7 +33,6 @@ public class ComponentQueryBenchmark
3233

3334
private TestPair _pair = default!;
3435
private IEntityManager _entMan = default!;
35-
private MapId _mapId = new(10);
3636
private EntityQuery<ItemComponent> _itemQuery;
3737
private EntityQuery<ClothingComponent> _clothingQuery;
3838
private EntityQuery<MapComponent> _mapQuery;
@@ -54,10 +54,10 @@ public void Setup()
5454
_pair.Server.ResolveDependency<IRobustRandom>().SetSeed(42);
5555
_pair.Server.WaitPost(() =>
5656
{
57-
var success = _entMan.System<MapLoaderSystem>().TryLoad(_mapId, Map, out _);
58-
if (!success)
57+
var map = new ResPath(Map);
58+
var opts = DeserializationOptions.Default with {InitializeMaps = true};
59+
if (!_entMan.System<MapLoaderSystem>().TryLoadMap(map, out _, out _, opts))
5960
throw new Exception("Map load failed");
60-
_pair.Server.MapMan.DoMapInitialize(_mapId);
6161
}).GetAwaiter().GetResult();
6262

6363
_items = new EntityUid[_entMan.Count<ItemComponent>()];

Content.Benchmarks/DynamicTreeBenchmark.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public void Setup()
4444
for (var i = 0; i < Aabbs1.Length; i++)
4545
{
4646
var aabb = Aabbs1[i];
47-
_b2Tree.CreateProxy(aabb, i);
47+
_b2Tree.CreateProxy(aabb, uint.MaxValue, i);
4848
_tree.Add(i);
4949
}
5050
}

Content.Benchmarks/MapLoadBenchmark.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@
66
using Content.IntegrationTests;
77
using Content.IntegrationTests.Pair;
88
using Content.Server.Maps;
9-
using Robust.Server.GameObjects;
109
using Robust.Shared;
1110
using Robust.Shared.Analyzers;
11+
using Robust.Shared.EntitySerialization.Systems;
1212
using Robust.Shared.GameObjects;
1313
using Robust.Shared.Map;
1414
using Robust.Shared.Prototypes;
15+
using Robust.Shared.Utility;
1516

1617
namespace Content.Benchmarks;
1718

@@ -20,7 +21,7 @@ public class MapLoadBenchmark
2021
{
2122
private TestPair _pair = default!;
2223
private MapLoaderSystem _mapLoader = default!;
23-
private IMapManager _mapManager = default!;
24+
private SharedMapSystem _mapSys = default!;
2425

2526
[GlobalSetup]
2627
public void Setup()
@@ -36,7 +37,7 @@ public void Setup()
3637
.ToDictionary(x => x.ID, x => x.MapPath.ToString());
3738

3839
_mapLoader = server.ResolveDependency<IEntitySystemManager>().GetEntitySystem<MapLoaderSystem>();
39-
_mapManager = server.ResolveDependency<IMapManager>();
40+
_mapSys = server.ResolveDependency<IEntitySystemManager>().GetEntitySystem<SharedMapSystem>();
4041
}
4142

4243
[GlobalCleanup]
@@ -52,27 +53,27 @@ public async Task Cleanup()
5253
public string Map;
5354

5455
public Dictionary<string, string> Paths;
56+
private MapId _mapId;
5557

5658
[Benchmark]
5759
public async Task LoadMap()
5860
{
59-
var mapPath = Paths[Map];
61+
var mapPath = new ResPath(Paths[Map]);
6062
var server = _pair.Server;
6163
await server.WaitPost(() =>
6264
{
63-
var success = _mapLoader.TryLoad(new MapId(10), mapPath, out _);
65+
var success = _mapLoader.TryLoadMap(mapPath, out var map, out _);
6466
if (!success)
6567
throw new Exception("Map load failed");
68+
_mapId = map.Value.Comp.MapId;
6669
});
6770
}
6871

6972
[IterationCleanup]
7073
public void IterationCleanup()
7174
{
7275
var server = _pair.Server;
73-
server.WaitPost(() =>
74-
{
75-
_mapManager.DeleteMap(new MapId(10));
76-
}).Wait();
76+
server.WaitPost(() => _mapSys.DeleteMap(_mapId))
77+
.Wait();
7778
}
7879
}

Content.Benchmarks/PvsBenchmark.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77
using Content.IntegrationTests.Pair;
88
using Content.Server.Mind;
99
using Content.Server.Warps;
10-
using Robust.Server.GameObjects;
1110
using Robust.Shared;
1211
using Robust.Shared.Analyzers;
12+
using Robust.Shared.EntitySerialization;
13+
using Robust.Shared.EntitySerialization.Systems;
1314
using Robust.Shared.GameObjects;
1415
using Robust.Shared.Map;
1516
using Robust.Shared.Player;
1617
using Robust.Shared.Random;
18+
using Robust.Shared.Utility;
1719

1820
namespace Content.Benchmarks;
1921

@@ -34,7 +36,6 @@ public class PvsBenchmark
3436

3537
private TestPair _pair = default!;
3638
private IEntityManager _entMan = default!;
37-
private MapId _mapId = new(10);
3839
private ICommonSession[] _players = default!;
3940
private EntityCoordinates[] _spawns = default!;
4041
public int _cycleOffset = 0;
@@ -65,10 +66,10 @@ private async Task SetupAsync()
6566
_pair.Server.ResolveDependency<IRobustRandom>().SetSeed(42);
6667
await _pair.Server.WaitPost(() =>
6768
{
68-
var success = _entMan.System<MapLoaderSystem>().TryLoad(_mapId, Map, out _);
69-
if (!success)
69+
var path = new ResPath(Map);
70+
var opts = DeserializationOptions.Default with {InitializeMaps = true};
71+
if (!_entMan.System<MapLoaderSystem>().TryLoadMap(path, out _, out _, opts))
7072
throw new Exception("Map load failed");
71-
_pair.Server.MapMan.DoMapInitialize(_mapId);
7273
});
7374

7475
// Get list of ghost warp positions

Content.Client/Access/UI/IdCardConsoleBoundUserInterface.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ protected override void Open()
4343
_window.CrewManifestButton.OnPressed += _ => SendMessage(new CrewManifestOpenUiMessage());
4444
_window.PrivilegedIdButton.OnPressed += _ => SendMessage(new ItemSlotButtonPressedEvent(PrivilegedIdCardSlotId));
4545
_window.TargetIdButton.OnPressed += _ => SendMessage(new ItemSlotButtonPressedEvent(TargetIdCardSlotId));
46+
_window.OnToggleAccess += id => SendMessage(new IdCardConsoleToggleMessage(id)); // DeltaV
4647

4748
_window.OnClose += Close;
4849
_window.OpenCentered();

Content.Client/Access/UI/IdCardConsoleWindow.xaml.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ public sealed partial class IdCardConsoleWindow : DefaultWindow
3030
// The job that will be picked if the ID doesn't have a job on the station.
3131
private static ProtoId<JobPrototype> _defaultJob = "Passenger";
3232

33+
public event Action<ProtoId<AccessLevelPrototype>>? OnToggleAccess; // DeltaV
34+
3335
public IdCardConsoleWindow(IdCardConsoleBoundUserInterface owner, IPrototypeManager prototypeManager,
3436
List<ProtoId<AccessLevelPrototype>> accessLevels)
3537
{
@@ -73,7 +75,8 @@ public IdCardConsoleWindow(IdCardConsoleBoundUserInterface owner, IPrototypeMana
7375

7476
foreach (var (id, button) in _accessButtons.ButtonsList)
7577
{
76-
button.OnPressed += _ => SubmitData();
78+
var copied = id; // DeltaV
79+
button.OnPressed += _ => OnToggleAccess?.Invoke(id);
7780
}
7881
}
7982

@@ -198,7 +201,7 @@ private void SubmitData()
198201
FullNameLineEdit.Text,
199202
JobTitleLineEdit.Text,
200203
// Iterate over the buttons dictionary, filter by `Pressed`, only get key from the key/value pair
201-
_accessButtons.ButtonsList.Where(x => x.Value.Pressed).Select(x => x.Key).ToList(),
204+
[], // DeltaV - don't send list of accesses
202205
jobProtoDirty ? _jobPrototypeIds[JobPresetOptionButton.SelectedId] : string.Empty);
203206
}
204207
}

Content.Client/Actions/ActionsSystem.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ private void OnEntityTargetHandleState(EntityUid uid, EntityTargetActionComponen
8989
return;
9090

9191
component.Whitelist = state.Whitelist;
92+
component.Blacklist = state.Blacklist;
9293
component.CanTargetSelf = state.CanTargetSelf;
9394
BaseHandleState<EntityTargetActionComponent>(uid, component, state);
9495
}
@@ -138,6 +139,7 @@ private void BaseHandleState<T>(EntityUid uid, BaseActionComponent component, Ba
138139
component.Priority = state.Priority;
139140
component.AttachedEntity = EnsureEntity<T>(state.AttachedEntity, uid);
140141
component.RaiseOnUser = state.RaiseOnUser;
142+
component.RaiseOnAction = state.RaiseOnAction;
141143
component.AutoPopulate = state.AutoPopulate;
142144
component.Temporary = state.Temporary;
143145
component.ItemIconStyle = state.ItemIconStyle;

0 commit comments

Comments
 (0)