Equipment & inhands. (#110)
* Equipment WiP * Equipment's starting to work. * Equipment works properly 100% now. * Inhands work. Also more clothes.
This commit is contained in:
committed by
GitHub
parent
c612806ef1
commit
74541e23a4
@@ -0,0 +1,27 @@
|
||||
using Content.Shared.GameObjects.Components.Inventory;
|
||||
using SS14.Client.Graphics;
|
||||
|
||||
namespace Content.Client.GameObjects.Components.Clothing
|
||||
{
|
||||
public class ClothingComponent : ItemComponent
|
||||
{
|
||||
public override string Name => "Clothing";
|
||||
|
||||
public (RSI rsi, RSI.StateId stateId)? GetEquippedStateInfo(EquipmentSlotDefines.SlotFlags slot)
|
||||
{
|
||||
if (RsiPath == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var rsi = GetRSI();
|
||||
var stateId = EquippedPrefix != null ? $"{EquippedPrefix}-equipped-{slot}" : $"equipped-{slot}";
|
||||
if (rsi.TryGetState(stateId, out _))
|
||||
{
|
||||
return (rsi, stateId);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user