From e7847d1555639e71b0137b2849e6b469997bb986 Mon Sep 17 00:00:00 2001 From: AJCM-git <60196617+AJCM-git@users.noreply.github.com> Date: Tue, 7 Jul 2020 15:04:27 -0400 Subject: [PATCH 1/4] fixing lobby (#1297) --- .../GameObjects/Components/MagicMirrorBoundUserInterface.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Client/GameObjects/Components/MagicMirrorBoundUserInterface.cs b/Content.Client/GameObjects/Components/MagicMirrorBoundUserInterface.cs index d6fcca29fd..8a6e1667e2 100644 --- a/Content.Client/GameObjects/Components/MagicMirrorBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/MagicMirrorBoundUserInterface.cs @@ -72,7 +72,7 @@ namespace Content.Client.GameObjects.Components { public override void Populate() { - var humanFacialHairRSIPath = SharedSpriteComponent.TextureRoot / "Mob/human_facial_hair.rsi"; + var humanFacialHairRSIPath = SharedSpriteComponent.TextureRoot / "Mobs/Customization/human_facial_hair.rsi"; var humanFacialHairRSI = ResC.GetResource(humanFacialHairRSIPath).RSI; var styles = HairStyles.FacialHairStylesMap.ToList(); @@ -160,7 +160,7 @@ namespace Content.Client.GameObjects.Components public virtual void Populate() { - var humanHairRSIPath = SharedSpriteComponent.TextureRoot / "Mob/human_hair.rsi"; + var humanHairRSIPath = SharedSpriteComponent.TextureRoot / "Mobs/Customization/human_hair.rsi"; var humanHairRSI = ResC.GetResource(humanHairRSIPath).RSI; var styles = HairStyles.HairStylesMap.ToList(); From 830d7bc02d970588dff4cbd6c4f026a4ffc73ebc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Aguilera=20Puerto?= Date: Tue, 7 Jul 2020 21:27:32 +0200 Subject: [PATCH 2/4] Fixes MsgSelectCharacter not being registered --- Content.Client/ClientPreferencesManager.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Content.Client/ClientPreferencesManager.cs b/Content.Client/ClientPreferencesManager.cs index 298ba8e80d..5b0296dcde 100644 --- a/Content.Client/ClientPreferencesManager.cs +++ b/Content.Client/ClientPreferencesManager.cs @@ -27,6 +27,7 @@ namespace Content.Client _netManager.RegisterNetMessage(nameof(MsgPreferencesAndSettings), HandlePreferencesAndSettings); _netManager.RegisterNetMessage(nameof(MsgUpdateCharacter)); + _netManager.RegisterNetMessage(nameof(MsgSelectCharacter)); } public void SelectCharacter(ICharacterProfile profile) From 3833d1af5fa1eb931fe5d8e8f0bf42a2b8e706c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Aguilera=20Puerto?= Date: Tue, 7 Jul 2020 22:34:20 +0200 Subject: [PATCH 3/4] Fix overlays applying EVERY overlay of EVERY overlay component Cluster moment --- .../Components/Mobs/ClientOverlayEffectsComponent.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Content.Client/GameObjects/Components/Mobs/ClientOverlayEffectsComponent.cs b/Content.Client/GameObjects/Components/Mobs/ClientOverlayEffectsComponent.cs index e1a1cb8b38..71d27aaffc 100644 --- a/Content.Client/GameObjects/Components/Mobs/ClientOverlayEffectsComponent.cs +++ b/Content.Client/GameObjects/Components/Mobs/ClientOverlayEffectsComponent.cs @@ -7,6 +7,7 @@ using Content.Shared.Interfaces; using Robust.Client.GameObjects; using Robust.Client.Graphics.Overlays; using Robust.Client.Interfaces.Graphics.Overlays; +using Robust.Client.Player; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Reflection; @@ -40,6 +41,7 @@ namespace Content.Client.GameObjects.Components.Mobs // Required dependencies [Dependency] private readonly IOverlayManager _overlayManager; [Dependency] private readonly IReflectionManager _reflectionManager; + [Dependency] private readonly IPlayerManager _playerManager; #pragma warning restore 649 public override void HandleMessage(ComponentMessage message, IComponent component) @@ -58,6 +60,10 @@ namespace Content.Client.GameObjects.Components.Mobs public override void HandleComponentState(ComponentState curState, ComponentState nextState) { base.HandleComponentState(curState, nextState); + + if(_playerManager.LocalPlayer != null && _playerManager.LocalPlayer.ControlledEntity != Owner) + return; + if (!(curState is OverlayEffectComponentState state) || ActiveOverlays.Equals(state.Overlays)) { return; @@ -68,7 +74,7 @@ namespace Content.Client.GameObjects.Components.Mobs private void SetEffects(List newOverlays) { - foreach (var container in ActiveOverlays.ShallowClone()) + foreach (var container in ActiveOverlays.ToArray()) { if (!newOverlays.Contains(container)) { From 75f92da8acf14d1539c13319d0ec2a9249e697ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Aguilera=20Puerto?= Date: Tue, 7 Jul 2020 22:41:33 +0200 Subject: [PATCH 4/4] Fix tests --- .../Components/Mobs/ClientOverlayEffectsComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Client/GameObjects/Components/Mobs/ClientOverlayEffectsComponent.cs b/Content.Client/GameObjects/Components/Mobs/ClientOverlayEffectsComponent.cs index 71d27aaffc..580a3de334 100644 --- a/Content.Client/GameObjects/Components/Mobs/ClientOverlayEffectsComponent.cs +++ b/Content.Client/GameObjects/Components/Mobs/ClientOverlayEffectsComponent.cs @@ -61,7 +61,7 @@ namespace Content.Client.GameObjects.Components.Mobs { base.HandleComponentState(curState, nextState); - if(_playerManager.LocalPlayer != null && _playerManager.LocalPlayer.ControlledEntity != Owner) + if(_playerManager?.LocalPlayer != null && _playerManager.LocalPlayer.ControlledEntity != Owner) return; if (!(curState is OverlayEffectComponentState state) || ActiveOverlays.Equals(state.Overlays))