isaacscript-common 6.10.2 → 6.11.2

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 (169) hide show
  1. package/dist/callbacks/postFlip.lua +2 -2
  2. package/dist/callbacks/postPlayerFatalDamage.lua +1 -1
  3. package/dist/callbacks/postPlayerInitFirst.d.ts +2 -0
  4. package/dist/callbacks/postPlayerInitFirst.d.ts.map +1 -0
  5. package/dist/callbacks/postPlayerInitFirst.lua +42 -0
  6. package/dist/callbacks/postPlayerInitLate.lua +5 -5
  7. package/dist/callbacks/postPlayerReorderedCallbacks.d.ts +2 -0
  8. package/dist/callbacks/postPlayerReorderedCallbacks.d.ts.map +1 -0
  9. package/dist/callbacks/{postPlayerReordered.lua → postPlayerReorderedCallbacks.lua} +11 -37
  10. package/dist/callbacks/subscriptions/postFirstFlip.d.ts +1 -1
  11. package/dist/callbacks/subscriptions/postFirstFlip.d.ts.map +1 -1
  12. package/dist/callbacks/subscriptions/postFirstFlip.lua +2 -2
  13. package/dist/callbacks/subscriptions/postFlip.d.ts +1 -1
  14. package/dist/callbacks/subscriptions/postFlip.d.ts.map +1 -1
  15. package/dist/callbacks/subscriptions/postFlip.lua +2 -2
  16. package/dist/callbacks/subscriptions/{postPlayerInitReordered.d.ts → postPlayerInitFirst.d.ts} +2 -2
  17. package/dist/callbacks/subscriptions/postPlayerInitFirst.d.ts.map +1 -0
  18. package/dist/callbacks/subscriptions/{postPlayerInitReordered.lua → postPlayerInitFirst.lua} +3 -3
  19. package/dist/enums/ModCallbackCustom.d.ts +19 -17
  20. package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
  21. package/dist/enums/ModCallbackCustom.lua +3 -3
  22. package/dist/enums/private/StageTravelState.d.ts +9 -0
  23. package/dist/enums/private/StageTravelState.d.ts.map +1 -0
  24. package/dist/enums/private/StageTravelState.lua +15 -0
  25. package/dist/enums/private/TrapdoorAnimation.d.ts +6 -0
  26. package/dist/enums/private/TrapdoorAnimation.d.ts.map +1 -0
  27. package/dist/enums/private/TrapdoorAnimation.lua +6 -0
  28. package/dist/features/customGridEntity.d.ts +8 -5
  29. package/dist/features/customGridEntity.d.ts.map +1 -1
  30. package/dist/features/customGridEntity.lua +66 -17
  31. package/dist/features/customStage/exports.d.ts.map +1 -1
  32. package/dist/features/customStage/exports.lua +0 -13
  33. package/dist/features/customStage/init.d.ts.map +1 -1
  34. package/dist/features/customStage/init.lua +24 -2
  35. package/dist/features/customStage/streakText.d.ts +6 -0
  36. package/dist/features/customStage/streakText.d.ts.map +1 -1
  37. package/dist/features/customStage/streakText.lua +16 -12
  38. package/dist/features/customStage/versusScreen.d.ts +6 -0
  39. package/dist/features/customStage/versusScreen.d.ts.map +1 -1
  40. package/dist/features/customStage/versusScreen.lua +10 -5
  41. package/dist/features/customTrapdoor/blackSprite.d.ts +2 -0
  42. package/dist/features/customTrapdoor/blackSprite.d.ts.map +1 -0
  43. package/dist/features/customTrapdoor/blackSprite.lua +19 -0
  44. package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts +15 -0
  45. package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts.map +1 -0
  46. package/dist/features/customTrapdoor/customTrapdoorConstants.lua +16 -0
  47. package/dist/features/customTrapdoor/exports.d.ts +29 -0
  48. package/dist/features/customTrapdoor/exports.d.ts.map +1 -0
  49. package/dist/features/customTrapdoor/exports.lua +93 -0
  50. package/dist/features/customTrapdoor/init.d.ts +3 -0
  51. package/dist/features/customTrapdoor/init.d.ts.map +1 -0
  52. package/dist/features/customTrapdoor/init.lua +173 -0
  53. package/dist/features/customTrapdoor/openClose.d.ts +5 -0
  54. package/dist/features/customTrapdoor/openClose.d.ts.map +1 -0
  55. package/dist/features/customTrapdoor/openClose.lua +60 -0
  56. package/dist/features/customTrapdoor/touched.d.ts +4 -0
  57. package/dist/features/customTrapdoor/touched.d.ts.map +1 -0
  58. package/dist/features/customTrapdoor/touched.lua +141 -0
  59. package/dist/features/customTrapdoor/v.d.ts +18 -0
  60. package/dist/features/customTrapdoor/v.d.ts.map +1 -0
  61. package/dist/features/customTrapdoor/v.lua +17 -0
  62. package/dist/features/deployJSONRoom.d.ts.map +1 -1
  63. package/dist/features/deployJSONRoom.lua +1 -1
  64. package/dist/features/extraConsoleCommands/init.d.ts.map +1 -1
  65. package/dist/features/extraConsoleCommands/init.lua +3 -1
  66. package/dist/features/extraConsoleCommands/listCommands.lua +2 -2
  67. package/dist/features/taintedLazarusPlayers.d.ts.map +1 -1
  68. package/dist/features/taintedLazarusPlayers.lua +13 -21
  69. package/dist/functions/{character.d.ts → characters.d.ts} +3 -1
  70. package/dist/functions/characters.d.ts.map +1 -0
  71. package/dist/functions/{character.lua → characters.lua} +12 -0
  72. package/dist/functions/deepCopyTests.lua +35 -45
  73. package/dist/functions/jsonHelpers.d.ts +6 -0
  74. package/dist/functions/jsonHelpers.d.ts.map +1 -1
  75. package/dist/functions/jsonHelpers.lua +9 -3
  76. package/dist/functions/log.lua +3 -3
  77. package/dist/functions/playerIndex.d.ts +11 -2
  78. package/dist/functions/playerIndex.d.ts.map +1 -1
  79. package/dist/functions/playerIndex.lua +20 -8
  80. package/dist/functions/players.lua +4 -4
  81. package/dist/functions/revive.lua +2 -2
  82. package/dist/functions/table.d.ts +1 -1
  83. package/dist/functions/table.d.ts.map +1 -1
  84. package/dist/index.d.ts +3 -2
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.lua +10 -2
  87. package/dist/initCustomCallbacks.d.ts.map +1 -1
  88. package/dist/initCustomCallbacks.lua +5 -2
  89. package/dist/initFeatures.d.ts +1 -2
  90. package/dist/initFeatures.d.ts.map +1 -1
  91. package/dist/initFeatures.lua +10 -2
  92. package/dist/interfaces/AddCallbackParameterCustom.d.ts +2 -2
  93. package/dist/interfaces/AddCallbackParameterCustom.d.ts.map +1 -1
  94. package/dist/interfaces/CustomGridEntityData.d.ts +6 -2
  95. package/dist/interfaces/CustomGridEntityData.d.ts.map +1 -1
  96. package/dist/interfaces/private/CustomTrapdoorDescription.d.ts +7 -0
  97. package/dist/interfaces/private/CustomTrapdoorDescription.d.ts.map +1 -0
  98. package/dist/interfaces/private/CustomTrapdoorDescription.lua +2 -0
  99. package/dist/lib/jsonLua.lua +390 -0
  100. package/dist/objects/callbackRegisterFunctions.d.ts.map +1 -1
  101. package/dist/objects/callbackRegisterFunctions.lua +3 -3
  102. package/dist/objects/characterDamageMultipliers.d.ts +6 -0
  103. package/dist/objects/characterDamageMultipliers.d.ts.map +1 -0
  104. package/dist/objects/characterDamageMultipliers.lua +49 -0
  105. package/dist/upgradeMod.d.ts.map +1 -1
  106. package/dist/upgradeMod.lua +2 -4
  107. package/package.json +2 -2
  108. package/src/callbacks/customRevive.ts +3 -3
  109. package/src/callbacks/itemPickup.ts +3 -3
  110. package/src/callbacks/postAmbush.ts +3 -3
  111. package/src/callbacks/postEsauJr.ts +3 -3
  112. package/src/callbacks/postFlip.ts +6 -5
  113. package/src/callbacks/postGridEntity.ts +5 -5
  114. package/src/callbacks/postPlayerCollectible.ts +2 -2
  115. package/src/callbacks/postPlayerFatalDamage.ts +5 -0
  116. package/src/callbacks/postPlayerInitFirst.ts +57 -0
  117. package/src/callbacks/postPlayerInitLate.ts +9 -5
  118. package/src/callbacks/{postPlayerReordered.ts → postPlayerReorderedCallbacks.ts} +9 -29
  119. package/src/callbacks/postSlotInitUpdate.ts +5 -2
  120. package/src/callbacks/postSlotRender.ts +2 -2
  121. package/src/callbacks/reorderedCallbacks.ts +1 -1
  122. package/src/callbacks/subscriptions/postFirstFlip.ts +6 -3
  123. package/src/callbacks/subscriptions/postFlip.ts +6 -3
  124. package/src/callbacks/subscriptions/{postPlayerInitReordered.ts → postPlayerInitFirst.ts} +6 -6
  125. package/src/enums/ModCallbackCustom.ts +19 -17
  126. package/src/enums/private/StageTravelState.ts +8 -0
  127. package/src/enums/private/TrapdoorAnimation.ts +5 -0
  128. package/src/features/customGridEntity.ts +93 -12
  129. package/src/features/customStage/exports.ts +3 -22
  130. package/src/features/customStage/init.ts +30 -1
  131. package/src/features/customStage/streakText.ts +13 -5
  132. package/src/features/customStage/versusScreen.ts +20 -12
  133. package/src/features/customTrapdoor/blackSprite.ts +16 -0
  134. package/src/features/customTrapdoor/customTrapdoorConstants.ts +23 -0
  135. package/src/features/customTrapdoor/exports.ts +99 -0
  136. package/src/features/customTrapdoor/init.ts +215 -0
  137. package/src/features/customTrapdoor/openClose.ts +103 -0
  138. package/src/features/customTrapdoor/touched.ts +175 -0
  139. package/src/features/customTrapdoor/v.ts +26 -0
  140. package/src/features/deployJSONRoom.ts +6 -1
  141. package/src/features/extraConsoleCommands/init.ts +5 -2
  142. package/src/features/extraConsoleCommands/listCommands.ts +1 -1
  143. package/src/features/saveDataManager/main.ts +1 -1
  144. package/src/features/taintedLazarusPlayers.ts +32 -31
  145. package/src/functions/{character.ts → characters.ts} +13 -0
  146. package/src/functions/deepCopy.ts +2 -2
  147. package/src/functions/deepCopyTests.ts +44 -48
  148. package/src/functions/entities.ts +1 -1
  149. package/src/functions/jsonHelpers.ts +9 -3
  150. package/src/functions/playerIndex.ts +18 -2
  151. package/src/functions/players.ts +1 -1
  152. package/src/functions/revive.ts +1 -1
  153. package/src/functions/rng.ts +1 -1
  154. package/src/functions/table.ts +2 -2
  155. package/src/index.ts +6 -2
  156. package/src/initCustomCallbacks.ts +3 -1
  157. package/src/initFeatures.ts +9 -2
  158. package/src/interfaces/AddCallbackParameterCustom.ts +2 -2
  159. package/src/interfaces/CustomGridEntityData.ts +7 -2
  160. package/src/interfaces/private/CustomTrapdoorDescription.ts +7 -0
  161. package/src/lib/jsonLua.d.ts +10 -0
  162. package/src/lib/jsonLua.lua +390 -0
  163. package/src/objects/callbackRegisterFunctions.ts +2 -3
  164. package/src/objects/characterDamageMultipliers.ts +49 -0
  165. package/src/upgradeMod.ts +2 -3
  166. package/dist/callbacks/postPlayerReordered.d.ts +0 -2
  167. package/dist/callbacks/postPlayerReordered.d.ts.map +0 -1
  168. package/dist/callbacks/subscriptions/postPlayerInitReordered.d.ts.map +0 -1
  169. package/dist/functions/character.d.ts.map +0 -1
@@ -33,9 +33,9 @@ function useItemFlip(self, _collectibleType, _rng, player, _useFlags, _activeSlo
33
33
  end
34
34
  if not v.run.usedFlipAtLeastOnce then
35
35
  v.run.usedFlipAtLeastOnce = true
36
- postFirstFlipFire(nil, newLazarus)
36
+ postFirstFlipFire(nil, newLazarus, player)
37
37
  end
38
- postFlipFire(nil, newLazarus)
38
+ postFlipFire(nil, newLazarus, player)
39
39
  return nil
40
40
  end
41
41
  function getNewLazarus(self, oldLazarus)
@@ -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,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  export declare type PostFirstFlipRegisterParameters = [
3
- callback: (player: EntityPlayer) => void
3
+ callback: (newLazarus: EntityPlayer, oldLazarus: EntityPlayer) => void
4
4
  ];
5
5
  //# sourceMappingURL=postFirstFlip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postFirstFlip.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postFirstFlip.ts"],"names":[],"mappings":";AAAA,oBAAY,+BAA+B,GAAG;IAC5C,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI;CACzC,CAAC"}
1
+ {"version":3,"file":"postFirstFlip.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postFirstFlip.ts"],"names":[],"mappings":";AAAA,oBAAY,+BAA+B,GAAG;IAC5C,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,KAAK,IAAI;CACvE,CAAC"}
@@ -13,10 +13,10 @@ function ____exports.postFirstFlipRegister(self, ...)
13
13
  end
14
14
  ---
15
15
  -- @internal
16
- function ____exports.postFirstFlipFire(self, player)
16
+ function ____exports.postFirstFlipFire(self, newLazarus, oldLazarus)
17
17
  for ____, ____value in ipairs(subscriptions) do
18
18
  local callback = ____value[1]
19
- callback(nil, player)
19
+ callback(nil, newLazarus, oldLazarus)
20
20
  end
21
21
  end
22
22
  return ____exports
@@ -1,5 +1,5 @@
1
1
  /// <reference types="isaac-typescript-definitions" />
2
2
  export declare type PostFlipRegisterParameters = [
3
- callback: (player: EntityPlayer) => void
3
+ callback: (newLazarus: EntityPlayer, oldLazarus: EntityPlayer) => void
4
4
  ];
5
5
  //# sourceMappingURL=postFlip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postFlip.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postFlip.ts"],"names":[],"mappings":";AAAA,oBAAY,0BAA0B,GAAG;IACvC,QAAQ,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI;CACzC,CAAC"}
1
+ {"version":3,"file":"postFlip.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postFlip.ts"],"names":[],"mappings":";AAAA,oBAAY,0BAA0B,GAAG;IACvC,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,KAAK,IAAI;CACvE,CAAC"}
@@ -13,10 +13,10 @@ function ____exports.postFlipRegister(self, ...)
13
13
  end
14
14
  ---
15
15
  -- @internal
16
- function ____exports.postFlipFire(self, player)
16
+ function ____exports.postFlipFire(self, newLazarus, oldLazarus)
17
17
  for ____, ____value in ipairs(subscriptions) do
18
18
  local callback = ____value[1]
19
- callback(nil, player)
19
+ callback(nil, newLazarus, oldLazarus)
20
20
  end
21
21
  end
22
22
  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]
@@ -267,7 +267,7 @@ export declare enum ModCallbackCustom {
267
267
  * before the player has actually used the Flip item.
268
268
  *
269
269
  * ```ts
270
- * function postFirstFlip(player: EntityPlayer): void {}
270
+ * function postFirstFlip(newLazarus: EntityPlayer, oldLazarus: EntityPlayer): void {}
271
271
  * ```
272
272
  */
273
273
  POST_FIRST_FLIP = 19,
@@ -280,7 +280,7 @@ export declare enum ModCallbackCustom {
280
280
  * before the player has actually used the Flip item.
281
281
  *
282
282
  * ```ts
283
- * function postFlip(player: EntityPlayer): void {}
283
+ * function postFlip(newLazarus: EntityPlayer, oldLazarus: EntityPlayer): void {}
284
284
  * ```
285
285
  */
286
286
  POST_FLIP = 20,
@@ -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;IA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AA;IAEhB;;;;;;;;;OASG;IACH,0BAA0B,KAAA;IAE1B;;;;;;;;;OASG;IACH,0BAA0B,KAAA;IAE1B;;;;;;;;;;;;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"}
1
+ {"version":3,"file":"ModCallbackCustom.d.ts","sourceRoot":"","sources":["../../src/enums/ModCallbackCustom.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,oBAAY,iBAAiB;IAC3B;;;;;;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AAe,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,9 @@
1
+ export declare enum StageTravelState {
2
+ NONE = 0,
3
+ PLAYERS_JUMPING_DOWN = 1,
4
+ PIXELATION_TO_BLACK = 2,
5
+ PAUSING_ON_BLACK = 3,
6
+ PIXELATION_TO_ROOM = 4,
7
+ PLAYERS_LAYING_DOWN = 5
8
+ }
9
+ //# 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;IACJ,oBAAoB,IAAA;IACpB,mBAAmB,IAAA;IACnB,gBAAgB,IAAA;IAChB,kBAAkB,IAAA;IAClB,mBAAmB,IAAA;CACpB"}
@@ -0,0 +1,15 @@
1
+ local ____exports = {}
2
+ ____exports.StageTravelState = {}
3
+ ____exports.StageTravelState.NONE = 0
4
+ ____exports.StageTravelState[____exports.StageTravelState.NONE] = "NONE"
5
+ ____exports.StageTravelState.PLAYERS_JUMPING_DOWN = 1
6
+ ____exports.StageTravelState[____exports.StageTravelState.PLAYERS_JUMPING_DOWN] = "PLAYERS_JUMPING_DOWN"
7
+ ____exports.StageTravelState.PIXELATION_TO_BLACK = 2
8
+ ____exports.StageTravelState[____exports.StageTravelState.PIXELATION_TO_BLACK] = "PIXELATION_TO_BLACK"
9
+ ____exports.StageTravelState.PAUSING_ON_BLACK = 3
10
+ ____exports.StageTravelState[____exports.StageTravelState.PAUSING_ON_BLACK] = "PAUSING_ON_BLACK"
11
+ ____exports.StageTravelState.PIXELATION_TO_ROOM = 4
12
+ ____exports.StageTravelState[____exports.StageTravelState.PIXELATION_TO_ROOM] = "PIXELATION_TO_ROOM"
13
+ ____exports.StageTravelState.PLAYERS_LAYING_DOWN = 5
14
+ ____exports.StageTravelState[____exports.StageTravelState.PLAYERS_LAYING_DOWN] = "PLAYERS_LAYING_DOWN"
15
+ return ____exports
@@ -0,0 +1,6 @@
1
+ export declare enum TrapdoorAnimation {
2
+ OPENED = "Opened",
3
+ CLOSED = "Closed",
4
+ OPEN_ANIMATION = "Open Animation"
5
+ }
6
+ //# sourceMappingURL=TrapdoorAnimation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TrapdoorAnimation.d.ts","sourceRoot":"","sources":["../../../src/enums/private/TrapdoorAnimation.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,cAAc,mBAAmB;CAClC"}
@@ -0,0 +1,6 @@
1
+ local ____exports = {}
2
+ ____exports.TrapdoorAnimation = {}
3
+ ____exports.TrapdoorAnimation.OPENED = "Opened"
4
+ ____exports.TrapdoorAnimation.CLOSED = "Closed"
5
+ ____exports.TrapdoorAnimation.OPEN_ANIMATION = "Open Animation"
6
+ return ____exports
@@ -1,6 +1,8 @@
1
1
  import { GridCollisionClass, GridEntityType } from "isaac-typescript-definitions";
2
2
  /**
3
- * Helper function to spawn a custom grid entity.
3
+ * Helper function to spawn a custom grid entity. Custom grid entities are persistent in that they
4
+ * will reappear if the player leaves and re-enters the room. (It will be manually respawned in the
5
+ * `POST_NEW_ROOM` callback.)
4
6
  *
5
7
  * This is an IsaacScript feature because the vanilla game does not support any custom grid
6
8
  * entities. Under the hood, IsaacScript accomplishes this by using decorations with an arbitrary
@@ -17,12 +19,13 @@ import { GridCollisionClass, GridEntityType } from "isaac-typescript-definitions
17
19
  * @param gridIndexOrPosition The grid index or position in the room that you want to spawn the grid
18
20
  * entity at. If a position is specified, the closest grid index will be
19
21
  * used.
20
- * @param anm2 The path to the ANM2 file to use for the sprite.
21
- * @param defaultAnimation The name of the animation to play after the sprite is initialized and
22
- * after the player re-enters a room with this grid entity in it.
23
22
  * @param gridCollisionClass The collision class that you want the custom grid entity to have.
23
+ * @param anm2Path The path to the ANM2 file to use for the sprite.
24
+ * @param defaultAnimation Optional. The name of the animation to play after the sprite is
25
+ * initialized and after the player re-enters a room with this grid entity
26
+ * in it. If not specified, the default animation in the anm2 will be used.
24
27
  */
25
- export declare function spawnCustomGrid(gridEntityTypeCustom: GridEntityType, gridIndexOrPosition: int | Vector, anm2: string, defaultAnimation: string, gridCollisionClass: GridCollisionClass): GridEntity;
28
+ export declare function spawnCustomGridEntity(gridEntityTypeCustom: GridEntityType, gridIndexOrPosition: int | Vector, gridCollisionClass: GridCollisionClass, anm2Path: string, defaultAnimation?: string): GridEntity;
26
29
  /**
27
30
  * Helper function to remove a custom grid entity created by the `spawnCustomGrid` function.
28
31
  *
@@ -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;AAmItC;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,qBAAqB,CACnC,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,MAAM,EAChB,gBAAgB,CAAC,EAAE,MAAM,GACxB,UAAU,CAgDZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS,CAqCxB"}