Engineer's helmet (#188)

* refacting some sprite things

* fix sprites

* Netcode for sending a new icon state to the ClientComponent

* Fixed broken torches.

* Fix dirty calls.

* ClothingComponentState now also includes EquippedPrefix

* Inherritance ClothingComponent : ItemComponent

* Added parameter to ItemComponentState constructor.

* Update RobustToolbox

* Revert "Update RobustToolbox"

This reverts commit 82c7e98ff3853b64698d5e80a45cd7a3758618e0.

Undo weird commit to toolbox?
This commit is contained in:
PrPleGoo
2019-04-08 12:18:27 +02:00
committed by Pieter-Jan Briers
parent 50433c7ab6
commit 35f3cbe3f9
22 changed files with 248 additions and 21 deletions

View File

@@ -1,4 +1,5 @@
using Content.Shared.GameObjects.Components.Inventory;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects.Components.Items;
using SS14.Client.Graphics;
using SS14.Client.Interfaces.ResourceManagement;
using SS14.Client.ResourceManagement;
@@ -8,12 +9,15 @@ using SS14.Shared.IoC;
using SS14.Shared.Serialization;
using SS14.Shared.Utility;
using SS14.Shared.ViewVariables;
using System;
namespace Content.Client.GameObjects
{
public class ItemComponent : Component
{
public override string Name => "Item";
public override uint? NetID => ContentNetIDs.ITEM;
public override Type StateType => typeof(ItemComponentState);
[ViewVariables] protected ResourcePath RsiPath;
@@ -56,5 +60,11 @@ namespace Content.Client.GameObjects
var resourceCache = IoCManager.Resolve<IResourceCache>();
return resourceCache.GetResource<RSIResource>(SharedSpriteComponent.TextureRoot / RsiPath).RSI;
}
public override void HandleComponentState(ComponentState state)
{
var itemComponentState = (ItemComponentState)state;
EquippedPrefix = itemComponentState.EquippedPrefix;
}
}
}