Keeps the repo root clean - only README.md visible on landing page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
37 lines
995 B
C#
37 lines
995 B
C#
/// @name Snake Debug Watch
|
|
long TARGET_ID = 769407982;
|
|
long[] BTN_IDS = { 769407085, 769407116, 769407385, 769406820 };
|
|
|
|
int tick = 0;
|
|
int lastX = int.MinValue, lastY = int.MinValue, lastState = int.MinValue;
|
|
|
|
Log("Snake Debug Watch started");
|
|
|
|
while (Run)
|
|
{
|
|
Delay(100);
|
|
tick++;
|
|
|
|
var target = GetFloorItem(TARGET_ID);
|
|
if (target == null)
|
|
{
|
|
if (tick % 10 == 0)
|
|
Log("target missing");
|
|
continue;
|
|
}
|
|
|
|
if (target.Location.X != lastX || target.Location.Y != lastY || target.State != lastState)
|
|
{
|
|
Log($"target: ({target.Location.X},{target.Location.Y}) state={target.State} kind={target.Kind}");
|
|
lastX = target.Location.X;
|
|
lastY = target.Location.Y;
|
|
lastState = target.State;
|
|
}
|
|
|
|
if (tick % 20 == 0)
|
|
{
|
|
int k7100 = FloorItems.Count(i => i != null && i.Kind == 7100);
|
|
int k5068 = FloorItems.Count(i => i != null && i.Kind == 5068);
|
|
Log($"k7100={k7100}, k5068={k5068}");
|
|
}
|
|
} |