Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tweak] Upstream sync #990

Merged
merged 109 commits into from
Dec 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
25980d8
Remove plushie_lizard_mirrored.png (#33855)
LevitatingTree Dec 19, 2024
209c176
Tweaks for the holopad (#33928)
chromiumboy Dec 19, 2024
7f6d55a
Fix: Update armor crate description (#33414)
Plykiya Dec 19, 2024
ae5c1f5
Automatic changelog update
PJBot Dec 19, 2024
fe69ef6
Loopstation hotfix (#33958)
TytosB Dec 19, 2024
ee72cda
Update Fland for holopads (#33962)
ArtisticRoomba Dec 19, 2024
0462993
Fixes/removes borg spawnpoint from Oasis Engineering, added one to Ro…
august-sun Dec 19, 2024
7f2907a
Update Credits (#33865)
github-actions[bot] Dec 19, 2024
d8a745e
Winter stuff tweak (#2873)
Ko4ergaPunk Dec 19, 2024
39600f9
Minor fixes for the holopad (#33969)
chromiumboy Dec 20, 2024
864c225
add man-o-war shuttle (#32105)
IProduceWidgets Dec 20, 2024
a2912e3
Add MovementSound (#31313)
metalgearsloth Dec 20, 2024
34b9066
Remove Clearly Nuclear on Author's Request (#33971)
Piras314 Dec 20, 2024
f4fd647
Automatic changelog update
PJBot Dec 20, 2024
4c0a134
Fix communication console menu (#33655)
SpyDev14 Dec 20, 2024
f19377d
Automatic changelog update
PJBot Dec 20, 2024
a822ee5
[Maps] Mappool update (#2865)
NotSoDana Dec 20, 2024
1419b88
combine licence files for StationEvents audio (#33972)
Errant-4 Dec 20, 2024
5a07413
All hostile turret (#33970)
CaptainMaru Dec 20, 2024
0e850ab
Automatic changelog update
PJBot Dec 20, 2024
a0a4057
Add clearer defib cooldowns! (#31251)
beck-thompson Dec 20, 2024
a89d254
Automatic changelog update
PJBot Dec 20, 2024
e4974cb
Nanotrasen, Syndicate factions are now hostile to Dragons and Carps (…
AverageNotDoingAnythingEnjoyer Dec 20, 2024
bbceffa
Automatic changelog update
PJBot Dec 20, 2024
919fdc0
Add description of tool qualities to entity (#32436)
lzk228 Dec 20, 2024
50cc90f
Automatic changelog update
PJBot Dec 20, 2024
3a917bc
Diona chirping & Nymph vocals (#32511)
Pinkbat5 Dec 20, 2024
9a4f956
Automatic changelog update
PJBot Dec 20, 2024
03a54e9
Increase syndicate uplink discount amount to 6. (#33950)
ScarKy0 Dec 21, 2024
00f12e0
Automatic changelog update
PJBot Dec 21, 2024
12c5c7e
Wood walls from barricades (#33902)
JustinWinningham Dec 21, 2024
1f85916
Automatic changelog update
PJBot Dec 21, 2024
9f4aa1e
Implement some field-level deltas (#28242)
metalgearsloth Dec 21, 2024
b011dbb
Update submodule to 237.4.0 (#33976)
metalgearsloth Dec 21, 2024
b10ef58
Lamps sprite update (#2876)
SonicHDC Dec 21, 2024
06e2bba
Toolshed refactor (#33598)
ElectroJr Dec 21, 2024
b3551fb
Automatic changelog update
PJBot Dec 21, 2024
7baa1ae
Update engine to v238.0.0 (#33980)
ElectroJr Dec 21, 2024
1abe9db
Automatic changelog update
PJBot Dec 21, 2024
58181c3
adjust eshotgun recharge delay (#33996)
Errant-4 Dec 22, 2024
3358801
2024-12-20 Release "HoLoopad Holiday" (#34007)
Errant-4 Dec 22, 2024
2ff8238
Merge stable into master (#34008)
slarticodefast Dec 22, 2024
1450c4c
Specify privacy policy for Wizard's Den (#34013)
PJB3005 Dec 22, 2024
f28c812
Localized holopads for Box (#34011)
ScarKy0 Dec 22, 2024
c873f90
Train: fix problematic atmos setup (#34018)
slarticodefast Dec 22, 2024
d286029
Update corvax_delta.yml (#2878)
Bloodcanis Dec 23, 2024
4ddd7d3
silent footsteps for ninja (#33280)
muburu Dec 23, 2024
38bd2e5
Automatic changelog update
PJBot Dec 23, 2024
dfc0e01
minor fix to "silent footsteps for ninja" (#34040)
slarticodefast Dec 23, 2024
f98192d
Fix the sensor monitoring console (#34035)
PJB3005 Dec 23, 2024
b82605b
Fix borgs being able to drink from buckets and spray bottles. (#32964)
amatwiedle Dec 23, 2024
030f97b
Automatic changelog update
PJBot Dec 23, 2024
7d48e16
[Maps] Silly Hot-Fix! (#2879)
Doctorjakes Dec 23, 2024
3122825
[Maps] Glacier update (#2875)
NotSoDana Dec 23, 2024
5d8e916
Remove cog cargo protolathe (#34026)
Booblesnoot42 Dec 23, 2024
2dd99b5
Removed protolathe from cargo on Amber (#34027)
Booblesnoot42 Dec 23, 2024
843a5de
Automatic changelog update
PJBot Dec 23, 2024
2c4be6b
Increases Marathon cryosleep size, added meteor shielding to Marathon…
august-sun Dec 23, 2024
285e934
Fix race condition causing disconnected admins to appear in adminwho …
PJB3005 Dec 24, 2024
39b2ce8
Adds more air alarms and sensors throughout Oasis, linked unlinked ai…
august-sun Dec 24, 2024
1c33073
Multiple items in loadouts (#33193)
TheShuEd Dec 24, 2024
8fcfca6
Automatic changelog update
PJBot Dec 24, 2024
4e9862d
Add crazybrain23 to CODEOWNERS (#34038)
crazybrain23 Dec 24, 2024
31aec73
Update Credits (#33998)
github-actions[bot] Dec 24, 2024
1cbc8c1
Allow to paint multiple airlocks (#34001)
lzk228 Dec 24, 2024
c83532e
Automatic changelog update
PJBot Dec 24, 2024
4064d55
Link Core cargo shuttle atmos devices (#34061)
minus1over12 Dec 25, 2024
7803254
bagel update (#34062)
Emisse Dec 25, 2024
457a70b
[Maps] New Year CentCom (#2883)
lastPechkin Dec 25, 2024
392046f
Loop Station update and fixes (#34067)
TytosB Dec 25, 2024
208948c
[Maps] Astra NoERP Update (#2884)
lastPechkin Dec 25, 2024
6106783
Merge remote-tracking branch 'wizards/master' into upstream-sync
Morb0 Dec 25, 2024
78143b1
Apply typing state to holopad
Morb0 Dec 25, 2024
96d19e9
Fix upstream
Morb0 Dec 25, 2024
d9ec458
Merge pull request #2885 from space-syndicate/upstream-sync
Morb0 Dec 25, 2024
4b34dd6
Amber Station - Fixed evac shuttle screens (#34071)
southbridge-fur Dec 26, 2024
52d39aa
bagel update (#34073)
Emisse Dec 26, 2024
71c814f
[Maps] Map pool change (#2887)
Ko4ergaPunk Dec 26, 2024
58c1a7e
[MAPS] Paper Tweak (#2882)
XsenonDash Dec 26, 2024
a02f7e1
[Maps] Astra Holo (#2886)
lastPechkin Dec 26, 2024
bf727b0
Reinforced tables require welding to construct/deconstruct (#33992)
ArtisticRoomba Dec 26, 2024
fab5dd1
Automatic changelog update
PJBot Dec 26, 2024
34e9979
Arrivals blacklist for bluespace lockers and QSIs (#34072)
crazybrain23 Dec 27, 2024
ca0596e
Automatic changelog update
PJBot Dec 27, 2024
860052c
Fix popup on handcuffing for person being handcuffed (#33639)
Plykiya Dec 27, 2024
9acce42
Automatic changelog update
PJBot Dec 27, 2024
97dd551
Ignore audio entities in SpawnAndDeleteEntityCountTest (#34021)
ElectroJr Dec 28, 2024
d92ed75
Fix wagging action name and desc (#34089)
lzk228 Dec 28, 2024
a21d809
Removed Power Monitoring Computer boards from research and lathe reci…
Alpaccalypse Dec 28, 2024
b24ab38
Automatic changelog update
PJBot Dec 28, 2024
616d341
Traitor can no longer get multiple objectives to save/help/kill the s…
psykana Dec 28, 2024
1b478d4
Automatic changelog update
PJBot Dec 28, 2024
01980cb
Removes weh.txt from Textures/Parallaxes (#34097)
PursuitInAshes Dec 28, 2024
6c46515
UI improvements for holopads (#34055)
chromiumboy Dec 28, 2024
4155440
Automatic changelog update
PJBot Dec 28, 2024
3f84b04
Update Credits (#34109)
github-actions[bot] Dec 29, 2024
5d0d371
Added support so that smile can use hats (#33924)
zHonys Dec 29, 2024
9f9553b
Automatic changelog update
PJBot Dec 29, 2024
bfb256f
Add a guaranteed cotton pizza to pizza crates (#33997)
ewokswagger Dec 29, 2024
4bb68c4
Automatic changelog update
PJBot Dec 29, 2024
2c41ed0
Corrected Cotton Dough Recipe (#33988)
Booblesnoot42 Dec 29, 2024
e07609b
New cotton baguette, crostini, chevre-chaud, bagel, and croissant foo…
ArtisticRoomba Dec 29, 2024
a7ca552
Automatic changelog update
PJBot Dec 29, 2024
d6a9fe1
Rolling joints no longer requires a filter (#34106)
IamVelcroboy Dec 29, 2024
da8bb99
Automatic changelog update
PJBot Dec 29, 2024
072b973
fix interdimensional teleporter desc (#34108)
lzk228 Dec 29, 2024
4d092f9
Merge remote-tracking branch 'wizard/master' into upstream-sync
Roudenn Dec 29, 2024
a2ffe6f
Merge remote-tracking branch 'corvax/master' into upstream-sync
Roudenn Dec 29, 2024
fe93c20
fix
Roudenn Dec 29, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- 'Resources/Maps/**/*.yml'
- 'Resources/Prototypes/Maps/**/*.yml'
- 'Resources/Prototypes/Corvax/Maps/**/*.yml'
- 'Resources/Prototypes/_Backmen/Maps/**/*.yml'

"Changes: UI":
- changed-files:
Expand Down
63 changes: 54 additions & 9 deletions Content.Client/Communications/UI/CommunicationsConsoleMenu.xaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,62 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
Title="{Loc 'comms-console-menu-title'}"
MinSize="400 225">
<BoxContainer Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True" Margin="5">
<TextEdit Name="MessageInput" HorizontalExpand="True" VerticalExpand="True" Margin="0 0 0 5" MinHeight="100" />
<Button Name="AnnounceButton" Text="{Loc 'comms-console-menu-announcement-button'}" ToolTip="{Loc 'comms-console-menu-announcement-button-tooltip'}" StyleClasses="OpenLeft" Access="Public" />
<Button Name="BroadcastButton" Text="{Loc 'comms-console-menu-broadcast-button'}" ToolTip="{Loc 'comms-console-menu-broadcast-button-tooltip'}" StyleClasses="OpenLeft" Access="Public" />
MinSize="400 300">

<OptionButton Name="AlertLevelButton" ToolTip="{Loc 'comms-console-menu-alert-level-button-tooltip'}" StyleClasses="OpenRight" Access="Public" />
<!-- Main Container -->
<BoxContainer Orientation="Vertical"
HorizontalExpand="False"
VerticalExpand="True"
Margin="6 6 6 5">

<Control MinSize="10 10" />
<TextEdit Name="MessageInput"
VerticalExpand="True"
HorizontalExpand="True"
VerticalAlignment="Stretch"
HorizontalAlignment="Stretch"
MinHeight="100"/>

<RichTextLabel Name="CountdownLabel" VerticalExpand="True" />
<Button Name="EmergencyShuttleButton" Text="Placeholder Text" ToolTip="{Loc 'comms-console-menu-emergency-shuttle-button-tooltip'}" Access="Public" />
<!-- ButtonsPart -->
<BoxContainer Orientation="Vertical"
VerticalAlignment="Bottom"
SeparationOverride="4">

<!-- AnnouncePart -->
<BoxContainer Orientation="Vertical"
Margin="0 2">

<Button Name="AnnounceButton"
Access="Public"
Text="{Loc 'comms-console-menu-announcement-button'}"
ToolTip="{Loc 'comms-console-menu-announcement-button-tooltip'}"
StyleClasses="OpenLeft"
Margin="0 0 1 0"
Disabled="True"/>

<Button Name="BroadcastButton"
Access="Public"
Text="{Loc 'comms-console-menu-broadcast-button'}"
ToolTip="{Loc 'comms-console-menu-broadcast-button-tooltip'}"
StyleClasses="OpenBoth"/>

<OptionButton Name="AlertLevelButton"
Access="Public"
ToolTip="{Loc 'comms-console-menu-alert-level-button-tooltip'}"
StyleClasses="OpenRight"/>

</BoxContainer>

<!-- EmergencyPart -->
<BoxContainer Orientation="Vertical"
SeparationOverride="6">

<RichTextLabel Name="CountdownLabel"/>

<Button Name="EmergencyShuttleButton"
Access="Public"
Text="Placeholder Text"
ToolTip="{Loc 'comms-console-menu-emergency-shuttle-button-tooltip'}"/>
</BoxContainer>
</BoxContainer>
</BoxContainer>
</controls:FancyWindow>
2 changes: 1 addition & 1 deletion Content.Client/Holopad/HolopadSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private void OnTypingChanged(TypingChangedEvent ev, EntitySessionEventArgs args)
if (!HasComp<HolopadUserComponent>(uid))
return;

var netEv = new HolopadUserTypingChangedEvent(GetNetEntity(uid.Value), ev.State == TypingIndicatorState.Typing);
var netEv = new HolopadUserTypingChangedEvent(GetNetEntity(uid.Value), ev.State);
RaiseNetworkEvent(netEv);
}

Expand Down
31 changes: 21 additions & 10 deletions Content.Client/Holopad/HolopadWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
<!-- Header text -->
<BoxContainer MinHeight="60" Orientation="Vertical" VerticalAlignment="Center">
<Label Name="CallStatusText" Margin="10 5 10 0" ReservesSpace="False"/>
<RichTextLabel Name="CallerIdText" HorizontalAlignment="Center" Margin="0 0 0 0" ReservesSpace="False"/>
<BoxContainer Name="CallerIdContainer" Orientation="Vertical" ReservesSpace="False">
<RichTextLabel Name="CallerIdText" HorizontalAlignment="Center" Margin="0 0 0 0"/>
<Label Text="{Loc 'holopad-window-relay-label'}" Margin="10 5 10 0" ReservesSpace="False"/>
<RichTextLabel Name="HolopadIdText" HorizontalAlignment="Center" Margin="0 0 0 10"/>
</BoxContainer>
</BoxContainer>

<!-- Controls (the answer call button is absent when the phone is not ringing) -->
Expand Down Expand Up @@ -68,18 +72,25 @@
<PanelContainer Name="HolopadContactListHeaderPanel">
<Label Text="{Loc 'holopad-window-select-contact-from-list'}" HorizontalAlignment="Center" Margin="0 3 0 3"/>
</PanelContainer>

<PanelContainer Name="HolopadContactListPanel">
<ScrollContainer HorizontalExpand="True" VerticalExpand="True" Margin="8, 8, 8, 8" MinHeight="256">
<BoxContainer Orientation="Vertical">

<!-- Contact filter -->
<LineEdit Name="SearchLineEdit" HorizontalExpand="True" Margin="4, 4, 4, 0"
PlaceHolder="{Loc holopad-window-filter-line-placeholder}" />

<!-- If there is no data yet, this will be displayed -->
<BoxContainer Name="FetchingAvailableHolopadsContainer" HorizontalAlignment="Center" HorizontalExpand="True" VerticalExpand="True" ReservesSpace="False">
<Label Text="{Loc 'holopad-window-fetching-contacts-list'}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</BoxContainer>
<ScrollContainer HorizontalExpand="True" VerticalExpand="True" Margin="8, 8, 8, 8" MinHeight="256">

<!-- Container for the contacts -->
<BoxContainer Name="ContactsList" Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True" Margin="10 0 10 0"/>
</ScrollContainer>
<!-- If there is no data yet, this will be displayed -->
<BoxContainer Name="FetchingAvailableHolopadsContainer" HorizontalAlignment="Center" HorizontalExpand="True" VerticalExpand="True" ReservesSpace="False">
<Label Text="{Loc 'holopad-window-fetching-contacts-list'}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</BoxContainer>

<!-- Container for the contacts -->
<BoxContainer Name="ContactsList" Orientation="Vertical" HorizontalExpand="True" VerticalExpand="True" Margin="10 0 10 0"/>
</ScrollContainer>
</BoxContainer>
</PanelContainer>
</BoxContainer>

Expand Down
12 changes: 9 additions & 3 deletions Content.Client/Holopad/HolopadWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,10 @@ public void UpdateState(Dictionary<NetEntity, string> holopads)

// Caller ID text
var callerId = _telephoneSystem.GetFormattedCallerIdForEntity(telephone.LastCallerId.Item1, telephone.LastCallerId.Item2, Color.LightGray, "Default", 11);
var holoapdId = _telephoneSystem.GetFormattedDeviceIdForEntity(telephone.LastCallerId.Item3, Color.LightGray, "Default", 11);

CallerIdText.SetMessage(FormattedMessage.FromMarkupOrThrow(callerId));
HolopadIdText.SetMessage(FormattedMessage.FromMarkupOrThrow(holoapdId));
LockOutIdText.SetMessage(FormattedMessage.FromMarkupOrThrow(callerId));

// Sort holopads alphabetically
Expand Down Expand Up @@ -236,10 +238,13 @@ private void UpdateAppearance()
// Make / update required children
foreach (var child in ContactsList.Children)
{
if (child is not HolopadContactButton)
if (child is not HolopadContactButton contactButton)
continue;

var contactButton = (HolopadContactButton)child;
var passesFilter = string.IsNullOrEmpty(SearchLineEdit.Text) ||
contactButton.Text?.Contains(SearchLineEdit.Text, StringComparison.CurrentCultureIgnoreCase) == true;

contactButton.Visible = passesFilter;
contactButton.Disabled = (_currentState != TelephoneState.Idle || lockButtons);
}

Expand Down Expand Up @@ -290,7 +295,7 @@ private void UpdateAppearance()
FetchingAvailableHolopadsContainer.Visible = (ContactsList.ChildCount == 0);
ActiveCallControlsContainer.Visible = (_currentState != TelephoneState.Idle || _currentUiKey == HolopadUiKey.AiRequestWindow);
CallPlacementControlsContainer.Visible = !ActiveCallControlsContainer.Visible;
CallerIdText.Visible = (_currentState == TelephoneState.Ringing);
CallerIdContainer.Visible = (_currentState == TelephoneState.Ringing);
AnswerCallButton.Visible = (_currentState == TelephoneState.Ringing);
}

Expand All @@ -316,6 +321,7 @@ public HolopadContactButton()
HorizontalExpand = true;
SetHeight = 32;
Margin = new Thickness(0f, 1f, 0f, 1f);
ReservesSpace = false;
}

public void UpdateValues(NetEntity netEntity, string label)
Expand Down
19 changes: 10 additions & 9 deletions Content.Client/Lobby/UI/Loadouts/LoadoutContainer.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,18 @@ public LoadoutContainer(ProtoId<LoadoutPrototype> proto, bool disabled, Formatte

if (_protoManager.TryIndex(proto, out var loadProto))
{
var ent = _entManager.System<LoadoutSystem>().GetFirstOrNull(loadProto);
var ent = loadProto.DummyEntity ?? _entManager.System<LoadoutSystem>().GetFirstOrNull(loadProto);

if (ent != null)
{
_entity = _entManager.SpawnEntity(ent, MapCoordinates.Nullspace);
Sprite.SetEntity(_entity);
if (ent == null)
return;

var spriteTooltip = new Tooltip();
spriteTooltip.SetMessage(FormattedMessage.FromUnformatted(_entManager.GetComponent<MetaDataComponent>(_entity.Value).EntityDescription));
TooltipSupplier = _ => spriteTooltip;
}
_entity = _entManager.SpawnEntity(ent, MapCoordinates.Nullspace);
Sprite.SetEntity(_entity);

var spriteTooltip = new Tooltip();
spriteTooltip.SetMessage(FormattedMessage.FromUnformatted(_entManager.GetComponent<MetaDataComponent>(_entity.Value).EntityDescription));

TooltipSupplier = _ => spriteTooltip;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public sealed partial class SensorMonitoringWindow : FancyWindow, IComputerWindo
public SensorMonitoringWindow()
{
RobustXamlLoader.Load(this);
IoCManager.InjectDependencies(this);
}

public void UpdateState(ConsoleUIState state)
Expand Down
2 changes: 1 addition & 1 deletion Content.Client/Tips/TippyUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private Vector2 UpdatePosition(TippyUI tippy, Vector2 screenSize, FrameEventArgs
? -WaddleRotation
: WaddleRotation;

if (EntityManager.TryGetComponent(_entity, out FootstepModifierComponent? step))
if (EntityManager.TryGetComponent(_entity, out FootstepModifierComponent? step) && step.FootstepSoundCollection != null)
{
var audioParams = step.FootstepSoundCollection.Params
.AddVolume(-7f)
Expand Down
33 changes: 20 additions & 13 deletions Content.IntegrationTests/Tests/EntityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Linq;
using System.Numerics;
using Robust.Shared;
using Robust.Shared.Audio.Components;
using Robust.Shared.Configuration;
using Robust.Shared.GameObjects;
using Robust.Shared.Log;
Expand Down Expand Up @@ -218,14 +219,17 @@ await server.WaitPost(() =>
/// generally not spawn unrelated / detached entities. Any entities that do get spawned should be parented to
/// the spawned entity (e.g., in a container). If an entity needs to spawn an entity somewhere in null-space,
/// it should delete that entity when it is no longer required. This test mainly exists to prevent "entity leak"
/// bugs, where spawning some entity starts spawning unrelated entities in null space.
/// bugs, where spawning some entity starts spawning unrelated entities in null space that stick around after
/// the original entity is gone.
///
/// Note that this isn't really a strict requirement, and there are probably quite a few edge cases. Its a pretty
/// crude test to try catch issues like this, and possibly should just be disabled.
/// </remarks>
[Test]
public async Task SpawnAndDeleteEntityCountTest()
{
var settings = new PoolSettings { Connected = true, Dirty = true };
await using var pair = await PoolManager.GetServerClient(settings);
var mapManager = pair.Server.ResolveDependency<IMapManager>();
var mapSys = pair.Server.System<SharedMapSystem>();
var server = pair.Server;
var client = pair.Client;
Expand Down Expand Up @@ -267,6 +271,9 @@ await server.WaitPost(() =>

await pair.RunTicksSync(3);

// We consider only non-audio entities, as some entities will just play sounds when they spawn.
int Count(IEntityManager ent) => ent.EntityCount - ent.Count<AudioComponent>();

foreach (var protoId in protoIds)
{
// TODO fix ninja
Expand All @@ -279,55 +286,55 @@ await server.WaitPost(() =>
continue;


var count = server.EntMan.EntityCount;
var clientCount = client.EntMan.EntityCount;
var count = Count(server.EntMan);
var clientCount = Count(client.EntMan);
EntityUid uid = default;
await server.WaitPost(() => uid = server.EntMan.SpawnEntity(protoId, coords));
await pair.RunTicksSync(3);

// If the entity deleted itself, check that it didn't spawn other entities
if (!server.EntMan.EntityExists(uid))
{
if (server.EntMan.EntityCount != count)
if (Count(server.EntMan) != count)
{
Assert.Fail($"Server prototype {protoId} failed on deleting itself");
}

if (client.EntMan.EntityCount != clientCount)
if (Count(client.EntMan) != clientCount)
{
Assert.Fail($"Client prototype {protoId} failed on deleting itself\n" +
$"Expected {clientCount} and found {client.EntMan.EntityCount}.\n" +
$"Expected {clientCount} and found {Count(client.EntMan)}.\n" +
$"Server was {count}.");
}
continue;
}

// Check that the number of entities has increased.
if (server.EntMan.EntityCount <= count)
if (Count(server.EntMan) <= count)
{
Assert.Fail($"Server prototype {protoId} failed on spawning as entity count didn't increase");
}

if (client.EntMan.EntityCount <= clientCount)
if (Count(client.EntMan) <= clientCount)
{
Assert.Fail($"Client prototype {protoId} failed on spawning as entity count didn't increase" +
$"Expected at least {clientCount} and found {client.EntMan.EntityCount}. " +
$"Expected at least {clientCount} and found {Count(client.EntMan)}. " +
$"Server was {count}");
}

await server.WaitPost(() => server.EntMan.DeleteEntity(uid));
await pair.RunTicksSync(3);

// Check that the number of entities has gone back to the original value.
if (server.EntMan.EntityCount != count)
if (Count(server.EntMan) != count)
{
Assert.Fail($"Server prototype {protoId} failed on deletion count didn't reset properly");
}

if (client.EntMan.EntityCount != clientCount)
if (Count(client.EntMan) != clientCount)
{
Assert.Fail($"Client prototype {protoId} failed on deletion count didn't reset properly:\n" +
$"Expected {clientCount} and found {client.EntMan.EntityCount}.\n" +
$"Expected {clientCount} and found {Count(client.EntMan)}.\n" +
$"Server was {count}.");
}
}
Expand Down
3 changes: 1 addition & 2 deletions Content.IntegrationTests/Tests/PostMapInitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public sealed class PostMapInitTest
"CorvaxTushkan",
//"CorvaxGlacier",
"CorvaxAwesome",
"Origin",
// Corvax-End
"Dev",
"TestTeg",
Expand Down Expand Up @@ -98,8 +99,6 @@ public sealed class PostMapInitTest
"Gate",
"Amber",
"Loop"


};

/// <summary>
Expand Down
6 changes: 3 additions & 3 deletions Content.IntegrationTests/Tests/StoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ await server.WaitAssertion(() =>
var discountComponent = entManager.GetComponent<StoreDiscountComponent>(pda);
Assert.That(
discountComponent.Discounts,
Has.Exactly(3).Items,
$"After applying discount total discounted items count was expected to be '3' "
Has.Exactly(6).Items,
$"After applying discount total discounted items count was expected to be '6' "
+ $"but was actually {discountComponent.Discounts.Count}- this can be due to discount "
+ $"categories settings (maxItems, weight) not being realistically set, or default "
+ $"discounted count being changed from '3' in StoreDiscountSystem.InitializeDiscounts."
+ $"discounted count being changed from '6' in StoreDiscountSystem.InitializeDiscounts."
);
var discountedListingItems = storeComponent.FullListingsCatalog
.Where(x => x.IsCostModified)
Expand Down
20 changes: 17 additions & 3 deletions Content.IntegrationTests/Tests/Toolshed/AdminTest.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Content.Server.Administration.Managers;
using Robust.Shared.Toolshed;

namespace Content.IntegrationTests.Tests.Toolshed;
Expand All @@ -10,10 +11,23 @@ public sealed class AdminTest : ToolshedTest
[Test]
public async Task AllCommandsHavePermissions()
{
var toolMan = Server.ResolveDependency<ToolshedManager>();
var admin = Server.ResolveDependency<IAdminManager>();
var ignored = new HashSet<Assembly>()
{typeof(LocTest).Assembly, typeof(Robust.UnitTesting.Shared.Toolshed.LocTest).Assembly};

await Server.WaitAssertion(() =>
{
Assert.That(InvokeCommand("cmd:list where { acmd:perms isnull }", out var res));
Assert.That((IEnumerable<CommandSpec>) res, Is.Empty, "All commands must have admin permissions set up.");
Assert.Multiple(() =>
{
foreach (var cmd in toolMan.DefaultEnvironment.AllCommands())
{
if (ignored.Contains(cmd.Cmd.GetType().Assembly))
continue;

Assert.That(admin.TryGetCommandFlags(cmd, out _), $"Command does not have admin permissions set up: {cmd.FullName()}");
}
});
});
}
}
Loading
Loading