Skip to content

Commit

Permalink
Fix existing work
Browse files Browse the repository at this point in the history
  • Loading branch information
metalgearsloth committed Apr 6, 2024
1 parent a9d6ef9 commit 458e276
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 14 deletions.
3 changes: 0 additions & 3 deletions Content.Client/Preferences/UI/LoadoutGroupContainer.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
using System.Linq;
using Content.Shared.Clothing;
using Content.Shared.Preferences.Loadouts;
using Content.Shared.Preferences.Loadouts.Effects;
using Robust.Client.AutoGenerated;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Client.UserInterface.XAML;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Utility;

namespace Content.Client.Preferences.UI;

Expand Down
4 changes: 2 additions & 2 deletions Content.Client/Preferences/UI/LoadoutWindow.xaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<controls:FancyWindow xmlns="https://spacestation14.io"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
SetSize="758 800"
MinSize="758 64">
SetSize="800 800"
MinSize="800 64">
<VerticalTabContainer Name="LoadoutGroupsContainer"
VerticalExpand="True"
HorizontalExpand="True">
Expand Down
39 changes: 39 additions & 0 deletions Content.IntegrationTests/Tests/Preferences/LoadoutTests.cs
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();
}
}
2 changes: 1 addition & 1 deletion Content.Server/Spawners/EntitySystems/SpawnPointSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private void OnPlayerSpawning(PlayerSpawningEvent args)
// TODO: Refactor gameticker spawning code so we don't have to do this!
var points2 = EntityQueryEnumerator<SpawnPointComponent, TransformComponent>();

if (points2.MoveNext(out var uid, out var spawnPoint, out var xform))
if (points2.MoveNext(out var spawnPoint, out var xform))
{
possiblePositions.Add(xform.Coordinates);
}
Expand Down
14 changes: 7 additions & 7 deletions Resources/Locale/en-US/preferences/loadout-groups.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ loadout-group-quartermaster-jumpsuit = Quartermaster jumpsuit
loadout-group-quartermaster-backpack = Quartermaster backpack
loadout-group-quartermaster-neck = Quartermaster neck
loadout-group-technician-head = Technician head
loadout-group-technician-jumpsuit = Technician jumpsuit
loadout-group-technician-backpack = Technician backpack
loadout-group-cargo-technician-head = Technician head
loadout-group-cargo-technician-jumpsuit = Technician jumpsuit
loadout-group-cargo-technician-backpack = Technician backpack
loadout-group-salvage-specialist-backpack = Salvage Specialist backpack
# Engineering
loadout-group-chief-engineer-head = Chief Engineer head
loadout-group-chief-engineer-jumpsuit = Chief Engineer jumpsuit
loadout-group-chief-engineer-chief-engineer = Chief Engineer backpack
loadout-group-chief-engineer-chief-engineer-neck = Chief Engineer neck
loadout-group-chief-engineer-backpack = Chief Engineer backpack
loadout-group-chief-engineer-neck = Chief Engineer neck
loadout-group-technical-assistant-jumpsuit = Technical Assistant jumpsuit
Expand All @@ -39,10 +39,10 @@ loadout-group-research-director-outerclothing = Research Director outer clothing
loadout-group-scientist-head = Scientist head
loadout-group-scientist-neck = Scientist neck
loadout-group-scientist-scientist-jumpsuit = Scientist jumpsuit
loadout-group-scientist-jumpsuit = Scientist jumpsuit
loadout-group-scientist-backpack = Scientist backpack
loadout-group-scientist-outerclothing = Scientist outer clothing
loadout-group-scientist-scientist-id = Scientist ID
loadout-group-scientist-id = Scientist ID
loadout-group-research-assistant-jumpsuit = Research Assistant jumpsuit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@

- type: loadout
id: MedicalDoctor
equipment: MedicalDoctor
equipment: MedicalDoctorDuffel

- type: startingGear
id: MedicalDoctorDuffel
Expand Down

0 comments on commit 458e276

Please sign in to comment.