isaacscript-common 26.2.0 → 26.3.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.
Files changed (50) hide show
  1. package/dist/index.rollup.d.ts +82 -8
  2. package/dist/isaacscript-common.lua +106 -57
  3. package/dist/src/classes/features/other/ModdedElementSets.d.ts.map +1 -1
  4. package/dist/src/classes/features/other/ModdedElementSets.lua +4 -2
  5. package/dist/src/classes/features/other/Pause.d.ts.map +1 -1
  6. package/dist/src/classes/features/other/Pause.lua +3 -2
  7. package/dist/src/functions/array.d.ts.map +1 -1
  8. package/dist/src/functions/array.lua +3 -2
  9. package/dist/src/functions/doors.d.ts.map +1 -1
  10. package/dist/src/functions/doors.lua +4 -2
  11. package/dist/src/functions/enums.d.ts.map +1 -1
  12. package/dist/src/functions/enums.lua +3 -2
  13. package/dist/src/functions/gridEntities.lua +3 -3
  14. package/dist/src/functions/logMisc.d.ts +51 -8
  15. package/dist/src/functions/logMisc.d.ts.map +1 -1
  16. package/dist/src/functions/logMisc.lua +69 -21
  17. package/dist/src/functions/players.d.ts.map +1 -1
  18. package/dist/src/functions/players.lua +6 -5
  19. package/dist/src/functions/random.d.ts.map +1 -1
  20. package/dist/src/functions/random.lua +3 -2
  21. package/dist/src/functions/roomShapeWalls.d.ts.map +1 -1
  22. package/dist/src/functions/roomShapeWalls.lua +12 -11
  23. package/dist/src/functions/rooms.d.ts.map +1 -1
  24. package/dist/src/functions/rooms.lua +3 -2
  25. package/dist/src/functions/set.d.ts.map +1 -1
  26. package/dist/src/functions/set.lua +3 -1
  27. package/dist/src/functions/utils.d.ts.map +1 -1
  28. package/dist/src/functions/utils.lua +3 -2
  29. package/dist/src/functions/vector.d.ts +7 -0
  30. package/dist/src/functions/vector.d.ts.map +1 -1
  31. package/dist/src/functions/vector.lua +5 -0
  32. package/dist/src/index.d.ts +1 -0
  33. package/dist/src/index.d.ts.map +1 -1
  34. package/dist/src/index.lua +8 -0
  35. package/package.json +1 -1
  36. package/src/classes/features/other/ModdedElementSets.ts +3 -2
  37. package/src/classes/features/other/Pause.ts +2 -1
  38. package/src/functions/array.ts +2 -1
  39. package/src/functions/doors.ts +3 -2
  40. package/src/functions/enums.ts +2 -1
  41. package/src/functions/gridEntities.ts +3 -3
  42. package/src/functions/logMisc.ts +99 -20
  43. package/src/functions/players.ts +5 -4
  44. package/src/functions/random.ts +2 -1
  45. package/src/functions/roomShapeWalls.ts +6 -5
  46. package/src/functions/rooms.ts +2 -1
  47. package/src/functions/set.ts +2 -1
  48. package/src/functions/utils.ts +2 -1
  49. package/src/functions/vector.ts +7 -0
  50. package/src/index.ts +1 -0
@@ -8722,12 +8722,29 @@ export declare function logAllGridEntities(this: void, includeWalls?: boolean, g
8722
8722
  */
8723
8723
  export declare function logAndPrint(msg: string): void;
8724
8724
 
8725
- /** Helper function to enumerate all of the values in an array. */
8726
- export declare function logArray<T>(this: void, array: T[] | readonly T[]): void;
8725
+ /**
8726
+ * Helper function to log all of the values in an array.
8727
+ *
8728
+ * @param array The array to log.
8729
+ * @param name Optional. The name of the array, which will be logged before the elements.
8730
+ */
8731
+ export declare function logArray<T>(this: void, array: T[] | readonly T[], name?: string): void;
8727
8732
 
8728
- export declare function logCollectibleTypes(this: void, collectibleTypes: CollectibleType[]): void;
8733
+ /**
8734
+ * Helper function to log the names of a collectible type array.
8735
+ *
8736
+ * @param collectibleTypes The collectible types to log.
8737
+ * @param name Optional. The name of the array, which will be logged before the elements.
8738
+ */
8739
+ export declare function logCollectibleTypes(this: void, collectibleTypes: CollectibleType[], name?: string): void;
8729
8740
 
8730
- export declare function logColor(this: void, color: Color): void;
8741
+ /**
8742
+ * Helper function to log a `Color` object.
8743
+ *
8744
+ * @param color The `Color` object to log.
8745
+ * @param name Optional. The name of the object, which will be logged before the properties.
8746
+ */
8747
+ export declare function logColor(this: void, color: Color, name?: string): void;
8731
8748
 
8732
8749
  /** Helper function for printing out every damage flag that is turned on. Useful when debugging. */
8733
8750
  export declare function logDamageFlags(this: void, flags: DamageFlag | BitFlags<DamageFlag>): void;
@@ -8765,14 +8782,26 @@ export declare function logGridEntities(this: void, gridEntities: GridEntity[]):
8765
8782
  /** Helper function for log information about a specific grid entity. */
8766
8783
  export declare function logGridEntity(this: void, gridEntity: GridEntity): void;
8767
8784
 
8768
- export declare function logKColor(this: void, kColor: KColor): void;
8785
+ /**
8786
+ * Helper function to log a `KColor` object.
8787
+ *
8788
+ * @param kColor The `KColor` object to log.
8789
+ * @param name Optional. The name of the object, which will be logged before the properties.
8790
+ */
8791
+ export declare function logKColor(this: void, kColor: KColor, name?: string): void;
8769
8792
 
8770
8793
  /**
8771
8794
  * Helper function for printing out every level state flag that is turned on. Useful when debugging.
8772
8795
  */
8773
8796
  export declare function logLevelStateFlags(this: void): void;
8774
8797
 
8775
- export declare function logMap(this: void, map: Map<AnyNotNil, unknown>): void;
8798
+ /**
8799
+ * Helper function to log a TSTL `Map`.
8800
+ *
8801
+ * @param map The TSTL `Map` to log.
8802
+ * @param name Optional. The name of the map, which will be logged before the elements.
8803
+ */
8804
+ export declare function logMap(this: void, map: Map<AnyNotNil, unknown>, name?: string): void;
8776
8805
 
8777
8806
  export declare function logMusic(this: void): void;
8778
8807
 
@@ -8808,7 +8837,13 @@ export declare function logRoom(this: void): void;
8808
8837
  */
8809
8838
  export declare function logSeedEffects(this: void): void;
8810
8839
 
8811
- export declare function logSet(this: void, set: Set<AnyNotNil> | ReadonlySet<AnyNotNil>): void;
8840
+ /**
8841
+ * Helper function to log a TSTL `Set`.
8842
+ *
8843
+ * @param set The TSTL `Set` to log.
8844
+ * @param name Optional. The name of the set, which will be logged before the elements.
8845
+ */
8846
+ export declare function logSet(this: void, set: Set<AnyNotNil> | ReadonlySet<AnyNotNil>, name?: string): void;
8812
8847
 
8813
8848
  /** Helper function for logging every sound effect that is currently playing. */
8814
8849
  export declare function logSounds(this: void): void;
@@ -8851,7 +8886,15 @@ export declare function logUseFlags(this: void, flags: UseFlag | BitFlags<UseFla
8851
8886
  */
8852
8887
  export declare function logUserdata(this: void, userdata: unknown): void;
8853
8888
 
8854
- export declare function logVector(this: void, vector: Vector, round?: boolean): void;
8889
+ /**
8890
+ * Helper function to log a `Vector` object.
8891
+ *
8892
+ * @param vector The `Vector` object to log.
8893
+ * @param name Optional. The name of the object, which will be logged before the properties.
8894
+ * @param round Optional. If true, will round the vector values to the nearest integer. Default is
8895
+ * false.
8896
+ */
8897
+ export declare function logVector(this: void, vector: Vector, name?: string, round?: boolean): void;
8855
8898
 
8856
8899
  /** Helper type to match all of the lowercase keys of an object. */
8857
8900
  export declare type LowercaseKeys<T> = StartsWithLowercase<keyof T>;
@@ -12007,6 +12050,30 @@ export declare function newPickingUpItem(): PickingUpItem;
12007
12050
  /** Returns a `PlayerHealth` object with all zeros. */
12008
12051
  export declare function newPlayerHealth(): PlayerHealth;
12009
12052
 
12053
+ /**
12054
+ * Helper function to create a read-only `Color` object. (Otherwise, you would have to manually
12055
+ * specify both the type and the constructor.)
12056
+ *
12057
+ * Note that read-only colors will be writable at run-time.
12058
+ */
12059
+ export declare function newReadonlyColor(r: float, g: float, b: float, a?: float, ro?: int, go?: int, bo?: int): Readonly<Color>;
12060
+
12061
+ /**
12062
+ * Helper function to create a read-only `KColor` object. (Otherwise, you would have to manually
12063
+ * specify both the type and the constructor.)
12064
+ *
12065
+ * Note that read-only colors will be writable at run-time.
12066
+ */
12067
+ export declare function newReadonlyKColor(r: float, g: float, b: float, a: float): Readonly<KColor>;
12068
+
12069
+ /**
12070
+ * Helper function to create a read-only `Vector` object. (Otherwise, you would have to manually
12071
+ * specify both the type and the constructor.)
12072
+ *
12073
+ * Note that read-only vectors will be writable at run-time.
12074
+ */
12075
+ export declare function newReadonlyVector(x: float, y: float): Readonly<Vector>;
12076
+
12010
12077
  /**
12011
12078
  * Helper function to initialize a new RNG object using Blade's recommended shift index.
12012
12079
  *
@@ -15696,6 +15763,13 @@ export declare const VectorOne: Readonly<Vector>;
15696
15763
  /** Helper function for finding out which way a vector is pointing. */
15697
15764
  export declare function vectorToDirection(vector: Vector): Direction;
15698
15765
 
15766
+ /**
15767
+ * Helper function to convert a vector to a string.
15768
+ *
15769
+ * @param vector The vector to convert.
15770
+ * @param round Optional. If true, will round the vector values to the nearest integer. Default is
15771
+ * false.
15772
+ */
15699
15773
  export declare function vectorToString(vector: Vector, round?: boolean): string;
15700
15774
 
15701
15775
  /**