Skip to content

Commit

Permalink
fix loadout (#1002)
Browse files Browse the repository at this point in the history
  • Loading branch information
KayzelW authored Jan 12, 2025
1 parent ac1b0b1 commit a6369f9
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 23 deletions.
20 changes: 9 additions & 11 deletions Content.Client/Lobby/LobbyUIController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -492,23 +492,21 @@ public EntityUid LoadProfileEntity(HumanoidCharacterProfile? humanoid, JobProtot
if (_prototypeManager.HasIndex<RoleLoadoutPrototype>(LoadoutSystem.GetJobPrototype(job.ID)))
{
var loadout = humanoid.GetLoadoutOrDefault(LoadoutSystem.GetJobPrototype(job.ID), _playerManager.LocalSession, humanoid.Species, EntityManager, _prototypeManager);

//backmen-clothing: start
HashSet<string> groupsToShow = ["Werx", "Niz", "Socks"];
if (jobClothes)
{
foreach (var loadoutsKey in loadout.SelectedLoadouts.Keys.Where(loadoutsKey => groupsToShow.Contains(loadoutsKey)))
{
loadout.SelectedLoadouts.Remove(loadoutsKey);
}
}
else
IReadOnlyList<string> groupsToShow = ["Werx", "Niz", "Socks"]; //consts
if (!jobClothes)
{
foreach (var loadoutsKey in loadout.SelectedLoadouts.Keys.Where(loadoutsKey => !groupsToShow.Contains(loadoutsKey)))
foreach (var loadoutsKey in loadout.SelectedLoadouts.Keys)
{
loadout.SelectedLoadouts.Remove(loadoutsKey);
if (groupsToShow.Contains(loadoutsKey.Id))
{
loadout.SelectedLoadouts.Remove(loadoutsKey);
}
}
}
//backmen-clothing: end

GiveDummyLoadout(dummyEnt, loadout);
}
}
Expand Down
6 changes: 6 additions & 0 deletions Resources/Prototypes/Corvax/Loadouts/role_loadouts.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
- type: roleLoadout
id: JobIAA
groups:
- Werx #backmen
- Niz #backmen
- Socks #backmen
- LawyerNeck
- LawyerJumpsuit
- CommonBackpack
Expand All @@ -13,6 +16,9 @@
- type: roleLoadout
id: JobPilot
groups:
- Werx #backmen
- Niz #backmen
- Socks #backmen
- SecurityJumpsuit
- SecurityBackpack
- SecurityOuterClothing
Expand Down
9 changes: 0 additions & 9 deletions Resources/Prototypes/Loadouts/role_loadouts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
- HoPOuterClothing
- Glasses
- Medals #backmen
- Inventory # Corvax-Loadouts
- Survival
- SelfDefenceDevices # Ataraxia
- Trinkets
Expand Down Expand Up @@ -60,7 +59,6 @@
- PassengerShoes
- Glasses
- Medals #backmen
- Inventory # Corvax-Loadouts
- Survival
- Trinkets
- GroupSpeciesBreathTool
Expand All @@ -79,7 +77,6 @@
- BartenderOuterClothing
- Glasses
- Medals #backmen
- Inventory # Corvax-Loadouts
- Survival
- Trinkets
- GroupSpeciesBreathTool
Expand All @@ -96,7 +93,6 @@
- CommonBackpack
- Glasses
- Medals #backmen
- Inventory # Corvax-Loadouts
- Survival
- Trinkets
- GroupSpeciesBreathTool
Expand All @@ -116,7 +112,6 @@
- ChefOuterClothing
- Glasses
- Medals #backmen
- Inventory # Corvax-Loadouts
- Survival
- Trinkets
- GroupSpeciesBreathTool
Expand All @@ -133,7 +128,6 @@
- CommonBackpack
- Glasses
- Medals #backmen
- Inventory # Corvax-Loadouts
- Survival
- Trinkets
- GroupSpeciesBreathTool
Expand All @@ -152,7 +146,6 @@
- Glasses
- Medals #backmen
- Survival
- Inventory # Corvax-Loadouts
- Trinkets
- GroupSpeciesBreathTool
- Inventory # Corvax-Loadouts
Expand All @@ -172,7 +165,6 @@
- ChaplainOuterClothing
- Glasses
- Medals #backmen
- Inventory # Corvax-Loadouts
- Trinkets
- GroupSpeciesBreathTool
- Inventory # Corvax-Loadouts
Expand Down Expand Up @@ -711,7 +703,6 @@
- MedicalBackpack
- Glasses
- Medals #backmen
- Inventory # Corvax-Loadouts
- Survival
- Trinkets
- GroupSpeciesBreathTool
Expand Down
9 changes: 6 additions & 3 deletions Resources/Prototypes/_Backmen/Loadouts/role_loadout.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
- type: roleLoadout
id: JobBKCCCargo
groups:
- Werx #backmen
- Niz #backmen
- Socks #backmen
- BKCCCargoJumpsuit
- BKCCCargoNeck
- BKCCCargoBackpack
Expand Down Expand Up @@ -28,6 +31,9 @@
- type: roleLoadout
id: JobBlueShield
groups:
- Werx #backmen
- Niz #backmen
- Socks #backmen
- ClothingUniformJumpsuitBlueShield
- ClothingHeadHatBlueShield
- ClothingOuterBlueShield
Expand All @@ -36,6 +42,3 @@
- Survival
- Medals #backmen
- Inventory # Corvax-Loadouts
- Werx #backmen
- Niz #backmen
- Socks #backmen

0 comments on commit a6369f9

Please sign in to comment.