overpy 9.6.9 → 9.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/overpy.js +8 -7
  2. package/package.json +1 -1
package/overpy.js CHANGED
@@ -4187,8 +4187,7 @@ var mapKw = (
4187
4187
  "skirmish"
4188
4188
  ],
4189
4189
  "variants": {
4190
- "evening": "972777519512068292",
4191
- "morning": "972777519512068154"
4190
+ "default": "972777519512099996"
4192
4191
  },
4193
4192
  "en-US": "Watchpoint: Gibraltar",
4194
4193
  "es-ES": "Observatorio: Gibraltar",
@@ -65582,9 +65581,10 @@ function compileCustomGameSettings(customGameSettings) {
65582
65581
  let mapVariants = mapKw[mapName].variants ?? {};
65583
65582
  for (var variant of map[mapName]) {
65584
65583
  if (!(variant in mapVariants)) {
65585
- error("Unknown variant '" + variant + "' for map '" + mapName + "'");
65584
+ variants.push(variant + "");
65585
+ } else {
65586
+ variants.push(mapVariants[variant]);
65586
65587
  }
65587
- variants.push(mapVariants[variant]);
65588
65588
  }
65589
65589
  encounteredMaps.push(mapName);
65590
65590
  result[wsGamemodes][wsGamemode][wsMapsKey].push(tows(mapName, mapKw) + " " + variants.join(" "));
@@ -71155,11 +71155,12 @@ function decompileCustomGameSettings(content) {
71155
71155
  for (var variant of variants) {
71156
71156
  var variantName = Object.keys(mapKw[mapName].variants).filter((x) => mapKw[mapName].variants[x] === variant);
71157
71157
  if (variantName.length === 0) {
71158
- error("Unknown variant '" + variant + "' for map '" + mapName + "'");
71158
+ mapVariants.push(variant);
71159
+ } else {
71160
+ mapVariants.push(variantName[0]);
71159
71161
  }
71160
- mapVariants.push(variantName[0]);
71161
71162
  }
71162
- if (mapVariants.length === Object.keys(mapKw[mapName].variants).length) {
71163
+ if (mapVariants.length === Object.keys(mapKw[mapName].variants).length && mapVariants.every((x) => Object.keys(mapKw[mapName].variants).includes(x))) {
71163
71164
  result[opyCategory][opyGamemode][opyPropName].push(mapName);
71164
71165
  } else {
71165
71166
  var mapObj = {};
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "url": "https://github.com/Zezombye/overpy"
8
8
  },
9
9
  "description": "High-level language for the Overwatch Workshop, with decompilation and compilation.",
10
- "version": "9.6.9",
10
+ "version": "9.6.10",
11
11
  "readme": "README.md",
12
12
  "keywords": [
13
13
  "overpy",