isaacscript-common 85.0.2 → 86.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/classes/callbacks/PostCustomRevive.d.ts +2 -0
- package/dist/classes/callbacks/PostCustomRevive.d.ts.map +1 -1
- package/dist/classes/features/other/FlyingDetection.js +2 -2
- package/dist/classes/features/other/ItemPoolDetection.js +2 -2
- package/dist/classes/features/other/ModdedElementSets.js +11 -11
- package/dist/classes/features/other/PonyDetection.js +2 -2
- package/dist/classes/features/other/customStages/backdrop.js +17 -17
- package/dist/classes/features/other/customStages/shadows.js +11 -11
- package/dist/classes/features/other/extraConsoleCommands/commands.d.ts +2 -0
- package/dist/classes/features/other/extraConsoleCommands/commands.d.ts.map +1 -1
- package/dist/classes/features/other/extraConsoleCommands/commands.js +7 -2
- package/dist/classes/features/other/extraConsoleCommands/commands.lua +4 -0
- package/dist/classes/features/other/extraConsoleCommands/v.js +9 -9
- package/dist/core/cachedClasses.d.ts +1 -0
- package/dist/core/cachedClasses.d.ts.map +1 -1
- package/dist/core/constants.js +58 -58
- package/dist/enums/HealthType.d.ts +7 -7
- package/dist/enums/HealthType.d.ts.map +1 -1
- package/dist/features.js +1 -1
- package/dist/features.lua +2 -2
- package/dist/functions/array.d.ts +1 -1
- package/dist/functions/array.js +1 -1
- package/dist/functions/array.lua +1 -1
- package/dist/functions/bosses.js +4 -4
- package/dist/functions/charge.js +1 -1
- package/dist/functions/emptyRoom.js +6 -6
- package/dist/functions/enums.d.ts +26 -26
- package/dist/functions/enums.d.ts.map +1 -1
- package/dist/functions/enums.js +30 -30
- package/dist/functions/enums.lua +27 -27
- package/dist/functions/gridEntities.js +19 -19
- package/dist/functions/input.js +13 -13
- package/dist/functions/itemPool.js +12 -12
- package/dist/functions/logEntities.js +11 -11
- package/dist/functions/npcs.js +11 -11
- package/dist/functions/playerIndex.js +1 -1
- package/dist/functions/slots.js +8 -8
- package/dist/functions/stats.js +17 -17
- package/dist/functions/storyBosses.js +28 -28
- package/dist/functions/transformations.js +14 -14
- package/dist/index.rollup.d.ts +37 -37
- package/dist/interfaces/PlayerStats.js +1 -1
- package/dist/interfaces/PlayerStats.lua +2 -2
- package/dist/interfaces/private/AddCallbackParametersCustom.js +1 -1
- package/dist/interfaces/private/AddCallbackParametersCustom.lua +2 -2
- package/dist/isaacscript-common.lua +39 -35
- package/dist/maps/PHDPillConversionsMap.js +15 -15
- package/dist/maps/cardNameToTypeMap.js +201 -201
- package/dist/maps/characterNameToTypeMap.js +81 -81
- package/dist/maps/defaultPlayerStatMap.js +5 -5
- package/dist/maps/falsePHDPillConversionsMap.js +29 -29
- package/dist/maps/itemPoolTypeToItemPoolName.js +30 -30
- package/dist/maps/keyboardToStringMap.js +62 -62
- package/dist/maps/pillNameToEffectMap.js +79 -79
- package/dist/maps/roomNameToTypeMap.js +34 -34
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.js +4 -4
- package/dist/maps/transformationNameToPlayerFormMap.js +26 -26
- package/dist/objects/backdropTypeToRockAltType.js +59 -59
- package/dist/objects/batteryNames.js +4 -4
- package/dist/objects/bombNames.js +7 -7
- package/dist/objects/bossNamePNGFileNames.js +101 -101
- package/dist/objects/bossNames.js +101 -101
- package/dist/objects/bossPortraitPNGFileNames.js +101 -101
- package/dist/objects/cardDescriptions.js +97 -97
- package/dist/objects/cardNames.js +97 -97
- package/dist/objects/challengeBosses.js +45 -45
- package/dist/objects/challengeCharacters.js +45 -45
- package/dist/objects/challengeCollectibleTypes.js +77 -77
- package/dist/objects/challengeNames.js +45 -45
- package/dist/objects/challengeTrinketType.js +45 -45
- package/dist/objects/characterDamageMultipliers.js +41 -41
- package/dist/objects/characterNames.js +41 -41
- package/dist/objects/characterSpritePNGFileNames.js +41 -41
- package/dist/objects/characterStartingCollectibleTypes.js +3 -3
- package/dist/objects/chestNames.js +11 -11
- package/dist/objects/coinNames.js +7 -7
- package/dist/objects/coinSubTypeToValue.js +7 -7
- package/dist/objects/collectibleDescriptions.js +721 -721
- package/dist/objects/collectibleNames.js +721 -721
- package/dist/objects/colors.d.ts +1 -0
- package/dist/objects/colors.d.ts.map +1 -1
- package/dist/objects/directionNames.js +4 -4
- package/dist/objects/directionToDegrees.js +4 -4
- package/dist/objects/directionToMoveAction.js +4 -4
- package/dist/objects/directionToShootAction.js +4 -4
- package/dist/objects/directionToVector.d.ts +1 -0
- package/dist/objects/directionToVector.d.ts.map +1 -1
- package/dist/objects/directionToVector.js +4 -4
- package/dist/objects/doorSlotFlagToDoorSlot.js +7 -7
- package/dist/objects/doorSlotToDirection.js +8 -8
- package/dist/objects/doorSlotToDoorSlotFlag.d.ts +1 -0
- package/dist/objects/doorSlotToDoorSlotFlag.d.ts.map +1 -1
- package/dist/objects/doorSlotToDoorSlotFlag.js +8 -8
- package/dist/objects/gridEntityTypeToANM2Name.js +27 -27
- package/dist/objects/heartNames.js +12 -12
- package/dist/objects/kColors.d.ts +1 -0
- package/dist/objects/kColors.d.ts.map +1 -1
- package/dist/objects/keyNames.js +4 -4
- package/dist/objects/languageNames.js +6 -6
- package/dist/objects/oppositeDoorSlots.js +8 -8
- package/dist/objects/pillEffectClasses.js +49 -49
- package/dist/objects/pillEffectNames.js +49 -49
- package/dist/objects/pillEffectTypes.js +49 -49
- package/dist/objects/playerNamePNGFileNames.js +41 -41
- package/dist/objects/playerPortraitPNGFileNames.js +41 -41
- package/dist/objects/roomShapeLayoutSizes.js +11 -11
- package/dist/objects/roomShapeToBottomRightPosition.d.ts +1 -0
- package/dist/objects/roomShapeToBottomRightPosition.d.ts.map +1 -1
- package/dist/objects/roomShapeToBottomRightPosition.js +11 -11
- package/dist/objects/roomShapeToDoorSlotCoordinates.js +52 -52
- package/dist/objects/roomShapeToDoorSlots.js +24 -24
- package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.js +52 -52
- package/dist/objects/roomShapeToGridWidth.js +11 -11
- package/dist/objects/roomShapeToTopLeftPosition.d.ts +1 -0
- package/dist/objects/roomShapeToTopLeftPosition.d.ts.map +1 -1
- package/dist/objects/roomShapeToTopLeftPosition.js +11 -11
- package/dist/objects/roomShapeVolumes.js +11 -11
- package/dist/objects/roomTypeNames.js +28 -28
- package/dist/objects/roomTypeSpecialGotoPrefixes.js +28 -28
- package/dist/objects/sackNames.js +2 -2
- package/dist/objects/slotNames.js +17 -17
- package/dist/objects/stageIDNames.js +30 -30
- package/dist/objects/stageToMusic.js +57 -57
- package/dist/objects/stageToStageID.js +73 -73
- package/dist/objects/stageTypeSuffixes.js +5 -5
- package/dist/objects/transformationNames.js +13 -13
- package/dist/objects/trinketDescriptions.js +188 -188
- package/dist/objects/trinketNames.js +188 -188
- package/dist/objects/versusScreenBackgroundColors.d.ts +1 -0
- package/dist/objects/versusScreenBackgroundColors.d.ts.map +1 -1
- package/dist/objects/versusScreenBackgroundColors.js +30 -30
- package/dist/objects/versusScreenDirtSpotColors.d.ts +1 -0
- package/dist/objects/versusScreenDirtSpotColors.d.ts.map +1 -1
- package/dist/objects/versusScreenDirtSpotColors.js +30 -30
- package/dist/sets/LRoomShapesSet.js +3 -3
- package/dist/sets/bigRoomShapesSet.js +6 -6
- package/dist/sets/bossSets.js +208 -208
- package/dist/sets/charactersThatStartWithAnActiveItemSet.js +10 -10
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.js +1 -1
- package/dist/sets/charactersWithNoRedHeartsSet.js +7 -7
- package/dist/sets/charactersWithNoSoulHeartsSet.js +4 -4
- package/dist/sets/entitiesWithArmorSet.js +40 -40
- package/dist/sets/itemConfigCardTypesForCards.js +3 -3
- package/dist/sets/lostStyleCharactersSet.js +4 -4
- package/dist/sets/narrowRoomShapesSet.js +3 -3
- package/dist/sets/poopGridEntityXMLTypesSet.js +8 -8
- package/dist/sets/redHeartSubTypesSet.js +2 -2
- package/dist/sets/repentanceBossIDsSet.js +22 -22
- package/dist/sets/sinEntityTypesSet.js +6 -6
- package/dist/sets/singleUseActiveCollectibleTypesSet.js +7 -7
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types/PickingUpItem.js +2 -2
- package/package.json +1 -1
- package/src/classes/features/other/extraConsoleCommands/commands.ts +6 -1
- package/src/features.ts +2 -2
- package/src/functions/array.ts +1 -1
- package/src/functions/enums.ts +33 -33
- package/src/interfaces/PlayerStats.ts +2 -2
- package/src/interfaces/private/AddCallbackParametersCustom.ts +2 -2
|
@@ -113,30 +113,6 @@ export declare function getLowestEnumValue<T extends TranspiledEnum>(transpiledE
|
|
|
113
113
|
* @param exceptions Optional. An array of elements to skip over if selected.
|
|
114
114
|
*/
|
|
115
115
|
export declare function getRandomEnumValue<T extends TranspiledEnum>(transpiledEnum: T, seedOrRNG: Seed | RNG | undefined, exceptions?: ReadonlyArray<T[keyof T]>): T[keyof T];
|
|
116
|
-
/** Helper function to validate that a particular value exists inside of an enum. */
|
|
117
|
-
export declare function isEnumValue<T extends TranspiledEnum>(value: number | string | BitFlag | BitFlag128, transpiledEnum: T): value is T[keyof T];
|
|
118
|
-
/**
|
|
119
|
-
* Helper function to check every value of a custom enum for -1. Will throw an run-time error if any
|
|
120
|
-
* -1 values are found. This is helpful because many methods of the Isaac class return -1 if they
|
|
121
|
-
* fail.
|
|
122
|
-
*
|
|
123
|
-
* For example:
|
|
124
|
-
*
|
|
125
|
-
* ```ts
|
|
126
|
-
* enum EntityTypeCustom {
|
|
127
|
-
* FOO = Isaac.GetEntityTypeByName("Foo"),
|
|
128
|
-
* }
|
|
129
|
-
*
|
|
130
|
-
* validateCustomEnum("EntityTypeCustom", EntityTypeCustom);
|
|
131
|
-
* ```
|
|
132
|
-
*/
|
|
133
|
-
export declare function validateCustomEnum(transpiledEnumName: string, transpiledEnum: TranspiledEnum): void;
|
|
134
|
-
/**
|
|
135
|
-
* Helper function to validate if every value in a number enum is contiguous, starting at 0.
|
|
136
|
-
*
|
|
137
|
-
* This is useful to automate checking large enums for typos.
|
|
138
|
-
*/
|
|
139
|
-
export declare function validateEnumContiguous<T extends TranspiledEnum>(transpiledEnumName: string, transpiledEnum: T): void;
|
|
140
116
|
/**
|
|
141
117
|
* Helper function to validate that an interface contains all of the keys of an enum. You must
|
|
142
118
|
* specify both generic parameters in order for this to work properly (i.e. the interface and then
|
|
@@ -157,12 +133,36 @@ export declare function validateEnumContiguous<T extends TranspiledEnum>(transpi
|
|
|
157
133
|
* [MyEnum.Value3]: string;
|
|
158
134
|
* }
|
|
159
135
|
*
|
|
160
|
-
*
|
|
136
|
+
* interfaceSatisfiesEnum<MyEnumToType, MyEnum>();
|
|
161
137
|
* ```
|
|
162
138
|
*
|
|
163
139
|
* This function is only meant to be used with interfaces (i.e. types that will not exist at
|
|
164
140
|
* run-time). If you are generating an object that will contain all of the keys of an enum, use the
|
|
165
141
|
* `satisfies` operator with the `Record` type instead.
|
|
166
142
|
*/
|
|
167
|
-
export declare function
|
|
143
|
+
export declare function interfaceSatisfiesEnum<T extends Record<Enum, unknown>, Enum extends string | number>(): void;
|
|
144
|
+
/** Helper function to validate that a particular value exists inside of an enum. */
|
|
145
|
+
export declare function isEnumValue<T extends TranspiledEnum>(value: number | string | BitFlag | BitFlag128, transpiledEnum: T): value is T[keyof T];
|
|
146
|
+
/**
|
|
147
|
+
* Helper function to check every value of a custom enum for -1. Will throw an run-time error if any
|
|
148
|
+
* -1 values are found. This is helpful because many methods of the Isaac class return -1 if they
|
|
149
|
+
* fail.
|
|
150
|
+
*
|
|
151
|
+
* For example:
|
|
152
|
+
*
|
|
153
|
+
* ```ts
|
|
154
|
+
* enum EntityTypeCustom {
|
|
155
|
+
* FOO = Isaac.GetEntityTypeByName("Foo"),
|
|
156
|
+
* }
|
|
157
|
+
*
|
|
158
|
+
* validateCustomEnum("EntityTypeCustom", EntityTypeCustom);
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
export declare function validateCustomEnum(transpiledEnumName: string, transpiledEnum: TranspiledEnum): void;
|
|
162
|
+
/**
|
|
163
|
+
* Helper function to validate if every value in a number enum is contiguous, starting at 0.
|
|
164
|
+
*
|
|
165
|
+
* This is useful to automate checking large enums for typos.
|
|
166
|
+
*/
|
|
167
|
+
export declare function validateEnumContiguous<T extends TranspiledEnum>(transpiledEnumName: string, transpiledEnum: T): void;
|
|
168
168
|
//# sourceMappingURL=enums.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/functions/enums.ts"],"names":[],"mappings":";;;;;AAMA;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CACjC,MAAM,EACN,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,cAAc,EACrD,cAAc,EAAE,CAAC,GAChB,aAAa,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAiBjD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,cAAc,EAAE,cAAc,GAAG,SAAS,MAAM,EAAE,CAG7E;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,cAAc,EAAE,cAAc,GAAG,GAAG,CAGjE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAC1B,cAAc,EAAE,cAAc,GAC7B,SAAS,MAAM,EAAE,CAanB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,cAAc,EACpD,cAAc,EAAE,CAAC,GAChB,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAG3B;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,cAAc,EAC1D,cAAc,EAAE,CAAC,GAChB,CAAC,CAAC,MAAM,CAAC,CAAC,CAUZ;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,cAAc,EACzD,cAAc,EAAE,CAAC,GAChB,CAAC,CAAC,MAAM,CAAC,CAAC,CAUZ;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,cAAc,EACzD,cAAc,EAAE,CAAC,EACjB,SAAS,EAAE,IAAI,GAAG,GAAG,GAAG,SAAS,EACjC,UAAU,GAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAM,GACzC,CAAC,CAAC,MAAM,CAAC,CAAC,CAGZ;AAED,oFAAoF;AACpF,wBAAgB,WAAW,CAAC,CAAC,SAAS,cAAc,EAClD,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,EAC7C,cAAc,EAAE,CAAC,GAChB,KAAK,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAGrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,kBAAkB,EAAE,MAAM,EAC1B,cAAc,EAAE,cAAc,GAC7B,IAAI,CAQN;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,cAAc,EAC7D,kBAAkB,EAAE,MAAM,EAC1B,cAAc,EAAE,CAAC,GAChB,IAAI,CAsBN
|
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/functions/enums.ts"],"names":[],"mappings":";;;;;AAMA;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CACjC,MAAM,EACN,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,cAAc,EACrD,cAAc,EAAE,CAAC,GAChB,aAAa,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAiBjD;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,WAAW,CAAC,cAAc,EAAE,cAAc,GAAG,SAAS,MAAM,EAAE,CAG7E;AAED,sEAAsE;AACtE,wBAAgB,aAAa,CAAC,cAAc,EAAE,cAAc,GAAG,GAAG,CAGjE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAC1B,cAAc,EAAE,cAAc,GAC7B,SAAS,MAAM,EAAE,CAanB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,cAAc,EACpD,cAAc,EAAE,CAAC,GAChB,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAG3B;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,cAAc,EAC1D,cAAc,EAAE,CAAC,GAChB,CAAC,CAAC,MAAM,CAAC,CAAC,CAUZ;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,cAAc,EACzD,cAAc,EAAE,CAAC,GAChB,CAAC,CAAC,MAAM,CAAC,CAAC,CAUZ;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,cAAc,EACzD,cAAc,EAAE,CAAC,EACjB,SAAS,EAAE,IAAI,GAAG,GAAG,GAAG,SAAS,EACjC,UAAU,GAAE,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAM,GACzC,CAAC,CAAC,MAAM,CAAC,CAAC,CAGZ;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,sBAAsB,CAEpC,CAAC,SAAS,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,EAC/B,IAAI,SAAS,MAAM,GAAG,MAAM,KACzB,IAAI,CAAG;AAEZ,oFAAoF;AACpF,wBAAgB,WAAW,CAAC,CAAC,SAAS,cAAc,EAClD,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,EAC7C,cAAc,EAAE,CAAC,GAChB,KAAK,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAGrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,kBAAkB,CAChC,kBAAkB,EAAE,MAAM,EAC1B,cAAc,EAAE,cAAc,GAC7B,IAAI,CAQN;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,cAAc,EAC7D,kBAAkB,EAAE,MAAM,EAC1B,cAAc,EAAE,CAAC,GAChB,IAAI,CAsBN"}
|
package/dist/functions/enums.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.validateEnumContiguous = exports.validateCustomEnum = exports.isEnumValue = exports.interfaceSatisfiesEnum = exports.getRandomEnumValue = exports.getLowestEnumValue = exports.getHighestEnumValue = exports.getEnumValues = exports.getEnumNames = exports.getEnumLength = exports.getEnumKeys = exports.getEnumEntries = void 0;
|
|
4
4
|
const ReadonlySet_1 = require("../types/ReadonlySet");
|
|
5
5
|
const array_1 = require("./array");
|
|
6
6
|
const sort_1 = require("./sort");
|
|
@@ -162,6 +162,35 @@ function getRandomEnumValue(transpiledEnum, seedOrRNG, exceptions = []) {
|
|
|
162
162
|
return (0, array_1.getRandomArrayElement)(enumValues, seedOrRNG, exceptions);
|
|
163
163
|
}
|
|
164
164
|
exports.getRandomEnumValue = getRandomEnumValue;
|
|
165
|
+
/**
|
|
166
|
+
* Helper function to validate that an interface contains all of the keys of an enum. You must
|
|
167
|
+
* specify both generic parameters in order for this to work properly (i.e. the interface and then
|
|
168
|
+
* the enum).
|
|
169
|
+
*
|
|
170
|
+
* For example:
|
|
171
|
+
*
|
|
172
|
+
* ```ts
|
|
173
|
+
* enum MyEnum {
|
|
174
|
+
* Value1,
|
|
175
|
+
* Value2,
|
|
176
|
+
* Value3,
|
|
177
|
+
* }
|
|
178
|
+
*
|
|
179
|
+
* interface MyEnumToType {
|
|
180
|
+
* [MyEnum.Value1]: boolean;
|
|
181
|
+
* [MyEnum.Value2]: number;
|
|
182
|
+
* [MyEnum.Value3]: string;
|
|
183
|
+
* }
|
|
184
|
+
*
|
|
185
|
+
* interfaceSatisfiesEnum<MyEnumToType, MyEnum>();
|
|
186
|
+
* ```
|
|
187
|
+
*
|
|
188
|
+
* This function is only meant to be used with interfaces (i.e. types that will not exist at
|
|
189
|
+
* run-time). If you are generating an object that will contain all of the keys of an enum, use the
|
|
190
|
+
* `satisfies` operator with the `Record` type instead.
|
|
191
|
+
*/
|
|
192
|
+
function interfaceSatisfiesEnum() { } // eslint-disable-line @typescript-eslint/no-empty-function
|
|
193
|
+
exports.interfaceSatisfiesEnum = interfaceSatisfiesEnum;
|
|
165
194
|
/** Helper function to validate that a particular value exists inside of an enum. */
|
|
166
195
|
function isEnumValue(value, transpiledEnum) {
|
|
167
196
|
const enumValues = getEnumValues(transpiledEnum);
|
|
@@ -211,32 +240,3 @@ function validateEnumContiguous(transpiledEnumName, transpiledEnum) {
|
|
|
211
240
|
}
|
|
212
241
|
}
|
|
213
242
|
exports.validateEnumContiguous = validateEnumContiguous;
|
|
214
|
-
/**
|
|
215
|
-
* Helper function to validate that an interface contains all of the keys of an enum. You must
|
|
216
|
-
* specify both generic parameters in order for this to work properly (i.e. the interface and then
|
|
217
|
-
* the enum).
|
|
218
|
-
*
|
|
219
|
-
* For example:
|
|
220
|
-
*
|
|
221
|
-
* ```ts
|
|
222
|
-
* enum MyEnum {
|
|
223
|
-
* Value1,
|
|
224
|
-
* Value2,
|
|
225
|
-
* Value3,
|
|
226
|
-
* }
|
|
227
|
-
*
|
|
228
|
-
* interface MyEnumToType {
|
|
229
|
-
* [MyEnum.Value1]: boolean;
|
|
230
|
-
* [MyEnum.Value2]: number;
|
|
231
|
-
* [MyEnum.Value3]: string;
|
|
232
|
-
* }
|
|
233
|
-
*
|
|
234
|
-
* validateInterfaceMatchesEnum<MyEnumToType, MyEnum>();
|
|
235
|
-
* ```
|
|
236
|
-
*
|
|
237
|
-
* This function is only meant to be used with interfaces (i.e. types that will not exist at
|
|
238
|
-
* run-time). If you are generating an object that will contain all of the keys of an enum, use the
|
|
239
|
-
* `satisfies` operator with the `Record` type instead.
|
|
240
|
-
*/
|
|
241
|
-
function validateInterfaceMatchesEnum() { } // eslint-disable-line @typescript-eslint/no-empty-function
|
|
242
|
-
exports.validateInterfaceMatchesEnum = validateInterfaceMatchesEnum;
|
package/dist/functions/enums.lua
CHANGED
|
@@ -188,6 +188,33 @@ function ____exports.getRandomEnumValue(self, transpiledEnum, seedOrRNG, excepti
|
|
|
188
188
|
local enumValues = ____exports.getEnumValues(nil, transpiledEnum)
|
|
189
189
|
return getRandomArrayElement(nil, enumValues, seedOrRNG, exceptions)
|
|
190
190
|
end
|
|
191
|
+
--- Helper function to validate that an interface contains all of the keys of an enum. You must
|
|
192
|
+
-- specify both generic parameters in order for this to work properly (i.e. the interface and then
|
|
193
|
+
-- the enum).
|
|
194
|
+
--
|
|
195
|
+
-- For example:
|
|
196
|
+
--
|
|
197
|
+
-- ```ts
|
|
198
|
+
-- enum MyEnum {
|
|
199
|
+
-- Value1,
|
|
200
|
+
-- Value2,
|
|
201
|
+
-- Value3,
|
|
202
|
+
-- }
|
|
203
|
+
--
|
|
204
|
+
-- interface MyEnumToType {
|
|
205
|
+
-- [MyEnum.Value1]: boolean;
|
|
206
|
+
-- [MyEnum.Value2]: number;
|
|
207
|
+
-- [MyEnum.Value3]: string;
|
|
208
|
+
-- }
|
|
209
|
+
--
|
|
210
|
+
-- interfaceSatisfiesEnum<MyEnumToType, MyEnum>();
|
|
211
|
+
-- ```
|
|
212
|
+
--
|
|
213
|
+
-- This function is only meant to be used with interfaces (i.e. types that will not exist at
|
|
214
|
+
-- run-time). If you are generating an object that will contain all of the keys of an enum, use the
|
|
215
|
+
-- `satisfies` operator with the `Record` type instead.
|
|
216
|
+
function ____exports.interfaceSatisfiesEnum(self)
|
|
217
|
+
end
|
|
191
218
|
--- Helper function to validate that a particular value exists inside of an enum.
|
|
192
219
|
function ____exports.isEnumValue(self, value, transpiledEnum)
|
|
193
220
|
local enumValues = ____exports.getEnumValues(nil, transpiledEnum)
|
|
@@ -232,31 +259,4 @@ function ____exports.validateEnumContiguous(self, transpiledEnumName, transpiled
|
|
|
232
259
|
end
|
|
233
260
|
end
|
|
234
261
|
end
|
|
235
|
-
--- Helper function to validate that an interface contains all of the keys of an enum. You must
|
|
236
|
-
-- specify both generic parameters in order for this to work properly (i.e. the interface and then
|
|
237
|
-
-- the enum).
|
|
238
|
-
--
|
|
239
|
-
-- For example:
|
|
240
|
-
--
|
|
241
|
-
-- ```ts
|
|
242
|
-
-- enum MyEnum {
|
|
243
|
-
-- Value1,
|
|
244
|
-
-- Value2,
|
|
245
|
-
-- Value3,
|
|
246
|
-
-- }
|
|
247
|
-
--
|
|
248
|
-
-- interface MyEnumToType {
|
|
249
|
-
-- [MyEnum.Value1]: boolean;
|
|
250
|
-
-- [MyEnum.Value2]: number;
|
|
251
|
-
-- [MyEnum.Value3]: string;
|
|
252
|
-
-- }
|
|
253
|
-
--
|
|
254
|
-
-- validateInterfaceMatchesEnum<MyEnumToType, MyEnum>();
|
|
255
|
-
-- ```
|
|
256
|
-
--
|
|
257
|
-
-- This function is only meant to be used with interfaces (i.e. types that will not exist at
|
|
258
|
-
-- run-time). If you are generating an object that will contain all of the keys of an enum, use the
|
|
259
|
-
-- `satisfies` operator with the `Record` type instead.
|
|
260
|
-
function ____exports.validateInterfaceMatchesEnum(self)
|
|
261
|
-
end
|
|
262
262
|
return ____exports
|
|
@@ -23,23 +23,23 @@ const vector_1 = require("./vector");
|
|
|
23
23
|
* game (which is not the case for e.g. poops).
|
|
24
24
|
*/
|
|
25
25
|
const GRID_ENTITY_TYPES_THAT_KEEP_GRID_ENTITY_XML_VARIANT = new ReadonlySet_1.ReadonlySet([
|
|
26
|
-
isaac_typescript_definitions_1.GridEntityType.SPIKES_ON_OFF,
|
|
27
|
-
isaac_typescript_definitions_1.GridEntityType.PRESSURE_PLATE,
|
|
26
|
+
isaac_typescript_definitions_1.GridEntityType.SPIKES_ON_OFF, // 9
|
|
27
|
+
isaac_typescript_definitions_1.GridEntityType.PRESSURE_PLATE, // 20
|
|
28
28
|
isaac_typescript_definitions_1.GridEntityType.TELEPORTER, // 23
|
|
29
29
|
]);
|
|
30
30
|
const BREAKABLE_GRID_ENTITY_TYPES_BY_EXPLOSIONS = new ReadonlySet_1.ReadonlySet([
|
|
31
|
-
isaac_typescript_definitions_1.GridEntityType.ROCK,
|
|
32
|
-
isaac_typescript_definitions_1.GridEntityType.ROCK_TINTED,
|
|
33
|
-
isaac_typescript_definitions_1.GridEntityType.ROCK_BOMB,
|
|
34
|
-
isaac_typescript_definitions_1.GridEntityType.ROCK_ALT,
|
|
35
|
-
isaac_typescript_definitions_1.GridEntityType.SPIDER_WEB,
|
|
36
|
-
isaac_typescript_definitions_1.GridEntityType.TNT,
|
|
31
|
+
isaac_typescript_definitions_1.GridEntityType.ROCK, // 2
|
|
32
|
+
isaac_typescript_definitions_1.GridEntityType.ROCK_TINTED, // 4
|
|
33
|
+
isaac_typescript_definitions_1.GridEntityType.ROCK_BOMB, // 5
|
|
34
|
+
isaac_typescript_definitions_1.GridEntityType.ROCK_ALT, // 6
|
|
35
|
+
isaac_typescript_definitions_1.GridEntityType.SPIDER_WEB, // 10
|
|
36
|
+
isaac_typescript_definitions_1.GridEntityType.TNT, // 12
|
|
37
37
|
// GridEntityType.FIREPLACE (13) does not count since it is turned into a non-grid entity upon
|
|
38
38
|
// spawning.
|
|
39
|
-
isaac_typescript_definitions_1.GridEntityType.POOP,
|
|
40
|
-
isaac_typescript_definitions_1.GridEntityType.ROCK_SUPER_SPECIAL,
|
|
41
|
-
isaac_typescript_definitions_1.GridEntityType.ROCK_SPIKED,
|
|
42
|
-
isaac_typescript_definitions_1.GridEntityType.ROCK_ALT_2,
|
|
39
|
+
isaac_typescript_definitions_1.GridEntityType.POOP, // 14
|
|
40
|
+
isaac_typescript_definitions_1.GridEntityType.ROCK_SUPER_SPECIAL, // 22
|
|
41
|
+
isaac_typescript_definitions_1.GridEntityType.ROCK_SPIKED, // 25
|
|
42
|
+
isaac_typescript_definitions_1.GridEntityType.ROCK_ALT_2, // 26
|
|
43
43
|
isaac_typescript_definitions_1.GridEntityType.ROCK_GOLD, // 27
|
|
44
44
|
]);
|
|
45
45
|
const BREAKABLE_GRID_ENTITY_TYPES_VARIANTS_BY_EXPLOSIONS = new ReadonlySet_1.ReadonlySet([`${isaac_typescript_definitions_1.GridEntityType.STATUE}.${isaac_typescript_definitions_1.StatueVariant.ANGEL}`]);
|
|
@@ -551,13 +551,13 @@ function getSurroundingGridIndexes(gridIndex) {
|
|
|
551
551
|
const room = cachedClasses_1.game.GetRoom();
|
|
552
552
|
const gridWidth = room.GetGridWidth();
|
|
553
553
|
return [
|
|
554
|
-
gridIndex - gridWidth - 1,
|
|
555
|
-
gridIndex - gridWidth,
|
|
556
|
-
gridIndex - gridWidth + 1,
|
|
557
|
-
gridIndex - 1,
|
|
558
|
-
gridIndex + 1,
|
|
559
|
-
gridIndex + gridWidth - 1,
|
|
560
|
-
gridIndex + gridWidth,
|
|
554
|
+
gridIndex - gridWidth - 1, // Top-left
|
|
555
|
+
gridIndex - gridWidth, // Top
|
|
556
|
+
gridIndex - gridWidth + 1, // Top-right
|
|
557
|
+
gridIndex - 1, // Left
|
|
558
|
+
gridIndex + 1, // Right
|
|
559
|
+
gridIndex + gridWidth - 1, // Bottom-left
|
|
560
|
+
gridIndex + gridWidth, // Bottom
|
|
561
561
|
gridIndex + gridWidth + 1, // Bottom-right
|
|
562
562
|
];
|
|
563
563
|
}
|
package/dist/functions/input.js
CHANGED
|
@@ -7,26 +7,26 @@ const keyboardToStringMap_1 = require("../maps/keyboardToStringMap");
|
|
|
7
7
|
const ReadonlySet_1 = require("../types/ReadonlySet");
|
|
8
8
|
const string_1 = require("./string");
|
|
9
9
|
exports.MODIFIER_KEYS = [
|
|
10
|
-
isaac_typescript_definitions_1.Keyboard.LEFT_SHIFT,
|
|
11
|
-
isaac_typescript_definitions_1.Keyboard.LEFT_CONTROL,
|
|
12
|
-
isaac_typescript_definitions_1.Keyboard.LEFT_ALT,
|
|
13
|
-
isaac_typescript_definitions_1.Keyboard.LEFT_SUPER,
|
|
14
|
-
isaac_typescript_definitions_1.Keyboard.RIGHT_SHIFT,
|
|
15
|
-
isaac_typescript_definitions_1.Keyboard.RIGHT_CONTROL,
|
|
16
|
-
isaac_typescript_definitions_1.Keyboard.RIGHT_ALT,
|
|
10
|
+
isaac_typescript_definitions_1.Keyboard.LEFT_SHIFT, // 340
|
|
11
|
+
isaac_typescript_definitions_1.Keyboard.LEFT_CONTROL, // 341
|
|
12
|
+
isaac_typescript_definitions_1.Keyboard.LEFT_ALT, // 342
|
|
13
|
+
isaac_typescript_definitions_1.Keyboard.LEFT_SUPER, // 343
|
|
14
|
+
isaac_typescript_definitions_1.Keyboard.RIGHT_SHIFT, // 344
|
|
15
|
+
isaac_typescript_definitions_1.Keyboard.RIGHT_CONTROL, // 345
|
|
16
|
+
isaac_typescript_definitions_1.Keyboard.RIGHT_ALT, // 346
|
|
17
17
|
isaac_typescript_definitions_1.Keyboard.RIGHT_SUPER, // 347
|
|
18
18
|
];
|
|
19
19
|
exports.MOVEMENT_BUTTON_ACTIONS = [
|
|
20
|
-
isaac_typescript_definitions_1.ButtonAction.LEFT,
|
|
21
|
-
isaac_typescript_definitions_1.ButtonAction.RIGHT,
|
|
22
|
-
isaac_typescript_definitions_1.ButtonAction.UP,
|
|
20
|
+
isaac_typescript_definitions_1.ButtonAction.LEFT, // 0
|
|
21
|
+
isaac_typescript_definitions_1.ButtonAction.RIGHT, // 1
|
|
22
|
+
isaac_typescript_definitions_1.ButtonAction.UP, // 2
|
|
23
23
|
isaac_typescript_definitions_1.ButtonAction.DOWN, // 3
|
|
24
24
|
];
|
|
25
25
|
exports.MOVEMENT_BUTTON_ACTIONS_SET = new ReadonlySet_1.ReadonlySet(exports.MOVEMENT_BUTTON_ACTIONS);
|
|
26
26
|
exports.SHOOTING_BUTTON_ACTIONS = [
|
|
27
|
-
isaac_typescript_definitions_1.ButtonAction.SHOOT_LEFT,
|
|
28
|
-
isaac_typescript_definitions_1.ButtonAction.SHOOT_RIGHT,
|
|
29
|
-
isaac_typescript_definitions_1.ButtonAction.SHOOT_UP,
|
|
27
|
+
isaac_typescript_definitions_1.ButtonAction.SHOOT_LEFT, // 4
|
|
28
|
+
isaac_typescript_definitions_1.ButtonAction.SHOOT_RIGHT, // 5
|
|
29
|
+
isaac_typescript_definitions_1.ButtonAction.SHOOT_UP, // 6
|
|
30
30
|
isaac_typescript_definitions_1.ButtonAction.SHOOT_DOWN, // 7
|
|
31
31
|
];
|
|
32
32
|
exports.SHOOTING_BUTTON_ACTIONS_SET = new ReadonlySet_1.ReadonlySet(exports.SHOOTING_BUTTON_ACTIONS);
|
|
@@ -8,21 +8,21 @@ const itemPoolTypeToItemPoolName_1 = require("../maps/itemPoolTypeToItemPoolName
|
|
|
8
8
|
const itemPoolTypeToCollectibleTypesSet_1 = require("../objects/itemPoolTypeToCollectibleTypesSet");
|
|
9
9
|
const array_1 = require("./array");
|
|
10
10
|
const NORMAL_MODE_ONLY_ITEM_POOL_TYPES = [
|
|
11
|
-
isaac_typescript_definitions_1.ItemPoolType.TREASURE,
|
|
12
|
-
isaac_typescript_definitions_1.ItemPoolType.BOSS,
|
|
13
|
-
isaac_typescript_definitions_1.ItemPoolType.SHOP,
|
|
14
|
-
isaac_typescript_definitions_1.ItemPoolType.DEVIL,
|
|
15
|
-
isaac_typescript_definitions_1.ItemPoolType.ANGEL,
|
|
16
|
-
isaac_typescript_definitions_1.ItemPoolType.CURSE,
|
|
11
|
+
isaac_typescript_definitions_1.ItemPoolType.TREASURE, // 0
|
|
12
|
+
isaac_typescript_definitions_1.ItemPoolType.BOSS, // 2
|
|
13
|
+
isaac_typescript_definitions_1.ItemPoolType.SHOP, // 1
|
|
14
|
+
isaac_typescript_definitions_1.ItemPoolType.DEVIL, // 3
|
|
15
|
+
isaac_typescript_definitions_1.ItemPoolType.ANGEL, // 4
|
|
16
|
+
isaac_typescript_definitions_1.ItemPoolType.CURSE, // 12
|
|
17
17
|
isaac_typescript_definitions_1.ItemPoolType.SECRET, // 5
|
|
18
18
|
];
|
|
19
19
|
const GREED_MODE_ONLY_ITEM_POOL_TYPES = [
|
|
20
|
-
isaac_typescript_definitions_1.ItemPoolType.GREED_TREASURE,
|
|
21
|
-
isaac_typescript_definitions_1.ItemPoolType.GREED_BOSS,
|
|
22
|
-
isaac_typescript_definitions_1.ItemPoolType.GREED_SHOP,
|
|
23
|
-
isaac_typescript_definitions_1.ItemPoolType.GREED_DEVIL,
|
|
24
|
-
isaac_typescript_definitions_1.ItemPoolType.GREED_ANGEL,
|
|
25
|
-
isaac_typescript_definitions_1.ItemPoolType.GREED_CURSE,
|
|
20
|
+
isaac_typescript_definitions_1.ItemPoolType.GREED_TREASURE, // 16
|
|
21
|
+
isaac_typescript_definitions_1.ItemPoolType.GREED_BOSS, // 17
|
|
22
|
+
isaac_typescript_definitions_1.ItemPoolType.GREED_SHOP, // 18
|
|
23
|
+
isaac_typescript_definitions_1.ItemPoolType.GREED_DEVIL, // 19
|
|
24
|
+
isaac_typescript_definitions_1.ItemPoolType.GREED_ANGEL, // 20
|
|
25
|
+
isaac_typescript_definitions_1.ItemPoolType.GREED_CURSE, // 21
|
|
26
26
|
isaac_typescript_definitions_1.ItemPoolType.GREED_SECRET, // 22
|
|
27
27
|
];
|
|
28
28
|
const FAKE_ITEM_POOL_TYPES = [isaac_typescript_definitions_1.ItemPoolType.SHELL_GAME];
|
|
@@ -7,17 +7,17 @@ const entities_1 = require("./entities");
|
|
|
7
7
|
const gridEntities_1 = require("./gridEntities");
|
|
8
8
|
const log_1 = require("./log");
|
|
9
9
|
const IGNORE_EFFECT_VARIANTS = new ReadonlySet_1.ReadonlySet([
|
|
10
|
-
isaac_typescript_definitions_1.EffectVariant.BLOOD_EXPLOSION,
|
|
11
|
-
isaac_typescript_definitions_1.EffectVariant.BLOOD_PARTICLE,
|
|
12
|
-
isaac_typescript_definitions_1.EffectVariant.TINY_BUG,
|
|
13
|
-
isaac_typescript_definitions_1.EffectVariant.TINY_FLY,
|
|
14
|
-
isaac_typescript_definitions_1.EffectVariant.WATER_DROPLET,
|
|
15
|
-
isaac_typescript_definitions_1.EffectVariant.WORM,
|
|
16
|
-
isaac_typescript_definitions_1.EffectVariant.WALL_BUG,
|
|
17
|
-
isaac_typescript_definitions_1.EffectVariant.FALLING_EMBER,
|
|
18
|
-
isaac_typescript_definitions_1.EffectVariant.LIGHT,
|
|
19
|
-
isaac_typescript_definitions_1.EffectVariant.MIST,
|
|
20
|
-
isaac_typescript_definitions_1.EffectVariant.BACKDROP_DECORATION,
|
|
10
|
+
isaac_typescript_definitions_1.EffectVariant.BLOOD_EXPLOSION, // 2
|
|
11
|
+
isaac_typescript_definitions_1.EffectVariant.BLOOD_PARTICLE, // 5
|
|
12
|
+
isaac_typescript_definitions_1.EffectVariant.TINY_BUG, // 21
|
|
13
|
+
isaac_typescript_definitions_1.EffectVariant.TINY_FLY, // 33
|
|
14
|
+
isaac_typescript_definitions_1.EffectVariant.WATER_DROPLET, // 41
|
|
15
|
+
isaac_typescript_definitions_1.EffectVariant.WORM, // 63
|
|
16
|
+
isaac_typescript_definitions_1.EffectVariant.WALL_BUG, // 68
|
|
17
|
+
isaac_typescript_definitions_1.EffectVariant.FALLING_EMBER, // 87
|
|
18
|
+
isaac_typescript_definitions_1.EffectVariant.LIGHT, // 121
|
|
19
|
+
isaac_typescript_definitions_1.EffectVariant.MIST, // 138
|
|
20
|
+
isaac_typescript_definitions_1.EffectVariant.BACKDROP_DECORATION, // 140
|
|
21
21
|
isaac_typescript_definitions_1.EffectVariant.TADPOLE, // 158
|
|
22
22
|
]);
|
|
23
23
|
/** Helper function for printing out every entity (or filtered entity) in the current room. */
|
package/dist/functions/npcs.js
CHANGED
|
@@ -10,16 +10,16 @@ const entitiesSpecific_1 = require("./entitiesSpecific");
|
|
|
10
10
|
* doors open.
|
|
11
11
|
*/
|
|
12
12
|
const NON_ALIVE_NPCS_TYPE_VARIANT = new ReadonlySet_1.ReadonlySet([
|
|
13
|
-
`${isaac_typescript_definitions_1.EntityType.VIS}.${isaac_typescript_definitions_1.VisVariant.CHUBBER_PROJECTILE}`,
|
|
14
|
-
`${isaac_typescript_definitions_1.EntityType.DEATH}.${isaac_typescript_definitions_1.DeathVariant.DEATH_SCYTHE}`,
|
|
15
|
-
`${isaac_typescript_definitions_1.EntityType.PEEP}.${isaac_typescript_definitions_1.PeepVariant.PEEP_EYE}`,
|
|
16
|
-
`${isaac_typescript_definitions_1.EntityType.PEEP}.${isaac_typescript_definitions_1.PeepVariant.BLOAT_EYE}`,
|
|
17
|
-
`${isaac_typescript_definitions_1.EntityType.BEGOTTEN}.${isaac_typescript_definitions_1.BegottenVariant.BEGOTTEN_CHAIN}`,
|
|
18
|
-
`${isaac_typescript_definitions_1.EntityType.MAMA_GURDY}.${isaac_typescript_definitions_1.MamaGurdyVariant.LEFT_HAND}`,
|
|
19
|
-
`${isaac_typescript_definitions_1.EntityType.MAMA_GURDY}.${isaac_typescript_definitions_1.MamaGurdyVariant.RIGHT_HAND}`,
|
|
20
|
-
`${isaac_typescript_definitions_1.EntityType.BIG_HORN}.${isaac_typescript_definitions_1.BigHornVariant.SMALL_HOLE}`,
|
|
21
|
-
`${isaac_typescript_definitions_1.EntityType.BIG_HORN}.${isaac_typescript_definitions_1.BigHornVariant.BIG_HOLE}`,
|
|
22
|
-
`${isaac_typescript_definitions_1.EntityType.DARK_ESAU}.${isaac_typescript_definitions_1.DarkEsauVariant.DARK_ESAU}`,
|
|
13
|
+
`${isaac_typescript_definitions_1.EntityType.VIS}.${isaac_typescript_definitions_1.VisVariant.CHUBBER_PROJECTILE}`, // 39.22
|
|
14
|
+
`${isaac_typescript_definitions_1.EntityType.DEATH}.${isaac_typescript_definitions_1.DeathVariant.DEATH_SCYTHE}`, // 66.10
|
|
15
|
+
`${isaac_typescript_definitions_1.EntityType.PEEP}.${isaac_typescript_definitions_1.PeepVariant.PEEP_EYE}`, // 68.10
|
|
16
|
+
`${isaac_typescript_definitions_1.EntityType.PEEP}.${isaac_typescript_definitions_1.PeepVariant.BLOAT_EYE}`, // 68.11
|
|
17
|
+
`${isaac_typescript_definitions_1.EntityType.BEGOTTEN}.${isaac_typescript_definitions_1.BegottenVariant.BEGOTTEN_CHAIN}`, // 251.10
|
|
18
|
+
`${isaac_typescript_definitions_1.EntityType.MAMA_GURDY}.${isaac_typescript_definitions_1.MamaGurdyVariant.LEFT_HAND}`, // 266.1
|
|
19
|
+
`${isaac_typescript_definitions_1.EntityType.MAMA_GURDY}.${isaac_typescript_definitions_1.MamaGurdyVariant.RIGHT_HAND}`, // 266.2
|
|
20
|
+
`${isaac_typescript_definitions_1.EntityType.BIG_HORN}.${isaac_typescript_definitions_1.BigHornVariant.SMALL_HOLE}`, // 411.1
|
|
21
|
+
`${isaac_typescript_definitions_1.EntityType.BIG_HORN}.${isaac_typescript_definitions_1.BigHornVariant.BIG_HOLE}`, // 411.2
|
|
22
|
+
`${isaac_typescript_definitions_1.EntityType.DARK_ESAU}.${isaac_typescript_definitions_1.DarkEsauVariant.DARK_ESAU}`, // 866.0
|
|
23
23
|
`${isaac_typescript_definitions_1.EntityType.DARK_ESAU}.${isaac_typescript_definitions_1.DarkEsauVariant.PIT}`, // 866.1
|
|
24
24
|
]);
|
|
25
25
|
/**
|
|
@@ -27,7 +27,7 @@ const NON_ALIVE_NPCS_TYPE_VARIANT = new ReadonlySet_1.ReadonlySet([
|
|
|
27
27
|
* doors open.
|
|
28
28
|
*/
|
|
29
29
|
const NON_ALIVE_NPCS_TYPE_VARIANT_SUB_TYPE = new ReadonlySet_1.ReadonlySet([
|
|
30
|
-
`${isaac_typescript_definitions_1.EntityType.CHARGER}.${isaac_typescript_definitions_1.ChargerVariant.CHARGER}.${isaac_typescript_definitions_1.ChargerSubType.MY_SHADOW}`,
|
|
30
|
+
`${isaac_typescript_definitions_1.EntityType.CHARGER}.${isaac_typescript_definitions_1.ChargerVariant.CHARGER}.${isaac_typescript_definitions_1.ChargerSubType.MY_SHADOW}`, // 23.0.1
|
|
31
31
|
`${isaac_typescript_definitions_1.EntityType.MOTHER}.${isaac_typescript_definitions_1.MotherVariant.MOTHER_1}.${isaac_typescript_definitions_1.MotherSubType.PHASE_2}`, // 912
|
|
32
32
|
]);
|
|
33
33
|
/**
|
|
@@ -6,7 +6,7 @@ const cachedClasses_1 = require("../core/cachedClasses");
|
|
|
6
6
|
const ReadonlySet_1 = require("../types/ReadonlySet");
|
|
7
7
|
const DEFAULT_COLLECTIBLE_TYPE = isaac_typescript_definitions_1.CollectibleType.SAD_ONION;
|
|
8
8
|
const EXCLUDED_CHARACTERS = new ReadonlySet_1.ReadonlySet([
|
|
9
|
-
isaac_typescript_definitions_1.PlayerType.ESAU,
|
|
9
|
+
isaac_typescript_definitions_1.PlayerType.ESAU, // 20
|
|
10
10
|
isaac_typescript_definitions_1.PlayerType.SOUL_B, // 40
|
|
11
11
|
]);
|
|
12
12
|
/**
|
package/dist/functions/slots.js
CHANGED
|
@@ -6,14 +6,14 @@ const slotNames_1 = require("../objects/slotNames");
|
|
|
6
6
|
const ReadonlySet_1 = require("../types/ReadonlySet");
|
|
7
7
|
const entityTypes_1 = require("./entityTypes");
|
|
8
8
|
const SLOT_MACHINE_VARIANTS = new ReadonlySet_1.ReadonlySet([
|
|
9
|
-
isaac_typescript_definitions_1.SlotVariant.SLOT_MACHINE,
|
|
10
|
-
isaac_typescript_definitions_1.SlotVariant.BLOOD_DONATION_MACHINE,
|
|
11
|
-
isaac_typescript_definitions_1.SlotVariant.FORTUNE_TELLING_MACHINE,
|
|
12
|
-
isaac_typescript_definitions_1.SlotVariant.DONATION_MACHINE,
|
|
13
|
-
isaac_typescript_definitions_1.SlotVariant.SHOP_RESTOCK_MACHINE,
|
|
14
|
-
isaac_typescript_definitions_1.SlotVariant.GREED_DONATION_MACHINE,
|
|
15
|
-
isaac_typescript_definitions_1.SlotVariant.MOMS_DRESSING_TABLE,
|
|
16
|
-
isaac_typescript_definitions_1.SlotVariant.CRANE_GAME,
|
|
9
|
+
isaac_typescript_definitions_1.SlotVariant.SLOT_MACHINE, // 1
|
|
10
|
+
isaac_typescript_definitions_1.SlotVariant.BLOOD_DONATION_MACHINE, // 2,
|
|
11
|
+
isaac_typescript_definitions_1.SlotVariant.FORTUNE_TELLING_MACHINE, // 3
|
|
12
|
+
isaac_typescript_definitions_1.SlotVariant.DONATION_MACHINE, // 8
|
|
13
|
+
isaac_typescript_definitions_1.SlotVariant.SHOP_RESTOCK_MACHINE, // 10
|
|
14
|
+
isaac_typescript_definitions_1.SlotVariant.GREED_DONATION_MACHINE, // 11
|
|
15
|
+
isaac_typescript_definitions_1.SlotVariant.MOMS_DRESSING_TABLE, // 12
|
|
16
|
+
isaac_typescript_definitions_1.SlotVariant.CRANE_GAME, // 16
|
|
17
17
|
isaac_typescript_definitions_1.SlotVariant.CONFESSIONAL, // 17
|
|
18
18
|
]);
|
|
19
19
|
/**
|
package/dist/functions/stats.js
CHANGED
|
@@ -7,11 +7,11 @@ const defaultPlayerStatMap_1 = require("../maps/defaultPlayerStatMap");
|
|
|
7
7
|
const ReadonlySet_1 = require("../types/ReadonlySet");
|
|
8
8
|
const tears_1 = require("./tears");
|
|
9
9
|
const STAT_CACHE_FLAGS_SET = new ReadonlySet_1.ReadonlySet([
|
|
10
|
-
isaac_typescript_definitions_1.CacheFlag.DAMAGE,
|
|
11
|
-
isaac_typescript_definitions_1.CacheFlag.FIRE_DELAY,
|
|
12
|
-
isaac_typescript_definitions_1.CacheFlag.SHOT_SPEED,
|
|
13
|
-
isaac_typescript_definitions_1.CacheFlag.RANGE,
|
|
14
|
-
isaac_typescript_definitions_1.CacheFlag.SPEED,
|
|
10
|
+
isaac_typescript_definitions_1.CacheFlag.DAMAGE, // 1 << 0
|
|
11
|
+
isaac_typescript_definitions_1.CacheFlag.FIRE_DELAY, // 1 << 1
|
|
12
|
+
isaac_typescript_definitions_1.CacheFlag.SHOT_SPEED, // 1 << 2
|
|
13
|
+
isaac_typescript_definitions_1.CacheFlag.RANGE, // 1 << 3
|
|
14
|
+
isaac_typescript_definitions_1.CacheFlag.SPEED, // 1 << 4
|
|
15
15
|
isaac_typescript_definitions_1.CacheFlag.LUCK, // 1 << 10
|
|
16
16
|
]);
|
|
17
17
|
/**
|
|
@@ -86,18 +86,18 @@ exports.getPlayerStat = getPlayerStat;
|
|
|
86
86
|
/** Helper function to get all of the stat for a player. */
|
|
87
87
|
function getPlayerStats(player) {
|
|
88
88
|
return {
|
|
89
|
-
[PlayerStat_1.PlayerStat.DAMAGE]: player.Damage,
|
|
90
|
-
[PlayerStat_1.PlayerStat.FIRE_DELAY]: player.MaxFireDelay,
|
|
91
|
-
[PlayerStat_1.PlayerStat.SHOT_SPEED]: player.ShotSpeed,
|
|
92
|
-
[PlayerStat_1.PlayerStat.TEAR_HEIGHT]: player.TearHeight,
|
|
93
|
-
[PlayerStat_1.PlayerStat.TEAR_RANGE]: player.TearRange,
|
|
94
|
-
[PlayerStat_1.PlayerStat.TEAR_FALLING_ACCELERATION]: player.TearFallingAcceleration,
|
|
95
|
-
[PlayerStat_1.PlayerStat.TEAR_FALLING_SPEED]: player.TearFallingSpeed,
|
|
96
|
-
[PlayerStat_1.PlayerStat.MOVE_SPEED]: player.MoveSpeed,
|
|
97
|
-
[PlayerStat_1.PlayerStat.TEAR_FLAG]: player.TearFlags,
|
|
98
|
-
[PlayerStat_1.PlayerStat.TEAR_COLOR]: player.TearColor,
|
|
99
|
-
[PlayerStat_1.PlayerStat.FLYING]: player.CanFly,
|
|
100
|
-
[PlayerStat_1.PlayerStat.LUCK]: player.Luck,
|
|
89
|
+
[PlayerStat_1.PlayerStat.DAMAGE]: player.Damage, // 1 << 0
|
|
90
|
+
[PlayerStat_1.PlayerStat.FIRE_DELAY]: player.MaxFireDelay, // 1 << 1
|
|
91
|
+
[PlayerStat_1.PlayerStat.SHOT_SPEED]: player.ShotSpeed, // 1 << 2
|
|
92
|
+
[PlayerStat_1.PlayerStat.TEAR_HEIGHT]: player.TearHeight, // 1 << 3
|
|
93
|
+
[PlayerStat_1.PlayerStat.TEAR_RANGE]: player.TearRange, // 1 << 3
|
|
94
|
+
[PlayerStat_1.PlayerStat.TEAR_FALLING_ACCELERATION]: player.TearFallingAcceleration, // 1 << 3
|
|
95
|
+
[PlayerStat_1.PlayerStat.TEAR_FALLING_SPEED]: player.TearFallingSpeed, // 1 << 3
|
|
96
|
+
[PlayerStat_1.PlayerStat.MOVE_SPEED]: player.MoveSpeed, // 1 << 4
|
|
97
|
+
[PlayerStat_1.PlayerStat.TEAR_FLAG]: player.TearFlags, // 1 << 5
|
|
98
|
+
[PlayerStat_1.PlayerStat.TEAR_COLOR]: player.TearColor, // 1 << 6
|
|
99
|
+
[PlayerStat_1.PlayerStat.FLYING]: player.CanFly, // 1 << 7
|
|
100
|
+
[PlayerStat_1.PlayerStat.LUCK]: player.Luck, // 1 << 10
|
|
101
101
|
[PlayerStat_1.PlayerStat.SIZE]: player.SpriteScale, // 1 << 11
|
|
102
102
|
};
|
|
103
103
|
}
|
|
@@ -4,42 +4,42 @@ exports.isStoryBossID = exports.isStoryBoss = void 0;
|
|
|
4
4
|
const isaac_typescript_definitions_1 = require("isaac-typescript-definitions");
|
|
5
5
|
const ReadonlySet_1 = require("../types/ReadonlySet");
|
|
6
6
|
const STORY_BOSS_IDS = [
|
|
7
|
-
isaac_typescript_definitions_1.BossID.MOM,
|
|
8
|
-
isaac_typescript_definitions_1.BossID.MOMS_HEART,
|
|
9
|
-
isaac_typescript_definitions_1.BossID.SATAN,
|
|
10
|
-
isaac_typescript_definitions_1.BossID.IT_LIVES,
|
|
11
|
-
isaac_typescript_definitions_1.BossID.ISAAC,
|
|
12
|
-
isaac_typescript_definitions_1.BossID.BLUE_BABY,
|
|
13
|
-
isaac_typescript_definitions_1.BossID.LAMB,
|
|
14
|
-
isaac_typescript_definitions_1.BossID.MEGA_SATAN,
|
|
15
|
-
isaac_typescript_definitions_1.BossID.ULTRA_GREED,
|
|
16
|
-
isaac_typescript_definitions_1.BossID.HUSH,
|
|
17
|
-
isaac_typescript_definitions_1.BossID.DELIRIUM,
|
|
18
|
-
isaac_typescript_definitions_1.BossID.ULTRA_GREEDIER,
|
|
19
|
-
isaac_typescript_definitions_1.BossID.MOTHER,
|
|
20
|
-
isaac_typescript_definitions_1.BossID.MAUSOLEUM_MOM,
|
|
21
|
-
isaac_typescript_definitions_1.BossID.MAUSOLEUM_MOMS_HEART,
|
|
22
|
-
isaac_typescript_definitions_1.BossID.DOGMA,
|
|
7
|
+
isaac_typescript_definitions_1.BossID.MOM, // 6
|
|
8
|
+
isaac_typescript_definitions_1.BossID.MOMS_HEART, // 8
|
|
9
|
+
isaac_typescript_definitions_1.BossID.SATAN, // 24
|
|
10
|
+
isaac_typescript_definitions_1.BossID.IT_LIVES, // 25
|
|
11
|
+
isaac_typescript_definitions_1.BossID.ISAAC, // 39
|
|
12
|
+
isaac_typescript_definitions_1.BossID.BLUE_BABY, // 40
|
|
13
|
+
isaac_typescript_definitions_1.BossID.LAMB, // 54
|
|
14
|
+
isaac_typescript_definitions_1.BossID.MEGA_SATAN, // 55 (Mega Satan 2 is in the same room.)
|
|
15
|
+
isaac_typescript_definitions_1.BossID.ULTRA_GREED, // 62
|
|
16
|
+
isaac_typescript_definitions_1.BossID.HUSH, // 63
|
|
17
|
+
isaac_typescript_definitions_1.BossID.DELIRIUM, // 70
|
|
18
|
+
isaac_typescript_definitions_1.BossID.ULTRA_GREEDIER, // 71
|
|
19
|
+
isaac_typescript_definitions_1.BossID.MOTHER, // 88
|
|
20
|
+
isaac_typescript_definitions_1.BossID.MAUSOLEUM_MOM, // 89
|
|
21
|
+
isaac_typescript_definitions_1.BossID.MAUSOLEUM_MOMS_HEART, // 90
|
|
22
|
+
isaac_typescript_definitions_1.BossID.DOGMA, // 99
|
|
23
23
|
isaac_typescript_definitions_1.BossID.BEAST, // 100
|
|
24
24
|
];
|
|
25
25
|
const STORY_BOSS_ENTITY_TYPES_SET = new ReadonlySet_1.ReadonlySet([
|
|
26
|
-
isaac_typescript_definitions_1.EntityType.MOM,
|
|
27
|
-
isaac_typescript_definitions_1.EntityType.MOMS_HEART,
|
|
28
|
-
isaac_typescript_definitions_1.EntityType.SATAN,
|
|
26
|
+
isaac_typescript_definitions_1.EntityType.MOM, // 45
|
|
27
|
+
isaac_typescript_definitions_1.EntityType.MOMS_HEART, // 78
|
|
28
|
+
isaac_typescript_definitions_1.EntityType.SATAN, // 84
|
|
29
29
|
// - It Lives is a variant of Mom's Heart.
|
|
30
|
-
isaac_typescript_definitions_1.EntityType.ISAAC,
|
|
30
|
+
isaac_typescript_definitions_1.EntityType.ISAAC, // 102
|
|
31
31
|
// - Blue Baby is a variant of Isaac.
|
|
32
|
-
isaac_typescript_definitions_1.EntityType.LAMB,
|
|
33
|
-
isaac_typescript_definitions_1.EntityType.MEGA_SATAN,
|
|
34
|
-
isaac_typescript_definitions_1.EntityType.MEGA_SATAN_2,
|
|
35
|
-
isaac_typescript_definitions_1.EntityType.ULTRA_GREED,
|
|
36
|
-
isaac_typescript_definitions_1.EntityType.HUSH,
|
|
37
|
-
isaac_typescript_definitions_1.EntityType.DELIRIUM,
|
|
32
|
+
isaac_typescript_definitions_1.EntityType.LAMB, // 273
|
|
33
|
+
isaac_typescript_definitions_1.EntityType.MEGA_SATAN, // 274
|
|
34
|
+
isaac_typescript_definitions_1.EntityType.MEGA_SATAN_2, // 275
|
|
35
|
+
isaac_typescript_definitions_1.EntityType.ULTRA_GREED, // 406
|
|
36
|
+
isaac_typescript_definitions_1.EntityType.HUSH, // 407
|
|
37
|
+
isaac_typescript_definitions_1.EntityType.DELIRIUM, // 412
|
|
38
38
|
// - Ultra Greedier is a variant of Ultra Greed.
|
|
39
|
-
isaac_typescript_definitions_1.EntityType.MOTHER,
|
|
39
|
+
isaac_typescript_definitions_1.EntityType.MOTHER, // 912
|
|
40
40
|
// - Mausoleum Mom is a sub-type of Mom.
|
|
41
41
|
// - Mausoleum Mom's Heart is a sub-type of Mom's Heart.
|
|
42
|
-
isaac_typescript_definitions_1.EntityType.DOGMA,
|
|
42
|
+
isaac_typescript_definitions_1.EntityType.DOGMA, // 950
|
|
43
43
|
isaac_typescript_definitions_1.EntityType.BEAST, // 951
|
|
44
44
|
]);
|
|
45
45
|
const STORY_BOSS_IDS_SET = new ReadonlySet_1.ReadonlySet(STORY_BOSS_IDS);
|
|
@@ -9,25 +9,25 @@ const ReadonlySet_1 = require("../types/ReadonlySet");
|
|
|
9
9
|
const collectibles_1 = require("./collectibles");
|
|
10
10
|
const flag_1 = require("./flag");
|
|
11
11
|
const TRANSFORMATION_TO_TAG_MAP = new ReadonlyMap_1.ReadonlyMap([
|
|
12
|
-
[isaac_typescript_definitions_1.PlayerForm.GUPPY, isaac_typescript_definitions_1.ItemConfigTag.GUPPY],
|
|
13
|
-
[isaac_typescript_definitions_1.PlayerForm.BEELZEBUB, isaac_typescript_definitions_1.ItemConfigTag.FLY],
|
|
14
|
-
[isaac_typescript_definitions_1.PlayerForm.FUN_GUY, isaac_typescript_definitions_1.ItemConfigTag.MUSHROOM],
|
|
15
|
-
[isaac_typescript_definitions_1.PlayerForm.SERAPHIM, isaac_typescript_definitions_1.ItemConfigTag.ANGEL],
|
|
16
|
-
[isaac_typescript_definitions_1.PlayerForm.BOB, isaac_typescript_definitions_1.ItemConfigTag.BOB],
|
|
17
|
-
[isaac_typescript_definitions_1.PlayerForm.SPUN, isaac_typescript_definitions_1.ItemConfigTag.SYRINGE],
|
|
18
|
-
[isaac_typescript_definitions_1.PlayerForm.YES_MOTHER, isaac_typescript_definitions_1.ItemConfigTag.MOM],
|
|
19
|
-
[isaac_typescript_definitions_1.PlayerForm.CONJOINED, isaac_typescript_definitions_1.ItemConfigTag.BABY],
|
|
20
|
-
[isaac_typescript_definitions_1.PlayerForm.LEVIATHAN, isaac_typescript_definitions_1.ItemConfigTag.DEVIL],
|
|
21
|
-
[isaac_typescript_definitions_1.PlayerForm.OH_CRAP, isaac_typescript_definitions_1.ItemConfigTag.POOP],
|
|
22
|
-
[isaac_typescript_definitions_1.PlayerForm.BOOKWORM, isaac_typescript_definitions_1.ItemConfigTag.BOOK],
|
|
12
|
+
[isaac_typescript_definitions_1.PlayerForm.GUPPY, isaac_typescript_definitions_1.ItemConfigTag.GUPPY], // 0
|
|
13
|
+
[isaac_typescript_definitions_1.PlayerForm.BEELZEBUB, isaac_typescript_definitions_1.ItemConfigTag.FLY], // 1
|
|
14
|
+
[isaac_typescript_definitions_1.PlayerForm.FUN_GUY, isaac_typescript_definitions_1.ItemConfigTag.MUSHROOM], // 2
|
|
15
|
+
[isaac_typescript_definitions_1.PlayerForm.SERAPHIM, isaac_typescript_definitions_1.ItemConfigTag.ANGEL], // 3
|
|
16
|
+
[isaac_typescript_definitions_1.PlayerForm.BOB, isaac_typescript_definitions_1.ItemConfigTag.BOB], // 4
|
|
17
|
+
[isaac_typescript_definitions_1.PlayerForm.SPUN, isaac_typescript_definitions_1.ItemConfigTag.SYRINGE], // 5
|
|
18
|
+
[isaac_typescript_definitions_1.PlayerForm.YES_MOTHER, isaac_typescript_definitions_1.ItemConfigTag.MOM], // 6
|
|
19
|
+
[isaac_typescript_definitions_1.PlayerForm.CONJOINED, isaac_typescript_definitions_1.ItemConfigTag.BABY], // 7
|
|
20
|
+
[isaac_typescript_definitions_1.PlayerForm.LEVIATHAN, isaac_typescript_definitions_1.ItemConfigTag.DEVIL], // 8
|
|
21
|
+
[isaac_typescript_definitions_1.PlayerForm.OH_CRAP, isaac_typescript_definitions_1.ItemConfigTag.POOP], // 9
|
|
22
|
+
[isaac_typescript_definitions_1.PlayerForm.BOOKWORM, isaac_typescript_definitions_1.ItemConfigTag.BOOK], // 10
|
|
23
23
|
// PlayerForm.ADULTHOOD (11) is based on pill usage.
|
|
24
24
|
[isaac_typescript_definitions_1.PlayerForm.SPIDER_BABY, isaac_typescript_definitions_1.ItemConfigTag.SPIDER], // 12
|
|
25
25
|
// PlayerForm.STOMPY (13) is based on size.
|
|
26
26
|
]);
|
|
27
27
|
const TRANSFORMATIONS_THAT_GRANT_FLYING = new ReadonlySet_1.ReadonlySet([
|
|
28
|
-
isaac_typescript_definitions_1.PlayerForm.GUPPY,
|
|
29
|
-
isaac_typescript_definitions_1.PlayerForm.BEELZEBUB,
|
|
30
|
-
isaac_typescript_definitions_1.PlayerForm.SERAPHIM,
|
|
28
|
+
isaac_typescript_definitions_1.PlayerForm.GUPPY, // 0
|
|
29
|
+
isaac_typescript_definitions_1.PlayerForm.BEELZEBUB, // 1
|
|
30
|
+
isaac_typescript_definitions_1.PlayerForm.SERAPHIM, // 3
|
|
31
31
|
isaac_typescript_definitions_1.PlayerForm.LEVIATHAN, // 8
|
|
32
32
|
]);
|
|
33
33
|
/** Returns a set of the player's current transformations. */
|