Files
crystall-punk-14/Content.Server/GameObjects/Components/Items/Clothing/ClothingComponent.cs
clusterfack c33c227d95 Inventories (#61)
* Bully the fuck out of inventory shit
Inventory Stuff
Inventories technically work
It works technicaly speaking
Yeah this part too
Lets do it!
Inventories completed
Motherfucker

* Remove unnecessary usings and fix one thing

* Submodule update

* Adds a bunch of various clothing prototypes for each current inventory slot
2018-04-25 13:42:35 +02:00

30 lines
1.0 KiB
C#

using SS14.Shared.GameObjects.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
private List<string> slotstrings = new List<string>(); //serialization
public override void ExposeData(EntitySerializer serializer)
{
base.ExposeData(serializer);
serializer.DataField(ref slotstrings, "Slots", new List<string>(0));
foreach(var slotflagsloaded in slotstrings)
{
SlotFlags |= (SlotFlags)Enum.Parse(typeof(SlotFlags), slotflagsloaded.ToUpper());
}
}
}
}