overpy 9.5.6 → 9.5.7
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.
- package/overpy.js +21 -1
- package/package.json +1 -1
package/overpy.js
CHANGED
|
@@ -47048,6 +47048,15 @@ astParsingFunctions.getClosestPlayer = function(content) {
|
|
|
47048
47048
|
return content;
|
|
47049
47049
|
};
|
|
47050
47050
|
|
|
47051
|
+
// src/compiler/functions/getCurrentMap.ts
|
|
47052
|
+
astParsingFunctions.getCurrentMap = function(content) {
|
|
47053
|
+
if (usedMaps.has("colosseo") || usedMaps.has("esperanca") || usedMaps.has("samoa")) {
|
|
47054
|
+
let buggedUsedMaps = ["colosseo", "esperanca", "samoa"].filter((m) => usedMaps.has(m));
|
|
47055
|
+
return parseOpyMacro(`[${buggedUsedMaps.map((m) => "Map." + m.toUpperCase()).join(", ")}, __getCurrentMap__()].filter(lambda x: "{}".format(__getCurrentMap__()) == x.split([]))[0]`, [], []);
|
|
47056
|
+
}
|
|
47057
|
+
return new Ast2("__getCurrentMap__");
|
|
47058
|
+
};
|
|
47059
|
+
|
|
47051
47060
|
// src/compiler/functions/getFarthestPlayer.ts
|
|
47052
47061
|
astParsingFunctions.getFarthestPlayer = function(content) {
|
|
47053
47062
|
warn("w_farthest_player", "The getFarthestPlayer() function targets dead and unspawned players (at 0,0,0). Use getRealFarthestPlayer() instead.");
|
|
@@ -61574,7 +61583,7 @@ var valueFuncKw = (
|
|
|
61574
61583
|
"th-TH": "Current Game Mode",
|
|
61575
61584
|
"zh-TW": "Current Game Mode"
|
|
61576
61585
|
},
|
|
61577
|
-
"
|
|
61586
|
+
"__getCurrentMap__": {
|
|
61578
61587
|
"guid": "00000000D418",
|
|
61579
61588
|
"description": "The current map of the custom game.",
|
|
61580
61589
|
"args": [],
|
|
@@ -66944,6 +66953,9 @@ function parseMember(object, member) {
|
|
|
66944
66953
|
if (astInfo.name === "__color__" && constantValues[astInfo.type][name]?.onlyInOverpy) {
|
|
66945
66954
|
return new Ast2("rgb", [getAstForNumber(constantValues[astInfo.type][name].red ?? 0), getAstForNumber(constantValues[astInfo.type][name].green ?? 0), getAstForNumber(constantValues[astInfo.type][name].blue ?? 0), getAstForNumber(constantValues[astInfo.type][name].alpha ?? 255)]);
|
|
66946
66955
|
}
|
|
66956
|
+
if (astInfo.name === "__map__") {
|
|
66957
|
+
usedMaps.add(name.toLowerCase());
|
|
66958
|
+
}
|
|
66947
66959
|
return new Ast2(astInfo.name, [new Ast2(name, [], [], astInfo.type)]);
|
|
66948
66960
|
} else if (object[0].text === "Math") {
|
|
66949
66961
|
if (name === "PI") {
|
|
@@ -68832,6 +68844,12 @@ Wrapping a string with \`___\` has the same caveats as putting a translated stri
|
|
|
68832
68844
|
class: "String",
|
|
68833
68845
|
return: "String"
|
|
68834
68846
|
},
|
|
68847
|
+
"getCurrentMap": {
|
|
68848
|
+
"description": "The current map of the custom game.",
|
|
68849
|
+
"args": [],
|
|
68850
|
+
"isConstant": true,
|
|
68851
|
+
"return": "Map"
|
|
68852
|
+
},
|
|
68835
68853
|
".getNormal": {
|
|
68836
68854
|
"description": "The surface normal at the raycast hit position (or from end pos to start pos if no hit occurs).",
|
|
68837
68855
|
"args": [
|
|
@@ -69212,6 +69230,7 @@ var activatedExtensions;
|
|
|
69212
69230
|
var setActivatedExtensions = (extensions) => activatedExtensions = extensions;
|
|
69213
69231
|
var availableExtensionPoints;
|
|
69214
69232
|
var setAvailableExtensionPoints = (points) => availableExtensionPoints = points;
|
|
69233
|
+
var usedMaps = /* @__PURE__ */ new Set();
|
|
69215
69234
|
var enableTagsSetup;
|
|
69216
69235
|
var setEnableTagsSetup = (enable) => enableTagsSetup = enable;
|
|
69217
69236
|
var translationLanguages2 = [];
|
|
@@ -69307,6 +69326,7 @@ function resetGlobalVariables(language) {
|
|
|
69307
69326
|
disableInspector = false;
|
|
69308
69327
|
keepUnusedTranslations = false;
|
|
69309
69328
|
disableTranslationSourceLines = false;
|
|
69329
|
+
usedMaps = /* @__PURE__ */ new Set();
|
|
69310
69330
|
postCompileHook = null;
|
|
69311
69331
|
}
|
|
69312
69332
|
var operatorPrecedence = {
|
package/package.json
CHANGED