isaacscript-common 1.2.256 → 1.2.257

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.
@@ -116,5 +116,13 @@ export declare const TRINKET_ID_MASK = 32767;
116
116
  * corner.
117
117
  */
118
118
  export declare const UI_HEART_WIDTH = 12;
119
+ /**
120
+ * This is a safer version of the `Vector.One` constant. (Other mods can mutate this vector, so it
121
+ * is not safe to use.)
122
+ */
119
123
  export declare const VectorOne: ReadonlyVector;
124
+ /**
125
+ * This is a safer version of the `Vector.Zero` constant. (Other mods can mutate this vector, so it
126
+ * is not safe to use.)
127
+ */
120
128
  export declare const VectorZero: ReadonlyVector;
@@ -19,6 +19,7 @@ export declare function colorEquals(color1: Color, color2: Color): boolean;
19
19
  */
20
20
  export declare function copyColor<C extends Color | SerializedColor, S extends SerializationType>(color: C, serializationType: S): CopyColorReturn[S];
21
21
  export declare function copyColor<C extends Color | SerializedColor>(color: C): CopyColorReturn[SerializationType.NONE];
22
+ /** Returns `Color(1, 1, 1)`. */
22
23
  export declare function getDefaultColor(): Color;
23
24
  /** Helper function to check if something is an instantiated Color object. */
24
25
  export declare function isColor(object: unknown): object is Color;
@@ -66,7 +66,7 @@ export declare function isEntityMoving(entity: Entity, threshold?: number): bool
66
66
  * Baby, Mega Satan, The Beast, and so on. This is useful because certain effects should only apply
67
67
  * to non-story bosses, like Vanishing Twin. Also see the `STORY_BOSSES` constant.
68
68
  */
69
- export declare function isStoryBoss(entity: Entity): boolean;
69
+ export declare function isStoryBoss(entityType: EntityType | int): boolean;
70
70
  /**
71
71
  * Helper function to remove all of the matching entities in the room.
72
72
  *
@@ -108,8 +108,8 @@ function ____exports.isEntityMoving(self, entity, threshold)
108
108
  end
109
109
  return entity.Velocity:Length() >= threshold
110
110
  end
111
- function ____exports.isStoryBoss(self, entity)
112
- return STORY_BOSSES_SET:has(entity.Type)
111
+ function ____exports.isStoryBoss(self, entityType)
112
+ return STORY_BOSSES_SET:has(entityType)
113
113
  end
114
114
  function ____exports.removeAllMatchingEntities(self, entityType, entityVariant, entitySubType, cap)
115
115
  if entityVariant == nil then
@@ -18,6 +18,7 @@ interface CopyKColorReturn {
18
18
  */
19
19
  export declare function copyKColor<K extends KColor | SerializedKColor, S extends SerializationType>(kColor: K, serializationType: S): CopyKColorReturn[S];
20
20
  export declare function copyKColor<K extends KColor | SerializedKColor>(kColor: K): CopyKColorReturn[SerializationType.NONE];
21
+ /** Returns `KColor(1, 1, 1, 1)`. */
21
22
  export declare function getDefaultKColor(): KColor;
22
23
  /** Helper function to check if something is an instantiated KColor object. */
23
24
  export declare function isKColor(object: unknown): object is KColor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.256",
3
+ "version": "1.2.257",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",