forked from space-wizards/space-station-14
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9d6ef9
commit 458e276
Showing
6 changed files
with
50 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
Content.IntegrationTests/Tests/Preferences/LoadoutTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Content.Server.Station.Systems; | ||
using Content.Shared.Preferences; | ||
using Content.Shared.Preferences.Loadouts; | ||
using Content.Shared.Roles.Jobs; | ||
using Robust.Shared.GameObjects; | ||
|
||
namespace Content.IntegrationTests.Tests.Preferences; | ||
|
||
[TestFixture] | ||
public sealed class LoadoutTests | ||
{ | ||
/// <summary> | ||
/// Checks that an empty loadout still spawns with default gear and not naked. | ||
/// </summary> | ||
[Test] | ||
public async Task TestEmptyLoadout() | ||
{ | ||
var pair = await PoolManager.GetServerClient(new PoolSettings()); | ||
var server = pair.Server; | ||
|
||
var entManager = server.ResolveDependency<IEntityManager>(); | ||
|
||
// Check that an empty role loadout spawns gear | ||
var stationSystem = entManager.System<StationSpawningSystem>(); | ||
var testMap = await pair.CreateTestMap(); | ||
|
||
var profile = new HumanoidCharacterProfile(); | ||
|
||
profile.SetLoadout(new RoleLoadout("TestRoleLoadout")); | ||
|
||
stationSystem.SpawnPlayerMob(testMap.GridCoords, job: new JobComponent() | ||
{ | ||
// Sue me, there's so much involved in setting up jobs | ||
Prototype = "JobCargoTechnician" | ||
}, profile, station: null); | ||
|
||
await pair.CleanReturnAsync(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters