overpy 9.6.5 → 9.6.6
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/README.md +4 -0
- package/overpy.d.ts +1 -0
- package/overpy.js +12 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -602,6 +602,10 @@ If specified, allows redefining a `macro`, `#!define` or `enum` member. Can be u
|
|
|
602
602
|
|
|
603
603
|
Will generate a summary of the used elements per rule in the output, and add a comment with the number of elements used for each rule/condition/action.
|
|
604
604
|
|
|
605
|
+
## #!writeToOutputFile
|
|
606
|
+
|
|
607
|
+
If specified, the compiled code will not be copied to the clipboard but instead written to a file with the same name as the main file, but with a `.ws.txt` extension (eg `myGamemode.opy` will produce `myGamemode.ws.txt`).
|
|
608
|
+
|
|
605
609
|
## Optimizations
|
|
606
610
|
|
|
607
611
|
By default, OverPy automatically optimizes gamemodes for speed. This means useless code is removed, calculations are done when possible, and function patterns are replaced with builtin functions.
|
package/overpy.d.ts
CHANGED
package/overpy.js
CHANGED
|
@@ -38582,6 +38582,10 @@ ${scriptText}`, {
|
|
|
38582
38582
|
setDisableInspector(true);
|
|
38583
38583
|
return;
|
|
38584
38584
|
}
|
|
38585
|
+
if (content2.startsWith("#!writeToOutputFile")) {
|
|
38586
|
+
setWriteToOutputFile(true);
|
|
38587
|
+
return;
|
|
38588
|
+
}
|
|
38585
38589
|
if (content2.startsWith("#!disableTranslationSourceLines")) {
|
|
38586
38590
|
setDisableTranslationSourceLines(true);
|
|
38587
38591
|
return;
|
|
@@ -65855,7 +65859,8 @@ rule "Disable inspector":
|
|
|
65855
65859
|
spentExtensionPoints,
|
|
65856
65860
|
availableExtensionPoints,
|
|
65857
65861
|
translationLanguages: translationLanguages2,
|
|
65858
|
-
translatedStrings
|
|
65862
|
+
translatedStrings,
|
|
65863
|
+
writeToOutputFile
|
|
65859
65864
|
};
|
|
65860
65865
|
}
|
|
65861
65866
|
function compileRules(astRules) {
|
|
@@ -69807,6 +69812,8 @@ var rulePrefixTemplateFilestack = [];
|
|
|
69807
69812
|
var setRulePrefixTemplateFilestack = (filestack) => rulePrefixTemplateFilestack = filestack;
|
|
69808
69813
|
var useVariableForCompressionAlphabet = false;
|
|
69809
69814
|
var setUseVariableForCompressionAlphabet = (use) => useVariableForCompressionAlphabet = use;
|
|
69815
|
+
var writeToOutputFile = false;
|
|
69816
|
+
var setWriteToOutputFile = (write) => writeToOutputFile = write;
|
|
69810
69817
|
var decompilerGotos;
|
|
69811
69818
|
var resetDecompilerGotos = () => decompilerGotos = [];
|
|
69812
69819
|
var nbTabs;
|
|
@@ -69888,6 +69895,7 @@ function resetGlobalVariables(language) {
|
|
|
69888
69895
|
rulePrefixTemplate = "";
|
|
69889
69896
|
rulePrefixTemplateFilestack = [];
|
|
69890
69897
|
useVariableForCompressionAlphabet = false;
|
|
69898
|
+
writeToOutputFile = false;
|
|
69891
69899
|
}
|
|
69892
69900
|
var operatorPrecedence = {
|
|
69893
69901
|
"=": 1,
|
|
@@ -72372,6 +72380,9 @@ You can also specify \`noTlErr\` to have spectators view the default language wh
|
|
|
72372
72380
|
"disableTranslationSourceLines": {
|
|
72373
72381
|
"description": "If set, the source lines of the translations will not be included in the generated .po files. Use this if you are not actively translating your gamemode, to prevent cluttering git diffs."
|
|
72374
72382
|
},
|
|
72383
|
+
"writeToOutputFile": {
|
|
72384
|
+
"description": "If specified, the compiled code will not be copied to the clipboard but instead written to a file with the same name as the main file, but with a `.ws.txt` extension (eg `myGamemode.opy` will produce `myGamemode.ws.txt`)."
|
|
72385
|
+
},
|
|
72375
72386
|
"postCompileHook": {
|
|
72376
72387
|
"description": `
|
|
72377
72388
|
Specifies a JavaScript file to be executed after compilation, with the compiled code as a \`content\` variable. The script must return the modified code.
|
package/package.json
CHANGED