isaacscript-common 6.10.1 → 6.11.1

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 (128) hide show
  1. package/dist/callbacks/postPlayerFatalDamage.lua +1 -1
  2. package/dist/callbacks/postPlayerInitFirst.d.ts +2 -0
  3. package/dist/callbacks/postPlayerInitFirst.d.ts.map +1 -0
  4. package/dist/callbacks/postPlayerInitFirst.lua +42 -0
  5. package/dist/callbacks/postPlayerInitLate.lua +5 -5
  6. package/dist/callbacks/postPlayerReorderedCallbacks.d.ts +2 -0
  7. package/dist/callbacks/postPlayerReorderedCallbacks.d.ts.map +1 -0
  8. package/dist/callbacks/{postPlayerReordered.lua → postPlayerReorderedCallbacks.lua} +11 -37
  9. package/dist/callbacks/subscriptions/{postPlayerInitReordered.d.ts → postPlayerInitFirst.d.ts} +2 -2
  10. package/dist/callbacks/subscriptions/postPlayerInitFirst.d.ts.map +1 -0
  11. package/dist/callbacks/subscriptions/{postPlayerInitReordered.lua → postPlayerInitFirst.lua} +3 -3
  12. package/dist/enums/ModCallbackCustom.d.ts +17 -15
  13. package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
  14. package/dist/enums/ModCallbackCustom.lua +3 -3
  15. package/dist/enums/private/StageTravelState.d.ts +4 -0
  16. package/dist/enums/private/StageTravelState.d.ts.map +1 -0
  17. package/dist/enums/private/StageTravelState.lua +5 -0
  18. package/dist/features/customGridEntity.d.ts +2 -2
  19. package/dist/features/customGridEntity.d.ts.map +1 -1
  20. package/dist/features/customGridEntity.lua +14 -8
  21. package/dist/features/customStage/init.d.ts.map +1 -1
  22. package/dist/features/customStage/init.lua +8 -1
  23. package/dist/features/customStage/streakText.d.ts +6 -0
  24. package/dist/features/customStage/streakText.d.ts.map +1 -1
  25. package/dist/features/customStage/streakText.lua +16 -11
  26. package/dist/features/customStage/versusScreen.d.ts +6 -0
  27. package/dist/features/customStage/versusScreen.d.ts.map +1 -1
  28. package/dist/features/customStage/versusScreen.lua +10 -5
  29. package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts +10 -0
  30. package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts.map +1 -0
  31. package/dist/features/customTrapdoor/customTrapdoorConstants.lua +8 -0
  32. package/dist/features/customTrapdoor/exports.d.ts +37 -0
  33. package/dist/features/customTrapdoor/exports.d.ts.map +1 -0
  34. package/dist/features/customTrapdoor/exports.lua +127 -0
  35. package/dist/features/customTrapdoor/v.d.ts +4 -0
  36. package/dist/features/customTrapdoor/v.d.ts.map +1 -0
  37. package/dist/features/customTrapdoor/v.lua +15 -0
  38. package/dist/features/deployJSONRoom.d.ts.map +1 -1
  39. package/dist/features/deployJSONRoom.lua +1 -1
  40. package/dist/features/extraConsoleCommands/listCommands.lua +2 -2
  41. package/dist/functions/{character.d.ts → characters.d.ts} +3 -1
  42. package/dist/functions/characters.d.ts.map +1 -0
  43. package/dist/functions/{character.lua → characters.lua} +12 -0
  44. package/dist/functions/deepCopy.lua +20 -3
  45. package/dist/functions/deepCopyTests.d.ts.map +1 -1
  46. package/dist/functions/deepCopyTests.lua +55 -1
  47. package/dist/functions/jsonHelpers.d.ts +6 -0
  48. package/dist/functions/jsonHelpers.d.ts.map +1 -1
  49. package/dist/functions/jsonHelpers.lua +9 -3
  50. package/dist/functions/mergeTests.lua +0 -4
  51. package/dist/functions/playerIndex.d.ts +6 -2
  52. package/dist/functions/playerIndex.d.ts.map +1 -1
  53. package/dist/functions/playerIndex.lua +4 -2
  54. package/dist/functions/players.lua +4 -4
  55. package/dist/functions/revive.lua +2 -2
  56. package/dist/index.d.ts +3 -2
  57. package/dist/index.d.ts.map +1 -1
  58. package/dist/index.lua +10 -2
  59. package/dist/initCustomCallbacks.d.ts.map +1 -1
  60. package/dist/initCustomCallbacks.lua +5 -2
  61. package/dist/initFeatures.d.ts +1 -2
  62. package/dist/initFeatures.d.ts.map +1 -1
  63. package/dist/initFeatures.lua +7 -2
  64. package/dist/interfaces/AddCallbackParameterCustom.d.ts +2 -2
  65. package/dist/interfaces/AddCallbackParameterCustom.d.ts.map +1 -1
  66. package/dist/interfaces/CustomGridEntityData.d.ts +1 -1
  67. package/dist/interfaces/CustomGridEntityData.d.ts.map +1 -1
  68. package/dist/interfaces/private/CustomTrapdoorDescription.d.ts +4 -0
  69. package/dist/interfaces/private/CustomTrapdoorDescription.d.ts.map +1 -0
  70. package/dist/interfaces/private/CustomTrapdoorDescription.lua +2 -0
  71. package/dist/lib/jsonLua.lua +390 -0
  72. package/dist/objects/callbackRegisterFunctions.d.ts.map +1 -1
  73. package/dist/objects/callbackRegisterFunctions.lua +3 -3
  74. package/dist/objects/characterDamageMultipliers.d.ts +6 -0
  75. package/dist/objects/characterDamageMultipliers.d.ts.map +1 -0
  76. package/dist/objects/characterDamageMultipliers.lua +49 -0
  77. package/dist/upgradeMod.d.ts.map +1 -1
  78. package/dist/upgradeMod.lua +2 -4
  79. package/package.json +2 -2
  80. package/src/callbacks/customRevive.ts +3 -3
  81. package/src/callbacks/itemPickup.ts +3 -3
  82. package/src/callbacks/postAmbush.ts +3 -3
  83. package/src/callbacks/postEsauJr.ts +3 -3
  84. package/src/callbacks/postFlip.ts +3 -3
  85. package/src/callbacks/postGridEntity.ts +5 -5
  86. package/src/callbacks/postPlayerCollectible.ts +2 -2
  87. package/src/callbacks/postPlayerFatalDamage.ts +5 -0
  88. package/src/callbacks/postPlayerInitFirst.ts +57 -0
  89. package/src/callbacks/postPlayerInitLate.ts +9 -5
  90. package/src/callbacks/{postPlayerReordered.ts → postPlayerReorderedCallbacks.ts} +9 -29
  91. package/src/callbacks/postSlotInitUpdate.ts +5 -2
  92. package/src/callbacks/postSlotRender.ts +2 -2
  93. package/src/callbacks/reorderedCallbacks.ts +1 -1
  94. package/src/callbacks/subscriptions/{postPlayerInitReordered.ts → postPlayerInitFirst.ts} +6 -6
  95. package/src/enums/ModCallbackCustom.ts +17 -15
  96. package/src/enums/private/StageTravelState.ts +4 -0
  97. package/src/features/customGridEntity.ts +29 -6
  98. package/src/features/customStage/init.ts +10 -1
  99. package/src/features/customStage/streakText.ts +13 -4
  100. package/src/features/customStage/versusScreen.ts +20 -12
  101. package/src/features/customTrapdoor/customTrapdoorConstants.ts +13 -0
  102. package/src/features/customTrapdoor/exports.ts +168 -0
  103. package/src/features/customTrapdoor/v.ts +20 -0
  104. package/src/features/deployJSONRoom.ts +5 -0
  105. package/src/features/extraConsoleCommands/listCommands.ts +1 -1
  106. package/src/functions/{character.ts → characters.ts} +13 -0
  107. package/src/functions/deepCopy.ts +18 -1
  108. package/src/functions/deepCopyTests.ts +112 -0
  109. package/src/functions/jsonHelpers.ts +9 -3
  110. package/src/functions/mergeTests.ts +0 -8
  111. package/src/functions/playerIndex.ts +6 -2
  112. package/src/functions/players.ts +1 -1
  113. package/src/functions/revive.ts +1 -1
  114. package/src/index.ts +6 -2
  115. package/src/initCustomCallbacks.ts +3 -1
  116. package/src/initFeatures.ts +7 -2
  117. package/src/interfaces/AddCallbackParameterCustom.ts +2 -2
  118. package/src/interfaces/CustomGridEntityData.ts +1 -1
  119. package/src/interfaces/private/CustomTrapdoorDescription.ts +3 -0
  120. package/src/lib/jsonLua.d.ts +10 -0
  121. package/src/lib/jsonLua.lua +390 -0
  122. package/src/objects/callbackRegisterFunctions.ts +2 -3
  123. package/src/objects/characterDamageMultipliers.ts +49 -0
  124. package/src/upgradeMod.ts +2 -3
  125. package/dist/callbacks/postPlayerReordered.d.ts +0 -2
  126. package/dist/callbacks/postPlayerReordered.d.ts.map +0 -1
  127. package/dist/callbacks/subscriptions/postPlayerInitReordered.d.ts.map +0 -1
  128. package/dist/functions/character.d.ts.map +0 -1
@@ -68,7 +68,7 @@ function entityTakeDmgPlayer(self, tookDamage, damageAmount, damageFlags, damage
68
68
  end
69
69
  return nil
70
70
  end
71
- function preUseItemBible(self, _collectibleType, _rng, player)
71
+ function preUseItemBible(self, _collectibleType, _rng, player, _useFlags, _activeSlot, _customVarData)
72
72
  if not hasSubscriptions(nil) then
73
73
  return nil
74
74
  end
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=postPlayerInitFirst.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postPlayerInitFirst.d.ts","sourceRoot":"","sources":["../../src/callbacks/postPlayerInitFirst.ts"],"names":[],"mappings":""}
@@ -0,0 +1,42 @@
1
+ local ____exports = {}
2
+ local hasSubscriptions, postNewRoomReordered, postPlayerInitLate
3
+ local ____ModCallbackCustom = require("enums.ModCallbackCustom")
4
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
5
+ local ____playerIndex = require("functions.playerIndex")
6
+ local getPlayers = ____playerIndex.getPlayers
7
+ local isChildPlayer = ____playerIndex.isChildPlayer
8
+ local ____rooms = require("functions.rooms")
9
+ local inGenesisRoom = ____rooms.inGenesisRoom
10
+ local ____postPlayerInitFirst = require("callbacks.subscriptions.postPlayerInitFirst")
11
+ local postPlayerInitFirstFire = ____postPlayerInitFirst.postPlayerInitFirstFire
12
+ local postPlayerInitFirstHasSubscriptions = ____postPlayerInitFirst.postPlayerInitFirstHasSubscriptions
13
+ function hasSubscriptions(self)
14
+ return postPlayerInitFirstHasSubscriptions(nil)
15
+ end
16
+ function postNewRoomReordered(self)
17
+ if not hasSubscriptions(nil) then
18
+ return
19
+ end
20
+ if not inGenesisRoom(nil) then
21
+ return
22
+ end
23
+ for ____, player in ipairs(getPlayers(nil)) do
24
+ postPlayerInitFirstFire(nil, player)
25
+ end
26
+ end
27
+ function postPlayerInitLate(self, player)
28
+ if not hasSubscriptions(nil) then
29
+ return
30
+ end
31
+ if isChildPlayer(nil, player) then
32
+ return
33
+ end
34
+ postPlayerInitFirstFire(nil, player)
35
+ end
36
+ ---
37
+ -- @internal
38
+ function ____exports.postPlayerInitFirstInit(self, mod)
39
+ mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_ROOM_REORDERED, postNewRoomReordered)
40
+ mod:AddCallbackCustom(ModCallbackCustom.POST_PLAYER_INIT_LATE, postPlayerInitLate)
41
+ end
42
+ return ____exports
@@ -2,9 +2,9 @@ local ____lualib = require("lualib_bundle")
2
2
  local Set = ____lualib.Set
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local ____exports = {}
5
- local hasSubscriptions, postPlayerUpdate, v
6
- local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
- local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
+ local hasSubscriptions, postPEffectUpdateReordered, v
6
+ local ____ModCallbackCustom = require("enums.ModCallbackCustom")
7
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
8
8
  local ____exports = require("features.saveDataManager.exports")
9
9
  local saveDataManager = ____exports.saveDataManager
10
10
  local ____playerDataStructures = require("functions.playerDataStructures")
@@ -16,7 +16,7 @@ local postPlayerInitLateHasSubscriptions = ____postPlayerInitLate.postPlayerInit
16
16
  function hasSubscriptions(self)
17
17
  return postPlayerInitLateHasSubscriptions(nil)
18
18
  end
19
- function postPlayerUpdate(self, player)
19
+ function postPEffectUpdateReordered(self, player)
20
20
  if not hasSubscriptions(nil) then
21
21
  return
22
22
  end
@@ -30,6 +30,6 @@ v = {run = {playersFiredSet = __TS__New(Set)}}
30
30
  -- @internal
31
31
  function ____exports.postPlayerInitLateInit(self, mod)
32
32
  saveDataManager(nil, "postPlayerInitLate", v, hasSubscriptions)
33
- mod:AddCallback(ModCallback.POST_PLAYER_UPDATE, postPlayerUpdate)
33
+ mod:AddCallbackCustom(ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
34
34
  end
35
35
  return ____exports
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=postPlayerReorderedCallbacks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postPlayerReorderedCallbacks.d.ts","sourceRoot":"","sources":["../../src/callbacks/postPlayerReorderedCallbacks.ts"],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  local ____exports = {}
2
- local hasSubscriptions, postPEffectUpdate, postPlayerInit, postPlayerUpdate, postPlayerRender, postGameStarted, dequeue, v
2
+ local hasSubscriptions, postPEffectUpdate, postPlayerUpdate, postPlayerRender, postGameStarted, dequeue, v
3
3
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
4
4
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
5
5
  local ____exports = require("features.saveDataManager.exports")
@@ -12,9 +12,6 @@ local getPlayerIndex = ____playerIndex.getPlayerIndex
12
12
  local ____postPEffectUpdateReordered = require("callbacks.subscriptions.postPEffectUpdateReordered")
13
13
  local postPEffectUpdateReorderedFire = ____postPEffectUpdateReordered.postPEffectUpdateReorderedFire
14
14
  local postPEffectUpdateReorderedHasSubscriptions = ____postPEffectUpdateReordered.postPEffectUpdateReorderedHasSubscriptions
15
- local ____postPlayerInitReordered = require("callbacks.subscriptions.postPlayerInitReordered")
16
- local postPlayerInitReorderedFire = ____postPlayerInitReordered.postPlayerInitReorderedFire
17
- local postPlayerInitReorderedHasSubscriptions = ____postPlayerInitReordered.postPlayerInitReorderedHasSubscriptions
18
15
  local ____postPlayerRenderReordered = require("callbacks.subscriptions.postPlayerRenderReordered")
19
16
  local postPlayerRenderReorderedFire = ____postPlayerRenderReordered.postPlayerRenderReorderedFire
20
17
  local postPlayerRenderReorderedHasSubscriptions = ____postPlayerRenderReordered.postPlayerRenderReorderedHasSubscriptions
@@ -22,7 +19,7 @@ local ____postPlayerUpdateReordered = require("callbacks.subscriptions.postPlaye
22
19
  local postPlayerUpdateReorderedFire = ____postPlayerUpdateReordered.postPlayerUpdateReorderedFire
23
20
  local postPlayerUpdateReorderedHasSubscriptions = ____postPlayerUpdateReordered.postPlayerUpdateReorderedHasSubscriptions
24
21
  function hasSubscriptions(self)
25
- return postPlayerInitReorderedHasSubscriptions(nil) or postPEffectUpdateReorderedHasSubscriptions(nil) or postPlayerUpdateReorderedHasSubscriptions(nil) or postPlayerRenderReorderedHasSubscriptions(nil)
22
+ return postPEffectUpdateReorderedHasSubscriptions(nil) or postPlayerUpdateReorderedHasSubscriptions(nil) or postPlayerRenderReorderedHasSubscriptions(nil)
26
23
  end
27
24
  function postPEffectUpdate(self, player)
28
25
  if not hasSubscriptions(nil) then
@@ -36,18 +33,6 @@ function postPEffectUpdate(self, player)
36
33
  ____v_run_postPEffectUpdateQueue_0[#____v_run_postPEffectUpdateQueue_0 + 1] = playerIndex
37
34
  end
38
35
  end
39
- function postPlayerInit(self, player)
40
- if not hasSubscriptions(nil) then
41
- return
42
- end
43
- if v.run.postGameStartedFiredOnThisRun then
44
- postPlayerInitReorderedFire(nil, player)
45
- else
46
- local playerIndex = getPlayerIndex(nil, player)
47
- local ____v_run_postPlayerInitQueue_1 = v.run.postPlayerInitQueue
48
- ____v_run_postPlayerInitQueue_1[#____v_run_postPlayerInitQueue_1 + 1] = playerIndex
49
- end
50
- end
51
36
  function postPlayerUpdate(self, player)
52
37
  if not hasSubscriptions(nil) then
53
38
  return
@@ -56,8 +41,8 @@ function postPlayerUpdate(self, player)
56
41
  postPlayerUpdateReorderedFire(nil, player)
57
42
  else
58
43
  local playerIndex = getPlayerIndex(nil, player)
59
- local ____v_run_postPlayerUpdateQueue_2 = v.run.postPlayerUpdateQueue
60
- ____v_run_postPlayerUpdateQueue_2[#____v_run_postPlayerUpdateQueue_2 + 1] = playerIndex
44
+ local ____v_run_postPlayerUpdateQueue_1 = v.run.postPlayerUpdateQueue
45
+ ____v_run_postPlayerUpdateQueue_1[#____v_run_postPlayerUpdateQueue_1 + 1] = playerIndex
61
46
  end
62
47
  end
63
48
  function postPlayerRender(self, player)
@@ -68,8 +53,8 @@ function postPlayerRender(self, player)
68
53
  postPlayerRenderReorderedFire(nil, player)
69
54
  else
70
55
  local playerIndex = getPlayerIndex(nil, player)
71
- local ____v_run_postPlayerRenderQueue_3 = v.run.postPlayerRenderQueue
72
- ____v_run_postPlayerRenderQueue_3[#____v_run_postPlayerRenderQueue_3 + 1] = playerIndex
56
+ local ____v_run_postPlayerRenderQueue_2 = v.run.postPlayerRenderQueue
57
+ ____v_run_postPlayerRenderQueue_2[#____v_run_postPlayerRenderQueue_2 + 1] = playerIndex
73
58
  end
74
59
  end
75
60
  function postGameStarted(self)
@@ -77,38 +62,27 @@ function postGameStarted(self)
77
62
  return
78
63
  end
79
64
  v.run.postGameStartedFiredOnThisRun = true
80
- dequeue(nil, v.run.postPlayerInitQueue, postPlayerInitReorderedFire)
65
+ dequeue(nil, v.run.postPEffectUpdateQueue, postPEffectUpdateReorderedFire)
81
66
  dequeue(nil, v.run.postPlayerUpdateQueue, postPlayerUpdateReorderedFire)
82
67
  dequeue(nil, v.run.postPlayerRenderQueue, postPlayerRenderReorderedFire)
83
68
  end
84
69
  function dequeue(self, playerIndexes, fireFunction)
85
70
  for ____, playerIndex in ipairs(playerIndexes) do
86
- do
87
- local player = getPlayerFromIndex(nil, playerIndex)
88
- if player == nil then
89
- goto __continue23
90
- end
71
+ local player = getPlayerFromIndex(nil, playerIndex)
72
+ if player ~= nil then
91
73
  fireFunction(nil, player)
92
74
  end
93
- ::__continue23::
94
75
  end
95
76
  emptyArray(nil, playerIndexes)
96
77
  end
97
- v = {run = {
98
- postGameStartedFiredOnThisRun = false,
99
- postPlayerInitQueue = {},
100
- postPEffectUpdateQueue = {},
101
- postPlayerUpdateQueue = {},
102
- postPlayerRenderQueue = {}
103
- }}
78
+ v = {run = {postGameStartedFiredOnThisRun = false, postPEffectUpdateQueue = {}, postPlayerUpdateQueue = {}, postPlayerRenderQueue = {}}}
104
79
  ---
105
80
  -- @internal
106
81
  function ____exports.postPlayerReorderedCallbacksInit(self, mod)
107
82
  saveDataManager(nil, "postPlayerReordered", v, hasSubscriptions)
108
83
  mod:AddCallback(ModCallback.POST_PEFFECT_UPDATE, postPEffectUpdate)
109
- mod:AddCallback(ModCallback.POST_PLAYER_INIT, postPlayerInit)
84
+ mod:AddCallback(ModCallback.POST_GAME_STARTED, postGameStarted)
110
85
  mod:AddCallback(ModCallback.POST_PLAYER_UPDATE, postPlayerUpdate)
111
86
  mod:AddCallback(ModCallback.POST_PLAYER_RENDER, postPlayerRender)
112
- mod:AddCallback(ModCallback.POST_GAME_STARTED, postGameStarted)
113
87
  end
114
88
  return ____exports
@@ -1,7 +1,7 @@
1
1
  import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
2
- export declare type PostPlayerInitReorderedRegisterParameters = [
2
+ export declare type PostPlayerInitFirstRegisterParameters = [
3
3
  callback: (player: EntityPlayer) => void,
4
4
  playerVariant?: PlayerVariant,
5
5
  character?: PlayerType
6
6
  ];
7
- //# sourceMappingURL=postPlayerInitReordered.d.ts.map
7
+ //# sourceMappingURL=postPlayerInitFirst.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postPlayerInitFirst.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postPlayerInitFirst.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAEzE,oBAAY,qCAAqC,GAAG;IAClD,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI;IACxC,aAAa,CAAC,EAAE,aAAa;IAC7B,SAAS,CAAC,EAAE,UAAU;CACvB,CAAC"}
@@ -2,18 +2,18 @@ local ____exports = {}
2
2
  local subscriptions = {}
3
3
  ---
4
4
  -- @internal
5
- function ____exports.postPlayerInitReorderedHasSubscriptions(self)
5
+ function ____exports.postPlayerInitFirstHasSubscriptions(self)
6
6
  return #subscriptions > 0
7
7
  end
8
8
  ---
9
9
  -- @internal
10
- function ____exports.postPlayerInitReorderedRegister(self, ...)
10
+ function ____exports.postPlayerInitFirstRegister(self, ...)
11
11
  local args = {...}
12
12
  subscriptions[#subscriptions + 1] = args
13
13
  end
14
14
  ---
15
15
  -- @internal
16
- function ____exports.postPlayerInitReorderedFire(self, player)
16
+ function ____exports.postPlayerInitFirstFire(self, player)
17
17
  local character = player:GetPlayerType()
18
18
  for ____, ____value in ipairs(subscriptions) do
19
19
  local callback = ____value[1]
@@ -764,10 +764,15 @@ export declare enum ModCallbackCustom {
764
764
  */
765
765
  POST_PLAYER_FATAL_DAMAGE = 51,
766
766
  /**
767
- * Fires on the first `POST_PLAYER_UPDATE` frame for each player.
767
+ * Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player, similar to the
768
+ * `POST_PLAYER_INIT_LATE` callback, with two changes:
768
769
  *
769
- * This callback is useful because many attributes cannot be set or retrieved properly in the
770
- * normal `POST_PLAYER_INIT` callback.
770
+ * - This will not fire for "child" players (e.g. non-real players like the Strawman Keeper).
771
+ * - This will fire when the player enters a Genesis room and all of their items are taken away.
772
+ *
773
+ * You should use this callback for any player-related initialization logic, like giving the
774
+ * character their starting items for the run. (You do not want to use the vanilla
775
+ * `POST_PLAYER_INIT` callback for this because it fires when a run is continued.)
771
776
  *
772
777
  * - When registering the callback, takes an optional second argument that will make the callback
773
778
  * only fire if the player matches the `PlayerVariant` provided.
@@ -775,21 +780,18 @@ export declare enum ModCallbackCustom {
775
780
  * only fire if the player matches the `PlayerType` provided.
776
781
  *
777
782
  * ```ts
778
- * function postPlayerInitLate(pickup: EntityPickup): void {}
783
+ * function postPlayerInitFirst(player: EntityPlayer): void {}
779
784
  * ```
780
785
  */
781
- POST_PLAYER_INIT_LATE = 52,
786
+ POST_PLAYER_INIT_FIRST = 52,
782
787
  /**
783
- * Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
784
- * callback fires (if the player is spawning on the 0th game frame of the run).
788
+ * Fires on the first `POST_PEFFECT_UPDATE_REORDERED` frame for each player.
785
789
  *
786
- * This callback is useful for two reasons:
790
+ * This callback is useful because many attributes cannot be set or retrieved properly in the
791
+ * normal `POST_PLAYER_INIT` callback.
787
792
  *
788
- * 1. Normally, `POST_PLAYER_INIT` fires before `POST_GAME_STARTED`. Since mod variables are often
789
- * initialized at the beginning of the `POST_GAME_STARTED` callback, this can cause problems.
790
- * 1. Some functions do not work (or crash the game) when called before the `POST_NEW_ROOM`
791
- * callback. For example, since the level is not generated yet, you will not be able to access
792
- * any rooms.
793
+ * For initializing a player with custom items and so forth, use the `POST_PLAYER_INIT_FIRST`
794
+ * callback instead to handle the case of a Genesis room.
793
795
  *
794
796
  * - When registering the callback, takes an optional second argument that will make the callback
795
797
  * only fire if the player matches the `PlayerVariant` provided.
@@ -797,10 +799,10 @@ export declare enum ModCallbackCustom {
797
799
  * only fire if the player matches the `PlayerType` provided.
798
800
  *
799
801
  * ```ts
800
- * function postPlayerInitReordered(player: EntityPlayer): void {}
802
+ * function postPlayerInitLate(pickup: EntityPickup): void {}
801
803
  * ```
802
804
  */
803
- POST_PLAYER_INIT_REORDERED = 53,
805
+ POST_PLAYER_INIT_LATE = 53,
804
806
  /**
805
807
  * Similar to the vanilla callback of the same name, but fires after the `POST_GAME_STARTED`
806
808
  * callback fires (if the player is spawning on the 0th game frame of the run).
@@ -1 +1 @@
1
- {"version":3,"file":"ModCallbackCustom.d.ts","sourceRoot":"","sources":["../../src/enums/ModCallbackCustom.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,oBAAY,iBAAiB;IAC3B;;;;;;;;;;OAUG;IACH,oBAAoB,IAAA;IAEpB;;;;;;;;;;OAUG;IACH,mBAAmB,IAAA;IAEnB;;;;;;;;;OASG;IACH,kBAAkB,IAAA;IAElB;;;;;;;;;;;;OAYG;IACH,mBAAmB,IAAA;IAEnB;;;;;;OAMG;IACH,eAAe,IAAA;IAEf;;;;;;;;;;;;;OAaG;IACH,sBAAsB,IAAA;IAEtB;;;;;;;;;;;;;;;OAeG;IACH,2BAA2B,IAAA;IAE3B;;;;;;;;OAQG;IACH,oBAAoB,IAAA;IAEpB;;;;;;;;;;;;;;;OAeG;IACH,sBAAsB,IAAA;IAEtB;;;;;;;;;;;;;;;OAeG;IACH,kBAAkB,IAAA;IAElB;;;;;;;;;;;;;OAaG;IACH,wBAAwB,KAAA;IAExB;;;;;;;;;OASG;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EvB;;;;;;;;;;;;OAYG;IACH,cAAc,KAAA;IAEd;;;;;;;;;OASG;IACH,2BAA2B,KAAA;IAE3B;;;;;;;;;;;;OAYG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;;;OAcG;IACH,cAAc,KAAA;IAEd;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;OASG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;OASG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;;;;;OAaG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;OAYG;IACH,wBAAwB,KAAA;IAExB;;;;;;;;;OASG;IACH,eAAe,KAAA;IAEf;;;;;;;;;OASG;IACH,eAAe,KAAA;IAEf;;;;;;;;;;;;;;;;OAgBG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;OAYG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;;;;;OAaG;IACH,iBAAiB,KAAA;IAEjB;;;;;;;;;;;;;;;;OAgBG;IACH,iBAAiB,KAAA;IAEjB;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,KAAA;IAEf;;;;;;;;;;;;OAYG;IACH,aAAa,KAAA;CACd"}
1
+ {"version":3,"file":"ModCallbackCustom.d.ts","sourceRoot":"","sources":["../../src/enums/ModCallbackCustom.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,oBAAY,iBAAiB;IAC3B;;;;;;;;;;OAUG;IACH,oBAAoB,IAAA;IAEpB;;;;;;;;;;OAUG;IACH,mBAAmB,IAAA;IAEnB;;;;;;;;;OASG;IACH,kBAAkB,IAAA;IAElB;;;;;;;;;;;;OAYG;IACH,mBAAmB,IAAA;IAEnB;;;;;;OAMG;IACH,eAAe,IAAA;IAEf;;;;;;;;;;;;;OAaG;IACH,sBAAsB,IAAA;IAEtB;;;;;;;;;;;;;;;OAeG;IACH,2BAA2B,IAAA;IAE3B;;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;;;;;;;OAYG;IACH,yBAAyB,KAAA;IAEzB;;;;;;;;;;;;OAYG;IACH,aAAa,KAAA;IAEb;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;OASG;IACH,uBAAuB,KAAA;IAEvB;;;;;;;;;;;;OAYG;IACH,cAAc,KAAA;IAEd;;;;;;;;;OASG;IACH,2BAA2B,KAAA;IAE3B;;;;;;;;;;;;OAYG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;;;OAcG;IACH,cAAc,KAAA;IAEd;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;OASG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;OASG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;;;;;OAaG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;OAYG;IACH,wBAAwB,KAAA;IAExB;;;;;;;;;OASG;IACH,eAAe,KAAA;IAEf;;;;;;;;;OASG;IACH,eAAe,KAAA;IAEf;;;;;;;;;;;;;;;;OAgBG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;OAYG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;;;;;OAaG;IACH,iBAAiB,KAAA;IAEjB;;;;;;;;;;;;;;;;OAgBG;IACH,iBAAiB,KAAA;IAEjB;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,KAAA;IAEf;;;;;;;;;;;;OAYG;IACH,aAAa,KAAA;CACd"}
@@ -110,10 +110,10 @@ ____exports.ModCallbackCustom.POST_PLAYER_COLLECTIBLE_REMOVED = 50
110
110
  ____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_PLAYER_COLLECTIBLE_REMOVED] = "POST_PLAYER_COLLECTIBLE_REMOVED"
111
111
  ____exports.ModCallbackCustom.POST_PLAYER_FATAL_DAMAGE = 51
112
112
  ____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_PLAYER_FATAL_DAMAGE] = "POST_PLAYER_FATAL_DAMAGE"
113
- ____exports.ModCallbackCustom.POST_PLAYER_INIT_LATE = 52
113
+ ____exports.ModCallbackCustom.POST_PLAYER_INIT_FIRST = 52
114
+ ____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_PLAYER_INIT_FIRST] = "POST_PLAYER_INIT_FIRST"
115
+ ____exports.ModCallbackCustom.POST_PLAYER_INIT_LATE = 53
114
116
  ____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_PLAYER_INIT_LATE] = "POST_PLAYER_INIT_LATE"
115
- ____exports.ModCallbackCustom.POST_PLAYER_INIT_REORDERED = 53
116
- ____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_PLAYER_INIT_REORDERED] = "POST_PLAYER_INIT_REORDERED"
117
117
  ____exports.ModCallbackCustom.POST_PLAYER_RENDER_REORDERED = 54
118
118
  ____exports.ModCallbackCustom[____exports.ModCallbackCustom.POST_PLAYER_RENDER_REORDERED] = "POST_PLAYER_RENDER_REORDERED"
119
119
  ____exports.ModCallbackCustom.POST_PLAYER_UPDATE_REORDERED = 55
@@ -0,0 +1,4 @@
1
+ export declare enum StageTravelState {
2
+ NONE = 0
3
+ }
4
+ //# sourceMappingURL=StageTravelState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StageTravelState.d.ts","sourceRoot":"","sources":["../../../src/enums/private/StageTravelState.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,IAAI,IAAA;CAEL"}
@@ -0,0 +1,5 @@
1
+ local ____exports = {}
2
+ ____exports.StageTravelState = {}
3
+ ____exports.StageTravelState.NONE = 0
4
+ ____exports.StageTravelState[____exports.StageTravelState.NONE] = "NONE"
5
+ return ____exports
@@ -17,12 +17,12 @@ import { GridCollisionClass, GridEntityType } from "isaac-typescript-definitions
17
17
  * @param gridIndexOrPosition The grid index or position in the room that you want to spawn the grid
18
18
  * entity at. If a position is specified, the closest grid index will be
19
19
  * used.
20
- * @param anm2 The path to the ANM2 file to use for the sprite.
20
+ * @param anm2Path The path to the ANM2 file to use for the sprite.
21
21
  * @param defaultAnimation The name of the animation to play after the sprite is initialized and
22
22
  * after the player re-enters a room with this grid entity in it.
23
23
  * @param gridCollisionClass The collision class that you want the custom grid entity to have.
24
24
  */
25
- export declare function spawnCustomGrid(gridEntityTypeCustom: GridEntityType, gridIndexOrPosition: int | Vector, anm2: string, defaultAnimation: string, gridCollisionClass: GridCollisionClass): GridEntity;
25
+ export declare function spawnCustomGridEntity(gridEntityTypeCustom: GridEntityType, gridIndexOrPosition: int | Vector, anm2Path: string, defaultAnimation: string, gridCollisionClass: GridCollisionClass): GridEntity;
26
26
  /**
27
27
  * Helper function to remove a custom grid entity created by the `spawnCustomGrid` function.
28
28
  *
@@ -1 +1 @@
1
- {"version":3,"file":"customGridEntity.d.ts","sourceRoot":"","sources":["../../src/features/customGridEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,cAAc,EACf,MAAM,8BAA8B,CAAC;AA6DtC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,eAAe,CAC7B,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,IAAI,EAAE,MAAM,EACZ,gBAAgB,EAAE,MAAM,EACxB,kBAAkB,EAAE,kBAAkB,GACrC,UAAU,CA4CZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS,CAqCxB"}
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;AAgFtC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,qBAAqB,CACnC,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,QAAQ,EAAE,MAAM,EAChB,gBAAgB,EAAE,MAAM,EACxB,kBAAkB,EAAE,kBAAkB,GACrC,UAAU,CA4CZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS,CAqCxB"}
@@ -3,9 +3,11 @@ local Map = ____lualib.Map
3
3
  local __TS__New = ____lualib.__TS__New
4
4
  local __TS__Iterator = ____lualib.__TS__Iterator
5
5
  local ____exports = {}
6
- local postNewRoomReordered, v
6
+ local preUseItemWeNeedToGoDeeper, postNewRoomReordered, v
7
7
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
8
+ local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
8
9
  local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
10
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
9
11
  local ____cachedClasses = require("cachedClasses")
10
12
  local game = ____cachedClasses.game
11
13
  local ____DefaultMap = require("classes.DefaultMap")
@@ -25,6 +27,9 @@ local ____vector = require("functions.vector")
25
27
  local isVector = ____vector.isVector
26
28
  local ____exports = require("features.saveDataManager.exports")
27
29
  local saveDataManager = ____exports.saveDataManager
30
+ function preUseItemWeNeedToGoDeeper(self, _collectibleType, _rng, _player, _useFlags, _activeSlot, _customVarData)
31
+ return nil
32
+ end
28
33
  function postNewRoomReordered(self)
29
34
  local roomListIndex = getRoomListIndex(nil)
30
35
  local roomCustomGridEntities = v.level.customGridEntities:get(roomListIndex)
@@ -39,13 +44,13 @@ function postNewRoomReordered(self)
39
44
  local decoration = room:GetGridEntity(gridIndex)
40
45
  if decoration == nil then
41
46
  roomCustomGridEntities:delete(gridIndex)
42
- goto __continue6
47
+ goto __continue7
43
48
  end
44
49
  local sprite = decoration:GetSprite()
45
- sprite:Load(data.anm2, true)
50
+ sprite:Load(data.anm2Path, true)
46
51
  sprite:Play(data.defaultAnimation, true)
47
52
  end
48
- ::__continue6::
53
+ ::__continue7::
49
54
  end
50
55
  end
51
56
  local FEATURE_NAME = "customGridEntity"
@@ -57,6 +62,7 @@ v = {level = {customGridEntities = __TS__New(
57
62
  -- @internal
58
63
  function ____exports.customGridEntityInit(self, mod)
59
64
  saveDataManager(nil, FEATURE_NAME, v)
65
+ mod:AddCallback(ModCallback.PRE_USE_ITEM, preUseItemWeNeedToGoDeeper, CollectibleType.WE_NEED_TO_GO_DEEPER)
60
66
  mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_ROOM_REORDERED, postNewRoomReordered)
61
67
  end
62
68
  --- Helper function to spawn a custom grid entity.
@@ -76,11 +82,11 @@ end
76
82
  -- @param gridIndexOrPosition The grid index or position in the room that you want to spawn the grid
77
83
  -- entity at. If a position is specified, the closest grid index will be
78
84
  -- used.
79
- -- @param anm2 The path to the ANM2 file to use for the sprite.
85
+ -- @param anm2Path The path to the ANM2 file to use for the sprite.
80
86
  -- @param defaultAnimation The name of the animation to play after the sprite is initialized and
81
87
  -- after the player re-enters a room with this grid entity in it.
82
88
  -- @param gridCollisionClass The collision class that you want the custom grid entity to have.
83
- function ____exports.spawnCustomGrid(self, gridEntityTypeCustom, gridIndexOrPosition, anm2, defaultAnimation, gridCollisionClass)
89
+ function ____exports.spawnCustomGridEntity(self, gridEntityTypeCustom, gridIndexOrPosition, anm2Path, defaultAnimation, gridCollisionClass)
84
90
  errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
85
91
  local room = game:GetRoom()
86
92
  local roomListIndex = getRoomListIndex(nil)
@@ -92,13 +98,13 @@ function ____exports.spawnCustomGrid(self, gridEntityTypeCustom, gridIndexOrPosi
92
98
  error("Failed to spawn a decoration for a custom grid entity.")
93
99
  end
94
100
  local sprite = decoration:GetSprite()
95
- sprite:Load(anm2, true)
101
+ sprite:Load(anm2Path, true)
96
102
  sprite:Play(defaultAnimation, true)
97
103
  local customGridEntityData = {
98
104
  gridEntityTypeCustom = gridEntityTypeCustom,
99
105
  roomListIndex = roomListIndex,
100
106
  gridIndex = gridIndex,
101
- anm2 = anm2,
107
+ anm2Path = anm2Path,
102
108
  defaultAnimation = defaultAnimation,
103
109
  gridCollisionClass = gridCollisionClass
104
110
  }
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/init.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AA8BxD,wBAAgB,eAAe,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAoBtD"}
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/init.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAgCxD,wBAAgB,eAAe,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CA2BtD"}
@@ -26,6 +26,7 @@ local ____shadows = require("features.customStage.shadows")
26
26
  local setShadows = ____shadows.setShadows
27
27
  local ____streakText = require("features.customStage.streakText")
28
28
  local streakTextGetShaderParams = ____streakText.streakTextGetShaderParams
29
+ local streakTextInit = ____streakText.streakTextInit
29
30
  local streakTextPostGameStarted = ____streakText.streakTextPostGameStarted
30
31
  local streakTextPostRender = ____streakText.streakTextPostRender
31
32
  local ____v = require("features.customStage.v")
@@ -33,6 +34,7 @@ local v = ____v.default
33
34
  local customStagesMap = ____v.customStagesMap
34
35
  local ____versusScreen = require("features.customStage.versusScreen")
35
36
  local playVersusScreenAnimation = ____versusScreen.playVersusScreenAnimation
37
+ local versusScreenInit = ____versusScreen.versusScreenInit
36
38
  local versusScreenPostRender = ____versusScreen.versusScreenPostRender
37
39
  function initRoomTypeMaps(self)
38
40
  if not isArray(nil, metadataJSON) then
@@ -116,8 +118,13 @@ function postNewRoomReordered(self)
116
118
  playVersusScreenAnimation(nil, customStage)
117
119
  end
118
120
  function ____exports.customStageInit(self, mod)
119
- saveDataManager(nil, "customStage", v)
120
121
  initRoomTypeMaps(nil)
122
+ if customStagesMap.size == 0 then
123
+ return
124
+ end
125
+ saveDataManager(nil, "customStage", v)
126
+ streakTextInit(nil)
127
+ versusScreenInit(nil)
121
128
  mod:AddCallback(ModCallback.POST_RENDER, postRender)
122
129
  mod:AddCallback(ModCallback.POST_GAME_STARTED, postGameStarted)
123
130
  mod:AddCallback(ModCallback.GET_SHADER_PARAMS, getShaderParams)
@@ -1,4 +1,10 @@
1
1
  import { CustomStage } from "../../interfaces/CustomStage";
2
+ /**
3
+ * We must load the sprites in an init function to prevent issues with mods that replace the vanilla
4
+ * files. (For some reason, loading the sprites will cause the overwrite to no longer apply on the
5
+ * second and subsequent runs.)
6
+ */
7
+ export declare function streakTextInit(): void;
2
8
  export declare function streakTextPostRender(): void;
3
9
  export declare function streakTextPostGameStarted(): void;
4
10
  export declare function streakTextGetShaderParams(customStage: CustomStage, shaderName: string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"streakText.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/streakText.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AA+F3D,wBAAgB,oBAAoB,IAAI,IAAI,CAS3C;AAmFD,wBAAgB,yBAAyB,IAAI,IAAI,CAGhD;AAGD,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,GACjB,IAAI,CAYN;AAiFD,wBAAgB,kBAAkB,IAAI,IAAI,CAUzC"}
1
+ {"version":3,"file":"streakText.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/streakText.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AA0F3D;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAMrC;AAGD,wBAAgB,oBAAoB,IAAI,IAAI,CAS3C;AAmFD,wBAAgB,yBAAyB,IAAI,IAAI,CAGhD;AAGD,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,MAAM,GACjB,IAAI,CAYN;AAiFD,wBAAgB,kBAAkB,IAAI,IAAI,CAUzC"}
@@ -88,9 +88,9 @@ function renderSprite(self, customStage, sprite, position)
88
88
  local adjustment = 0
89
89
  local scale = VectorOne
90
90
  repeat
91
- local ____switch26 = animation
92
- local ____cond26 = ____switch26 == UIStreakAnimation.TEXT
93
- if ____cond26 then
91
+ local ____switch27 = animation
92
+ local ____cond27 = ____switch27 == UIStreakAnimation.TEXT
93
+ if ____cond27 then
94
94
  do
95
95
  if frame < TEXT_STAY_FRAME then
96
96
  adjustment = TEXT_IN_ADJUSTMENTS[frame + 1] or 0
@@ -103,16 +103,16 @@ function renderSprite(self, customStage, sprite, position)
103
103
  break
104
104
  end
105
105
  end
106
- ____cond26 = ____cond26 or ____switch26 == UIStreakAnimation.TEXT_IN
107
- if ____cond26 then
106
+ ____cond27 = ____cond27 or ____switch27 == UIStreakAnimation.TEXT_IN
107
+ if ____cond27 then
108
108
  do
109
109
  adjustment = TEXT_IN_ADJUSTMENTS[frame + 1] or 0
110
110
  scale = TEXT_IN_SCALES[frame + 1] or VectorOne
111
111
  break
112
112
  end
113
113
  end
114
- ____cond26 = ____cond26 or ____switch26 == UIStreakAnimation.TEXT_OUT
115
- if ____cond26 then
114
+ ____cond27 = ____cond27 or ____switch27 == UIStreakAnimation.TEXT_OUT
115
+ if ____cond27 then
116
116
  do
117
117
  adjustment = TEXT_OUT_ADJUSTMENTS[frame + 1] or 0
118
118
  scale = TEXT_OUT_SCALES[frame + 1] or VectorOne
@@ -203,11 +203,16 @@ TEXT_OUT_SCALES = {
203
203
  Vector(3, 0.2)
204
204
  }
205
205
  topStreakSprite = Sprite()
206
- topStreakSprite:Load("resources/gfx/ui/ui_streak.anm2", false)
207
- topStreakSprite.PlaybackSpeed = TEXT_PLAYBACK_SPEED
208
206
  bottomStreakSprite = Sprite()
209
- bottomStreakSprite:Load("resources/gfx/ui/ui_streak.anm2", false)
210
- bottomStreakSprite.PlaybackSpeed = TEXT_PLAYBACK_SPEED
207
+ --- We must load the sprites in an init function to prevent issues with mods that replace the vanilla
208
+ -- files. (For some reason, loading the sprites will cause the overwrite to no longer apply on the
209
+ -- second and subsequent runs.)
210
+ function ____exports.streakTextInit(self)
211
+ topStreakSprite:Load("resources/gfx/ui/ui_streak.anm2", false)
212
+ topStreakSprite.PlaybackSpeed = TEXT_PLAYBACK_SPEED
213
+ bottomStreakSprite:Load("resources/gfx/ui/ui_streak.anm2", false)
214
+ bottomStreakSprite.PlaybackSpeed = TEXT_PLAYBACK_SPEED
215
+ end
211
216
  function ____exports.streakTextPostRender(self)
212
217
  checkEndTopStreakText(nil)
213
218
  trackMapInputPressed(nil)
@@ -1,4 +1,10 @@
1
1
  import { CustomStage } from "../../interfaces/CustomStage";
2
+ /**
3
+ * We must load the sprites in an init function to prevent issues with mods that replace the vanilla
4
+ * files. (For some reason, loading the sprites will cause the overwrite to no longer apply on the
5
+ * second and subsequent runs.)
6
+ */
7
+ export declare function versusScreenInit(): void;
2
8
  export declare function playVersusScreenAnimation(customStage: CustomStage): void;
3
9
  export declare function versusScreenPostRender(): void;
4
10
  //# sourceMappingURL=versusScreen.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"versusScreen.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/versusScreen.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAiF3D,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAuDxE;AA+ED,wBAAgB,sBAAsB,IAAI,IAAI,CAoC7C"}
1
+ {"version":3,"file":"versusScreen.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/versusScreen.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAqE3D;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAavC;AAED,wBAAgB,yBAAyB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAuDxE;AA+ED,wBAAgB,sBAAsB,IAAI,IAAI,CAoC7C"}
@@ -107,17 +107,22 @@ PNG_PATH_PREFIX = "gfx/ui/boss"
107
107
  PLAYER_PORTRAIT_PNG_PATH_PREFIX = "gfx/ui/stage"
108
108
  local VANILLA_VERSUS_PLAYBACK_SPEED = 0.5
109
109
  local versusScreenSprite = Sprite()
110
- versusScreenSprite:Load("gfx/ui/boss/versusscreen.anm2", false)
111
- versusScreenSprite:ReplaceSpritesheet(OVERLAY_ANM2_LAYER, ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH .. "/overlay.png")
112
- versusScreenSprite:LoadGraphics()
113
110
  --- Unfortunately, we must split the background layer into an entirely different sprite so that we
114
111
  -- can color it with the `Color` property.
115
112
  local versusScreenBackgroundSprite = Sprite()
116
- versusScreenBackgroundSprite:Load("gfx/ui/boss/versusscreen.anm2", true)
117
113
  --- Unfortunately, we must split the dirt layer into an entirely different sprite so that we can
118
114
  -- color it with the `Color` property.
119
115
  local versusScreenDirtSpotSprite = Sprite()
120
- versusScreenDirtSpotSprite:Load("gfx/ui/boss/versusscreen.anm2", true)
116
+ --- We must load the sprites in an init function to prevent issues with mods that replace the vanilla
117
+ -- files. (For some reason, loading the sprites will cause the overwrite to no longer apply on the
118
+ -- second and subsequent runs.)
119
+ function ____exports.versusScreenInit(self)
120
+ versusScreenSprite:Load("gfx/ui/boss/versusscreen.anm2", false)
121
+ versusScreenSprite:ReplaceSpritesheet(OVERLAY_ANM2_LAYER, ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH .. "/overlay.png")
122
+ versusScreenSprite:LoadGraphics()
123
+ versusScreenBackgroundSprite:Load("gfx/ui/boss/versusscreen.anm2", true)
124
+ versusScreenDirtSpotSprite:Load("gfx/ui/boss/versusscreen.anm2", true)
125
+ end
121
126
  function ____exports.playVersusScreenAnimation(self, customStage)
122
127
  local room = game:GetRoom()
123
128
  local roomType = room:GetType()
@@ -0,0 +1,10 @@
1
+ import { GridEntityType } from "isaac-typescript-definitions";
2
+ export declare const CUSTOM_TRAPDOOR_FEATURE_NAME = "customTrapdoor";
3
+ /** This also applies to crawl spaces. The value was determined through trial and error. */
4
+ export declare const TRAPDOOR_OPEN_DISTANCE = 60;
5
+ export declare const TRAPDOOR_OPEN_DISTANCE_AFTER_BOSS: number;
6
+ export declare const TRAPDOOR_BOSS_REACTION_FRAMES = 30;
7
+ export declare const GridEntityTypeCustom: {
8
+ readonly TRAPDOOR_CUSTOM: GridEntityType;
9
+ };
10
+ //# sourceMappingURL=customTrapdoorConstants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"customTrapdoorConstants.d.ts","sourceRoot":"","sources":["../../../src/features/customTrapdoor/customTrapdoorConstants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,eAAO,MAAM,4BAA4B,mBAAmB,CAAC;AAE7D,2FAA2F;AAC3F,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,eAAO,MAAM,iCAAiC,QAA+B,CAAC;AAC9E,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAEhD,eAAO,MAAM,oBAAoB;;CAEvB,CAAC"}