isaacscript-common 6.11.2 → 6.12.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 (142) hide show
  1. package/dist/callbacks/postGridEntityCustomRender.d.ts +2 -0
  2. package/dist/callbacks/postGridEntityCustomRender.d.ts.map +1 -0
  3. package/dist/callbacks/postGridEntityCustomRender.lua +36 -0
  4. package/dist/callbacks/postGridEntityCustomUpdate.d.ts +2 -0
  5. package/dist/callbacks/postGridEntityCustomUpdate.d.ts.map +1 -0
  6. package/dist/callbacks/postGridEntityCustomUpdate.lua +36 -0
  7. package/dist/callbacks/postNewRoomEarly.lua +2 -2
  8. package/dist/callbacks/postPickupInitFirst.lua +1 -20
  9. package/dist/callbacks/reorderedCallbacks.d.ts +5 -5
  10. package/dist/callbacks/reorderedCallbacks.d.ts.map +1 -1
  11. package/dist/callbacks/reorderedCallbacks.lua +5 -5
  12. package/dist/callbacks/subscriptions/postGridEntityCustomRender.d.ts +6 -0
  13. package/dist/callbacks/subscriptions/postGridEntityCustomRender.d.ts.map +1 -0
  14. package/dist/callbacks/subscriptions/postGridEntityCustomRender.lua +29 -0
  15. package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.d.ts +6 -0
  16. package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.d.ts.map +1 -0
  17. package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.lua +29 -0
  18. package/dist/constants.d.ts +1 -5
  19. package/dist/constants.d.ts.map +1 -1
  20. package/dist/constants.lua +0 -7
  21. package/dist/constantsFirstLast.d.ts +5 -1
  22. package/dist/constantsFirstLast.d.ts.map +1 -1
  23. package/dist/constantsFirstLast.lua +6 -0
  24. package/dist/enums/ModCallbackCustom.d.ts +89 -66
  25. package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
  26. package/dist/enums/ModCallbackCustom.lua +62 -58
  27. package/dist/features/customGridEntity.d.ts +9 -0
  28. package/dist/features/customGridEntity.d.ts.map +1 -1
  29. package/dist/features/customGridEntity.lua +20 -0
  30. package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts +2 -2
  31. package/dist/features/customTrapdoor/customTrapdoorConstants.d.ts.map +1 -1
  32. package/dist/features/customTrapdoor/customTrapdoorConstants.lua +2 -2
  33. package/dist/features/customTrapdoor/init.d.ts.map +1 -1
  34. package/dist/features/customTrapdoor/init.lua +4 -3
  35. package/dist/features/customTrapdoor/touched.d.ts.map +1 -1
  36. package/dist/features/customTrapdoor/touched.lua +51 -33
  37. package/dist/features/deployJSONRoom.d.ts +2 -2
  38. package/dist/features/deployJSONRoom.lua +2 -2
  39. package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
  40. package/dist/features/extraConsoleCommands/listCommands.lua +4 -4
  41. package/dist/features/pause.d.ts +1 -1
  42. package/dist/features/pause.d.ts.map +1 -1
  43. package/dist/features/pause.lua +87 -8
  44. package/dist/features/persistentEntities.d.ts.map +1 -1
  45. package/dist/features/persistentEntities.lua +7 -7
  46. package/dist/features/pickupIndex.d.ts +19 -0
  47. package/dist/features/pickupIndex.d.ts.map +1 -0
  48. package/dist/features/pickupIndex.lua +197 -0
  49. package/dist/features/roomHistory.d.ts +24 -0
  50. package/dist/features/roomHistory.d.ts.map +1 -0
  51. package/dist/features/roomHistory.lua +89 -0
  52. package/dist/functions/collectibles.d.ts +26 -13
  53. package/dist/functions/collectibles.d.ts.map +1 -1
  54. package/dist/functions/collectibles.lua +26 -13
  55. package/dist/functions/entities.d.ts +3 -3
  56. package/dist/functions/entities.d.ts.map +1 -1
  57. package/dist/functions/entities.lua +8 -3
  58. package/dist/functions/gridEntities.d.ts +2 -2
  59. package/dist/functions/gridEntities.lua +2 -2
  60. package/dist/functions/isaacAPIClass.d.ts +64 -0
  61. package/dist/functions/isaacAPIClass.d.ts.map +1 -1
  62. package/dist/functions/isaacAPIClass.lua +84 -1
  63. package/dist/functions/pickupVariants.d.ts +2 -2
  64. package/dist/functions/pickupVariants.d.ts.map +1 -1
  65. package/dist/functions/pickupVariants.lua +2 -2
  66. package/dist/functions/playerCenter.lua +2 -2
  67. package/dist/functions/playerIndex.d.ts +0 -3
  68. package/dist/functions/playerIndex.d.ts.map +1 -1
  69. package/dist/functions/playerIndex.lua +4 -23
  70. package/dist/functions/roomData.d.ts +3 -2
  71. package/dist/functions/roomData.d.ts.map +1 -1
  72. package/dist/functions/roomData.lua +3 -2
  73. package/dist/functions/rooms.d.ts +6 -6
  74. package/dist/functions/rooms.lua +6 -6
  75. package/dist/functions/stage.d.ts +1 -0
  76. package/dist/functions/stage.d.ts.map +1 -1
  77. package/dist/functions/stage.lua +4 -0
  78. package/dist/index.d.ts +3 -0
  79. package/dist/index.d.ts.map +1 -1
  80. package/dist/index.lua +23 -0
  81. package/dist/initCustomCallbacks.d.ts.map +1 -1
  82. package/dist/initCustomCallbacks.lua +6 -0
  83. package/dist/initFeatures.d.ts.map +1 -1
  84. package/dist/initFeatures.lua +6 -0
  85. package/dist/interfaces/AddCallbackParameterCustom.d.ts +4 -0
  86. package/dist/interfaces/AddCallbackParameterCustom.d.ts.map +1 -1
  87. package/dist/interfaces/RoomDescription.d.ts +14 -0
  88. package/dist/interfaces/RoomDescription.d.ts.map +1 -0
  89. package/dist/interfaces/RoomDescription.lua +2 -0
  90. package/dist/objects/callbackRegisterFunctions.d.ts.map +1 -1
  91. package/dist/objects/callbackRegisterFunctions.lua +6 -0
  92. package/dist/types/CollectibleIndex.d.ts +1 -1
  93. package/dist/types/PickupIndex.d.ts +17 -0
  94. package/dist/types/PickupIndex.d.ts.map +1 -0
  95. package/dist/types/PickupIndex.lua +2 -0
  96. package/dist/types/PlayerIndex.d.ts +1 -1
  97. package/dist/upgradeMod.d.ts.map +1 -1
  98. package/package.json +1 -1
  99. package/src/callbacks/postGridEntityCustomRender.ts +44 -0
  100. package/src/callbacks/postGridEntityCustomUpdate.ts +44 -0
  101. package/src/callbacks/postNewRoomEarly.ts +2 -2
  102. package/src/callbacks/postPickupInitFirst.ts +1 -32
  103. package/src/callbacks/postPlayerReorderedCallbacks.ts +3 -3
  104. package/src/callbacks/reorderedCallbacks.ts +9 -8
  105. package/src/callbacks/subscriptions/postGridEntityCustomRender.ts +41 -0
  106. package/src/callbacks/subscriptions/postGridEntityCustomUpdate.ts +41 -0
  107. package/src/constants.ts +1 -9
  108. package/src/constantsFirstLast.ts +16 -0
  109. package/src/enums/ModCallbackCustom.ts +33 -8
  110. package/src/features/customGridEntity.ts +25 -0
  111. package/src/features/customTrapdoor/customTrapdoorConstants.ts +2 -2
  112. package/src/features/customTrapdoor/init.ts +7 -5
  113. package/src/features/customTrapdoor/touched.ts +59 -39
  114. package/src/features/deployJSONRoom.ts +4 -4
  115. package/src/features/extraConsoleCommands/listCommands.ts +5 -7
  116. package/src/features/pause.ts +97 -7
  117. package/src/features/persistentEntities.ts +9 -8
  118. package/src/features/pickupIndex.ts +257 -0
  119. package/src/features/playerInventory.ts +2 -2
  120. package/src/features/roomHistory.ts +113 -0
  121. package/src/features/saveDataManager/main.ts +2 -2
  122. package/src/features/taintedLazarusPlayers.ts +5 -5
  123. package/src/functions/collectibles.ts +26 -13
  124. package/src/functions/entities.ts +6 -3
  125. package/src/functions/gridEntities.ts +2 -2
  126. package/src/functions/isaacAPIClass.ts +106 -1
  127. package/src/functions/pickupVariants.ts +2 -2
  128. package/src/functions/playerCenter.ts +2 -2
  129. package/src/functions/playerIndex.ts +8 -21
  130. package/src/functions/roomData.ts +3 -2
  131. package/src/functions/rooms.ts +6 -6
  132. package/src/functions/stage.ts +10 -1
  133. package/src/index.ts +3 -0
  134. package/src/initCustomCallbacks.ts +4 -0
  135. package/src/initFeatures.ts +4 -0
  136. package/src/interfaces/AddCallbackParameterCustom.ts +4 -0
  137. package/src/interfaces/RoomDescription.ts +19 -0
  138. package/src/objects/callbackRegisterFunctions.ts +6 -0
  139. package/src/types/CollectibleIndex.ts +1 -1
  140. package/src/types/PickupIndex.ts +15 -0
  141. package/src/types/PlayerIndex.ts +1 -1
  142. package/src/upgradeMod.ts +2 -1
@@ -1,15 +1,30 @@
1
1
  local ____lualib = require("lualib_bundle")
2
- local Set = ____lualib.Set
2
+ local Map = ____lualib.Map
3
3
  local __TS__New = ____lualib.__TS__New
4
+ local __TS__SparseArrayNew = ____lualib.__TS__SparseArrayNew
5
+ local __TS__SparseArrayPush = ____lualib.__TS__SparseArrayPush
6
+ local __TS__SparseArraySpread = ____lualib.__TS__SparseArraySpread
7
+ local Set = ____lualib.Set
4
8
  local ____exports = {}
5
- local postUpdate, inputActionGetActionValue, v
9
+ local postUpdate, stopTearsAndProjectilesFromMoving, inputActionGetActionValue, v
6
10
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
7
11
  local ButtonAction = ____isaac_2Dtypescript_2Ddefinitions.ButtonAction
8
12
  local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
9
13
  local InputHook = ____isaac_2Dtypescript_2Ddefinitions.InputHook
10
14
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
15
+ local ____constants = require("constants")
16
+ local VectorZero = ____constants.VectorZero
17
+ local ____entitiesSpecific = require("functions.entitiesSpecific")
18
+ local getProjectiles = ____entitiesSpecific.getProjectiles
19
+ local getTears = ____entitiesSpecific.getTears
20
+ local removeAllProjectiles = ____entitiesSpecific.removeAllProjectiles
21
+ local removeAllTears = ____entitiesSpecific.removeAllTears
22
+ local ____isaacAPIClass = require("functions.isaacAPIClass")
23
+ local isTear = ____isaacAPIClass.isTear
11
24
  local ____log = require("functions.log")
12
25
  local logError = ____log.logError
26
+ local ____playerIndex = require("functions.playerIndex")
27
+ local getAllPlayers = ____playerIndex.getAllPlayers
13
28
  local ____players = require("functions.players")
14
29
  local useActiveItemTemp = ____players.useActiveItemTemp
15
30
  local ____disableInputs = require("features.disableInputs")
@@ -21,8 +36,37 @@ function postUpdate(self)
21
36
  if not v.run.isPseudoPaused then
22
37
  return
23
38
  end
24
- local player = Isaac.GetPlayer()
25
- useActiveItemTemp(nil, player, CollectibleType.PAUSE)
39
+ local firstPlayer = Isaac.GetPlayer()
40
+ useActiveItemTemp(nil, firstPlayer, CollectibleType.PAUSE)
41
+ stopTearsAndProjectilesFromMoving(nil)
42
+ end
43
+ function stopTearsAndProjectilesFromMoving(self)
44
+ local ____array_0 = __TS__SparseArrayNew(table.unpack(getTears(nil)))
45
+ __TS__SparseArrayPush(
46
+ ____array_0,
47
+ table.unpack(getProjectiles(nil))
48
+ )
49
+ local tearsAndProjectiles = {__TS__SparseArraySpread(____array_0)}
50
+ for ____, tearOrProjectile in ipairs(tearsAndProjectiles) do
51
+ do
52
+ local ptrHash = GetPtrHash(tearOrProjectile)
53
+ local initialDescription = v.run.initialDescriptions:get(ptrHash)
54
+ if initialDescription == nil then
55
+ goto __continue6
56
+ end
57
+ tearOrProjectile.Position = initialDescription.position
58
+ tearOrProjectile.PositionOffset = initialDescription.positionOffset
59
+ tearOrProjectile.Velocity = VectorZero
60
+ tearOrProjectile.Height = initialDescription.height
61
+ tearOrProjectile.FallingSpeed = 0
62
+ if isTear(nil, tearOrProjectile) then
63
+ tearOrProjectile.FallingAcceleration = initialDescription.fallingAcceleration
64
+ else
65
+ tearOrProjectile.FallingAccel = initialDescription.fallingAcceleration
66
+ end
67
+ end
68
+ ::__continue6::
69
+ end
26
70
  end
27
71
  function inputActionGetActionValue(self, _entity, _inputHook, buttonAction)
28
72
  if buttonAction ~= ButtonAction.SHOOT_RIGHT then
@@ -35,7 +79,11 @@ function inputActionGetActionValue(self, _entity, _inputHook, buttonAction)
35
79
  return 1
36
80
  end
37
81
  local FEATURE_NAME = "pause"
38
- v = {run = {isPseudoPaused = false, shouldUnpause = false}}
82
+ v = {run = {
83
+ isPseudoPaused = false,
84
+ shouldUnpause = false,
85
+ initialDescriptions = __TS__New(Map)
86
+ }}
39
87
  ---
40
88
  -- @internal
41
89
  function ____exports.pauseInit(self, mod)
@@ -48,15 +96,41 @@ end
48
96
  --
49
97
  -- Under the hood, this function:
50
98
  -- - uses the Pause collectible on every game frame
51
- -- - disables any player inputs (except for `ButtonAction.MENU_CONFIRM`)
99
+ -- - disables any player inputs (except for `ButtonAction.MENU_CONFIRM` and `ButtonAction.CONSOLE`)
52
100
  function ____exports.pause(self)
53
101
  if v.run.isPseudoPaused then
54
102
  logError("Failed to pseudo-pause the game, since it was already pseudo-paused.")
55
103
  return
56
104
  end
57
105
  v.run.isPseudoPaused = true
58
- local whitelist = __TS__New(Set, {ButtonAction.MENU_CONFIRM})
106
+ v.run.initialDescriptions:clear()
107
+ local ____array_1 = __TS__SparseArrayNew(table.unpack(getTears(nil)))
108
+ __TS__SparseArrayPush(
109
+ ____array_1,
110
+ table.unpack(getProjectiles(nil))
111
+ )
112
+ local tearsAndProjectiles = {__TS__SparseArraySpread(____array_1)}
113
+ for ____, tearOrProjectile in ipairs(tearsAndProjectiles) do
114
+ local ptrHash = GetPtrHash(tearOrProjectile)
115
+ local initialDescription = {
116
+ position = tearOrProjectile.Position,
117
+ positionOffset = tearOrProjectile.PositionOffset,
118
+ velocity = tearOrProjectile.Velocity,
119
+ height = tearOrProjectile.Height,
120
+ fallingSpeed = tearOrProjectile.FallingSpeed,
121
+ fallingAcceleration = isTear(nil, tearOrProjectile) and tearOrProjectile.FallingAcceleration or tearOrProjectile.FallingAccel
122
+ }
123
+ v.run.initialDescriptions:set(ptrHash, initialDescription)
124
+ end
125
+ local firstPlayer = Isaac.GetPlayer()
126
+ useActiveItemTemp(nil, firstPlayer, CollectibleType.PAUSE)
127
+ local whitelist = __TS__New(Set, {ButtonAction.MENU_CONFIRM, ButtonAction.CONSOLE})
59
128
  disableAllInputsExceptFor(nil, FEATURE_NAME, whitelist)
129
+ for ____, player in ipairs(getAllPlayers(nil)) do
130
+ player.ControlsEnabled = false
131
+ player.Velocity = VectorZero
132
+ end
133
+ stopTearsAndProjectilesFromMoving(nil)
60
134
  end
61
135
  --- Helper function to put things back to normal after the `pause` function was used.
62
136
  function ____exports.unpause(self)
@@ -65,7 +139,12 @@ function ____exports.unpause(self)
65
139
  return
66
140
  end
67
141
  v.run.isPseudoPaused = false
68
- enableAllInputs(nil, FEATURE_NAME)
69
142
  v.run.shouldUnpause = true
143
+ enableAllInputs(nil, FEATURE_NAME)
144
+ for ____, player in ipairs(getAllPlayers(nil)) do
145
+ player.ControlsEnabled = true
146
+ end
147
+ removeAllTears(nil)
148
+ removeAllProjectiles(nil)
70
149
  end
71
150
  return ____exports
@@ -1 +1 @@
1
- {"version":3,"file":"persistentEntities.d.ts","sourceRoot":"","sources":["../../src/features/persistentEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEX,MAAM,8BAA8B,CAAC;AAiGtC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,QAAQ,EAAE,MAAM,GACf,CAAC,MAAM,EAAE,GAAG,CAAC,CAcf;AAwBD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,qBAAqB,EAAE,GAAG,EAC1B,YAAY,UAAO,GAClB,IAAI,CAiBN"}
1
+ {"version":3,"file":"persistentEntities.d.ts","sourceRoot":"","sources":["../../src/features/persistentEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAEX,MAAM,8BAA8B,CAAC;AAkGtC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qBAAqB,CACnC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,QAAQ,EAAE,MAAM,GACf,CAAC,MAAM,EAAE,GAAG,CAAC,CAcf;AAwBD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,qBAAqB,EAAE,GAAG,EAC1B,YAAY,UAAO,GAClB,IAAI,CAiBN"}
@@ -7,8 +7,6 @@ local postEntityRemove, postNewRoomReordered, spawnAndTrack, v
7
7
  local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
8
8
  local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
9
9
  local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
10
- local ____cachedClasses = require("cachedClasses")
11
- local game = ____cachedClasses.game
12
10
  local ____ModCallbackCustom = require("enums.ModCallbackCustom")
13
11
  local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
14
12
  local ____featuresInitialized = require("featuresInitialized")
@@ -17,6 +15,8 @@ local ____entities = require("functions.entities")
17
15
  local spawn = ____entities.spawn
18
16
  local ____roomData = require("functions.roomData")
19
17
  local getRoomListIndex = ____roomData.getRoomListIndex
18
+ local ____roomHistory = require("features.roomHistory")
19
+ local getLatestRoomDescription = ____roomHistory.getLatestRoomDescription
20
20
  local ____exports = require("features.saveDataManager.exports")
21
21
  local saveDataManager = ____exports.saveDataManager
22
22
  function postEntityRemove(self, entity)
@@ -26,16 +26,16 @@ function postEntityRemove(self, entity)
26
26
  return
27
27
  end
28
28
  local index = tuple[1]
29
- local level = game:GetLevel()
30
- local previousRoomGridIndex = level:GetPreviousRoomIndex()
31
- local previousRoomListIndex = getRoomListIndex(nil, previousRoomGridIndex)
32
- v.level.persistentEntities:set(index, {
29
+ local previousRoomDescription = getLatestRoomDescription(nil)
30
+ local previousRoomListIndex = previousRoomDescription.roomListIndex
31
+ local persistentEntityDescription = {
33
32
  entityType = entity.Type,
34
33
  variant = entity.Variant,
35
34
  subType = entity.SubType,
36
35
  roomListIndex = previousRoomListIndex,
37
36
  position = entity.Position
38
- })
37
+ }
38
+ v.level.persistentEntities:set(index, persistentEntityDescription)
39
39
  end
40
40
  function postNewRoomReordered(self)
41
41
  local roomListIndex = getRoomListIndex(nil)
@@ -0,0 +1,19 @@
1
+ /// <reference types="isaac-typescript-definitions" />
2
+ import { ModUpgraded } from "../classes/ModUpgraded";
3
+ import { PickupIndex } from "../types/PickupIndex";
4
+ export declare function pickupIndexInit(mod: ModUpgraded): void;
5
+ /**
6
+ * Mods often have to track variables relating to a pickups. Finding an index for these kinds of
7
+ * data structures is difficult, since pickups are respawned every time a player re-enters a room,
8
+ * so the `PtrHash` will change.
9
+ *
10
+ * Use this function to get a unique index for a pickup to use in these data structures.
11
+ *
12
+ * Specifically, `PickupIndex` is a number that represents the spawn order of the pickup on the
13
+ * current run. For example, the first pickup spawned will have an index of 1, the second one will
14
+ * have an index of 2, and so on.
15
+ *
16
+ * Tracking pickups requires stateful tracking, so using pickup indexes requires an upgraded mod.
17
+ */
18
+ export declare function getPickupIndex(pickup: EntityPickup): PickupIndex;
19
+ //# sourceMappingURL=pickupIndex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pickupIndex.d.ts","sourceRoot":"","sources":["../../src/features/pickupIndex.ts"],"names":[],"mappings":";AAOA,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAQrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAgCnD,wBAAgB,eAAe,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAatD;AA0KD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,YAAY,GAAG,WAAW,CAahE"}
@@ -0,0 +1,197 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local Map = ____lualib.Map
3
+ local __TS__New = ____lualib.__TS__New
4
+ local __TS__Iterator = ____lualib.__TS__Iterator
5
+ local ____exports = {}
6
+ local postPickupInit, postEntityRemovePickup, checkDespawningFromPlayerLeavingRoom, trackDespawningPickupMetadata, postNewRoomReordered, getStoredPickupIndex, getPostAscentPickupIndex, v
7
+ local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
8
+ local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
9
+ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
10
+ local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
11
+ local ____cachedClasses = require("cachedClasses")
12
+ local game = ____cachedClasses.game
13
+ local ____DefaultMap = require("classes.DefaultMap")
14
+ local DefaultMap = ____DefaultMap.DefaultMap
15
+ local ____ModCallbackCustom = require("enums.ModCallbackCustom")
16
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
17
+ local ____featuresInitialized = require("featuresInitialized")
18
+ local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
19
+ local ____entities = require("functions.entities")
20
+ local getEntityID = ____entities.getEntityID
21
+ local ____entitiesSpecific = require("functions.entitiesSpecific")
22
+ local getPickups = ____entitiesSpecific.getPickups
23
+ local ____roomData = require("functions.roomData")
24
+ local getRoomListIndex = ____roomData.getRoomListIndex
25
+ local ____stage = require("functions.stage")
26
+ local onAscent = ____stage.onAscent
27
+ local ____vector = require("functions.vector")
28
+ local vectorEquals = ____vector.vectorEquals
29
+ local ____roomHistory = require("features.roomHistory")
30
+ local getLatestRoomDescription = ____roomHistory.getLatestRoomDescription
31
+ local ____exports = require("features.saveDataManager.exports")
32
+ local saveDataManager = ____exports.saveDataManager
33
+ function postPickupInit(self, pickup)
34
+ local ptrHash = GetPtrHash(pickup)
35
+ if v.room.pickupIndexes:has(ptrHash) then
36
+ return
37
+ end
38
+ local room = game:GetRoom()
39
+ local isFirstVisit = room:IsFirstVisit()
40
+ local roomFrameCount = room:GetFrameCount()
41
+ if not isFirstVisit and roomFrameCount <= 0 then
42
+ return
43
+ end
44
+ local ____v_run_0, ____pickupCounter_1 = v.run, "pickupCounter"
45
+ ____v_run_0[____pickupCounter_1] = ____v_run_0[____pickupCounter_1] + 1
46
+ v.room.pickupIndexes:set(ptrHash, v.run.pickupCounter)
47
+ v.run.currentRoomListIndex = getRoomListIndex(nil)
48
+ end
49
+ function postEntityRemovePickup(self, entity)
50
+ checkDespawningFromPlayerLeavingRoom(nil, entity)
51
+ end
52
+ function checkDespawningFromPlayerLeavingRoom(self, entity)
53
+ local ptrHash = GetPtrHash(entity)
54
+ local pickupIndex = v.room.pickupIndexes:get(ptrHash)
55
+ if pickupIndex == nil then
56
+ return
57
+ end
58
+ local roomListIndex = getRoomListIndex(nil)
59
+ if roomListIndex == v.run.currentRoomListIndex then
60
+ return
61
+ end
62
+ trackDespawningPickupMetadata(nil, entity, pickupIndex)
63
+ end
64
+ function trackDespawningPickupMetadata(self, entity, pickupIndex)
65
+ local previousRoomDescription = getLatestRoomDescription(nil)
66
+ local previousRoomListIndex = previousRoomDescription.roomListIndex
67
+ local pickupDescriptions = v.level.pickupData:getAndSetDefault(previousRoomListIndex)
68
+ local pickupDescription = {position = entity.Position, initSeed = entity.InitSeed}
69
+ pickupDescriptions:set(pickupIndex, pickupDescription)
70
+ if onAscent(nil) then
71
+ return
72
+ end
73
+ local room = game:GetRoom()
74
+ local roomType = room:GetType()
75
+ repeat
76
+ local ____switch13 = roomType
77
+ local ____cond13 = ____switch13 == RoomType.TREASURE
78
+ if ____cond13 then
79
+ do
80
+ v.run.pickupDataTreasureRooms:set(pickupIndex, pickupDescription)
81
+ break
82
+ end
83
+ end
84
+ ____cond13 = ____cond13 or ____switch13 == RoomType.BOSS
85
+ if ____cond13 then
86
+ do
87
+ v.run.pickupDataBossRooms:set(pickupIndex, pickupDescription)
88
+ break
89
+ end
90
+ end
91
+ do
92
+ do
93
+ break
94
+ end
95
+ end
96
+ until true
97
+ end
98
+ function postNewRoomReordered(self)
99
+ local room = game:GetRoom()
100
+ local isFirstVisit = room:IsFirstVisit()
101
+ if isFirstVisit then
102
+ return
103
+ end
104
+ local roomListIndex = getRoomListIndex(nil)
105
+ local pickupDescriptions = v.level.pickupData:getAndSetDefault(roomListIndex)
106
+ for ____, pickup in ipairs(getPickups(nil)) do
107
+ local pickupIndex = getStoredPickupIndex(nil, pickup, pickupDescriptions)
108
+ if pickupIndex == nil then
109
+ pickupIndex = getPostAscentPickupIndex(nil, pickup)
110
+ end
111
+ if pickupIndex == nil then
112
+ local entityID = getEntityID(nil, pickup)
113
+ error("Failed to find a pickup index corresponding to existing pickup: " .. entityID)
114
+ end
115
+ local ptrHash = GetPtrHash(pickup)
116
+ v.room.pickupIndexes:set(ptrHash, pickupIndex)
117
+ end
118
+ end
119
+ function getStoredPickupIndex(self, pickup, pickupDescriptions)
120
+ for ____, ____value in __TS__Iterator(pickupDescriptions:entries()) do
121
+ local pickupIndex = ____value[1]
122
+ local pickupDescription = ____value[2]
123
+ if vectorEquals(nil, pickupDescription.position, pickup.Position) and pickupDescription.initSeed == pickup.InitSeed then
124
+ return pickupIndex
125
+ end
126
+ end
127
+ return nil
128
+ end
129
+ function getPostAscentPickupIndex(self, pickup)
130
+ if not onAscent(nil) then
131
+ return nil
132
+ end
133
+ local room = game:GetRoom()
134
+ local roomType = room:GetType()
135
+ repeat
136
+ local ____switch29 = roomType
137
+ local ____cond29 = ____switch29 == RoomType.TREASURE
138
+ if ____cond29 then
139
+ do
140
+ return getStoredPickupIndex(nil, pickup, v.run.pickupDataTreasureRooms)
141
+ end
142
+ end
143
+ ____cond29 = ____cond29 or ____switch29 == RoomType.BOSS
144
+ if ____cond29 then
145
+ do
146
+ return getStoredPickupIndex(nil, pickup, v.run.pickupDataBossRooms)
147
+ end
148
+ end
149
+ do
150
+ do
151
+ return nil
152
+ end
153
+ end
154
+ until true
155
+ end
156
+ local FEATURE_NAME = "pickupIndex"
157
+ v = {
158
+ run = {
159
+ pickupCounter = 0,
160
+ currentRoomListIndex = 0,
161
+ pickupDataTreasureRooms = __TS__New(Map),
162
+ pickupDataBossRooms = __TS__New(Map)
163
+ },
164
+ level = {pickupData = __TS__New(
165
+ DefaultMap,
166
+ function() return __TS__New(Map) end
167
+ )},
168
+ room = {pickupIndexes = __TS__New(Map)}
169
+ }
170
+ function ____exports.pickupIndexInit(self, mod)
171
+ saveDataManager(nil, FEATURE_NAME, v)
172
+ mod:AddCallback(ModCallback.POST_PICKUP_INIT, postPickupInit)
173
+ mod:AddCallback(ModCallback.POST_ENTITY_REMOVE, postEntityRemovePickup, EntityType.PICKUP)
174
+ mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_ROOM_REORDERED, postNewRoomReordered)
175
+ end
176
+ --- Mods often have to track variables relating to a pickups. Finding an index for these kinds of
177
+ -- data structures is difficult, since pickups are respawned every time a player re-enters a room,
178
+ -- so the `PtrHash` will change.
179
+ --
180
+ -- Use this function to get a unique index for a pickup to use in these data structures.
181
+ --
182
+ -- Specifically, `PickupIndex` is a number that represents the spawn order of the pickup on the
183
+ -- current run. For example, the first pickup spawned will have an index of 1, the second one will
184
+ -- have an index of 2, and so on.
185
+ --
186
+ -- Tracking pickups requires stateful tracking, so using pickup indexes requires an upgraded mod.
187
+ function ____exports.getPickupIndex(self, pickup)
188
+ errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
189
+ local ptrHash = GetPtrHash(pickup)
190
+ local pickupIndex = v.room.pickupIndexes:get(ptrHash)
191
+ if pickupIndex == nil then
192
+ local entityID = getEntityID(nil, pickup)
193
+ error((("Failed to get a pickup index for entity " .. entityID) .. " with hash: ") .. tostring(ptrHash))
194
+ end
195
+ return pickupIndex
196
+ end
197
+ return ____exports
@@ -0,0 +1,24 @@
1
+ import { RoomDescription } from "../interfaces/RoomDescription";
2
+ /**
3
+ * Helper function to get information about all of the rooms that a player has visited thus far on
4
+ * this run.
5
+ */
6
+ export declare function getRoomHistory(): readonly RoomDescription[];
7
+ /**
8
+ * Helper function to get information about the room that was previously visited.
9
+ *
10
+ * In the special case of only one room having been visited thus far (i.e. the starting room of the
11
+ * run), the starting room will be returned.
12
+ */
13
+ export declare function getPreviousRoomDescription(): RoomDescription;
14
+ /**
15
+ * Helper function to get information about the most recent room that is stored in the room history
16
+ * array.
17
+ *
18
+ * This is useful in the `POST_ENTITY_REMOVE` callback, since if an entity is despawning due to a
19
+ * player having left the room, the current room will have changed already, but the `POST_NEW_ROOM`
20
+ * callback will not have fired yet, and there will not be an entry in the room history array for
21
+ * the current room.
22
+ */
23
+ export declare function getLatestRoomDescription(): RoomDescription;
24
+ //# sourceMappingURL=roomHistory.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"roomHistory.d.ts","sourceRoot":"","sources":["../../src/features/roomHistory.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAiDhE;;;GAGG;AACH,wBAAgB,cAAc,IAAI,SAAS,eAAe,EAAE,CAG3D;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,eAAe,CAe5D;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,IAAI,eAAe,CAS1D"}
@@ -0,0 +1,89 @@
1
+ local ____exports = {}
2
+ local postNewRoomEarly, v
3
+ local ____cachedClasses = require("cachedClasses")
4
+ local game = ____cachedClasses.game
5
+ local ____ModCallbackCustom = require("enums.ModCallbackCustom")
6
+ local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
7
+ local ____featuresInitialized = require("featuresInitialized")
8
+ local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
9
+ local ____array = require("functions.array")
10
+ local getLastElement = ____array.getLastElement
11
+ local ____roomData = require("functions.roomData")
12
+ local getRoomGridIndex = ____roomData.getRoomGridIndex
13
+ local getRoomListIndex = ____roomData.getRoomListIndex
14
+ local getRoomName = ____roomData.getRoomName
15
+ local getRoomStageID = ____roomData.getRoomStageID
16
+ local getRoomSubType = ____roomData.getRoomSubType
17
+ local getRoomVariant = ____roomData.getRoomVariant
18
+ local ____exports = require("features.saveDataManager.exports")
19
+ local saveDataManager = ____exports.saveDataManager
20
+ function postNewRoomEarly(self)
21
+ local level = game:GetLevel()
22
+ local stage = level:GetStage()
23
+ local stageType = level:GetStageType()
24
+ local room = game:GetRoom()
25
+ local roomType = room:GetType()
26
+ local stageID = getRoomStageID(nil)
27
+ local roomVariant = getRoomVariant(nil)
28
+ local roomSubType = getRoomSubType(nil)
29
+ local roomName = getRoomName(nil)
30
+ local roomGridIndex = getRoomGridIndex(nil)
31
+ local roomListIndex = getRoomListIndex(nil)
32
+ local roomDescription = {
33
+ stage = stage,
34
+ stageType = stageType,
35
+ stageID = stageID,
36
+ roomType = roomType,
37
+ roomVariant = roomVariant,
38
+ roomSubType = roomSubType,
39
+ roomName = roomName,
40
+ roomGridIndex = roomGridIndex,
41
+ roomListIndex = roomListIndex
42
+ }
43
+ local ____v_run_roomHistory_0 = v.run.roomHistory
44
+ ____v_run_roomHistory_0[#____v_run_roomHistory_0 + 1] = roomDescription
45
+ end
46
+ local FEATURE_NAME = "roomHistory"
47
+ v = {run = {roomHistory = {}}}
48
+ ---
49
+ -- @internal
50
+ function ____exports.roomHistoryInit(self, mod)
51
+ saveDataManager(nil, FEATURE_NAME, v)
52
+ mod:AddCallbackCustom(ModCallbackCustom.POST_NEW_ROOM_EARLY, postNewRoomEarly)
53
+ end
54
+ --- Helper function to get information about all of the rooms that a player has visited thus far on
55
+ -- this run.
56
+ function ____exports.getRoomHistory(self)
57
+ errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
58
+ return v.run.roomHistory
59
+ end
60
+ --- Helper function to get information about the room that was previously visited.
61
+ --
62
+ -- In the special case of only one room having been visited thus far (i.e. the starting room of the
63
+ -- run), the starting room will be returned.
64
+ function ____exports.getPreviousRoomDescription(self)
65
+ local previousRoomDescription = v.run.roomHistory[#v.run.roomHistory - 2 + 1]
66
+ if previousRoomDescription ~= nil then
67
+ return previousRoomDescription
68
+ end
69
+ local startingRoomDescription = v.run.roomHistory[1]
70
+ if startingRoomDescription ~= nil then
71
+ return startingRoomDescription
72
+ end
73
+ error("Failed to find a room description for any rooms thus far on this run.")
74
+ end
75
+ --- Helper function to get information about the most recent room that is stored in the room history
76
+ -- array.
77
+ --
78
+ -- This is useful in the `POST_ENTITY_REMOVE` callback, since if an entity is despawning due to a
79
+ -- player having left the room, the current room will have changed already, but the `POST_NEW_ROOM`
80
+ -- callback will not have fired yet, and there will not be an entry in the room history array for
81
+ -- the current room.
82
+ function ____exports.getLatestRoomDescription(self)
83
+ local latestRoomDescription = getLastElement(nil, v.run.roomHistory)
84
+ if latestRoomDescription == nil then
85
+ error("Failed to get the latest room description since the room history array was empty.")
86
+ end
87
+ return latestRoomDescription
88
+ end
89
+ return ____exports
@@ -24,38 +24,51 @@ export declare function getCollectibleDevilHeartPrice(collectibleType: Collectib
24
24
  */
25
25
  export declare function getCollectibleGfxFilename(collectibleType: CollectibleType): string;
26
26
  /**
27
- * Mods often have to track variables relating to a collectible. Finding an index for these kinds of
28
- * data structures is difficult, since collectibles are respawned every time a player re-enters a
29
- * room, so the `PtrHash` will change. Instead, we use a 4-tuple of the room list index, the grid
30
- * index of the collectible in the room, the collectible's SubType, and the collectible's InitSeed.
27
+ * Mods may have to keep track of data relating to a collectible. Finding an index for these kinds
28
+ * of data structures is difficult, since collectibles are respawned every time a player re-enters a
29
+ * room (like all other pickups), so the `PtrHash` will change.
30
+ *
31
+ * Use this function to get a unique index for a collectible to use in these data structures.
32
+ *
33
+ * If your mod is upgraded, then you should use the `getPickupIndex` function instead, as it is more
34
+ * general purpose and less prone to error (but relies on stateful tracking of pickups as the run
35
+ * progresses).
36
+ *
37
+ * Collectibles are a special case of pickups: they cannot be pushed around. (They actually can be
38
+ * pushed, but usually will stay on the same grid index.) Thus, it is possible to generate a
39
+ * somewhat reliable non-stateful index for collectibles. We use a 4-tuple of the room list index,
40
+ * the grid index of the collectible in the room, the collectible's `SubType`, and the collectible's
41
+ * `InitSeed`.
31
42
  *
32
43
  * Collectibles that are shifted by Tainted Isaac's mechanic will have unique collectible indexes
33
- * because the SubType is different. (The collectible entities share the same InitSeed.)
44
+ * because the `SubType` is different. (The collectible entities share the same `InitSeed` and
45
+ * `PtrHash`.)
34
46
  *
35
47
  * Collectibles that are rolled (with e.g. a D6) will have unique collectible indexes because the
36
- * SubType and InitSeed are different. If you want to track collectibles independently of any
48
+ * `SubType` and `InitSeed` are different. If you want to track collectibles independently of any
37
49
  * rerolls, then you can use the `PtrHash` as an index instead. (The `PtrHash` will not persist
38
50
  * between rooms, however.)
39
51
  *
40
52
  * Note that:
41
53
  * - The grid index is a necessary part of the collectible index because Diplopia and Crooked Penny
42
- * can cause two or more collectibles with the same SubType and InitSeed to exist in the same
54
+ * can cause two or more collectibles with the same `SubType` and `InitSeed` to exist in the same
43
55
  * room.
44
56
  * - This index will fail in the case where the player uses Diplopia or a successful Crooked Penny
45
57
  * seven or more times in the same room, since that will cause two or more collectibles with the
46
- * same grid index, SubType, and InitSeed to exist.
47
- * - The SubType is a necessary part of the collectible index because Tainted Isaac will
48
- * continuously cause collectibles to morph into new sub-types with the same InitSeed.
58
+ * same grid index, `SubType`, and `InitSeed` to exist. (More than seven is required in non-1x1
59
+ * rooms.)
60
+ * - The `SubType` is a necessary part of the collectible index because Tainted Isaac will
61
+ * continuously cause collectibles to morph into new sub-types with the same `InitSeed`.
49
62
  * - Using a collectible's position as part of the index is problematic, since players can push a
50
63
  * pedestal. (Even using the grid index does not solve this problem, since it is possible in
51
64
  * certain cases for collectibles to be spawned at a position that is not aligned with the grid,
52
65
  * and the pedestal pushed to an adjacent tile, but this case should be extremely rare.)
53
66
  * - Mega Chests spawn two collectibles on the exact same position. However, both of them will have
54
- * different InitSeeds, so this is not a problem for this indexing scheme.
67
+ * a different `InitSeed`, so this is not a problem for this indexing scheme.
55
68
  * - The indexing scheme used is different for collectibles that are inside of a Treasure Room or
56
69
  * Boss Room, in order to handle the case of the player seeing the same collectible again in a
57
- * post-Ascent Treasure Room or Boss Room. A 5-tuple of stage, stage type, grid index, SubType,
58
- * and InitSeed is used in this case. (Using the room list index or the room grid index is not
70
+ * post-Ascent Treasure Room or Boss Room. A 5-tuple of stage, stage type, grid index, `SubType`,
71
+ * and `InitSeed` is used in this case. (Using the room list index or the room grid index is not
59
72
  * suitable for this purpose, since both of these values can change in the post-Ascent rooms.)
60
73
  * Even though Treasure Rooms and Boss Rooms are grouped together in this scheme, there probably
61
74
  * will not be collectibles with the same grid index, SubType, and InitSeed.
@@ -1 +1 @@
1
- {"version":3,"file":"collectibles.d.ts","sourceRoot":"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AAI,CAuBtE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,YAAY,EACzB,OAAO,EAAE,MAAM,GAAG,SAAS,GAC1B,IAAI,CAeN;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,YAAY,EACzB,kBAAkB,EAAE,eAAe,GAClC,IAAI,CA2BN;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D"}
1
+ {"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,eAAe,EAEf,aAAa,EAEb,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AAkBtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAyB7D,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAEtE;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,eAAe,GAC/B,MAAM,CAeR;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,eAAe,EAAE,eAAe,GAC/B,GAAG,CAYL;AAED;;;GAGG;AACH,wBAAgB,6BAA6B,CAC3C,eAAe,EAAE,eAAe,EAChC,MAAM,EAAE,YAAY,GACnB,WAAW,CAyBb;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,eAAe,GAC/B,MAAM,CAOR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,YAAY,GACxB,gBAAgB,CAsBlB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,eAAe,EAAE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