isaacscript-common 20.3.0 → 20.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +16 -14
- package/dist/isaacscript-common.lua +10253 -10004
- package/dist/src/classes/ModUpgradedBase.d.ts +1 -1
- package/dist/src/classes/features/callbackLogic/CustomGridEntities.lua +3 -3
- package/dist/src/classes/features/callbackLogic/GridEntityCollisionDetection.lua +1 -1
- package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.lua +3 -3
- package/dist/src/classes/features/callbackLogic/PlayerCollectibleDetection.lua +1 -1
- package/dist/src/classes/features/other/CustomHotkeys.d.ts.map +1 -1
- package/dist/src/classes/features/other/CustomHotkeys.lua +2 -2
- package/dist/src/classes/features/other/DeployJSONRoom.lua +1 -1
- package/dist/src/classes/features/other/ItemPoolDetection.d.ts.map +1 -1
- package/dist/src/classes/features/other/ModdedElementSets.lua +3 -3
- package/dist/src/classes/features/other/PersistentEntities.d.ts.map +1 -1
- package/dist/src/classes/features/other/PersistentEntities.lua +1 -1
- package/dist/src/classes/features/other/PickupIndexCreation.lua +1 -1
- package/dist/src/classes/features/other/customStages/streakText.d.ts.map +1 -1
- package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +0 -1
- package/dist/src/core/constants.d.ts +1 -1
- package/dist/src/core/constants.d.ts.map +1 -1
- package/dist/src/functions/cards.lua +0 -2
- package/dist/src/functions/entities.lua +1 -1
- package/dist/src/functions/hex.d.ts +4 -3
- package/dist/src/functions/hex.d.ts.map +1 -1
- package/dist/src/functions/hex.lua +8 -0
- package/dist/src/functions/isaacAPIClass.d.ts +1 -1
- package/dist/src/functions/isaacAPIClass.d.ts.map +1 -1
- package/dist/src/functions/levelGrid.d.ts.map +1 -1
- package/dist/src/functions/levelGrid.lua +2 -2
- package/dist/src/functions/map.d.ts +2 -2
- package/dist/src/functions/map.lua +1 -1
- package/dist/src/functions/minimap.lua +1 -1
- package/dist/src/functions/table.d.ts +1 -1
- package/dist/src/functions/table.d.ts.map +1 -1
- package/dist/src/functions/utils.d.ts +5 -5
- package/dist/src/functions/utils.d.ts.map +1 -1
- package/dist/src/functions/utils.lua +9 -18
- package/dist/src/maps/characterNameToTypeMap.d.ts +1 -1
- package/dist/src/maps/characterNameToTypeMap.d.ts.map +1 -1
- package/dist/src/objects/roomShapeToDoorSlotCoordinates.d.ts +1 -1
- package/dist/src/objects/roomShapeToDoorSlotCoordinates.d.ts.map +1 -1
- package/dist/src/sets/bossSets.lua +5 -5
- package/dist/src/sets/entitiesWithArmorSet.d.ts +1 -1
- package/dist/src/sets/entitiesWithArmorSet.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/classes/ModUpgradedBase.ts +1 -1
- package/src/classes/callbacks/PostTrinketBreak.ts +2 -2
- package/src/classes/features/callbackLogic/CustomGridEntities.ts +3 -3
- package/src/classes/features/callbackLogic/GridEntityCollisionDetection.ts +1 -1
- package/src/classes/features/callbackLogic/GridEntityUpdateDetection.ts +4 -6
- package/src/classes/features/callbackLogic/PlayerCollectibleDetection.ts +1 -1
- package/src/classes/features/other/CustomHotkeys.ts +2 -8
- package/src/classes/features/other/DeployJSONRoom.ts +1 -1
- package/src/classes/features/other/FlyingDetection.ts +2 -2
- package/src/classes/features/other/ItemPoolDetection.ts +3 -5
- package/src/classes/features/other/ModdedElementSets.ts +4 -4
- package/src/classes/features/other/PersistentEntities.ts +1 -4
- package/src/classes/features/other/PickupIndexCreation.ts +1 -1
- package/src/classes/features/other/PonyDetection.ts +2 -2
- package/src/classes/features/other/customStages/backdrop.ts +2 -2
- package/src/classes/features/other/customStages/streakText.ts +6 -4
- package/src/classes/features/other/saveDataManager/glowingHourGlass.ts +2 -2
- package/src/core/constants.ts +7 -6
- package/src/functions/bitSet128.ts +1 -1
- package/src/functions/color.ts +1 -1
- package/src/functions/hex.ts +4 -2
- package/src/functions/input.ts +6 -6
- package/src/functions/isaacAPIClass.ts +1 -1
- package/src/functions/kColor.ts +1 -1
- package/src/functions/levelGrid.ts +3 -9
- package/src/functions/map.ts +2 -2
- package/src/functions/merge.ts +1 -1
- package/src/functions/minimap.ts +1 -1
- package/src/functions/rng.ts +1 -1
- package/src/functions/table.ts +1 -1
- package/src/functions/utils.ts +9 -15
- package/src/functions/vector.ts +1 -1
- package/src/maps/characterNameToTypeMap.ts +86 -85
- package/src/objects/roomShapeBounds.ts +2 -2
- package/src/objects/roomShapeLayoutSizes.ts +4 -4
- package/src/objects/roomShapeToDoorSlotCoordinates.ts +1 -1
- package/src/patchErrorFunctions.ts +2 -2
- package/src/sets/bossSets.ts +5 -5
- package/src/sets/entitiesWithArmorSet.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1108,7 +1108,7 @@ export declare const CARD_NAME_TO_TYPE_MAP: ReadonlyMap<string, CardType>;
|
|
|
1108
1108
|
export declare function changeRoom(roomGridIndex: int): void;
|
|
1109
1109
|
|
|
1110
1110
|
/** Maps character names to the values of the `PlayerType` enum. */
|
|
1111
|
-
export declare const CHARACTER_NAME_TO_TYPE_MAP:
|
|
1111
|
+
export declare const CHARACTER_NAME_TO_TYPE_MAP: ReadonlyMap<string, PlayerType>;
|
|
1112
1112
|
|
|
1113
1113
|
/**
|
|
1114
1114
|
* Helper function to determine if the given character can have red heart containers. Returns true
|
|
@@ -1483,7 +1483,7 @@ export declare function copyRNG(rng: RNG): RNG;
|
|
|
1483
1483
|
export declare function copySet<T>(oldSet: Set<T> | ReadonlySet<T>): Set<T>;
|
|
1484
1484
|
|
|
1485
1485
|
/** Helper function to copy specific values from a userdata object (e.g. `Vector`) to a table. */
|
|
1486
|
-
export declare function copyUserdataValuesToTable(object: unknown, keys: string[], luaMap: LuaMap<string, unknown>): void;
|
|
1486
|
+
export declare function copyUserdataValuesToTable(object: unknown, keys: string[] | readonly string[], luaMap: LuaMap<string, unknown>): void;
|
|
1487
1487
|
|
|
1488
1488
|
/** Helper function to copy a `Vector` Isaac API class. */
|
|
1489
1489
|
export declare function copyVector(vector: Vector): Vector;
|
|
@@ -3571,8 +3571,8 @@ export declare type EntityID = string & {
|
|
|
3571
3571
|
* - For example, `eRange(1, 3)` will return `[1, 2]`.
|
|
3572
3572
|
* - For example, `eRange(2)` will return `[0, 1]`.
|
|
3573
3573
|
*
|
|
3574
|
-
* @param start The
|
|
3575
|
-
* @param end Optional. The
|
|
3574
|
+
* @param start The integer to start at.
|
|
3575
|
+
* @param end Optional. The integer to end at. If not specified, then the start will be 0 and the
|
|
3576
3576
|
* first argument will be the end.
|
|
3577
3577
|
* @param increment Optional. The increment to use. Default is 1.
|
|
3578
3578
|
*/
|
|
@@ -5126,10 +5126,10 @@ export declare function getLastFrameOfAnimation(sprite: Sprite, animation?: stri
|
|
|
5126
5126
|
* ]);
|
|
5127
5127
|
* const searchText = "f";
|
|
5128
5128
|
* const match = getMapPartialMatch(map, searchText); // match is now equal to ["foo", 123]
|
|
5129
|
+
* ```
|
|
5129
5130
|
*
|
|
5130
5131
|
* @returns If a match was found, returns a tuple of the map key and value. If a match was not
|
|
5131
|
-
*
|
|
5132
|
-
* ```
|
|
5132
|
+
* found, returns undefined.
|
|
5133
5133
|
*/
|
|
5134
5134
|
export declare function getMapPartialMatch<T>(searchText: string, map: ReadonlyMap<string, T>): [string, T] | undefined;
|
|
5135
5135
|
|
|
@@ -6819,15 +6819,17 @@ export declare enum HealthType {
|
|
|
6819
6819
|
* Converts a hex string like "#33aa33" to a KColor object.
|
|
6820
6820
|
*
|
|
6821
6821
|
* @param hexString A hex string like "#ffffff" or "ffffff". (The "#" character is optional.)
|
|
6822
|
+
* @param alpha Optional. Range is from 0 to 1. Default is 1. (The same as the `Color` constructor.)
|
|
6822
6823
|
*/
|
|
6823
|
-
export declare function hexToColor(hexString: string, alpha
|
|
6824
|
+
export declare function hexToColor(hexString: string, alpha?: number): Color;
|
|
6824
6825
|
|
|
6825
6826
|
/**
|
|
6826
6827
|
* Converts a hex string like "#33aa33" to a Color object.
|
|
6827
6828
|
*
|
|
6828
6829
|
* @param hexString A hex string like "#ffffff" or "ffffff". (The "#" character is optional.)
|
|
6830
|
+
* @param alpha Range is from 0 to 1. Default is 1.
|
|
6829
6831
|
*/
|
|
6830
|
-
export declare function hexToKColor(hexString: string, alpha
|
|
6832
|
+
export declare function hexToKColor(hexString: string, alpha?: number): KColor;
|
|
6831
6833
|
|
|
6832
6834
|
/**
|
|
6833
6835
|
* Helper type to make the given array/map/set/object recursively read-only.
|
|
@@ -7008,8 +7010,8 @@ export declare function inStartingRoom(): boolean;
|
|
|
7008
7010
|
* - For example, `iRange(1, 3)` will return `[1, 2, 3]`.
|
|
7009
7011
|
* - For example, `iRange(2)` will return `[0, 1, 2]`.
|
|
7010
7012
|
*
|
|
7011
|
-
* @param start The
|
|
7012
|
-
* @param end Optional. The
|
|
7013
|
+
* @param start The integer to start at.
|
|
7014
|
+
* @param end Optional. The integer to end at. If not specified, then the start will be 0 and the
|
|
7013
7015
|
* first argument will be the end.
|
|
7014
7016
|
* @param increment Optional. The increment to use. Default is 1.
|
|
7015
7017
|
*/
|
|
@@ -7019,7 +7021,7 @@ export declare function iRange(start: int, end?: int, increment?: number): int[]
|
|
|
7019
7021
|
* Helper function to check if an instantiated Isaac API class is equal to another one of the same
|
|
7020
7022
|
* type. You must provide the list of keys to check for.
|
|
7021
7023
|
*/
|
|
7022
|
-
export declare function isaacAPIClassEquals(object1: unknown, object2: unknown, keys: string[]): boolean;
|
|
7024
|
+
export declare function isaacAPIClassEquals(object1: unknown, object2: unknown, keys: string[] | readonly string[]): boolean;
|
|
7023
7025
|
|
|
7024
7026
|
declare interface IsaacAPIClassTypeToSerializedType {
|
|
7025
7027
|
[CopyableIsaacAPIClassType.BIT_SET_128]: SerializedBitSet128;
|
|
@@ -8021,7 +8023,7 @@ export declare function isVanillaWallGridIndex(gridIndex: int): boolean;
|
|
|
8021
8023
|
export declare function isVector(object: unknown): object is Vector;
|
|
8022
8024
|
|
|
8023
8025
|
/** The set of all `ItemConfigCardType` values that are not a rune or special object. */
|
|
8024
|
-
export declare const ITEM_CONFIG_CARD_TYPES_FOR_CARDS:
|
|
8026
|
+
export declare const ITEM_CONFIG_CARD_TYPES_FOR_CARDS: ReadonlySet<ItemConfigCardType>;
|
|
8025
8027
|
|
|
8026
8028
|
/**
|
|
8027
8029
|
* A cached version of the class returned from the `Isaac.GetItemConfig()` constructor.
|
|
@@ -11507,7 +11509,7 @@ export declare class ModUpgradedBase implements Mod {
|
|
|
11507
11509
|
/**
|
|
11508
11510
|
* Returns the names of the exported class methods from the features that were added. This is
|
|
11509
11511
|
* called from the "upgradeMod" function, but we want to mark it as private so that end-users
|
|
11510
|
-
* don't have access to it
|
|
11512
|
+
* don't have access to it.
|
|
11511
11513
|
*/
|
|
11512
11514
|
private initOptionalFeature;
|
|
11513
11515
|
/**
|
|
@@ -15095,7 +15097,7 @@ export declare function validateEnumContiguous<T>(transpiledEnumName: string, tr
|
|
|
15095
15097
|
*
|
|
15096
15098
|
* This function is only meant to be used with interfaces (i.e. types that will not exist at
|
|
15097
15099
|
* run-time). If you are generating an object that will contain all of the keys of an enum, use the
|
|
15098
|
-
* `
|
|
15100
|
+
* `satisfies` operator with the `HasAllEnumValues` helper type instead.
|
|
15099
15101
|
*/
|
|
15100
15102
|
export declare function validateInterfaceMatchesEnum<T extends Record<Enum, unknown>, Enum extends string | number>(): void;
|
|
15101
15103
|
|