xabbo-scripts/Scripts/room-scan-topk.csx
Administrator 7a548130a3 Move all scripts into Scripts/ subfolder
Keeps the repo root clean - only README.md visible on landing page.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-16 09:49:37 +01:00

21 lines
370 B
C#

/// @name room-scan-topk
using System.Linq;
Log("Top kinds test start");
if (!IsInRoom || Room == null)
{
Log("Not in room.");
}
else
{
var topFloorKinds = FloorItems
.GroupBy(i => i.Kind)
.OrderByDescending(g => g.Count())
.Take(5)
.ToList();
foreach (var g in topFloorKinds)
Log($"kind {g.Key}: {g.Count()}x");
}