Add dropper location selector: discover available droppers on network, pass through server, and add dropdown in order panel for location-based dispensing

This commit is contained in:
MayaTheShy
2026-03-21 19:57:13 -04:00
parent fcfef379be
commit 79eca14f4c
5 changed files with 204 additions and 46 deletions

View File

@@ -169,6 +169,23 @@ app.get('/api/texture/:namespace/*', async (req, res) => {
}
});
// Clear negative texture cache (.miss files) — call after updating texture mappings
app.delete('/api/texture-cache/negative', (req, res) => {
let cleared = 0;
function walk(dir) {
try {
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
const full = path.join(dir, entry.name);
if (entry.isDirectory()) walk(full);
else if (entry.name.endsWith('.miss')) { fs.unlinkSync(full); cleared++; }
}
} catch (_) { /* ignore */ }
}
walk(TEXTURE_CACHE_DIR);
console.log(`[Texture Cache] Cleared ${cleared} negative cache entries`);
res.json({ cleared });
});
// Health check
app.get('/api/health', (req, res) => {
res.json({