Fix GameTicker and StartingGear performing bad string checks.

- This prevented people from spawning as clown, etc if they had set the skirt option.
- Adds some custom type serializers to StartingGear for YAML linter support.
This commit is contained in:
Vera Aguilera Puerto
2021-09-30 13:35:35 +02:00
parent ac81b207d7
commit e194df9747
3 changed files with 15 additions and 9 deletions

View File

@@ -193,7 +193,7 @@ namespace Content.Server.GameTicking
foreach (var slot in EquipmentSlotDefines.AllSlots)
{
var equipmentStr = startingGear.GetGear(slot, profile);
if (equipmentStr != string.Empty)
if (!string.IsNullOrEmpty(equipmentStr))
{
var equipmentEntity = EntityManager.SpawnEntity(equipmentStr, entity.Transform.Coordinates);
inventory.Equip(slot, equipmentEntity.GetComponent<ItemComponent>());