Skip to content

Commit

Permalink
Automatically correct too early CK3 bookmark date from configuration (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
IhateTrains authored Dec 1, 2023
1 parent c1a283b commit 392ff2e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ImperatorToCK3/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ private void RegisterKeys(Parser parser) {
CK3BookmarkDate = new Date(dateStr);
var earliestAllowedDate = new Date(2,1,1);
if (CK3BookmarkDate < earliestAllowedDate) {
throw new ConverterException($"CK3 bookmark date must be {earliestAllowedDate} AD or later. Fix your configuration.");
Logger.Warn($"CK3 bookmark date cannot be earlier than {earliestAllowedDate} AD (Y.M.D format), you should fix your configuration. Setting to earliest allowed date...");
CK3BookmarkDate = earliestAllowedDate;
Logger.Info($"Changed CK3 bookmark date to {earliestAllowedDate}");
}
Logger.Info($"CK3 bookmark date set to: {CK3BookmarkDate}");
});
Expand Down

0 comments on commit 392ff2e

Please sign in to comment.