isaacscript-common 1.2.292 → 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 +16 -10
- 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 +4 -2
- package/dist/callbacks/postGridEntityCollision.lua +5 -2
- package/dist/callbacks/postHolyMantleRemoved.lua +3 -1
- package/dist/callbacks/postItemDischarged.lua +10 -5
- 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.lua +4 -3
- 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 -2
- package/dist/callbacks/subscriptions/postGridEntityStateChanged.lua +3 -3
- 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 -2
- package/dist/callbacks/subscriptions/postHolyMantleRemoved.lua +16 -4
- 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 -1
- package/dist/callbacks/subscriptions/postRoomClearChanged.lua +3 -3
- 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 +56 -48
- package/dist/enums/ModCallbacksCustom.lua +47 -46
- 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 +1 -1
- package/dist/functions/pocketItems.lua +21 -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.lua +3 -1
- package/dist/initFeatures.lua +0 -1
- 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 +3 -1
- 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 -277
- 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/package.json +9 -6
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
[](https://www.npmjs.com/package/isaacscript-common)
|
|
2
|
-
|
|
3
1
|
# isaacscript-common
|
|
4
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/isaacscript-common)
|
|
4
|
+
|
|
5
5
|
This repository contains helper functions and extra features for IsaacScript mods. You can browse the auto-generated documentation [here](https://isaacscript.github.io/isaacscript-common/index.html).
|
|
6
6
|
|
|
7
7
|
For more information about IsaacScript, see the [official website](https://isaacscript.github.io/).
|
package/dist/cachedClasses.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const game: Game;
|
|
|
16
16
|
* Caching the results of a this constructor is safe, but caching other classes (like `Level` or
|
|
17
17
|
* `Room`) is not safe and can lead to the game crashing in certain situations.
|
|
18
18
|
*/
|
|
19
|
-
export declare const itemConfig: ItemConfig;
|
|
19
|
+
export declare const itemConfig: import("isaac-typescript-definitions/dist/types/ItemConfig").ItemConfig;
|
|
20
20
|
/**
|
|
21
21
|
* A cached version of the class returned from the `MusicManager()` constructor.
|
|
22
22
|
*
|
package/dist/cachedClasses.lua
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
3
2
|
local hasSubscriptions, postRender, postNewRoom, postPEffectUpdateReordered, checkWaitingForItemAnimation, postPlayerFatalDamage, preBerserkDeath, playerIsAboutToDie, logStateChanged, DEBUG, CustomReviveState, v
|
|
3
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
4
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
5
|
+
local FamiliarVariant = ____isaac_2Dtypescript_2Ddefinitions.FamiliarVariant
|
|
6
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
7
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
8
|
+
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
4
9
|
local ____cachedClasses = require("cachedClasses")
|
|
5
10
|
local sfxManager = ____cachedClasses.sfxManager
|
|
6
11
|
local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
|
|
@@ -34,7 +39,7 @@ function postRender(self)
|
|
|
34
39
|
if v.run.state ~= CustomReviveState.WAITING_FOR_ITEM_ANIMATION then
|
|
35
40
|
return
|
|
36
41
|
end
|
|
37
|
-
sfxManager:Stop(SoundEffect.
|
|
42
|
+
sfxManager:Stop(SoundEffect.ONE_UP)
|
|
38
43
|
end
|
|
39
44
|
function postNewRoom(self)
|
|
40
45
|
if v.run.state ~= CustomReviveState.WAITING_FOR_ROOM_TRANSITION then
|
|
@@ -58,7 +63,7 @@ function checkWaitingForItemAnimation(self, player)
|
|
|
58
63
|
return
|
|
59
64
|
end
|
|
60
65
|
local playerToCheckHoldingItem = player
|
|
61
|
-
if isCharacter(nil, player, PlayerType.
|
|
66
|
+
if isCharacter(nil, player, PlayerType.THE_SOUL_B) then
|
|
62
67
|
local forgottenBody = player:GetOtherTwin()
|
|
63
68
|
if forgottenBody ~= nil then
|
|
64
69
|
playerToCheckHoldingItem = forgottenBody
|
|
@@ -96,9 +101,9 @@ function playerIsAboutToDie(self, player)
|
|
|
96
101
|
v.run.revivalType = revivalType
|
|
97
102
|
v.run.dyingPlayerIndex = getPlayerIndex(nil, player)
|
|
98
103
|
logStateChanged(nil)
|
|
99
|
-
player:AddCollectible(CollectibleType.
|
|
104
|
+
player:AddCollectible(CollectibleType.ONE_UP, 0, false)
|
|
100
105
|
removeAllFamiliars(nil, FamiliarVariant.ONE_UP)
|
|
101
|
-
removeCollectibleFromItemTracker(nil, CollectibleType.
|
|
106
|
+
removeCollectibleFromItemTracker(nil, CollectibleType.ONE_UP)
|
|
102
107
|
local playerIndex = getPlayerIndex(nil, player)
|
|
103
108
|
runNextGameFrame(
|
|
104
109
|
nil,
|
|
@@ -117,7 +122,7 @@ function playerIsAboutToDie(self, player)
|
|
|
117
122
|
end
|
|
118
123
|
function logStateChanged(self)
|
|
119
124
|
if DEBUG then
|
|
120
|
-
log(((("Custom revive state changed: " .. CustomReviveState[v.run.state]) .. " (") .. tostring(v.run.state)) .. ")")
|
|
125
|
+
log(((("Custom revive state changed: " .. tostring(CustomReviveState[v.run.state])) .. " (") .. tostring(v.run.state)) .. ")")
|
|
121
126
|
end
|
|
122
127
|
end
|
|
123
128
|
DEBUG = false
|
|
@@ -131,8 +136,8 @@ CustomReviveState[CustomReviveState.WAITING_FOR_ITEM_ANIMATION] = "WAITING_FOR_I
|
|
|
131
136
|
v = {run = {state = CustomReviveState.DISABLED, revivalType = nil, dyingPlayerIndex = nil}}
|
|
132
137
|
function ____exports.customReviveCallbacksInit(self, mod)
|
|
133
138
|
saveDataManager(nil, "customRevive", v, hasSubscriptions)
|
|
134
|
-
mod:AddCallback(
|
|
135
|
-
mod:AddCallback(
|
|
139
|
+
mod:AddCallback(ModCallback.POST_RENDER, postRender)
|
|
140
|
+
mod:AddCallback(ModCallback.POST_NEW_ROOM, postNewRoom)
|
|
136
141
|
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
137
142
|
mod:AddCallbackCustom(ModCallbacksCustom.MC_POST_PLAYER_FATAL_DAMAGE, postPlayerFatalDamage)
|
|
138
143
|
mod:AddCallbackCustom(ModCallbacksCustom.MC_PRE_BERSERK_DEATH, preBerserkDeath)
|
|
@@ -2,6 +2,8 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__New = ____lualib.__TS__New
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local hasSubscriptions, postPEffectUpdateReordered, queueEmpty, queueNotEmpty, v
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
5
7
|
local ____DefaultMap = require("classes.DefaultMap")
|
|
6
8
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
7
9
|
local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
|
|
@@ -34,7 +36,7 @@ function postPEffectUpdateReordered(self, player)
|
|
|
34
36
|
end
|
|
35
37
|
end
|
|
36
38
|
function queueEmpty(self, player, pickingUpItem)
|
|
37
|
-
if pickingUpItem.subType == CollectibleType.
|
|
39
|
+
if pickingUpItem.subType == CollectibleType.NULL then
|
|
38
40
|
return
|
|
39
41
|
end
|
|
40
42
|
postItemPickupFire(nil, player, pickingUpItem)
|
|
@@ -3,6 +3,8 @@ local Set = ____lualib.Set
|
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local hasSubscriptions, postBombUpdate, v
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
6
8
|
local ____exports = require("features.saveDataManager.exports")
|
|
7
9
|
local saveDataManager = ____exports.saveDataManager
|
|
8
10
|
local ____postBombInitLate = require("callbacks.subscriptions.postBombInitLate")
|
|
@@ -24,6 +26,6 @@ end
|
|
|
24
26
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
25
27
|
function ____exports.postBombInitLateCallbackInit(self, mod)
|
|
26
28
|
saveDataManager(nil, "postBombInitLate", v, hasSubscriptions)
|
|
27
|
-
mod:AddCallback(
|
|
29
|
+
mod:AddCallback(ModCallback.POST_BOMB_UPDATE, postBombUpdate)
|
|
28
30
|
end
|
|
29
31
|
return ____exports
|
|
@@ -4,6 +4,9 @@ local __TS__New = ____lualib.__TS__New
|
|
|
4
4
|
local Map = ____lualib.Map
|
|
5
5
|
local ____exports = {}
|
|
6
6
|
local hasSubscriptions, postKnifeRender, postKnifeRenderBoneClub, boneClubAnimationChanged, BONE_SWING_ANIMATIONS, v
|
|
7
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
|
+
local KnifeVariant = ____isaac_2Dtypescript_2Ddefinitions.KnifeVariant
|
|
9
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
7
10
|
local ____exports = require("features.saveDataManager.exports")
|
|
8
11
|
local saveDataManager = ____exports.saveDataManager
|
|
9
12
|
local ____postBoneSwing = require("callbacks.subscriptions.postBoneSwing")
|
|
@@ -16,7 +19,7 @@ function postKnifeRender(self, knife)
|
|
|
16
19
|
if not hasSubscriptions(nil) then
|
|
17
20
|
return
|
|
18
21
|
end
|
|
19
|
-
if knife.Variant ~=
|
|
22
|
+
if knife.Variant ~= KnifeVariant.BONE_CLUB then
|
|
20
23
|
return
|
|
21
24
|
end
|
|
22
25
|
postKnifeRenderBoneClub(nil, knife)
|
|
@@ -40,6 +43,6 @@ BONE_SWING_ANIMATIONS = __TS__New(Set, {"Swing", "Swing2", "Spin"})
|
|
|
40
43
|
v = {room = {boneClubAnimations = __TS__New(Map)}}
|
|
41
44
|
function ____exports.postBoneSwingCallbackInit(self, mod)
|
|
42
45
|
saveDataManager(nil, "postBoneSwing", v, hasSubscriptions)
|
|
43
|
-
mod:AddCallback(
|
|
46
|
+
mod:AddCallback(ModCallback.POST_KNIFE_RENDER, postKnifeRender)
|
|
44
47
|
end
|
|
45
48
|
return ____exports
|
|
@@ -3,6 +3,9 @@ local Set = ____lualib.Set
|
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local hasSubscriptions, postPickupInitCollectible, v
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
8
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
6
9
|
local ____exports = require("features.saveDataManager.exports")
|
|
7
10
|
local saveDataManager = ____exports.saveDataManager
|
|
8
11
|
local ____collectibles = require("functions.collectibles")
|
|
@@ -24,6 +27,6 @@ end
|
|
|
24
27
|
v = {run = {seenCollectibles = __TS__New(Set)}}
|
|
25
28
|
function ____exports.postCollectibleInitFirstCallbackInit(self, mod)
|
|
26
29
|
saveDataManager(nil, "postCollectibleInitFirst", v, hasSubscriptions)
|
|
27
|
-
mod:AddCallback(
|
|
30
|
+
mod:AddCallback(ModCallback.POST_PICKUP_INIT, postPickupInitCollectible, PickupVariant.COLLECTIBLE)
|
|
28
31
|
end
|
|
29
32
|
return ____exports
|
|
@@ -3,6 +3,14 @@ local Map = ____lualib.Map
|
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local hasSubscriptions, entityTakeDmgPlayer, setDamageFrame, isPotentialNaturalTeleportFromSacrificeRoom, incrementNumSacrifices, postPlayerRenderPlayer, playerIsTeleportingFromCursedTeleport, v
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
8
|
+
local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
|
|
9
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
10
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
11
|
+
local PlayerVariant = ____isaac_2Dtypescript_2Ddefinitions.PlayerVariant
|
|
12
|
+
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
13
|
+
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
6
14
|
local ____cachedClasses = require("cachedClasses")
|
|
7
15
|
local game = ____cachedClasses.game
|
|
8
16
|
local ____exports = require("features.saveDataManager.exports")
|
|
@@ -49,14 +57,14 @@ end
|
|
|
49
57
|
function isPotentialNaturalTeleportFromSacrificeRoom(self, damageFlags)
|
|
50
58
|
local room = game:GetRoom()
|
|
51
59
|
local roomType = room:GetType()
|
|
52
|
-
local isSpikeDamage = hasFlag(nil, damageFlags, DamageFlag.
|
|
53
|
-
return roomType == RoomType.
|
|
60
|
+
local isSpikeDamage = hasFlag(nil, damageFlags, DamageFlag.SPIKES)
|
|
61
|
+
return roomType == RoomType.SACRIFICE and isSpikeDamage and (v.level.numSacrifices == 6 or v.level.numSacrifices >= 12)
|
|
54
62
|
end
|
|
55
63
|
function incrementNumSacrifices(self, damageFlags)
|
|
56
64
|
local room = game:GetRoom()
|
|
57
65
|
local roomType = room:GetType()
|
|
58
|
-
local isSpikeDamage = hasFlag(nil, damageFlags, DamageFlag.
|
|
59
|
-
if roomType == RoomType.
|
|
66
|
+
local isSpikeDamage = hasFlag(nil, damageFlags, DamageFlag.SPIKES)
|
|
67
|
+
if roomType == RoomType.SACRIFICE and isSpikeDamage then
|
|
60
68
|
local ____v_level_0, ____numSacrifices_1 = v.level, "numSacrifices"
|
|
61
69
|
____v_level_0[____numSacrifices_1] = ____v_level_0[____numSacrifices_1] + 1
|
|
62
70
|
end
|
|
@@ -90,11 +98,11 @@ function playerIsTeleportingFromCursedTeleport(self, player, lastDamageFrame)
|
|
|
90
98
|
if not sprite:IsPlaying("TeleportUp") or sprite:GetFrame() ~= 1 then
|
|
91
99
|
return false
|
|
92
100
|
end
|
|
93
|
-
if player:HasCollectible(CollectibleType.
|
|
101
|
+
if player:HasCollectible(CollectibleType.CURSED_EYE) then
|
|
94
102
|
return true
|
|
95
103
|
end
|
|
96
104
|
local numHitsRemaining = getPlayerNumHitsRemaining(nil, player)
|
|
97
|
-
if player:HasTrinket(TrinketType.
|
|
105
|
+
if player:HasTrinket(TrinketType.CURSED_SKULL) and numHitsRemaining == 1 then
|
|
98
106
|
return true
|
|
99
107
|
end
|
|
100
108
|
return false
|
|
@@ -105,7 +113,7 @@ v = {
|
|
|
105
113
|
}
|
|
106
114
|
function ____exports.postCursedTeleportCallbackInit(self, mod)
|
|
107
115
|
saveDataManager(nil, "postCursedTeleport", v, hasSubscriptions)
|
|
108
|
-
mod:AddCallback(
|
|
109
|
-
mod:AddCallback(
|
|
116
|
+
mod:AddCallback(ModCallback.ENTITY_TAKE_DMG, entityTakeDmgPlayer, EntityType.PLAYER)
|
|
117
|
+
mod:AddCallback(ModCallback.POST_PLAYER_RENDER, postPlayerRenderPlayer, PlayerVariant.PLAYER)
|
|
110
118
|
end
|
|
111
119
|
return ____exports
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { DoorSlot } from "isaac-typescript-definitions";
|
|
2
2
|
import { ModUpgraded } from "../classes/ModUpgraded";
|
|
3
3
|
/**
|
|
4
4
|
* `isaacscript-common` provides custom doors that can be spawned where any wall segment is. If you
|
|
@@ -4,12 +4,20 @@ local __TS__New = ____lualib.__TS__New
|
|
|
4
4
|
local Map = ____lualib.Map
|
|
5
5
|
local ____exports = {}
|
|
6
6
|
local hasSubscriptions, postEffectUpdaterCustomEntity, doorChangedState, getAnimationForCustomDoor, postEffectRenderCustomEntity, isPlayerPastDoorThreshold, postRoomClearChanged, getPositionOffset, POSITION_OFFSET_MULTIPLIER, v
|
|
7
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
|
+
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
9
|
+
local DoorState = ____isaac_2Dtypescript_2Ddefinitions.DoorState
|
|
10
|
+
local GridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.GridCollisionClass
|
|
11
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
12
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
7
13
|
local ____cachedClasses = require("cachedClasses")
|
|
8
14
|
local game = ____cachedClasses.game
|
|
9
15
|
local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
|
|
10
16
|
local ModCallbacksCustom = ____ModCallbacksCustom.ModCallbacksCustom
|
|
11
17
|
local ____exports = require("features.saveDataManager.exports")
|
|
12
18
|
local saveDataManager = ____exports.saveDataManager
|
|
19
|
+
local ____direction = require("functions.direction")
|
|
20
|
+
local directionToVector = ____direction.directionToVector
|
|
13
21
|
local ____doors = require("functions.doors")
|
|
14
22
|
local doorSlotToDirection = ____doors.doorSlotToDirection
|
|
15
23
|
local ____entitySpecific = require("functions.entitySpecific")
|
|
@@ -19,8 +27,6 @@ local ____player = require("functions.player")
|
|
|
19
27
|
local getClosestPlayer = ____player.getClosestPlayer
|
|
20
28
|
local ____utils = require("functions.utils")
|
|
21
29
|
local ensureAllCases = ____utils.ensureAllCases
|
|
22
|
-
local ____vector = require("functions.vector")
|
|
23
|
-
local directionToVector = ____vector.directionToVector
|
|
24
30
|
local ____postCustomDoorEnter = require("callbacks.subscriptions.postCustomDoorEnter")
|
|
25
31
|
local postCustomDoorEnterFire = ____postCustomDoorEnter.postCustomDoorEnterFire
|
|
26
32
|
local postCustomDoorEnterHasSubscriptions = ____postCustomDoorEnter.postCustomDoorEnterHasSubscriptions
|
|
@@ -47,20 +53,20 @@ function doorChangedState(self, effect)
|
|
|
47
53
|
local gridIndex = room:GetGridIndex(effect.Position)
|
|
48
54
|
local wall = room:GetGridEntity(gridIndex)
|
|
49
55
|
if wall ~= nil then
|
|
50
|
-
wall.CollisionClass = effect.State == DoorState.
|
|
56
|
+
wall.CollisionClass = effect.State == DoorState.OPEN and GridCollisionClass.WALL_EXCEPT_PLAYER or GridCollisionClass.WALL
|
|
51
57
|
end
|
|
52
58
|
end
|
|
53
59
|
function getAnimationForCustomDoor(self, effect)
|
|
54
60
|
local freshlySpawned = effect.FrameCount == 0
|
|
55
61
|
repeat
|
|
56
62
|
local ____switch12 = effect.State
|
|
57
|
-
local ____cond12 = ____switch12 == DoorState.
|
|
63
|
+
local ____cond12 = ____switch12 == DoorState.OPEN
|
|
58
64
|
if ____cond12 then
|
|
59
65
|
do
|
|
60
66
|
return freshlySpawned and "Opened" or "Open"
|
|
61
67
|
end
|
|
62
68
|
end
|
|
63
|
-
____cond12 = ____cond12 or ____switch12 == DoorState.
|
|
69
|
+
____cond12 = ____cond12 or ____switch12 == DoorState.CLOSED
|
|
64
70
|
if ____cond12 then
|
|
65
71
|
do
|
|
66
72
|
return freshlySpawned and "Closed" or "Close"
|
|
@@ -132,7 +138,7 @@ function isPlayerPastDoorThreshold(self, effect, player, direction)
|
|
|
132
138
|
until true
|
|
133
139
|
end
|
|
134
140
|
function postRoomClearChanged(self, roomClear, effectVariant)
|
|
135
|
-
local state = roomClear and DoorState.
|
|
141
|
+
local state = roomClear and DoorState.OPEN or DoorState.CLOSED
|
|
136
142
|
local customDoors = getEffects(nil, effectVariant)
|
|
137
143
|
for ____, customDoor in ipairs(customDoors) do
|
|
138
144
|
customDoor.State = state
|
|
@@ -154,8 +160,8 @@ function ____exports.postCustomDoorEnterCallbackInit(self)
|
|
|
154
160
|
end
|
|
155
161
|
function ____exports.initCustomDoor(self, mod, effectVariant)
|
|
156
162
|
initializedEffectVariants:add(effectVariant)
|
|
157
|
-
mod:AddCallback(
|
|
158
|
-
mod:AddCallback(
|
|
163
|
+
mod:AddCallback(ModCallback.POST_EFFECT_UPDATE, postEffectUpdaterCustomEntity, effectVariant)
|
|
164
|
+
mod:AddCallback(ModCallback.POST_EFFECT_RENDER, postEffectRenderCustomEntity, effectVariant)
|
|
159
165
|
mod:AddCallbackCustom(
|
|
160
166
|
ModCallbacksCustom.MC_POST_ROOM_CLEAR_CHANGED,
|
|
161
167
|
function(____, roomClear)
|
|
@@ -178,11 +184,11 @@ function ____exports.spawnCustomDoor(self, effectVariant, doorSlot)
|
|
|
178
184
|
error(("Failed to initialize a custom door at slot " .. tostring(doorSlot)) .. " because the wall on that tile does not exist.")
|
|
179
185
|
end
|
|
180
186
|
local gridEntityType = gridEntity:GetType()
|
|
181
|
-
if gridEntityType ~= GridEntityType.
|
|
187
|
+
if gridEntityType ~= GridEntityType.WALL then
|
|
182
188
|
error((("Failed to initialize a custom door at slot " .. tostring(doorSlot)) .. " because there is another grid entity on that tile with a type of: ") .. tostring(gridEntityType))
|
|
183
189
|
end
|
|
184
190
|
local effect = spawnEffect(nil, effectVariant, 0, position)
|
|
185
|
-
effect.State = roomClear and DoorState.
|
|
191
|
+
effect.State = roomClear and DoorState.OPEN or DoorState.CLOSED
|
|
186
192
|
effect.RenderZOffset = -10000
|
|
187
193
|
effect.PositionOffset = getPositionOffset(nil, doorSlot)
|
|
188
194
|
local sprite = effect:GetSprite()
|
|
@@ -3,6 +3,8 @@ local Set = ____lualib.Set
|
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local hasSubscriptions, postEffectUpdate, v
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
6
8
|
local ____exports = require("features.saveDataManager.exports")
|
|
7
9
|
local saveDataManager = ____exports.saveDataManager
|
|
8
10
|
local ____postEffectInitLate = require("callbacks.subscriptions.postEffectInitLate")
|
|
@@ -24,6 +26,6 @@ end
|
|
|
24
26
|
v = {room = {firedSet = __TS__New(Set)}}
|
|
25
27
|
function ____exports.postEffectInitLateCallbackInit(self, mod)
|
|
26
28
|
saveDataManager(nil, "postEffectInitLate", v, hasSubscriptions)
|
|
27
|
-
mod:AddCallback(
|
|
29
|
+
mod:AddCallback(ModCallback.POST_EFFECT_UPDATE, postEffectUpdate)
|
|
28
30
|
end
|
|
29
31
|
return ____exports
|
|
@@ -2,6 +2,8 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__New = ____lualib.__TS__New
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local hasSubscriptions, postEffectUpdate, v
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
5
7
|
local ____DefaultMap = require("classes.DefaultMap")
|
|
6
8
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
7
9
|
local ____exports = require("features.saveDataManager.exports")
|
|
@@ -30,6 +32,6 @@ v = {run = {effectStateMap = __TS__New(
|
|
|
30
32
|
)}}
|
|
31
33
|
function ____exports.postEffectStateChangedCallbackInit(self, mod)
|
|
32
34
|
saveDataManager(nil, "postEffectStateChanged", v, hasSubscriptions)
|
|
33
|
-
mod:AddCallback(
|
|
35
|
+
mod:AddCallback(ModCallback.POST_EFFECT_UPDATE, postEffectUpdate)
|
|
34
36
|
end
|
|
35
37
|
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 hasSubscriptions, postUpdate, getPlayerWithControllerIndex, useItemEsauJr, v
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
7
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
5
8
|
local ____cachedClasses = require("cachedClasses")
|
|
6
9
|
local game = ____cachedClasses.game
|
|
7
10
|
local ____exports = require("features.saveDataManager.exports")
|
|
@@ -58,7 +61,7 @@ end
|
|
|
58
61
|
v = {run = {usedEsauJrFrame = nil, usedEsauJrControllerIndex = nil, usedEsauJrAtLeastOnce = false}}
|
|
59
62
|
function ____exports.postEsauJrCallbacksInit(self, mod)
|
|
60
63
|
saveDataManager(nil, "postEsauJr", v, hasSubscriptions)
|
|
61
|
-
mod:AddCallback(
|
|
62
|
-
mod:AddCallback(
|
|
64
|
+
mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
|
|
65
|
+
mod:AddCallback(ModCallback.POST_USE_ITEM, useItemEsauJr, CollectibleType.ESAU_JR)
|
|
63
66
|
end
|
|
64
67
|
return ____exports
|
|
@@ -3,6 +3,8 @@ local Set = ____lualib.Set
|
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local hasSubscriptions, postFamiliarUpdate, v
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
6
8
|
local ____exports = require("features.saveDataManager.exports")
|
|
7
9
|
local saveDataManager = ____exports.saveDataManager
|
|
8
10
|
local ____postFamiliarInitLate = require("callbacks.subscriptions.postFamiliarInitLate")
|
|
@@ -24,6 +26,6 @@ end
|
|
|
24
26
|
v = {run = {firedSet = __TS__New(Set)}}
|
|
25
27
|
function ____exports.postFamiliarInitLateCallbackInit(self, mod)
|
|
26
28
|
saveDataManager(nil, "postFamiliarInitLate", v, hasSubscriptions)
|
|
27
|
-
mod:AddCallback(
|
|
29
|
+
mod:AddCallback(ModCallback.POST_FAMILIAR_UPDATE, postFamiliarUpdate)
|
|
28
30
|
end
|
|
29
31
|
return ____exports
|
|
@@ -2,6 +2,8 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__New = ____lualib.__TS__New
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local hasSubscriptions, postFamiliarUpdate, v
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
5
7
|
local ____DefaultMap = require("classes.DefaultMap")
|
|
6
8
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
7
9
|
local ____exports = require("features.saveDataManager.exports")
|
|
@@ -30,6 +32,6 @@ v = {run = {familiarStateMap = __TS__New(
|
|
|
30
32
|
)}}
|
|
31
33
|
function ____exports.postFamiliarStateChangedCallbackInit(self, mod)
|
|
32
34
|
saveDataManager(nil, "postFamiliarStateChanged", v, hasSubscriptions)
|
|
33
|
-
mod:AddCallback(
|
|
35
|
+
mod:AddCallback(ModCallback.POST_FAMILIAR_UPDATE, postFamiliarUpdate)
|
|
34
36
|
end
|
|
35
37
|
return ____exports
|
|
@@ -2,6 +2,10 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local hasSubscriptions, useItemFlip, getNewLazarus, v
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
7
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
8
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
5
9
|
local ____exports = require("features.saveDataManager.exports")
|
|
6
10
|
local saveDataManager = ____exports.saveDataManager
|
|
7
11
|
local ____player = require("functions.player")
|
|
@@ -36,10 +40,10 @@ end
|
|
|
36
40
|
function getNewLazarus(self, oldLazarus)
|
|
37
41
|
local oldCharacter = oldLazarus:GetPlayerType()
|
|
38
42
|
local newCharacter
|
|
39
|
-
if oldCharacter == PlayerType.
|
|
40
|
-
newCharacter = PlayerType.
|
|
41
|
-
elseif oldCharacter == PlayerType.
|
|
42
|
-
newCharacter = PlayerType.
|
|
43
|
+
if oldCharacter == PlayerType.LAZARUS_B then
|
|
44
|
+
newCharacter = PlayerType.LAZARUS_2_B
|
|
45
|
+
elseif oldCharacter == PlayerType.LAZARUS_2_B then
|
|
46
|
+
newCharacter = PlayerType.LAZARUS_B
|
|
43
47
|
else
|
|
44
48
|
error("Failed to determine the character in the postFlip callback.")
|
|
45
49
|
end
|
|
@@ -52,6 +56,6 @@ end
|
|
|
52
56
|
v = {run = {usedFlipAtLeastOnce = false}}
|
|
53
57
|
function ____exports.postFlipCallbacksInit(self, mod)
|
|
54
58
|
saveDataManager(nil, "postFlip", v, hasSubscriptions)
|
|
55
|
-
mod:AddCallback(
|
|
59
|
+
mod:AddCallback(ModCallback.POST_USE_ITEM, useItemFlip, CollectibleType.FLIP)
|
|
56
60
|
end
|
|
57
61
|
return ____exports
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local hasSubscriptions, postUpdate, v
|
|
3
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
4
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
5
|
+
local ____cachedClasses = require("cachedClasses")
|
|
6
|
+
local game = ____cachedClasses.game
|
|
7
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
8
|
+
local saveDataManager = ____exports.saveDataManager
|
|
9
|
+
local ____postGreedModeWave = require("callbacks.subscriptions.postGreedModeWave")
|
|
10
|
+
local postGreedModeWaveFire = ____postGreedModeWave.postGreedModeWaveFire
|
|
11
|
+
local postGreedModeWaveHasSubscriptions = ____postGreedModeWave.postGreedModeWaveHasSubscriptions
|
|
12
|
+
function hasSubscriptions(self)
|
|
13
|
+
return postGreedModeWaveHasSubscriptions(nil)
|
|
14
|
+
end
|
|
15
|
+
function postUpdate(self)
|
|
16
|
+
if not hasSubscriptions(nil) then
|
|
17
|
+
return
|
|
18
|
+
end
|
|
19
|
+
local level = game:GetLevel()
|
|
20
|
+
local newWave = level.GreedModeWave
|
|
21
|
+
local oldWave = v.run.currentGreedWave
|
|
22
|
+
v.run.currentGreedWave = newWave
|
|
23
|
+
if newWave > oldWave then
|
|
24
|
+
postGreedModeWaveFire(nil, oldWave, newWave)
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
v = {run = {currentGreedWave = 0}}
|
|
28
|
+
function ____exports.postGreedModeWaveCallbackInit(self, mod)
|
|
29
|
+
saveDataManager(nil, "postModeGreedWave", v, hasSubscriptions)
|
|
30
|
+
mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
|
|
31
|
+
end
|
|
32
|
+
return ____exports
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
|
+
local ____exports = {}
|
|
3
|
+
local hasSubscriptions, postUpdate, v
|
|
4
|
+
local ____cachedClasses = require("cachedClasses")
|
|
5
|
+
local game = ____cachedClasses.game
|
|
6
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
7
|
+
local saveDataManager = ____exports.saveDataManager
|
|
8
|
+
local ____postGreedWave = require("callbacks.subscriptions.postGreedWave")
|
|
9
|
+
local postGreedModeWaveFire = ____postGreedWave.postGreedModeWaveFire
|
|
10
|
+
local postGreedModeWaveHasSubscriptions = ____postGreedWave.postGreedModeWaveHasSubscriptions
|
|
11
|
+
function hasSubscriptions(self)
|
|
12
|
+
return postGreedModeWaveHasSubscriptions(nil)
|
|
13
|
+
end
|
|
14
|
+
function postUpdate(self)
|
|
15
|
+
if not hasSubscriptions(nil) then
|
|
16
|
+
return
|
|
17
|
+
end
|
|
18
|
+
local level = game:GetLevel()
|
|
19
|
+
local newWave = level.GreedModeWave
|
|
20
|
+
local oldWave = v.run.currentGreedWave
|
|
21
|
+
v.run.currentGreedWave = newWave
|
|
22
|
+
if newWave > oldWave then
|
|
23
|
+
postGreedModeWaveFire(nil, oldWave, newWave)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
v = {run = {currentGreedWave = 0}}
|
|
27
|
+
function ____exports.postGreedModeWaveCallbackInit(self, mod)
|
|
28
|
+
saveDataManager(nil, "postModeGreedWave", v, hasSubscriptions)
|
|
29
|
+
mod:AddCallback(ModCallbacks.MC_POST_UPDATE, postUpdate)
|
|
30
|
+
end
|
|
31
|
+
return ____exports
|
|
@@ -4,6 +4,8 @@ local __TS__New = ____lualib.__TS__New
|
|
|
4
4
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
5
5
|
local ____exports = {}
|
|
6
6
|
local hasSubscriptions, postUpdate, checkGridEntitiesRemoved, checkGridEntityStateChanged, checkNewGridEntity, updateTupleInMap, postNewRoom, v
|
|
7
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
7
9
|
local ____exports = require("features.saveDataManager.exports")
|
|
8
10
|
local saveDataManager = ____exports.saveDataManager
|
|
9
11
|
local ____gridEntity = require("functions.gridEntity")
|
|
@@ -96,7 +98,7 @@ end
|
|
|
96
98
|
v = {room = {initializedGridEntities = __TS__New(Map)}}
|
|
97
99
|
function ____exports.postGridEntityCallbacksInit(self, mod)
|
|
98
100
|
saveDataManager(nil, "postGridEntity", v, hasSubscriptions)
|
|
99
|
-
mod:AddCallback(
|
|
100
|
-
mod:AddCallback(
|
|
101
|
+
mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
|
|
102
|
+
mod:AddCallback(ModCallback.POST_NEW_ROOM, postNewRoom)
|
|
101
103
|
end
|
|
102
104
|
return ____exports
|
|
@@ -6,6 +6,9 @@ local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
|
6
6
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
7
7
|
local ____exports = {}
|
|
8
8
|
local hasSubscriptions, postUpdate, v
|
|
9
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
10
|
+
local GridCollisionClass = ____isaac_2Dtypescript_2Ddefinitions.GridCollisionClass
|
|
11
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
9
12
|
local ____DefaultMap = require("classes.DefaultMap")
|
|
10
13
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
11
14
|
local ____exports = require("features.saveDataManager.exports")
|
|
@@ -26,7 +29,7 @@ function postUpdate(self)
|
|
|
26
29
|
local gridEntities = getGridEntities(nil)
|
|
27
30
|
local gridEntitiesWithCollision = __TS__ArrayFilter(
|
|
28
31
|
gridEntities,
|
|
29
|
-
function(____, gridEntity) return gridEntity.CollisionClass ~= GridCollisionClass.
|
|
32
|
+
function(____, gridEntity) return gridEntity.CollisionClass ~= GridCollisionClass.NONE end
|
|
30
33
|
)
|
|
31
34
|
for ____, gridEntity in ipairs(gridEntitiesWithCollision) do
|
|
32
35
|
local gridEntityPtrHash = GetPtrHash(gridEntity)
|
|
@@ -57,6 +60,6 @@ v = {room = {collidingEntitiesMap = __TS__New(
|
|
|
57
60
|
)}}
|
|
58
61
|
function ____exports.postGridEntityCollisionInit(self, mod)
|
|
59
62
|
saveDataManager(nil, "postGridEntityCollision", v, hasSubscriptions)
|
|
60
|
-
mod:AddCallback(
|
|
63
|
+
mod:AddCallback(ModCallback.POST_UPDATE, postUpdate)
|
|
61
64
|
end
|
|
62
65
|
return ____exports
|
|
@@ -2,6 +2,8 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__New = ____lualib.__TS__New
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local hasSubscriptions, postPEffectUpdateReordered, v
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
5
7
|
local ____DefaultMap = require("classes.DefaultMap")
|
|
6
8
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
7
9
|
local ____ModCallbacksCustom = require("enums.ModCallbacksCustom")
|
|
@@ -22,7 +24,7 @@ function postPEffectUpdateReordered(self, player)
|
|
|
22
24
|
return
|
|
23
25
|
end
|
|
24
26
|
local effects = player:GetEffects()
|
|
25
|
-
local newNumHolyMantles = effects:GetCollectibleEffectNum(CollectibleType.
|
|
27
|
+
local newNumHolyMantles = effects:GetCollectibleEffectNum(CollectibleType.HOLY_MANTLE)
|
|
26
28
|
local oldNumHolyMantles = defaultMapGetPlayer(nil, v.run.playersHolyMantleMap, player)
|
|
27
29
|
defaultMapSetPlayer(nil, v.run.playersHolyMantleMap, player, newNumHolyMantles)
|
|
28
30
|
if newNumHolyMantles < oldNumHolyMantles then
|
|
@@ -3,6 +3,11 @@ local __TS__New = ____lualib.__TS__New
|
|
|
3
3
|
local Map = ____lualib.Map
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local hasSubscriptions, postPEffectUpdate, playerRecentlyCollidedWithBulb, preNPCCollision, v
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
|
|
8
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
9
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
10
|
+
local SuckerVariant = ____isaac_2Dtypescript_2Ddefinitions.SuckerVariant
|
|
6
11
|
local ____cachedClasses = require("cachedClasses")
|
|
7
12
|
local game = ____cachedClasses.game
|
|
8
13
|
local ____DefaultMap = require("classes.DefaultMap")
|
|
@@ -11,12 +16,12 @@ local ____exports = require("features.saveDataManager.exports")
|
|
|
11
16
|
local saveDataManager = ____exports.saveDataManager
|
|
12
17
|
local ____charge = require("functions.charge")
|
|
13
18
|
local getTotalCharge = ____charge.getTotalCharge
|
|
19
|
+
local ____enums = require("functions.enums")
|
|
20
|
+
local getEnumValues = ____enums.getEnumValues
|
|
14
21
|
local ____playerDataStructures = require("functions.playerDataStructures")
|
|
15
22
|
local defaultMapGetPlayer = ____playerDataStructures.defaultMapGetPlayer
|
|
16
23
|
local mapGetPlayer = ____playerDataStructures.mapGetPlayer
|
|
17
24
|
local mapSetPlayer = ____playerDataStructures.mapSetPlayer
|
|
18
|
-
local ____utils = require("functions.utils")
|
|
19
|
-
local getEnumValues = ____utils.getEnumValues
|
|
20
25
|
local ____postItemDischarged = require("callbacks.subscriptions.postItemDischarged")
|
|
21
26
|
local postItemDischargeFire = ____postItemDischarged.postItemDischargeFire
|
|
22
27
|
local postItemDischargeHasSubscriptions = ____postItemDischarged.postItemDischargeHasSubscriptions
|
|
@@ -62,7 +67,7 @@ function preNPCCollision(self, npc, collider)
|
|
|
62
67
|
if not hasSubscriptions(nil) then
|
|
63
68
|
return
|
|
64
69
|
end
|
|
65
|
-
if npc.Variant ~=
|
|
70
|
+
if npc.Variant ~= SuckerVariant.BULB then
|
|
66
71
|
return
|
|
67
72
|
end
|
|
68
73
|
local player = collider:ToPlayer()
|
|
@@ -93,7 +98,7 @@ v = {
|
|
|
93
98
|
}
|
|
94
99
|
function ____exports.postItemDischargeCallbackInit(self, mod)
|
|
95
100
|
saveDataManager(nil, "postItemDischarge", v, hasSubscriptions)
|
|
96
|
-
mod:AddCallback(
|
|
97
|
-
mod:AddCallback(
|
|
101
|
+
mod:AddCallback(ModCallback.POST_PEFFECT_UPDATE, postPEffectUpdate)
|
|
102
|
+
mod:AddCallback(ModCallback.PRE_NPC_COLLISION, preNPCCollision, EntityType.SUCKER)
|
|
98
103
|
end
|
|
99
104
|
return ____exports
|