startingGear for NPCs (#1877)

Need to cover up the lewds.

Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
metalgearsloth
2020-08-25 04:11:32 +10:00
committed by GitHub
parent abc446109e
commit 997d3dcdd4
6 changed files with 45 additions and 3 deletions

View File

@@ -541,6 +541,13 @@ namespace Content.Server.GameTicking
GridCoordinates coordinates = lateJoin ? GetLateJoinSpawnPoint() : GetJobSpawnPoint(job.Prototype.ID);
var entity = _entityManager.SpawnEntity(PlayerPrototypeName, coordinates);
var startingGear = _prototypeManager.Index<StartingGearPrototype>(job.StartingGear);
EquipStartingGear(entity, startingGear);
return entity;
}
public void EquipStartingGear(IEntity entity, StartingGearPrototype startingGear)
{
if (entity.TryGetComponent(out InventoryComponent inventory))
{
var gear = startingGear.Equipment;
@@ -561,8 +568,6 @@ namespace Content.Server.GameTicking
handsComponent.PutInHand(inhandEntity.GetComponent<ItemComponent>(), hand);
}
}
return entity;
}
private void ApplyCharacterProfile(IEntity entity, ICharacterProfile profile)