diff --git a/AuroraRecordGenerator/Record.cs b/AuroraRecordGenerator/Record.cs index d2cf8cb..4b7ac46 100644 --- a/AuroraRecordGenerator/Record.cs +++ b/AuroraRecordGenerator/Record.cs @@ -25,17 +25,17 @@ namespace AuroraRecordGenerator [ProtoMember(16)] public SpeciesSubType Subspecies { get; set; } = SpeciesSubType.None; - [ProtoMember(6, IsRequired = true)] + [ProtoMember(6)] public string Pronouns { get; set; } = string.Empty; [ProtoMember(7)] public DateTime BirthDate { get; set; } = Info.IcDate; [ProtoMember(8)] - public double? CharHeight { get; set; } = 170; + public double? CharHeight { get; set; } = null; [ProtoMember(9)] - public double? Weight { get; set; } = 70; + public double? Weight { get; set; } = null; [ProtoMember(10)] public string SkinColor { get; set; } = string.Empty; diff --git a/AuroraRecordGenerator/RecordEditor.xaml b/AuroraRecordGenerator/RecordEditor.xaml index 363f04e..53d2a46 100644 --- a/AuroraRecordGenerator/RecordEditor.xaml +++ b/AuroraRecordGenerator/RecordEditor.xaml @@ -24,13 +24,16 @@ + - + - @@ -95,12 +98,12 @@ VerticalAlignment="Bottom" Grid.ColumnSpan="1" Grid.Column="1" controls:TextBoxHelper.Watermark="e.g. Jane Doe (mother)" - Text="{Binding Path=NextOfKin}" TabIndex="11" /> + Text="{Binding Path=NextOfKin}" TabIndex="10" /> + Text="{Binding Path=EmployedAs}" Grid.Column="2" TabIndex="11" /> @@ -125,13 +128,13 @@ ()?.FieldName ?? "Subspecies"}: {Utility.SubspeciesNiceName(_targetRecord.Subspecies)}"); @@ -37,19 +51,29 @@ namespace AuroraRecordGenerator record.AppendLine($"Weight: {_targetRecord.Weight} kg ({Utility.KgToLb(_targetRecord.Weight ?? 0)} lb)"); // Eye color - var trimmedEye = _targetRecord.EyeColor.Trim(); - record.AppendFormat("Eye Color: {0}\n", trimmedEye.Length > 0 ? trimmedEye : "Not specified."); + if (_targetRecord.EyeColor.Any()) + { + var trimmedEye = _targetRecord.EyeColor.Trim(); + record.AppendFormat("Eye Color: {0}\n", trimmedEye.Length > 0 ? trimmedEye : "Not specified."); + } + if (_targetRecord.SkinColor.Any()) + { + var bodyColor = _targetRecord.SkinColor.Trim(); + record.AppendFormat("Skin/Body Color: {0}\n", bodyColor.Length > 0 ? bodyColor : "Not specified."); + } + if (_targetRecord.HairColor.Any()) + { + var hairColor = _targetRecord.HairColor.Trim(); + record.AppendFormat("Hair Color: {0}\n", hairColor.Length > 0 ? hairColor : "Not specified."); + } - var bodyColor = _targetRecord.SkinColor.Trim(); - record.AppendFormat("Skin/Body Color: {0}\n", bodyColor.Length > 0 ? bodyColor : "Not specified."); - - var hairColor = _targetRecord.HairColor.Trim(); - record.AppendFormat("Hair Color: {0}\n", hairColor.Length > 0 ? hairColor : "Not specified."); - - // identifying features - var trimmedFeatures = _targetRecord.DistinguishingFeatures.Trim(); - record.Append("Distinguishing Features: "); - record.AppendLine(trimmedFeatures.Length > 0 ? trimmedFeatures : "None noted."); + if (_targetRecord.DistinguishingFeatures.Any()) + { + // identifying features + var trimmedFeatures = _targetRecord.DistinguishingFeatures.Trim(); + record.Append("Distinguishing Features: "); + record.AppendLine(trimmedFeatures.Length > 0 ? trimmedFeatures : "None noted."); + } record.AppendLine();