isaacscript 2.15.1 → 2.16.0

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.
@@ -1,3 +1,22 @@
1
1
  # MOD-NAME-TO-REPLACE
2
2
 
3
3
  MOD-NAME-TO-REPLACE is a mod for _[The Binding of Isaac: Repentance](https://store.steampowered.com/app/1426300/The_Binding_of_Isaac_Repentance/)_, written in [TypeScript](https://www.typescriptlang.org/) using the [IsaacScript](https://isaacscript.github.io/) framework.
4
+
5
+ ## How To Play
6
+
7
+ For normal people, you can play the mod by subscribing to it on [the Steam Workshop](https://steamcommunity.com/app/250900/workshop/). (Subscribing to the mod will automatically download and install it once you launch the game.)
8
+
9
+ ### How To Compile
10
+
11
+ If you are a developer, or the mod is not yet uploaded to the Steam Workshop, you can play the mod by compiling the TypeScript code into a "main.lua" file. Perform the following steps:
12
+
13
+ - Download and install [Node.js](https://nodejs.org/en/download/) (Windows Installer .msi, 64-bit).
14
+ - Download and install [Git](https://git-scm.com/download/win) (64-bit Git for Windows setup).
15
+ - Download (or clone) this repository:
16
+ - Click on the "Code" button in the top-right-corner of this page.
17
+ - Click on "Download ZIP".
18
+ - Unzip the zip file to a new directory.
19
+ - Open up the repository folder and double-click on the `run.sh` script. If prompted, choose to open it with Git for Windows. You will see a Git Bash terminal window open.
20
+ - The script might ask you some questions, like which save file that you use for testing.
21
+ - If the script is successful, you will see "Compilation successful". (You can continue to leave the terminal window open; it will monitor for changes in your project, and recompile if necessary.)
22
+ - Completely close Isaac if it is already open, and then open the game again, and the mod should be in the list of mods. You can now play or test the mod.
@@ -12,13 +12,11 @@
12
12
  "license": "GPL-3.0",
13
13
  "type": "commonjs",
14
14
  "dependencies": {
15
- "@types/node": "^0.0.1",
16
15
  "isaac-typescript-definitions": "^0.0.1",
17
16
  "isaacscript": "^0.0.1",
18
17
  "isaacscript-common": "^0.0.1",
19
18
  "isaacscript-lint": "^0.0.1",
20
19
  "isaacscript-spell": "^0.0.1",
21
- "ts-node": "^0.0.1",
22
20
  "typescript": "^0.0.1",
23
21
  "typescript-to-lua": "^0.0.1"
24
22
  }
@@ -1,14 +1,11 @@
1
- # Ignore compiled output.
1
+ # Compiled output
2
2
  dist
3
3
 
4
- # The VSCode CSpell plugin causes the file to become unformatted whenever a new word is added.
5
- cspell.json
6
-
7
- # Ignore all of the XML files created by Basement Renovator.
4
+ # XML files created by Basement Renovator
8
5
  mod/content/rooms/**/*.xml
9
6
  mod/content/luarooms/**/*.xml
10
7
  mod/resources/rooms/**/*.xml
11
8
  mod/resources/luarooms/**/*.xml
12
9
 
13
- # Ignore all of the XML files created by the animation editor.
10
+ # XML files created by the animation editor
14
11
  mod/resources/**/*.anm2
@@ -4,7 +4,7 @@
4
4
  "recommendations": [
5
5
  "esbenp.prettier-vscode", // The TypeScript formatter
6
6
  "dbaeumer.vscode-eslint", // The TypeScript linter
7
- "streetsidesoftware.code-spell-checker", // A spell-checker extension based on cspell
7
+ "streetsidesoftware.code-spell-checker", // A spell-checker extension based on CSpell
8
8
  "typescript-to-lua.vscode-typescript-to-lua", // The TypeScriptToLua extension
9
9
  "redhat.vscode-xml", // The XML language server
10
10
  ],
@@ -11,6 +11,7 @@
11
11
  "files.associations": {
12
12
  "*.anm2": "xml", // anm2 files are just XML files.
13
13
  "*.dat": "json", // Nearly all mods save JSON to the "save#.dat" file.
14
+ ".env*": "shellscript", // e.g. ".env.example" is the same as ".env".
14
15
  },
15
16
 
16
17
  // We want to always use "lf" to be consistent with all platforms.
@@ -13,7 +13,7 @@ pull.rebase=true
13
13
  *.png binary
14
14
  *.wav binary
15
15
 
16
- # Specify the file type for VSCode/TypeScript files.
16
+ # Specify the file type for some files that GitHub will not automatically characterize properly.
17
17
  # https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
18
18
  .vscode/extensions.json linguist-language=JSON-with-Comments
19
19
  .vscode/settings.json linguist-language=JSON-with-Comments
@@ -23,14 +23,14 @@
23
23
  "luaBundleEntry": "./src/main.ts",
24
24
  "luaPlugins": [
25
25
  // A plugin to add an explanatory comment at the top of the compiled "main.lua" file.
26
- { "name": "./plugins/addIsaacScriptCommentHeader.ts" },
26
+ { "name": "isaacscript/src/plugins/addIsaacScriptCommentHeader.js" },
27
27
 
28
28
  // A plugin to make enums safe from global variables.
29
- { "name": "./plugins/noExtendedEnums.ts" },
29
+ { "name": "isaacscript/src/plugins/noExtendedEnums.ts" },
30
30
 
31
31
  // Uncomment this and recompile the mod to enable crash debugging, which will tell you the
32
32
  // exact line of the mod that is causing the crash.
33
- // { "name": "./plugins/addCrashDebugStatements.ts" },
33
+ // { "name": "isaacscript/src/plugins//addCrashDebugStatements.js" },
34
34
  ],
35
35
  "noHeader": true,
36
36
  "noImplicitGlobalVariables": true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript",
3
- "version": "2.15.1",
3
+ "version": "2.16.0",
4
4
  "description": "A command line tool for managing Isaac mods written in TypeScript.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -39,10 +39,11 @@
39
39
  "moment": "^2.29.4",
40
40
  "npm-check-updates": "^16.0.5",
41
41
  "prompt": "^1.3.0",
42
+ "source-map": "^0.7.4",
42
43
  "source-map-support": "^0.5.21",
43
44
  "sync-directory": "^5.1.7",
44
45
  "tslib": "^2.4.0",
45
- "typescript-to-lua": "^1.8.2",
46
+ "typescript-to-lua": "^1.9.0",
46
47
  "update-notifier": "5.1.0",
47
48
  "xml2js": "^0.4.23",
48
49
  "yaml": "^2.1.1",
@@ -18,13 +18,11 @@ const notifyGame = tslib_1.__importStar(require("./notifyGame"));
18
18
  const spawnSaveDatWriter_1 = require("./spawnSaveDatWriter");
19
19
  const touchWatcherSaveDatFiles_1 = require("./touchWatcherSaveDatFiles");
20
20
  const REQUIRED_PACKAGE_JSON_DEPENDENCIES = [
21
- "@types/node",
22
21
  "isaac-typescript-definitions",
23
22
  "isaacscript",
24
23
  // - "isaacscript-common" is not required.
25
24
  // - "isaacscript-lint" is not required.
26
25
  // - "isaacscript-spell" is not required.
27
- "ts-node",
28
26
  "typescript",
29
27
  "typescript-to-lua",
30
28
  ];
@@ -1 +1 @@
1
- {"version":3,"file":"monitor.js","sourceRoot":"","sources":["../../../../../../packages/isaacscript-cli/src/commands/monitor/monitor.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,iDAA4C;AAC5C,wDAAwB;AAExB,+CAOyB;AACzB,mDAAwD;AACxD,yDAAmC;AACnC,qCAAsC;AACtC,yDAG8B;AAE9B,6CAA6D;AAC7D,uCAAyE;AACzE,2CAAqD;AACrD,qDAAkD;AAClD,iEAA2C;AAC3C,6DAA0D;AAC1D,yEAAsE;AAEtE,MAAM,kCAAkC,GAAG;IACzC,aAAa;IACb,8BAA8B;IAC9B,aAAa;IACb,0CAA0C;IAC1C,wCAAwC;IACxC,yCAAyC;IACzC,SAAS;IACT,YAAY;IACZ,mBAAmB;CACpB,CAAC;AAEF,IAAI,oBAAoB,GAAG,IAAI,IAAI,EAAE,CAAC;AAE/B,KAAK,UAAU,OAAO,CAAC,IAAU,EAAE,MAAc;IACtD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC;IACtC,MAAM,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,KAAK,IAAI,CAAC;IAC1D,MAAM,cAAc,GAAG,IAAA,wDAAuC,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE9E,2FAA2F;IAC3F,IAAI,IAAI,CAAC,aAAa,KAAK,SAAS,EAAE;QACpC,MAAM,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC,wCAAwC;KACpF;IACD,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;QAC/B,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,wCAAwC;KAC1E;IAED,oBAAoB;IACpB,IAAI,CAAC,iBAAiB,EAAE;QACtB,+BAA+B,CAAC,IAAI,EAAE,OAAO,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IAAI,EAAE;YAChB,0EAA0E;YAC1E,OAAO;SACR;QACD,UAAU,CAAC,GAAG,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QACxB,IAAA,aAAK,EAAC,UAAU,kBAAkB,iCAAiC,IAAI,EAAE,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACvB,IAAA,aAAK,EAAC,UAAU,kBAAkB,iCAAiC,IAAI,EAAE,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"monitor.js","sourceRoot":"","sources":["../../../../../../packages/isaacscript-cli/src/commands/monitor/monitor.ts"],"names":[],"mappings":";;;;AAAA,0DAA0B;AAC1B,iDAA4C;AAC5C,wDAAwB;AAExB,+CAOyB;AACzB,mDAAwD;AACxD,yDAAmC;AACnC,qCAAsC;AACtC,yDAG8B;AAE9B,6CAA6D;AAC7D,uCAAyE;AACzE,2CAAqD;AACrD,qDAAkD;AAClD,iEAA2C;AAC3C,6DAA0D;AAC1D,yEAAsE;AAEtE,MAAM,kCAAkC,GAAG;IACzC,8BAA8B;IAC9B,aAAa;IACb,0CAA0C;IAC1C,wCAAwC;IACxC,yCAAyC;IACzC,YAAY;IACZ,mBAAmB;CACpB,CAAC;AAEF,IAAI,oBAAoB,GAAG,IAAI,IAAI,EAAE,CAAC;AAE/B,KAAK,UAAU,OAAO,CAAC,IAAU,EAAE,MAAc;IACtD,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC;IACtC,MAAM,iBAAiB,GAAG,IAAI,CAAC,iBAAiB,KAAK,IAAI,CAAC;IAC1D,MAAM,cAAc,GAAG,IAAA,wDAAuC,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAE9E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AsB,QAAQ,kBAAkB,WAAW,CAAC;YAC9E,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;SACxB;aAAM;YACL,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;SACrB;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAc,EAAE,EAAE;QACxC,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;QACnC,IAAI,GAAG,KAAK,IAAI,EAAE;YAChB,0EAA0E;YAC1E,OAAO;SACR;QACD,UAAU,CAAC,GAAG,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;QACxB,IAAA,aAAK,EAAC,UAAU,kBAAkB,iCAAiC,IAAI,EAAE,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QACvB,IAAA,aAAK,EAAC,UAAU,kBAAkB,iCAAiC,IAAI,EAAE,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ /**
3
+ * When you write code that causes the game to crash, it can be difficult to find the exact line of
4
+ * code that is causing the crash.
5
+ *
6
+ * In these situations, you can enable this plugin, which will add a log statement in between every
7
+ * line of Lua code with a randomly-generated UUID. That way, you can cause the crash, and then look
8
+ * at the bottom of the "log.txt" for the final UUID that shows up.
9
+ *
10
+ * Next, you can Ctrl + f in the "main.lua" file for the matching UUID, which will bring you to the
11
+ * exact point in the code where the crash happened.
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ const tslib_1 = require("tslib");
15
+ const crypto = tslib_1.__importStar(require("crypto"));
16
+ const tstl = tslib_1.__importStar(require("typescript-to-lua"));
17
+ class CustomPrinter extends tstl.LuaPrinter {
18
+ printStatement(statement) {
19
+ const uuid = crypto.randomUUID();
20
+ const debugLineToInsert = `Isaac.DebugString("CRASH DEBUG ${uuid}")\n`;
21
+ const originalResult = super.printStatement(statement);
22
+ return this.createSourceNode(statement, [
23
+ debugLineToInsert,
24
+ originalResult,
25
+ ]);
26
+ }
27
+ }
28
+ const plugin = {
29
+ printer: (program, emitHost, fileName, file) => new CustomPrinter(emitHost, program, fileName).print(file),
30
+ };
31
+ // ts-prune-ignore-next
32
+ exports.default = plugin;
33
+ //# sourceMappingURL=addCrashDebugStatements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addCrashDebugStatements.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/addCrashDebugStatements.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;AAEH,uDAAiC;AAGjC,gEAA0C;AAE1C,MAAM,aAAc,SAAQ,IAAI,CAAC,UAAU;IAChC,cAAc,CAAC,SAAyB;QAC/C,MAAM,IAAI,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QACjC,MAAM,iBAAiB,GAAG,kCAAkC,IAAI,MAAM,CAAC;QACvE,MAAM,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;QACvD,OAAO,IAAI,CAAC,gBAAgB,CAAC,SAAS,EAAE;YACtC,iBAAiB;YACjB,cAAc;SACf,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,MAAM,GAAgB;IAC1B,OAAO,EAAE,CACP,OAAmB,EACnB,QAAuB,EACvB,QAAgB,EAChB,IAAe,EACf,EAAE,CAAC,IAAI,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC;CAChE,CAAC;AAEF,uBAAuB;AACvB,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ /** This plugin adds an explanatory header to the top of the generated Lua code. */
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const INFORMATIONAL_HEADER = `--[[
5
+
6
+ This Isaac mod was created with the IsaacScript tool.
7
+
8
+ The Lua code in this file is not actually the source code for the program. Rather, it was
9
+ automatically generated from higher-level TypeScript code, and might be hard to read. If you want to
10
+ understand how the code in this mod works, you should read the actual TypeScript source code
11
+ directly instead of trying to read this file. Usually, the link to the source code can be found in
12
+ the mod's description on the Steam Workshop. If not, you can ask the mod author directly if the
13
+ source code is publicly available.
14
+
15
+ IsaacScript provides a lot of advantages over using raw Lua. For more information about the tool,
16
+ see the official website: https://isaacscript.github.io/
17
+
18
+ --]]
19
+
20
+ `;
21
+ const plugin = {
22
+ beforeEmit(_program, _options, _emitHost, result) {
23
+ for (const file of result) {
24
+ file.code = `${INFORMATIONAL_HEADER}${file.code}`;
25
+ }
26
+ },
27
+ };
28
+ // ts-prune-ignore-next
29
+ exports.default = plugin;
30
+ //# sourceMappingURL=addIsaacScriptCommentHeader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addIsaacScriptCommentHeader.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/addIsaacScriptCommentHeader.ts"],"names":[],"mappings":";AAAA,mFAAmF;;AAKnF,MAAM,oBAAoB,GAAG;;;;;;;;;;;;;;;;CAgB5B,CAAC;AAEF,MAAM,MAAM,GAAgB;IAC1B,UAAU,CACR,QAAoB,EACpB,QAA8B,EAC9B,SAAwB,EACxB,MAAuB;QAEvB,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE;YACzB,IAAI,CAAC,IAAI,GAAG,GAAG,oBAAoB,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;SACnD;IACH,CAAC;CACF,CAAC;AAEF,uBAAuB;AACvB,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ /**
3
+ * This plugin prevents transpiled enums from using global variables as a base (if present).
4
+ *
5
+ * For example, by default, the following enum:
6
+ *
7
+ * ```ts
8
+ * export enum Foo {
9
+ * Value1,
10
+ * Value2,
11
+ * }
12
+ * ```
13
+ *
14
+ * Will be transpiled to this:
15
+ *
16
+ * ```lua
17
+ * local ____exports = {}
18
+ * ____exports.Foo = Foo or ({})
19
+ * ____exports.Foo.Value1 = 0
20
+ * ____exports.Foo[____exports.Foo.Value1] = "Value1"
21
+ * ____exports.Foo.Value2 = 1
22
+ * ____exports.Foo[____exports.Foo.Value2] = "Value2"
23
+ * return ____exports
24
+ * ```
25
+ *
26
+ * As we can see, the first line uses the existing global variable of "Foo" as a base, if present.
27
+ * The reason it does this is because TSTL needs to support the TypeScript feature of combining
28
+ * enums, like this:
29
+ *
30
+ * ```ts
31
+ * enum Foo {
32
+ * Value1,
33
+ * }
34
+ * enum Foo {
35
+ * Value2,
36
+ * }
37
+ * ```
38
+ *
39
+ * Unfortunately, this design decision means that local enums will essentially turn into global
40
+ * variables. This plugin removes this behavior, always making enums local variables.
41
+ */
42
+ Object.defineProperty(exports, "__esModule", { value: true });
43
+ const tslib_1 = require("tslib");
44
+ const ts = tslib_1.__importStar(require("typescript"));
45
+ const tstl = tslib_1.__importStar(require("typescript-to-lua"));
46
+ const plugin = {
47
+ visitors: {
48
+ [ts.SyntaxKind.EnumDeclaration]: (node, context) => {
49
+ // Call the normal TSTL enum transpilation method.
50
+ const statements = context.superTransformStatements(node);
51
+ // Get the first element, which will be equal to something like:
52
+ //
53
+ // ```lua
54
+ // local ____exports.Foo = Foo or ({})
55
+ // ```
56
+ const oldDeclaration = statements[0];
57
+ if (oldDeclaration !== undefined &&
58
+ tstl.isAssignmentStatement(oldDeclaration)) {
59
+ // Replace the right side of the assignment with a blank Lua table, e.g.
60
+ //
61
+ // ```lua
62
+ // local ____exports.Foo = {}
63
+ // ```
64
+ const blankTable = tstl.createTableExpression();
65
+ oldDeclaration.right = [blankTable];
66
+ }
67
+ return statements;
68
+ },
69
+ },
70
+ };
71
+ // ts-prune-ignore-next
72
+ exports.default = plugin;
73
+ //# sourceMappingURL=noExtendedEnums.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noExtendedEnums.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/noExtendedEnums.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;;;AAEH,uDAAiC;AACjC,gEAA0C;AAE1C,MAAM,MAAM,GAAgB;IAC1B,QAAQ,EAAE;QACR,CAAC,EAAE,CAAC,UAAU,CAAC,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE;YACjD,kDAAkD;YAClD,MAAM,UAAU,GAAG,OAAO,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;YAE1D,gEAAgE;YAChE,EAAE;YACF,SAAS;YACT,sCAAsC;YACtC,MAAM;YACN,MAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACrC,IACE,cAAc,KAAK,SAAS;gBAC5B,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC,EAC1C;gBACA,wEAAwE;gBACxE,EAAE;gBACF,SAAS;gBACT,6BAA6B;gBAC7B,MAAM;gBACN,MAAM,UAAU,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC;gBAChD,cAAc,CAAC,KAAK,GAAG,CAAC,UAAU,CAAC,CAAC;aACrC;YAED,OAAO,UAAU,CAAC;QACpB,CAAC;KACF;CACF,CAAC;AAEF,uBAAuB;AACvB,kBAAe,MAAM,CAAC"}
@@ -1,96 +0,0 @@
1
- -- These are all of the declarations in the "enums.lua" file in the "scripts" subdirectory, sorted
2
- -- alphabetically.
3
- globals = {
4
- "ActionTriggers",
5
- "BabySubType",
6
- "BombSubType",
7
- "BombVariant",
8
- "ButtonAction",
9
- "CacheFlag",
10
- "Card",
11
- "Challenge",
12
- "ChestSubType",
13
- "CoinSubType",
14
- "CollectibleType",
15
- "Color",
16
- "DamageFlag",
17
- "Difficulty",
18
- "Direction",
19
- "DoorSlot",
20
- "DoorState",
21
- "DoorVariant",
22
- "EffectVariant",
23
- "EntityCollisionClass",
24
- "EntityFlag",
25
- "EntityGridCollisionClass",
26
- "EntityPartition",
27
- "EntityPtr",
28
- "EntityRef",
29
- "EntityType",
30
- "FamiliarVariant",
31
- "Font",
32
- "Game",
33
- "GameStateFlag",
34
- "GetPtrHash",
35
- "GridCollisionClass",
36
- "GridEntityType",
37
- "GridRooms",
38
- "HeartSubType",
39
- "Input",
40
- "InputHook",
41
- "Isaac",
42
- "ItemConfig",
43
- "ItemPoolType",
44
- "ItemType",
45
- "KColor",
46
- "Keyboard",
47
- "KeySubType",
48
- "LaserOffset",
49
- "LevelCurse",
50
- "LevelStage",
51
- "LevelStateFlag",
52
- "LocustSubtypes",
53
- "ModCallbacks",
54
- "Mouse",
55
- "Music",
56
- "MusicManager",
57
- "NpcState",
58
- "NullItemID",
59
- "PickupPrice",
60
- "PickupVariant",
61
- "PillColor",
62
- "PillEffect",
63
- "PlayerForm",
64
- "PlayerItemState",
65
- "PlayerSpriteLayer",
66
- "PlayerType",
67
- "ProjectileFlags",
68
- "ProjectileParams",
69
- "ProjectileVariant",
70
- "Random",
71
- "RandomVector",
72
- "RegisterMod",
73
- "RNG",
74
- "RoomShape",
75
- "RoomType",
76
- "SeedEffect",
77
- "SFXManager",
78
- "SortingLayer",
79
- "SoundEffect",
80
- "Sprite",
81
- "StageType",
82
- "TearFlags",
83
- "TearVariant",
84
- "TrinketType",
85
- "Vector",
86
- "WeaponType",
87
-
88
- -- Global variables
89
- "ModConfigMenu",
90
- }
91
-
92
- max_line_length = 100
93
-
94
- -- Luacheck complains about functions in a module declared with a colon if self is unused;
95
- -- we may want all functions to be declared with a colon for uniformity.
96
- unused_args = false