Keeps the repo root clean - only README.md visible on landing page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
24 lines
463 B
C#
24 lines
463 B
C#
const int Limit = 100;
|
|
|
|
OnIntercept(
|
|
(In.InventoryPush, In.InventoryInvalidate, Out.GetInventory),
|
|
e => e.Block()
|
|
);
|
|
|
|
|
|
|
|
OnIntercept(In.InventoryPush, e => {
|
|
var total = e.Packet.ReadInt();
|
|
var current = e.Packet.ReadInt();
|
|
Log($"Loading {current+1}/{total}...");
|
|
});
|
|
|
|
foreach (var fragment in
|
|
EnsureInventory(120000)
|
|
.GroupBy(x => x.GetDescriptor())
|
|
.SelectMany(x => x.Take(Limit))
|
|
.Fragmentize())
|
|
{
|
|
Send(In.InventoryPush, fragment);
|
|
}
|
|
Wait(); |