Read the .udc CallHist multiplier and BonusPoints2

MultSqlString = CallHist counts every station the call history file
lists, once per callsign, which is how N1MM dedups it. The file reaches
the scoring code through ContestLog.History, and a QsoContext now
carries it; without a file loaded nothing counts.

BonusPoints2 = +50, calls.txt reads the callsigns from the support-files
folder and adds 50 to the contact, *2 doubles it and a plain 50 scores
50 instead. The folder comes from the registry, which the app passes
when it reads the .udc files. N1MM's other form, where the file is
grids.txt and the bonus is looked up by grid square, is not read.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
2026-08-31 13:31:25 +00:00
co-authored by Claude Opus 5
parent 1d3167cd04
commit e3fa979584
10 changed files with 184 additions and 18 deletions
+9 -1
View File
@@ -1,4 +1,5 @@
using Nonemm.Core;
using Nonemm.Core.Calls;
using Nonemm.Core.Country;
namespace Nonemm.Contests;
@@ -31,6 +32,10 @@ public sealed class ContestLog
/// change them while the contest is open, and the score follows.
public ContestEntry Entry { get; set; }
/// The call history file, for a contest that counts a multiplier from it.
/// The session sets it when the operator loads one.
public CallHistory History { get; set; } = CallHistory.Empty;
public Contest Contest => contest;
public IReadOnlyList<Qso> Qsos => qsos;
@@ -132,7 +137,10 @@ public sealed class ContestLog
/// is signing from is looked up when the call as sent places nowhere. What
/// that country counts for is the contest's decision.
private QsoContext ContextFor(Qso qso) =>
new(qso, countries?.Find(qso.Call) ?? countries?.Find(qso.Call.Station), me, Entry);
new(qso, countries?.Find(qso.Call) ?? countries?.Find(qso.Call.Station), me, Entry)
{
History = History,
};
private static Qso ApplyVerdict(Qso qso, Verdict verdict) =>
ApplyMultiplierFlags(qso, verdict.NewMultipliers) with { Points = verdict.Points };