Skip to content

Commit

Permalink
Fix some warnings (#1531) #patch
Browse files Browse the repository at this point in the history
  • Loading branch information
IhateTrains authored Sep 24, 2023
1 parent 18e22d2 commit 18d44a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions ImperatorToCK3/CK3/Titles/Title.cs
Original file line number Diff line number Diff line change
Expand Up @@ -851,10 +851,10 @@ public void SetDeFactoLiege(Title? newLiege, Date date) {
}

[SerializeOnlyValue] public TitleCollection DeJureVassals { get; } = new(); // DIRECT de jure vassals
public Dictionary<string, Title> GetDeJureVassalsAndBelow() {
public IDictionary<string, Title> GetDeJureVassalsAndBelow() {
return GetDeJureVassalsAndBelow("bcdke");
}
public Dictionary<string, Title> GetDeJureVassalsAndBelow(string rankFilter) {
public IDictionary<string, Title> GetDeJureVassalsAndBelow(string rankFilter) {
var rankFilterAsArray = rankFilter.ToCharArray();
Dictionary<string, Title> deJureVassalsAndBelow = new();
foreach (var vassalTitle in DeJureVassals) {
Expand All @@ -874,14 +874,14 @@ public Dictionary<string, Title> GetDeJureVassalsAndBelow(string rankFilter) {

return deJureVassalsAndBelow;
}
public Dictionary<string, Title> GetDeFactoVassals(Date date) { // DIRECT de facto vassals
public IDictionary<string, Title> GetDeFactoVassals(Date date) { // DIRECT de facto vassals
return parentCollection.Where(t => t.GetDeFactoLiege(date)?.Id == Id)
.ToDictionary(t => t.Id, t => t);
}
public Dictionary<string, Title> GetDeFactoVassalsAndBelow(Date date) {
public IDictionary<string, Title> GetDeFactoVassalsAndBelow(Date date) {
return GetDeFactoVassalsAndBelow(date, "bcdke");
}
public Dictionary<string, Title> GetDeFactoVassalsAndBelow(Date date, string rankFilter) {
public IDictionary<string, Title> GetDeFactoVassalsAndBelow(Date date, string rankFilter) {
var rankFilterAsArray = rankFilter.ToCharArray();
Dictionary<string, Title> deFactoVassalsAndBelow = new();
foreach (var (vassalTitleName, vassalTitle) in GetDeFactoVassals(date)) {
Expand Down Expand Up @@ -1052,7 +1052,7 @@ public void OutputHistory(StreamWriter writer) {
writer.Write(sb);
}

public HashSet<ulong> GetProvincesInCountry(Date date) {
public ISet<ulong> GetProvincesInCountry(Date date) {
var holderId = GetHolderId(date);
var heldCounties = new List<Title>(
parentCollection.Where(t => t.GetHolderId(date) == holderId && t.Rank == TitleRank.county)
Expand Down
2 changes: 1 addition & 1 deletion ImperatorToCK3/Outputter/BookmarkOutputter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private static void DrawBookmarkMap(Configuration config, List<Title> playerTitl
foreach (var playerTitle in playerTitles) {
var colorOnMap = playerTitle.Color1 ?? new commonItems.Colors.Color(0, 0, 0);
var rgba32ColorOnMap = new Rgba32((byte)colorOnMap.R, (byte)colorOnMap.G, (byte)colorOnMap.B);
HashSet<ulong> heldProvinces = playerTitle.GetProvincesInCountry(config.CK3BookmarkDate);
ISet<ulong> heldProvinces = playerTitle.GetProvincesInCountry(config.CK3BookmarkDate);
// Determine which impassables should be be colored by the country
var provincesToColor = new HashSet<ulong>(heldProvinces);
var impassables = mapData.ColorableImpassableProvinces;
Expand Down

0 comments on commit 18d44a6

Please sign in to comment.