mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 15:04:52 +09:00
Fix surfaces with underscore in the name
This commit is contained in:
1 parent
b0fd90d273
commit
3d9c682d7c
1 file changed
+10
-6
@@ -533,13 +533,17 @@ export class ControllerPlugin extends BaseControllerPlugin {
|
||||
const forces = new Set<string>();
|
||||
|
||||
for (const file of files) {
|
||||
if (file.endsWith(".bin")) {
|
||||
const parts = file.split("_");
|
||||
if (parts.length === 5) {
|
||||
surfaces.add(parts[1]);
|
||||
forces.add(parts[2]);
|
||||
}
|
||||
if (!file.endsWith(".bin")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const meta = this.parseTileKey(file);
|
||||
if (!meta) {
|
||||
continue;
|
||||
}
|
||||
|
||||
surfaces.add(meta.surface);
|
||||
forces.add(meta.force);
|
||||
}
|
||||
|
||||
res.json({
|
||||
|
||||
Reference in new issue
Block a user