- suffix removed
- spoken languages added - name gen fixed (had erroneous spaces/something missing spaces)
This commit is contained in:
parent
d9b339c8a1
commit
8008daaf2c
5 changed files with 15 additions and 11 deletions
|
|
@ -17,7 +17,7 @@ namespace CharacterRecordsGenerator
|
||||||
public string LastName { get; set; } = string.Empty;
|
public string LastName { get; set; } = string.Empty;
|
||||||
|
|
||||||
[ProtoMember(4)]
|
[ProtoMember(4)]
|
||||||
public string NameSuffix { get; set; } = string.Empty;
|
public string SpokenLanguages { get; set; } = string.Empty;
|
||||||
|
|
||||||
[ProtoMember(5)]
|
[ProtoMember(5)]
|
||||||
public SpeciesType Species { get; set; } = SpeciesType.Human;
|
public SpeciesType Species { get; set; } = SpeciesType.Human;
|
||||||
|
|
|
||||||
|
|
@ -71,11 +71,12 @@
|
||||||
VerticalAlignment="Top" Grid.Column="1" Height="15.96"/>
|
VerticalAlignment="Top" Grid.Column="1" Height="15.96"/>
|
||||||
<TextBox Height="26"
|
<TextBox Height="26"
|
||||||
Margin="5,26,10.5,0" TextWrapping="Wrap"
|
Margin="5,26,10.5,0" TextWrapping="Wrap"
|
||||||
ToolTip="Your character's name suffix, if present." Grid.Column="2"
|
ToolTip="Your character's citizenship." Grid.Column="2"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
Text="{Binding Path=NameSuffix}" controls:TextBoxHelper.Watermark="Jr." TabIndex="4" />
|
Text="{Binding Path=Citizenship}"
|
||||||
|
controls:TextBoxHelper.Watermark="Coalition of Colonies" TabIndex="4" />
|
||||||
<TextBlock HorizontalAlignment="Left" Margin="5,10,0,0" TextWrapping="Wrap"
|
<TextBlock HorizontalAlignment="Left" Margin="5,10,0,0" TextWrapping="Wrap"
|
||||||
Text="Suffix" VerticalAlignment="Top" Grid.Column="2"
|
Text="Citizenship" VerticalAlignment="Top" Grid.Column="2"
|
||||||
Height="15.96" Width="150" />
|
Height="15.96" Width="150" />
|
||||||
<TextBlock Grid.Column="0" Margin="10,57,10,0" TextWrapping="Wrap"
|
<TextBlock Grid.Column="0" Margin="10,57,10,0" TextWrapping="Wrap"
|
||||||
Text="Species*" FontWeight="DemiBold"
|
Text="Species*" FontWeight="DemiBold"
|
||||||
|
|
@ -114,9 +115,9 @@
|
||||||
VerticalAlignment="Bottom" controls:TextBoxHelper.Watermark="Assistant"
|
VerticalAlignment="Bottom" controls:TextBoxHelper.Watermark="Assistant"
|
||||||
Text="{Binding Path=EmployedAs}" Grid.Column="2" TabIndex="11" />
|
Text="{Binding Path=EmployedAs}" Grid.Column="2" TabIndex="11" />
|
||||||
<TextBox Grid.Column="2" Height="23" Margin="5,73,10.5,0"
|
<TextBox Grid.Column="2" Height="23" Margin="5,73,10.5,0"
|
||||||
TextWrapping="Wrap" VerticalAlignment="Top" controls:TextBoxHelper.Watermark="Sol Alliance"
|
TextWrapping="Wrap" VerticalAlignment="Top" controls:TextBoxHelper.Watermark="Tau Ceti Basic, Tradeband"
|
||||||
Text="{Binding Path=Citizenship}" TabIndex="8" />
|
Text="{Binding Path=SpokenLanguages}" TabIndex="8" />
|
||||||
<TextBlock Grid.Column="2" HorizontalAlignment="Left" Margin="5,57,0,0" TextWrapping="Wrap" Text="Citizenship" VerticalAlignment="Top" />
|
<TextBlock Grid.Column="2" HorizontalAlignment="Left" Margin="5,57,0,0" TextWrapping="Wrap" Text="Spoken Languages" VerticalAlignment="Top" />
|
||||||
<ComboBox Grid.Column="0" x:Name="SubSpeciesCombo" Margin="10,120,5,0"
|
<ComboBox Grid.Column="0" x:Name="SubSpeciesCombo" Margin="10,120,5,0"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
ToolTip="Your character's ethnic group or subtype."
|
ToolTip="Your character's ethnic group or subtype."
|
||||||
|
|
|
||||||
|
|
@ -85,10 +85,9 @@ namespace CharacterRecordsGenerator
|
||||||
private string MakeNameLine()
|
private string MakeNameLine()
|
||||||
{
|
{
|
||||||
var builder = new StringBuilder("Name: ");
|
var builder = new StringBuilder("Name: ");
|
||||||
builder.Append(_targetRecord.FirstName);
|
builder.Append(_targetRecord.FirstName.SpaceIfValue());
|
||||||
builder.Append(_targetRecord.MiddleName.SpaceIfValue());
|
builder.Append(_targetRecord.MiddleName.SpaceIfValue());
|
||||||
builder.Append($" {_targetRecord.LastName}");
|
builder.Append(_targetRecord.LastName);
|
||||||
builder.Append(_targetRecord.NameSuffix.SpaceIfValue());
|
|
||||||
return builder.ToString();
|
return builder.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,10 @@ namespace CharacterRecordsGenerator
|
||||||
if (_targetRecord.Citizenship.Any()) {
|
if (_targetRecord.Citizenship.Any()) {
|
||||||
record.AppendLine($"Citizenship: {_targetRecord.Citizenship}");
|
record.AppendLine($"Citizenship: {_targetRecord.Citizenship}");
|
||||||
}
|
}
|
||||||
|
if (_targetRecord.SpokenLanguages.Any())
|
||||||
|
{
|
||||||
|
record.AppendLine($"Spoken Languages: {_targetRecord.SpokenLanguages}");
|
||||||
|
}
|
||||||
if (_targetRecord.NextOfKin.Any()) {
|
if (_targetRecord.NextOfKin.Any()) {
|
||||||
record.AppendLine($"Next of Kin: {_targetRecord.NextOfKin}");
|
record.AppendLine($"Next of Kin: {_targetRecord.NextOfKin}");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ namespace CharacterRecordsGenerator
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="val"></param>
|
/// <param name="val"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string SpaceIfValue(this string val) => string.IsNullOrWhiteSpace(val) ? string.Empty : $" {val} ";
|
public static string SpaceIfValue(this string val) => string.IsNullOrWhiteSpace(val) ? string.Empty : $"{val} ";
|
||||||
|
|
||||||
public static string IfEmpty(this string target, string fallback) =>
|
public static string IfEmpty(this string target, string fallback) =>
|
||||||
target.IsEmpty() ? fallback : target;
|
target.IsEmpty() ? fallback : target;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue