overpy 9.5.7 → 9.5.8
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 +10 -0
- package/package.json +1 -1
package/overpy.js
CHANGED
|
@@ -44761,6 +44761,13 @@ astParsingFunctions.__equals__ = function(content) {
|
|
|
44761
44761
|
return content.args[1];
|
|
44762
44762
|
}
|
|
44763
44763
|
}
|
|
44764
|
+
if (content.args[0].name === "getCurrentMap" && content.args[1].name === "__map__") {
|
|
44765
|
+
if (["COLOSSEO", "ESPERANCA", "SAMOA"].includes(content.args[1].args[0].name)) {
|
|
44766
|
+
return parseOpyMacro(`"{}".format(__getCurrentMap__()) == "{}".format(Map.${content.args[1].args[0].name})`, [], []);
|
|
44767
|
+
} else {
|
|
44768
|
+
content.args[0].name = "__getCurrentMap__";
|
|
44769
|
+
}
|
|
44770
|
+
}
|
|
44764
44771
|
return content;
|
|
44765
44772
|
};
|
|
44766
44773
|
|
|
@@ -47050,6 +47057,9 @@ astParsingFunctions.getClosestPlayer = function(content) {
|
|
|
47050
47057
|
|
|
47051
47058
|
// src/compiler/functions/getCurrentMap.ts
|
|
47052
47059
|
astParsingFunctions.getCurrentMap = function(content) {
|
|
47060
|
+
if (content.parent?.name === "__equals__" && content.parent.args[1].name === "__map__") {
|
|
47061
|
+
return content;
|
|
47062
|
+
}
|
|
47053
47063
|
if (usedMaps.has("colosseo") || usedMaps.has("esperanca") || usedMaps.has("samoa")) {
|
|
47054
47064
|
let buggedUsedMaps = ["colosseo", "esperanca", "samoa"].filter((m) => usedMaps.has(m));
|
|
47055
47065
|
return parseOpyMacro(`[${buggedUsedMaps.map((m) => "Map." + m.toUpperCase()).join(", ")}, __getCurrentMap__()].filter(lambda x: "{}".format(__getCurrentMap__()) == x.split([]))[0]`, [], []);
|
package/package.json
CHANGED