isaacscript-common 33.13.0 → 33.14.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.
@@ -1131,36 +1131,52 @@ export declare function arrayToBitFlags<T extends BitFlag | BitFlag128>(array: T
1131
1131
  export declare function arrayToString(array: unknown[]): string;
1132
1132
 
1133
1133
  /**
1134
- * Helper function to safely cast a `number` to a `CardType`. (This is better than using the `as`
1134
+ * Helper function to safely cast an `int` to a `CardType`. (This is better than using the `as`
1135
1135
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
1136
1136
  *
1137
1137
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
1138
1138
  */
1139
- export declare function asCardType(num: number): CardType;
1139
+ export declare function asCardType(num: int): CardType;
1140
1140
 
1141
1141
  /**
1142
- * Helper function to safely cast a `number` to a `CollectibleType`. (This is better than using the
1142
+ * Helper function to safely cast an `int` to a `CollectibleType`. (This is better than using the
1143
1143
  * `as` TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
1144
1144
  *
1145
1145
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
1146
1146
  */
1147
- export declare function asCollectibleType(num: number): CollectibleType;
1147
+ export declare function asCollectibleType(num: int): CollectibleType;
1148
1148
 
1149
1149
  /**
1150
- * Helper function to safely cast a `number` to a `LevelStage`. (This is better than using the `as`
1150
+ * Helper function to safely cast an enum to an `int`. (This is better than using the `as`
1151
1151
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
1152
1152
  *
1153
1153
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
1154
1154
  */
1155
- export declare function asLevelStage(num: number): LevelStage;
1155
+ export declare function asFloat(num: number): float;
1156
1156
 
1157
1157
  /**
1158
- * Helper function to safely cast a `number` to a `NPCState`. (This is better than using the `as`
1158
+ * Helper function to safely cast an enum to an `int`. (This is better than using the `as`
1159
1159
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
1160
1160
  *
1161
1161
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
1162
1162
  */
1163
- export declare function asNPCState(num: number): NPCState;
1163
+ export declare function asInt(num: number): int;
1164
+
1165
+ /**
1166
+ * Helper function to safely cast an `int` to a `LevelStage`. (This is better than using the `as`
1167
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
1168
+ *
1169
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
1170
+ */
1171
+ export declare function asLevelStage(num: int): LevelStage;
1172
+
1173
+ /**
1174
+ * Helper function to safely cast an `int` to a `NPCState`. (This is better than using the `as`
1175
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
1176
+ *
1177
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
1178
+ */
1179
+ export declare function asNPCState(num: int): NPCState;
1164
1180
 
1165
1181
  /**
1166
1182
  * Helper function to safely cast an enum to a `number`. (This is better than using the `as`
@@ -1171,28 +1187,28 @@ export declare function asNPCState(num: number): NPCState;
1171
1187
  export declare function asNumber(num: number): number;
1172
1188
 
1173
1189
  /**
1174
- * Helper function to safely cast a `number` to a `PillColor`. (This is better than using the `as`
1190
+ * Helper function to safely cast an `int` to a `PillColor`. (This is better than using the `as`
1175
1191
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
1176
1192
  *
1177
1193
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
1178
1194
  */
1179
- export declare function asPillColor(num: number): PillColor;
1195
+ export declare function asPillColor(num: int): PillColor;
1180
1196
 
1181
1197
  /**
1182
- * Helper function to safely cast a `number` to a `PillEffect`. (This is better than using the `as`
1198
+ * Helper function to safely cast an `int` to a `PillEffect`. (This is better than using the `as`
1183
1199
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
1184
1200
  *
1185
1201
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
1186
1202
  */
1187
- export declare function asPillEffect(num: number): PillEffect;
1203
+ export declare function asPillEffect(num: int): PillEffect;
1188
1204
 
1189
1205
  /**
1190
- * Helper function to safely cast a `number` to a `PlayerType`. (This is better than using the `as`
1206
+ * Helper function to safely cast an `int` to a `PlayerType`. (This is better than using the `as`
1191
1207
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
1192
1208
  *
1193
1209
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
1194
1210
  */
1195
- export declare function asPlayerType(num: number): PlayerType;
1211
+ export declare function asPlayerType(num: int): PlayerType;
1196
1212
 
1197
1213
  /**
1198
1214
  * Helper function to throw an error (using the `error` Lua function) if the provided value is equal
@@ -1213,12 +1229,12 @@ export declare function assertDefined<T>(value: T, ...[msg]: [undefined] extends
1213
1229
  export declare function asString(str: string): string;
1214
1230
 
1215
1231
  /**
1216
- * Helper function to safely cast a `number` to a `TrinketType`. (This is better than using the `as`
1232
+ * Helper function to safely cast an `int` to a `TrinketType`. (This is better than using the `as`
1217
1233
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
1218
1234
  *
1219
1235
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
1220
1236
  */
1221
- export declare function asTrinketType(num: number): TrinketType;
1237
+ export declare function asTrinketType(num: int): TrinketType;
1222
1238
 
1223
1239
  /**
1224
1240
  * The distance of the laser when Azazel does not have any range up items yet. For more info, see
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 33.13.0
3
+ isaacscript-common 33.14.1
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -15731,6 +15731,12 @@ end
15731
15731
  function ____exports.asCollectibleType(self, num)
15732
15732
  return num
15733
15733
  end
15734
+ function ____exports.asFloat(self, num)
15735
+ return num
15736
+ end
15737
+ function ____exports.asInt(self, num)
15738
+ return num
15739
+ end
15734
15740
  function ____exports.asLevelStage(self, num)
15735
15741
  return num
15736
15742
  end
@@ -49719,6 +49725,28 @@ function ____exports.sound(self, params)
49719
49725
  end
49720
49726
  sfxManager:Play(soundEffect)
49721
49727
  end
49728
+ function ____exports.spawnGoldenTrinket(self, params)
49729
+ if params == "" then
49730
+ print("You must specify the name or number corresponding to the trinket type.")
49731
+ return
49732
+ end
49733
+ local trinketTypeNumber = tonumber(params)
49734
+ local trinketType
49735
+ if trinketTypeNumber == nil then
49736
+ local match = getMapPartialMatch(nil, params, TRINKET_NAME_TO_TYPE_MAP)
49737
+ if match == nil then
49738
+ print("Unknown trinket: " .. params)
49739
+ return
49740
+ end
49741
+ trinketType = match[2]
49742
+ else
49743
+ trinketType = asTrinketType(nil, trinketTypeNumber)
49744
+ end
49745
+ local roomClass = game:GetRoom()
49746
+ local centerPos = roomClass:GetCenterPos()
49747
+ local goldenTrinketType = getGoldenTrinketType(nil, trinketType)
49748
+ spawnTrinketFunction(nil, goldenTrinketType, centerPos)
49749
+ end
49722
49750
  function ____exports.startingRoom(self)
49723
49751
  local level = game:GetLevel()
49724
49752
  local startingRoomIndex = level:GetStartingRoomIndex()
@@ -50101,6 +50129,9 @@ end
50101
50129
  function ____exports.goldKey(self)
50102
50130
  ____exports.goldenKey(nil)
50103
50131
  end
50132
+ function ____exports.goldenTrinket(self, params)
50133
+ ____exports.spawnGoldenTrinket(nil, params)
50134
+ end
50104
50135
  function ____exports.grid(self)
50105
50136
  Isaac.ExecuteCommand("debug 11")
50106
50137
  end
@@ -50497,28 +50528,6 @@ function ____exports.spawnCollectible(self, params)
50497
50528
  local centerPos = roomClass:GetCenterPos()
50498
50529
  spawnCollectibleUnsafe(nil, collectibleType, centerPos)
50499
50530
  end
50500
- function ____exports.spawnGoldenTrinket(self, params)
50501
- if params == "" then
50502
- print("You must specify the name or number corresponding to the trinket type.")
50503
- return
50504
- end
50505
- local trinketTypeNumber = tonumber(params)
50506
- local trinketType
50507
- if trinketTypeNumber == nil then
50508
- local match = getMapPartialMatch(nil, params, TRINKET_NAME_TO_TYPE_MAP)
50509
- if match == nil then
50510
- print("Unknown trinket: " .. params)
50511
- return
50512
- end
50513
- trinketType = match[2]
50514
- else
50515
- trinketType = asTrinketType(nil, trinketTypeNumber)
50516
- end
50517
- local roomClass = game:GetRoom()
50518
- local centerPos = roomClass:GetCenterPos()
50519
- local goldenTrinketType = getGoldenTrinketType(nil, trinketType)
50520
- spawnTrinketFunction(nil, goldenTrinketType, centerPos)
50521
- end
50522
50531
  function ____exports.spawnTrinket(self, params)
50523
50532
  if params == "" then
50524
50533
  print("You must specify the name or number corresponding to the trinket type.")
@@ -174,6 +174,8 @@ export declare function goldenBomb(): void;
174
174
  export declare function goldenHearts(params: string): void;
175
175
  /** Gives the player a golden key. */
176
176
  export declare function goldenKey(): void;
177
+ /** Alias for the "spawnGoldenTrinket" command. */
178
+ export declare function goldenTrinket(params: string): void;
177
179
  /**
178
180
  * Alias for the "debug 11" command. Useful for seeing the coordinates and grid index of each tile
179
181
  * in the room.
@@ -1 +1 @@
1
- {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/extraConsoleCommands/commands.ts"],"names":[],"mappings":"AAkJA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA2C/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,gEAAgE;AAChE,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,sEAAsE;AACtE,wBAAgB,OAAO,IAAI,IAAI,CAkB9B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED,+CAA+C;AAC/C,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED,4CAA4C;AAC5C,wBAAgB,KAAK,IAAI,IAAI,CAG5B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAcjD;AAED,2CAA2C;AAC3C,wBAAgB,EAAE,IAAI,IAAI,CAEzB;AAED;;;GAGG;AACH,wBAAgB,IAAI,CA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sFAAsF;AACtF,wBAAgB,MAAM,IAAI,IAAI,CAQ7B;AAED,wFAAwF;AACxF,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;;;;;;GAOG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA0BzC"}
1
+ {"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../../../src/classes/features/other/extraConsoleCommands/commands.ts"],"names":[],"mappings":"AAkJA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA2C/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,gEAAgE;AAChE,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,sEAAsE;AACtE,wBAAgB,OAAO,IAAI,IAAI,CAkB9B;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED,+CAA+C;AAC/C,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED,4CAA4C;AAC5C,wBAAgB,KAAK,IAAI,IAAI,CAG5B;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAcjD;AAED,2CAA2C;AAC3C,wBAAgB,EAAE,IAAI,IAAI,CAEzB;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAczC;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAc1C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,wCAAwC;AACxC,wBAAgB,IAAI,IAAI,IAAI,CAE3B;AAED,kEAAkE;AAClE,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAED,iDAAiD;AACjD,wBAAgB,QAAQ,IAAI,IA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Manager:Play(soundEffect)
204
204
  end
205
+ --- Spawns a golden version of the specified trinket type.
206
+ function ____exports.spawnGoldenTrinket(self, params)
207
+ if params == "" then
208
+ print("You must specify the name or number corresponding to the trinket type.")
209
+ return
210
+ end
211
+ local trinketTypeNumber = tonumber(params)
212
+ local trinketType
213
+ if trinketTypeNumber == nil then
214
+ local match = getMapPartialMatch(nil, params, TRINKET_NAME_TO_TYPE_MAP)
215
+ if match == nil then
216
+ print("Unknown trinket: " .. params)
217
+ return
218
+ end
219
+ trinketType = match[2]
220
+ else
221
+ trinketType = asTrinketType(nil, trinketTypeNumber)
222
+ end
223
+ local roomClass = game:GetRoom()
224
+ local centerPos = roomClass:GetCenterPos()
225
+ local goldenTrinketType = getGoldenTrinketType(nil, trinketType)
226
+ spawnTrinketFunction(nil, goldenTrinketType, centerPos)
227
+ end
205
228
  --- Warps to the starting room of the floor.
206
229
  function ____exports.startingRoom(self)
207
230
  local level = game:GetLevel()
@@ -659,6 +682,10 @@ end
659
682
  function ____exports.goldKey(self)
660
683
  ____exports.goldenKey(nil)
661
684
  end
685
+ --- Alias for the "spawnGoldenTrinket" command.
686
+ function ____exports.goldenTrinket(self, params)
687
+ ____exports.spawnGoldenTrinket(nil, params)
688
+ end
662
689
  --- Alias for the "debug 11" command. Useful for seeing the coordinates and grid index of each tile
663
690
  -- in the room.
664
691
  function ____exports.grid(self)
@@ -1144,29 +1171,6 @@ function ____exports.spawnCollectible(self, params)
1144
1171
  local centerPos = roomClass:GetCenterPos()
1145
1172
  spawnCollectibleUnsafe(nil, collectibleType, centerPos)
1146
1173
  end
1147
- --- Spawns a golden version of the specified trinket type.
1148
- function ____exports.spawnGoldenTrinket(self, params)
1149
- if params == "" then
1150
- print("You must specify the name or number corresponding to the trinket type.")
1151
- return
1152
- end
1153
- local trinketTypeNumber = tonumber(params)
1154
- local trinketType
1155
- if trinketTypeNumber == nil then
1156
- local match = getMapPartialMatch(nil, params, TRINKET_NAME_TO_TYPE_MAP)
1157
- if match == nil then
1158
- print("Unknown trinket: " .. params)
1159
- return
1160
- end
1161
- trinketType = match[2]
1162
- else
1163
- trinketType = asTrinketType(nil, trinketTypeNumber)
1164
- end
1165
- local roomClass = game:GetRoom()
1166
- local centerPos = roomClass:GetCenterPos()
1167
- local goldenTrinketType = getGoldenTrinketType(nil, trinketType)
1168
- spawnTrinketFunction(nil, goldenTrinketType, centerPos)
1169
- end
1170
1174
  function ____exports.spawnTrinket(self, params)
1171
1175
  if params == "" then
1172
1176
  print("You must specify the name or number corresponding to the trinket type.")
@@ -2,33 +2,47 @@
2
2
  /// <reference types="lua-types/5.3" />
3
3
  import type { CardType, CollectibleType, LevelStage, NPCState, PillColor, PillEffect, PlayerType, TrinketType } from "isaac-typescript-definitions";
4
4
  /**
5
- * Helper function to safely cast a `number` to a `CardType`. (This is better than using the `as`
5
+ * Helper function to safely cast an `int` to a `CardType`. (This is better than using the `as`
6
6
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
7
7
  *
8
8
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
9
9
  */
10
- export declare function asCardType(num: number): CardType;
10
+ export declare function asCardType(num: int): CardType;
11
11
  /**
12
- * Helper function to safely cast a `number` to a `CollectibleType`. (This is better than using the
12
+ * Helper function to safely cast an `int` to a `CollectibleType`. (This is better than using the
13
13
  * `as` TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
14
14
  *
15
15
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
16
16
  */
17
- export declare function asCollectibleType(num: number): CollectibleType;
17
+ export declare function asCollectibleType(num: int): CollectibleType;
18
18
  /**
19
- * Helper function to safely cast a `number` to a `LevelStage`. (This is better than using the `as`
19
+ * Helper function to safely cast an enum to an `int`. (This is better than using the `as`
20
20
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
21
21
  *
22
22
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
23
23
  */
24
- export declare function asLevelStage(num: number): LevelStage;
24
+ export declare function asFloat(num: number): float;
25
25
  /**
26
- * Helper function to safely cast a `number` to a `NPCState`. (This is better than using the `as`
26
+ * Helper function to safely cast an enum to an `int`. (This is better than using the `as`
27
27
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
28
28
  *
29
29
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
30
30
  */
31
- export declare function asNPCState(num: number): NPCState;
31
+ export declare function asInt(num: number): int;
32
+ /**
33
+ * Helper function to safely cast an `int` to a `LevelStage`. (This is better than using the `as`
34
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
35
+ *
36
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
37
+ */
38
+ export declare function asLevelStage(num: int): LevelStage;
39
+ /**
40
+ * Helper function to safely cast an `int` to a `NPCState`. (This is better than using the `as`
41
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
42
+ *
43
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
44
+ */
45
+ export declare function asNPCState(num: int): NPCState;
32
46
  /**
33
47
  * Helper function to safely cast an enum to a `number`. (This is better than using the `as`
34
48
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
@@ -37,26 +51,26 @@ export declare function asNPCState(num: number): NPCState;
37
51
  */
38
52
  export declare function asNumber(num: number): number;
39
53
  /**
40
- * Helper function to safely cast a `number` to a `PillColor`. (This is better than using the `as`
54
+ * Helper function to safely cast an `int` to a `PillColor`. (This is better than using the `as`
41
55
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
42
56
  *
43
57
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
44
58
  */
45
- export declare function asPillColor(num: number): PillColor;
59
+ export declare function asPillColor(num: int): PillColor;
46
60
  /**
47
- * Helper function to safely cast a `number` to a `PillEffect`. (This is better than using the `as`
61
+ * Helper function to safely cast an `int` to a `PillEffect`. (This is better than using the `as`
48
62
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
49
63
  *
50
64
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
51
65
  */
52
- export declare function asPillEffect(num: number): PillEffect;
66
+ export declare function asPillEffect(num: int): PillEffect;
53
67
  /**
54
- * Helper function to safely cast a `number` to a `PlayerType`. (This is better than using the `as`
68
+ * Helper function to safely cast an `int` to a `PlayerType`. (This is better than using the `as`
55
69
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
56
70
  *
57
71
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
58
72
  */
59
- export declare function asPlayerType(num: number): PlayerType;
73
+ export declare function asPlayerType(num: int): PlayerType;
60
74
  /**
61
75
  * Helper function to safely cast an enum to a `string`. (This is better than using the `as`
62
76
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
@@ -65,12 +79,12 @@ export declare function asPlayerType(num: number): PlayerType;
65
79
  */
66
80
  export declare function asString(str: string): string;
67
81
  /**
68
- * Helper function to safely cast a `number` to a `TrinketType`. (This is better than using the `as`
82
+ * Helper function to safely cast an `int` to a `TrinketType`. (This is better than using the `as`
69
83
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
70
84
  *
71
85
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
72
86
  */
73
- export declare function asTrinketType(num: number): TrinketType;
87
+ export declare function asTrinketType(num: int): TrinketType;
74
88
  export declare function isBoolean(variable: unknown): variable is boolean;
75
89
  export declare function isFunction(variable: unknown): variable is Function;
76
90
  export declare function isInteger(variable: unknown): variable is int;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/functions/types.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EACV,QAAQ,EACR,eAAe,EACf,UAAU,EACV,QAAQ,EACR,SAAS,EACT,UAAU,EACV,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAEtC;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,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AG,MAAM,CAE5C;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,GAAG,GAAG,WAAW,CAEnD;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,OAAO,CAEhE;AAGD,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,QAAQ,CAElE;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,GAAG,CAM5D;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,CAE9D;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CACzB,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,OAAO,GAAG,MAAM,GAAG,MAAM,CAOvC;AAED,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,MAAM,CAE9D;AAED,wBAAgB,OAAO,CACrB,QAAQ,EAAE,OAAO,GAChB,QAAQ,IAAI,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,CAExC;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,WAAW,CAErE"}
@@ -2,28 +2,42 @@ local ____exports = {}
2
2
  function ____exports.isNumber(self, variable)
3
3
  return type(variable) == "number"
4
4
  end
5
- --- Helper function to safely cast a `number` to a `CardType`. (This is better than using the `as`
5
+ --- Helper function to safely cast an `int` to a `CardType`. (This is better than using the `as`
6
6
  -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
7
7
  --
8
8
  -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
9
9
  function ____exports.asCardType(self, num)
10
10
  return num
11
11
  end
12
- --- Helper function to safely cast a `number` to a `CollectibleType`. (This is better than using the
12
+ --- Helper function to safely cast an `int` to a `CollectibleType`. (This is better than using the
13
13
  -- `as` TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
14
14
  --
15
15
  -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
16
16
  function ____exports.asCollectibleType(self, num)
17
17
  return num
18
18
  end
19
- --- Helper function to safely cast a `number` to a `LevelStage`. (This is better than using the `as`
19
+ --- Helper function to safely cast an enum to an `int`. (This is better than using the `as`
20
+ -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
21
+ --
22
+ -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
23
+ function ____exports.asFloat(self, num)
24
+ return num
25
+ end
26
+ --- Helper function to safely cast an enum to an `int`. (This is better than using the `as`
27
+ -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
28
+ --
29
+ -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
30
+ function ____exports.asInt(self, num)
31
+ return num
32
+ end
33
+ --- Helper function to safely cast an `int` to a `LevelStage`. (This is better than using the `as`
20
34
  -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
21
35
  --
22
36
  -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
23
37
  function ____exports.asLevelStage(self, num)
24
38
  return num
25
39
  end
26
- --- Helper function to safely cast a `number` to a `NPCState`. (This is better than using the `as`
40
+ --- Helper function to safely cast an `int` to a `NPCState`. (This is better than using the `as`
27
41
  -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
28
42
  --
29
43
  -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
@@ -37,21 +51,21 @@ end
37
51
  function ____exports.asNumber(self, num)
38
52
  return num
39
53
  end
40
- --- Helper function to safely cast a `number` to a `PillColor`. (This is better than using the `as`
54
+ --- Helper function to safely cast an `int` to a `PillColor`. (This is better than using the `as`
41
55
  -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
42
56
  --
43
57
  -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
44
58
  function ____exports.asPillColor(self, num)
45
59
  return num
46
60
  end
47
- --- Helper function to safely cast a `number` to a `PillEffect`. (This is better than using the `as`
61
+ --- Helper function to safely cast an `int` to a `PillEffect`. (This is better than using the `as`
48
62
  -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
49
63
  --
50
64
  -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
51
65
  function ____exports.asPillEffect(self, num)
52
66
  return num
53
67
  end
54
- --- Helper function to safely cast a `number` to a `PlayerType`. (This is better than using the `as`
68
+ --- Helper function to safely cast an `int` to a `PlayerType`. (This is better than using the `as`
55
69
  -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
56
70
  --
57
71
  -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
@@ -65,7 +79,7 @@ end
65
79
  function ____exports.asString(self, str)
66
80
  return str
67
81
  end
68
- --- Helper function to safely cast a `number` to a `TrinketType`. (This is better than using the `as`
82
+ --- Helper function to safely cast an `int` to a `TrinketType`. (This is better than using the `as`
69
83
  -- TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
70
84
  --
71
85
  -- This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "33.13.0",
3
+ "version": "33.14.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -767,6 +767,11 @@ export function goldenKey(): void {
767
767
  player.AddGoldenKey();
768
768
  }
769
769
 
770
+ /** Alias for the "spawnGoldenTrinket" command. */
771
+ export function goldenTrinket(params: string): void {
772
+ spawnGoldenTrinket(params);
773
+ }
774
+
770
775
  /**
771
776
  * Alias for the "debug 11" command. Useful for seeing the coordinates and grid index of each tile
772
777
  * in the room.
@@ -10,42 +10,62 @@ import type {
10
10
  } from "isaac-typescript-definitions";
11
11
 
12
12
  /**
13
- * Helper function to safely cast a `number` to a `CardType`. (This is better than using the `as`
13
+ * Helper function to safely cast an `int` to a `CardType`. (This is better than using the `as`
14
14
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
15
15
  *
16
16
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
17
17
  */
18
- export function asCardType(num: number): CardType {
18
+ export function asCardType(num: int): CardType {
19
19
  return num;
20
20
  }
21
21
 
22
22
  /**
23
- * Helper function to safely cast a `number` to a `CollectibleType`. (This is better than using the
23
+ * Helper function to safely cast an `int` to a `CollectibleType`. (This is better than using the
24
24
  * `as` TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
25
25
  *
26
26
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
27
27
  */
28
- export function asCollectibleType(num: number): CollectibleType {
28
+ export function asCollectibleType(num: int): CollectibleType {
29
29
  return num;
30
30
  }
31
31
 
32
32
  /**
33
- * Helper function to safely cast a `number` to a `LevelStage`. (This is better than using the `as`
33
+ * Helper function to safely cast an enum to an `int`. (This is better than using the `as`
34
34
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
35
35
  *
36
36
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
37
37
  */
38
- export function asLevelStage(num: number): LevelStage {
38
+ export function asFloat(num: number): float {
39
39
  return num;
40
40
  }
41
41
 
42
42
  /**
43
- * Helper function to safely cast a `number` to a `NPCState`. (This is better than using the `as`
43
+ * Helper function to safely cast an enum to an `int`. (This is better than using the `as`
44
44
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
45
45
  *
46
46
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
47
47
  */
48
- export function asNPCState(num: number): NPCState {
48
+ export function asInt(num: number): int {
49
+ return num;
50
+ }
51
+
52
+ /**
53
+ * Helper function to safely cast an `int` to a `LevelStage`. (This is better than using the `as`
54
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
55
+ *
56
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
57
+ */
58
+ export function asLevelStage(num: int): LevelStage {
59
+ return num;
60
+ }
61
+
62
+ /**
63
+ * Helper function to safely cast an `int` to a `NPCState`. (This is better than using the `as`
64
+ * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
65
+ *
66
+ * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
67
+ */
68
+ export function asNPCState(num: int): NPCState {
49
69
  return num;
50
70
  }
51
71
 
@@ -60,32 +80,32 @@ export function asNumber(num: number): number {
60
80
  }
61
81
 
62
82
  /**
63
- * Helper function to safely cast a `number` to a `PillColor`. (This is better than using the `as`
83
+ * Helper function to safely cast an `int` to a `PillColor`. (This is better than using the `as`
64
84
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
65
85
  *
66
86
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
67
87
  */
68
- export function asPillColor(num: number): PillColor {
88
+ export function asPillColor(num: int): PillColor {
69
89
  return num;
70
90
  }
71
91
 
72
92
  /**
73
- * Helper function to safely cast a `number` to a `PillEffect`. (This is better than using the `as`
93
+ * Helper function to safely cast an `int` to a `PillEffect`. (This is better than using the `as`
74
94
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
75
95
  *
76
96
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
77
97
  */
78
- export function asPillEffect(num: number): PillEffect {
98
+ export function asPillEffect(num: int): PillEffect {
79
99
  return num;
80
100
  }
81
101
 
82
102
  /**
83
- * Helper function to safely cast a `number` to a `PlayerType`. (This is better than using the `as`
103
+ * Helper function to safely cast an `int` to a `PlayerType`. (This is better than using the `as`
84
104
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
85
105
  *
86
106
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
87
107
  */
88
- export function asPlayerType(num: number): PlayerType {
108
+ export function asPlayerType(num: int): PlayerType {
89
109
  return num;
90
110
  }
91
111
 
@@ -100,12 +120,12 @@ export function asString(str: string): string {
100
120
  }
101
121
 
102
122
  /**
103
- * Helper function to safely cast a `number` to a `TrinketType`. (This is better than using the `as`
123
+ * Helper function to safely cast an `int` to a `TrinketType`. (This is better than using the `as`
104
124
  * TypeScript keyword to do a type assertion, since that can obfuscate compiler errors. )
105
125
  *
106
126
  * This is useful to satisfy the "isaacscript/strict-enums" ESLint rule.
107
127
  */
108
- export function asTrinketType(num: number): TrinketType {
128
+ export function asTrinketType(num: int): TrinketType {
109
129
  return num;
110
130
  }
111
131