isaacscript-common 1.2.290 → 2.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/README.md +2 -2
- package/dist/cachedClasses.d.ts +1 -1
- package/dist/cachedClasses.lua +0 -1
- package/dist/callbacks/customRevive.lua +13 -8
- package/dist/callbacks/itemPickup.lua +3 -1
- package/dist/callbacks/postBombInitLate.lua +3 -1
- package/dist/callbacks/postBoneSwing.lua +5 -2
- package/dist/callbacks/postCollectibleInitFirst.lua +4 -1
- package/dist/callbacks/postCursedTeleport.lua +16 -8
- package/dist/callbacks/postCustomDoorEnter.d.ts +1 -1
- package/dist/callbacks/postCustomDoorEnter.lua +20 -14
- package/dist/callbacks/postEffectInitLate.lua +3 -1
- package/dist/callbacks/postEffectStateChanged.lua +3 -1
- package/dist/callbacks/postEsauJr.lua +5 -2
- package/dist/callbacks/postFamiliarInitLate.lua +3 -1
- package/dist/callbacks/postFamiliarStateChanged.lua +3 -1
- package/dist/callbacks/postFlip.lua +9 -5
- package/dist/callbacks/postGreedModeWave.d.ts +1 -0
- package/dist/callbacks/postGreedModeWave.lua +32 -0
- package/dist/callbacks/postGreedWave.d.ts +1 -0
- package/dist/callbacks/postGreedWave.lua +31 -0
- package/dist/callbacks/postGridEntity.lua +9 -7
- package/dist/callbacks/postGridEntityCollision.lua +5 -2
- package/dist/callbacks/postHolyMantleRemoved.d.ts +1 -0
- package/dist/callbacks/postHolyMantleRemoved.lua +39 -0
- package/dist/callbacks/postItemDischarged.lua +35 -14
- package/dist/callbacks/postKnifeInitLate.lua +3 -1
- package/dist/callbacks/postLaserInitLate.lua +3 -1
- package/dist/callbacks/postNPCInitLate.lua +3 -1
- package/dist/callbacks/postNPCStateChanged.lua +3 -1
- package/dist/callbacks/postNewRoomEarly.lua +7 -5
- package/dist/callbacks/postPickupCollect.lua +3 -1
- package/dist/callbacks/postPickupInitLate.lua +3 -1
- package/dist/callbacks/postPickupStateChanged.lua +3 -1
- package/dist/callbacks/postPlayerChangeHealth.lua +2 -2
- package/dist/callbacks/postPlayerFatalDamage.lua +4 -1
- package/dist/callbacks/postPlayerInitLate.lua +3 -1
- package/dist/callbacks/postPlayerReordered.lua +7 -6
- package/dist/callbacks/postProjectileInitLate.lua +3 -1
- package/dist/callbacks/postRoomClearChanged.d.ts +1 -0
- package/dist/callbacks/postRoomClearChanged.lua +40 -0
- package/dist/callbacks/postSacrifice.lua +8 -4
- package/dist/callbacks/postSlotInitUpdate.lua +4 -2
- package/dist/callbacks/postSlotRender.lua +3 -1
- package/dist/callbacks/postTearInitLate.lua +3 -1
- package/dist/callbacks/postTearInitVeryLate.lua +3 -1
- package/dist/callbacks/postTransformation.lua +7 -12
- package/dist/callbacks/postTrinketBreak.lua +8 -3
- package/dist/callbacks/preBerserkDeath.lua +3 -2
- package/dist/callbacks/preNewLevel.lua +5 -3
- package/dist/callbacks/reorderedCallbacks.lua +7 -5
- package/dist/callbacks/subscriptions/postBombInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postBombInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postBoneSwing.d.ts +3 -1
- package/dist/callbacks/subscriptions/postBoneSwing.lua +3 -3
- package/dist/callbacks/subscriptions/postCollectibleInitFirst.d.ts +5 -2
- package/dist/callbacks/subscriptions/postCollectibleInitFirst.lua +3 -3
- package/dist/callbacks/subscriptions/postCursedTeleport.d.ts +3 -1
- package/dist/callbacks/subscriptions/postCursedTeleport.lua +3 -3
- package/dist/callbacks/subscriptions/postCustomDoorEnter.d.ts +5 -2
- package/dist/callbacks/subscriptions/postCustomDoorEnter.lua +3 -3
- package/dist/callbacks/subscriptions/postCustomRevive.d.ts +4 -1
- package/dist/callbacks/subscriptions/postCustomRevive.lua +3 -3
- package/dist/callbacks/subscriptions/postEffectInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postEffectInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postEffectStateChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postEffectStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postEsauJr.d.ts +3 -1
- package/dist/callbacks/subscriptions/postEsauJr.lua +3 -3
- package/dist/callbacks/subscriptions/postFamiliarInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postFamiliarInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postFamiliarStateChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postFamiliarStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postFirstEsauJr.d.ts +3 -1
- package/dist/callbacks/subscriptions/postFirstEsauJr.lua +3 -3
- package/dist/callbacks/subscriptions/postFirstFlip.d.ts +3 -1
- package/dist/callbacks/subscriptions/postFirstFlip.lua +3 -3
- package/dist/callbacks/subscriptions/postFlip.d.ts +3 -1
- package/dist/callbacks/subscriptions/postFlip.lua +3 -3
- package/dist/callbacks/subscriptions/postGameStartedReordered.d.ts +3 -1
- package/dist/callbacks/subscriptions/postGameStartedReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postGreedModeWave.d.ts +4 -0
- package/dist/callbacks/subscriptions/postGreedModeWave.lua +16 -0
- package/dist/callbacks/subscriptions/postGreedWave.d.ts +2 -0
- package/dist/callbacks/subscriptions/postGreedWave.lua +16 -0
- package/dist/callbacks/subscriptions/postGridEntityBroken.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityBroken.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityCollision.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityCollision.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityInit.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityInit.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityRemove.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityRemove.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityStateChanged.d.ts +5 -0
- package/dist/callbacks/subscriptions/postGridEntityStateChanged.lua +23 -0
- package/dist/callbacks/subscriptions/postGridEntityUpdate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postHolyMantleRemoved.d.ts +6 -0
- package/dist/callbacks/subscriptions/postHolyMantleRemoved.lua +28 -0
- package/dist/callbacks/subscriptions/postItemDischarged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postItemDischarged.lua +3 -3
- package/dist/callbacks/subscriptions/postItemPickup.d.ts +6 -2
- package/dist/callbacks/subscriptions/postItemPickup.lua +3 -3
- package/dist/callbacks/subscriptions/postKnifeInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postKnifeInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postLaserInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postLaserInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postNPCInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postNPCInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postNPCStateChanged.d.ts +6 -2
- package/dist/callbacks/subscriptions/postNPCStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postNewLevelReordered.d.ts +1 -1
- package/dist/callbacks/subscriptions/postNewLevelReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postNewRoomEarly.d.ts +1 -1
- package/dist/callbacks/subscriptions/postNewRoomEarly.lua +3 -3
- package/dist/callbacks/subscriptions/postNewRoomReordered.d.ts +1 -1
- package/dist/callbacks/subscriptions/postNewRoomReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.d.ts +6 -2
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.lua +8 -4
- package/dist/callbacks/subscriptions/postPickupCollect.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPickupCollect.lua +3 -3
- package/dist/callbacks/subscriptions/postPickupInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPickupInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPickupStateChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPickupStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeType.d.ts +4 -2
- package/dist/callbacks/subscriptions/postPlayerChangeType.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitReordered.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postProjectileInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postProjectileInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPurchase.d.ts +6 -2
- package/dist/callbacks/subscriptions/postPurchase.lua +3 -3
- package/dist/callbacks/subscriptions/postRoomClearChanged.d.ts +3 -0
- package/dist/callbacks/subscriptions/postRoomClearChanged.lua +16 -0
- package/dist/callbacks/subscriptions/postSacrifice.d.ts +3 -1
- package/dist/callbacks/subscriptions/postSacrifice.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotAnimationChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotAnimationChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotDestroyed.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotDestroyed.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotInit.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotInit.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotRender.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotRender.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotUpdate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postTearInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postTearInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postTearInitVeryLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postTearInitVeryLate.lua +3 -3
- package/dist/callbacks/subscriptions/postTransformation.d.ts +5 -2
- package/dist/callbacks/subscriptions/postTransformation.lua +3 -3
- package/dist/callbacks/subscriptions/postTrinketBreak.d.ts +5 -2
- package/dist/callbacks/subscriptions/postTrinketBreak.lua +3 -3
- package/dist/callbacks/subscriptions/preBerserkDeath.d.ts +5 -2
- package/dist/callbacks/subscriptions/preBerserkDeath.lua +3 -3
- package/dist/callbacks/subscriptions/preCustomRevive.d.ts +3 -1
- package/dist/callbacks/subscriptions/preCustomRevive.lua +3 -3
- package/dist/callbacks/subscriptions/preItemPickup.d.ts +6 -2
- package/dist/callbacks/subscriptions/preItemPickup.lua +3 -3
- package/dist/callbacks/subscriptions/preNewLevel.d.ts +3 -1
- package/dist/callbacks/subscriptions/preNewLevel.lua +3 -3
- package/dist/classes/ModUpgraded.d.ts +5 -5
- package/dist/constants.d.ts +9 -43
- package/dist/constants.lua +16 -13
- package/dist/constantsMax.d.ts +16 -0
- package/dist/constantsMax.lua +27 -0
- package/dist/enums/CardType.lua +1 -1
- package/dist/enums/CollectiblePedestalType.lua +1 -1
- package/dist/enums/HealthType.d.ts +3 -3
- package/dist/enums/HealthType.lua +1 -2
- package/dist/enums/ModCallbacksCustom.d.ts +89 -59
- package/dist/enums/ModCallbacksCustom.lua +110 -107
- package/dist/enums/PillEffectClass.lua +1 -1
- package/dist/enums/PillEffectType.lua +1 -1
- package/dist/enums/PocketItemType.lua +1 -2
- package/dist/enums/SerializationType.lua +1 -2
- package/dist/enums/private/CopyableIsaacAPIClassType.d.ts +1 -1
- package/dist/enums/private/CopyableIsaacAPIClassType.lua +2 -3
- package/dist/enums/private/SaveDataKeys.d.ts +4 -4
- package/dist/enums/private/SaveDataKeys.lua +5 -6
- package/dist/enums/private/SerializationBrand.d.ts +3 -4
- package/dist/enums/private/SerializationBrand.lua +2 -15
- package/dist/features/characterHealthConversion.d.ts +2 -2
- package/dist/features/characterHealthConversion.lua +8 -4
- package/dist/features/characterStats.d.ts +4 -4
- package/dist/features/characterStats.lua +3 -1
- package/dist/features/debugDisplay.lua +12 -11
- package/dist/features/deployJSONRoom.d.ts +3 -3
- package/dist/features/deployJSONRoom.lua +35 -21
- package/dist/features/disableInputs.d.ts +1 -1
- package/dist/features/disableInputs.lua +6 -3
- package/dist/features/disableSound.lua +3 -1
- package/dist/features/extraConsoleCommands/commands.d.ts +5 -3
- package/dist/features/extraConsoleCommands/commands.lua +96 -56
- package/dist/features/extraConsoleCommands/commandsDisplay.lua +0 -1
- package/dist/features/extraConsoleCommands/commandsSubroutines.d.ts +1 -1
- package/dist/features/extraConsoleCommands/commandsSubroutines.lua +13 -10
- package/dist/features/extraConsoleCommands/init.lua +17 -9
- package/dist/features/extraConsoleCommands/v.lua +0 -1
- package/dist/features/fadeInRemover.lua +3 -2
- package/dist/features/fastReset.lua +7 -5
- package/dist/features/forgottenSwitch.lua +6 -3
- package/dist/features/getCollectibleItemPoolType.d.ts +1 -1
- package/dist/features/getCollectibleItemPoolType.lua +6 -2
- package/dist/features/isPonyActive.lua +5 -2
- package/dist/features/playerInventory.d.ts +1 -1
- package/dist/features/playerInventory.lua +7 -3
- package/dist/features/preventCollectibleRotate.d.ts +1 -1
- package/dist/features/preventCollectibleRotate.lua +9 -4
- package/dist/features/runInNFrames.lua +4 -2
- package/dist/features/saveDataManager/constants.lua +0 -1
- package/dist/features/saveDataManager/exports.d.ts +9 -8
- package/dist/features/saveDataManager/main.lua +11 -9
- package/dist/features/saveDataManager/maps.d.ts +5 -0
- package/dist/features/saveDataManager/merge.d.ts +1 -1
- package/dist/features/saveDataManager/merge.lua +2 -1
- package/dist/features/saveDataManager/serializationBrand.d.ts +1 -0
- package/dist/features/saveDataManager/serializationBrand.lua +17 -0
- package/dist/features/sirenHelpers.d.ts +1 -1
- package/dist/features/sirenHelpers.lua +5 -2
- package/dist/features/taintedLazarusPlayers.lua +6 -3
- package/dist/featuresInitialized.lua +0 -1
- package/dist/functions/array.d.ts +18 -2
- package/dist/functions/array.lua +29 -3
- package/dist/functions/bitwise.lua +0 -1
- package/dist/functions/boss.d.ts +1 -1
- package/dist/functions/boss.lua +12 -9
- package/dist/functions/cacheFlag.d.ts +2 -2
- package/dist/functions/cacheFlag.lua +0 -1
- package/dist/functions/cards.d.ts +9 -17
- package/dist/functions/cards.lua +22 -23
- package/dist/functions/challenges.d.ts +1 -1
- package/dist/functions/challenges.lua +0 -1
- package/dist/functions/character.d.ts +6 -4
- package/dist/functions/character.lua +16 -7
- package/dist/functions/charge.d.ts +1 -1
- package/dist/functions/charge.lua +14 -9
- package/dist/functions/chargeBar.lua +0 -1
- package/dist/functions/collectibleCacheFlag.d.ts +4 -4
- package/dist/functions/collectibleCacheFlag.lua +8 -5
- package/dist/functions/collectibleSet.d.ts +1 -1
- package/dist/functions/collectibleSet.lua +4 -5
- package/dist/functions/collectibleTag.d.ts +1 -2
- package/dist/functions/collectibleTag.lua +12 -10
- package/dist/functions/collectibles.d.ts +21 -28
- package/dist/functions/collectibles.lua +29 -26
- package/dist/functions/color.lua +9 -1
- package/dist/functions/debug.d.ts +12 -0
- package/dist/functions/debug.lua +3 -1
- package/dist/functions/deepCopy.d.ts +1 -1
- package/dist/functions/deepCopy.lua +4 -2
- package/dist/functions/direction.d.ts +4 -0
- package/dist/functions/direction.lua +17 -0
- package/dist/functions/doors.d.ts +12 -16
- package/dist/functions/doors.lua +34 -26
- package/dist/functions/easing.lua +0 -1
- package/dist/functions/entity.d.ts +4 -5
- package/dist/functions/entity.lua +4 -12
- package/dist/functions/entitySpecific.d.ts +35 -33
- package/dist/functions/entitySpecific.lua +20 -19
- package/dist/functions/enums.d.ts +70 -0
- package/dist/functions/enums.lua +71 -0
- package/dist/functions/familiars.d.ts +2 -2
- package/dist/functions/familiars.lua +0 -1
- package/dist/functions/flag.d.ts +42 -10
- package/dist/functions/flag.lua +31 -13
- package/dist/functions/flying.d.ts +2 -2
- package/dist/functions/flying.lua +20 -14
- package/dist/functions/globals.lua +5 -2
- package/dist/functions/gridEntity.d.ts +18 -16
- package/dist/functions/gridEntity.lua +39 -26
- package/dist/functions/input.d.ts +14 -4
- package/dist/functions/input.lua +38 -80
- package/dist/functions/jsonHelpers.d.ts +9 -7
- package/dist/functions/jsonHelpers.lua +0 -1
- package/dist/functions/kColor.lua +14 -3
- package/dist/functions/language.lua +9 -8
- package/dist/functions/log.d.ts +21 -15
- package/dist/functions/log.lua +61 -36
- package/dist/functions/math.d.ts +19 -8
- package/dist/functions/math.lua +33 -22
- package/dist/functions/mergeTests.lua +0 -1
- package/dist/functions/npc.d.ts +1 -1
- package/dist/functions/npc.lua +32 -16
- package/dist/functions/pickups.d.ts +10 -26
- package/dist/functions/pickups.lua +31 -29
- package/dist/functions/pills.d.ts +14 -13
- package/dist/functions/pills.lua +9 -3
- package/dist/functions/player.d.ts +11 -11
- package/dist/functions/player.lua +79 -66
- package/dist/functions/playerHealth.lua +19 -16
- package/dist/functions/playerIndex.d.ts +3 -3
- package/dist/functions/playerIndex.lua +9 -6
- package/dist/functions/pocketItems.d.ts +6 -1
- package/dist/functions/pocketItems.lua +30 -12
- package/dist/functions/positionVelocity.lua +4 -1
- package/dist/functions/random.d.ts +2 -3
- package/dist/functions/random.lua +0 -1
- package/dist/functions/revive.lua +18 -13
- package/dist/functions/roomData.d.ts +2 -2
- package/dist/functions/roomData.lua +11 -13
- package/dist/functions/roomGrid.d.ts +2 -2
- package/dist/functions/roomGrid.lua +0 -1
- package/dist/functions/roomShape.d.ts +2 -2
- package/dist/functions/rooms.d.ts +19 -14
- package/dist/functions/rooms.lua +42 -22
- package/dist/functions/run.d.ts +1 -1
- package/dist/functions/run.lua +3 -2
- package/dist/functions/seeds.d.ts +7 -0
- package/dist/functions/seeds.lua +7 -1
- package/dist/functions/sound.lua +4 -3
- package/dist/functions/spawnCollectible.d.ts +5 -5
- package/dist/functions/spawnCollectible.lua +7 -4
- package/dist/functions/sprite.d.ts +1 -1
- package/dist/functions/sprite.lua +3 -4
- package/dist/functions/stage.d.ts +4 -4
- package/dist/functions/stage.lua +3 -2
- package/dist/functions/string.d.ts +8 -1
- package/dist/functions/string.lua +10 -2
- package/dist/functions/tears.d.ts +4 -4
- package/dist/functions/tears.lua +0 -1
- package/dist/functions/transformations.d.ts +5 -3
- package/dist/functions/transformations.lua +31 -20
- package/dist/functions/trinketCacheFlag.d.ts +1 -1
- package/dist/functions/trinketCacheFlag.lua +8 -6
- package/dist/functions/trinketGive.d.ts +14 -3
- package/dist/functions/trinketGive.lua +46 -28
- package/dist/functions/trinketSet.d.ts +1 -1
- package/dist/functions/trinketSet.lua +4 -5
- package/dist/functions/trinkets.d.ts +8 -17
- package/dist/functions/trinkets.lua +17 -34
- package/dist/functions/ui.lua +7 -5
- package/dist/functions/utils.d.ts +1 -61
- package/dist/functions/utils.lua +3 -50
- package/dist/functions/vector.d.ts +1 -2
- package/dist/functions/vector.lua +8 -6
- package/dist/index.d.ts +4 -6
- package/dist/index.lua +17 -34
- package/dist/initCustomCallbacks.d.ts +2 -0
- package/dist/initCustomCallbacks.lua +133 -0
- package/dist/initFeatures.d.ts +3 -0
- package/dist/initFeatures.lua +54 -0
- package/dist/lualib_bundle.lua +14 -1
- package/dist/maps/cardMap.d.ts +1 -1
- package/dist/maps/characterMap.d.ts +1 -1
- package/dist/maps/collectibleDescriptionMap.d.ts +1 -1
- package/dist/maps/collectibleNameMap.d.ts +1 -1
- package/dist/maps/defaultPlayerStatMap.d.ts +1 -1
- package/dist/maps/defaultPlayerStatMap.lua +8 -6
- package/dist/maps/gridEntityTypeToBrokenStateMap.d.ts +1 -1
- package/dist/maps/gridEntityTypeToBrokenStateMap.lua +19 -12
- package/dist/maps/gridEntityXMLMap.d.ts +1 -1
- package/dist/maps/gridEntityXMLMap.lua +44 -34
- package/dist/maps/pillEffectMap.d.ts +1 -1
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.d.ts +1 -1
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.lua +7 -5
- package/dist/maps/roomTypeMap.d.ts +1 -1
- package/dist/maps/roomTypeMap.lua +37 -35
- package/dist/maps/trinketDescriptionMap.d.ts +1 -1
- package/dist/maps/trinketNameMap.d.ts +1 -1
- package/dist/objects/LRoomShapeToRectangles.d.ts +1 -1
- package/dist/objects/LRoomShapeToRectangles.lua +6 -5
- package/dist/objects/callbackRegisterFunctions.d.ts +2 -2
- package/dist/objects/callbackRegisterFunctions.lua +57 -52
- package/dist/objects/cardDescriptions.d.ts +1 -1
- package/dist/objects/cardDescriptions.lua +89 -90
- package/dist/objects/cardNames.d.ts +1 -1
- package/dist/objects/cardNames.lua +89 -90
- package/dist/objects/cardTypes.d.ts +3 -4
- package/dist/objects/cardTypes.lua +102 -104
- package/dist/objects/challengeNames.d.ts +1 -1
- package/dist/objects/challengeNames.lua +48 -48
- package/dist/objects/characterNames.d.ts +1 -1
- package/dist/objects/characterNames.lua +44 -44
- package/dist/objects/coinSubTypeToValue.d.ts +1 -1
- package/dist/objects/coinSubTypeToValue.lua +10 -8
- package/dist/objects/colors.lua +0 -1
- package/dist/objects/directionNames.d.ts +1 -1
- package/dist/objects/directionNames.lua +2 -1
- package/dist/objects/directionToDegrees.d.ts +1 -1
- package/dist/objects/directionToDegrees.lua +2 -1
- package/dist/objects/directionToVector.d.ts +1 -1
- package/dist/objects/directionToVector.lua +2 -1
- package/dist/objects/doorSlotFlagToDoorSlot.d.ts +5 -0
- package/dist/objects/doorSlotFlagToDoorSlot.lua +16 -0
- package/dist/objects/doorSlotToDirection.d.ts +1 -1
- package/dist/objects/doorSlotToDirection.lua +11 -10
- package/dist/objects/isaacAPIClassTypeToBrand.lua +1 -2
- package/dist/objects/isaacAPIClassTypeToCopyFunction.lua +1 -2
- package/dist/objects/pillEffectClasses.d.ts +3 -4
- package/dist/objects/pillEffectClasses.lua +55 -57
- package/dist/objects/pillEffectNames.d.ts +1 -1
- package/dist/objects/pillEffectNames.lua +52 -53
- package/dist/objects/pillEffectTypes.d.ts +3 -4
- package/dist/objects/pillEffectTypes.lua +54 -56
- package/dist/objects/roomShapeBounds.d.ts +1 -1
- package/dist/objects/roomShapeBounds.lua +14 -16
- package/dist/objects/roomShapeLayoutSizes.d.ts +1 -1
- package/dist/objects/roomShapeLayoutSizes.lua +14 -14
- package/dist/objects/roomShapeToBottomRightPosition.d.ts +1 -1
- package/dist/objects/roomShapeToBottomRightPosition.lua +14 -16
- package/dist/objects/roomShapeToDoorSlots.d.ts +1 -1
- package/dist/objects/roomShapeToDoorSlots.lua +35 -33
- package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.d.ts +2 -2
- package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.lua +68 -66
- package/dist/objects/roomShapeToGridWidth.d.ts +1 -1
- package/dist/objects/roomShapeToGridWidth.lua +14 -14
- package/dist/objects/roomShapeToTopLeftPosition.d.ts +1 -1
- package/dist/objects/roomShapeToTopLeftPosition.lua +14 -14
- package/dist/objects/roomShapeVolumes.d.ts +1 -1
- package/dist/objects/roomShapeVolumes.lua +14 -14
- package/dist/objects/roomTypeNames.d.ts +1 -1
- package/dist/objects/roomTypeNames.lua +32 -32
- package/dist/objects/serializedIsaacAPIClassTypeToIdentityFunction.lua +1 -2
- package/dist/objects/stageTypeToLetter.d.ts +1 -1
- package/dist/objects/stageTypeToLetter.lua +8 -7
- package/dist/objects/transformationNames.d.ts +1 -1
- package/dist/objects/transformationNames.lua +16 -17
- package/dist/patchErrorFunctions.lua +1 -2
- package/dist/sets/LRoomShapesSet.d.ts +1 -1
- package/dist/sets/LRoomShapesSet.lua +3 -1
- package/dist/sets/bossSets.lua +241 -211
- package/dist/sets/charactersThatStartWithAnActiveItemSet.d.ts +1 -1
- package/dist/sets/charactersThatStartWithAnActiveItemSet.lua +13 -11
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.d.ts +1 -1
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.lua +3 -1
- package/dist/sets/charactersWithFreeDevilDealsSet.d.ts +1 -1
- package/dist/sets/charactersWithFreeDevilDealsSet.lua +3 -1
- package/dist/sets/charactersWithNoRedHeartsSet.d.ts +1 -1
- package/dist/sets/charactersWithNoRedHeartsSet.lua +10 -8
- package/dist/sets/charactersWithNoSoulHeartsSet.d.ts +1 -1
- package/dist/sets/charactersWithNoSoulHeartsSet.lua +7 -5
- package/dist/sets/chestPickupVariantsSet.d.ts +1 -1
- package/dist/sets/chestPickupVariantsSet.lua +14 -12
- package/dist/sets/familiarsThatShootPlayerTearsSet.d.ts +1 -1
- package/dist/sets/familiarsThatShootPlayerTearsSet.lua +2 -0
- package/dist/sets/lostStyleCharactersSet.d.ts +1 -1
- package/dist/sets/lostStyleCharactersSet.lua +7 -5
- package/dist/sets/redHeartSubTypesSet.d.ts +1 -1
- package/dist/sets/redHeartSubTypesSet.lua +3 -1
- package/dist/sets/sinEntityTypesSet.d.ts +1 -1
- package/dist/sets/sinEntityTypesSet.lua +9 -7
- package/dist/sets/singleUseActiveCollectibleTypesSet.d.ts +1 -1
- package/dist/sets/singleUseActiveCollectibleTypesSet.lua +10 -8
- package/dist/sets/storyBossesSet.d.ts +1 -1
- package/dist/sets/storyBossesSet.lua +15 -13
- package/dist/types/AddCallbackParameterCustom.d.ts +123 -0
- package/dist/types/AddCallbackParameterCustom.lua +4 -0
- package/dist/types/AddCallbackParametersCustom.d.ts +120 -271
- package/dist/types/AnyEntity.lua +0 -1
- package/dist/types/CollectibleIndex.lua +0 -1
- package/dist/types/EntityTypeNonNPC.lua +0 -1
- package/dist/types/JSONDoor.lua +0 -1
- package/dist/types/JSONEntity.lua +0 -1
- package/dist/types/JSONRoom.lua +0 -1
- package/dist/types/JSONRooms.lua +0 -1
- package/dist/types/JSONSpawn.lua +0 -1
- package/dist/types/PickingUpItem.d.ts +1 -1
- package/dist/types/PickingUpItem.lua +5 -3
- package/dist/types/PlayerHealth.d.ts +1 -1
- package/dist/types/PlayerHealth.lua +0 -1
- package/dist/types/PlayerIndex.lua +0 -1
- package/dist/types/PocketItemDescription.d.ts +1 -1
- package/dist/types/PocketItemDescription.lua +0 -1
- package/dist/types/Primitive.lua +0 -1
- package/dist/types/TrinketSituation.d.ts +1 -1
- package/dist/types/TrinketSituation.lua +0 -1
- package/dist/types/private/IsaacAPIClass.lua +0 -1
- package/dist/types/private/SaveData.lua +0 -1
- package/dist/types/private/SerializedIsaacAPIClass.lua +0 -1
- package/dist/types/private/TSTLClass.lua +0 -1
- package/dist/types/private/TSTLClassMetatable.lua +0 -1
- package/dist/upgradeMod.d.ts +1 -1
- package/dist/upgradeMod.lua +5 -178
- package/package.json +11 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { ItemPoolType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to get the item pool type that a given collectible came from. Since there is no
|
|
4
4
|
* native method in the API to get this, we listen in the PreGetCollectible callback for item pool
|
|
@@ -3,6 +3,10 @@ local Map = ____lualib.Map
|
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local postPickupInitCollectible, v
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
8
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
9
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
6
10
|
local ____cachedClasses = require("cachedClasses")
|
|
7
11
|
local game = ____cachedClasses.game
|
|
8
12
|
local ____featuresInitialized = require("featuresInitialized")
|
|
@@ -23,11 +27,11 @@ local FEATURE_NAME = "get collectible item pool type"
|
|
|
23
27
|
v = {run = {collectibleItemPoolTypeMap = __TS__New(Map)}}
|
|
24
28
|
function ____exports.getCollectibleItemPoolTypeInit(self, mod)
|
|
25
29
|
saveDataManager(nil, "getCollectibleItemPoolType", v)
|
|
26
|
-
mod:AddCallback(
|
|
30
|
+
mod:AddCallback(ModCallback.POST_PICKUP_INIT, postPickupInitCollectible, PickupVariant.COLLECTIBLE)
|
|
27
31
|
end
|
|
28
32
|
function ____exports.getCollectibleItemPoolType(self, collectible)
|
|
29
33
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
30
|
-
if collectible.Type ~= EntityType.
|
|
34
|
+
if collectible.Type ~= EntityType.PICKUP or collectible.Variant ~= PickupVariant.COLLECTIBLE then
|
|
31
35
|
local entityID = getEntityID(nil, collectible)
|
|
32
36
|
error("The \"getCollectibleItemPoolType\" function was given a non-collectible: " .. entityID)
|
|
33
37
|
end
|
|
@@ -3,6 +3,9 @@ local Set = ____lualib.Set
|
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local postPEffectUpdateReordered, FLAGS_WHEN_PONY_IS_ACTIVE, v
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
8
|
+
local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
|
|
6
9
|
local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
|
|
7
10
|
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
8
11
|
local ____featuresInitialized = require("featuresInitialized")
|
|
@@ -18,7 +21,7 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
18
21
|
function postPEffectUpdateReordered(self, player)
|
|
19
22
|
local effects = player:GetEffects()
|
|
20
23
|
local entityFlags = player:GetEntityFlags()
|
|
21
|
-
local hasPonyCollectibleEffect = effects:HasCollectibleEffect(CollectibleType.
|
|
24
|
+
local hasPonyCollectibleEffect = effects:HasCollectibleEffect(CollectibleType.PONY) or effects:HasCollectibleEffect(CollectibleType.WHITE_PONY)
|
|
22
25
|
local isPonyActiveOnPreviousFrame = setHasPlayer(nil, v.run.playersIsPonyActive, player)
|
|
23
26
|
local hasPonyFlags = hasFlag(
|
|
24
27
|
nil,
|
|
@@ -33,7 +36,7 @@ function postPEffectUpdateReordered(self, player)
|
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
local FEATURE_NAME = "pony activation detector"
|
|
36
|
-
FLAGS_WHEN_PONY_IS_ACTIVE = {EntityFlag.
|
|
39
|
+
FLAGS_WHEN_PONY_IS_ACTIVE = {EntityFlag.NO_KNOCKBACK, EntityFlag.NO_PHYSICS_KNOCKBACK, EntityFlag.NO_DAMAGE_BLINK}
|
|
37
40
|
v = {run = {playersIsPonyActive = __TS__New(Set)}}
|
|
38
41
|
function ____exports.isPonyActiveInit(self, mod)
|
|
39
42
|
saveDataManager(nil, "isPonyActive", v)
|
|
@@ -5,6 +5,10 @@ local __TS__Iterator = ____lualib.__TS__Iterator
|
|
|
5
5
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local newPlayerInventory, useItemD4, postGameStarted, postItemPickup, addCollectibleToInventory, COLLECTIBLE_ITEM_TYPES, v
|
|
8
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
9
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
10
|
+
local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
|
|
11
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
8
12
|
local ____DefaultMap = require("classes.DefaultMap")
|
|
9
13
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
10
14
|
local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
|
|
@@ -79,7 +83,7 @@ function addCollectibleToInventory(self, player, collectibleType)
|
|
|
79
83
|
end
|
|
80
84
|
end
|
|
81
85
|
local FEATURE_NAME = "player inventory tracker"
|
|
82
|
-
COLLECTIBLE_ITEM_TYPES = __TS__New(Set, {ItemType.
|
|
86
|
+
COLLECTIBLE_ITEM_TYPES = __TS__New(Set, {ItemType.PASSIVE, ItemType.ACTIVE, ItemType.FAMILIAR})
|
|
83
87
|
v = {run = {
|
|
84
88
|
playersInventory = __TS__New(
|
|
85
89
|
DefaultMap,
|
|
@@ -92,8 +96,8 @@ v = {run = {
|
|
|
92
96
|
}}
|
|
93
97
|
function ____exports.playerInventoryInit(self, mod)
|
|
94
98
|
saveDataManager(nil, "playerInventory", v)
|
|
95
|
-
mod:AddCallback(
|
|
96
|
-
mod:AddCallback(
|
|
99
|
+
mod:AddCallback(ModCallback.POST_USE_ITEM, useItemD4, CollectibleType.D4)
|
|
100
|
+
mod:AddCallback(ModCallback.POST_GAME_STARTED, postGameStarted)
|
|
97
101
|
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_ITEM_PICKUP, postItemPickup)
|
|
98
102
|
end
|
|
99
103
|
function ____exports.getPlayerInventory(self, player, includeActiveCollectibles)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { CollectibleType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to prevent a collectible from being affected by Tainted Isaac's rotation
|
|
4
4
|
* mechanic. (This mechanic also happens from Glitched Crown and Binge Eater.) This is useful
|
|
@@ -3,6 +3,11 @@ local Map = ____lualib.Map
|
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local useCardSoulOfIsaac, postPickupUpdateCollectible, getMapIndex, v
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local Card = ____isaac_2Dtypescript_2Ddefinitions.Card
|
|
8
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
9
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
10
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
6
11
|
local ____cachedClasses = require("cachedClasses")
|
|
7
12
|
local game = ____cachedClasses.game
|
|
8
13
|
local ____featuresInitialized = require("featuresInitialized")
|
|
@@ -15,7 +20,7 @@ function useCardSoulOfIsaac(self)
|
|
|
15
20
|
v.room.trackedCollectibles:clear()
|
|
16
21
|
end
|
|
17
22
|
function postPickupUpdateCollectible(self, collectible)
|
|
18
|
-
if collectible.SubType == CollectibleType.
|
|
23
|
+
if collectible.SubType == CollectibleType.NULL then
|
|
19
24
|
return
|
|
20
25
|
end
|
|
21
26
|
local index = getMapIndex(nil, collectible)
|
|
@@ -33,12 +38,12 @@ local FEATURE_NAME = "prevent collectible rotation"
|
|
|
33
38
|
v = {room = {trackedCollectibles = __TS__New(Map)}}
|
|
34
39
|
function ____exports.preventCollectibleRotateInit(self, mod)
|
|
35
40
|
saveDataManager(nil, "preventCollectibleRotate", v)
|
|
36
|
-
mod:AddCallback(
|
|
37
|
-
mod:AddCallback(
|
|
41
|
+
mod:AddCallback(ModCallback.POST_USE_CARD, useCardSoulOfIsaac, Card.SOUL_ISAAC)
|
|
42
|
+
mod:AddCallback(ModCallback.POST_PICKUP_UPDATE, postPickupUpdateCollectible, PickupVariant.COLLECTIBLE)
|
|
38
43
|
end
|
|
39
44
|
function ____exports.preventCollectibleRotate(self, collectible, collectibleType)
|
|
40
45
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
41
|
-
if collectible.Variant ~=
|
|
46
|
+
if collectible.Variant ~= PickupVariant.COLLECTIBLE then
|
|
42
47
|
error("You cannot prevent the rotation for pickups of variant: " .. tostring(collectible.Variant))
|
|
43
48
|
end
|
|
44
49
|
local index = getMapIndex(nil, collectible)
|
|
@@ -3,6 +3,8 @@ local __TS__ArrayForEach = ____lualib.__TS__ArrayForEach
|
|
|
3
3
|
local __TS__ArraySplice = ____lualib.__TS__ArraySplice
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local postUpdate, postRender, checkExecuteQueuedFunctions, v
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
6
8
|
local ____cachedClasses = require("cachedClasses")
|
|
7
9
|
local game = ____cachedClasses.game
|
|
8
10
|
local ____featuresInitialized = require("featuresInitialized")
|
|
@@ -46,8 +48,8 @@ function ____exports.runInNFramesInit(self, mod)
|
|
|
46
48
|
v,
|
|
47
49
|
function() return false end
|
|
48
50
|
)
|
|
49
|
-
mod:AddCallback(
|
|
50
|
-
mod:AddCallback(
|
|
51
|
+
mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
|
|
52
|
+
mod:AddCallback(ModCallback.POST_RENDER, postRender)
|
|
51
53
|
end
|
|
52
54
|
function ____exports.runInNGameFrames(self, func, gameFrames)
|
|
53
55
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
@@ -51,7 +51,7 @@ import { SaveData } from "../../types/private/SaveData";
|
|
|
51
51
|
* ```
|
|
52
52
|
*
|
|
53
53
|
* - Save data is loaded from disk in the MC_POST_PLAYER_INIT callback (i.e. the first callback that
|
|
54
|
-
*
|
|
54
|
+
* can possibly run).
|
|
55
55
|
* - Save data is recorded to disk in the MC_PRE_GAME_EXIT callback.
|
|
56
56
|
*
|
|
57
57
|
* Note that before using the save data manager, you must call the [[`upgradeMod`]] function.
|
|
@@ -67,12 +67,12 @@ import { SaveData } from "../../types/private/SaveData";
|
|
|
67
67
|
*
|
|
68
68
|
* @param key The name of the file or feature that is submitting data to be managed by the save data
|
|
69
69
|
* manager. The save data manager will throw an error if the key is already registered.
|
|
70
|
-
* @param v An object that corresponds to the `SaveData` interface. The object is
|
|
71
|
-
*
|
|
70
|
+
* @param v An object that corresponds to the `SaveData` interface. The object is conventionally
|
|
71
|
+
* called "v" for brevity (which is short for "local variables").
|
|
72
72
|
* @param conditionalFunc An optional function to run upon saving this key to disk. For example,
|
|
73
|
-
* this allows features to only save data to disk if the feature is enabled. Specify a value of
|
|
74
|
-
*
|
|
75
|
-
*
|
|
73
|
+
* this allows features to only save data to disk if the feature is enabled. Specify a value of `()
|
|
74
|
+
* => false` to completely disable saving this feature to disk. This is useful if you are using data
|
|
75
|
+
* that is not serializable, or you want to use the save data manager to automatically reset
|
|
76
76
|
* variables on run/level/room, but not clutter the the "save#.dat" file with unnecessary keys.
|
|
77
77
|
*/
|
|
78
78
|
export declare function saveDataManager(key: string, v: SaveData, conditionalFunc?: () => boolean): void;
|
|
@@ -91,8 +91,9 @@ export declare function saveDataManagerLoad(): void;
|
|
|
91
91
|
*/
|
|
92
92
|
export declare function saveDataManagerSave(): void;
|
|
93
93
|
/**
|
|
94
|
-
* Sets the global variable of "g" equal to all of the save data variables for this mod.
|
|
95
|
-
* Sets the global variable of "gd" equal to all of the save data default variables for this mod.
|
|
94
|
+
* - Sets the global variable of "g" equal to all of the save data variables for this mod.
|
|
95
|
+
* - Sets the global variable of "gd" equal to all of the save data default variables for this mod.
|
|
96
|
+
*
|
|
96
97
|
* This can make debugging easier, as you can access the variables from the game's debug console.
|
|
97
98
|
* e.g. `l print(g.feature1.foo)`
|
|
98
99
|
*/
|
|
@@ -2,6 +2,8 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local Map = ____lualib.Map
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, mod, loadedDataOnThisRun
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
5
7
|
local ____cachedClasses = require("cachedClasses")
|
|
6
8
|
local game = ____cachedClasses.game
|
|
7
9
|
local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
|
|
@@ -50,18 +52,18 @@ function preGameExit(self)
|
|
|
50
52
|
loadedDataOnThisRun = false
|
|
51
53
|
end
|
|
52
54
|
function postNewLevel(self)
|
|
53
|
-
restoreDefaults(nil, SaveDataKeys.
|
|
55
|
+
restoreDefaults(nil, SaveDataKeys.LEVEL)
|
|
54
56
|
end
|
|
55
57
|
function postNewRoomEarly(self)
|
|
56
|
-
restoreDefaults(nil, SaveDataKeys.
|
|
58
|
+
restoreDefaults(nil, SaveDataKeys.ROOM)
|
|
57
59
|
end
|
|
58
60
|
function restoreDefaultsAll(self)
|
|
59
|
-
restoreDefaults(nil, SaveDataKeys.
|
|
60
|
-
restoreDefaults(nil, SaveDataKeys.
|
|
61
|
-
restoreDefaults(nil, SaveDataKeys.
|
|
61
|
+
restoreDefaults(nil, SaveDataKeys.RUN)
|
|
62
|
+
restoreDefaults(nil, SaveDataKeys.LEVEL)
|
|
63
|
+
restoreDefaults(nil, SaveDataKeys.ROOM)
|
|
62
64
|
end
|
|
63
65
|
function restoreDefaults(self, childTableName)
|
|
64
|
-
if childTableName ~= SaveDataKeys.
|
|
66
|
+
if childTableName ~= SaveDataKeys.RUN and childTableName ~= SaveDataKeys.LEVEL and childTableName ~= SaveDataKeys.ROOM then
|
|
65
67
|
error("Unknown child table name of: " .. childTableName)
|
|
66
68
|
end
|
|
67
69
|
for subscriberName, saveData in pairs(saveDataMap) do
|
|
@@ -96,9 +98,9 @@ mod = nil
|
|
|
96
98
|
loadedDataOnThisRun = false
|
|
97
99
|
function ____exports.saveDataManagerInit(self, incomingMod)
|
|
98
100
|
mod = incomingMod
|
|
99
|
-
mod:AddCallback(
|
|
100
|
-
mod:AddCallback(
|
|
101
|
-
mod:AddCallback(
|
|
101
|
+
mod:AddCallback(ModCallback.POST_PLAYER_INIT, postPlayerInit)
|
|
102
|
+
mod:AddCallback(ModCallback.PRE_GAME_EXIT, preGameExit)
|
|
103
|
+
mod:AddCallback(ModCallback.POST_NEW_LEVEL, postNewLevel)
|
|
102
104
|
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_NEW_ROOM_EARLY, postNewRoomEarly)
|
|
103
105
|
end
|
|
104
106
|
function ____exports.forceSaveDataManagerSave(self)
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/// <reference types="typescript-to-lua/language-extensions" />
|
|
2
2
|
import { SaveData } from "../../types/private/SaveData";
|
|
3
|
+
/**
|
|
4
|
+
* The save data map is indexed by subscriber name. We use Lua tables instead of TypeScriptToLua
|
|
5
|
+
* Maps for the master map so that we can access the variables via the in-game console when
|
|
6
|
+
* debugging. (TSTL Maps don't expose the map keys as normal keys.)
|
|
7
|
+
*/
|
|
3
8
|
export declare const saveDataMap: LuaTable<string, SaveData>;
|
|
4
9
|
export declare const saveDataDefaultsMap: LuaTable<string, SaveData>;
|
|
5
10
|
export declare const saveDataConditionalFuncMap: Map<string, () => boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="typescript-to-lua/language-extensions" />
|
|
2
2
|
/**
|
|
3
|
-
* merge takes the values from a new table and recursively merges them into an old object (while
|
|
3
|
+
* `merge` takes the values from a new table and recursively merges them into an old object (while
|
|
4
4
|
* performing appropriate deserialization).
|
|
5
5
|
*
|
|
6
6
|
* It supports the following object types:
|
|
@@ -5,7 +5,6 @@ local Set = ____lualib.Set
|
|
|
5
5
|
local ____exports = {}
|
|
6
6
|
local mergeArray, mergeTSTLObject, mergeTable
|
|
7
7
|
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
8
|
-
local isSerializationBrand = ____SerializationBrand.isSerializationBrand
|
|
9
8
|
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
10
9
|
local ____SerializationType = require("enums.SerializationType")
|
|
11
10
|
local SerializationType = ____SerializationType.SerializationType
|
|
@@ -24,6 +23,8 @@ local ____utils = require("functions.utils")
|
|
|
24
23
|
local getTraversalDescription = ____utils.getTraversalDescription
|
|
25
24
|
local ____constants = require("features.saveDataManager.constants")
|
|
26
25
|
local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
|
|
26
|
+
local ____serializationBrand = require("features.saveDataManager.serializationBrand")
|
|
27
|
+
local isSerializationBrand = ____serializationBrand.isSerializationBrand
|
|
27
28
|
function ____exports.merge(self, oldObject, newTable, traversalDescription)
|
|
28
29
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
29
30
|
log("merge is traversing: " .. traversalDescription)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function isSerializationBrand(key: unknown): boolean;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Set = ____lualib.Set
|
|
3
|
+
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
6
|
+
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
7
|
+
local ____enums = require("functions.enums")
|
|
8
|
+
local getEnumValues = ____enums.getEnumValues
|
|
9
|
+
local SERIALIZATION_BRANDS = getEnumValues(nil, SerializationBrand)
|
|
10
|
+
local SERIALIZATION_BRAND_SET = __TS__New(Set, SERIALIZATION_BRANDS)
|
|
11
|
+
function ____exports.isSerializationBrand(self, key)
|
|
12
|
+
if type(key) ~= "string" then
|
|
13
|
+
return false
|
|
14
|
+
end
|
|
15
|
+
return SERIALIZATION_BRAND_SET:has(key)
|
|
16
|
+
end
|
|
17
|
+
return ____exports
|
|
@@ -2,6 +2,9 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local postNPCInitSirenHelper, checkReturnFamiliarToPlayer, blacklistEntryExists, getSirenHelper, v
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
7
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
5
8
|
local ____featuresInitialized = require("featuresInitialized")
|
|
6
9
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
7
10
|
local ____entity = require("functions.entity")
|
|
@@ -39,7 +42,7 @@ function blacklistEntryExists(self, incomingFamiliarVariant, incomingFamiliarSub
|
|
|
39
42
|
end
|
|
40
43
|
function getSirenHelper(self, familiar)
|
|
41
44
|
local familiarPtrHash = GetPtrHash(familiar)
|
|
42
|
-
local sirenHelpers = getEntities(nil, EntityType.
|
|
45
|
+
local sirenHelpers = getEntities(nil, EntityType.SIREN_HELPER)
|
|
43
46
|
return __TS__ArrayFind(
|
|
44
47
|
sirenHelpers,
|
|
45
48
|
function(____, sirenHelper) return sirenHelper.Target ~= nil and GetPtrHash(sirenHelper.Target) == familiarPtrHash end
|
|
@@ -49,7 +52,7 @@ local FEATURE_NAME = "siren helpers"
|
|
|
49
52
|
v = {run = {familiarBlacklist = {}}}
|
|
50
53
|
function ____exports.sirenHelpersInit(self, mod)
|
|
51
54
|
saveDataManager(nil, "sirenHelpers", v)
|
|
52
|
-
mod:AddCallback(
|
|
55
|
+
mod:AddCallback(ModCallback.POST_NPC_INIT, postNPCInitSirenHelper, EntityType.SIREN_HELPER)
|
|
53
56
|
end
|
|
54
57
|
function ____exports.setFamiliarNoSirenSteal(self, familiarVariant, familiarSubType)
|
|
55
58
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
@@ -3,6 +3,9 @@ local Map = ____lualib.Map
|
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local postPlayerInit, checkDequeue, v
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
8
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
6
9
|
local ____featuresInitialized = require("featuresInitialized")
|
|
7
10
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
8
11
|
local ____exports = require("features.saveDataManager.exports")
|
|
@@ -10,10 +13,10 @@ local saveDataManager = ____exports.saveDataManager
|
|
|
10
13
|
function postPlayerInit(self, player)
|
|
11
14
|
local entityPtr = EntityPtr(player)
|
|
12
15
|
local character = player:GetPlayerType()
|
|
13
|
-
if character == PlayerType.
|
|
16
|
+
if character == PlayerType.LAZARUS_B then
|
|
14
17
|
local ____v_run_queuedTaintedLazarus_0 = v.run.queuedTaintedLazarus
|
|
15
18
|
____v_run_queuedTaintedLazarus_0[#____v_run_queuedTaintedLazarus_0 + 1] = entityPtr
|
|
16
|
-
elseif character == PlayerType.
|
|
19
|
+
elseif character == PlayerType.LAZARUS_2_B then
|
|
17
20
|
local ____v_run_queuedDeadTaintedLazarus_1 = v.run.queuedDeadTaintedLazarus
|
|
18
21
|
____v_run_queuedDeadTaintedLazarus_1[#____v_run_queuedDeadTaintedLazarus_1 + 1] = entityPtr
|
|
19
22
|
else
|
|
@@ -53,7 +56,7 @@ function ____exports.taintedLazarusPlayersInit(self, mod)
|
|
|
53
56
|
v,
|
|
54
57
|
function() return false end
|
|
55
58
|
)
|
|
56
|
-
mod:AddCallback(
|
|
59
|
+
mod:AddCallback(ModCallback.POST_PLAYER_INIT, postPlayerInit)
|
|
57
60
|
end
|
|
58
61
|
function ____exports.getTaintedLazarusSubPlayer(self, player)
|
|
59
62
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
@@ -53,8 +53,18 @@ export declare function combineArrays<T>(...arrays: Array<T[] | readonly T[]>):
|
|
|
53
53
|
*/
|
|
54
54
|
export declare function copyArray<T>(oldArray: T[] | readonly T[], numElements?: int): T[];
|
|
55
55
|
export declare function emptyArray<T>(array: T[]): void;
|
|
56
|
-
/**
|
|
57
|
-
|
|
56
|
+
/**
|
|
57
|
+
* Helper function to get an array containing the indexes of an array.
|
|
58
|
+
*
|
|
59
|
+
* For example, an array of `["Apple", "Banana"]` would return an array of: `[0, 1]`
|
|
60
|
+
*/
|
|
61
|
+
export declare function getArrayIndexes<T>(array: T[] | readonly T[]): int[];
|
|
62
|
+
/**
|
|
63
|
+
* Helper function to return the last element of an array.
|
|
64
|
+
*
|
|
65
|
+
* If the array is empty, this will return undefined.
|
|
66
|
+
*/
|
|
67
|
+
export declare function getLastElement<T>(array: T[]): T | undefined;
|
|
58
68
|
/**
|
|
59
69
|
* Helper function to get a random element from the provided array.
|
|
60
70
|
*
|
|
@@ -99,6 +109,12 @@ export declare function initArray<T>(defaultValue: T, size: int): T[];
|
|
|
99
109
|
* - the table has no keys (i.e. an "empty" table)
|
|
100
110
|
*/
|
|
101
111
|
export declare function isArray(object: unknown): object is unknown[];
|
|
112
|
+
/**
|
|
113
|
+
* Helper function to see if every element in the array is N + 1.
|
|
114
|
+
*
|
|
115
|
+
* For example, `[2, 3, 4]` would return true, and `[2, 3, 5]` would return false.
|
|
116
|
+
*/
|
|
117
|
+
export declare function isArrayContiguous(array: int[]): boolean;
|
|
102
118
|
/** Checks if an array is in the provided 2-dimensional array. */
|
|
103
119
|
export declare function isArrayInArray<T>(arrayToMatch: T[] | readonly T[], parentArray: Array<T[] | readonly T[]>): boolean;
|
|
104
120
|
/**
|
package/dist/functions/array.lua
CHANGED
|
@@ -11,10 +11,14 @@ local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
|
11
11
|
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
12
12
|
local __TS__ArrayReduce = ____lualib.__TS__ArrayReduce
|
|
13
13
|
local ____exports = {}
|
|
14
|
+
local ____math = require("functions.math")
|
|
15
|
+
local erange = ____math.erange
|
|
14
16
|
local ____random = require("functions.random")
|
|
15
17
|
local getRandomInt = ____random.getRandomInt
|
|
16
18
|
local ____rng = require("functions.rng")
|
|
17
19
|
local getRandomSeed = ____rng.getRandomSeed
|
|
20
|
+
local isRNG = ____rng.isRNG
|
|
21
|
+
local newRNG = ____rng.newRNG
|
|
18
22
|
local ____utils = require("functions.utils")
|
|
19
23
|
local ____repeat = ____utils["repeat"]
|
|
20
24
|
function ____exports.getRandomArrayIndex(self, array, seedOrRNG)
|
|
@@ -32,9 +36,10 @@ function ____exports.shuffleArrayInPlace(self, array, seedOrRNG)
|
|
|
32
36
|
end
|
|
33
37
|
local currentIndex = #array
|
|
34
38
|
local randomIndex
|
|
39
|
+
local rng = isRNG(nil, seedOrRNG) and seedOrRNG or newRNG(nil, seedOrRNG)
|
|
35
40
|
while currentIndex > 0 do
|
|
36
41
|
currentIndex = currentIndex - 1
|
|
37
|
-
randomIndex = ____exports.getRandomArrayIndex(nil, array,
|
|
42
|
+
randomIndex = ____exports.getRandomArrayIndex(nil, array, rng)
|
|
38
43
|
local ____temp_0 = {array[randomIndex + 1], array[currentIndex + 1]}
|
|
39
44
|
array[currentIndex + 1] = ____temp_0[1]
|
|
40
45
|
array[randomIndex + 1] = ____temp_0[2]
|
|
@@ -138,7 +143,9 @@ function ____exports.copyArray(self, oldArray, numElements)
|
|
|
138
143
|
local i = 0
|
|
139
144
|
while i < numElements do
|
|
140
145
|
local oldElement = oldArray[i + 1]
|
|
141
|
-
|
|
146
|
+
if oldElement ~= nil then
|
|
147
|
+
newArray[#newArray + 1] = oldElement
|
|
148
|
+
end
|
|
142
149
|
i = i + 1
|
|
143
150
|
end
|
|
144
151
|
end
|
|
@@ -147,6 +154,9 @@ end
|
|
|
147
154
|
function ____exports.emptyArray(self, array)
|
|
148
155
|
__TS__ArraySplice(array, 0, #array)
|
|
149
156
|
end
|
|
157
|
+
function ____exports.getArrayIndexes(self, array)
|
|
158
|
+
return erange(nil, #array)
|
|
159
|
+
end
|
|
150
160
|
function ____exports.getLastElement(self, array)
|
|
151
161
|
return array[#array]
|
|
152
162
|
end
|
|
@@ -166,7 +176,11 @@ function ____exports.getRandomArrayElement(self, array, seedOrRNG, exceptions)
|
|
|
166
176
|
table.unpack(exceptions)
|
|
167
177
|
)
|
|
168
178
|
local randomIndex = ____exports.getRandomArrayIndex(nil, arrayWithoutExceptions, seedOrRNG)
|
|
169
|
-
|
|
179
|
+
local randomElement = arrayWithoutExceptions[randomIndex + 1]
|
|
180
|
+
if randomElement == nil then
|
|
181
|
+
error(("Failed to get a random array element since the random index of " .. tostring(randomIndex)) .. " was not valid.")
|
|
182
|
+
end
|
|
183
|
+
return randomElement
|
|
170
184
|
end
|
|
171
185
|
function ____exports.getRandomArrayElementAndRemove(self, array, seedOrRNG, exceptions)
|
|
172
186
|
if seedOrRNG == nil then
|
|
@@ -221,6 +235,18 @@ function ____exports.isArray(self, object)
|
|
|
221
235
|
end
|
|
222
236
|
return true
|
|
223
237
|
end
|
|
238
|
+
function ____exports.isArrayContiguous(self, array)
|
|
239
|
+
local lastValue = nil
|
|
240
|
+
for ____, element in ipairs(array) do
|
|
241
|
+
if lastValue == nil then
|
|
242
|
+
lastValue = element - 1
|
|
243
|
+
end
|
|
244
|
+
if element ~= lastValue - 1 then
|
|
245
|
+
return false
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
return true
|
|
249
|
+
end
|
|
224
250
|
function ____exports.isArrayInArray(self, arrayToMatch, parentArray)
|
|
225
251
|
return __TS__ArraySome(
|
|
226
252
|
parentArray,
|
package/dist/functions/boss.d.ts
CHANGED
package/dist/functions/boss.lua
CHANGED
|
@@ -4,6 +4,9 @@ local __TS__New = ____lualib.__TS__New
|
|
|
4
4
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
5
5
|
local ____exports = {}
|
|
6
6
|
local getNumBossSegments, DEFAULT_BOSS_MULTI_SEGMENTS
|
|
7
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
9
|
+
local LokiVariant = ____isaac_2Dtypescript_2Ddefinitions.LokiVariant
|
|
7
10
|
local ____constants = require("constants")
|
|
8
11
|
local VectorZero = ____constants.VectorZero
|
|
9
12
|
local ____bossSets = require("sets.bossSets")
|
|
@@ -27,19 +30,19 @@ function getNumBossSegments(self, entityType, variant, numSegments)
|
|
|
27
30
|
end
|
|
28
31
|
repeat
|
|
29
32
|
local ____switch18 = entityType
|
|
30
|
-
local ____cond18 = ____switch18 == EntityType.
|
|
33
|
+
local ____cond18 = ____switch18 == EntityType.CHUB
|
|
31
34
|
if ____cond18 then
|
|
32
35
|
do
|
|
33
36
|
return 3
|
|
34
37
|
end
|
|
35
38
|
end
|
|
36
|
-
____cond18 = ____cond18 or ____switch18 == EntityType.
|
|
39
|
+
____cond18 = ____cond18 or ____switch18 == EntityType.LOKI
|
|
37
40
|
if ____cond18 then
|
|
38
41
|
do
|
|
39
|
-
return variant ==
|
|
42
|
+
return variant == LokiVariant.LOKII and 2 or 1
|
|
40
43
|
end
|
|
41
44
|
end
|
|
42
|
-
____cond18 = ____cond18 or ____switch18 == EntityType.
|
|
45
|
+
____cond18 = ____cond18 or ____switch18 == EntityType.GURGLING
|
|
43
46
|
if ____cond18 then
|
|
44
47
|
do
|
|
45
48
|
return 2
|
|
@@ -53,11 +56,11 @@ function getNumBossSegments(self, entityType, variant, numSegments)
|
|
|
53
56
|
until true
|
|
54
57
|
end
|
|
55
58
|
local BOSSES_THAT_REQUIRE_MULTIPLE_SPAWNS = __TS__New(Set, {
|
|
56
|
-
EntityType.
|
|
57
|
-
EntityType.
|
|
58
|
-
EntityType.
|
|
59
|
-
EntityType.
|
|
60
|
-
EntityType.
|
|
59
|
+
EntityType.LARRY_JR,
|
|
60
|
+
EntityType.CHUB,
|
|
61
|
+
EntityType.LOKI,
|
|
62
|
+
EntityType.GURGLING,
|
|
63
|
+
EntityType.TURDLET
|
|
61
64
|
})
|
|
62
65
|
DEFAULT_BOSS_MULTI_SEGMENTS = 4
|
|
63
66
|
function ____exports.getAliveBosses(self, matchingEntityType, matchingVariant, matchingSubType, ignoreFriendly)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { CacheFlag } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Returns the starting stat that Isaac (the default character) starts with. For example, if you
|
|
4
|
-
* pass this function `CacheFlag.
|
|
4
|
+
* pass this function `CacheFlag.DAMAGE`, it will return 3.5.
|
|
5
5
|
*
|
|
6
6
|
* Note that the default fire delay is represented in the tear stat, not the `MaxFireDelay` value.
|
|
7
7
|
*/
|