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
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
4
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
5
|
+
local NullItemID = ____isaac_2Dtypescript_2Ddefinitions.NullItemID
|
|
6
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
7
|
+
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
3
8
|
local ____cachedClasses = require("cachedClasses")
|
|
4
9
|
local game = ____cachedClasses.game
|
|
5
10
|
local ____constants = require("constants")
|
|
@@ -13,12 +18,12 @@ local getPlayerNumHitsRemaining = ____player.getPlayerNumHitsRemaining
|
|
|
13
18
|
local hasLostCurse = ____player.hasLostCurse
|
|
14
19
|
local isKeeper = ____player.isKeeper
|
|
15
20
|
local ____sprite = require("functions.sprite")
|
|
16
|
-
local
|
|
21
|
+
local getLastFrameOfAnimation = ____sprite.getLastFrameOfAnimation
|
|
17
22
|
local ____trinketGive = require("functions.trinketGive")
|
|
18
23
|
local giveTrinketsBack = ____trinketGive.giveTrinketsBack
|
|
19
24
|
local temporarilyRemoveTrinket = ____trinketGive.temporarilyRemoveTrinket
|
|
20
25
|
function ____exports.willReviveFromHeartbreak(self, player)
|
|
21
|
-
if not player:HasCollectible(CollectibleType.
|
|
26
|
+
if not player:HasCollectible(CollectibleType.HEARTBREAK) then
|
|
22
27
|
return false
|
|
23
28
|
end
|
|
24
29
|
local maxHeartContainers = getPlayerMaxHeartContainers(nil, player)
|
|
@@ -28,33 +33,33 @@ function ____exports.willReviveFromHeartbreak(self, player)
|
|
|
28
33
|
return maxHeartContainers > numBrokenHeartsAfterRevival
|
|
29
34
|
end
|
|
30
35
|
function ____exports.willReviveFromSpiritShackles(self, player)
|
|
31
|
-
if not player:HasCollectible(CollectibleType.
|
|
36
|
+
if not player:HasCollectible(CollectibleType.SPIRIT_SHACKLES) then
|
|
32
37
|
return false
|
|
33
38
|
end
|
|
34
39
|
local effects = player:GetEffects()
|
|
35
|
-
local spiritShacklesEnabled = not effects:HasNullEffect(NullItemID.
|
|
36
|
-
local playerInSoulForm = effects:HasNullEffect(NullItemID.
|
|
40
|
+
local spiritShacklesEnabled = not effects:HasNullEffect(NullItemID.SPIRIT_SHACKLES_DISABLED)
|
|
41
|
+
local playerInSoulForm = effects:HasNullEffect(NullItemID.SPIRIT_SHACKLES_SOUL)
|
|
37
42
|
return spiritShacklesEnabled and not playerInSoulForm
|
|
38
43
|
end
|
|
39
44
|
function ____exports.isDamageToPlayerFatal(self, player, damageAmount, damageSource, lastDamageGameFrame)
|
|
40
45
|
local gameFrameCount = game:GetFrameCount()
|
|
41
46
|
local character = player:GetPlayerType()
|
|
42
47
|
local effects = player:GetEffects()
|
|
43
|
-
local isBerserk = effects:HasCollectibleEffect(CollectibleType.
|
|
44
|
-
if character == PlayerType.
|
|
48
|
+
local isBerserk = effects:HasCollectibleEffect(CollectibleType.BERSERK)
|
|
49
|
+
if character == PlayerType.JACOB_B and damageSource.Type == EntityType.DARK_ESAU then
|
|
45
50
|
return false
|
|
46
51
|
end
|
|
47
52
|
if isBerserk then
|
|
48
53
|
return false
|
|
49
54
|
end
|
|
50
55
|
local berserkChargeAfterHit = player.SamsonBerserkCharge + TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE
|
|
51
|
-
if character == PlayerType.
|
|
56
|
+
if character == PlayerType.SAMSON_B and berserkChargeAfterHit >= MAX_TAINTED_SAMSON_BERSERK_CHARGE then
|
|
52
57
|
return false
|
|
53
58
|
end
|
|
54
59
|
if ____exports.willReviveFromSpiritShackles(nil, player) then
|
|
55
60
|
return false
|
|
56
61
|
end
|
|
57
|
-
if character == PlayerType.
|
|
62
|
+
if character == PlayerType.JACOB_2_B then
|
|
58
63
|
return true
|
|
59
64
|
end
|
|
60
65
|
if hasLostCurse(nil, player) then
|
|
@@ -67,7 +72,7 @@ function ____exports.isDamageToPlayerFatal(self, player, damageAmount, damageSou
|
|
|
67
72
|
if ____exports.willReviveFromHeartbreak(nil, player) then
|
|
68
73
|
return false
|
|
69
74
|
end
|
|
70
|
-
if player:HasCollectible(CollectibleType.
|
|
75
|
+
if player:HasCollectible(CollectibleType.BROKEN_GLASS_CANNON) and gameFrameCount == lastDamageGameFrame then
|
|
71
76
|
return false
|
|
72
77
|
end
|
|
73
78
|
local hearts = player:GetHearts()
|
|
@@ -84,12 +89,12 @@ function ____exports.willMysteriousPaperRevive(self, player)
|
|
|
84
89
|
local sprite = player:GetSprite()
|
|
85
90
|
local character = player:GetPlayerType()
|
|
86
91
|
local animation = getCharacterDeathAnimationName(nil, character)
|
|
87
|
-
local deathAnimationFrames =
|
|
92
|
+
local deathAnimationFrames = getLastFrameOfAnimation(nil, sprite, animation)
|
|
88
93
|
local frameOfDeath = gameFrameCount + deathAnimationFrames + 1
|
|
89
94
|
return frameOfDeath % 4 == 3
|
|
90
95
|
end
|
|
91
96
|
function ____exports.willPlayerRevive(self, player)
|
|
92
|
-
local trinketSituation = temporarilyRemoveTrinket(nil, player, TrinketType.
|
|
97
|
+
local trinketSituation = temporarilyRemoveTrinket(nil, player, TrinketType.MYSTERIOUS_PAPER)
|
|
93
98
|
local willRevive = player:WillPlayerRevive() or trinketSituation ~= nil and ____exports.willMysteriousPaperRevive(nil, player)
|
|
94
99
|
giveTrinketsBack(nil, player, trinketSituation)
|
|
95
100
|
return willRevive
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { DoorSlot, RoomShape, RoomType, StageID } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Alias for the `Level.GetCurrentRoomDesc` method. Use this to make it more clear what type of
|
|
4
4
|
* `RoomDescriptor` object that you are retrieving.
|
|
@@ -26,7 +26,7 @@ export declare function getRoomDescriptor(roomGridIndex?: int): RoomDescriptor;
|
|
|
26
26
|
*
|
|
27
27
|
* - If the current room is inside of the grid, this function will return the `SafeGridIndex` from
|
|
28
28
|
* the room descriptor. (The safe grid index is defined as the top-left 1x1 section that the room
|
|
29
|
-
* overlaps with, or the top-right 1x1 section of a `RoomType.
|
|
29
|
+
* overlaps with, or the top-right 1x1 section of a `RoomType.SHAPE_LTL` room.)
|
|
30
30
|
* - If the current room is outside of the grid, it will return the index from the
|
|
31
31
|
* `Level.GetCurrentRoomIndex` method (since `SafeGridIndex` is bugged for these cases).
|
|
32
32
|
*
|
|
@@ -2,12 +2,16 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local Set = ____lualib.Set
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
|
|
5
7
|
local ____cachedClasses = require("cachedClasses")
|
|
6
8
|
local game = ____cachedClasses.game
|
|
9
|
+
local ____doors = require("functions.doors")
|
|
10
|
+
local doorSlotFlagToDoorSlot = ____doors.doorSlotFlagToDoorSlot
|
|
11
|
+
local ____enums = require("functions.enums")
|
|
12
|
+
local getEnumValues = ____enums.getEnumValues
|
|
7
13
|
local ____flag = require("functions.flag")
|
|
8
14
|
local hasFlag = ____flag.hasFlag
|
|
9
|
-
local ____utils = require("functions.utils")
|
|
10
|
-
local getEnumValues = ____utils.getEnumValues
|
|
11
15
|
function ____exports.getCurrentRoomDescriptorReadOnly(self)
|
|
12
16
|
local level = game:GetLevel()
|
|
13
17
|
return level:GetCurrentRoomDesc()
|
|
@@ -38,18 +42,12 @@ function ____exports.getRoomAllowedDoors(self, roomGridIndex)
|
|
|
38
42
|
if roomData == nil then
|
|
39
43
|
return allowedDoors
|
|
40
44
|
end
|
|
41
|
-
local
|
|
42
|
-
for ____,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
end
|
|
47
|
-
local doorSlotFlag = 1 << doorSlot
|
|
48
|
-
if hasFlag(nil, roomData.Doors, doorSlotFlag) then
|
|
49
|
-
allowedDoors:add(doorSlot)
|
|
50
|
-
end
|
|
45
|
+
local doorSlotFlags = getEnumValues(nil, DoorSlotFlag)
|
|
46
|
+
for ____, doorSlotFlag in ipairs(doorSlotFlags) do
|
|
47
|
+
if hasFlag(nil, roomData.Doors, doorSlotFlag) then
|
|
48
|
+
local doorSlot = doorSlotFlagToDoorSlot(nil, doorSlotFlag)
|
|
49
|
+
allowedDoors:add(doorSlot)
|
|
51
50
|
end
|
|
52
|
-
::__continue5::
|
|
53
51
|
end
|
|
54
52
|
return allowedDoors
|
|
55
53
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { RoomShape } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to convert grid coordinates to a world position `Vector`.
|
|
4
4
|
*
|
|
@@ -19,7 +19,7 @@ export declare function gridIndexToGridPosition(gridIndex: int, roomShape: RoomS
|
|
|
19
19
|
*/
|
|
20
20
|
export declare function gridPositionToWorldPosition(gridPosition: Vector): Vector;
|
|
21
21
|
/**
|
|
22
|
-
* Test if a grid position is actually in the given `RoomShape
|
|
22
|
+
* Test if a grid position is actually in the given `RoomShape`.
|
|
23
23
|
*
|
|
24
24
|
* In this context, the grid position of the top-left wall is "Vector(-1, -1)".
|
|
25
25
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { DoorSlot, RoomShape } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to get the grid index delta that a door out of the given room shape would lead
|
|
4
|
-
* to. For example, if you went through the bottom door in a room of `RoomShape.
|
|
4
|
+
* to. For example, if you went through the bottom door in a room of `RoomShape.SHAPE_1x2`, you
|
|
5
5
|
* would end up in a room with a grid index that is +26 units from the `SafeGridIndex` of where you
|
|
6
6
|
* started.
|
|
7
7
|
*/
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { BossID, Dimension, Direction, DoorSlot, ItemPoolType, MinibossID, RoomTransitionAnim, RoomType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
|
-
* Helper function for quickly switching to a new room without playing a particular animation.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* indexes.
|
|
3
|
+
* Helper function for quickly switching to a new room without playing a particular animation. Use
|
|
4
|
+
* this helper function over invoking the `Game.ChangeRoom` method directly to ensure that you do
|
|
5
|
+
* not forget to set the `LeaveDoor` property and to prevent crashing on invalid room grid indexes.
|
|
7
6
|
*/
|
|
8
7
|
export declare function changeRoom(roomGridIndex: int): void;
|
|
9
8
|
export declare function getAllRoomGridIndexes(): int[];
|
|
@@ -30,6 +29,12 @@ export declare function getRoomGridIndexesForType(...roomTypes: RoomType[]): int
|
|
|
30
29
|
* `ItemPoolType.ItemPoolType.POOL_ANGEL` if you are in an Angel Room.
|
|
31
30
|
*/
|
|
32
31
|
export declare function getRoomItemPoolType(): ItemPoolType;
|
|
32
|
+
/**
|
|
33
|
+
* Helper function to get the proper name of a room type.
|
|
34
|
+
*
|
|
35
|
+
* For example, `RoomType.TREASURE` will return "Treasure Room".
|
|
36
|
+
*/
|
|
37
|
+
export declare function getRoomTypeName(roomType: RoomType): string;
|
|
33
38
|
/**
|
|
34
39
|
* Helper function to get the room descriptor for every room on the level. Uses the `Level.GetRooms`
|
|
35
40
|
* method to accomplish this. Rooms without data are assumed to be non-existent and are not added to
|
|
@@ -49,8 +54,8 @@ export declare function getRooms(includeExtraDimensionalRooms?: boolean): RoomDe
|
|
|
49
54
|
*/
|
|
50
55
|
export declare function getRoomsOfDimension(dimension: Dimension): RoomDescriptor[];
|
|
51
56
|
/**
|
|
52
|
-
* Helper function to determine if the current room shape is equal to `RoomShape.
|
|
53
|
-
* `RoomShape.
|
|
57
|
+
* Helper function to determine if the current room shape is equal to `RoomShape.1x2` or
|
|
58
|
+
* `RoomShape.2x1`.
|
|
54
59
|
*/
|
|
55
60
|
export declare function in2x1Room(): boolean;
|
|
56
61
|
export declare function inAngelShop(): boolean;
|
|
@@ -62,8 +67,8 @@ export declare function inBeastRoom(): boolean;
|
|
|
62
67
|
export declare function inBossRoomOf(bossID: BossID): boolean;
|
|
63
68
|
/**
|
|
64
69
|
* Helper function for determining whether the current room is a crawlspace. Use this function over
|
|
65
|
-
* comparing to `RoomType.
|
|
66
|
-
*
|
|
70
|
+
* comparing to `RoomType.DUNGEON` or `GridRoom.DUNGEON_IDX` since there is a special case of the
|
|
71
|
+
* player being in a boss fight that take place in a dungeon.
|
|
67
72
|
*/
|
|
68
73
|
export declare function inCrawlspace(): boolean;
|
|
69
74
|
/**
|
|
@@ -85,7 +90,7 @@ export declare function inLRoom(): boolean;
|
|
|
85
90
|
export declare function inMegaSatanRoom(): boolean;
|
|
86
91
|
/**
|
|
87
92
|
* Helper function to check if the current room is a miniboss room for a particular miniboss. This
|
|
88
|
-
* will only work for
|
|
93
|
+
* will only work for mini-bosses that have dedicated boss rooms in the "00.special rooms.stb" file.
|
|
89
94
|
*/
|
|
90
95
|
export declare function inMinibossRoomOf(minibossID: MinibossID): boolean;
|
|
91
96
|
/**
|
|
@@ -97,8 +102,8 @@ export declare function inMinibossRoomOf(minibossID: MinibossID): boolean;
|
|
|
97
102
|
*/
|
|
98
103
|
export declare function inSecretShop(): boolean;
|
|
99
104
|
/**
|
|
100
|
-
* Helper function to determine whether or not the current room is the starting room of a floor.
|
|
101
|
-
*
|
|
105
|
+
* Helper function to determine whether or not the current room is the starting room of a floor. It
|
|
106
|
+
* only returns true for the starting room of the primary dimension (meaning that being in the
|
|
102
107
|
* starting room of the mirror world does not count).
|
|
103
108
|
*/
|
|
104
109
|
export declare function inStartingRoom(): boolean;
|
|
@@ -122,8 +127,8 @@ export declare function isDoorSlotValidAtGridIndexForRedRoom(doorSlot: DoorSlot,
|
|
|
122
127
|
*/
|
|
123
128
|
export declare function isRedKeyRoom(roomGridIndex?: int): boolean;
|
|
124
129
|
/**
|
|
125
|
-
* Helper function to determine if the provided room is part of the floor layout. For
|
|
126
|
-
*
|
|
130
|
+
* Helper function to determine if the provided room is part of the floor layout. For example, Devil
|
|
131
|
+
* Rooms and the Mega Satan room are not considered to be inside the map.
|
|
127
132
|
*
|
|
128
133
|
* @param roomGridIndex Optional. Default is the current room index.
|
|
129
134
|
*/
|
package/dist/functions/rooms.lua
CHANGED
|
@@ -8,12 +8,28 @@ local __TS__Spread = ____lualib.__TS__Spread
|
|
|
8
8
|
local __TS__StringIncludes = ____lualib.__TS__StringIncludes
|
|
9
9
|
local __TS__ArrayEvery = ____lualib.__TS__ArrayEvery
|
|
10
10
|
local ____exports = {}
|
|
11
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
12
|
+
local AngelRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.AngelRoomSubType
|
|
13
|
+
local Dimension = ____isaac_2Dtypescript_2Ddefinitions.Dimension
|
|
14
|
+
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
15
|
+
local DungeonSubType = ____isaac_2Dtypescript_2Ddefinitions.DungeonSubType
|
|
16
|
+
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
17
|
+
local HomeRoomSubType = ____isaac_2Dtypescript_2Ddefinitions.HomeRoomSubType
|
|
18
|
+
local RoomDescriptorFlag = ____isaac_2Dtypescript_2Ddefinitions.RoomDescriptorFlag
|
|
19
|
+
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
20
|
+
local RoomTransitionAnim = ____isaac_2Dtypescript_2Ddefinitions.RoomTransitionAnim
|
|
21
|
+
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
22
|
+
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
23
|
+
local StageID = ____isaac_2Dtypescript_2Ddefinitions.StageID
|
|
11
24
|
local ____cachedClasses = require("cachedClasses")
|
|
12
25
|
local game = ____cachedClasses.game
|
|
13
26
|
local sfxManager = ____cachedClasses.sfxManager
|
|
14
27
|
local ____constants = require("constants")
|
|
15
28
|
local MAX_ROOM_INDEX = ____constants.MAX_ROOM_INDEX
|
|
16
29
|
local NUM_DIMENSIONS = ____constants.NUM_DIMENSIONS
|
|
30
|
+
local ____roomTypeNames = require("objects.roomTypeNames")
|
|
31
|
+
local DEFAULT_ROOM_TYPE_NAME = ____roomTypeNames.DEFAULT_ROOM_TYPE_NAME
|
|
32
|
+
local ROOM_TYPE_NAMES = ____roomTypeNames.ROOM_TYPE_NAMES
|
|
17
33
|
local ____doors = require("functions.doors")
|
|
18
34
|
local closeAllDoors = ____doors.closeAllDoors
|
|
19
35
|
local getDoors = ____doors.getDoors
|
|
@@ -24,7 +40,7 @@ local getEntities = ____entity.getEntities
|
|
|
24
40
|
local ____flag = require("functions.flag")
|
|
25
41
|
local hasFlag = ____flag.hasFlag
|
|
26
42
|
local ____math = require("functions.math")
|
|
27
|
-
local
|
|
43
|
+
local erange = ____math.erange
|
|
28
44
|
local ____positionVelocity = require("functions.positionVelocity")
|
|
29
45
|
local getEntityPositions = ____positionVelocity.getEntityPositions
|
|
30
46
|
local getEntityVelocities = ____positionVelocity.getEntityVelocities
|
|
@@ -77,7 +93,7 @@ end
|
|
|
77
93
|
function ____exports.inDeathCertificateArea(self)
|
|
78
94
|
local roomStageID = getRoomStageID(nil)
|
|
79
95
|
local roomSubType = getRoomSubType(nil)
|
|
80
|
-
return roomStageID ==
|
|
96
|
+
return roomStageID == StageID.HOME and (roomSubType == HomeRoomSubType.DEATH_CERTIFICATE_ENTRANCE or roomSubType == HomeRoomSubType.DEATH_CERTIFICATE_ITEMS)
|
|
81
97
|
end
|
|
82
98
|
function ____exports.roomExists(self, roomGridIndex)
|
|
83
99
|
local roomData = getRoomData(nil, roomGridIndex)
|
|
@@ -102,12 +118,12 @@ end
|
|
|
102
118
|
function ____exports.getCurrentDimension(self)
|
|
103
119
|
local level = game:GetLevel()
|
|
104
120
|
if ____exports.inDeathCertificateArea(nil) then
|
|
105
|
-
return
|
|
121
|
+
return Dimension.DEATH_CERTIFICATE
|
|
106
122
|
end
|
|
107
123
|
local startingRoomGridIndex = level:GetStartingRoomIndex()
|
|
108
|
-
local startingRoomDescription = level:GetRoomByIdx(startingRoomGridIndex,
|
|
124
|
+
local startingRoomDescription = level:GetRoomByIdx(startingRoomGridIndex, Dimension.CURRENT)
|
|
109
125
|
local startingRoomHash = GetPtrHash(startingRoomDescription)
|
|
110
|
-
for ____, dimension in ipairs(
|
|
126
|
+
for ____, dimension in ipairs(erange(nil, NUM_DIMENSIONS)) do
|
|
111
127
|
local dimensionRoomDescription = level:GetRoomByIdx(startingRoomGridIndex, dimension)
|
|
112
128
|
local dimensionRoomHash = GetPtrHash(dimensionRoomDescription)
|
|
113
129
|
if dimensionRoomHash == startingRoomHash then
|
|
@@ -135,6 +151,10 @@ function ____exports.getRoomItemPoolType(self)
|
|
|
135
151
|
local roomSeed = room:GetSpawnSeed()
|
|
136
152
|
return itemPool:GetPoolForRoom(roomType, roomSeed)
|
|
137
153
|
end
|
|
154
|
+
function ____exports.getRoomTypeName(self, roomType)
|
|
155
|
+
local roomTypeName = ROOM_TYPE_NAMES[roomType]
|
|
156
|
+
return roomTypeName == nil and DEFAULT_ROOM_TYPE_NAME or roomTypeName
|
|
157
|
+
end
|
|
138
158
|
function ____exports.getRoomsOfDimension(self, dimension)
|
|
139
159
|
local level = game:GetLevel()
|
|
140
160
|
local roomsMap = __TS__New(Map)
|
|
@@ -153,36 +173,36 @@ end
|
|
|
153
173
|
function ____exports.in2x1Room(self)
|
|
154
174
|
local room = game:GetRoom()
|
|
155
175
|
local roomShape = room:GetRoomShape()
|
|
156
|
-
return roomShape == RoomShape.
|
|
176
|
+
return roomShape == RoomShape.SHAPE_1x2 or roomShape == RoomShape.SHAPE_2x1
|
|
157
177
|
end
|
|
158
178
|
function ____exports.inAngelShop(self)
|
|
159
179
|
local room = game:GetRoom()
|
|
160
180
|
local roomType = room:GetType()
|
|
161
181
|
local roomSubType = getRoomSubType(nil)
|
|
162
|
-
return roomType == RoomType.
|
|
182
|
+
return roomType == RoomType.ANGEL and roomSubType == AngelRoomSubType.SHOP
|
|
163
183
|
end
|
|
164
184
|
function ____exports.inBeastRoom(self)
|
|
165
185
|
local room = game:GetRoom()
|
|
166
186
|
local roomType = room:GetType()
|
|
167
187
|
local roomSubType = getRoomSubType(nil)
|
|
168
|
-
return roomType == RoomType.
|
|
188
|
+
return roomType == RoomType.DUNGEON and roomSubType == DungeonSubType.BEAST_ROOM
|
|
169
189
|
end
|
|
170
190
|
function ____exports.inBossRoomOf(self, bossID)
|
|
171
191
|
local room = game:GetRoom()
|
|
172
192
|
local roomType = room:GetType()
|
|
173
193
|
local roomStageID = getRoomStageID(nil)
|
|
174
194
|
local roomSubType = getRoomSubType(nil)
|
|
175
|
-
return roomType == RoomType.
|
|
195
|
+
return roomType == RoomType.BOSS and roomStageID == StageID.SPECIAL_ROOMS and roomSubType == bossID
|
|
176
196
|
end
|
|
177
197
|
function ____exports.inCrawlspace(self)
|
|
178
198
|
local room = game:GetRoom()
|
|
179
199
|
local roomType = room:GetType()
|
|
180
200
|
local roomSubType = getRoomSubType(nil)
|
|
181
|
-
return roomType == RoomType.
|
|
201
|
+
return roomType == RoomType.DUNGEON and roomSubType == DungeonSubType.NORMAL
|
|
182
202
|
end
|
|
183
203
|
function ____exports.inDevilsCrownTreasureRoom(self)
|
|
184
204
|
local roomDescriptor = getCurrentRoomDescriptorReadOnly(nil)
|
|
185
|
-
return hasFlag(nil, roomDescriptor.Flags,
|
|
205
|
+
return hasFlag(nil, roomDescriptor.Flags, RoomDescriptorFlag.DEVIL_TREASURE)
|
|
186
206
|
end
|
|
187
207
|
function ____exports.inDimension(self, dimension)
|
|
188
208
|
return dimension == ____exports.getCurrentDimension(nil)
|
|
@@ -191,37 +211,37 @@ function ____exports.inDoubleTrouble(self)
|
|
|
191
211
|
local room = game:GetRoom()
|
|
192
212
|
local roomType = room:GetType()
|
|
193
213
|
local roomName = getRoomName(nil)
|
|
194
|
-
return roomType == RoomType.
|
|
214
|
+
return roomType == RoomType.BOSS and __TS__StringIncludes(roomName, "Double Trouble")
|
|
195
215
|
end
|
|
196
216
|
function ____exports.inGenesisRoom(self)
|
|
197
217
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
198
|
-
return roomGridIndex ==
|
|
218
|
+
return roomGridIndex == GridRoom.GENESIS
|
|
199
219
|
end
|
|
200
220
|
function ____exports.inLRoom(self)
|
|
201
221
|
local room = game:GetRoom()
|
|
202
222
|
local roomShape = room:GetRoomShape()
|
|
203
|
-
return roomShape == RoomShape.
|
|
223
|
+
return roomShape == RoomShape.LTL or roomShape == RoomShape.LTR or roomShape == RoomShape.LBL or roomShape == RoomShape.LBR
|
|
204
224
|
end
|
|
205
225
|
function ____exports.inMegaSatanRoom(self)
|
|
206
226
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
207
|
-
return roomGridIndex ==
|
|
227
|
+
return roomGridIndex == GridRoom.MEGA_SATAN
|
|
208
228
|
end
|
|
209
229
|
function ____exports.inMinibossRoomOf(self, minibossID)
|
|
210
230
|
local room = game:GetRoom()
|
|
211
231
|
local roomType = room:GetType()
|
|
212
232
|
local roomStageID = getRoomStageID(nil)
|
|
213
233
|
local roomSubType = getRoomSubType(nil)
|
|
214
|
-
return roomType == RoomType.
|
|
234
|
+
return roomType == RoomType.MINI_BOSS and roomStageID == StageID.SPECIAL_ROOMS and roomSubType == minibossID
|
|
215
235
|
end
|
|
216
236
|
function ____exports.inSecretShop(self)
|
|
217
237
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
218
|
-
return roomGridIndex ==
|
|
238
|
+
return roomGridIndex == GridRoom.SECRET_SHOP
|
|
219
239
|
end
|
|
220
240
|
function ____exports.inStartingRoom(self)
|
|
221
241
|
local level = game:GetLevel()
|
|
222
242
|
local startingRoomGridIndex = level:GetStartingRoomIndex()
|
|
223
243
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
224
|
-
return roomGridIndex == startingRoomGridIndex and ____exports.inDimension(nil,
|
|
244
|
+
return roomGridIndex == startingRoomGridIndex and ____exports.inDimension(nil, Dimension.MAIN)
|
|
225
245
|
end
|
|
226
246
|
function ____exports.isAllRoomsClear(self, onlyCheckRoomTypes)
|
|
227
247
|
local ____temp_0
|
|
@@ -263,7 +283,7 @@ function ____exports.isDoorSlotValidAtGridIndexForRedRoom(self, doorSlot, roomGr
|
|
|
263
283
|
end
|
|
264
284
|
function ____exports.isRedKeyRoom(self, roomGridIndex)
|
|
265
285
|
local roomDescriptor = getRoomDescriptor(nil, roomGridIndex)
|
|
266
|
-
return hasFlag(nil, roomDescriptor.Flags,
|
|
286
|
+
return hasFlag(nil, roomDescriptor.Flags, RoomDescriptorFlag.RED_ROOM)
|
|
267
287
|
end
|
|
268
288
|
function ____exports.isRoomInsideMap(self, roomGridIndex)
|
|
269
289
|
if roomGridIndex == nil then
|
|
@@ -290,14 +310,14 @@ function ____exports.setRoomCleared(self)
|
|
|
290
310
|
for ____, door in ipairs(getDoors(nil)) do
|
|
291
311
|
do
|
|
292
312
|
if isHiddenSecretRoomDoor(nil, door) then
|
|
293
|
-
goto
|
|
313
|
+
goto __continue56
|
|
294
314
|
end
|
|
295
315
|
openDoorFast(nil, door)
|
|
296
316
|
door.ExtraVisible = false
|
|
297
317
|
end
|
|
298
|
-
::
|
|
318
|
+
::__continue56::
|
|
299
319
|
end
|
|
300
|
-
sfxManager:Stop(SoundEffect.
|
|
320
|
+
sfxManager:Stop(SoundEffect.DOOR_HEAVY_OPEN)
|
|
301
321
|
game:ShakeScreen(0)
|
|
302
322
|
end
|
|
303
323
|
function ____exports.setRoomUncleared(self)
|
package/dist/functions/run.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { PlayerType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Whether or not the player is playing on a set seed (i.e. that they entered in a specific seed by
|
|
4
4
|
* pressing tab on the character selection screen). When the player resets the game on a set seed,
|
package/dist/functions/run.lua
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local Challenge = ____isaac_2Dtypescript_2Ddefinitions.Challenge
|
|
3
4
|
local ____cachedClasses = require("cachedClasses")
|
|
4
5
|
local game = ____cachedClasses.game
|
|
5
6
|
local ____log = require("functions.log")
|
|
@@ -8,7 +9,7 @@ function ____exports.onSetSeed(self)
|
|
|
8
9
|
local seeds = game:GetSeeds()
|
|
9
10
|
local customRun = seeds:IsCustomRun()
|
|
10
11
|
local challenge = Isaac.GetChallenge()
|
|
11
|
-
return challenge == Challenge.
|
|
12
|
+
return challenge == Challenge.NULL and customRun
|
|
12
13
|
end
|
|
13
14
|
function ____exports.restart(self, character)
|
|
14
15
|
if character == nil then
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
1
2
|
/** Alias for the `Seeds.GetStartSeedString` method. */
|
|
2
3
|
export declare function getStartSeedString(): string;
|
|
4
|
+
/**
|
|
5
|
+
* Helper function to get the next seed value.
|
|
6
|
+
*
|
|
7
|
+
* This function is useful when you are working with seed values directly over RNG objects.
|
|
8
|
+
*/
|
|
9
|
+
export declare function nextSeed(seed: Seed): Seed;
|
package/dist/functions/seeds.lua
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
3
2
|
local ____cachedClasses = require("cachedClasses")
|
|
4
3
|
local game = ____cachedClasses.game
|
|
4
|
+
local ____rng = require("functions.rng")
|
|
5
|
+
local newRNG = ____rng.newRNG
|
|
5
6
|
function ____exports.getStartSeedString(self)
|
|
6
7
|
local seeds = game:GetSeeds()
|
|
7
8
|
return seeds:GetStartSeedString()
|
|
8
9
|
end
|
|
10
|
+
function ____exports.nextSeed(self, seed)
|
|
11
|
+
local rng = newRNG(nil, seed)
|
|
12
|
+
rng:Next()
|
|
13
|
+
return rng:GetSeed()
|
|
14
|
+
end
|
|
9
15
|
return ____exports
|
package/dist/functions/sound.lua
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
3
4
|
local ____cachedClasses = require("cachedClasses")
|
|
4
5
|
local sfxManager = ____cachedClasses.sfxManager
|
|
5
|
-
local
|
|
6
|
-
local getEnumValues =
|
|
6
|
+
local ____enums = require("functions.enums")
|
|
7
|
+
local getEnumValues = ____enums.getEnumValues
|
|
7
8
|
function ____exports.stopAllSoundEffects(self)
|
|
8
9
|
for ____, soundEffect in ipairs(getEnumValues(nil, SoundEffect)) do
|
|
9
10
|
sfxManager:Stop(soundEffect)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { CollectibleType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to spawn a collectible. Use this instead of the `Game.Spawn` method because it
|
|
4
4
|
* handles the cases of Tainted Keeper collectibles costing coins and preventing quest items from
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
export declare function spawnCollectible(collectibleType: CollectibleType | int, position: Vector, seedOrRNG?: Seed | RNG, options?: boolean, forceFreeItem?: boolean): EntityPickup;
|
|
18
18
|
/**
|
|
19
19
|
* Helper function to spawn an empty collectible. Doing this is tricky since spawning a collectible
|
|
20
|
-
* with `CollectibleType.
|
|
21
|
-
*
|
|
20
|
+
* with `CollectibleType.NULL` will result in spawning a collectible with a random type from the
|
|
21
|
+
* current room's item pool.
|
|
22
22
|
*
|
|
23
|
-
* Instead, this function arbitrarily spawns a collectible with
|
|
24
|
-
*
|
|
23
|
+
* Instead, this function arbitrarily spawns a collectible with `CollectibleType.SAD_ONION`, and
|
|
24
|
+
* then converts it to an empty pedestal afterward.
|
|
25
25
|
*
|
|
26
26
|
* @param position The position to spawn the empty collectible at.
|
|
27
27
|
* @param seedOrRNG The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
4
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
5
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
3
6
|
local ____preventCollectibleRotate = require("features.preventCollectibleRotate")
|
|
4
7
|
local preventCollectibleRotate = ____preventCollectibleRotate.preventCollectibleRotate
|
|
5
8
|
local ____featuresInitialized = require("featuresInitialized")
|
|
@@ -28,7 +31,7 @@ function ____exports.spawnCollectible(self, collectibleType, position, seedOrRNG
|
|
|
28
31
|
local seed = isRNG(nil, seedOrRNG) and seedOrRNG:Next() or seedOrRNG
|
|
29
32
|
local collectible = spawnPickupWithSeed(
|
|
30
33
|
nil,
|
|
31
|
-
|
|
34
|
+
PickupVariant.COLLECTIBLE,
|
|
32
35
|
collectibleType,
|
|
33
36
|
position,
|
|
34
37
|
seed
|
|
@@ -36,7 +39,7 @@ function ____exports.spawnCollectible(self, collectibleType, position, seedOrRNG
|
|
|
36
39
|
if options then
|
|
37
40
|
collectible.OptionsPickupIndex = 1
|
|
38
41
|
end
|
|
39
|
-
if anyPlayerIs(nil, PlayerType.
|
|
42
|
+
if anyPlayerIs(nil, PlayerType.KEEPER_B) and not isQuestCollectible(nil, collectibleType) and not forceFreeItem then
|
|
40
43
|
collectible.ShopItemId = -1
|
|
41
44
|
collectible.Price = 15
|
|
42
45
|
end
|
|
@@ -51,7 +54,7 @@ function ____exports.spawnEmptyCollectible(self, position, seedOrRNG)
|
|
|
51
54
|
end
|
|
52
55
|
local collectible = ____exports.spawnCollectible(
|
|
53
56
|
nil,
|
|
54
|
-
CollectibleType.
|
|
57
|
+
CollectibleType.SAD_ONION,
|
|
55
58
|
position,
|
|
56
59
|
seedOrRNG,
|
|
57
60
|
false,
|
|
@@ -23,7 +23,7 @@ export declare function clearSprite(sprite: Sprite, ...layerIDs: int[]): void;
|
|
|
23
23
|
* to use this function on animations that are not slowed down by Stop Watch or Broken Watch, such
|
|
24
24
|
* as player animations.
|
|
25
25
|
*/
|
|
26
|
-
export declare function
|
|
26
|
+
export declare function getLastFrameOfAnimation(sprite: Sprite, animation?: string): int;
|
|
27
27
|
/**
|
|
28
28
|
* Helper function to check if two sprite layers have the same sprite sheet by using the
|
|
29
29
|
* `Sprite.GetTexel` method.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
3
2
|
local ____constants = require("constants")
|
|
4
3
|
local EMPTY_PNG_PATH = ____constants.EMPTY_PNG_PATH
|
|
@@ -6,7 +5,7 @@ local VectorZero = ____constants.VectorZero
|
|
|
6
5
|
local ____kColor = require("functions.kColor")
|
|
7
6
|
local kColorEquals = ____kColor.kColorEquals
|
|
8
7
|
local ____math = require("functions.math")
|
|
9
|
-
local
|
|
8
|
+
local erange = ____math.erange
|
|
10
9
|
function ____exports.texelEquals(self, sprite1, sprite2, position, layerID)
|
|
11
10
|
local kColor1 = sprite1:GetTexel(position, VectorZero, 1, layerID)
|
|
12
11
|
local kColor2 = sprite2:GetTexel(position, VectorZero, 1, layerID)
|
|
@@ -16,14 +15,14 @@ function ____exports.clearSprite(self, sprite, ...)
|
|
|
16
15
|
local layerIDs = {...}
|
|
17
16
|
if #layerIDs == 0 then
|
|
18
17
|
local numLayers = sprite:GetLayerCount()
|
|
19
|
-
layerIDs =
|
|
18
|
+
layerIDs = erange(nil, numLayers)
|
|
20
19
|
end
|
|
21
20
|
for ____, layerID in ipairs(layerIDs) do
|
|
22
21
|
sprite:ReplaceSpritesheet(layerID, EMPTY_PNG_PATH)
|
|
23
22
|
end
|
|
24
23
|
sprite:LoadGraphics()
|
|
25
24
|
end
|
|
26
|
-
function ____exports.
|
|
25
|
+
function ____exports.getLastFrameOfAnimation(self, sprite, animation)
|
|
27
26
|
local currentAnimation = sprite:GetAnimation()
|
|
28
27
|
local currentFrame = sprite:GetFrame()
|
|
29
28
|
if animation ~= nil and animation ~= currentAnimation then
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { LevelStage, StageType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to account for Repentance floors being offset by 1. For example, Downpour 2 is
|
|
4
4
|
* the third level of the run, but the game considers it to have a stage of 2. This function will
|
|
@@ -28,8 +28,8 @@ export declare function onRepentanceStage(): boolean;
|
|
|
28
28
|
export declare function onSheol(): boolean;
|
|
29
29
|
/**
|
|
30
30
|
* Helper function to convert a numerical `StageType` into the letter suffix supplied to the "stage"
|
|
31
|
-
* console command. For example, `StageType.
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* console command. For example, `StageType.REPENTANCE` is the stage type for Downpour, and the
|
|
32
|
+
* console command to go to Downpour is "stage 1c", so this function converts `StageType.REPENTANCE`
|
|
33
|
+
* to "c".
|
|
34
34
|
*/
|
|
35
35
|
export declare function stageTypeToLetter(stageType: StageType): string;
|