Files
tbd-station-14/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs
Pieter-Jan Briers 189a52c6d7 Use Sprite proxies for GUIs. (#93)
AKA "welders actually light up in the hands GUI".
2018-08-16 22:43:04 +02:00

31 lines
986 B
C#

using SS14.Shared.Serialization;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static Content.Shared.GameObjects.Components.Inventory.EquipmentSlotDefines;
namespace Content.Server.GameObjects
{
public class ClothingComponent : ItemComponent
{
public override string Name => "Clothing";
public SlotFlags SlotFlags = SlotFlags.PREVENTEQUIP; //Different from None, NONE allows equips if no slot flags are required
public override void ExposeData(ObjectSerializer serializer)
{
base.ExposeData(serializer);
// TODO: Writing.
serializer.DataReadFunction("Slots", new List<string>(0), list =>
{
foreach (var slotflagsloaded in list)
{
SlotFlags |= (SlotFlags)Enum.Parse(typeof(SlotFlags), slotflagsloaded.ToUpper());
}
});
}
}
}