Skip to content

Commit

Permalink
fix return too soon
Browse files Browse the repository at this point in the history
  • Loading branch information
stilnat committed Jul 22, 2023
1 parent aca4c77 commit 1530d0b
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions Assets/Scripts/SS3D/Systems/Roles/RoleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,38 +200,38 @@ private void SpawnLoadoutItems(Entity entity, RoleLoadout loadout)
SpawnItemInSlot(loadout.LeftHandItem, loadout.LeftHand, hands.HandContainers[0]);
SpawnItemInSlot(loadout.RightHandItem, loadout.RightHand, hands.HandContainers[1]);

if (!inventory.TryGetTypeContainer(ContainerType.ShoeRight, 0, out AttachedContainer ShoeRightContainer)) return;
SpawnItemInSlot(loadout.RightShoeItem, loadout.RightShoe, ShoeRightContainer);
if (inventory.TryGetTypeContainer(ContainerType.ShoeRight, 0, out AttachedContainer ShoeRightContainer))
SpawnItemInSlot(loadout.RightShoeItem, loadout.RightShoe, ShoeRightContainer);

if (!inventory.TryGetTypeContainer(ContainerType.ShoeLeft, 0, out AttachedContainer ShoeLeftContainer)) return;
SpawnItemInSlot(loadout.LeftShoeItem, loadout.LeftShoe, ShoeLeftContainer);
if (inventory.TryGetTypeContainer(ContainerType.ShoeLeft, 0, out AttachedContainer ShoeLeftContainer))
SpawnItemInSlot(loadout.LeftShoeItem, loadout.LeftShoe, ShoeLeftContainer);

if (!inventory.TryGetTypeContainer(ContainerType.Jumpsuit, 0, out AttachedContainer JumpsuitContainer)) return;
SpawnItemInSlot(loadout.JumpsuitItem, loadout.Jumpsuit, JumpsuitContainer);
if (inventory.TryGetTypeContainer(ContainerType.Jumpsuit, 0, out AttachedContainer JumpsuitContainer))
SpawnItemInSlot(loadout.JumpsuitItem, loadout.Jumpsuit, JumpsuitContainer);

if (!inventory.TryGetTypeContainer(ContainerType.GloveLeft, 0, out AttachedContainer LeftGloveContainer)) return;
SpawnItemInSlot(loadout.LeftGloveItem, loadout.LeftGlove, LeftGloveContainer);
if (inventory.TryGetTypeContainer(ContainerType.GloveLeft, 0, out AttachedContainer LeftGloveContainer))
SpawnItemInSlot(loadout.LeftGloveItem, loadout.LeftGlove, LeftGloveContainer);

if (!inventory.TryGetTypeContainer(ContainerType.GloveRight, 0, out AttachedContainer RightGloveContainer)) return;
SpawnItemInSlot(loadout.RightGloveItem, loadout.RightGlove, RightGloveContainer);
if (inventory.TryGetTypeContainer(ContainerType.GloveRight, 0, out AttachedContainer RightGloveContainer))
SpawnItemInSlot(loadout.RightGloveItem, loadout.RightGlove, RightGloveContainer);

if (!inventory.TryGetTypeContainer(ContainerType.Head, 0, out AttachedContainer HatContainer)) return;
SpawnItemInSlot(loadout.HatItem, loadout.Hat, HatContainer);
if (inventory.TryGetTypeContainer(ContainerType.Head, 0, out AttachedContainer HatContainer))
SpawnItemInSlot(loadout.HatItem, loadout.Hat, HatContainer);

if (!inventory.TryGetTypeContainer(ContainerType.Glasses, 0, out AttachedContainer GlassesContainer)) return;
SpawnItemInSlot(loadout.GlassesItem, loadout.Glasses, GlassesContainer);
if (inventory.TryGetTypeContainer(ContainerType.Glasses, 0, out AttachedContainer GlassesContainer))
SpawnItemInSlot(loadout.GlassesItem, loadout.Glasses, GlassesContainer);

if (!inventory.TryGetTypeContainer(ContainerType.Pocket, 0, out AttachedContainer leftPocketContainer)) return;
SpawnItemInSlot(loadout.LeftPocketItem, loadout.LeftPocket, leftPocketContainer);
if (inventory.TryGetTypeContainer(ContainerType.Pocket, 0, out AttachedContainer leftPocketContainer))
SpawnItemInSlot(loadout.LeftPocketItem, loadout.LeftPocket, leftPocketContainer);

if (!inventory.TryGetTypeContainer(ContainerType.Pocket, 1, out AttachedContainer rightPocketContainer)) return;
SpawnItemInSlot(loadout.RightPocketItem, loadout.RightPocket, rightPocketContainer);
if (inventory.TryGetTypeContainer(ContainerType.Pocket, 1, out AttachedContainer rightPocketContainer))
SpawnItemInSlot(loadout.RightPocketItem, loadout.RightPocket, rightPocketContainer);

if (!inventory.TryGetTypeContainer(ContainerType.EarRight, 0, out AttachedContainer EarRightContainer)) return;
SpawnItemInSlot(loadout.RightEarItem, loadout.RightEar, EarRightContainer);
if (inventory.TryGetTypeContainer(ContainerType.EarRight, 0, out AttachedContainer EarRightContainer))
SpawnItemInSlot(loadout.RightEarItem, loadout.RightEar, EarRightContainer);

if (!inventory.TryGetTypeContainer(ContainerType.EarLeft, 0, out AttachedContainer EarLeftContainer)) return;
SpawnItemInSlot(loadout.LeftEarItem, loadout.LeftEar, EarLeftContainer);
if (inventory.TryGetTypeContainer(ContainerType.EarLeft, 0, out AttachedContainer EarLeftContainer))
SpawnItemInSlot(loadout.LeftEarItem, loadout.LeftEar, EarLeftContainer);

}

Expand Down

0 comments on commit 1530d0b

Please sign in to comment.