isaacscript-common 48.0.0 → 49.0.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/dist/index.rollup.d.ts +36 -14
- package/dist/isaacscript-common.lua +171 -157
- package/dist/src/functions/doors.lua +1 -1
- package/dist/src/functions/enums.d.ts +35 -14
- package/dist/src/functions/enums.d.ts.map +1 -1
- package/dist/src/functions/enums.lua +42 -14
- package/dist/src/functions/nextStage.lua +5 -5
- package/dist/src/functions/stage.lua +2 -2
- package/dist/src/objects/bossNamePNGFileNames.lua +24 -24
- package/dist/src/objects/bossPortraitPNGFileNames.lua +24 -24
- package/dist/src/objects/levelNames.lua +1 -1
- package/dist/src/objects/stageToMusic.lua +1 -1
- package/dist/src/objects/stageToStageID.lua +1 -1
- package/dist/src/sets/bossSets.lua +8 -8
- package/dist/src/sets/storyBossesSet.lua +1 -1
- package/package.json +2 -2
- package/src/functions/doors.ts +1 -1
- package/src/functions/enums.ts +51 -14
- package/src/functions/nextStage.ts +5 -5
- package/src/functions/stage.ts +2 -2
- package/src/objects/bossNamePNGFileNames.ts +24 -24
- package/src/objects/bossPortraitPNGFileNames.ts +24 -24
- package/src/objects/levelNames.ts +1 -1
- package/src/objects/stageToMusic.ts +1 -1
- package/src/objects/stageToStageID.ts +1 -1
- package/src/sets/bossSets.ts +8 -8
- package/src/sets/storyBossesSet.ts +1 -1
package/dist/index.rollup.d.ts
CHANGED
|
@@ -5427,13 +5427,14 @@ export declare function getEntityPositions(entities?: Entity[]): Map<PtrHash, Ve
|
|
|
5427
5427
|
export declare function getEntityVelocities(entities?: Entity[]): Map<PtrHash, Vector>;
|
|
5428
5428
|
|
|
5429
5429
|
/**
|
|
5430
|
-
* TypeScriptToLua will transpile TypeScript enums to Lua tables that have a double mapping.
|
|
5431
|
-
* when you iterate over them, you will get both the names of the enums and the values of the
|
|
5432
|
-
* in a random order. Use this helper function to get the entries of the enum with the
|
|
5433
|
-
* mappings filtered out.
|
|
5430
|
+
* TypeScriptToLua will transpile TypeScript number enums to Lua tables that have a double mapping.
|
|
5431
|
+
* Thus, when you iterate over them, you will get both the names of the enums and the values of the
|
|
5432
|
+
* enums, in a random order. Use this helper function to get the entries of the enum with the
|
|
5433
|
+
* reverse mappings filtered out.
|
|
5434
5434
|
*
|
|
5435
5435
|
* This function will return the enum values in a sorted order, which may not necessarily be the
|
|
5436
|
-
* same order as which they were declared in.
|
|
5436
|
+
* same order as which they were declared in. (It is impossible to get the declaration order at
|
|
5437
|
+
* run-time.)
|
|
5437
5438
|
*
|
|
5438
5439
|
* This function will work properly for both number enums and string enums. (Reverse mappings are
|
|
5439
5440
|
* not created for string enums.)
|
|
@@ -5446,12 +5447,13 @@ export declare function getEntityVelocities(entities?: Entity[]): Map<PtrHash, V
|
|
|
5446
5447
|
export declare function getEnumEntries<T>(transpiledEnum: T): Array<[key: string, value: T[keyof T]]>;
|
|
5447
5448
|
|
|
5448
5449
|
/**
|
|
5449
|
-
* TypeScriptToLua will transpile TypeScript enums to Lua tables that have a double mapping.
|
|
5450
|
-
* when you iterate over them, you will get both the names of the enums and the values of the
|
|
5451
|
-
* in a random order. If all you need are the keys of an enum, use this helper function.
|
|
5450
|
+
* TypeScriptToLua will transpile TypeScript number enums to Lua tables that have a double mapping.
|
|
5451
|
+
* Thus, when you iterate over them, you will get both the names of the enums and the values of the
|
|
5452
|
+
* enums, in a random order. If all you need are the keys of an enum, use this helper function.
|
|
5452
5453
|
*
|
|
5453
5454
|
* This function will return the enum keys in a sorted order, which may not necessarily be the same
|
|
5454
|
-
* order as which they were declared in.
|
|
5455
|
+
* order as which they were declared in. (It is impossible to get the declaration order at
|
|
5456
|
+
* run-time.)
|
|
5455
5457
|
*
|
|
5456
5458
|
* This function will work properly for both number enums and string enums. (Reverse mappings are
|
|
5457
5459
|
* not created for string enums.)
|
|
@@ -5467,12 +5469,32 @@ export declare function getEnumKeys(transpiledEnum: Record<string | number, stri
|
|
|
5467
5469
|
export declare function getEnumLength(transpiledEnum: Record<string | number, string | number>): int;
|
|
5468
5470
|
|
|
5469
5471
|
/**
|
|
5470
|
-
* TypeScriptToLua will transpile TypeScript enums to Lua tables that have a double mapping.
|
|
5471
|
-
* when you iterate over them, you will get both the names of the enums and the values of the
|
|
5472
|
-
* in a random order. If all you need are the
|
|
5472
|
+
* TypeScriptToLua will transpile TypeScript number enums to Lua tables that have a double mapping.
|
|
5473
|
+
* Thus, when you iterate over them, you will get both the names of the enums and the values of the
|
|
5474
|
+
* enums, in a random order. If all you need are the names of an enum from the reverse mapping, use
|
|
5475
|
+
* this helper function.
|
|
5476
|
+
*
|
|
5477
|
+
* This function will return the enum names in a sorted order, which may not necessarily be the same
|
|
5478
|
+
* order as which they were declared in. (It is impossible to get the declaration order at
|
|
5479
|
+
* run-time.)
|
|
5480
|
+
*
|
|
5481
|
+
* This function will work properly for both number enums and string enums. (Reverse mappings are
|
|
5482
|
+
* not created for string enums, so their names would be equivalent to what would be returned by the
|
|
5483
|
+
* `getEnumKeys` function.)
|
|
5484
|
+
*
|
|
5485
|
+
* For a more in depth explanation, see:
|
|
5486
|
+
* https://isaacscript.github.io/main/gotchas#iterating-over-enums
|
|
5487
|
+
*/
|
|
5488
|
+
export declare function getEnumNames(transpiledEnum: Record<string | number, string | number>): string[];
|
|
5489
|
+
|
|
5490
|
+
/**
|
|
5491
|
+
* TypeScriptToLua will transpile TypeScript number enums to Lua tables that have a double mapping.
|
|
5492
|
+
* Thus, when you iterate over them, you will get both the names of the enums and the values of the
|
|
5493
|
+
* enums, in a random order. If all you need are the values of an enum, use this helper function.
|
|
5473
5494
|
*
|
|
5474
5495
|
* This function will return the enum values in a sorted order, which may not necessarily be the
|
|
5475
|
-
* same order as which they were declared in.
|
|
5496
|
+
* same order as which they were declared in. (It is impossible to get the declaration order at
|
|
5497
|
+
* run-time.)
|
|
5476
5498
|
*
|
|
5477
5499
|
* This function will work properly for both number enums and string enums. (Reverse mappings are
|
|
5478
5500
|
* not created for string enums.)
|
|
@@ -17804,7 +17826,7 @@ export declare function useCardTemp(player: EntityPlayer, cardType: CardType): v
|
|
|
17804
17826
|
export declare function validateCustomEnum(transpiledEnumName: string, transpiledEnum: unknown): void;
|
|
17805
17827
|
|
|
17806
17828
|
/**
|
|
17807
|
-
* Helper function to validate if every value in
|
|
17829
|
+
* Helper function to validate if every value in a number enum is contiguous, starting at 0.
|
|
17808
17830
|
*
|
|
17809
17831
|
* This is useful to automate checking large enums for typos.
|
|
17810
17832
|
*/
|