isaacscript-common 55.0.0 → 55.1.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.
@@ -8030,6 +8030,13 @@ export declare type HasFunction<T> = Record<string, unknown> extends {
8030
8030
  [K in keyof T as T[K] extends Function ? K : never]-?: 1;
8031
8031
  } ? never : T;
8032
8032
 
8033
+ /**
8034
+ * Helper function to check if a player has homing tears.
8035
+ *
8036
+ * Under the hood, this checks the `EntityPlayer.TearFlags` variable for `TearFlag.HOMING` (1 << 2).
8037
+ */
8038
+ export declare function hasHoming(player: EntityPlayer): boolean;
8039
+
8033
8040
  /** After touching a white fire, a player will turn into The Lost until they clear a room. */
8034
8041
  export declare function hasLostCurse(player: EntityPlayer): boolean;
8035
8042
 
@@ -8064,14 +8071,16 @@ export declare function hasOpenTrinketSlot(player: EntityPlayer): boolean;
8064
8071
  /**
8065
8072
  * Helper function to check if a player has piercing tears.
8066
8073
  *
8067
- * Under the hood, this checks the `EntityPlayer.TearFlags` variable.
8074
+ * Under the hood, this checks the `EntityPlayer.TearFlags` variable for `TearFlag.PIERCING` (1 <<
8075
+ * 1).
8068
8076
  */
8069
8077
  export declare function hasPiercing(player: EntityPlayer): boolean;
8070
8078
 
8071
8079
  /**
8072
8080
  * Helper function to check if a player has spectral tears.
8073
8081
  *
8074
- * Under the hood, this checks the `EntityPlayer.TearFlags` variable.
8082
+ * Under the hood, this checks the `EntityPlayer.TearFlags` variable for `TearFlag.SPECTRAL` (1 <<
8083
+ * 0).
8075
8084
  */
8076
8085
  export declare function hasSpectral(player: EntityPlayer): boolean;
8077
8086
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 55.0.0
3
+ isaacscript-common 55.1.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -19789,6 +19789,9 @@ function ____exports.hasForm(self, player, ...)
19789
19789
  function(____, playerForm) return player:HasPlayerForm(playerForm) end
19790
19790
  )
19791
19791
  end
19792
+ function ____exports.hasHoming(self, player)
19793
+ return hasFlag(nil, player.TearFlags, TearFlag.HOMING)
19794
+ end
19792
19795
  function ____exports.hasLostCurse(self, player)
19793
19796
  local effects = player:GetEffects()
19794
19797
  return effects:HasNullEffect(NullItemID.LOST_CURSE)
@@ -34410,12 +34413,12 @@ function PreRoomEntitySpawnFilter.prototype.____constructor(self)
34410
34413
  local callbackEntityTypeOrGridEntityXMLType, callbackVariant, callbackSubType = table.unpack(optionalArgs)
34411
34414
  return (callbackEntityTypeOrGridEntityXMLType == nil or callbackEntityTypeOrGridEntityXMLType == entityTypeOrGridEntityXMLType) and (callbackVariant == nil or callbackVariant == variant) and (callbackSubType == nil or callbackSubType == subType)
34412
34415
  end
34413
- self.preRoomEntitySpawn = function(____, entityTypeOrGridEntityXMLType, variant, subType, gridIndex, seed) return self:fire(
34416
+ self.preRoomEntitySpawn = function(____, entityTypeOrGridEntityXMLType, variant, subType, gridIndex, initSeed) return self:fire(
34414
34417
  entityTypeOrGridEntityXMLType,
34415
34418
  variant,
34416
34419
  subType,
34417
34420
  gridIndex,
34418
- seed
34421
+ initSeed
34419
34422
  ) end
34420
34423
  self.callbacksUsed = {{ModCallback.PRE_ROOM_ENTITY_SPAWN, self.preRoomEntitySpawn}}
34421
34424
  end
@@ -1 +1 @@
1
- {"version":3,"file":"PreRoomEntitySpawnFilter.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PreRoomEntitySpawnFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,KAAK,CAAC,GAAG,iBAAiB,CAAC,4BAA4B,CAAC;AAExD,qBAAa,wBAAyB,SAAQ,cAAc,CAAC,CAAC,CAAC;;IAU7D,UAAmB,UAAU,+RAG1B,OAAO,CAeR;IAGF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAO2C;CAC/E"}
1
+ {"version":3,"file":"PreRoomEntitySpawnFilter.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PreRoomEntitySpawnFilter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,iBAAiB,EAClB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,KAAK,CAAC,GAAG,iBAAiB,CAAC,4BAA4B,CAAC;AAExD,qBAAa,wBAAyB,SAAQ,cAAc,CAAC,CAAC,CAAC;;IAU7D,UAAmB,UAAU,+RAG1B,OAAO,CAeR;IAGF,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAa/B;CACL"}
@@ -17,12 +17,12 @@ function PreRoomEntitySpawnFilter.prototype.____constructor(self)
17
17
  local callbackEntityTypeOrGridEntityXMLType, callbackVariant, callbackSubType = table.unpack(optionalArgs)
18
18
  return (callbackEntityTypeOrGridEntityXMLType == nil or callbackEntityTypeOrGridEntityXMLType == entityTypeOrGridEntityXMLType) and (callbackVariant == nil or callbackVariant == variant) and (callbackSubType == nil or callbackSubType == subType)
19
19
  end
20
- self.preRoomEntitySpawn = function(____, entityTypeOrGridEntityXMLType, variant, subType, gridIndex, seed) return self:fire(
20
+ self.preRoomEntitySpawn = function(____, entityTypeOrGridEntityXMLType, variant, subType, gridIndex, initSeed) return self:fire(
21
21
  entityTypeOrGridEntityXMLType,
22
22
  variant,
23
23
  subType,
24
24
  gridIndex,
25
- seed
25
+ initSeed
26
26
  ) end
27
27
  self.callbacksUsed = {{ModCallback.PRE_ROOM_ENTITY_SPAWN, self.preRoomEntitySpawn}}
28
28
  end
@@ -135,18 +135,26 @@ export declare function getPlayersWithControllerIndex(controllerIndex: Controlle
135
135
  * check for. Returns true if the player has any of the supplied transformations.
136
136
  */
137
137
  export declare function hasForm(player: EntityPlayer, ...playerForms: PlayerForm[]): boolean;
138
+ /**
139
+ * Helper function to check if a player has homing tears.
140
+ *
141
+ * Under the hood, this checks the `EntityPlayer.TearFlags` variable for `TearFlag.HOMING` (1 << 2).
142
+ */
143
+ export declare function hasHoming(player: EntityPlayer): boolean;
138
144
  /** After touching a white fire, a player will turn into The Lost until they clear a room. */
139
145
  export declare function hasLostCurse(player: EntityPlayer): boolean;
140
146
  /**
141
147
  * Helper function to check if a player has piercing tears.
142
148
  *
143
- * Under the hood, this checks the `EntityPlayer.TearFlags` variable.
149
+ * Under the hood, this checks the `EntityPlayer.TearFlags` variable for `TearFlag.PIERCING` (1 <<
150
+ * 1).
144
151
  */
145
152
  export declare function hasPiercing(player: EntityPlayer): boolean;
146
153
  /**
147
154
  * Helper function to check if a player has spectral tears.
148
155
  *
149
- * Under the hood, this checks the `EntityPlayer.TearFlags` variable.
156
+ * Under the hood, this checks the `EntityPlayer.TearFlags` variable for `TearFlag.SPECTRAL` (1 <<
157
+ * 0).
150
158
  */
151
159
  export declare function hasSpectral(player: EntityPlayer): boolean;
152
160
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAEL,eAAe,EACf,eAAe,EACf,UAAU,EACV,UAAU,EACV,UAAU,EAEX,MAAM,8BAA8B,CAAC;AAatC,wFAAwF;AACxF,wBAAgB,6BAA6B,CAC3C,eAAe,EAAE,eAAe,GAC/B,OAAO,CAOT;AAED,iFAAiF;AACjF,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAOtE;AAED,oFAAoF;AACpF,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAO3E;AAED;;;GAGG;A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EAAE,YAAY,GAAG,OAAO,CAMvD;AAED,8FAA8F;AAC9F,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAM9D;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAG7D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN"}
@@ -315,6 +315,12 @@ function ____exports.hasForm(self, player, ...)
315
315
  function(____, playerForm) return player:HasPlayerForm(playerForm) end
316
316
  )
317
317
  end
318
+ --- Helper function to check if a player has homing tears.
319
+ --
320
+ -- Under the hood, this checks the `EntityPlayer.TearFlags` variable for `TearFlag.HOMING` (1 << 2).
321
+ function ____exports.hasHoming(self, player)
322
+ return hasFlag(nil, player.TearFlags, TearFlag.HOMING)
323
+ end
318
324
  --- After touching a white fire, a player will turn into The Lost until they clear a room.
319
325
  function ____exports.hasLostCurse(self, player)
320
326
  local effects = player:GetEffects()
@@ -322,13 +328,15 @@ function ____exports.hasLostCurse(self, player)
322
328
  end
323
329
  --- Helper function to check if a player has piercing tears.
324
330
  --
325
- -- Under the hood, this checks the `EntityPlayer.TearFlags` variable.
331
+ -- Under the hood, this checks the `EntityPlayer.TearFlags` variable for `TearFlag.PIERCING` (1 <<
332
+ -- 1).
326
333
  function ____exports.hasPiercing(self, player)
327
334
  return hasFlag(nil, player.TearFlags, TearFlag.PIERCING)
328
335
  end
329
336
  --- Helper function to check if a player has spectral tears.
330
337
  --
331
- -- Under the hood, this checks the `EntityPlayer.TearFlags` variable.
338
+ -- Under the hood, this checks the `EntityPlayer.TearFlags` variable for `TearFlag.SPECTRAL` (1 <<
339
+ -- 0).
332
340
  function ____exports.hasSpectral(self, player)
333
341
  return hasFlag(nil, player.TearFlags, TearFlag.SPECTRAL)
334
342
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "55.0.0",
3
+ "version": "55.1.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -45,7 +45,13 @@ export class PreRoomEntitySpawnFilter extends CustomCallback<T> {
45
45
  variant: int,
46
46
  subType: int,
47
47
  gridIndex: int,
48
- seed: Seed,
48
+ initSeed: Seed,
49
49
  ) =>
50
- this.fire(entityTypeOrGridEntityXMLType, variant, subType, gridIndex, seed);
50
+ this.fire(
51
+ entityTypeOrGridEntityXMLType,
52
+ variant,
53
+ subType,
54
+ gridIndex,
55
+ initSeed,
56
+ );
51
57
  }
@@ -373,6 +373,15 @@ export function hasForm(
373
373
  return playerForms.some((playerForm) => player.HasPlayerForm(playerForm));
374
374
  }
375
375
 
376
+ /**
377
+ * Helper function to check if a player has homing tears.
378
+ *
379
+ * Under the hood, this checks the `EntityPlayer.TearFlags` variable for `TearFlag.HOMING` (1 << 2).
380
+ */
381
+ export function hasHoming(player: EntityPlayer): boolean {
382
+ return hasFlag(player.TearFlags, TearFlag.HOMING);
383
+ }
384
+
376
385
  /** After touching a white fire, a player will turn into The Lost until they clear a room. */
377
386
  export function hasLostCurse(player: EntityPlayer): boolean {
378
387
  const effects = player.GetEffects();
@@ -382,7 +391,8 @@ export function hasLostCurse(player: EntityPlayer): boolean {
382
391
  /**
383
392
  * Helper function to check if a player has piercing tears.
384
393
  *
385
- * Under the hood, this checks the `EntityPlayer.TearFlags` variable.
394
+ * Under the hood, this checks the `EntityPlayer.TearFlags` variable for `TearFlag.PIERCING` (1 <<
395
+ * 1).
386
396
  */
387
397
  export function hasPiercing(player: EntityPlayer): boolean {
388
398
  return hasFlag(player.TearFlags, TearFlag.PIERCING);
@@ -391,7 +401,8 @@ export function hasPiercing(player: EntityPlayer): boolean {
391
401
  /**
392
402
  * Helper function to check if a player has spectral tears.
393
403
  *
394
- * Under the hood, this checks the `EntityPlayer.TearFlags` variable.
404
+ * Under the hood, this checks the `EntityPlayer.TearFlags` variable for `TearFlag.SPECTRAL` (1 <<
405
+ * 0).
395
406
  */
396
407
  export function hasSpectral(player: EntityPlayer): boolean {
397
408
  return hasFlag(player.TearFlags, TearFlag.SPECTRAL);