isaacscript 3.2.2 → 3.3.1

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.
@@ -0,0 +1,150 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
3
+ "diagnostics.globals": [
4
+ "ActionTriggers",
5
+ "ActiveSlot",
6
+ "BabySubType",
7
+ "BackdropType",
8
+ "BatterySubType",
9
+ "BedSubType",
10
+ "BitSet128",
11
+ "BombSubType",
12
+ "BombVariant",
13
+ "ButtonAction",
14
+ "CacheFlag",
15
+ "Card",
16
+ "Challenge",
17
+ "ChampionColor",
18
+ "ChestSubType",
19
+ "CoinSubType",
20
+ "CollectibleType",
21
+ "Color",
22
+ "CppContainer",
23
+ "DamageFlag",
24
+ "Difficulty",
25
+ "Direction",
26
+ "DoorSlot",
27
+ "DoorState",
28
+ "DoorVariant",
29
+ "EffectVariant",
30
+ "Entity",
31
+ "EntityBomb",
32
+ "EntityCollisionClass",
33
+ "EntityEffect",
34
+ "EntityFamiliar",
35
+ "EntityFlag",
36
+ "EntityGridCollisionClass",
37
+ "EntityKnife",
38
+ "EntityLaser",
39
+ "EntityNPC",
40
+ "EntityPartition",
41
+ "EntityPickup",
42
+ "EntityPlayer",
43
+ "EntityProjectile",
44
+ "EntityPtr",
45
+ "EntityRef",
46
+ "EntityTear",
47
+ "EntityType",
48
+ "FamiliarVariant",
49
+ "Font",
50
+ "Game",
51
+ "GameStateFlag",
52
+ "GetPtrHash",
53
+ "GridCollisionClass",
54
+ "GridEntity",
55
+ "GridEntityDesc",
56
+ "GridEntityDoor",
57
+ "GridEntityPit",
58
+ "GridEntityPoop",
59
+ "GridEntityPressurePlate",
60
+ "GridEntityRock",
61
+ "GridEntitySpikes",
62
+ "GridEntityTNT",
63
+ "GridEntityType",
64
+ "GridRooms",
65
+ "HUD",
66
+ "HeartSubType",
67
+ "Input",
68
+ "InputHook",
69
+ "Isaac",
70
+ "ItemConfig",
71
+ "ItemPool",
72
+ "ItemPoolType",
73
+ "ItemType",
74
+ "KColor",
75
+ "KeySubType",
76
+ "Keyboard",
77
+ "LaserOffset",
78
+ "LaserSubType",
79
+ "Level",
80
+ "LevelCurse",
81
+ "LevelStage",
82
+ "LevelStateFlag",
83
+ "LocustSubtypes",
84
+ "ModCallbacks",
85
+ "Mouse",
86
+ "Music",
87
+ "MusicManager",
88
+ "NpcState",
89
+ "NullItemID",
90
+ "Options",
91
+ "PathFinder",
92
+ "PickupPrice",
93
+ "PickupVariant",
94
+ "PillColor",
95
+ "PillEffect",
96
+ "PlayerForm",
97
+ "PlayerSpriteLayer",
98
+ "PlayerType",
99
+ "PlayerTypes",
100
+ "PoopPickupSubType",
101
+ "PoopSpellType",
102
+ "ProjectileFlags",
103
+ "ProjectileParams",
104
+ "ProjectileVariant",
105
+ "QueueItemData",
106
+ "REPENTANCE",
107
+ "RNG",
108
+ "Random",
109
+ "RandomVector",
110
+ "RegisterMod",
111
+ "RenderMode",
112
+ "Room",
113
+ "RoomConfig",
114
+ "RoomDescriptor",
115
+ "RoomShape",
116
+ "RoomTransitionAnim",
117
+ "RoomType",
118
+ "SFXManager",
119
+ "SackSubType",
120
+ "SeedEffect",
121
+ "Seeds",
122
+ "ShockwaveParams",
123
+ "SkinColor",
124
+ "SortingLayer",
125
+ "SoundEffect",
126
+ "Sprite",
127
+ "StageType",
128
+ "StartDebug",
129
+ "TearFlags",
130
+ "TearParams",
131
+ "TearVariant",
132
+ "TemporaryEffect",
133
+ "TemporaryEffects",
134
+ "TrinketType",
135
+ "UseFlag",
136
+ "Vector",
137
+ "WeaponType",
138
+ "AwaitingTextInput",
139
+ "EID",
140
+ "Encyclopedia",
141
+ "ModConfigMenu",
142
+ "MinimapAPI",
143
+ "StageAPI",
144
+ "sandboxTraceback",
145
+ "sandboxGetTraceback",
146
+ "getParentFunctionDescription"
147
+ ],
148
+ "preloadFileSize": 5000,
149
+ "runtime.version": "Lua 5.3"
150
+ }
@@ -45,20 +45,20 @@ local function getScreenBottomRightPos()
45
45
  end
46
46
 
47
47
  -- ModCallbacks.MC_POST_RENDER (2)
48
- function mod:PostRender()
48
+ function mod:postRender()
49
49
  -- Don't do anything while fading in to a new run to prevent crashes.
50
50
  if game:GetFrameCount() < 1 then
51
51
  return
52
52
  end
53
53
 
54
- mod:RenderSprite()
55
- mod:RenderText()
56
- mod:LoadSaveDat()
57
- mod:CheckInput()
58
- mod:CheckRestart()
54
+ mod:renderSprite()
55
+ mod:renderText()
56
+ mod:loadSaveDat()
57
+ mod:checkInput()
58
+ mod:checkRestart()
59
59
  end
60
60
 
61
- function mod:RenderSprite()
61
+ function mod:renderSprite()
62
62
  -- Determine if IsaacScript is connected or not.
63
63
  local frameCount = Isaac.GetFrameCount()
64
64
  connected = frameCount - frameOfLastSuccessfulLoad <= FRAMES_BEFORE_DISCONNECTED
@@ -91,7 +91,7 @@ function mod:RenderSprite()
91
91
  end
92
92
  end
93
93
 
94
- function mod:RenderText()
94
+ function mod:renderText()
95
95
  -- Don't draw IsaacScript text when custom consoles are open.
96
96
  if AwaitingTextInput then
97
97
  return
@@ -165,7 +165,7 @@ function mod:GetColorForMsg(msg, alpha)
165
165
  return white
166
166
  end
167
167
 
168
- function mod:LoadSaveDat()
168
+ function mod:loadSaveDat()
169
169
  -- Local variables
170
170
  local isaacFrameCount = Isaac.GetFrameCount()
171
171
 
@@ -256,7 +256,7 @@ function mod:Load()
256
256
  saveData = json.decode(saveDataJSON)
257
257
  end
258
258
 
259
- function mod:CheckInput()
259
+ function mod:checkInput()
260
260
  if game:IsPaused() then
261
261
  return
262
262
  end
@@ -273,7 +273,7 @@ function mod:CheckInput()
273
273
  end
274
274
  end
275
275
 
276
- function mod:CheckRestart()
276
+ function mod:checkRestart()
277
277
  if not RESTART_GAME_ON_RECOMPILATION then
278
278
  return
279
279
  end
@@ -287,7 +287,7 @@ function mod:CheckRestart()
287
287
  Isaac.ExecuteCommand("restart")
288
288
  end
289
289
 
290
- mod:AddCallback(ModCallbacks.MC_POST_RENDER, mod.PostRender)
290
+ mod:AddCallback(ModCallbacks.MC_POST_RENDER, mod.postRender)
291
291
 
292
292
  local initMessage = "IsaacScript Watcher initialized."
293
293
  Isaac.DebugString(initMessage)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript",
3
- "version": "3.2.2",
3
+ "version": "3.3.1",
4
4
  "description": "A command line tool for managing Isaac mods written in TypeScript.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  /** This plugin adds an explanatory header to the top of the generated Lua code. */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
+ const constants_1 = require("./constants");
4
5
  const INFORMATIONAL_HEADER = `--[[
5
6
 
6
7
  This Isaac mod was created with the IsaacScript tool.
@@ -21,7 +22,8 @@ see the official website: https://isaacscript.github.io/
21
22
  const plugin = {
22
23
  beforeEmit(_program, _options, _emitHost, result) {
23
24
  for (const file of result) {
24
- file.code = `${INFORMATIONAL_HEADER}${file.code}`;
25
+ file.code =
26
+ INFORMATIONAL_HEADER + constants_1.LUA_LANGUAGE_SERVER_DISABLES + file.code;
25
27
  }
26
28
  },
27
29
  };
@@ -1 +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"}
1
+ {"version":3,"file":"addIsaacScriptCommentHeader.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/addIsaacScriptCommentHeader.ts"],"names":[],"mappings":";AAAA,mFAAmF;;AAInF,2CAA2D;AAE3D,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;gBACP,oBAAoB,GAAG,wCAA4B,GAAG,IAAI,CAAC,IAAI,CAAC;SACnE;IACH,CAAC;CACF,CAAC;AAEF,uBAAuB;AACvB,kBAAe,MAAM,CAAC"}
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  const tslib_1 = require("tslib");
5
5
  const fs = tslib_1.__importStar(require("fs"));
6
6
  const path = tslib_1.__importStar(require("path"));
7
+ const constants_1 = require("./constants");
7
8
  const cwd = process.cwd();
8
9
  const packageJSONPath = path.join(cwd, "package.json");
9
10
  const packageJSONContents = fs.readFileSync(packageJSONPath, "utf8");
@@ -36,17 +37,11 @@ information about using TypeScript, see the website: https://isaacscript.github.
36
37
  --]]
37
38
 
38
39
  `;
39
- const LUA_LANGUAGE_SERVER_DISABLES = `
40
- ---@diagnostic disable: deprecated
41
- ---@diagnostic disable: lowercase-global
42
- `
43
- .trim()
44
- .concat("\n\n");
45
40
  const plugin = {
46
41
  beforeEmit(_program, _options, _emitHost, result) {
47
42
  for (const file of result) {
48
43
  file.code =
49
- INFORMATIONAL_HEADER + LUA_LANGUAGE_SERVER_DISABLES + file.code;
44
+ INFORMATIONAL_HEADER + constants_1.LUA_LANGUAGE_SERVER_DISABLES + file.code;
50
45
  }
51
46
  },
52
47
  };
@@ -1 +1 @@
1
- {"version":3,"file":"addIsaacScriptCommentHeaderCommon.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/addIsaacScriptCommentHeaderCommon.ts"],"names":[],"mappings":";AAAA,mFAAmF;;;AAEnF,+CAAyB;AACzB,mDAA6B;AAI7B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAC1B,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;AACvD,MAAM,mBAAmB,GAAG,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AACrE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAA4B,CAAC;AAE/E,MAAM,oBAAoB,GAAG;;qBAER,WAAW,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyB1C,CAAC;AAEF,MAAM,4BAA4B,GAAG;;;CAGpC;KACE,IAAI,EAAE;KACN,MAAM,CAAC,MAAM,CAAC,CAAC;AAElB,MAAM,MAAM,GAAgB;IAC1B,UAAU,CACR,QAAoB,EACpB,QAA8B,EAC9B,SAAwB,EACxB,MAAuB;QAEvB,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE;YACzB,IAAI,CAAC,IAAI;gBACP,oBAAoB,GAAG,4BAA4B,GAAG,IAAI,CAAC,IAAI,CAAC;SACnE;IACH,CAAC;CACF,CAAC;AAEF,uBAAuB;AACvB,kBAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"addIsaacScriptCommentHeaderCommon.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/addIsaacScriptCommentHeaderCommon.ts"],"names":[],"mappings":";AAAA,mFAAmF;;;AAEnF,+CAAyB;AACzB,mDAA6B;AAG7B,2CAA2D;AAE3D,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAC1B,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;AACvD,MAAM,mBAAmB,GAAG,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AACrE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAA4B,CAAC;AAE/E,MAAM,oBAAoB,GAAG;;qBAER,WAAW,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAyB1C,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;gBACP,oBAAoB,GAAG,wCAA4B,GAAG,IAAI,CAAC,IAAI,CAAC;SACnE;IACH,CAAC;CACF,CAAC;AAEF,uBAAuB;AACvB,kBAAe,MAAM,CAAC"}
@@ -40,7 +40,7 @@ https://isaacscript.github.io/main/features
40
40
  const plugin = {
41
41
  beforeEmit(_program, _options, _emitHost, result) {
42
42
  for (const file of result) {
43
- file.code = `${INFORMATIONAL_HEADER}${file.code}`;
43
+ file.code = INFORMATIONAL_HEADER + file.code;
44
44
  }
45
45
  },
46
46
  };
@@ -1 +1 @@
1
- {"version":3,"file":"addIsaacScriptCommentHeaderDefinitions.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/addIsaacScriptCommentHeaderDefinitions.ts"],"names":[],"mappings":";AAAA,mFAAmF;;;AAEnF,+CAAyB;AACzB,mDAA6B;AAI7B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAC1B,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;AACvD,MAAM,mBAAmB,GAAG,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AACrE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAA4B,CAAC;AAE/E,MAAM,oBAAoB,GAAG;;+BAEE,WAAW,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BpD,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"}
1
+ {"version":3,"file":"addIsaacScriptCommentHeaderDefinitions.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/addIsaacScriptCommentHeaderDefinitions.ts"],"names":[],"mappings":";AAAA,mFAAmF;;;AAEnF,+CAAyB;AACzB,mDAA6B;AAI7B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;AAC1B,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;AACvD,MAAM,mBAAmB,GAAG,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;AACrE,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAA4B,CAAC;AAE/E,MAAM,oBAAoB,GAAG;;+BAEE,WAAW,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BpD,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,oBAAoB,GAAG,IAAI,CAAC,IAAI,CAAC;SAC9C;IACH,CAAC;CACF,CAAC;AAEF,uBAAuB;AACvB,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LUA_LANGUAGE_SERVER_DISABLES = void 0;
4
+ exports.LUA_LANGUAGE_SERVER_DISABLES = `
5
+ ---@diagnostic disable: deprecated
6
+ `
7
+ .trim()
8
+ .concat("\n\n");
9
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,4BAA4B,GAAG;;CAE3C;KACE,IAAI,EAAE;KACN,MAAM,CAAC,MAAM,CAAC,CAAC"}