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

fix loadout #1002

Merged
merged 1 commit into from
Jan 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
Loading