isaacscript-common 1.2.163 → 1.2.164

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.
@@ -17,7 +17,8 @@ function postPickupUpdateCollectible(self, pickup)
17
17
  if pickup.SubType == CollectibleType.COLLECTIBLE_NULL then
18
18
  return
19
19
  end
20
- local trackedCollectibleType = v.room.trackedItems:get(pickup.InitSeed)
20
+ local ptrHash = GetPtrHash(pickup)
21
+ local trackedCollectibleType = v.room.trackedItems:get(ptrHash)
21
22
  if trackedCollectibleType ~= nil and pickup.SubType ~= trackedCollectibleType then
22
23
  setCollectibleSubType(nil, pickup, trackedCollectibleType)
23
24
  end
@@ -34,7 +35,8 @@ function ____exports.preventCollectibleRotate(self, collectible, collectibleType
34
35
  if collectible.Variant ~= PickupVariant.PICKUP_COLLECTIBLE then
35
36
  error("You cannot prevent the rotation for pickups of variant: " .. tostring(collectible.Variant))
36
37
  end
37
- v.room.trackedItems:set(collectible.InitSeed, collectibleType)
38
+ local ptrHash = GetPtrHash(collectible)
39
+ v.room.trackedItems:set(ptrHash, collectibleType)
38
40
  postPickupUpdateCollectible(nil, collectible)
39
41
  end
40
42
  return ____exports
@@ -188,10 +188,7 @@ function ____exports.isAllPressurePlatesPushed(self)
188
188
  local pressurePlates = ____exports.getGridEntities(nil, GridEntityType.GRID_PRESSURE_PLATE)
189
189
  return __TS__ArrayEvery(
190
190
  pressurePlates,
191
- function(____, pressurePlate)
192
- local gridEntityDesc = pressurePlate:GetSaveState()
193
- return gridEntityDesc.State == 3
194
- end
191
+ function(____, pressurePlate) return pressurePlate.State == 3 end
195
192
  )
196
193
  end
197
194
  function ____exports.isGridEntityBreakableByExplosion(self, gridEntity)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "1.2.163",
3
+ "version": "1.2.164",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",