Add ItemDuplicationAnalyser
Sliding-window heuristic over (Steam ID, item code) groups: any window of THRESHOLD_WINDOW_SECONDS containing THRESHOLD_COUNT or more positive-delta events for the same player/item pair triggers a Problem. Negative deltas (drops, transfers out) are filtered. Five events in ten seconds (defaults) encodes the rule of thumb that legitimate gameplay rarely produces five identical items in that span. Constants live as class constants on the analyser so operators can override via subclass without touching analysis logic; the docblocks record the justification. Synthetic fixture extended with a 6-event burst (AdminUser + Base.Bullets9mm in <1s) and a 4-event sub-threshold group (Player1 + Base.Plank scattered over 4 minutes) to exercise both paths.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
namespace IndifferentKetchup\Codex\Log\ProjectZomboid;
|
||||
|
||||
use IndifferentKetchup\Codex\Analyser\AnalyserInterface;
|
||||
use IndifferentKetchup\Codex\Analyser\PatternAnalyser;
|
||||
use IndifferentKetchup\Codex\Analyser\ProjectZomboid\ItemDuplicationAnalyser;
|
||||
use IndifferentKetchup\Codex\Detective\FilenameDetector;
|
||||
use IndifferentKetchup\Codex\Detective\WeightedSinglePatternDetector;
|
||||
use IndifferentKetchup\Codex\Parser\ParserInterface;
|
||||
@@ -22,7 +22,7 @@ class ProjectZomboidItemLog extends ProjectZomboidEventLog
|
||||
|
||||
public static function getDefaultAnalyser(): AnalyserInterface
|
||||
{
|
||||
return new PatternAnalyser();
|
||||
return new ItemDuplicationAnalyser();
|
||||
}
|
||||
|
||||
public static function getDetectors(): array
|
||||
|
||||
Reference in New Issue
Block a user