isaacscript-common 8.4.4 → 8.5.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 (85) hide show
  1. package/dist/callbacks/postCursedTeleport.lua +4 -4
  2. package/dist/callbacks/postPlayerFatalDamage.lua +7 -7
  3. package/dist/callbacks/postSacrifice.lua +2 -2
  4. package/dist/callbacks/postTrinketBreak.lua +2 -2
  5. package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts +2 -2
  6. package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts.map +1 -1
  7. package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +4 -4
  8. package/dist/features/characterStats.d.ts.map +1 -1
  9. package/dist/features/characterStats.lua +1 -2
  10. package/dist/features/customGridEntity.d.ts.map +1 -1
  11. package/dist/features/customGridEntity.lua +3 -36
  12. package/dist/features/extraConsoleCommands/init.d.ts.map +1 -1
  13. package/dist/features/extraConsoleCommands/init.lua +1 -1
  14. package/dist/features/firstLast.d.ts +6 -3
  15. package/dist/features/firstLast.d.ts.map +1 -1
  16. package/dist/features/firstLast.lua +6 -3
  17. package/dist/functions/bosses.d.ts +5 -2
  18. package/dist/functions/bosses.d.ts.map +1 -1
  19. package/dist/functions/bosses.lua +11 -6
  20. package/dist/functions/collectibleCacheFlag.d.ts +1 -1
  21. package/dist/functions/collectibleCacheFlag.d.ts.map +1 -1
  22. package/dist/functions/collectibleCacheFlag.lua +1 -2
  23. package/dist/functions/collectibleSet.lua +32 -32
  24. package/dist/functions/collectibleTag.d.ts +1 -1
  25. package/dist/functions/collectibleTag.d.ts.map +1 -1
  26. package/dist/functions/collectibleTag.lua +1 -3
  27. package/dist/functions/eden.d.ts +1 -1
  28. package/dist/functions/eden.d.ts.map +1 -1
  29. package/dist/functions/eden.lua +1 -2
  30. package/dist/functions/flag.d.ts +1 -1
  31. package/dist/functions/flag.lua +1 -1
  32. package/dist/functions/flying.d.ts +1 -1
  33. package/dist/functions/flying.d.ts.map +1 -1
  34. package/dist/functions/flying.lua +5 -2
  35. package/dist/functions/input.d.ts +2 -2
  36. package/dist/functions/input.d.ts.map +1 -1
  37. package/dist/functions/input.lua +2 -4
  38. package/dist/functions/playerHealth.d.ts +93 -0
  39. package/dist/functions/playerHealth.d.ts.map +1 -1
  40. package/dist/functions/playerHealth.lua +216 -33
  41. package/dist/functions/players.d.ts +1 -111
  42. package/dist/functions/players.d.ts.map +1 -1
  43. package/dist/functions/players.lua +20 -279
  44. package/dist/functions/revive.d.ts +1 -1
  45. package/dist/functions/revive.d.ts.map +1 -1
  46. package/dist/functions/revive.lua +5 -4
  47. package/dist/functions/stats.d.ts +16 -0
  48. package/dist/functions/stats.d.ts.map +1 -1
  49. package/dist/functions/stats.lua +78 -0
  50. package/dist/functions/transformations.d.ts +1 -1
  51. package/dist/functions/transformations.d.ts.map +1 -1
  52. package/dist/functions/trinketCacheFlag.d.ts +1 -1
  53. package/dist/functions/trinketCacheFlag.d.ts.map +1 -1
  54. package/dist/functions/trinketCacheFlag.lua +1 -3
  55. package/dist/functions/trinketSet.lua +32 -32
  56. package/dist/index.d.ts +22 -33
  57. package/dist/sets/bossSets.d.ts +1 -0
  58. package/dist/sets/bossSets.d.ts.map +1 -1
  59. package/dist/sets/bossSets.lua +19 -0
  60. package/package.json +2 -2
  61. package/src/callbacks/postCursedTeleport.ts +7 -7
  62. package/src/callbacks/postPlayerFatalDamage.ts +9 -16
  63. package/src/callbacks/postSacrifice.ts +5 -5
  64. package/src/callbacks/postTrinketBreak.ts +5 -5
  65. package/src/callbacks/subscriptions/postPlayerFatalDamage.ts +9 -9
  66. package/src/features/characterStats.ts +1 -2
  67. package/src/features/customGridEntity.ts +0 -55
  68. package/src/features/extraConsoleCommands/init.ts +8 -1
  69. package/src/features/firstLast.ts +6 -3
  70. package/src/functions/bosses.ts +15 -6
  71. package/src/functions/collectibleCacheFlag.ts +3 -3
  72. package/src/functions/collectibleSet.ts +32 -32
  73. package/src/functions/collectibleTag.ts +2 -3
  74. package/src/functions/eden.ts +3 -3
  75. package/src/functions/flag.ts +1 -1
  76. package/src/functions/flying.ts +4 -4
  77. package/src/functions/input.ts +4 -5
  78. package/src/functions/playerHealth.ts +269 -7
  79. package/src/functions/players.ts +1 -348
  80. package/src/functions/revive.ts +6 -10
  81. package/src/functions/stats.ts +75 -0
  82. package/src/functions/transformations.ts +1 -1
  83. package/src/functions/trinketCacheFlag.ts +2 -3
  84. package/src/functions/trinketSet.ts +32 -32
  85. package/src/sets/bossSets.ts +24 -0
@@ -28,17 +28,17 @@ local postCursedTeleportHasSubscriptions = ____postCursedTeleport.postCursedTele
28
28
  function hasSubscriptions(self)
29
29
  return postCursedTeleportHasSubscriptions(nil)
30
30
  end
31
- function entityTakeDmgPlayer(self, tookDamage, _damageAmount, damageFlags, _damageSource, _damageCountdownFrames)
31
+ function entityTakeDmgPlayer(self, entity, _amount, damageFlags, _source, _countdownFrames)
32
32
  if not hasSubscriptions(nil) then
33
33
  return nil
34
34
  end
35
35
  incrementNumSacrifices(nil, damageFlags)
36
- setDamageFrame(nil, tookDamage, damageFlags)
36
+ setDamageFrame(nil, entity, damageFlags)
37
37
  return nil
38
38
  end
39
- function setDamageFrame(self, tookDamage, damageFlags)
39
+ function setDamageFrame(self, entity, damageFlags)
40
40
  local gameFrameCount = game:GetFrameCount()
41
- local player = tookDamage:ToPlayer()
41
+ local player = entity:ToPlayer()
42
42
  if player == nil then
43
43
  return
44
44
  end
@@ -29,11 +29,11 @@ local postPlayerFatalDamageHasSubscriptions = ____postPlayerFatalDamage.postPlay
29
29
  function hasSubscriptions(self)
30
30
  return postPlayerFatalDamageHasSubscriptions(nil)
31
31
  end
32
- function entityTakeDmgPlayer(self, tookDamage, damageAmount, damageFlags, damageSource, damageCountdownFrames)
32
+ function entityTakeDmgPlayer(self, entity, amount, damageFlags, source, countdownFrames)
33
33
  if not hasSubscriptions(nil) then
34
34
  return nil
35
35
  end
36
- local player = tookDamage:ToPlayer()
36
+ local player = entity:ToPlayer()
37
37
  if player == nil then
38
38
  return nil
39
39
  end
@@ -49,8 +49,8 @@ function entityTakeDmgPlayer(self, tookDamage, damageAmount, damageFlags, damage
49
49
  if not isDamageToPlayerFatal(
50
50
  nil,
51
51
  player,
52
- damageAmount,
53
- damageSource,
52
+ amount,
53
+ source,
54
54
  lastDamageGameFrame
55
55
  ) then
56
56
  return nil
@@ -58,10 +58,10 @@ function entityTakeDmgPlayer(self, tookDamage, damageAmount, damageFlags, damage
58
58
  local shouldSustainDeath = postPlayerFatalDamageFire(
59
59
  nil,
60
60
  player,
61
- damageAmount,
61
+ amount,
62
62
  damageFlags,
63
- damageSource,
64
- damageCountdownFrames
63
+ source,
64
+ countdownFrames
65
65
  )
66
66
  if shouldSustainDeath ~= nil then
67
67
  return shouldSustainDeath
@@ -17,11 +17,11 @@ local postSacrificeHasSubscriptions = ____postSacrifice.postSacrificeHasSubscrip
17
17
  function hasSubscriptions(self)
18
18
  return postSacrificeHasSubscriptions(nil)
19
19
  end
20
- function entityTakeDmgPlayer(self, tookDamage, _damageAmount, damageFlags, _damageSource, _damageCountdownFrames)
20
+ function entityTakeDmgPlayer(self, entity, _amount, damageFlags, _source, _countdownFrames)
21
21
  if not hasSubscriptions(nil) then
22
22
  return nil
23
23
  end
24
- local player = tookDamage:ToPlayer()
24
+ local player = entity:ToPlayer()
25
25
  if player == nil then
26
26
  return nil
27
27
  end
@@ -22,11 +22,11 @@ local postTrinketBreakHasSubscriptions = ____postTrinketBreak.postTrinketBreakHa
22
22
  function hasSubscriptions(self)
23
23
  return postTrinketBreakHasSubscriptions(nil)
24
24
  end
25
- function entityTakeDmgPlayer(self, tookDamage, _damageAmount, _damageFlags, _damageSource, _damageCountdownFrames)
25
+ function entityTakeDmgPlayer(self, entity, _amount, _damageFlags, _source, _countdownFrames)
26
26
  if not hasSubscriptions(nil) then
27
27
  return nil
28
28
  end
29
- local player = tookDamage:ToPlayer()
29
+ local player = entity:ToPlayer()
30
30
  if player == nil then
31
31
  return nil
32
32
  end
@@ -1,10 +1,10 @@
1
1
  import { DamageFlag, PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
2
  export declare type PostPlayerFatalDamageRegisterParameters = [
3
- callback: (player: EntityPlayer, damageAmount: float, damageFlags: BitFlags<DamageFlag>, damageSource: EntityRef, damageCountdownFrames: int) => boolean | undefined,
3
+ callback: (player: EntityPlayer, amount: float, damageFlags: BitFlags<DamageFlag>, source: EntityRef, countdownFrames: int) => boolean | undefined,
4
4
  playerVariant?: PlayerVariant,
5
5
  character?: PlayerType
6
6
  ];
7
7
  export declare function postPlayerFatalDamageHasSubscriptions(): boolean;
8
8
  export declare function postPlayerFatalDamageRegister(...args: PostPlayerFatalDamageRegisterParameters): void;
9
- export declare function postPlayerFatalDamageFire(player: EntityPlayer, damageAmount: float, damageFlags: BitFlags<DamageFlag>, damageSource: EntityRef, damageCountdownFrames: int): boolean | undefined;
9
+ export declare function postPlayerFatalDamageFire(player: EntityPlayer, amount: float, damageFlags: BitFlags<DamageFlag>, source: EntityRef, countdownFrames: int): boolean | undefined;
10
10
  //# sourceMappingURL=postPlayerFatalDamage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postPlayerFatalDamage.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postPlayerFatalDamage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACd,MAAM,8BAA8B,CAAC;AAEtC,oBAAY,uCAAuC,GAAG;IACpD,QAAQ,EAAE,CACR,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,KAAK,EACnB,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,EACjC,YAAY,EAAE,SAAS,EACvB,qBAAqB,EAAE,GAAG,KACvB,OAAO,GAAG,SAAS;IACxB,aAAa,CAAC,EAAE,aAAa;IAC7B,SAAS,CAAC,EAAE,UAAU;CACvB,CAAC;AAIF,wBAAgB,qCAAqC,IAAI,OAAO,CAE/D;AAED,wBAAgB,6BAA6B,CAC3C,GAAG,IAAI,EAAE,uCAAuC,GAC/C,IAAI,CAEN;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,KAAK,EACnB,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,EACjC,YAAY,EAAE,SAAS,EACvB,qBAAqB,EAAE,GAAG,GACzB,OAAO,GAAG,SAAS,CA4BrB"}
1
+ {"version":3,"file":"postPlayerFatalDamage.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postPlayerFatalDamage.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACd,MAAM,8BAA8B,CAAC;AAEtC,oBAAY,uCAAuC,GAAG;IACpD,QAAQ,EAAE,CACR,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,KAAK,EACb,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,EACjC,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,GAAG,KACjB,OAAO,GAAG,SAAS;IACxB,aAAa,CAAC,EAAE,aAAa;IAC7B,SAAS,CAAC,EAAE,UAAU;CACvB,CAAC;AAIF,wBAAgB,qCAAqC,IAAI,OAAO,CAE/D;AAED,wBAAgB,6BAA6B,CAC3C,GAAG,IAAI,EAAE,uCAAuC,GAC/C,IAAI,CAEN;AAED,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,KAAK,EACb,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,EACjC,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,GAAG,GACnB,OAAO,GAAG,SAAS,CA4BrB"}
@@ -7,7 +7,7 @@ function ____exports.postPlayerFatalDamageRegister(self, ...)
7
7
  local args = {...}
8
8
  subscriptions[#subscriptions + 1] = args
9
9
  end
10
- function ____exports.postPlayerFatalDamageFire(self, player, damageAmount, damageFlags, damageSource, damageCountdownFrames)
10
+ function ____exports.postPlayerFatalDamageFire(self, player, amount, damageFlags, source, countdownFrames)
11
11
  local character = player:GetPlayerType()
12
12
  for ____, ____value in ipairs(subscriptions) do
13
13
  local callback = ____value[1]
@@ -23,10 +23,10 @@ function ____exports.postPlayerFatalDamageFire(self, player, damageAmount, damag
23
23
  local shouldSustainDeath = callback(
24
24
  nil,
25
25
  player,
26
- damageAmount,
26
+ amount,
27
27
  damageFlags,
28
- damageSource,
29
- damageCountdownFrames
28
+ source,
29
+ countdownFrames
30
30
  )
31
31
  if shouldSustainDeath ~= nil then
32
32
  return shouldSustainDeath
@@ -1 +1 @@
1
- {"version":3,"file":"characterStats.d.ts","sourceRoot":"","sources":["../../src/features/characterStats.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,SAAS,EAET,UAAU,EACX,MAAM,8BAA8B,CAAC;AAiCtC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,GAC/D,IAAI,CAGN"}
1
+ {"version":3,"file":"characterStats.d.ts","sourceRoot":"","sources":["../../src/features/characterStats.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,SAAS,EAET,UAAU,EACX,MAAM,8BAA8B,CAAC;AAgCtC;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC,SAAS,EAAE,MAAM,CAAC,GAC/D,IAAI,CAGN"}
@@ -7,9 +7,8 @@ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitio
7
7
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
8
8
  local ____featuresInitialized = require("featuresInitialized")
9
9
  local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
10
- local ____players = require("functions.players")
11
- local addStat = ____players.addStat
12
10
  local ____stats = require("functions.stats")
11
+ local addStat = ____stats.addStat
13
12
  local getDefaultPlayerStat = ____stats.getDefaultPlayerStat
14
13
  function evaluateCache(self, player, cacheFlag)
15
14
  local character = player:GetPlayerType()
@@ -1 +1 @@
1
- {"version":3,"file":"customGridEntity.d.ts","sourceRoot":"","sources":["../../src/features/customGridEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,kBAAkB,EAClB,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAkBtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AA4K1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,qBAAqB,CACnC,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,QAAQ,CAAC,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,MAAM,EACzB,kBAAkB,iBAA4B,EAC9C,qBAAqB,SAAI,GACxB,UAAU,CA8CZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS,CAuCxB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,KAAK,CAC5C;IAAC,UAAU,EAAE,UAAU;IAAE,IAAI,EAAE,oBAAoB;CAAC,CACrD,CAqBA;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,cAAc,GAAG,SAAS,CAsB5B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,OAAO,CAOT"}
1
+ {"version":3,"file":"customGridEntity.d.ts","sourceRoot":"","sources":["../../src/features/customGridEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAClB,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAgBtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAyH1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,wBAAgB,qBAAqB,CACnC,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,kBAAkB,CAAC,EAAE,kBAAkB,EACvC,QAAQ,CAAC,EAAE,MAAM,EACjB,gBAAgB,CAAC,EAAE,MAAM,EACzB,kBAAkB,iBAA4B,EAC9C,qBAAqB,SAAI,GACxB,UAAU,CA8CZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS,CAuCxB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,KAAK,CAC5C;IAAC,UAAU,EAAE,UAAU;IAAE,IAAI,EAAE,oBAAoB;CAAC,CACrD,CAqBA;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,cAAc,GAAG,SAAS,CAsB5B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,qBAAqB,EAAE,UAAU,GAAG,GAAG,GACtC,OAAO,CAOT"}
@@ -4,16 +4,12 @@ local __TS__New = ____lualib.__TS__New
4
4
  local Set = ____lualib.Set
5
5
  local __TS__Iterator = ____lualib.__TS__Iterator
6
6
  local ____exports = {}
7
- local entityTakeDmgGenericProp, preUseItemWeNeedToGoDeeper, postNewRoomReordered, v
7
+ local preUseItemWeNeedToGoDeeper, postNewRoomReordered, v
8
8
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
9
9
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
10
- local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
11
- local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
12
10
  local GridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.GridCollisionClass
13
11
  local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
14
12
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
15
- local ____postGridEntityCustomBroken = require("callbacks.subscriptions.postGridEntityCustomBroken")
16
- local postGridEntityCustomBrokenFire = ____postGridEntityCustomBroken.postGridEntityCustomBrokenFire
17
13
  local ____DefaultMap = require("classes.DefaultMap")
18
14
  local DefaultMap = ____DefaultMap.DefaultMap
19
15
  local ____cachedClasses = require("core.cachedClasses")
@@ -23,8 +19,6 @@ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
23
19
  local ____featuresInitialized = require("featuresInitialized")
24
20
  local areFeaturesInitialized = ____featuresInitialized.areFeaturesInitialized
25
21
  local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
26
- local ____flag = require("functions.flag")
27
- local hasFlag = ____flag.hasFlag
28
22
  local ____gridEntities = require("functions.gridEntities")
29
23
  local removeGridEntity = ____gridEntities.removeGridEntity
30
24
  local spawnGridEntityWithVariant = ____gridEntities.spawnGridEntityWithVariant
@@ -38,32 +32,6 @@ local ____runInNFrames = require("features.runInNFrames")
38
32
  local runNextGameFrame = ____runInNFrames.runNextGameFrame
39
33
  local ____exports = require("features.saveDataManager.exports")
40
34
  local saveDataManager = ____exports.saveDataManager
41
- function entityTakeDmgGenericProp(self, tookDamage, _damageAmount, damageFlags, _damageSource, _damageCountdownFrames)
42
- local ptrHash = GetPtrHash(tookDamage)
43
- if not v.room.genericPropPtrHashes:has(ptrHash) then
44
- return nil
45
- end
46
- if not hasFlag(nil, damageFlags, DamageFlag.EXPLOSION) then
47
- return false
48
- end
49
- local room = game:GetRoom()
50
- local roomListIndex = getRoomListIndex(nil)
51
- local roomCustomGridEntities = v.level.customGridEntities:get(roomListIndex)
52
- if roomCustomGridEntities == nil then
53
- return false
54
- end
55
- local gridIndex = room:GetGridIndex(tookDamage.Position)
56
- local data = roomCustomGridEntities:get(gridIndex)
57
- if data == nil then
58
- return false
59
- end
60
- local gridEntity = room:GetGridEntity(gridIndex)
61
- if gridEntity == nil then
62
- error("Failed to get the grid entity for a custom grid entity that broke at grid index: " .. tostring(gridIndex))
63
- end
64
- postGridEntityCustomBrokenFire(nil, gridEntity, data.gridEntityTypeCustom)
65
- return false
66
- end
67
35
  function preUseItemWeNeedToGoDeeper(self, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
68
36
  local room = game:GetRoom()
69
37
  local roomListIndex = getRoomListIndex(nil)
@@ -113,7 +81,7 @@ function postNewRoomReordered(self)
113
81
  local decoration = room:GetGridEntity(gridIndex)
114
82
  if decoration == nil then
115
83
  roomCustomGridEntities:delete(gridIndex)
116
- goto __continue19
84
+ goto __continue13
117
85
  end
118
86
  if data.anm2Path ~= nil then
119
87
  local sprite = decoration:GetSprite()
@@ -122,7 +90,7 @@ function postNewRoomReordered(self)
122
90
  sprite:Play(animationToPlay, true)
123
91
  end
124
92
  end
125
- ::__continue19::
93
+ ::__continue13::
126
94
  end
127
95
  end
128
96
  local FEATURE_NAME = "customGridEntity"
@@ -140,7 +108,6 @@ v = {
140
108
  -- @internal
141
109
  function ____exports.customGridEntityInit(self, mod)
142
110
  saveDataManager(nil, FEATURE_NAME, v)
143
- mod:AddCallback(ModCallback.ENTITY_TAKE_DMG, entityTakeDmgGenericProp, EntityType.GENERIC_PROP)
144
111
  mod:AddCallback(ModCallback.PRE_USE_ITEM, preUseItemWeNeedToGoDeeper, CollectibleType.WE_NEED_TO_GO_DEEPER)
145
112
  mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_ROOM_REORDERED, postNewRoomReordered)
146
113
  end
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/init.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAWxD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAK/D"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/init.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAWxD,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAK/D"}
@@ -208,7 +208,7 @@ function evaluateCacheFlying(self, player)
208
208
  player.CanFly = true
209
209
  end
210
210
  end
211
- function entityTakeDmgPlayer(self)
211
+ function entityTakeDmgPlayer(self, _entity, _damageAmount, _damageFlags, _damageSource, _damageCountdownFrames)
212
212
  if v.run.spamBloodRights then
213
213
  return false
214
214
  end
@@ -19,11 +19,11 @@ export declare function getLastCollectibleType(): CollectibleType;
19
19
  /**
20
20
  * Helper function to get an array that represents the all modded collectible types.
21
21
  *
22
- * This function is only useful when building collectible type objects. For most purposes, you
23
- * should use the `getModdedCollectibleSet` helper function instead.
24
- *
25
22
  * Returns an empty array if there are no modded collectible types.
26
23
  *
24
+ * This function is only useful when building collectible type objects. For most purposes, you
25
+ * should use the `getModdedCollectibleArray` or `getModdedCollectibleSet` helper function instead.
26
+ *
27
27
  * (This function is named differently from the `getVanillaCollectibleTypeRange` function because
28
28
  * all modded collectible types are contiguous. Thus, each value represents a real
29
29
  * `CollectibleType`.)
@@ -66,6 +66,9 @@ export declare function getLastTrinketType(): TrinketType;
66
66
  *
67
67
  * Returns an empty array if there are no modded trinket types.
68
68
  *
69
+ * This function is only useful when building collectible type objects. For most purposes, you
70
+ * should use the `getModdedCollectibleArray` or `getModdedCollectibleSet` helper function instead.
71
+ *
69
72
  * This function can only be called if at least one callback has been executed. This is because not
70
73
  * all trinkets will necessarily be present when a mod first loads (due to mod load order).
71
74
  */
@@ -1 +1 @@
1
- {"version":3,"file":"firstLast.d.ts","sourceRoot":"","sources":["../../src/features/firstLast.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,IAAI,EACJ,eAAe,EACf,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAwDtC;;;;;GAKG;AACH,wBAAgB,6BAA6B,IAAI,eAAe,GAAG,SAAS,CAS3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,IAAI,eAAe,CAKxD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,IAAI,eAAe,EAAE,CAW7D;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,IAAI,GAAG,CAM5C;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,IAAI,GAAG,CAMlD;AAMD;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,WAAW,GAAG,SAAS,CASnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,WAAW,CAMhD;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,IAAI,WAAW,EAAE,CAQrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,GAAG,CAKxC;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,IAAI,GAAG,CAM9C;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,WAAW,EAAE,CAG/C;AAMD;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,IAAI,EAAE,CAGpC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,GAAG,SAAS,CAOrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAMlC;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,IAAI,IAAI,EAAE,CAQvC;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAKjC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB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,CAG/C;AAMD;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,IAAI,EAAE,CAGpC;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,GAAG,SAAS,CAOrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,IAAI,IAAI,CAMlC;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,IAAI,IAAI,EAAE,CAQvC;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAKjC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CAMvC;AAMD;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,EAAE,CAGhD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,UAAU,GAAG,SAAS,CASjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,IAAI,UAAU,CAM9C;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,IAAI,UAAU,EAAE,CAQnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CAKvC;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,GAAG,CAM7C"}
@@ -146,11 +146,11 @@ function ____exports.getFirstModdedCollectibleType(self)
146
146
  end
147
147
  --- Helper function to get an array that represents the all modded collectible types.
148
148
  --
149
- -- This function is only useful when building collectible type objects. For most purposes, you
150
- -- should use the `getModdedCollectibleSet` helper function instead.
151
- --
152
149
  -- Returns an empty array if there are no modded collectible types.
153
150
  --
151
+ -- This function is only useful when building collectible type objects. For most purposes, you
152
+ -- should use the `getModdedCollectibleArray` or `getModdedCollectibleSet` helper function instead.
153
+ --
154
154
  -- (This function is named differently from the `getVanillaCollectibleTypeRange` function because
155
155
  -- all modded collectible types are contiguous. Thus, each value represents a real
156
156
  -- `CollectibleType`.)
@@ -212,6 +212,9 @@ end
212
212
  --
213
213
  -- Returns an empty array if there are no modded trinket types.
214
214
  --
215
+ -- This function is only useful when building collectible type objects. For most purposes, you
216
+ -- should use the `getModdedCollectibleArray` or `getModdedCollectibleSet` helper function instead.
217
+ --
215
218
  -- This function can only be called if at least one callback has been executed. This is because not
216
219
  -- all trinkets will necessarily be present when a mod first loads (due to mod load order).
217
220
  function ____exports.getModdedTrinketTypes(self)
@@ -20,8 +20,11 @@ export declare function getAliveBosses(entityType?: EntityType, variant?: number
20
20
  * The set contains strings with the entity type and variant, separated by a period.
21
21
  *
22
22
  * Also see the `getBossSet` and `getCombinedBossSet` functions.
23
+ *
24
+ * @param includeStoryBosses Optional. Whether to include "story" bosses like Mom and It Lives!
25
+ * Default is true.
23
26
  */
24
- export declare function getAllBossesSet(): Set<string>;
27
+ export declare function getAllBossesSet(includeStoryBosses?: boolean): ReadonlySet<string>;
25
28
  /**
26
29
  * Helper function to get the set of vanilla bosses for a particular stage and stage type
27
30
  * combination.
@@ -52,7 +55,7 @@ export declare function getBosses(entityType?: EntityType, variant?: int, subTyp
52
55
  *
53
56
  * Also see the `getAllBossesSet` and `getBossSet` functions.
54
57
  */
55
- export declare function getCombinedBossSet(stage: int): Set<string> | undefined;
58
+ export declare function getCombinedBossSet(stage: int): ReadonlySet<string> | undefined;
56
59
  /** Helper function to check if the provided NPC is a Sin miniboss, such as Sloth or Lust. */
57
60
  export declare function isSin(npc: EntityNPC): boolean;
58
61
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../src/functions/bosses.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAyBtC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5B,UAAU,GAAE,UAAe,EAC3B,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,SAAS,EAAE,CAGb;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,IAAI,GAAG,CAAC,MAAM,CAAC,CAE7C;AAED;;;;;;;GAOG;AAC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GAAE,MAAM,GAAG,SAAqB,EACvC,WAAW,CAAC,EAAE,GAAG,GAChB,SAAS,CAYX"}
@@ -10,6 +10,7 @@ local LokiVariant = ____isaac_2Dtypescript_2Ddefinitions.LokiVariant
10
10
  local ____constants = require("core.constants")
11
11
  local VectorZero = ____constants.VectorZero
12
12
  local ____bossSets = require("sets.bossSets")
13
+ local ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET = ____bossSets.ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET
13
14
  local ALL_BOSSES_SET = ____bossSets.ALL_BOSSES_SET
14
15
  local STAGE_TO_COMBINED_BOSS_SET_MAP = ____bossSets.STAGE_TO_COMBINED_BOSS_SET_MAP
15
16
  local STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP = ____bossSets.STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP
@@ -22,8 +23,6 @@ local ____npcs = require("functions.npcs")
22
23
  local getAliveNPCs = ____npcs.getAliveNPCs
23
24
  local ____rng = require("functions.rng")
24
25
  local isRNG = ____rng.isRNG
25
- local ____set = require("functions.set")
26
- local copySet = ____set.copySet
27
26
  local ____types = require("functions.types")
28
27
  local asNumber = ____types.asNumber
29
28
  local ____utils = require("functions.utils")
@@ -109,8 +108,14 @@ end
109
108
  -- The set contains strings with the entity type and variant, separated by a period.
110
109
  --
111
110
  -- Also see the `getBossSet` and `getCombinedBossSet` functions.
112
- function ____exports.getAllBossesSet(self)
113
- return copySet(nil, ALL_BOSSES_SET)
111
+ --
112
+ -- @param includeStoryBosses Optional. Whether to include "story" bosses like Mom and It Lives!
113
+ -- Default is true.
114
+ function ____exports.getAllBossesSet(self, includeStoryBosses)
115
+ if includeStoryBosses == nil then
116
+ includeStoryBosses = true
117
+ end
118
+ return includeStoryBosses and ALL_BOSSES_SET or ALL_BOSSES_EXCLUDING_STORY_BOSSES_SET
114
119
  end
115
120
  --- Helper function to get the set of vanilla bosses for a particular stage and stage type
116
121
  -- combination.
@@ -127,7 +132,7 @@ function ____exports.getBossSet(self, stage, stageType)
127
132
  if bossSet == nil then
128
133
  return nil
129
134
  end
130
- return copySet(nil, bossSet)
135
+ return bossSet
131
136
  end
132
137
  --- Helper function to get all of the bosses in the room.
133
138
  --
@@ -166,7 +171,7 @@ function ____exports.getCombinedBossSet(self, stage)
166
171
  if bossSet == nil then
167
172
  return nil
168
173
  end
169
- return copySet(nil, bossSet)
174
+ return bossSet
170
175
  end
171
176
  --- Helper function to check if the provided NPC is a Sin miniboss, such as Sloth or Lust.
172
177
  function ____exports.isSin(self, npc)
@@ -8,7 +8,7 @@ export declare function collectibleHasCacheFlag(collectibleType: CollectibleType
8
8
  * This function can only be called if at least one callback has been executed. This is because not
9
9
  * all collectibles will necessarily be present when a mod first loads (due to mod load order).
10
10
  */
11
- export declare function getCollectiblesForCacheFlag(cacheFlag: CacheFlag): Set<CollectibleType>;
11
+ export declare function getCollectiblesForCacheFlag(cacheFlag: CacheFlag): ReadonlySet<CollectibleType>;
12
12
  /**
13
13
  * Returns an array containing every collectible type that the player has that matches the provided
14
14
  * CacheFlag.
@@ -1 +1 @@
1
- {"version":3,"file":"collectibleCacheFlag.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleCacheFlag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AA+B1E,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GACnB,OAAO,CAOT;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,SAAS,GACnB,GAAG,CAAC,eAAe,CAAC,CAStB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,SAAS,GACnB,eAAe,EAAE,CAYnB"}
1
+ {"version":3,"file":"collectibleCacheFlag.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleCacheFlag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AA+B1E,iGAAiG;AACjG,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GACnB,OAAO,CAOT;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,SAAS,GACnB,WAAW,CAAC,eAAe,CAAC,CAS9B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,SAAS,GACnB,eAAe,EAAE,CAYnB"}
@@ -14,7 +14,6 @@ local getEnumValues = ____enums.getEnumValues
14
14
  local ____flag = require("functions.flag")
15
15
  local hasFlag = ____flag.hasFlag
16
16
  local ____set = require("functions.set")
17
- local copySet = ____set.copySet
18
17
  local getSortedSetValues = ____set.getSortedSetValues
19
18
  local ____utils = require("functions.utils")
20
19
  local ____repeat = ____utils["repeat"]
@@ -52,7 +51,7 @@ function ____exports.getCollectiblesForCacheFlag(self, cacheFlag)
52
51
  if collectiblesSet == nil then
53
52
  return __TS__New(Set)
54
53
  end
55
- return copySet(nil, collectiblesSet)
54
+ return collectiblesSet
56
55
  end
57
56
  --- Returns an array containing every collectible type that the player has that matches the provided
58
57
  -- CacheFlag.
@@ -8,42 +8,42 @@ local ____firstLast = require("features.firstLast")
8
8
  local getModdedCollectibleTypes = ____firstLast.getModdedCollectibleTypes
9
9
  local ____collectibles = require("functions.collectibles")
10
10
  local getVanillaCollectibleTypeRange = ____collectibles.getVanillaCollectibleTypeRange
11
- local ALL_COLLECTIBLES_ARRAY = {}
12
- local ALL_COLLECTIBLES_SET = __TS__New(Set)
13
- local VANILLA_COLLECTIBLES_ARRAY = {}
14
- local VANILLA_COLLECTIBLES_SET = __TS__New(Set)
15
- local MODDED_COLLECTIBLES_ARRAY = {}
16
- local MODDED_COLLECTIBLES_SET = __TS__New(Set)
17
- local function lazyInitVanillaCollectibles(self)
18
- if #VANILLA_COLLECTIBLES_ARRAY > 0 then
11
+ local ALL_COLLECTIBLE_TYPES_ARRAY = {}
12
+ local ALL_COLLECTIBLE_TYPES_SET = __TS__New(Set)
13
+ local VANILLA_COLLECTIBLE_TYPES_ARRAY = {}
14
+ local VANILLA_COLLECTIBLE_TYPES_SET = __TS__New(Set)
15
+ local MODDED_COLLECTIBLE_TYPES_ARRAY = {}
16
+ local MODDED_COLLECTIBLE_TYPES_SET = __TS__New(Set)
17
+ local function lazyInitVanillaCollectibleTypes(self)
18
+ if #VANILLA_COLLECTIBLE_TYPES_ARRAY > 0 then
19
19
  return
20
20
  end
21
21
  local vanillaCollectibleTypeRange = getVanillaCollectibleTypeRange(nil)
22
22
  for ____, collectibleType in ipairs(vanillaCollectibleTypeRange) do
23
23
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
24
24
  if itemConfigItem ~= nil then
25
- VANILLA_COLLECTIBLES_ARRAY[#VANILLA_COLLECTIBLES_ARRAY + 1] = collectibleType
26
- VANILLA_COLLECTIBLES_SET:add(collectibleType)
25
+ VANILLA_COLLECTIBLE_TYPES_ARRAY[#VANILLA_COLLECTIBLE_TYPES_ARRAY + 1] = collectibleType
26
+ VANILLA_COLLECTIBLE_TYPES_SET:add(collectibleType)
27
27
  end
28
28
  end
29
29
  end
30
- local function lazyInitModdedCollectibles(self)
31
- if #MODDED_COLLECTIBLES_ARRAY > 0 then
30
+ local function lazyInitModdedCollectibleTypes(self)
31
+ if #MODDED_COLLECTIBLE_TYPES_ARRAY > 0 then
32
32
  return
33
33
  end
34
- lazyInitVanillaCollectibles(nil)
35
- for ____, collectibleType in ipairs(VANILLA_COLLECTIBLES_ARRAY) do
36
- ALL_COLLECTIBLES_ARRAY[#ALL_COLLECTIBLES_ARRAY + 1] = collectibleType
37
- ALL_COLLECTIBLES_SET:add(collectibleType)
34
+ lazyInitVanillaCollectibleTypes(nil)
35
+ for ____, collectibleType in ipairs(VANILLA_COLLECTIBLE_TYPES_ARRAY) do
36
+ ALL_COLLECTIBLE_TYPES_ARRAY[#ALL_COLLECTIBLE_TYPES_ARRAY + 1] = collectibleType
37
+ ALL_COLLECTIBLE_TYPES_SET:add(collectibleType)
38
38
  end
39
39
  local moddedCollectibleTypes = getModdedCollectibleTypes(nil)
40
40
  for ____, collectibleType in ipairs(moddedCollectibleTypes) do
41
41
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
42
42
  if itemConfigItem ~= nil then
43
- MODDED_COLLECTIBLES_ARRAY[#MODDED_COLLECTIBLES_ARRAY + 1] = collectibleType
44
- MODDED_COLLECTIBLES_SET:add(collectibleType)
45
- ALL_COLLECTIBLES_ARRAY[#ALL_COLLECTIBLES_ARRAY + 1] = collectibleType
46
- ALL_COLLECTIBLES_SET:add(collectibleType)
43
+ MODDED_COLLECTIBLE_TYPES_ARRAY[#MODDED_COLLECTIBLE_TYPES_ARRAY + 1] = collectibleType
44
+ MODDED_COLLECTIBLE_TYPES_SET:add(collectibleType)
45
+ ALL_COLLECTIBLE_TYPES_ARRAY[#ALL_COLLECTIBLE_TYPES_ARRAY + 1] = collectibleType
46
+ ALL_COLLECTIBLE_TYPES_SET:add(collectibleType)
47
47
  end
48
48
  end
49
49
  end
@@ -56,8 +56,8 @@ end
56
56
  -- This function can only be called if at least one callback has been executed. This is because not
57
57
  -- all collectibles will necessarily be present when a mod first loads (due to mod load order).
58
58
  function ____exports.getCollectibleArray(self)
59
- lazyInitModdedCollectibles(nil)
60
- return ALL_COLLECTIBLES_ARRAY
59
+ lazyInitModdedCollectibleTypes(nil)
60
+ return ALL_COLLECTIBLE_TYPES_ARRAY
61
61
  end
62
62
  --- Returns a set containing every valid collectible type in the game, including modded collectibles.
63
63
  --
@@ -67,8 +67,8 @@ end
67
67
  -- This function can only be called if at least one callback has been executed. This is because not
68
68
  -- all collectibles will necessarily be present when a mod first loads (due to mod load order).
69
69
  function ____exports.getCollectibleSet(self)
70
- lazyInitModdedCollectibles(nil)
71
- return ALL_COLLECTIBLES_SET
70
+ lazyInitModdedCollectibleTypes(nil)
71
+ return ALL_COLLECTIBLE_TYPES_SET
72
72
  end
73
73
  --- Returns an array containing every modded collectible type in the game.
74
74
  --
@@ -78,8 +78,8 @@ end
78
78
  -- This function can only be called if at least one callback has been executed. This is because not
79
79
  -- all collectibles will necessarily be present when a mod first loads (due to mod load order).
80
80
  function ____exports.getModdedCollectibleArray(self)
81
- lazyInitModdedCollectibles(nil)
82
- return MODDED_COLLECTIBLES_ARRAY
81
+ lazyInitModdedCollectibleTypes(nil)
82
+ return MODDED_COLLECTIBLE_TYPES_ARRAY
83
83
  end
84
84
  --- Returns a set containing every modded collectible type in the game.
85
85
  --
@@ -89,23 +89,23 @@ end
89
89
  -- This function can only be called if at least one callback has been executed. This is because not
90
90
  -- all collectibles will necessarily be present when a mod first loads (due to mod load order).
91
91
  function ____exports.getModdedCollectibleSet(self)
92
- lazyInitModdedCollectibles(nil)
93
- return MODDED_COLLECTIBLES_SET
92
+ lazyInitModdedCollectibleTypes(nil)
93
+ return MODDED_COLLECTIBLE_TYPES_SET
94
94
  end
95
95
  --- Returns an array containing every valid vanilla collectible type in the game.
96
96
  --
97
97
  -- Use this if you need to iterate over the collectibles in order. If you need to do O(1) lookups,
98
98
  -- then use the `getVanillaCollectibleSet` helper function instead.
99
99
  function ____exports.getVanillaCollectibleArray(self)
100
- lazyInitVanillaCollectibles(nil)
101
- return VANILLA_COLLECTIBLES_ARRAY
100
+ lazyInitVanillaCollectibleTypes(nil)
101
+ return VANILLA_COLLECTIBLE_TYPES_ARRAY
102
102
  end
103
103
  --- Returns a set containing every valid vanilla collectible type in the game.
104
104
  --
105
105
  -- Use this if you need to do O(1) lookups. If you need to iterate over the collectibles in order,
106
106
  -- then use the `getVanillaCollectibleArray` helper function instead.
107
107
  function ____exports.getVanillaCollectibleSet(self)
108
- lazyInitVanillaCollectibles(nil)
109
- return VANILLA_COLLECTIBLES_SET
108
+ lazyInitVanillaCollectibleTypes(nil)
109
+ return VANILLA_COLLECTIBLE_TYPES_SET
110
110
  end
111
111
  return ____exports
@@ -10,7 +10,7 @@ export declare function collectibleHasTag(collectibleType: CollectibleType, tag:
10
10
  * const offensiveCollectibleTypes = getCollectibleTypesWithTag(ItemConfigTag.OFFENSIVE);
11
11
  * ```
12
12
  */
13
- export declare function getCollectibleTypesWithTag(itemConfigTag: ItemConfigTag): Set<CollectibleType>;
13
+ export declare function getCollectibleTypesWithTag(itemConfigTag: ItemConfigTag): ReadonlySet<CollectibleType>;
14
14
  /** Returns the number of items that a player has towards a particular transformation. */
15
15
  export declare function getPlayerNumCollectiblesWithTag(player: EntityPlayer, itemConfigTag: ItemConfigTag): int;
16
16
  export declare function isQuestCollectible(collectibleType: CollectibleType): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"collectibleTag.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleTag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAqC9E,wBAAgB,iBAAiB,CAC/B,eAAe,EAAE,eAAe,EAChC,GAAG,EAAE,aAAa,GACjB,OAAO,CAOT;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,aAAa,GAC3B,GAAG,CAAC,eAAe,CAAC,CActB;AAED,yFAAyF;AACzF,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,aAAa,GAC3B,GAAG,CAGL;AAED,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAE5E"}
1
+ {"version":3,"file":"collectibleTag.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleTag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAoC9E,wBAAgB,iBAAiB,CAC/B,eAAe,EAAE,eAAe,EAChC,GAAG,EAAE,aAAa,GACjB,OAAO,CAOT;AAED;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,aAAa,GAC3B,WAAW,CAAC,eAAe,CAAC,CAc9B;AAED,yFAAyF;AACzF,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,YAAY,EACpB,aAAa,EAAE,aAAa,GAC3B,GAAG,CAGL;AAED,wBAAgB,kBAAkB,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAE5E"}
@@ -16,8 +16,6 @@ local ____flag = require("functions.flag")
16
16
  local getFlagName = ____flag.getFlagName
17
17
  local ____players = require("functions.players")
18
18
  local getPlayerCollectibleCount = ____players.getPlayerCollectibleCount
19
- local ____set = require("functions.set")
20
- local copySet = ____set.copySet
21
19
  function ____exports.collectibleHasTag(self, collectibleType, tag)
22
20
  local itemConfigItem = itemConfig:GetCollectible(collectibleType)
23
21
  if itemConfigItem == nil then
@@ -66,7 +64,7 @@ function ____exports.getCollectibleTypesWithTag(self, itemConfigTag)
66
64
  if collectibleTypes == nil then
67
65
  error(("The item config tag of " .. tostring(itemConfigTag)) .. " is not a valid value of the ItemConfigTag enum.")
68
66
  end
69
- return copySet(nil, collectibleTypes)
67
+ return collectibleTypes
70
68
  end
71
69
  --- Returns the number of items that a player has towards a particular transformation.
72
70
  function ____exports.getPlayerNumCollectiblesWithTag(self, player, itemConfigTag)
@@ -1,4 +1,4 @@
1
1
  import { CollectibleType } from "isaac-typescript-definitions";
2
- export declare function getEdenPassives(): Set<CollectibleType>;
2
+ export declare function getEdenPassives(): ReadonlySet<CollectibleType>;
3
3
  export declare function getRandomEdenPassive(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
4
4
  //# sourceMappingURL=eden.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"eden.d.ts","sourceRoot":"","sources":["../../src/functions/eden.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAiB,MAAM,8BAA8B,CAAC;AAqB9E,wBAAgB,eAAe,IAAI,GAAG,CAAC,eAAe,CAAC,CAOtD;AAED,wBAAgB,oBAAoB,CAClC,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,UAAU,GAAE,eAAe,EAAE,GAAG,SAAS,eAAe,EAAO,GAC9D,eAAe,CAWjB"}
1
+ {"version":3,"file":"eden.d.ts","sourceRoot":"","sources":["../../src/functions/eden.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAiB,MAAM,8BAA8B,CAAC;AAqB9E,wBAAgB,eAAe,IAAI,WAAW,CAAC,eAAe,CAAC,CAO9D;AAED,wBAAgB,oBAAoB,CAClC,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,UAAU,GAAE,eAAe,EAAE,GAAG,SAAS,eAAe,EAAO,GAC9D,eAAe,CAWjB"}
@@ -14,7 +14,6 @@ local collectibleHasTag = ____collectibleTag.collectibleHasTag
14
14
  local ____rng = require("functions.rng")
15
15
  local getRandomSeed = ____rng.getRandomSeed
16
16
  local ____set = require("functions.set")
17
- local copySet = ____set.copySet
18
17
  local getRandomSetElement = ____set.getRandomSetElement
19
18
  local EDEN_PASSIVE_COLLECTIBLES_SET = __TS__New(Set)
20
19
  local function initCollectibleSet(self)
@@ -28,7 +27,7 @@ function ____exports.getEdenPassives(self)
28
27
  if EDEN_PASSIVE_COLLECTIBLES_SET.size == 0 then
29
28
  initCollectibleSet(nil)
30
29
  end
31
- return copySet(nil, EDEN_PASSIVE_COLLECTIBLES_SET)
30
+ return EDEN_PASSIVE_COLLECTIBLES_SET
32
31
  end
33
32
  function ____exports.getRandomEdenPassive(self, seedOrRNG, exceptions)
34
33
  if seedOrRNG == nil then