internal void UpdateOrCreateTraitValueMap(IReadOnlyDictionary <CreatureTraitId, int> valueMap, string traitValueMapId)
        {
            var entities = TraitValues.Where(x => x.ValueMapId == traitValueMapId).ToArray();

            if (entities.Length > 0)
            {
                foreach (var traitValueEntity in entities)
                {
                    grangerSimpleDb.TraitValues.Remove(traitValueEntity.Id);
                }
            }

            int nextIndex = TraitValueEntity.GenerateNewTraitValueId(this);

            foreach (var keyval in valueMap)
            {
                TraitValueEntity newentity = new TraitValueEntity()
                {
                    Id         = nextIndex,
                    Trait      = new CreatureTrait(keyval.Key),
                    Value      = keyval.Value,
                    ValueMapId = traitValueMapId
                };
                grangerSimpleDb.TraitValues[newentity.Id] = newentity;
                nextIndex++;
            }

            grangerSimpleDb.Save();
            OnTraitValuesModified?.Invoke(this, new EventArgs());
        }
        internal void DeleteTraitValueMap(string traitValueMapId)
        {
            var entities = TraitValues.Where(x => x.ValueMapId == traitValueMapId).ToArray();

            if (entities.Length > 0)
            {
                foreach (var traitValueEntity in entities)
                {
                    grangerSimpleDb.TraitValues.Remove(traitValueEntity.Id);
                }
            }
            grangerSimpleDb.Save();
            OnTraitValuesModified?.Invoke(this, new EventArgs());
        }