isaacscript-common 7.17.4 → 8.0.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.
- package/dist/callbacks/customRevive.d.ts +3 -0
- package/dist/callbacks/customRevive.d.ts.map +1 -0
- package/dist/callbacks/itemPickup.d.ts +3 -0
- package/dist/callbacks/itemPickup.d.ts.map +1 -0
- package/dist/callbacks/postAmbush.d.ts +3 -0
- package/dist/callbacks/postAmbush.d.ts.map +1 -0
- package/dist/callbacks/postBombExploded.d.ts +3 -0
- package/dist/callbacks/postBombExploded.d.ts.map +1 -0
- package/dist/callbacks/postBombInitLate.d.ts +3 -0
- package/dist/callbacks/postBombInitLate.d.ts.map +1 -0
- package/dist/callbacks/postBoneSwing.d.ts +3 -0
- package/dist/callbacks/postBoneSwing.d.ts.map +1 -0
- package/dist/callbacks/postCollectibleEmpty.d.ts +3 -0
- package/dist/callbacks/postCollectibleEmpty.d.ts.map +1 -0
- package/dist/callbacks/postCollectibleInitFirst.d.ts +3 -0
- package/dist/callbacks/postCollectibleInitFirst.d.ts.map +1 -0
- package/dist/callbacks/postCursedTeleport.d.ts +3 -0
- package/dist/callbacks/postCursedTeleport.d.ts.map +1 -0
- package/dist/callbacks/postCustomDoorEnter.d.ts +6 -0
- package/dist/callbacks/postCustomDoorEnter.d.ts.map +1 -0
- package/dist/callbacks/postDiceRoomActivated.d.ts +3 -0
- package/dist/callbacks/postDiceRoomActivated.d.ts.map +1 -0
- package/dist/callbacks/postDoorRender.d.ts +3 -0
- package/dist/callbacks/postDoorRender.d.ts.map +1 -0
- package/dist/callbacks/postDoorUpdate.d.ts +3 -0
- package/dist/callbacks/postDoorUpdate.d.ts.map +1 -0
- package/dist/callbacks/postEffectInitLate.d.ts +3 -0
- package/dist/callbacks/postEffectInitLate.d.ts.map +1 -0
- package/dist/callbacks/postEffectStateChanged.d.ts +3 -0
- package/dist/callbacks/postEffectStateChanged.d.ts.map +1 -0
- package/dist/callbacks/postEsauJr.d.ts +3 -0
- package/dist/callbacks/postEsauJr.d.ts.map +1 -0
- package/dist/callbacks/postFamiliarInitLate.d.ts +3 -0
- package/dist/callbacks/postFamiliarInitLate.d.ts.map +1 -0
- package/dist/callbacks/postFamiliarStateChanged.d.ts +3 -0
- package/dist/callbacks/postFamiliarStateChanged.d.ts.map +1 -0
- package/dist/callbacks/postFlip.d.ts +3 -0
- package/dist/callbacks/postFlip.d.ts.map +1 -0
- package/dist/callbacks/postGreedModeWave.d.ts +3 -0
- package/dist/callbacks/postGreedModeWave.d.ts.map +1 -0
- package/dist/callbacks/postGridEntity.d.ts +3 -0
- package/dist/callbacks/postGridEntity.d.ts.map +1 -0
- package/dist/callbacks/postGridEntityCollision.d.ts +3 -0
- package/dist/callbacks/postGridEntityCollision.d.ts.map +1 -0
- package/dist/callbacks/postGridEntityCustomCollision.d.ts +3 -0
- package/dist/callbacks/postGridEntityCustomCollision.d.ts.map +1 -0
- package/dist/callbacks/postGridEntityCustomRender.d.ts +3 -0
- package/dist/callbacks/postGridEntityCustomRender.d.ts.map +1 -0
- package/dist/callbacks/postGridEntityCustomUpdate.d.ts +3 -0
- package/dist/callbacks/postGridEntityCustomUpdate.d.ts.map +1 -0
- package/dist/callbacks/postGridEntityRender.d.ts +3 -0
- package/dist/callbacks/postGridEntityRender.d.ts.map +1 -0
- package/dist/callbacks/postHolyMantleRemoved.d.ts +3 -0
- package/dist/callbacks/postHolyMantleRemoved.d.ts.map +1 -0
- package/dist/callbacks/postItemDischarged.d.ts +3 -0
- package/dist/callbacks/postItemDischarged.d.ts.map +1 -0
- package/dist/callbacks/postKnifeInitLate.d.ts +3 -0
- package/dist/callbacks/postKnifeInitLate.d.ts.map +1 -0
- package/dist/callbacks/postLaserInitLate.d.ts +3 -0
- package/dist/callbacks/postLaserInitLate.d.ts.map +1 -0
- package/dist/callbacks/postNPCInitLate.d.ts +3 -0
- package/dist/callbacks/postNPCInitLate.d.ts.map +1 -0
- package/dist/callbacks/postNPCStateChanged.d.ts +3 -0
- package/dist/callbacks/postNPCStateChanged.d.ts.map +1 -0
- package/dist/callbacks/postNewRoomEarly.d.ts +3 -0
- package/dist/callbacks/postNewRoomEarly.d.ts.map +1 -0
- package/dist/callbacks/postPickupCollect.d.ts +3 -0
- package/dist/callbacks/postPickupCollect.d.ts.map +1 -0
- package/dist/callbacks/postPickupInitFirst.d.ts +3 -0
- package/dist/callbacks/postPickupInitFirst.d.ts.map +1 -0
- package/dist/callbacks/postPickupInitLate.d.ts +3 -0
- package/dist/callbacks/postPickupInitLate.d.ts.map +1 -0
- package/dist/callbacks/postPickupStateChanged.d.ts +3 -0
- package/dist/callbacks/postPickupStateChanged.d.ts.map +1 -0
- package/dist/callbacks/postPitRender.d.ts +3 -0
- package/dist/callbacks/postPitRender.d.ts.map +1 -0
- package/dist/callbacks/postPitUpdate.d.ts +3 -0
- package/dist/callbacks/postPitUpdate.d.ts.map +1 -0
- package/dist/callbacks/postPlayerChangeHealth.d.ts +3 -0
- package/dist/callbacks/postPlayerChangeHealth.d.ts.map +1 -0
- package/dist/callbacks/postPlayerChangeStat.d.ts +3 -0
- package/dist/callbacks/postPlayerChangeStat.d.ts.map +1 -0
- package/dist/callbacks/postPlayerChangeType.d.ts +3 -0
- package/dist/callbacks/postPlayerChangeType.d.ts.map +1 -0
- package/dist/callbacks/postPlayerCollectible.d.ts +3 -0
- package/dist/callbacks/postPlayerCollectible.d.ts.map +1 -0
- package/dist/callbacks/postPlayerFatalDamage.d.ts +3 -0
- package/dist/callbacks/postPlayerFatalDamage.d.ts.map +1 -0
- package/dist/callbacks/postPlayerInitFirst.d.ts +3 -0
- package/dist/callbacks/postPlayerInitFirst.d.ts.map +1 -0
- package/dist/callbacks/postPlayerInitLate.d.ts +3 -0
- package/dist/callbacks/postPlayerInitLate.d.ts.map +1 -0
- package/dist/callbacks/postPlayerReorderedCallbacks.d.ts +3 -0
- package/dist/callbacks/postPlayerReorderedCallbacks.d.ts.map +1 -0
- package/dist/callbacks/postPoopRender.d.ts +3 -0
- package/dist/callbacks/postPoopRender.d.ts.map +1 -0
- package/dist/callbacks/postPoopUpdate.d.ts +3 -0
- package/dist/callbacks/postPoopUpdate.d.ts.map +1 -0
- package/dist/callbacks/postPressurePlateRender.d.ts +3 -0
- package/dist/callbacks/postPressurePlateRender.d.ts.map +1 -0
- package/dist/callbacks/postPressurePlateUpdate.d.ts +3 -0
- package/dist/callbacks/postPressurePlateUpdate.d.ts.map +1 -0
- package/dist/callbacks/postProjectileInitLate.d.ts +3 -0
- package/dist/callbacks/postProjectileInitLate.d.ts.map +1 -0
- package/dist/callbacks/postPurchase.d.ts +3 -0
- package/dist/callbacks/postPurchase.d.ts.map +1 -0
- package/dist/callbacks/postRockRender.d.ts +3 -0
- package/dist/callbacks/postRockRender.d.ts.map +1 -0
- package/dist/callbacks/postRockUpdate.d.ts +3 -0
- package/dist/callbacks/postRockUpdate.d.ts.map +1 -0
- package/dist/callbacks/postRoomClearChanged.d.ts +3 -0
- package/dist/callbacks/postRoomClearChanged.d.ts.map +1 -0
- package/dist/callbacks/postSacrifice.d.ts +3 -0
- package/dist/callbacks/postSacrifice.d.ts.map +1 -0
- package/dist/callbacks/postSlotCollision.d.ts +3 -0
- package/dist/callbacks/postSlotCollision.d.ts.map +1 -0
- package/dist/callbacks/postSlotDestroyed.d.ts +3 -0
- package/dist/callbacks/postSlotDestroyed.d.ts.map +1 -0
- package/dist/callbacks/postSlotInitUpdate.d.ts +3 -0
- package/dist/callbacks/postSlotInitUpdate.d.ts.map +1 -0
- package/dist/callbacks/postSlotRender.d.ts +3 -0
- package/dist/callbacks/postSlotRender.d.ts.map +1 -0
- package/dist/callbacks/postSpikesRender.d.ts +3 -0
- package/dist/callbacks/postSpikesRender.d.ts.map +1 -0
- package/dist/callbacks/postSpikesUpdate.d.ts +3 -0
- package/dist/callbacks/postSpikesUpdate.d.ts.map +1 -0
- package/dist/callbacks/postTNTRender.d.ts +3 -0
- package/dist/callbacks/postTNTRender.d.ts.map +1 -0
- package/dist/callbacks/postTNTUpdate.d.ts +3 -0
- package/dist/callbacks/postTNTUpdate.d.ts.map +1 -0
- package/dist/callbacks/postTearInitLate.d.ts +3 -0
- package/dist/callbacks/postTearInitLate.d.ts.map +1 -0
- package/dist/callbacks/postTearInitVeryLate.d.ts +3 -0
- package/dist/callbacks/postTearInitVeryLate.d.ts.map +1 -0
- package/dist/callbacks/postTransformation.d.ts +3 -0
- package/dist/callbacks/postTransformation.d.ts.map +1 -0
- package/dist/callbacks/postTrinketBreak.d.ts +3 -0
- package/dist/callbacks/postTrinketBreak.d.ts.map +1 -0
- package/dist/callbacks/preBerserkDeath.d.ts +3 -0
- package/dist/callbacks/preBerserkDeath.d.ts.map +1 -0
- package/dist/callbacks/preNewLevel.d.ts +3 -0
- package/dist/callbacks/preNewLevel.d.ts.map +1 -0
- package/dist/callbacks/reorderedCallbacks.d.ts +6 -0
- package/dist/callbacks/reorderedCallbacks.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postAmbushFinished.d.ts +9 -0
- package/dist/callbacks/subscriptions/postAmbushFinished.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postAmbushStarted.d.ts +9 -0
- package/dist/callbacks/subscriptions/postAmbushStarted.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postBombInitLate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postBombInitLate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postBoneExploded.d.ts +9 -0
- package/dist/callbacks/subscriptions/postBoneExploded.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postBoneSwing.d.ts +8 -0
- package/dist/callbacks/subscriptions/postBoneSwing.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postCollectibleEmpty.d.ts +9 -0
- package/dist/callbacks/subscriptions/postCollectibleEmpty.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postCollectibleInitFirst.d.ts +9 -0
- package/dist/callbacks/subscriptions/postCollectibleInitFirst.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postCursedTeleport.d.ts +8 -0
- package/dist/callbacks/subscriptions/postCursedTeleport.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postCustomDoorEnter.d.ts +9 -0
- package/dist/callbacks/subscriptions/postCustomDoorEnter.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postCustomRevive.d.ts +10 -0
- package/dist/callbacks/subscriptions/postCustomRevive.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postDiceRoomActivated.d.ts +9 -0
- package/dist/callbacks/subscriptions/postDiceRoomActivated.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postDoorRender.d.ts +9 -0
- package/dist/callbacks/subscriptions/postDoorRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postDoorUpdate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postDoorUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postEffectInitLate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postEffectInitLate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postEffectStateChanged.d.ts +9 -0
- package/dist/callbacks/subscriptions/postEffectStateChanged.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postEsauJr.d.ts +8 -0
- package/dist/callbacks/subscriptions/postEsauJr.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postFamiliarInitLate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postFamiliarInitLate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postFamiliarStateChanged.d.ts +9 -0
- package/dist/callbacks/subscriptions/postFamiliarStateChanged.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postFirstEsauJr.d.ts +8 -0
- package/dist/callbacks/subscriptions/postFirstEsauJr.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postFirstFlip.d.ts +8 -0
- package/dist/callbacks/subscriptions/postFirstFlip.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postFlip.d.ts +8 -0
- package/dist/callbacks/subscriptions/postFlip.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGameStartedReordered.d.ts +7 -0
- package/dist/callbacks/subscriptions/postGameStartedReordered.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGameStartedReorderedLast.d.ts +7 -0
- package/dist/callbacks/subscriptions/postGameStartedReorderedLast.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGreedModeWave.d.ts +8 -0
- package/dist/callbacks/subscriptions/postGreedModeWave.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityBroken.d.ts +10 -0
- package/dist/callbacks/subscriptions/postGridEntityBroken.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCollision.d.ts +10 -0
- package/dist/callbacks/subscriptions/postGridEntityCollision.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomBroken.d.ts +9 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomBroken.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomCollision.d.ts +9 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomCollision.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomInit.d.ts +9 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomInit.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRemove.d.ts +9 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRemove.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRender.d.ts +9 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomStateChanged.d.ts +9 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomStateChanged.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityInit.d.ts +10 -0
- package/dist/callbacks/subscriptions/postGridEntityInit.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityRemove.d.ts +10 -0
- package/dist/callbacks/subscriptions/postGridEntityRemove.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityRender.d.ts +10 -0
- package/dist/callbacks/subscriptions/postGridEntityRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityStateChanged.d.ts +10 -0
- package/dist/callbacks/subscriptions/postGridEntityStateChanged.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postGridEntityUpdate.d.ts +10 -0
- package/dist/callbacks/subscriptions/postGridEntityUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postHolyMantleRemoved.d.ts +10 -0
- package/dist/callbacks/subscriptions/postHolyMantleRemoved.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postItemDischarged.d.ts +9 -0
- package/dist/callbacks/subscriptions/postItemDischarged.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postItemPickup.d.ts +15 -0
- package/dist/callbacks/subscriptions/postItemPickup.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postKnifeInitLate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postKnifeInitLate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postLaserInitLate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postLaserInitLate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postNPCInitLate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postNPCInitLate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postNPCStateChanged.d.ts +10 -0
- package/dist/callbacks/subscriptions/postNPCStateChanged.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postNewLevelReordered.d.ts +5 -0
- package/dist/callbacks/subscriptions/postNewLevelReordered.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postNewRoomEarly.d.ts +5 -0
- package/dist/callbacks/subscriptions/postNewRoomEarly.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postNewRoomReordered.d.ts +5 -0
- package/dist/callbacks/subscriptions/postNewRoomReordered.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.d.ts +10 -0
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPickupCollect.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPickupCollect.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPickupInitFirst.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPickupInitFirst.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPickupInitLate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPickupInitLate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPickupStateChanged.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPickupStateChanged.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPitRender.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPitRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPitUpdate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPitUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts +11 -0
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts +13 -0
- package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPlayerChangeType.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPlayerChangeType.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPlayerCollectibleAdded.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPlayerCollectibleAdded.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPlayerCollectibleRemoved.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPlayerCollectibleRemoved.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts +10 -0
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPlayerInitFirst.d.ts +10 -0
- package/dist/callbacks/subscriptions/postPlayerInitFirst.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPlayerInitLate.d.ts +10 -0
- package/dist/callbacks/subscriptions/postPlayerInitLate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.d.ts +10 -0
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.d.ts +10 -0
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPoopRender.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPoopRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPoopUpdate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPoopUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postProjectileInitLate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postProjectileInitLate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPurchase.d.ts +10 -0
- package/dist/callbacks/subscriptions/postPurchase.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postRockRender.d.ts +10 -0
- package/dist/callbacks/subscriptions/postRockRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postRockUpdate.d.ts +10 -0
- package/dist/callbacks/subscriptions/postRockUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postRoomClearChanged.d.ts +8 -0
- package/dist/callbacks/subscriptions/postRoomClearChanged.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postSacrifice.d.ts +10 -0
- package/dist/callbacks/subscriptions/postSacrifice.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postSlotAnimationChanged.d.ts +9 -0
- package/dist/callbacks/subscriptions/postSlotAnimationChanged.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postSlotCollision.d.ts +9 -0
- package/dist/callbacks/subscriptions/postSlotCollision.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postSlotDestroyed.d.ts +11 -0
- package/dist/callbacks/subscriptions/postSlotDestroyed.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postSlotInit.d.ts +9 -0
- package/dist/callbacks/subscriptions/postSlotInit.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postSlotRender.d.ts +9 -0
- package/dist/callbacks/subscriptions/postSlotRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postSlotUpdate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postSlotUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postSpikesRender.d.ts +10 -0
- package/dist/callbacks/subscriptions/postSpikesRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postSpikesUpdate.d.ts +10 -0
- package/dist/callbacks/subscriptions/postSpikesUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postTNTRender.d.ts +10 -0
- package/dist/callbacks/subscriptions/postTNTRender.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postTNTUpdate.d.ts +10 -0
- package/dist/callbacks/subscriptions/postTNTUpdate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postTearInitLate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postTearInitLate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postTearInitVeryLate.d.ts +9 -0
- package/dist/callbacks/subscriptions/postTearInitVeryLate.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postTransformation.d.ts +9 -0
- package/dist/callbacks/subscriptions/postTransformation.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postTrinketBreak.d.ts +9 -0
- package/dist/callbacks/subscriptions/postTrinketBreak.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/preBerserkDeath.d.ts +10 -0
- package/dist/callbacks/subscriptions/preBerserkDeath.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/preCustomRevive.d.ts +10 -0
- package/dist/callbacks/subscriptions/preCustomRevive.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/preItemPickup.d.ts +15 -0
- package/dist/callbacks/subscriptions/preItemPickup.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/preNewLevel.d.ts +8 -0
- package/dist/callbacks/subscriptions/preNewLevel.d.ts.map +1 -0
- package/dist/core/constantsFirstLast.d.ts +10 -85
- package/dist/core/constantsFirstLast.d.ts.map +1 -1
- package/dist/core/constantsFirstLast.lua +10 -90
- package/dist/enums/ModCallbackCustom.d.ts +21 -0
- package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/features/characterStats.lua +2 -2
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +9 -5
- package/dist/features/firstLast.d.ts +190 -0
- package/dist/features/firstLast.d.ts.map +1 -0
- package/dist/features/firstLast.lua +341 -0
- package/dist/functions/array.d.ts +1 -9
- package/dist/functions/array.d.ts.map +1 -1
- package/dist/functions/array.lua +0 -6
- package/dist/functions/cards.d.ts +0 -8
- package/dist/functions/cards.d.ts.map +1 -1
- package/dist/functions/cards.lua +9 -24
- package/dist/functions/{cacheFlag.d.ts → collectibleCacheFlag.d.ts} +8 -8
- package/dist/functions/collectibleCacheFlag.d.ts.map +1 -0
- package/dist/functions/{cacheFlag.lua → collectibleCacheFlag.lua} +12 -13
- package/dist/functions/collectibleSet.d.ts +18 -0
- package/dist/functions/collectibleSet.d.ts.map +1 -1
- package/dist/functions/collectibleSet.lua +29 -9
- package/dist/functions/collectibles.d.ts +0 -13
- package/dist/functions/collectibles.d.ts.map +1 -1
- package/dist/functions/collectibles.lua +0 -18
- package/dist/functions/flying.lua +2 -2
- package/dist/functions/pills.d.ts +0 -10
- package/dist/functions/pills.d.ts.map +1 -1
- package/dist/functions/pills.lua +0 -15
- package/dist/functions/players.lua +1 -1
- package/dist/functions/random.d.ts.map +1 -1
- package/dist/functions/random.lua +2 -0
- package/dist/functions/run.d.ts +5 -0
- package/dist/functions/run.d.ts.map +1 -1
- package/dist/functions/run.lua +13 -0
- package/dist/functions/stats.d.ts +9 -0
- package/dist/functions/stats.d.ts.map +1 -0
- package/dist/functions/stats.lua +11 -0
- package/dist/functions/trinketCacheFlag.d.ts +9 -1
- package/dist/functions/trinketCacheFlag.d.ts.map +1 -1
- package/dist/functions/trinketCacheFlag.lua +28 -10
- package/dist/functions/trinketSet.d.ts +18 -0
- package/dist/functions/trinketSet.d.ts.map +1 -1
- package/dist/functions/trinketSet.lua +29 -9
- package/dist/functions/trinkets.d.ts +1 -10
- package/dist/functions/trinkets.d.ts.map +1 -1
- package/dist/functions/trinkets.lua +0 -24
- package/dist/index.d.ts +11569 -175
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +158 -128
- package/package.json +1 -1
- package/src/core/constantsFirstLast.ts +12 -125
- package/src/enums/ModCallbackCustom.ts +21 -0
- package/src/features/characterStats.ts +1 -1
- package/src/features/extraConsoleCommands/listCommands.ts +8 -5
- package/src/features/firstLast.ts +429 -0
- package/src/functions/array.ts +1 -9
- package/src/functions/cards.ts +5 -28
- package/src/functions/{cacheFlag.ts → collectibleCacheFlag.ts} +13 -16
- package/src/functions/collectibleSet.ts +28 -21
- package/src/functions/collectibles.ts +0 -22
- package/src/functions/flying.ts +1 -1
- package/src/functions/pills.ts +0 -22
- package/src/functions/players.ts +2 -2
- package/src/functions/random.ts +3 -0
- package/src/functions/run.ts +23 -1
- package/src/functions/stats.ts +12 -0
- package/src/functions/trinketCacheFlag.ts +29 -7
- package/src/functions/trinketSet.ts +28 -21
- package/src/functions/trinkets.ts +0 -34
- package/src/index.ts +26 -62
- package/dist/functions/cacheFlag.d.ts.map +0 -1
|
@@ -353,6 +353,9 @@ export enum ModCallbackCustom {
|
|
|
353
353
|
* the broken state for the respective grid entity type. (For example, this will fire for a
|
|
354
354
|
* `GridEntityType.ROCK` (2) when its state changes to `RockState.BROKEN` (2).)
|
|
355
355
|
*
|
|
356
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
357
|
+
* `POST_GRID_ENTITY_CUSTOM_BROKEN` callback instead.
|
|
358
|
+
*
|
|
356
359
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
357
360
|
* only fire if it matches the `GridEntityType` provided.
|
|
358
361
|
*
|
|
@@ -367,6 +370,9 @@ export enum ModCallbackCustom {
|
|
|
367
370
|
* this, the callback will not continue to fire. It will only fire again once the entity moves out
|
|
368
371
|
* of range and then moves back into range.)
|
|
369
372
|
*
|
|
373
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
374
|
+
* `POST_GRID_ENTITY_CUSTOM_COLLISION` callback instead.
|
|
375
|
+
*
|
|
370
376
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
371
377
|
* only fire if it matches the `GridEntityType` provided.
|
|
372
378
|
*
|
|
@@ -502,6 +508,9 @@ export enum ModCallbackCustom {
|
|
|
502
508
|
* - in the `POST_UPDATE` callback (if the entity appeared mid-way through the room, like when the
|
|
503
509
|
* trapdoor appears after defeating It Lives!)
|
|
504
510
|
*
|
|
511
|
+
* For grid entities created with `spawnCustomGridEntity`, use the `POST_GRID_ENTITY_CUSTOM_INIT`
|
|
512
|
+
* callback instead.
|
|
513
|
+
*
|
|
505
514
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
506
515
|
* only fire if it matches the `GridEntityType` provided.
|
|
507
516
|
*
|
|
@@ -519,6 +528,9 @@ export enum ModCallbackCustom {
|
|
|
519
528
|
*
|
|
520
529
|
* This will fire when a Polty/Kineti picks up a grid entity.
|
|
521
530
|
*
|
|
531
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
532
|
+
* `POST_GRID_ENTITY_CUSTOM_REMOVE` callback instead.
|
|
533
|
+
*
|
|
522
534
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
523
535
|
* only fire if it matches the `GridEntityType` provided.
|
|
524
536
|
*
|
|
@@ -539,6 +551,9 @@ export enum ModCallbackCustom {
|
|
|
539
551
|
* - When registering the callback, takes an optional third argument that will make the callback
|
|
540
552
|
* only fire if it matches the variant provided.
|
|
541
553
|
*
|
|
554
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
555
|
+
* `POST_GRID_ENTITY_CUSTOM_RENDER` callback instead.
|
|
556
|
+
*
|
|
542
557
|
* ```ts
|
|
543
558
|
* function postGridEntityRender(gridEntity: GridEntity): void {}
|
|
544
559
|
* ```
|
|
@@ -552,6 +567,9 @@ export enum ModCallbackCustom {
|
|
|
552
567
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
553
568
|
* only fire if it matches the `GridEntityType` provided.
|
|
554
569
|
*
|
|
570
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
571
|
+
* `POST_GRID_ENTITY_CUSTOM_STATE_CHANGED` callback instead.
|
|
572
|
+
*
|
|
555
573
|
* ```ts
|
|
556
574
|
* function postGridEntityStateChanged(
|
|
557
575
|
* gridEntity: GridEntity,
|
|
@@ -570,6 +588,9 @@ export enum ModCallbackCustom {
|
|
|
570
588
|
* - When registering the callback, takes an optional third argument that will make the callback
|
|
571
589
|
* only fire if it matches the variant provided.
|
|
572
590
|
*
|
|
591
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
592
|
+
* `POST_GRID_ENTITY_CUSTOM_UPDATE` callback instead.
|
|
593
|
+
*
|
|
573
594
|
* ```ts
|
|
574
595
|
* function postGridEntityUpdate(gridEntity: GridEntity): void {}
|
|
575
596
|
* ```
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
PlayerType,
|
|
11
11
|
} from "isaac-typescript-definitions";
|
|
12
12
|
import { errorIfFeaturesNotInitialized } from "../featuresInitialized";
|
|
13
|
-
import { getDefaultPlayerStat } from "../functions/cacheFlag";
|
|
14
13
|
import { addStat } from "../functions/players";
|
|
14
|
+
import { getDefaultPlayerStat } from "../functions/stats";
|
|
15
15
|
|
|
16
16
|
const FEATURE_NAME = "characterStats";
|
|
17
17
|
|
|
@@ -47,8 +47,6 @@ import {
|
|
|
47
47
|
FIRST_PILL_EFFECT,
|
|
48
48
|
FIRST_ROOM_TYPE,
|
|
49
49
|
FIRST_STAGE,
|
|
50
|
-
LAST_CARD,
|
|
51
|
-
LAST_PILL_EFFECT,
|
|
52
50
|
LAST_ROOM_TYPE,
|
|
53
51
|
LAST_STAGE,
|
|
54
52
|
LAST_VANILLA_CHARACTER,
|
|
@@ -95,6 +93,7 @@ import { CARD_MAP } from "../../maps/cardMap";
|
|
|
95
93
|
import { CHARACTER_MAP } from "../../maps/characterMap";
|
|
96
94
|
import { PILL_EFFECT_MAP } from "../../maps/pillEffectMap";
|
|
97
95
|
import { ROOM_TYPE_MAP } from "../../maps/roomTypeMap";
|
|
96
|
+
import { getLastCard, getLastPillEffect } from "../firstLast";
|
|
98
97
|
import {
|
|
99
98
|
addHeart,
|
|
100
99
|
devilAngel,
|
|
@@ -337,7 +336,8 @@ export function card(params: string): void {
|
|
|
337
336
|
|
|
338
337
|
cardNum = match[1];
|
|
339
338
|
} else {
|
|
340
|
-
|
|
339
|
+
const lastCard = getLastCard();
|
|
340
|
+
if (num < FIRST_CARD || num > lastCard) {
|
|
341
341
|
printConsole(`Invalid card sub-type: ${num}`);
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
@@ -352,10 +352,12 @@ export function card(params: string): void {
|
|
|
352
352
|
|
|
353
353
|
/** Spawns every card on the ground, starting at the top-left-most tile. */
|
|
354
354
|
export function cards(): void {
|
|
355
|
+
const lastCard = getLastCard();
|
|
356
|
+
|
|
355
357
|
let cardType = 1;
|
|
356
358
|
for (let y = 0; y <= 6; y++) {
|
|
357
359
|
for (let x = 0; x <= 12; x++) {
|
|
358
|
-
if (asCard(cardType) ===
|
|
360
|
+
if (asCard(cardType) === lastCard) {
|
|
359
361
|
return;
|
|
360
362
|
}
|
|
361
363
|
|
|
@@ -876,7 +878,8 @@ export function pill(params: string): void {
|
|
|
876
878
|
|
|
877
879
|
pillEffect = match[1];
|
|
878
880
|
} else {
|
|
879
|
-
|
|
881
|
+
const lastPillEffect = getLastPillEffect();
|
|
882
|
+
if (num < FIRST_PILL_EFFECT || num > lastPillEffect) {
|
|
880
883
|
printConsole(`Invalid pill effect ID: ${num}`);
|
|
881
884
|
return;
|
|
882
885
|
}
|
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Card,
|
|
3
|
+
CollectibleType,
|
|
4
|
+
PillEffect,
|
|
5
|
+
TrinketType,
|
|
6
|
+
} from "isaac-typescript-definitions";
|
|
7
|
+
import { ModUpgraded } from "../classes/ModUpgraded";
|
|
8
|
+
import { itemConfig } from "../core/cachedClasses";
|
|
9
|
+
import {
|
|
10
|
+
FIRST_CARD,
|
|
11
|
+
FIRST_PILL_EFFECT,
|
|
12
|
+
FIRST_TRINKET_TYPE,
|
|
13
|
+
LAST_VANILLA_CARD,
|
|
14
|
+
LAST_VANILLA_COLLECTIBLE_TYPE,
|
|
15
|
+
LAST_VANILLA_PILL_EFFECT,
|
|
16
|
+
LAST_VANILLA_TRINKET_TYPE,
|
|
17
|
+
NUM_VANILLA_CARDS,
|
|
18
|
+
NUM_VANILLA_COLLECTIBLE_TYPES,
|
|
19
|
+
NUM_VANILLA_PILL_EFFECTS,
|
|
20
|
+
NUM_VANILLA_TRINKET_TYPES,
|
|
21
|
+
} from "../core/constantsFirstLast";
|
|
22
|
+
import { ModCallbackCustom } from "../enums/ModCallbackCustom";
|
|
23
|
+
import { errorIfFeaturesNotInitialized } from "../featuresInitialized";
|
|
24
|
+
import {
|
|
25
|
+
asCard,
|
|
26
|
+
asCollectibleType,
|
|
27
|
+
asNumber,
|
|
28
|
+
asPillEffect,
|
|
29
|
+
asTrinketType,
|
|
30
|
+
} from "../functions/types";
|
|
31
|
+
import { irange } from "../functions/utils";
|
|
32
|
+
|
|
33
|
+
const FEATURE_NAME = "firstLast";
|
|
34
|
+
|
|
35
|
+
let atLeastOneCallbackFired = false;
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export function firstLastInit(mod: ModUpgraded): void {
|
|
39
|
+
mod.AddCallbackCustom(
|
|
40
|
+
ModCallbackCustom.POST_NEW_ROOM_EARLY,
|
|
41
|
+
postNewRoomEarly,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// ModCallbackCustom.POST_NEW_ROOM_EARLY
|
|
46
|
+
function postNewRoomEarly() {
|
|
47
|
+
atLeastOneCallbackFired = true;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function errorIfNoCallbacksFired(constantType: string) {
|
|
51
|
+
if (!atLeastOneCallbackFired) {
|
|
52
|
+
error(
|
|
53
|
+
`Failed to retrieve a ${constantType} constant. Since not all mods have been loaded yet, any constants of this type will be inaccurate. Thus, you must wait until at least one callback fires before retrieving these types of constants.`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// ------------
|
|
59
|
+
// Collectibles
|
|
60
|
+
// ------------
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Returns the first modded collectible type, or undefined if there are no modded collectibles.
|
|
64
|
+
*
|
|
65
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
66
|
+
* all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
67
|
+
*/
|
|
68
|
+
export function getFirstModdedCollectibleType(): CollectibleType | undefined {
|
|
69
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
70
|
+
errorIfNoCallbacksFired("collectible");
|
|
71
|
+
|
|
72
|
+
const firstModdedCollectibleType = asCollectibleType(
|
|
73
|
+
asNumber(LAST_VANILLA_COLLECTIBLE_TYPE) + 1,
|
|
74
|
+
);
|
|
75
|
+
const itemConfigItem = itemConfig.GetCollectible(firstModdedCollectibleType);
|
|
76
|
+
return itemConfigItem === undefined ? undefined : firstModdedCollectibleType;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Will change depending on how many modded collectibles there are.
|
|
81
|
+
*
|
|
82
|
+
* Equal to `itemConfig.GetCollectibles().Size - 1`. (`Size` includes invalid collectibles, like
|
|
83
|
+
* 666. We subtract one to account for `CollectibleType.NULL`.)
|
|
84
|
+
*
|
|
85
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
86
|
+
* all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
87
|
+
*/
|
|
88
|
+
export function getLastCollectibleType(): CollectibleType {
|
|
89
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
90
|
+
errorIfNoCallbacksFired("collectible");
|
|
91
|
+
|
|
92
|
+
return itemConfig.GetCollectibles().Size - 1;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Helper function to get an array that represents the all modded collectible types.
|
|
97
|
+
*
|
|
98
|
+
* This function is only useful when building collectible type objects. For most purposes, you
|
|
99
|
+
* should use the `getModdedCollectibleSet` helper function instead.
|
|
100
|
+
*
|
|
101
|
+
* Returns an empty array if there are no modded collectible types.
|
|
102
|
+
*
|
|
103
|
+
* (This function is named differently from the `getVanillaCollectibleTypeRange` function because
|
|
104
|
+
* all modded collectible types are contiguous. Thus, each value represents a real
|
|
105
|
+
* `CollectibleType`.)
|
|
106
|
+
*
|
|
107
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
108
|
+
* all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
109
|
+
*/
|
|
110
|
+
export function getModdedCollectibleTypes(): CollectibleType[] {
|
|
111
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
112
|
+
errorIfNoCallbacksFired("collectible");
|
|
113
|
+
|
|
114
|
+
const firstModdedCollectibleType = getFirstModdedCollectibleType();
|
|
115
|
+
if (firstModdedCollectibleType === undefined) {
|
|
116
|
+
return [];
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const lastCollectibleType = getLastCollectibleType();
|
|
120
|
+
return irange(firstModdedCollectibleType, lastCollectibleType);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
125
|
+
* all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
126
|
+
*/
|
|
127
|
+
export function getNumCollectibleTypes(): int {
|
|
128
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
129
|
+
errorIfNoCallbacksFired("collectible");
|
|
130
|
+
|
|
131
|
+
const numModdedCollectibleTypes = getNumModdedCollectibleTypes();
|
|
132
|
+
return NUM_VANILLA_COLLECTIBLE_TYPES + numModdedCollectibleTypes;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Unlike vanilla collectible types, modded collectible types are always contiguous.
|
|
137
|
+
*
|
|
138
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
139
|
+
* all collectibles will necessarily be present when a mod first loads (due to mod load order).
|
|
140
|
+
*/
|
|
141
|
+
export function getNumModdedCollectibleTypes(): int {
|
|
142
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
143
|
+
errorIfNoCallbacksFired("collectible");
|
|
144
|
+
|
|
145
|
+
const lastCollectibleType = getLastCollectibleType();
|
|
146
|
+
return lastCollectibleType - LAST_VANILLA_COLLECTIBLE_TYPE;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// --------
|
|
150
|
+
// Trinkets
|
|
151
|
+
// --------
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Returns the first modded trinket type, or undefined if there are no modded trinkets.
|
|
155
|
+
*
|
|
156
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
157
|
+
* all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
158
|
+
*/
|
|
159
|
+
export function getFirstModdedTrinketType(): TrinketType | undefined {
|
|
160
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
161
|
+
errorIfNoCallbacksFired("trinket");
|
|
162
|
+
|
|
163
|
+
const firstModdedTrinketType = asTrinketType(
|
|
164
|
+
asNumber(LAST_VANILLA_TRINKET_TYPE) + 1,
|
|
165
|
+
);
|
|
166
|
+
const itemConfigItem = itemConfig.GetTrinket(firstModdedTrinketType);
|
|
167
|
+
return itemConfigItem === undefined ? undefined : firstModdedTrinketType;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Will change depending on how many modded cards there are.
|
|
172
|
+
*
|
|
173
|
+
* This is equal to the number of trinket types, since all trinket types are contiguous (unlike
|
|
174
|
+
* collectibles).
|
|
175
|
+
*
|
|
176
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
177
|
+
* all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
178
|
+
*/
|
|
179
|
+
export function getLastTrinketType(): TrinketType {
|
|
180
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
181
|
+
errorIfNoCallbacksFired("trinket");
|
|
182
|
+
|
|
183
|
+
const numTrinketTypes = getNumTrinketTypes();
|
|
184
|
+
return asTrinketType(numTrinketTypes);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* Helper function to get an array that represents every modded trinket type.
|
|
189
|
+
*
|
|
190
|
+
* Returns an empty array if there are no modded trinket types.
|
|
191
|
+
*
|
|
192
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
193
|
+
* all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
194
|
+
*/
|
|
195
|
+
export function getModdedTrinketTypes(): TrinketType[] {
|
|
196
|
+
const firstModdedTrinketType = getFirstModdedTrinketType();
|
|
197
|
+
if (firstModdedTrinketType === undefined) {
|
|
198
|
+
return [];
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const lastTrinketType = getLastTrinketType();
|
|
202
|
+
return irange(firstModdedTrinketType, lastTrinketType);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Will change depending on how many modded cards there are.
|
|
207
|
+
*
|
|
208
|
+
* Equal to `itemConfig.GetTrinkets().Size - 1`. (We subtract one to account for
|
|
209
|
+
* `TrinketType.NULL`.)
|
|
210
|
+
*
|
|
211
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
212
|
+
* all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
213
|
+
*/
|
|
214
|
+
export function getNumTrinketTypes(): int {
|
|
215
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
216
|
+
errorIfNoCallbacksFired("trinket");
|
|
217
|
+
|
|
218
|
+
return itemConfig.GetTrinkets().Size - 1;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
223
|
+
* all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
224
|
+
*/
|
|
225
|
+
export function getNumModdedTrinketTypes(): int {
|
|
226
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
227
|
+
errorIfNoCallbacksFired("trinket");
|
|
228
|
+
|
|
229
|
+
const numTrinketTypes = getNumTrinketTypes();
|
|
230
|
+
return numTrinketTypes - NUM_VANILLA_TRINKET_TYPES;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Helper function to get an array that contains every trinket type.
|
|
235
|
+
*
|
|
236
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
237
|
+
* all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
238
|
+
*/
|
|
239
|
+
export function getTrinketTypes(): TrinketType[] {
|
|
240
|
+
const lastTrinketType = getLastTrinketType();
|
|
241
|
+
return irange(FIRST_TRINKET_TYPE, lastTrinketType);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
// -----
|
|
245
|
+
// Cards
|
|
246
|
+
// -----
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* Helper function to get an array with every valid card sub-type. This includes modded cards.
|
|
250
|
+
*
|
|
251
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
252
|
+
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
253
|
+
*/
|
|
254
|
+
export function getAllCards(): Card[] {
|
|
255
|
+
const lastCard = getLastCard();
|
|
256
|
+
return irange(FIRST_CARD, lastCard);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/**
|
|
260
|
+
* Returns the first modded card sub-type, or undefined if there are no modded cards.
|
|
261
|
+
*
|
|
262
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
263
|
+
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
264
|
+
*/
|
|
265
|
+
export function getFirstModdedCard(): Card | undefined {
|
|
266
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
267
|
+
errorIfNoCallbacksFired("card");
|
|
268
|
+
|
|
269
|
+
const firstModdedCard = asCard(asNumber(LAST_VANILLA_CARD) + 1);
|
|
270
|
+
const itemConfigCard = itemConfig.GetCard(firstModdedCard);
|
|
271
|
+
return itemConfigCard === undefined ? undefined : firstModdedCard;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Will change depending on how many modded cards there are.
|
|
276
|
+
*
|
|
277
|
+
* This is equal to the number of cards, since all card sub-types are contiguous (unlike
|
|
278
|
+
* collectibles).
|
|
279
|
+
*
|
|
280
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
281
|
+
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
282
|
+
*/
|
|
283
|
+
export function getLastCard(): Card {
|
|
284
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
285
|
+
errorIfNoCallbacksFired("card");
|
|
286
|
+
|
|
287
|
+
const numCards = getNumCards();
|
|
288
|
+
return asCard(numCards);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Helper function to get an array with every modded card sub-type.
|
|
293
|
+
*
|
|
294
|
+
* Returns an empty array if there are no modded cards.
|
|
295
|
+
*
|
|
296
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
297
|
+
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
298
|
+
*/
|
|
299
|
+
export function getModdedCards(): Card[] {
|
|
300
|
+
const firstModdedCard = getFirstModdedCard();
|
|
301
|
+
if (firstModdedCard === undefined) {
|
|
302
|
+
return [];
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
const lastCard = getLastCard();
|
|
306
|
+
return irange(firstModdedCard, lastCard);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Will change depending on how many modded cards there are.
|
|
311
|
+
*
|
|
312
|
+
* Equal to `itemConfig.GetCards().Size - 1`. (We subtract one to account for `Card.NULL`.)
|
|
313
|
+
*
|
|
314
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
315
|
+
* all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
316
|
+
*/
|
|
317
|
+
export function getNumCards(): int {
|
|
318
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
319
|
+
errorIfNoCallbacksFired("card");
|
|
320
|
+
|
|
321
|
+
return itemConfig.GetCards().Size - 1;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
326
|
+
* all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
327
|
+
*/
|
|
328
|
+
export function getNumModdedCards(): int {
|
|
329
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
330
|
+
errorIfNoCallbacksFired("card");
|
|
331
|
+
|
|
332
|
+
const numCards = getNumCards();
|
|
333
|
+
return numCards - NUM_VANILLA_CARDS;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// ------------
|
|
337
|
+
// Pill Effects
|
|
338
|
+
// ------------
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* Helper function to get an array with every valid pill effect. This includes modded pill effects.
|
|
342
|
+
*
|
|
343
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
344
|
+
* all pill effects will necessarily be present when a mod first loads (due to mod load order).
|
|
345
|
+
*/
|
|
346
|
+
export function getAllPillEffects(): PillEffect[] {
|
|
347
|
+
const lastPillEffect = getLastPillEffect();
|
|
348
|
+
return irange(FIRST_PILL_EFFECT, lastPillEffect);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Returns the first modded pill effect, or undefined if there are no modded pill effects.
|
|
353
|
+
*
|
|
354
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
355
|
+
* all pill effects will necessarily be present when a mod first loads (due to mod load order).
|
|
356
|
+
*/
|
|
357
|
+
export function getFirstModdedPillEffect(): PillEffect | undefined {
|
|
358
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
359
|
+
errorIfNoCallbacksFired("pill");
|
|
360
|
+
|
|
361
|
+
const firstModdedPillEffect = asPillEffect(
|
|
362
|
+
asNumber(LAST_VANILLA_PILL_EFFECT) + 1,
|
|
363
|
+
);
|
|
364
|
+
const itemConfigPillEffect = itemConfig.GetPillEffect(firstModdedPillEffect);
|
|
365
|
+
return itemConfigPillEffect === undefined ? undefined : firstModdedPillEffect;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Will change depending on how many modded pill effects there are.
|
|
370
|
+
*
|
|
371
|
+
* This is equal to the number of pill effects, since all pill effects are contiguous (unlike
|
|
372
|
+
* collectibles).
|
|
373
|
+
*
|
|
374
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
375
|
+
* all pill effects will necessarily be present when a mod first loads (due to mod load order).
|
|
376
|
+
*/
|
|
377
|
+
export function getLastPillEffect(): PillEffect {
|
|
378
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
379
|
+
errorIfNoCallbacksFired("pill");
|
|
380
|
+
|
|
381
|
+
const numPillEffects = getNumPillEffects();
|
|
382
|
+
return asPillEffect(numPillEffects);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Helper function to get an array with every modded pill effect.
|
|
387
|
+
*
|
|
388
|
+
* Returns an empty array if there are no modded pill effects.
|
|
389
|
+
*
|
|
390
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
391
|
+
* all pill effects will necessarily be present when a mod first loads (due to mod load order).
|
|
392
|
+
*/
|
|
393
|
+
export function getModdedPillEffects(): PillEffect[] {
|
|
394
|
+
const firstModdedPillEffect = getFirstModdedPillEffect();
|
|
395
|
+
if (firstModdedPillEffect === undefined) {
|
|
396
|
+
return [];
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
const lastPillEffect = getLastPillEffect();
|
|
400
|
+
return irange(firstModdedPillEffect, lastPillEffect);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Will change depending on how many modded pill effects there are.
|
|
405
|
+
*
|
|
406
|
+
* Equal to `itemConfig.GetPillEffects().Size`. (We do not have to subtract one, because the first
|
|
407
|
+
* pill effect has an ID of 0 and there is no `PillEffect.NULL`.)
|
|
408
|
+
*
|
|
409
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
410
|
+
* all pill effects will necessarily be present when a mod first loads (due to mod load order).
|
|
411
|
+
*/
|
|
412
|
+
export function getNumPillEffects(): int {
|
|
413
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
414
|
+
errorIfNoCallbacksFired("pill");
|
|
415
|
+
|
|
416
|
+
return itemConfig.GetPillEffects().Size;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
/**
|
|
420
|
+
* This function can only be called if at least one callback has been executed. This is because not
|
|
421
|
+
* all pill effects will necessarily be present when a mod first loads (due to mod load order).
|
|
422
|
+
*/
|
|
423
|
+
export function getNumModdedPillEffects(): int {
|
|
424
|
+
errorIfFeaturesNotInitialized(FEATURE_NAME);
|
|
425
|
+
errorIfNoCallbacksFired("pill");
|
|
426
|
+
|
|
427
|
+
const numPillEffects = getNumPillEffects();
|
|
428
|
+
return numPillEffects - NUM_VANILLA_PILL_EFFECTS;
|
|
429
|
+
}
|
package/src/functions/array.ts
CHANGED
|
@@ -399,15 +399,7 @@ export function getRandomArrayIndex<T>(
|
|
|
399
399
|
return getRandomInt(0, array.length - 1, seedOrRNG, exceptions);
|
|
400
400
|
}
|
|
401
401
|
|
|
402
|
-
/**
|
|
403
|
-
* Initializes an array with all elements containing the specified default value.
|
|
404
|
-
*
|
|
405
|
-
* For example:
|
|
406
|
-
*
|
|
407
|
-
* ```ts
|
|
408
|
-
* const playerTransformations = initArray(false, PlayerForm.NUM_PLAYER_FORMS - 1);
|
|
409
|
-
* ```
|
|
410
|
-
*/
|
|
402
|
+
/** Initializes an array with all elements containing the specified default value. */
|
|
411
403
|
export function initArray<T>(defaultValue: T, size: int): T[] {
|
|
412
404
|
const array: T[] = [];
|
|
413
405
|
repeat(size, () => {
|
package/src/functions/cards.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { Card, ItemConfigCardType } from "isaac-typescript-definitions";
|
|
2
2
|
import { itemConfig } from "../core/cachedClasses";
|
|
3
|
-
import {
|
|
4
|
-
FIRST_CARD,
|
|
5
|
-
FIRST_MODDED_CARD,
|
|
6
|
-
LAST_CARD,
|
|
7
|
-
MAX_VANILLA_CARD,
|
|
8
|
-
} from "../core/constantsFirstLast";
|
|
3
|
+
import { FIRST_CARD, LAST_VANILLA_CARD } from "../core/constantsFirstLast";
|
|
9
4
|
import {
|
|
10
5
|
CARD_DESCRIPTIONS,
|
|
11
6
|
DEFAULT_CARD_DESCRIPTION,
|
|
@@ -28,14 +23,14 @@ const CARD_TYPE_TO_CARDS_MAP = new Map<ItemConfigCardType, Set<Card>>();
|
|
|
28
23
|
*/
|
|
29
24
|
const CARD_SET = new Set<Card>();
|
|
30
25
|
|
|
31
|
-
function
|
|
26
|
+
function lazyInitCardMapsSets() {
|
|
32
27
|
// The card type to cards map should be valid for every card type, so we initialize it with empty
|
|
33
28
|
// sets.
|
|
34
29
|
for (const cardType of getEnumValues(ItemConfigCardType)) {
|
|
35
30
|
CARD_TYPE_TO_CARDS_MAP.set(cardType, new Set<Card>());
|
|
36
31
|
}
|
|
37
32
|
|
|
38
|
-
for (const card of
|
|
33
|
+
for (const card of getVanillaCards()) {
|
|
39
34
|
const cardType = getCardType(card);
|
|
40
35
|
const cardTypeSet = CARD_TYPE_TO_CARDS_MAP.get(cardType);
|
|
41
36
|
if (cardTypeSet === undefined) {
|
|
@@ -57,11 +52,6 @@ function initCardObjects() {
|
|
|
57
52
|
addSetsToSet(CARD_SET, cards);
|
|
58
53
|
}
|
|
59
54
|
|
|
60
|
-
/** Helper function to get an array with every valid card sub-type. This includes modded cards. */
|
|
61
|
-
export function getAllCards(): Card[] {
|
|
62
|
-
return irange(FIRST_CARD, LAST_CARD);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
55
|
/**
|
|
66
56
|
* Helper function to get a card description from a Card enum value.
|
|
67
57
|
*
|
|
@@ -131,7 +121,7 @@ export function getCardType(card: Card): ItemConfigCardType {
|
|
|
131
121
|
*/
|
|
132
122
|
export function getCardsOfType(...cardTypes: ItemConfigCardType[]): Set<Card> {
|
|
133
123
|
if (CARD_TYPE_TO_CARDS_MAP.size === 0) {
|
|
134
|
-
|
|
124
|
+
lazyInitCardMapsSets();
|
|
135
125
|
}
|
|
136
126
|
|
|
137
127
|
const matchingCards = new Set<Card>();
|
|
@@ -149,19 +139,6 @@ export function getCardsOfType(...cardTypes: ItemConfigCardType[]): Set<Card> {
|
|
|
149
139
|
return matchingCards;
|
|
150
140
|
}
|
|
151
141
|
|
|
152
|
-
/**
|
|
153
|
-
* Helper function to get an array with every modded card sub-type.
|
|
154
|
-
*
|
|
155
|
-
* Returns an empty array if there are no modded cards.
|
|
156
|
-
*/
|
|
157
|
-
export function getModdedCards(): Card[] {
|
|
158
|
-
if (MAX_VANILLA_CARD === LAST_CARD) {
|
|
159
|
-
return [];
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
return irange(FIRST_MODDED_CARD, LAST_CARD);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
142
|
/**
|
|
166
143
|
* Has an equal chance of returning any card (e.g. Fool, Reverse Fool, Wild Card, etc.).
|
|
167
144
|
*
|
|
@@ -216,7 +193,7 @@ export function getRandomRune(
|
|
|
216
193
|
|
|
217
194
|
/** Helper function to get an array with every valid vanilla card sub-type. */
|
|
218
195
|
export function getVanillaCards(): Card[] {
|
|
219
|
-
return irange(FIRST_CARD,
|
|
196
|
+
return irange(FIRST_CARD, LAST_VANILLA_CARD);
|
|
220
197
|
}
|
|
221
198
|
|
|
222
199
|
/**
|