isaacscript-common 20.12.2 → 20.12.3
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 +44 -40
- package/dist/isaacscript-common.lua +262 -416
- package/dist/src/classes/ModFeature.lua +0 -4
- package/dist/src/classes/ModUpgradedBase.lua +3 -9
- package/dist/src/classes/callbacks/PostNewRoomEarly.lua +2 -2
- package/dist/src/classes/features/callbackLogic/CustomRevive.lua +2 -5
- package/dist/src/classes/features/other/CustomStages.lua +4 -16
- package/dist/src/classes/features/other/CustomTrapdoors.lua +1 -4
- package/dist/src/classes/features/other/DeployJSONRoom.lua +8 -14
- package/dist/src/classes/features/other/Pause.lua +2 -2
- package/dist/src/classes/features/other/TaintedLazarusPlayers.lua +1 -1
- package/dist/src/classes/features/other/customStages/utils.lua +4 -16
- package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +4 -4
- package/dist/src/classes/features/other/extraConsoleCommands/subroutines.lua +2 -2
- package/dist/src/classes/features/other/saveDataManager/loadFromDisk.lua +4 -7
- package/dist/src/classes/features/other/saveDataManager/restoreDefaults.lua +2 -2
- package/dist/src/classes/features/other/saveDataManager/saveToDisk.lua +1 -1
- package/dist/src/functions/benchmark.lua +2 -8
- package/dist/src/functions/debugFunctions.d.ts +2 -2
- package/dist/src/functions/debugFunctions.d.ts.map +1 -1
- package/dist/src/functions/debugFunctions.lua +4 -4
- package/dist/src/functions/deepCopy.lua +7 -7
- package/dist/src/functions/deepCopyTests.lua +1 -1
- package/dist/src/functions/globals.lua +3 -6
- package/dist/src/functions/hex.lua +4 -7
- package/dist/src/functions/jsonHelpers.lua +1 -1
- package/dist/src/functions/jsonRoom.lua +4 -16
- package/dist/src/functions/log.d.ts +8 -4
- package/dist/src/functions/log.d.ts.map +1 -1
- package/dist/src/functions/log.lua +18 -5
- package/dist/src/functions/logEntities.d.ts +8 -8
- package/dist/src/functions/logEntities.d.ts.map +1 -1
- package/dist/src/functions/logEntities.lua +24 -27
- package/dist/src/functions/logMisc.d.ts +26 -26
- package/dist/src/functions/logMisc.d.ts.map +1 -1
- package/dist/src/functions/logMisc.lua +114 -226
- package/dist/src/functions/merge.lua +6 -6
- package/dist/src/functions/run.lua +2 -5
- package/dist/src/functions/utils.d.ts.map +1 -1
- package/dist/src/functions/utils.lua +20 -1
- package/dist/src/lib/jsonLua.lua +16 -7
- package/dist/src/patchErrorFunctions.lua +1 -1
- package/package.json +1 -1
- package/src/classes/ModFeature.ts +0 -6
- package/src/classes/features/other/saveDataManager/saveToDisk.ts +3 -4
- package/src/functions/debugFunctions.ts +2 -2
- package/src/functions/deepCopy.ts +2 -0
- package/src/functions/log.ts +15 -4
- package/src/functions/logEntities.ts +14 -8
- package/src/functions/logMisc.ts +56 -39
- package/src/functions/utils.ts +30 -0
- package/src/lib/jsonLua.lua +16 -7
package/dist/index.d.ts
CHANGED
|
@@ -5307,7 +5307,7 @@ export declare function getOtherPlayers(player: EntityPlayer): EntityPlayer[];
|
|
|
5307
5307
|
* (because the first level is this function, the second level is the calling
|
|
5308
5308
|
* function, and the third level is the parent of the calling function).
|
|
5309
5309
|
*/
|
|
5310
|
-
export declare function getParentFunctionDescription(levels?: number): string | undefined;
|
|
5310
|
+
export declare function getParentFunctionDescription(this: void, levels?: number): string | undefined;
|
|
5311
5311
|
|
|
5312
5312
|
/**
|
|
5313
5313
|
* Helper function to get the closest value from an array of strings based on partial search text.
|
|
@@ -6459,7 +6459,7 @@ export declare function getTotalPlayerCollectibles(collectibleType: CollectibleT
|
|
|
6459
6459
|
* This will only work if the `--luadebug` launch option is enabled or the Racing+ sandbox is
|
|
6460
6460
|
* enabled.
|
|
6461
6461
|
*/
|
|
6462
|
-
export declare function getTraceback(): string;
|
|
6462
|
+
export declare function getTraceback(this: void): string;
|
|
6463
6463
|
|
|
6464
6464
|
/**
|
|
6465
6465
|
* Helper function to get a transformation name from a PlayerForm enum.
|
|
@@ -8410,8 +8410,8 @@ export declare function lockDoor(door: GridEntityDoor): void;
|
|
|
8410
8410
|
/**
|
|
8411
8411
|
* Helper function to avoid typing out `Isaac.DebugString()`.
|
|
8412
8412
|
*
|
|
8413
|
-
* If you have the "--luadebug" launch flag turned on
|
|
8414
|
-
* function
|
|
8413
|
+
* If you have the "--luadebug" launch flag turned on, then this function will also prepend the
|
|
8414
|
+
* function name and the line number before the string, like this:
|
|
8415
8415
|
*
|
|
8416
8416
|
* ```text
|
|
8417
8417
|
* [INFO] - Lua Debug: saveToDisk:42494 - The save data manager wrote data to the "save#.dat" file.
|
|
@@ -8419,11 +8419,15 @@ export declare function lockDoor(door: GridEntityDoor): void;
|
|
|
8419
8419
|
*
|
|
8420
8420
|
* Subsequently, it is recommended that you turn on the "--luadebug" launch flag when developing
|
|
8421
8421
|
* your mod so that debugging becomes a little bit easier.
|
|
8422
|
+
*
|
|
8423
|
+
* @param msg The message to log.
|
|
8424
|
+
* @param includeParentFunction Optional. Whether to prefix the message with the function name and
|
|
8425
|
+
* line number, as shown in the above example. Default is true.
|
|
8422
8426
|
*/
|
|
8423
|
-
export declare function log(msg: string): void;
|
|
8427
|
+
export declare function log(this: void, msg: string, includeParentFunction?: boolean): void;
|
|
8424
8428
|
|
|
8425
8429
|
/** Helper function for printing out every entity (or filtered entity) in the current room. */
|
|
8426
|
-
export declare function logAllEntities(includeBackgroundEffects: boolean, entityTypeFilter?: EntityType): void;
|
|
8430
|
+
export declare function logAllEntities(this: void, includeBackgroundEffects: boolean, entityTypeFilter?: EntityType): void;
|
|
8427
8431
|
|
|
8428
8432
|
/**
|
|
8429
8433
|
* Helper function for printing out every grid entity (or filtered grid entity) in the current room.
|
|
@@ -8432,7 +8436,7 @@ export declare function logAllEntities(includeBackgroundEffects: boolean, entity
|
|
|
8432
8436
|
* @param gridEntityTypeFilter Optional. If specified, will only log the given `GridEntityType`.
|
|
8433
8437
|
* Default is undefined.
|
|
8434
8438
|
*/
|
|
8435
|
-
export declare function logAllGridEntities(includeWalls?: boolean, gridEntityTypeFilter?: GridEntityType): void;
|
|
8439
|
+
export declare function logAllGridEntities(this: void, includeWalls?: boolean, gridEntityTypeFilter?: GridEntityType): void;
|
|
8436
8440
|
|
|
8437
8441
|
/**
|
|
8438
8442
|
* Helper function to log a message to the "log.txt" file and to print it to the screen at the same
|
|
@@ -8441,25 +8445,25 @@ export declare function logAllGridEntities(includeWalls?: boolean, gridEntityTyp
|
|
|
8441
8445
|
export declare function logAndPrint(msg: string): void;
|
|
8442
8446
|
|
|
8443
8447
|
/** Helper function to enumerate all of the values in an array. */
|
|
8444
|
-
export declare function logArray<T>(array: T[] | readonly T[]): void;
|
|
8448
|
+
export declare function logArray<T>(this: void, array: T[] | readonly T[]): void;
|
|
8445
8449
|
|
|
8446
|
-
export declare function logCollectibleTypes(collectibleTypes: CollectibleType[]): void;
|
|
8450
|
+
export declare function logCollectibleTypes(this: void, collectibleTypes: CollectibleType[]): void;
|
|
8447
8451
|
|
|
8448
|
-
export declare function logColor(color: Color): void;
|
|
8452
|
+
export declare function logColor(this: void, color: Color): void;
|
|
8449
8453
|
|
|
8450
8454
|
/** Helper function for printing out every damage flag that is turned on. Useful when debugging. */
|
|
8451
|
-
export declare function logDamageFlags(flags: DamageFlag | BitFlags<DamageFlag>): void;
|
|
8455
|
+
export declare function logDamageFlags(this: void, flags: DamageFlag | BitFlags<DamageFlag>): void;
|
|
8452
8456
|
|
|
8453
8457
|
/** Helper function for logging an array of specific entities. */
|
|
8454
|
-
export declare function logEntities(entities: Entity[]): void;
|
|
8458
|
+
export declare function logEntities(this: void, entities: Entity[]): void;
|
|
8455
8459
|
|
|
8456
8460
|
/** Helper function to log information about a specific entity. */
|
|
8457
|
-
export declare function logEntity(entity: Entity): void;
|
|
8461
|
+
export declare function logEntity(this: void, entity: Entity): void;
|
|
8458
8462
|
|
|
8459
8463
|
/** Helper function for printing out every entity flag that is turned on. Useful when debugging. */
|
|
8460
|
-
export declare function logEntityFlags(flags: EntityFlag | BitFlags<EntityFlag>): void;
|
|
8464
|
+
export declare function logEntityFlags(this: void, flags: EntityFlag | BitFlags<EntityFlag>): void;
|
|
8461
8465
|
|
|
8462
|
-
export declare function logEntityID(entity: Entity): void;
|
|
8466
|
+
export declare function logEntityID(this: void, entity: Entity): void;
|
|
8463
8467
|
|
|
8464
8468
|
/**
|
|
8465
8469
|
* Helper function to log an error message and also print it to the console for better visibility.
|
|
@@ -8467,67 +8471,67 @@ export declare function logEntityID(entity: Entity): void;
|
|
|
8467
8471
|
* This is useful in situations where using the `error` function would be dangerous (since it
|
|
8468
8472
|
* prevents all of the subsequent code in the callback from running).
|
|
8469
8473
|
*/
|
|
8470
|
-
export declare function logError(msg: string): void;
|
|
8474
|
+
export declare function logError(this: void, msg: string): void;
|
|
8471
8475
|
|
|
8472
8476
|
/** Helper function for printing out every flag that is turned on. Useful when debugging. */
|
|
8473
|
-
export declare function logFlags<T extends BitFlag | BitFlag128>(flags: T | BitFlags<T>, flagEnum: Record<string, T>, description?: string): void;
|
|
8477
|
+
export declare function logFlags<T extends BitFlag | BitFlag128>(this: void, flags: T | BitFlags<T>, flagEnum: Record<string, T>, description?: string): void;
|
|
8474
8478
|
|
|
8475
8479
|
/**
|
|
8476
8480
|
* Helper function for printing out every game state flag that is turned on. Useful when debugging.
|
|
8477
8481
|
*/
|
|
8478
|
-
export declare function logGameStateFlags(): void;
|
|
8482
|
+
export declare function logGameStateFlags(this: void): void;
|
|
8479
8483
|
|
|
8480
8484
|
/** Helper function for logging an array of specific grid entities. */
|
|
8481
|
-
export declare function logGridEntities(gridEntities: GridEntity[]): void;
|
|
8485
|
+
export declare function logGridEntities(this: void, gridEntities: GridEntity[]): void;
|
|
8482
8486
|
|
|
8483
8487
|
/** Helper function for log information about a specific grid entity. */
|
|
8484
|
-
export declare function logGridEntity(gridEntity: GridEntity): void;
|
|
8488
|
+
export declare function logGridEntity(this: void, gridEntity: GridEntity): void;
|
|
8485
8489
|
|
|
8486
|
-
export declare function logKColor(kColor: KColor): void;
|
|
8490
|
+
export declare function logKColor(this: void, kColor: KColor): void;
|
|
8487
8491
|
|
|
8488
8492
|
/**
|
|
8489
8493
|
* Helper function for printing out every level state flag that is turned on. Useful when debugging.
|
|
8490
8494
|
*/
|
|
8491
|
-
export declare function logLevelStateFlags(): void;
|
|
8495
|
+
export declare function logLevelStateFlags(this: void): void;
|
|
8492
8496
|
|
|
8493
|
-
export declare function logMap(map: Map<AnyNotNil, unknown>): void;
|
|
8497
|
+
export declare function logMap(this: void, map: Map<AnyNotNil, unknown>): void;
|
|
8494
8498
|
|
|
8495
8499
|
export declare function logNewGlobals(): void;
|
|
8496
8500
|
|
|
8497
|
-
export declare function logPlayerEffects(player: EntityPlayer): void;
|
|
8501
|
+
export declare function logPlayerEffects(this: void, player: EntityPlayer): void;
|
|
8498
8502
|
|
|
8499
|
-
export declare function logPlayerHealth(player: EntityPlayer): void;
|
|
8503
|
+
export declare function logPlayerHealth(this: void, player: EntityPlayer): void;
|
|
8500
8504
|
|
|
8501
8505
|
/**
|
|
8502
8506
|
* Helper function for printing out every projectile flag that is turned on. Useful when debugging.
|
|
8503
8507
|
*/
|
|
8504
|
-
export declare function logProjectileFlags(flags: ProjectileFlag | BitFlags<ProjectileFlag>): void;
|
|
8508
|
+
export declare function logProjectileFlags(this: void, flags: ProjectileFlag | BitFlags<ProjectileFlag>): void;
|
|
8505
8509
|
|
|
8506
8510
|
/**
|
|
8507
8511
|
* Helper function to log information about the entity that corresponding to a pointer hash. (Only
|
|
8508
8512
|
* use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
8509
8513
|
*/
|
|
8510
|
-
export declare function logPtrHash(ptrHash: PtrHash): void;
|
|
8514
|
+
export declare function logPtrHash(this: void, ptrHash: PtrHash): void;
|
|
8511
8515
|
|
|
8512
8516
|
/**
|
|
8513
8517
|
* Helper function to log information about the entity that corresponding to one or more pointer
|
|
8514
8518
|
* hashes. (Only use this when debugging, since retrieving the corresponding entity is expensive.)
|
|
8515
8519
|
*/
|
|
8516
|
-
export declare function logPtrHashes(ptrHashes: PtrHash[]): void;
|
|
8520
|
+
export declare function logPtrHashes(this: void, ptrHashes: PtrHash[]): void;
|
|
8517
8521
|
|
|
8518
8522
|
/** Helper function for logging information about the current room. */
|
|
8519
|
-
export declare function logRoom(): void;
|
|
8523
|
+
export declare function logRoom(this: void): void;
|
|
8520
8524
|
|
|
8521
8525
|
/**
|
|
8522
8526
|
* Helper function for printing out every seed effect (i.e. Easter Egg) that is turned on for the
|
|
8523
8527
|
* particular run.
|
|
8524
8528
|
*/
|
|
8525
|
-
export declare function logSeedEffects(): void;
|
|
8529
|
+
export declare function logSeedEffects(this: void): void;
|
|
8526
8530
|
|
|
8527
|
-
export declare function logSet(set: Set<AnyNotNil> | ReadonlySet<AnyNotNil>): void;
|
|
8531
|
+
export declare function logSet(this: void, set: Set<AnyNotNil> | ReadonlySet<AnyNotNil>): void;
|
|
8528
8532
|
|
|
8529
8533
|
/** Helper function for logging every sound effect that is currently playing. */
|
|
8530
|
-
export declare function logSounds(): void;
|
|
8534
|
+
export declare function logSounds(this: void): void;
|
|
8531
8535
|
|
|
8532
8536
|
/**
|
|
8533
8537
|
* Helper function for logging every key and value of a Lua table. This is a deep log; the function
|
|
@@ -8539,13 +8543,13 @@ export declare function logSounds(): void;
|
|
|
8539
8543
|
* In order to prevent infinite recursion, this function will not log a sub-table when there are 10
|
|
8540
8544
|
* or more parent tables.
|
|
8541
8545
|
*/
|
|
8542
|
-
export declare function logTable(luaTable: unknown, parentTables?: number): void;
|
|
8546
|
+
export declare function logTable(this: void, luaTable: unknown, parentTables?: number): void;
|
|
8543
8547
|
|
|
8544
8548
|
/**
|
|
8545
8549
|
* Helper function to print out the differences between the entries of two tables. Note that this
|
|
8546
8550
|
* will only do a shallow comparison.
|
|
8547
8551
|
*/
|
|
8548
|
-
export declare function logTableDifferences<K extends AnyNotNil, V>(table1: LuaMap<K, V>, table2: LuaMap<K, V>): void;
|
|
8552
|
+
export declare function logTableDifferences<K extends AnyNotNil, V>(this: void, table1: LuaMap<K, V>, table2: LuaMap<K, V>): void;
|
|
8549
8553
|
|
|
8550
8554
|
/**
|
|
8551
8555
|
* Helper function to log the keys of a Lua table. This is not a deep log; only the keys of the
|
|
@@ -8553,21 +8557,21 @@ export declare function logTableDifferences<K extends AnyNotNil, V>(table1: LuaM
|
|
|
8553
8557
|
*
|
|
8554
8558
|
* This function is useful for tables that have recursive references.
|
|
8555
8559
|
*/
|
|
8556
|
-
export declare function logTableKeys(luaTable: unknown): void;
|
|
8560
|
+
export declare function logTableKeys(this: void, luaTable: unknown): void;
|
|
8557
8561
|
|
|
8558
8562
|
/** Helper function for printing out every tear flag that is turned on. Useful when debugging. */
|
|
8559
|
-
export declare function logTearFlags(flags: TearFlag | BitFlags<TearFlag>): void;
|
|
8563
|
+
export declare function logTearFlags(this: void, flags: TearFlag | BitFlags<TearFlag>): void;
|
|
8560
8564
|
|
|
8561
8565
|
/** Helper function for printing out every use flag that is turned on. Useful when debugging. */
|
|
8562
|
-
export declare function logUseFlags(flags: UseFlag | BitFlags<UseFlag>): void;
|
|
8566
|
+
export declare function logUseFlags(this: void, flags: UseFlag | BitFlags<UseFlag>): void;
|
|
8563
8567
|
|
|
8564
8568
|
/**
|
|
8565
8569
|
* Helper function to enumerate all of the properties of a "userdata" object (i.e. an object from
|
|
8566
8570
|
* the Isaac API).
|
|
8567
8571
|
*/
|
|
8568
|
-
export declare function logUserdata(userdata: unknown): void;
|
|
8572
|
+
export declare function logUserdata(this: void, userdata: unknown): void;
|
|
8569
8573
|
|
|
8570
|
-
export declare function logVector(vector: Vector, round?: boolean): void;
|
|
8574
|
+
export declare function logVector(this: void, vector: Vector, round?: boolean): void;
|
|
8571
8575
|
|
|
8572
8576
|
/** Helper type to match all of the lowercase keys of an object. */
|
|
8573
8577
|
export declare type LowercaseKeys<T> = StartsWithLowercase<keyof T>;
|
|
@@ -15097,7 +15101,7 @@ export declare function todo(...args: unknown[]): void;
|
|
|
15097
15101
|
* This will only work if the `--luadebug` launch option is enabled or the Racing+ sandbox is
|
|
15098
15102
|
* enabled.
|
|
15099
15103
|
*/
|
|
15100
|
-
export declare function traceback(): void;
|
|
15104
|
+
export declare function traceback(this: void): void;
|
|
15101
15105
|
|
|
15102
15106
|
/** Maps transformation names to the values of the `PlayerForm` enum. */
|
|
15103
15107
|
export declare const TRANSFORMATION_NAME_TO_PLAYER_FORM_MAP: ReadonlyMap<string, PlayerForm>;
|