Skip to content

Commit

Permalink
Add more position strings
Browse files Browse the repository at this point in the history
  • Loading branch information
vicr123 committed May 11, 2024
1 parent c499bdd commit 9a77436
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DiscordMonies/Board/Board.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class Space : IOwnable
public string NameWithPositionString =>
ToString() + (string.IsNullOrEmpty(PositionString) ? string.Empty : PositionString);

public override string ToString() => $"{Info.Name}";
public override string ToString() => NameWithPositionString;

public Color GroupColorOrDefault(Color defaultColor)
=> Info is RoadSpace rs ? PrettyColors.ColorMap[Board.GroupNames[rs.Group]] : defaultColor;
Expand Down
1 change: 1 addition & 0 deletions DiscordMonies/Game/Embeds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ public static Embed Space(Space space)
_ => throw new ArgumentOutOfRangeException()
}, true).Get()
.AddField("Name", space.Info.Name, true).Get()
.AddField("Position", space.PositionCode, true).Get()
.AddField("Value", space.Info is ValueSpace vs ? vs.Value.MoneyString() : "N/A", true).Get()
.AddField("Owner", space.Info is PropertySpace ? space.Owner?.DisplayName ?? "Unowned" : "Not ownable", true).Get()
.AddField("Mortgaged?", space.IsMortgaged ? "Yes" : "No", true).Get()
Expand Down
2 changes: 1 addition & 1 deletion DiscordMonies/Game/Trade/TradeTable.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@ public Embed PrintTradeTable(bool asGiving)

private static string OwnableEntry(IOwnable ownable)
{
return ownable is Space { IsMortgaged: true } ? $"{Emoji.CircledM} {ownable}" : ownable.ToString();
return ownable is Space { IsMortgaged: true } ? $"{Emoji.CircledM} {ownable.ToString()}" : ownable.ToString();
}
}

0 comments on commit 9a77436

Please sign in to comment.