More fixes
This commit is contained in:
parent
25fc65cdd8
commit
f98750212c
4 changed files with 9 additions and 15 deletions
|
|
@ -109,7 +109,7 @@
|
|||
<TextBlock Grid.Column="2" HorizontalAlignment="Left" Margin="5,57,0,0" TextWrapping="Wrap" Text="Citizenship" VerticalAlignment="Top" />
|
||||
<ComboBox Grid.Column="0" x:Name="SubSpeciesCombo" Margin="10,120,5,0"
|
||||
VerticalAlignment="Top"
|
||||
ToolTip="Your character's species. Required."
|
||||
ToolTip="Your character's ethnic group or subtype."
|
||||
SelectionChanged="SpeciesSelectChanged" Height="26"
|
||||
/>
|
||||
<TextBlock Grid.Column="0" Margin="10,104,10,0" TextWrapping="Wrap"
|
||||
|
|
|
|||
|
|
@ -150,15 +150,9 @@ namespace AuroraRecordGenerator
|
|||
|
||||
private static IEnumerable<string> GetSpeciesOptions() => Enum.GetValues(typeof(SpeciesSubType)).Cast<SpeciesSubType>().Select(Utility.SubspeciesNiceName);
|
||||
|
||||
private static IEnumerable<string> GetSpeciesOptions(SpeciesType limitTo)
|
||||
{
|
||||
var targetAttr = limitTo.GetAttributeOfType<SubspeciesMetaAttribute>()?.AssociatedSpecies;
|
||||
if (targetAttr == null)
|
||||
return GetSpeciesOptions();
|
||||
return from item in Enum.GetValues(typeof(SpeciesSubType)).Cast<SpeciesSubType>()
|
||||
private static IEnumerable<string> GetSpeciesOptions(SpeciesType limitTo) => from item in Enum.GetValues(typeof(SpeciesSubType)).Cast<SpeciesSubType>()
|
||||
let attr = item.GetAttributeOfType<SubspeciesMetaAttribute>()
|
||||
where attr != null && attr.AssociatedSpecies == targetAttr
|
||||
where attr != null && (attr.AssociatedSpecies == limitTo || attr.AssociatedSpecies == SpeciesType.None)
|
||||
select Utility.SubspeciesNiceName(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,7 @@ namespace AuroraRecordGenerator
|
|||
record.AppendLine(_targetRecord.Species.HasGender()
|
||||
? $"Gender: {_targetRecord.Gender.Humanize()}"
|
||||
: "Gender: Not Applicable.");
|
||||
record.AppendLine($"Citizenship: {_targetRecord.Citizenship.IfEmpty("None.")}");
|
||||
record.AppendLine($"Citizenship: {_targetRecord.Citizenship.IfEmpty("Not Specified.")}");
|
||||
record.AppendLine($"Clearance Level: {_targetRecord.Clearance.IfEmpty("Not Specified")}");
|
||||
record.AppendLine($"Employed As: {_targetRecord.EmployedAs.IfEmpty("Assistant")}");
|
||||
if (_targetRecord.CharHeight != null)
|
||||
|
|
@ -27,8 +27,8 @@ namespace AuroraRecordGenerator
|
|||
|
||||
// identifying features
|
||||
var trimmedFeatures = _targetRecord.DistinguishingFeatures.Trim();
|
||||
if (trimmedFeatures.Length > 0)
|
||||
record.AppendLine($"Distinguishing Features: {trimmedFeatures}");
|
||||
record.Append("Distinguishing Features: ");
|
||||
record.AppendLine(trimmedFeatures.Length > 0 ? trimmedFeatures : "None noted.");
|
||||
|
||||
record.AppendLine();
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace AuroraRecordGenerator
|
|||
[ProtoContract]
|
||||
public enum SpeciesSubType
|
||||
{
|
||||
[ProtoEnum]
|
||||
[ProtoEnum, SubspeciesMeta(SpeciesType.None, "N/A")]
|
||||
None = 0,
|
||||
|
||||
[ProtoEnum, SubspeciesMeta(SpeciesType.Tajara, "M'sai")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue