Map-Bilder und Seitenwahl mit Emblemen
Map-Bilder aus ghostcap-gaming/cs2-map-images lokal als WebP gespeichert (npm run images lädt und verkleinert sie). Bilder in Veto-Kacheln, Pool-Vorschau, Serie und Seitenwahl; CT/T-Embleme aus client/public/sides mit Ersatzsymbol, falls die Dateien fehlen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3a790ce0b1
commit
54168ae763
21 files changed
+701
-27
No files matched your search
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$comment": "Map-Pools und Veto-Abläufe. Schritte: ban:X, pick:X, side:X, decider. X = erstes Team (startet das Veto), Y = zweites Team. 'side' folgt immer auf einen Pick bzw. auf 'decider' und bezieht sich auf diese Map. Ungültige Abläufe werden beim Start gemeldet und das Format ist dann nicht auswählbar.",
|
||||
"$comment": "Map-Pools und Veto-Abläufe. Schritte: ban:X, pick:X, side:X, decider. X = erstes Team (startet das Veto), Y = zweites Team. 'side' folgt immer auf einen Pick bzw. auf 'decider' und bezieht sich auf diese Map. Ungültige Abläufe werden beim Start gemeldet und das Format ist dann nicht auswählbar. Optional pro Map: image = Bild-URL oder Pfad (z. B. /maps/de_dust2.jpg aus client/public). Standardbilder: github.com/ghostcap-gaming/cs2-map-images (Bilder aus dem Spiel, Rechte bei Valve).",
|
||||
"pools": {
|
||||
"competitive": {
|
||||
"label": "Competitive 5 gegen 5",
|
||||
@@ -7,13 +7,13 @@
|
||||
"gameType": 0,
|
||||
"gameMode": 1,
|
||||
"maps": [
|
||||
{ "id": "de_ancient", "name": "Ancient", "color": "#3f8f5a" },
|
||||
{ "id": "de_anubis", "name": "Anubis", "color": "#c79a3d" },
|
||||
{ "id": "de_dust2", "name": "Dust II", "color": "#d3a45c" },
|
||||
{ "id": "de_inferno", "name": "Inferno", "color": "#c4573a" },
|
||||
{ "id": "de_mirage", "name": "Mirage", "color": "#b98a4a" },
|
||||
{ "id": "de_nuke", "name": "Nuke", "color": "#4a8fbf" },
|
||||
{ "id": "de_train", "name": "Train", "color": "#7a7f8a" }
|
||||
{ "id": "de_ancient", "name": "Ancient", "color": "#3f8f5a", "image": "/maps/de_ancient.webp" },
|
||||
{ "id": "de_anubis", "name": "Anubis", "color": "#c79a3d", "image": "/maps/de_anubis.webp" },
|
||||
{ "id": "de_dust2", "name": "Dust II", "color": "#d3a45c", "image": "/maps/de_dust2.webp" },
|
||||
{ "id": "de_inferno", "name": "Inferno", "color": "#c4573a", "image": "/maps/de_inferno.webp" },
|
||||
{ "id": "de_mirage", "name": "Mirage", "color": "#b98a4a", "image": "/maps/de_mirage.webp" },
|
||||
{ "id": "de_nuke", "name": "Nuke", "color": "#4a8fbf", "image": "/maps/de_nuke.webp" },
|
||||
{ "id": "de_train", "name": "Train", "color": "#7a7f8a", "image": "/maps/de_train.webp" }
|
||||
],
|
||||
"flows": {
|
||||
"bo1": ["ban:X", "ban:Y", "ban:X", "ban:Y", "ban:X", "ban:Y", "decider", "side:X"],
|
||||
@@ -27,10 +27,10 @@
|
||||
"gameType": 0,
|
||||
"gameMode": 2,
|
||||
"maps": [
|
||||
{ "id": "de_inferno", "name": "Inferno", "color": "#c4573a" },
|
||||
{ "id": "de_nuke", "name": "Nuke", "color": "#4a8fbf" },
|
||||
{ "id": "de_overpass", "name": "Overpass", "color": "#5f8f7a" },
|
||||
{ "id": "de_vertigo", "name": "Vertigo", "color": "#8a74b8" }
|
||||
{ "id": "de_inferno", "name": "Inferno", "color": "#c4573a", "image": "/maps/de_inferno.webp" },
|
||||
{ "id": "de_nuke", "name": "Nuke", "color": "#4a8fbf", "image": "/maps/de_nuke.webp" },
|
||||
{ "id": "de_overpass", "name": "Overpass", "color": "#5f8f7a", "image": "/maps/de_overpass.webp" },
|
||||
{ "id": "de_vertigo", "name": "Vertigo", "color": "#8a74b8", "image": "/maps/de_vertigo.webp" }
|
||||
],
|
||||
"flows": {
|
||||
"bo1": ["ban:X", "ban:Y", "ban:X", "decider", "side:Y"],
|
||||
|
||||
@@ -17,6 +17,9 @@ export function buildMapPools(raw) {
|
||||
for (const map of pool.maps ?? []) {
|
||||
if (!/^[a-z0-9_]+$/.test(map.id)) throw new Error(`Ungültige Map-ID "${map.id}" im Pool "${mode}"`);
|
||||
if (ids.has(map.id)) throw new Error(`Map "${map.id}" ist im Pool "${mode}" doppelt`);
|
||||
if (map.image !== undefined && !/^(https?:\/\/|\/)[^\s"'()<>]+$/.test(map.image)) {
|
||||
throw new Error(`Bild für "${map.id}" im Pool "${mode}" muss eine http(s)-URL oder ein Pfad mit / sein`);
|
||||
}
|
||||
ids.add(map.id);
|
||||
}
|
||||
const formats = {};
|
||||
|
||||
Reference in new issue
Block a user