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:
Pieter-Jan Briers
2018-09-19 18:54:04 +02:00
committed by GitHub
parent c612806ef1
commit 74541e23a4
97 changed files with 1094 additions and 273 deletions

View File

@@ -33,6 +33,7 @@ using Content.Server.GameObjects.EntitySystems;
using Content.Server.Mobs;
using Content.Server.Players;
using Content.Server.GameObjects.Components.Interactable;
using Content.Shared.GameObjects.Components.Inventory;
namespace Content.Server
{
@@ -233,7 +234,15 @@ namespace Content.Server
IEntity SpawnPlayerMob()
{
return entityManager.ForceSpawnEntityAt(PlayerPrototypeName, SpawnPoint);
var entity = entityManager.ForceSpawnEntityAt(PlayerPrototypeName, SpawnPoint);
var shoes = entityManager.SpawnEntity("ShoesItem");
var uniform = entityManager.SpawnEntity("UniformAssistant");
if (entity.TryGetComponent(out InventoryComponent inventory))
{
inventory.Equip(EquipmentSlotDefines.Slots.INNERCLOTHING, uniform.GetComponent<ClothingComponent>());
inventory.Equip(EquipmentSlotDefines.Slots.SHOES, shoes.GetComponent<ClothingComponent>());
}
return entity;
}
}
}