Toggleable Hardsuit Helmets (#7559)

This commit is contained in:
Leon Friedrich
2022-04-23 15:31:45 +12:00
committed by GitHub
parent 83b47c43c0
commit 1141c19d76
34 changed files with 449 additions and 49 deletions

View File

@@ -118,7 +118,7 @@ namespace Content.Client.Actions
SubscribeLocalEvent<ActionsComponent, ComponentHandleState>(HandleState);
}
protected override void Dirty(ActionType action)
public override void Dirty(ActionType action)
{
// Should only ever receive component states for attached player's component.
// --> lets not bother unnecessarily dirtying and prediction-resetting actions for other players.

View File

@@ -129,7 +129,7 @@ namespace Content.Client.Actions.UI
_smallActionIcon.Texture = null;
_smallActionIcon.Visible = false;
}
else if (Action.Provider != null && Action.ItemIconStyle == ItemActionIconStyle.BigItem)
else if (Action.EntityIcon != null && Action.ItemIconStyle == ItemActionIconStyle.BigItem)
{
_smallActionIcon.Texture = texture;
_smallActionIcon.Modulate = Action.IconColor;
@@ -149,7 +149,7 @@ namespace Content.Client.Actions.UI
private void UpdateItemIcon()
{
if (Action?.Provider == null || !IoCManager.Resolve<IEntityManager>().TryGetComponent(Action.Provider.Value, out SpriteComponent sprite))
if (Action?.EntityIcon == null || !IoCManager.Resolve<IEntityManager>().TryGetComponent(Action.EntityIcon.Value, out SpriteComponent sprite))
{
_bigItemSpriteView.Visible = false;
_bigItemSpriteView.Sprite = null;

View File

@@ -402,7 +402,7 @@ namespace Content.Client.Actions.UI
_smallActionIcon.Texture = null;
_smallActionIcon.Visible = false;
}
else if (Action.Provider != null && Action.ItemIconStyle == ItemActionIconStyle.BigItem)
else if (Action.EntityIcon != null && Action.ItemIconStyle == ItemActionIconStyle.BigItem)
{
_smallActionIcon.Texture = texture;
_smallActionIcon.Modulate = Action.IconColor;
@@ -422,7 +422,7 @@ namespace Content.Client.Actions.UI
private void UpdateItemIcon()
{
if (Action?.Provider == null || !IoCManager.Resolve<IEntityManager>().TryGetComponent(Action.Provider.Value, out SpriteComponent sprite))
if (Action?.EntityIcon == null || !IoCManager.Resolve<IEntityManager>().TryGetComponent(Action.EntityIcon.Value, out SpriteComponent sprite))
{
_bigItemSpriteView.Visible = false;
_bigItemSpriteView.Sprite = null;

View File

@@ -14,9 +14,6 @@ namespace Content.Client.Clothing
[DataField("femaleMask")]
public FemaleClothingMask FemaleMask { get; } = FemaleClothingMask.UniformFull;
[DataField("quickEquip")]
public bool QuickEquip = true;
public string? InSlot;
}