Merge branch 'master' into buckle-locker-fix-1262
This commit is contained in:
@@ -27,6 +27,7 @@ namespace Content.Client
|
|||||||
_netManager.RegisterNetMessage<MsgPreferencesAndSettings>(nameof(MsgPreferencesAndSettings),
|
_netManager.RegisterNetMessage<MsgPreferencesAndSettings>(nameof(MsgPreferencesAndSettings),
|
||||||
HandlePreferencesAndSettings);
|
HandlePreferencesAndSettings);
|
||||||
_netManager.RegisterNetMessage<MsgUpdateCharacter>(nameof(MsgUpdateCharacter));
|
_netManager.RegisterNetMessage<MsgUpdateCharacter>(nameof(MsgUpdateCharacter));
|
||||||
|
_netManager.RegisterNetMessage<MsgSelectCharacter>(nameof(MsgSelectCharacter));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SelectCharacter(ICharacterProfile profile)
|
public void SelectCharacter(ICharacterProfile profile)
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ namespace Content.Client.GameObjects.Components
|
|||||||
{
|
{
|
||||||
public override void Populate()
|
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<RSIResource>(humanFacialHairRSIPath).RSI;
|
var humanFacialHairRSI = ResC.GetResource<RSIResource>(humanFacialHairRSIPath).RSI;
|
||||||
|
|
||||||
var styles = HairStyles.FacialHairStylesMap.ToList();
|
var styles = HairStyles.FacialHairStylesMap.ToList();
|
||||||
@@ -160,7 +160,7 @@ namespace Content.Client.GameObjects.Components
|
|||||||
|
|
||||||
public virtual void Populate()
|
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<RSIResource>(humanHairRSIPath).RSI;
|
var humanHairRSI = ResC.GetResource<RSIResource>(humanHairRSIPath).RSI;
|
||||||
|
|
||||||
var styles = HairStyles.HairStylesMap.ToList();
|
var styles = HairStyles.HairStylesMap.ToList();
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using Content.Shared.Interfaces;
|
|||||||
using Robust.Client.GameObjects;
|
using Robust.Client.GameObjects;
|
||||||
using Robust.Client.Graphics.Overlays;
|
using Robust.Client.Graphics.Overlays;
|
||||||
using Robust.Client.Interfaces.Graphics.Overlays;
|
using Robust.Client.Interfaces.Graphics.Overlays;
|
||||||
|
using Robust.Client.Player;
|
||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Interfaces.GameObjects;
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
using Robust.Shared.Interfaces.Reflection;
|
using Robust.Shared.Interfaces.Reflection;
|
||||||
@@ -40,6 +41,7 @@ namespace Content.Client.GameObjects.Components.Mobs
|
|||||||
// Required dependencies
|
// Required dependencies
|
||||||
[Dependency] private readonly IOverlayManager _overlayManager;
|
[Dependency] private readonly IOverlayManager _overlayManager;
|
||||||
[Dependency] private readonly IReflectionManager _reflectionManager;
|
[Dependency] private readonly IReflectionManager _reflectionManager;
|
||||||
|
[Dependency] private readonly IPlayerManager _playerManager;
|
||||||
#pragma warning restore 649
|
#pragma warning restore 649
|
||||||
|
|
||||||
public override void HandleMessage(ComponentMessage message, IComponent component)
|
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)
|
public override void HandleComponentState(ComponentState curState, ComponentState nextState)
|
||||||
{
|
{
|
||||||
base.HandleComponentState(curState, nextState);
|
base.HandleComponentState(curState, nextState);
|
||||||
|
|
||||||
|
if(_playerManager?.LocalPlayer != null && _playerManager.LocalPlayer.ControlledEntity != Owner)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!(curState is OverlayEffectComponentState state) || ActiveOverlays.Equals(state.Overlays))
|
if (!(curState is OverlayEffectComponentState state) || ActiveOverlays.Equals(state.Overlays))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -68,7 +74,7 @@ namespace Content.Client.GameObjects.Components.Mobs
|
|||||||
|
|
||||||
private void SetEffects(List<OverlayContainer> newOverlays)
|
private void SetEffects(List<OverlayContainer> newOverlays)
|
||||||
{
|
{
|
||||||
foreach (var container in ActiveOverlays.ShallowClone())
|
foreach (var container in ActiveOverlays.ToArray())
|
||||||
{
|
{
|
||||||
if (!newOverlays.Contains(container))
|
if (!newOverlays.Contains(container))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user