overpy 9.5.11 → 9.5.13

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 +42 -24
  2. package/package.json +1 -1
package/overpy.js CHANGED
@@ -19880,6 +19880,9 @@ var customGameSettingsSchema = (
19880
19880
  "guid": "000000005B4B",
19881
19881
  "values": "__boolOnOff__",
19882
19882
  "default": "on",
19883
+ "exclude": [
19884
+ "mauga"
19885
+ ],
19883
19886
  "en-US": "Primary Fire",
19884
19887
  "de-DE": "Prim\xE4rer Feuermodus",
19885
19888
  "es-ES": "Disparo principal",
@@ -20268,7 +20271,6 @@ var customGameSettingsSchema = (
20268
20271
  "orisa",
20269
20272
  "pharah",
20270
20273
  "reinhardt",
20271
- "roadhog",
20272
20274
  "sierra",
20273
20275
  "sigma",
20274
20276
  "sojourn",
@@ -20403,6 +20405,7 @@ var customGameSettingsSchema = (
20403
20405
  "values": "__boolOnOff__",
20404
20406
  "default": "on",
20405
20407
  "include": [
20408
+ "anran",
20406
20409
  "baptiste",
20407
20410
  "genji",
20408
20411
  "illari",
@@ -20411,6 +20414,7 @@ var customGameSettingsSchema = (
20411
20414
  "mei",
20412
20415
  "mercy",
20413
20416
  "moira",
20417
+ "roadhog",
20414
20418
  "sojourn",
20415
20419
  "symmetra",
20416
20420
  "torbjorn",
@@ -37848,7 +37852,7 @@ function decompileCustomGameSettingsDict(dict, kwObj, options = {}) {
37848
37852
  }
37849
37853
  }
37850
37854
  if (keyName === null || value === null) {
37851
- error("No translation found for key of element '" + potentialKey + "'");
37855
+ error("No translation found for key of element '" + (options.parent ? options.parent + " > " : "") + potentialKey + "'");
37852
37856
  }
37853
37857
  if (isInvalidButAcceptedProperty) {
37854
37858
  continue;
@@ -37863,6 +37867,10 @@ function decompileCustomGameSettingsDict(dict, kwObj, options = {}) {
37863
37867
  warn("w_dead_workshop", "Juno's 'Glide Boost Duration Scalar' cannot be copied from text settings and has been reset to defaults.");
37864
37868
  continue;
37865
37869
  }
37870
+ if (kwObj[keyName]["en-US"] === "Katashiro Return Duration Scalar" && keyName === "ability1Duration%") {
37871
+ warn("w_dead_workshop", "Mizuki's 'Katashiro Return Duration Scalar' cannot be copied from text settings and has been reset to defaults.");
37872
+ continue;
37873
+ }
37866
37874
  error("Expected a percentage for value of elem '" + elem + "'");
37867
37875
  }
37868
37876
  value = parseInt(value.substring(0, value.length - 1));
@@ -40527,6 +40535,21 @@ var gamemodeKw = (
40527
40535
  "tr-TR": "Yeti Avc\u0131s\u0131",
40528
40536
  "zh-CN": "\u96EA\u57DF\u72E9\u730E",
40529
40537
  "zh-TW": "\u96EA\u602A\u5927\u4F5C\u6230"
40538
+ },
40539
+ "assaultBalancedOverwatch": {
40540
+ "en-US": "Assault Balanced Overwatch"
40541
+ },
40542
+ "controlBalancedOverwatch": {
40543
+ "en-US": "Control Balanced Overwatch"
40544
+ },
40545
+ "escortBalancedOverwatch": {
40546
+ "en-US": "Escort Balanced Overwatch"
40547
+ },
40548
+ "hybridBalancedOverwatch": {
40549
+ "en-US": "Hybrid Balanced Overwatch"
40550
+ },
40551
+ "pushBalancedOverwatch": {
40552
+ "en-US": "Push Balanced Overwatch"
40530
40553
  }
40531
40554
  }
40532
40555
  );
@@ -43008,21 +43031,7 @@ var heroKw = (
43008
43031
  "sojourn": {
43009
43032
  "secondaryFire": {
43010
43033
  "guid": "00000000796B",
43011
- "en-US": "Railgun Alt Fire",
43012
- "de-DE": "Railgun \u2013 Alternativer Feuermodus",
43013
- "es-ES": "Disparo secundario del ca\xF1\xF3n de riel",
43014
- "es-MX": "Disparo secundario de Ca\xF1\xF3n de riel",
43015
- "fr-FR": "Canon \xE9lectrique : tir alternatif",
43016
- "it-IT": "Fuoco Alternativo Fucile a Rotaia",
43017
- "ja-JP": "\u30EC\u30FC\u30EB\u30AC\u30F3 - \u30B5\u30D6\u653B\u6483",
43018
- "ko-KR": "\uB808\uC77C\uAC74 \uBCF4\uC870 \uBC1C\uC0AC",
43019
- "pl-PL": "Alternatywny atak Karabinu Kinetycznego",
43020
- "pt-BR": "Canh\xE3o El\xE9trico - Disparo alternativo",
43021
- "ru-RU": "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C \u043E\u0433\u043D\u044F \u0440\u0435\u043B\u044C\u0441\u043E\u0442\u0440\u043E\u043D\u0430",
43022
- "th-TH": "\u0E2D\u0E32\u0E27\u0E38\u0E18\u0E2A\u0E33\u0E23\u0E2D\u0E07\u0E40\u0E23\u0E25\u0E01\u0E31\u0E19",
43023
- "tr-TR": "Rayl\u0131 T\xFCfek Alternatif Ate\u015Fi",
43024
- "zh-CN": "\u5145\u80FD\u5C04\u51FB",
43025
- "zh-TW": "\u78C1\u8ECC\u69CD\u6B21\u8981\u653B\u64CA"
43034
+ "en-US": "Charged Shot"
43026
43035
  },
43027
43036
  "ability1": {
43028
43037
  "guid": "000000007964",
@@ -46787,14 +46796,14 @@ function getDecompressionAst(compressedString, compressionInfo) {
46787
46796
  let { minDecimalPlace, maxDecimalPlace, offset, arrayType } = compressionInfo;
46788
46797
  if (arrayType === "number") {
46789
46798
  let decompressionFormula = Array(Math.ceil((maxDecimalPlace - minDecimalPlace) / 2)).fill(0).map((x, i) => i).map((x) => `${Math.pow(100, x + minDecimalPlace / 2)}*x.last().strIndex(x[0].charAt(${x}))`).join(" + ");
46790
- return parseOpyMacro(`[${decompressionFormula} - ${offset} for x in [[e, ${escapeString(alphabet2, false)}] for e in $compressedString.split(null[0])]]`, ["$compressedString"], [compressedString]);
46799
+ return parseOpyMacro(`[${decompressionFormula} - ${offset} for x in [e.concat(${escapeString(alphabet2, false)}) for e in $compressedString.split(null[0])]]`, ["$compressedString"], [compressedString]);
46791
46800
  } else {
46792
46801
  let decompressionFormulas = Array(3).fill(0).map((_, h) => {
46793
46802
  return Array(Math.ceil((maxDecimalPlace - minDecimalPlace) / 2)).fill(0).map((x, i) => i).map((x) => `
46794
46803
  ${Math.pow(100, x + minDecimalPlace / 2)}*x.last().strIndex(x[0].charAt(${x + Math.ceil((maxDecimalPlace - minDecimalPlace) / 2) * h}))
46795
46804
  `).join(" + ");
46796
46805
  });
46797
- return parseOpyMacro(`[vect(${decompressionFormulas[0]},${decompressionFormulas[2]},${decompressionFormulas[1]}) - vect(1,1,1)*${offset} for x in [[e, ${escapeString(alphabet2, false)}] for e in $compressedString.split(null[0])]]`, ["$compressedString"], [compressedString]);
46806
+ return parseOpyMacro(`[vect(${decompressionFormulas[0]},${decompressionFormulas[2]},${decompressionFormulas[1]}) - vect(1,1,1)*${offset} for x in [e.concat(${escapeString(alphabet2, false)}) for e in $compressedString.split(null[0])]]`, ["$compressedString"], [compressedString]);
46798
46807
  }
46799
46808
  }
46800
46809
  astParsingFunctions.compressed = function(content) {
@@ -47870,6 +47879,8 @@ function parseAstRules(rules) {
47870
47879
  } else if (rule.name in astMacros) {
47871
47880
  rulesResult.push(...parseAstRules(parseAstMacro(rule)));
47872
47881
  continue;
47882
+ } else if (rule.name === "pass") {
47883
+ continue;
47873
47884
  } else {
47874
47885
  error("Unexpected function '" + rule.name + "' outside a rule");
47875
47886
  }
@@ -60075,7 +60086,9 @@ var valueFuncKw = (
60075
60086
  {
60076
60087
  "name": "index",
60077
60088
  "description": "The index of the character to be acquired (with 0 as the first character, 1 as the second character, etc.).",
60078
- "type": "unsigned int"
60089
+ "type": "unsigned int",
60090
+ "canReplace0ByFalse": true,
60091
+ "canReplace1ByTrue": true
60079
60092
  }
60080
60093
  ],
60081
60094
  isConstant: true,
@@ -65189,7 +65202,7 @@ function exportToPoFiles(translatedStrings2) {
65189
65202
  }
65190
65203
  error("Cannot do translations in browsers (fs not found)");
65191
65204
  }
65192
- translatedStrings2 = translatedStrings2.filter((x) => x.occurrences.length > 0 || keepUnusedTranslations).sort((a, b) => +(b.occurrences.length > 0) - +(a.occurrences.length > 0) || a.occurrences[0].localeCompare(b.occurrences[0]));
65205
+ translatedStrings2 = translatedStrings2.filter((x) => x.occurrences.length > 0 || keepUnusedTranslations).sort((a, b) => +(b.occurrences.length > 0) - +(a.occurrences.length > 0) || (a.occurrences[0] ?? "zzzzz").localeCompare(b.occurrences[0] ?? "zzzzz"));
65193
65206
  for (let language of translationLanguages2.slice(1)) {
65194
65207
  let po = new import_pofile.default();
65195
65208
  po.headers = {
@@ -68812,7 +68825,7 @@ Wrapping a string with \`___\` has the same caveats as putting a translated stri
68812
68825
  "return": "void"
68813
68826
  },
68814
68827
  "compress": {
68815
- "description": "Compresses the specified array of numbers or vectors into a string. Strings take much fewer elements, so use this function if you are running out of elements.\n\nNote that numbers will get rounded to 3 decimal places, and vectors to 2 decimal places.\n\nUse the `decompress()` function to get the original array back.",
68828
+ "description": "Compresses the specified array of numbers or vectors into a string. Strings take much fewer elements, so use this function if you are running out of elements.\n\nNote that numbers will get rounded to 3 decimal places, and vectors to 2 decimal places.\n\nUse the `decompressNumbers()` or `decompressVectors()` function to get the original array back.",
68816
68829
  "args": [
68817
68830
  {
68818
68831
  "name": "array",
@@ -68823,7 +68836,7 @@ Wrapping a string with \`___\` has the same caveats as putting a translated stri
68823
68836
  return: "String"
68824
68837
  },
68825
68838
  "compressed": {
68826
- "description": "Compresses in-place the specified array of numbers or vectors into a string, then returns the decompressed array. Strings take much fewer elements, so use this function if you are running out of elements.\n\nNote that numbers will get rounded to 3 decimal places, and vectors to 2 decimal places.\n\nThis function is only effective once the array has at least 18 vectors or 26 numbers.\n\nFor some use cases, it might be more effective to use this function instead of `compress()` and `decompressNumbers()`/`decompressVectors()`, as it can apply optimizations if all numbers have a low amount of significant digits or if they are all positive.",
68839
+ "description": "Compresses in-place the specified array of numbers or vectors into a string, then returns the decompressed array. Strings take much fewer elements, so use this function if you are running out of elements.\n\nNote that numbers will get rounded to 3 decimal places, and vectors to 2 decimal places.\n\nThis function is only effective once the array has at least 18 vectors or 26 numbers.\n\nThis function can be more effective than `compress()` and `decompressNumbers()` / `decompressVectors()`, as it can apply optimizations if all numbers have a low amount of significant digits or if they are all positive.",
68827
68840
  "args": [
68828
68841
  {
68829
68842
  "name": "array",
@@ -69834,12 +69847,16 @@ function computeCustomGameSettingsSchema() {
69834
69847
  } else {
69835
69848
  Object.assign(customGameSettingsSchema.gamemodes.values[gamemode].values, customGameSettingsSchema.gamemodes.values.general.values);
69836
69849
  }
69850
+ if (gamemode.endsWith("BalancedOverwatch")) {
69851
+ Object.assign(customGameSettingsSchema.gamemodes.values[gamemode].values, customGameSettingsSchema.gamemodes.values[gamemode.replace("BalancedOverwatch", "")].values);
69852
+ }
69837
69853
  }
69838
69854
  delete customGameSettingsSchema.gamemodes.values.general.values.enabledMaps;
69839
69855
  delete customGameSettingsSchema.gamemodes.values.general.values.disabledMaps;
69840
69856
  for (var gamemode in customGameSettingsSchema.gamemodes.values) {
69841
69857
  Object.assign(customGameSettingsSchema.gamemodes.values.general.values, customGameSettingsSchema.gamemodes.values[gamemode].values);
69842
69858
  }
69859
+ customGameSettingsSchema.gamemodes.values.general.values.scoreToWin = customGameSettingsSchema.gamemodes.values.ffa.values.scoreToWin;
69843
69860
  customGameSettingsSchema.heroes.values["general"] = { values: {} };
69844
69861
  customGameSettingsSchema.heroes.values["general"].values = Object.assign(
69845
69862
  {},
@@ -71255,7 +71272,7 @@ function decompileCustomGameSettings(content) {
71255
71272
  }
71256
71273
  }
71257
71274
  }
71258
- Object.assign(result[opyCategory][opyGamemode], decompileCustomGameSettingsDict(dict, customGameSettingsSchema[opyCategory].values[opyGamemode].values));
71275
+ Object.assign(result[opyCategory][opyGamemode], decompileCustomGameSettingsDict(dict, customGameSettingsSchema[opyCategory].values[opyGamemode].values, { parent: gamemode }));
71259
71276
  }
71260
71277
  } else if (opyCategory === "heroes") {
71261
71278
  for (var team of Object.keys(serialized[category])) {
@@ -71285,6 +71302,7 @@ function decompileCustomGameSettings(content) {
71285
71302
  Object.assign(
71286
71303
  result[opyCategory][opyTeam][opyHero],
71287
71304
  decompileCustomGameSettingsDict(Object.keys(serialized[category][team][property]), heroValues, {
71305
+ parent: property,
71288
71306
  invalidButAcceptedProperties: customGameSettingsSchema[opyCategory].values.general?.values ?? error("No general values for heroes")
71289
71307
  })
71290
71308
  );
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.5.11",
10
+ "version": "9.5.13",
11
11
  "readme": "README.md",
12
12
  "keywords": [
13
13
  "overpy",