isaacscript-common 16.1.5 → 16.1.7

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.
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 16.1.5
3
+ isaacscript-common 16.1.7
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -24954,11 +24954,11 @@ function ____exports.findFreePosition(self, startingPosition, avoidActiveEntitie
24954
24954
  local room = game:GetRoom()
24955
24955
  local heavenDoors = getEffects(nil, EffectVariant.HEAVEN_LIGHT_DOOR, HeavenLightDoorSubType.HEAVEN_DOOR)
24956
24956
  do
24957
- local i = 0
24958
- while i < MAX_FIND_FREE_POSITION_ATTEMPTS do
24957
+ local initialStep = 0
24958
+ while initialStep < MAX_FIND_FREE_POSITION_ATTEMPTS do
24959
24959
  do
24960
- local position = room:FindFreePickupSpawnPosition(startingPosition, i, avoidActiveEntities)
24961
- local closePlayer = getPlayerCloserThan(nil, position, DISTANCE_OF_GRID_TILE)
24960
+ local position = room:FindFreePickupSpawnPosition(startingPosition, initialStep, avoidActiveEntities)
24961
+ local closePlayer = getPlayerCloserThan(nil, position, DISTANCE_OF_GRID_TILE * 1.5)
24962
24962
  if closePlayer ~= nil then
24963
24963
  goto __continue7
24964
24964
  end
@@ -24975,7 +24975,7 @@ function ____exports.findFreePosition(self, startingPosition, avoidActiveEntitie
24975
24975
  return position
24976
24976
  end
24977
24977
  ::__continue7::
24978
- i = i + 1
24978
+ initialStep = initialStep + 1
24979
24979
  end
24980
24980
  end
24981
24981
  return room:FindFreePickupSpawnPosition(startingPosition)
@@ -35357,6 +35357,7 @@ __TS__ClassExtends(DisableInputs, Feature)
35357
35357
  function DisableInputs.prototype.____constructor(self)
35358
35358
  Feature.prototype.____constructor(self)
35359
35359
  self.v = {run = {
35360
+ __ignoreGlowingHourGlass = true,
35360
35361
  disableInputs = __TS__New(Map),
35361
35362
  enableAllInputsWithBlacklistMap = __TS__New(Map),
35362
35363
  disableAllInputsWithWhitelistMap = __TS__New(Map)
@@ -1 +1 @@
1
- {"version":3,"file":"DisableInputs.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/DisableInputs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,aAAc,SAAQ,OAAO;IA0CxC,OAAO,CAAC,eAAe,CAIsB;IAG7C,OAAO,CAAC,iBAAiB,CAIoB;IAG7C,OAAO,CAAC,cAAc,CAIwB;IAE9C,OAAO,CAAC,cAAc;IAwBtB;;;;;;;;OAQG;IAEI,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKzC;;;;;;;;;;;;;OAaG;IAEI,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,YAAY,EAAE,GAAG,IAAI;IAKzE;;;;;;;;;;OAUG;IAEI,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK1C;;;;;;;;;;;OAWG;IAEI,wBAAwB,CAC7B,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,GACvD,IAAI;IAKP;;;;;;;;;;;OAWG;IAEI,yBAAyB,CAC9B,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,GACvD,IAAI;IAKP;;;;;;;;;;;OAWG;IAEI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK/C;;;;;;;;;;OAUG;IAEI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAIhD"}
1
+ {"version":3,"file":"DisableInputs.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/DisableInputs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAEhD,qBAAa,aAAc,SAAQ,OAAO;IAiDxC,OAAO,CAAC,eAAe,CAIsB;IAG7C,OAAO,CAAC,iBAAiB,CAIoB;IAG7C,OAAO,CAAC,cAAc,CAIwB;IAE9C,OAAO,CAAC,cAAc;IAwBtB;;;;;;;;OAQG;IAEI,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKzC;;;;;;;;;;;;;OAaG;IAEI,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,YAAY,EAAE,GAAG,IAAI;IAKzE;;;;;;;;;;OAUG;IAEI,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK1C;;;;;;;;;;;OAWG;IAEI,wBAAwB,CAC7B,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,GACvD,IAAI;IAKP;;;;;;;;;;;OAWG;IAEI,yBAAyB,CAC9B,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,GACvD,IAAI;IAKP;;;;;;;;;;;OAWG;IAEI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK/C;;;;;;;;;;OAUG;IAEI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAIhD"}
@@ -24,6 +24,7 @@ __TS__ClassExtends(DisableInputs, Feature)
24
24
  function DisableInputs.prototype.____constructor(self)
25
25
  Feature.prototype.____constructor(self)
26
26
  self.v = {run = {
27
+ __ignoreGlowingHourGlass = true,
27
28
  disableInputs = __TS__New(Map),
28
29
  enableAllInputsWithBlacklistMap = __TS__New(Map),
29
30
  disableAllInputsWithWhitelistMap = __TS__New(Map)
@@ -1 +1 @@
1
- {"version":3,"file":"positionVelocity.d.ts","sourceRoot":"","sources":["../../../src/functions/positionVelocity.ts"],"names":[],"mappings":";;;;AAaA,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAAE,EAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,GAAG,GACZ,OAAO,CAIT;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,KAAK,GACd,OAAO,CAKT;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,gBAAgB,EAAE,MAAM,EACxB,mBAAmB,UAAQ,EAC3B,eAAe,CAAC,EAAE,KAAK,GACtB,MAAM,CAwCR;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAY5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAY7E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,EACrC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,IAAI,CAYN;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,EACtC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,IAAI,CAYN"}
1
+ {"version":3,"file":"positionVelocity.d.ts","sourceRoot":"","sources":["../../../src/functions/positionVelocity.ts"],"names":[],"mappings":";;;;AAaA,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAAE,EAClB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,GAAG,GACZ,OAAO,CAIT;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,KAAK,GACd,OAAO,CAKT;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,gBAAgB,EAAE,MAAM,EACxB,mBAAmB,UAAQ,EAC3B,eAAe,CAAC,EAAE,KAAK,GACtB,MAAM,CA8CR;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAY5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAY7E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAChC,eAAe,EAAE,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,EACrC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,IAAI,CAYN;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,EACtC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAClB,IAAI,CAYN"}
@@ -58,7 +58,7 @@ function ____exports.findFreePosition(self, startingPosition, avoidActiveEntitie
58
58
  while i < MAX_FIND_FREE_POSITION_ATTEMPTS do
59
59
  do
60
60
  local position = room:FindFreePickupSpawnPosition(startingPosition, i, avoidActiveEntities)
61
- local closePlayer = getPlayerCloserThan(nil, position, DISTANCE_OF_GRID_TILE)
61
+ local closePlayer = getPlayerCloserThan(nil, position, DISTANCE_OF_GRID_TILE * 1.5)
62
62
  if closePlayer ~= nil then
63
63
  goto __continue7
64
64
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "16.1.5",
3
+ "version": "16.1.7",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -11,6 +11,13 @@ export class DisableInputs extends Feature {
11
11
  /** @internal */
12
12
  public override v = {
13
13
  run: {
14
+ /**
15
+ * Glowing Hour Glass support is disabled by default since it can cause bugs with
16
+ * extra-gameplay features. (For example, whether the player should be able to move or not
17
+ * should often not be reset by the Glowing Hour Glass.)
18
+ */
19
+ __ignoreGlowingHourGlass: true,
20
+
14
21
  /** Indexed by the requesting feature key. */
15
22
  disableInputs: new Map<string, ReadonlySet<ButtonAction>>(),
16
23
 
@@ -61,14 +61,24 @@ export function findFreePosition(
61
61
  HeavenLightDoorSubType.HEAVEN_DOOR,
62
62
  );
63
63
 
64
- for (let i = 0; i < MAX_FIND_FREE_POSITION_ATTEMPTS; i++) {
64
+ for (
65
+ let initialStep = 0;
66
+ initialStep < MAX_FIND_FREE_POSITION_ATTEMPTS;
67
+ initialStep++
68
+ ) {
65
69
  const position = room.FindFreePickupSpawnPosition(
66
70
  startingPosition,
67
- i,
71
+ initialStep,
68
72
  avoidActiveEntities,
69
73
  );
70
74
 
71
- const closePlayer = getPlayerCloserThan(position, DISTANCE_OF_GRID_TILE);
75
+ const closePlayer = getPlayerCloserThan(
76
+ position,
77
+ // If we use a multiplier of 1.0, certain enemies might spawn directly next to a player, which
78
+ // is not technically unavoidable damage, but still a little bit unfair. Thus, we use a
79
+ // multiplier of 1.5.
80
+ DISTANCE_OF_GRID_TILE * 1.5,
81
+ );
72
82
  if (closePlayer !== undefined) {
73
83
  continue;
74
84
  }