isaacscript 3.2.1 → 3.3.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.
- package/file-templates/static/.luarc.json +146 -0
- package/package.json +1 -1
- package/src/plugins/addIsaacScriptCommentHeaderCommon.js +8 -1
- package/src/plugins/addIsaacScriptCommentHeaderCommon.js.map +1 -1
- package/src/plugins/noExtendedEnums.js +9 -1
- package/src/plugins/noExtendedEnums.js.map +1 -1
|
@@ -0,0 +1,146 @@
|
|
|
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
|
+
"EID",
|
|
139
|
+
"Encyclopedia",
|
|
140
|
+
"ModConfigMenu",
|
|
141
|
+
"MinimapAPI",
|
|
142
|
+
"StageAPI"
|
|
143
|
+
],
|
|
144
|
+
"preloadFileSize": 5000,
|
|
145
|
+
"runtime.version": "Lua 5.3"
|
|
146
|
+
}
|
package/package.json
CHANGED
|
@@ -36,10 +36,17 @@ information about using TypeScript, see the website: https://isaacscript.github.
|
|
|
36
36
|
--]]
|
|
37
37
|
|
|
38
38
|
`;
|
|
39
|
+
const LUA_LANGUAGE_SERVER_DISABLES = `
|
|
40
|
+
---@diagnostic disable: deprecated
|
|
41
|
+
---@diagnostic disable: lowercase-global
|
|
42
|
+
`
|
|
43
|
+
.trim()
|
|
44
|
+
.concat("\n\n");
|
|
39
45
|
const plugin = {
|
|
40
46
|
beforeEmit(_program, _options, _emitHost, result) {
|
|
41
47
|
for (const file of result) {
|
|
42
|
-
file.code =
|
|
48
|
+
file.code =
|
|
49
|
+
INFORMATIONAL_HEADER + LUA_LANGUAGE_SERVER_DISABLES + file.code;
|
|
43
50
|
}
|
|
44
51
|
},
|
|
45
52
|
};
|
|
@@ -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,MAAM,GAAgB;IAC1B,UAAU,CACR,QAAoB,EACpB,QAA8B,EAC9B,SAAwB,EACxB,MAAuB;QAEvB,KAAK,MAAM,IAAI,IAAI,MAAM,EAAE;YACzB,IAAI,CAAC,IAAI,
|
|
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"}
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
* enum Foo {
|
|
32
32
|
* Value1,
|
|
33
33
|
* }
|
|
34
|
+
*
|
|
34
35
|
* enum Foo {
|
|
35
36
|
* Value2,
|
|
36
37
|
* }
|
|
@@ -51,11 +52,18 @@ const plugin = {
|
|
|
51
52
|
// Get the first element, which will be equal to something like:
|
|
52
53
|
//
|
|
53
54
|
// ```lua
|
|
55
|
+
// local Foo = Foo or ({})
|
|
56
|
+
// ```
|
|
57
|
+
//
|
|
58
|
+
// Or, if exported:
|
|
59
|
+
//
|
|
60
|
+
// ```lua
|
|
54
61
|
// local ____exports.Foo = Foo or ({})
|
|
55
62
|
// ```
|
|
56
63
|
const oldDeclaration = statements[0];
|
|
57
64
|
if (oldDeclaration !== undefined &&
|
|
58
|
-
tstl.isAssignmentStatement(oldDeclaration)
|
|
65
|
+
(tstl.isAssignmentStatement(oldDeclaration) ||
|
|
66
|
+
tstl.isVariableDeclarationStatement(oldDeclaration))) {
|
|
59
67
|
// Replace the right side of the assignment with a blank Lua table, e.g.
|
|
60
68
|
//
|
|
61
69
|
// ```lua
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noExtendedEnums.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/noExtendedEnums.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"noExtendedEnums.js","sourceRoot":"","sources":["../../../../../packages/isaacscript-cli/src/plugins/noExtendedEnums.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;;;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,0BAA0B;YAC1B,MAAM;YACN,EAAE;YACF,mBAAmB;YACnB,EAAE;YACF,SAAS;YACT,sCAAsC;YACtC,MAAM;YACN,MAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;YACrC,IACE,cAAc,KAAK,SAAS;gBAC5B,CAAC,IAAI,CAAC,qBAAqB,CAAC,cAAc,CAAC;oBACzC,IAAI,CAAC,8BAA8B,CAAC,cAAc,CAAC,CAAC,EACtD;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"}
|