isaacscript-common 1.2.291 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cachedClasses.d.ts +1 -1
- package/dist/cachedClasses.lua +0 -1
- package/dist/callbacks/customRevive.lua +13 -8
- package/dist/callbacks/itemPickup.lua +3 -1
- package/dist/callbacks/postBombInitLate.lua +3 -1
- package/dist/callbacks/postBoneSwing.lua +5 -2
- package/dist/callbacks/postCollectibleInitFirst.lua +4 -1
- package/dist/callbacks/postCursedTeleport.lua +16 -8
- package/dist/callbacks/postCustomDoorEnter.d.ts +1 -1
- package/dist/callbacks/postCustomDoorEnter.lua +20 -14
- package/dist/callbacks/postEffectInitLate.lua +3 -1
- package/dist/callbacks/postEffectStateChanged.lua +3 -1
- package/dist/callbacks/postEsauJr.lua +5 -2
- package/dist/callbacks/postFamiliarInitLate.lua +3 -1
- package/dist/callbacks/postFamiliarStateChanged.lua +3 -1
- package/dist/callbacks/postFlip.lua +9 -5
- package/dist/callbacks/postGreedModeWave.d.ts +1 -0
- package/dist/callbacks/postGreedModeWave.lua +32 -0
- package/dist/callbacks/postGreedWave.d.ts +1 -0
- package/dist/callbacks/postGreedWave.lua +31 -0
- package/dist/callbacks/postGridEntity.lua +9 -7
- package/dist/callbacks/postGridEntityCollision.lua +5 -2
- package/dist/callbacks/postHolyMantleRemoved.d.ts +1 -0
- package/dist/callbacks/postHolyMantleRemoved.lua +39 -0
- package/dist/callbacks/postItemDischarged.lua +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.d.ts +1 -0
- package/dist/callbacks/postRoomClearChanged.lua +40 -0
- package/dist/callbacks/postSacrifice.lua +8 -4
- package/dist/callbacks/postSlotInitUpdate.lua +4 -2
- package/dist/callbacks/postSlotRender.lua +3 -1
- package/dist/callbacks/postTearInitLate.lua +3 -1
- package/dist/callbacks/postTearInitVeryLate.lua +3 -1
- package/dist/callbacks/postTransformation.lua +7 -12
- package/dist/callbacks/postTrinketBreak.lua +8 -3
- package/dist/callbacks/preBerserkDeath.lua +3 -2
- package/dist/callbacks/preNewLevel.lua +5 -3
- package/dist/callbacks/reorderedCallbacks.lua +7 -5
- package/dist/callbacks/subscriptions/postBombInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postBombInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postBoneSwing.d.ts +3 -1
- package/dist/callbacks/subscriptions/postBoneSwing.lua +3 -3
- package/dist/callbacks/subscriptions/postCollectibleInitFirst.d.ts +5 -2
- package/dist/callbacks/subscriptions/postCollectibleInitFirst.lua +3 -3
- package/dist/callbacks/subscriptions/postCursedTeleport.d.ts +3 -1
- package/dist/callbacks/subscriptions/postCursedTeleport.lua +3 -3
- package/dist/callbacks/subscriptions/postCustomDoorEnter.d.ts +5 -2
- package/dist/callbacks/subscriptions/postCustomDoorEnter.lua +3 -3
- package/dist/callbacks/subscriptions/postCustomRevive.d.ts +4 -1
- package/dist/callbacks/subscriptions/postCustomRevive.lua +3 -3
- package/dist/callbacks/subscriptions/postEffectInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postEffectInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postEffectStateChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postEffectStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postEsauJr.d.ts +3 -1
- package/dist/callbacks/subscriptions/postEsauJr.lua +3 -3
- package/dist/callbacks/subscriptions/postFamiliarInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postFamiliarInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postFamiliarStateChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postFamiliarStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postFirstEsauJr.d.ts +3 -1
- package/dist/callbacks/subscriptions/postFirstEsauJr.lua +3 -3
- package/dist/callbacks/subscriptions/postFirstFlip.d.ts +3 -1
- package/dist/callbacks/subscriptions/postFirstFlip.lua +3 -3
- package/dist/callbacks/subscriptions/postFlip.d.ts +3 -1
- package/dist/callbacks/subscriptions/postFlip.lua +3 -3
- package/dist/callbacks/subscriptions/postGameStartedReordered.d.ts +3 -1
- package/dist/callbacks/subscriptions/postGameStartedReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postGreedModeWave.d.ts +4 -0
- package/dist/callbacks/subscriptions/postGreedModeWave.lua +16 -0
- package/dist/callbacks/subscriptions/postGreedWave.d.ts +2 -0
- package/dist/callbacks/subscriptions/postGreedWave.lua +16 -0
- package/dist/callbacks/subscriptions/postGridEntityBroken.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityBroken.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityCollision.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityCollision.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityInit.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityInit.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityRemove.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityRemove.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityStateChanged.d.ts +5 -0
- package/dist/callbacks/subscriptions/postGridEntityStateChanged.lua +23 -0
- package/dist/callbacks/subscriptions/postGridEntityUpdate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postHolyMantleRemoved.d.ts +6 -0
- package/dist/callbacks/subscriptions/postHolyMantleRemoved.lua +28 -0
- package/dist/callbacks/subscriptions/postItemDischarged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postItemDischarged.lua +3 -3
- package/dist/callbacks/subscriptions/postItemPickup.d.ts +6 -2
- package/dist/callbacks/subscriptions/postItemPickup.lua +3 -3
- package/dist/callbacks/subscriptions/postKnifeInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postKnifeInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postLaserInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postLaserInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postNPCInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postNPCInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postNPCStateChanged.d.ts +6 -2
- package/dist/callbacks/subscriptions/postNPCStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postNewLevelReordered.d.ts +1 -1
- package/dist/callbacks/subscriptions/postNewLevelReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postNewRoomEarly.d.ts +1 -1
- package/dist/callbacks/subscriptions/postNewRoomEarly.lua +3 -3
- package/dist/callbacks/subscriptions/postNewRoomReordered.d.ts +1 -1
- package/dist/callbacks/subscriptions/postNewRoomReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.d.ts +6 -2
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.lua +8 -4
- package/dist/callbacks/subscriptions/postPickupCollect.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPickupCollect.lua +3 -3
- package/dist/callbacks/subscriptions/postPickupInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPickupInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPickupStateChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPickupStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeType.d.ts +4 -2
- package/dist/callbacks/subscriptions/postPlayerChangeType.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitReordered.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postProjectileInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postProjectileInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPurchase.d.ts +6 -2
- package/dist/callbacks/subscriptions/postPurchase.lua +3 -3
- package/dist/callbacks/subscriptions/postRoomClearChanged.d.ts +3 -0
- package/dist/callbacks/subscriptions/postRoomClearChanged.lua +16 -0
- package/dist/callbacks/subscriptions/postSacrifice.d.ts +3 -1
- package/dist/callbacks/subscriptions/postSacrifice.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotAnimationChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotAnimationChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotDestroyed.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotDestroyed.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotInit.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotInit.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotRender.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotRender.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotUpdate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postTearInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postTearInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postTearInitVeryLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postTearInitVeryLate.lua +3 -3
- package/dist/callbacks/subscriptions/postTransformation.d.ts +5 -2
- package/dist/callbacks/subscriptions/postTransformation.lua +3 -3
- package/dist/callbacks/subscriptions/postTrinketBreak.d.ts +5 -2
- package/dist/callbacks/subscriptions/postTrinketBreak.lua +3 -3
- package/dist/callbacks/subscriptions/preBerserkDeath.d.ts +5 -2
- package/dist/callbacks/subscriptions/preBerserkDeath.lua +3 -3
- package/dist/callbacks/subscriptions/preCustomRevive.d.ts +3 -1
- package/dist/callbacks/subscriptions/preCustomRevive.lua +3 -3
- package/dist/callbacks/subscriptions/preItemPickup.d.ts +6 -2
- package/dist/callbacks/subscriptions/preItemPickup.lua +3 -3
- package/dist/callbacks/subscriptions/preNewLevel.d.ts +3 -1
- package/dist/callbacks/subscriptions/preNewLevel.lua +3 -3
- package/dist/classes/ModUpgraded.d.ts +5 -5
- package/dist/constants.d.ts +9 -43
- package/dist/constants.lua +16 -13
- package/dist/constantsMax.d.ts +16 -0
- package/dist/constantsMax.lua +27 -0
- package/dist/enums/CardType.lua +1 -1
- package/dist/enums/CollectiblePedestalType.lua +1 -1
- package/dist/enums/HealthType.d.ts +3 -3
- package/dist/enums/HealthType.lua +1 -2
- package/dist/enums/ModCallbacksCustom.d.ts +89 -59
- package/dist/enums/ModCallbacksCustom.lua +110 -107
- package/dist/enums/PillEffectClass.lua +1 -1
- package/dist/enums/PillEffectType.lua +1 -1
- package/dist/enums/PocketItemType.lua +1 -2
- package/dist/enums/SerializationType.lua +1 -2
- package/dist/enums/private/CopyableIsaacAPIClassType.d.ts +1 -1
- package/dist/enums/private/CopyableIsaacAPIClassType.lua +2 -3
- package/dist/enums/private/SaveDataKeys.d.ts +4 -4
- package/dist/enums/private/SaveDataKeys.lua +5 -6
- package/dist/enums/private/SerializationBrand.d.ts +3 -4
- package/dist/enums/private/SerializationBrand.lua +2 -15
- package/dist/features/characterHealthConversion.d.ts +2 -2
- package/dist/features/characterHealthConversion.lua +8 -4
- package/dist/features/characterStats.d.ts +4 -4
- package/dist/features/characterStats.lua +3 -1
- package/dist/features/debugDisplay.lua +12 -11
- package/dist/features/deployJSONRoom.d.ts +3 -3
- package/dist/features/deployJSONRoom.lua +35 -21
- package/dist/features/disableInputs.d.ts +1 -1
- package/dist/features/disableInputs.lua +6 -3
- package/dist/features/disableSound.lua +3 -1
- package/dist/features/extraConsoleCommands/commands.d.ts +5 -3
- package/dist/features/extraConsoleCommands/commands.lua +96 -56
- package/dist/features/extraConsoleCommands/commandsDisplay.lua +0 -1
- package/dist/features/extraConsoleCommands/commandsSubroutines.d.ts +1 -1
- package/dist/features/extraConsoleCommands/commandsSubroutines.lua +13 -10
- package/dist/features/extraConsoleCommands/init.lua +17 -9
- package/dist/features/extraConsoleCommands/v.lua +0 -1
- package/dist/features/fadeInRemover.lua +3 -2
- package/dist/features/fastReset.lua +7 -5
- package/dist/features/forgottenSwitch.lua +6 -3
- package/dist/features/getCollectibleItemPoolType.d.ts +1 -1
- package/dist/features/getCollectibleItemPoolType.lua +6 -2
- package/dist/features/isPonyActive.lua +5 -2
- package/dist/features/playerInventory.d.ts +1 -1
- package/dist/features/playerInventory.lua +7 -3
- package/dist/features/preventCollectibleRotate.d.ts +1 -1
- package/dist/features/preventCollectibleRotate.lua +9 -4
- package/dist/features/runInNFrames.lua +4 -2
- package/dist/features/saveDataManager/constants.lua +0 -1
- package/dist/features/saveDataManager/exports.d.ts +9 -8
- package/dist/features/saveDataManager/main.lua +11 -9
- package/dist/features/saveDataManager/maps.d.ts +5 -0
- package/dist/features/saveDataManager/merge.d.ts +1 -1
- package/dist/features/saveDataManager/merge.lua +2 -1
- package/dist/features/saveDataManager/serializationBrand.d.ts +1 -0
- package/dist/features/saveDataManager/serializationBrand.lua +17 -0
- package/dist/features/sirenHelpers.d.ts +1 -1
- package/dist/features/sirenHelpers.lua +5 -2
- package/dist/features/taintedLazarusPlayers.lua +6 -3
- package/dist/featuresInitialized.lua +0 -1
- package/dist/functions/array.d.ts +18 -2
- package/dist/functions/array.lua +29 -3
- package/dist/functions/bitwise.lua +0 -1
- package/dist/functions/boss.d.ts +1 -1
- package/dist/functions/boss.lua +12 -9
- package/dist/functions/cacheFlag.d.ts +2 -2
- package/dist/functions/cacheFlag.lua +0 -1
- package/dist/functions/cards.d.ts +9 -17
- package/dist/functions/cards.lua +22 -23
- package/dist/functions/challenges.d.ts +1 -1
- package/dist/functions/challenges.lua +0 -1
- package/dist/functions/character.d.ts +6 -4
- package/dist/functions/character.lua +16 -7
- package/dist/functions/charge.d.ts +1 -1
- package/dist/functions/charge.lua +14 -9
- package/dist/functions/chargeBar.lua +0 -1
- package/dist/functions/collectibleCacheFlag.d.ts +4 -4
- package/dist/functions/collectibleCacheFlag.lua +8 -5
- package/dist/functions/collectibleSet.d.ts +1 -1
- package/dist/functions/collectibleSet.lua +4 -5
- package/dist/functions/collectibleTag.d.ts +1 -2
- package/dist/functions/collectibleTag.lua +12 -10
- package/dist/functions/collectibles.d.ts +21 -28
- package/dist/functions/collectibles.lua +29 -26
- package/dist/functions/color.lua +9 -1
- package/dist/functions/debug.d.ts +12 -0
- package/dist/functions/debug.lua +3 -1
- package/dist/functions/deepCopy.d.ts +1 -1
- package/dist/functions/deepCopy.lua +4 -2
- package/dist/functions/direction.d.ts +4 -0
- package/dist/functions/direction.lua +17 -0
- package/dist/functions/doors.d.ts +12 -16
- package/dist/functions/doors.lua +34 -26
- package/dist/functions/easing.lua +0 -1
- package/dist/functions/entity.d.ts +4 -5
- package/dist/functions/entity.lua +4 -12
- package/dist/functions/entitySpecific.d.ts +35 -33
- package/dist/functions/entitySpecific.lua +20 -19
- package/dist/functions/enums.d.ts +70 -0
- package/dist/functions/enums.lua +71 -0
- package/dist/functions/familiars.d.ts +2 -2
- package/dist/functions/familiars.lua +0 -1
- package/dist/functions/flag.d.ts +42 -10
- package/dist/functions/flag.lua +31 -13
- package/dist/functions/flying.d.ts +2 -2
- package/dist/functions/flying.lua +20 -14
- package/dist/functions/globals.lua +5 -2
- package/dist/functions/gridEntity.d.ts +18 -16
- package/dist/functions/gridEntity.lua +39 -26
- package/dist/functions/input.d.ts +14 -4
- package/dist/functions/input.lua +38 -80
- package/dist/functions/jsonHelpers.d.ts +9 -7
- package/dist/functions/jsonHelpers.lua +0 -1
- package/dist/functions/kColor.lua +14 -3
- package/dist/functions/language.lua +9 -8
- package/dist/functions/log.d.ts +21 -15
- package/dist/functions/log.lua +61 -36
- package/dist/functions/math.d.ts +19 -8
- package/dist/functions/math.lua +33 -22
- package/dist/functions/mergeTests.lua +0 -1
- package/dist/functions/npc.d.ts +1 -1
- package/dist/functions/npc.lua +32 -16
- package/dist/functions/pickups.d.ts +10 -26
- package/dist/functions/pickups.lua +31 -29
- package/dist/functions/pills.d.ts +14 -13
- package/dist/functions/pills.lua +9 -3
- package/dist/functions/player.d.ts +11 -11
- package/dist/functions/player.lua +79 -66
- package/dist/functions/playerHealth.lua +19 -16
- package/dist/functions/playerIndex.d.ts +3 -3
- package/dist/functions/playerIndex.lua +9 -6
- package/dist/functions/pocketItems.d.ts +3 -3
- 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.d.ts +2 -0
- package/dist/initCustomCallbacks.lua +133 -0
- package/dist/initFeatures.d.ts +3 -0
- package/dist/initFeatures.lua +54 -0
- package/dist/lualib_bundle.lua +14 -1
- package/dist/maps/cardMap.d.ts +1 -1
- package/dist/maps/characterMap.d.ts +1 -1
- package/dist/maps/collectibleDescriptionMap.d.ts +1 -1
- package/dist/maps/collectibleNameMap.d.ts +1 -1
- package/dist/maps/defaultPlayerStatMap.d.ts +1 -1
- package/dist/maps/defaultPlayerStatMap.lua +8 -6
- package/dist/maps/gridEntityTypeToBrokenStateMap.d.ts +1 -1
- package/dist/maps/gridEntityTypeToBrokenStateMap.lua +19 -12
- package/dist/maps/gridEntityXMLMap.d.ts +1 -1
- package/dist/maps/gridEntityXMLMap.lua +44 -34
- package/dist/maps/pillEffectMap.d.ts +1 -1
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.d.ts +1 -1
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.lua +7 -5
- package/dist/maps/roomTypeMap.d.ts +1 -1
- package/dist/maps/roomTypeMap.lua +37 -35
- package/dist/maps/trinketDescriptionMap.d.ts +1 -1
- package/dist/maps/trinketNameMap.d.ts +1 -1
- package/dist/objects/LRoomShapeToRectangles.d.ts +1 -1
- package/dist/objects/LRoomShapeToRectangles.lua +6 -5
- package/dist/objects/callbackRegisterFunctions.d.ts +2 -2
- package/dist/objects/callbackRegisterFunctions.lua +57 -52
- package/dist/objects/cardDescriptions.d.ts +1 -1
- package/dist/objects/cardDescriptions.lua +89 -90
- package/dist/objects/cardNames.d.ts +1 -1
- package/dist/objects/cardNames.lua +89 -90
- package/dist/objects/cardTypes.d.ts +3 -4
- package/dist/objects/cardTypes.lua +102 -104
- package/dist/objects/challengeNames.d.ts +1 -1
- package/dist/objects/challengeNames.lua +48 -48
- package/dist/objects/characterNames.d.ts +1 -1
- package/dist/objects/characterNames.lua +44 -44
- package/dist/objects/coinSubTypeToValue.d.ts +1 -1
- package/dist/objects/coinSubTypeToValue.lua +10 -8
- package/dist/objects/colors.lua +0 -1
- package/dist/objects/directionNames.d.ts +1 -1
- package/dist/objects/directionNames.lua +2 -1
- package/dist/objects/directionToDegrees.d.ts +1 -1
- package/dist/objects/directionToDegrees.lua +2 -1
- package/dist/objects/directionToVector.d.ts +1 -1
- package/dist/objects/directionToVector.lua +2 -1
- package/dist/objects/doorSlotFlagToDoorSlot.d.ts +5 -0
- package/dist/objects/doorSlotFlagToDoorSlot.lua +16 -0
- package/dist/objects/doorSlotToDirection.d.ts +1 -1
- package/dist/objects/doorSlotToDirection.lua +11 -10
- package/dist/objects/isaacAPIClassTypeToBrand.lua +1 -2
- package/dist/objects/isaacAPIClassTypeToCopyFunction.lua +1 -2
- package/dist/objects/pillEffectClasses.d.ts +3 -4
- package/dist/objects/pillEffectClasses.lua +55 -57
- package/dist/objects/pillEffectNames.d.ts +1 -1
- package/dist/objects/pillEffectNames.lua +52 -53
- package/dist/objects/pillEffectTypes.d.ts +3 -4
- package/dist/objects/pillEffectTypes.lua +54 -56
- package/dist/objects/roomShapeBounds.d.ts +1 -1
- package/dist/objects/roomShapeBounds.lua +14 -16
- package/dist/objects/roomShapeLayoutSizes.d.ts +1 -1
- package/dist/objects/roomShapeLayoutSizes.lua +14 -14
- package/dist/objects/roomShapeToBottomRightPosition.d.ts +1 -1
- package/dist/objects/roomShapeToBottomRightPosition.lua +14 -16
- package/dist/objects/roomShapeToDoorSlots.d.ts +1 -1
- package/dist/objects/roomShapeToDoorSlots.lua +35 -33
- package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.d.ts +2 -2
- package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.lua +68 -66
- package/dist/objects/roomShapeToGridWidth.d.ts +1 -1
- package/dist/objects/roomShapeToGridWidth.lua +14 -14
- package/dist/objects/roomShapeToTopLeftPosition.d.ts +1 -1
- package/dist/objects/roomShapeToTopLeftPosition.lua +14 -14
- package/dist/objects/roomShapeVolumes.d.ts +1 -1
- package/dist/objects/roomShapeVolumes.lua +14 -14
- package/dist/objects/roomTypeNames.d.ts +1 -1
- package/dist/objects/roomTypeNames.lua +32 -32
- package/dist/objects/serializedIsaacAPIClassTypeToIdentityFunction.lua +1 -2
- package/dist/objects/stageTypeToLetter.d.ts +1 -1
- package/dist/objects/stageTypeToLetter.lua +8 -7
- package/dist/objects/transformationNames.d.ts +1 -1
- package/dist/objects/transformationNames.lua +16 -17
- package/dist/patchErrorFunctions.lua +1 -2
- package/dist/sets/LRoomShapesSet.d.ts +1 -1
- package/dist/sets/LRoomShapesSet.lua +3 -1
- package/dist/sets/bossSets.lua +241 -211
- package/dist/sets/charactersThatStartWithAnActiveItemSet.d.ts +1 -1
- package/dist/sets/charactersThatStartWithAnActiveItemSet.lua +13 -11
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.d.ts +1 -1
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.lua +3 -1
- package/dist/sets/charactersWithFreeDevilDealsSet.d.ts +1 -1
- package/dist/sets/charactersWithFreeDevilDealsSet.lua +3 -1
- package/dist/sets/charactersWithNoRedHeartsSet.d.ts +1 -1
- package/dist/sets/charactersWithNoRedHeartsSet.lua +10 -8
- package/dist/sets/charactersWithNoSoulHeartsSet.d.ts +1 -1
- package/dist/sets/charactersWithNoSoulHeartsSet.lua +7 -5
- package/dist/sets/chestPickupVariantsSet.d.ts +1 -1
- package/dist/sets/chestPickupVariantsSet.lua +14 -12
- package/dist/sets/familiarsThatShootPlayerTearsSet.d.ts +1 -1
- package/dist/sets/familiarsThatShootPlayerTearsSet.lua +2 -0
- package/dist/sets/lostStyleCharactersSet.d.ts +1 -1
- package/dist/sets/lostStyleCharactersSet.lua +7 -5
- package/dist/sets/redHeartSubTypesSet.d.ts +1 -1
- package/dist/sets/redHeartSubTypesSet.lua +3 -1
- package/dist/sets/sinEntityTypesSet.d.ts +1 -1
- package/dist/sets/sinEntityTypesSet.lua +9 -7
- package/dist/sets/singleUseActiveCollectibleTypesSet.d.ts +1 -1
- package/dist/sets/singleUseActiveCollectibleTypesSet.lua +10 -8
- package/dist/sets/storyBossesSet.d.ts +1 -1
- package/dist/sets/storyBossesSet.lua +15 -13
- package/dist/types/AddCallbackParameterCustom.d.ts +123 -0
- package/dist/types/AddCallbackParameterCustom.lua +4 -0
- package/dist/types/AddCallbackParametersCustom.d.ts +120 -271
- package/dist/types/AnyEntity.lua +0 -1
- package/dist/types/CollectibleIndex.lua +0 -1
- package/dist/types/EntityTypeNonNPC.lua +0 -1
- package/dist/types/JSONDoor.lua +0 -1
- package/dist/types/JSONEntity.lua +0 -1
- package/dist/types/JSONRoom.lua +0 -1
- package/dist/types/JSONRooms.lua +0 -1
- package/dist/types/JSONSpawn.lua +0 -1
- package/dist/types/PickingUpItem.d.ts +1 -1
- package/dist/types/PickingUpItem.lua +5 -3
- package/dist/types/PlayerHealth.d.ts +1 -1
- package/dist/types/PlayerHealth.lua +0 -1
- package/dist/types/PlayerIndex.lua +0 -1
- package/dist/types/PocketItemDescription.d.ts +1 -1
- package/dist/types/PocketItemDescription.lua +0 -1
- package/dist/types/Primitive.lua +0 -1
- package/dist/types/TrinketSituation.d.ts +1 -1
- package/dist/types/TrinketSituation.lua +0 -1
- package/dist/types/private/IsaacAPIClass.lua +0 -1
- package/dist/types/private/SaveData.lua +0 -1
- package/dist/types/private/SerializedIsaacAPIClass.lua +0 -1
- package/dist/types/private/TSTLClass.lua +0 -1
- package/dist/types/private/TSTLClassMetatable.lua +0 -1
- package/dist/upgradeMod.d.ts +1 -1
- package/dist/upgradeMod.lua +5 -178
- package/package.json +9 -6
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
3
2
|
local initQuestionMarkSprite, COLLECTIBLE_SPRITE_LAYER, COLLECTIBLE_SHADOW_LAYER
|
|
3
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
4
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
5
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
6
|
+
local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
|
|
7
|
+
local PickupPrice = ____isaac_2Dtypescript_2Ddefinitions.PickupPrice
|
|
8
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
9
|
+
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
4
10
|
local ____cachedClasses = require("cachedClasses")
|
|
5
11
|
local game = ____cachedClasses.game
|
|
6
12
|
local itemConfig = ____cachedClasses.itemConfig
|
|
@@ -29,7 +35,7 @@ function initQuestionMarkSprite(self)
|
|
|
29
35
|
return sprite
|
|
30
36
|
end
|
|
31
37
|
function ____exports.setCollectibleSprite(self, collectible, pngPath)
|
|
32
|
-
if collectible.Variant ~=
|
|
38
|
+
if collectible.Variant ~= PickupVariant.COLLECTIBLE then
|
|
33
39
|
error("You cannot set a collectible sprite for pickups of variant: " .. tostring(collectible.Variant))
|
|
34
40
|
end
|
|
35
41
|
local sprite = collectible:GetSprite()
|
|
@@ -87,19 +93,19 @@ function ____exports.getCollectibleDescription(self, collectibleType)
|
|
|
87
93
|
end
|
|
88
94
|
function ____exports.getCollectibleDevilHeartPrice(self, collectibleType, player)
|
|
89
95
|
local maxHearts = player:GetMaxHearts()
|
|
90
|
-
if collectibleType == CollectibleType.
|
|
96
|
+
if collectibleType == CollectibleType.NULL then
|
|
91
97
|
return 0
|
|
92
98
|
end
|
|
93
99
|
if maxHearts == 0 then
|
|
94
|
-
return
|
|
100
|
+
return PickupPrice.THREE_SOUL_HEARTS
|
|
95
101
|
end
|
|
96
|
-
local defaultPickupPrice =
|
|
102
|
+
local defaultPickupPrice = PickupPrice.ONE_HEART
|
|
97
103
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
98
104
|
if itemConfigItem == nil then
|
|
99
105
|
return defaultPickupPrice
|
|
100
106
|
end
|
|
101
|
-
local twoHeartPrice = maxHearts == 2 and
|
|
102
|
-
return itemConfigItem.DevilPrice == 2 and twoHeartPrice or
|
|
107
|
+
local twoHeartPrice = maxHearts == 2 and PickupPrice.ONE_HEART_AND_TWO_SOUL_HEARTS or PickupPrice.TWO_HEARTS
|
|
108
|
+
return itemConfigItem.DevilPrice == 2 and twoHeartPrice or PickupPrice.ONE_HEART
|
|
103
109
|
end
|
|
104
110
|
function ____exports.getCollectibleGfxFilename(self, collectibleType)
|
|
105
111
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
@@ -109,7 +115,7 @@ function ____exports.getCollectibleGfxFilename(self, collectibleType)
|
|
|
109
115
|
return itemConfigItem.GfxFileName
|
|
110
116
|
end
|
|
111
117
|
function ____exports.getCollectibleIndex(self, collectible)
|
|
112
|
-
if collectible.Variant ~=
|
|
118
|
+
if collectible.Variant ~= PickupVariant.COLLECTIBLE then
|
|
113
119
|
error("You cannot get a collectible index for pickups of variant: " .. tostring(collectible.Variant))
|
|
114
120
|
end
|
|
115
121
|
local level = game:GetLevel()
|
|
@@ -119,7 +125,7 @@ function ____exports.getCollectibleIndex(self, collectible)
|
|
|
119
125
|
local roomType = room:GetType()
|
|
120
126
|
local gridIndex = room:GetGridIndex(collectible.Position)
|
|
121
127
|
local roomListIndex = getRoomListIndex(nil)
|
|
122
|
-
if roomType == RoomType.
|
|
128
|
+
if roomType == RoomType.TREASURE then
|
|
123
129
|
return (((((((tostring(stage) .. ",") .. tostring(stageType)) .. ",") .. tostring(gridIndex)) .. ",") .. tostring(collectible.SubType)) .. ",") .. tostring(collectible.InitSeed)
|
|
124
130
|
end
|
|
125
131
|
return (((((tostring(roomListIndex) .. ",") .. tostring(gridIndex)) .. ",") .. tostring(collectible.SubType)) .. ",") .. tostring(collectible.InitSeed)
|
|
@@ -134,7 +140,7 @@ end
|
|
|
134
140
|
function ____exports.getCollectibleItemType(self, collectibleType)
|
|
135
141
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
136
142
|
if itemConfigItem == nil then
|
|
137
|
-
return ItemType.
|
|
143
|
+
return ItemType.NULL
|
|
138
144
|
end
|
|
139
145
|
return itemConfigItem.Type
|
|
140
146
|
end
|
|
@@ -157,7 +163,7 @@ function ____exports.getCollectibleName(self, collectibleType)
|
|
|
157
163
|
return DEFAULT_COLLECTIBLE_NAME
|
|
158
164
|
end
|
|
159
165
|
function ____exports.getCollectiblePedestalType(self, collectible)
|
|
160
|
-
if collectible.Variant ~=
|
|
166
|
+
if collectible.Variant ~= PickupVariant.COLLECTIBLE then
|
|
161
167
|
error("You cannot get the pedestal type for pickups of variant: " .. tostring(collectible.Variant))
|
|
162
168
|
end
|
|
163
169
|
local sprite = collectible:GetSprite()
|
|
@@ -174,15 +180,12 @@ function ____exports.getCollectibleTags(self, collectibleType)
|
|
|
174
180
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
175
181
|
return itemConfigItem == nil and 0 or itemConfigItem.Tags
|
|
176
182
|
end
|
|
177
|
-
function ____exports.getMaxCollectibleType(self)
|
|
178
|
-
return itemConfig:GetCollectibles().Size - 1
|
|
179
|
-
end
|
|
180
183
|
function ____exports.isActiveCollectible(self, collectibleType)
|
|
181
184
|
local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
|
|
182
|
-
return itemType == ItemType.
|
|
185
|
+
return itemType == ItemType.ACTIVE
|
|
183
186
|
end
|
|
184
187
|
function ____exports.isBlindCollectible(self, collectible)
|
|
185
|
-
if collectible.Variant ~=
|
|
188
|
+
if collectible.Variant ~= PickupVariant.COLLECTIBLE then
|
|
186
189
|
error("You cannot get check for question mark sprites for pickups of variant: " .. tostring(collectible.Variant))
|
|
187
190
|
end
|
|
188
191
|
local sprite = collectible:GetSprite()
|
|
@@ -192,11 +195,11 @@ function ____exports.isBlindCollectible(self, collectible)
|
|
|
192
195
|
return ____exports.collectibleSpriteEquals(nil, sprite, questionMarkSprite)
|
|
193
196
|
end
|
|
194
197
|
function ____exports.isGlitchedCollectible(self, pickup)
|
|
195
|
-
return pickup.Variant ==
|
|
198
|
+
return pickup.Variant == PickupVariant.COLLECTIBLE and pickup.SubType > GLITCHED_ITEM_THRESHOLD
|
|
196
199
|
end
|
|
197
200
|
function ____exports.isPassiveCollectible(self, collectibleType)
|
|
198
201
|
local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
|
|
199
|
-
return itemType == ItemType.
|
|
202
|
+
return itemType == ItemType.PASSIVE or itemType == ItemType.FAMILIAR
|
|
200
203
|
end
|
|
201
204
|
function ____exports.isSingleUseCollectible(self, collectibleType)
|
|
202
205
|
return SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET:has(collectibleType)
|
|
@@ -206,35 +209,35 @@ function ____exports.removeCollectibleFromItemTracker(self, collectibleType)
|
|
|
206
209
|
Isaac.DebugString(((("Removing collectible " .. tostring(collectibleType)) .. " (") .. collectibleName) .. ") on player 0 (Player)")
|
|
207
210
|
end
|
|
208
211
|
function ____exports.removeCollectiblePickupDelay(self, collectible)
|
|
209
|
-
if collectible.Variant ~=
|
|
212
|
+
if collectible.Variant ~= PickupVariant.COLLECTIBLE then
|
|
210
213
|
error("You cannot remove pickup delay for pickups of variant: " .. tostring(collectible.Variant))
|
|
211
214
|
end
|
|
212
215
|
collectible.Wait = 0
|
|
213
216
|
end
|
|
214
217
|
function ____exports.setCollectibleBlind(self, collectible)
|
|
215
|
-
if collectible.Variant ~=
|
|
218
|
+
if collectible.Variant ~= PickupVariant.COLLECTIBLE then
|
|
216
219
|
error("You cannot set a collectible to be blind for pickups of variant: " .. tostring(collectible.Variant))
|
|
217
220
|
end
|
|
218
221
|
____exports.setCollectibleSprite(nil, collectible, BLIND_ITEM_PNG_PATH)
|
|
219
222
|
end
|
|
220
223
|
function ____exports.setCollectibleEmpty(self, collectible)
|
|
221
|
-
if collectible.Variant ~=
|
|
224
|
+
if collectible.Variant ~= PickupVariant.COLLECTIBLE then
|
|
222
225
|
error("You cannot set a collectible to be empty for pickups of variant: " .. tostring(collectible.Variant))
|
|
223
226
|
end
|
|
224
|
-
collectible.SubType = CollectibleType.
|
|
227
|
+
collectible.SubType = CollectibleType.NULL
|
|
225
228
|
____exports.clearCollectibleSprite(nil, collectible)
|
|
226
229
|
end
|
|
227
230
|
function ____exports.setCollectibleSubType(self, collectible, newCollectibleType)
|
|
228
|
-
if collectible.Variant ~=
|
|
231
|
+
if collectible.Variant ~= PickupVariant.COLLECTIBLE then
|
|
229
232
|
error("You cannot set a collectible sub-type for pickups of variant: " .. tostring(collectible.Variant))
|
|
230
233
|
end
|
|
231
|
-
if newCollectibleType == CollectibleType.
|
|
234
|
+
if newCollectibleType == CollectibleType.NULL then
|
|
232
235
|
____exports.setCollectibleEmpty(nil, collectible)
|
|
233
236
|
return
|
|
234
237
|
end
|
|
235
238
|
collectible:Morph(
|
|
236
|
-
EntityType.
|
|
237
|
-
|
|
239
|
+
EntityType.PICKUP,
|
|
240
|
+
PickupVariant.COLLECTIBLE,
|
|
238
241
|
newCollectibleType,
|
|
239
242
|
true,
|
|
240
243
|
true,
|
package/dist/functions/color.lua
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
3
2
|
local OBJECT_NAME
|
|
4
3
|
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
@@ -78,6 +77,15 @@ function ____exports.copyColor(self, color, serializationType)
|
|
|
78
77
|
OBJECT_NAME,
|
|
79
78
|
table.unpack(KEYS)
|
|
80
79
|
))
|
|
80
|
+
if r == nil then
|
|
81
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: r")
|
|
82
|
+
end
|
|
83
|
+
if g == nil then
|
|
84
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: g")
|
|
85
|
+
end
|
|
86
|
+
if b == nil then
|
|
87
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: b")
|
|
88
|
+
end
|
|
81
89
|
return Color(
|
|
82
90
|
r,
|
|
83
91
|
g,
|
|
@@ -5,6 +5,18 @@
|
|
|
5
5
|
* enabled.
|
|
6
6
|
*/
|
|
7
7
|
export declare function getTraceback(): string;
|
|
8
|
+
/**
|
|
9
|
+
* Players can boot the game with an launch option called "--luadebug", which will enable additional
|
|
10
|
+
* functionality that is considered to be unsafe. For more information about this flag, see the
|
|
11
|
+
* wiki: https://bindingofisaacrebirth.fandom.com/wiki/Launch_Options
|
|
12
|
+
*
|
|
13
|
+
* When this flag is enabled, the global environment will be slightly different. The differences are
|
|
14
|
+
* documented here: https://wofsauge.github.io/IsaacDocs/rep/Globals.html
|
|
15
|
+
*
|
|
16
|
+
* This function uses the `package` global variable as a proxy to determine if the "--luadebug" flag
|
|
17
|
+
* is enabled or not.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isLuaDebugEnabled(): boolean;
|
|
8
20
|
/**
|
|
9
21
|
* Helper function to print a stack trace to the "log.txt" file, similar to JavaScript's
|
|
10
22
|
* `console.trace` function.
|
package/dist/functions/debug.lua
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
3
2
|
local ____log = require("functions.log")
|
|
4
3
|
local log = ____log.log
|
|
@@ -11,6 +10,9 @@ function ____exports.getTraceback(self)
|
|
|
11
10
|
end
|
|
12
11
|
return "stack traceback:\n(the \"--luadebug\" flag is not enabled)"
|
|
13
12
|
end
|
|
13
|
+
function ____exports.isLuaDebugEnabled(self)
|
|
14
|
+
return package ~= nil
|
|
15
|
+
end
|
|
14
16
|
function ____exports.traceback(self)
|
|
15
17
|
local tracebackOutput = ____exports.getTraceback(nil)
|
|
16
18
|
log(tracebackOutput)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SerializationType } from "../enums/SerializationType";
|
|
2
2
|
/**
|
|
3
|
-
* deepCopy is a semi-generic deep cloner. It will recursively copy all of the values so that none
|
|
3
|
+
* `deepCopy` is a semi-generic deep cloner. It will recursively copy all of the values so that none
|
|
4
4
|
* of the nested references remain.
|
|
5
5
|
*
|
|
6
6
|
* It supports the following object types:
|
|
@@ -14,14 +14,17 @@ local DefaultMap = ____DefaultMap.DefaultMap
|
|
|
14
14
|
local ____CopyableIsaacAPIClassType = require("enums.private.CopyableIsaacAPIClassType")
|
|
15
15
|
local CopyableIsaacAPIClassType = ____CopyableIsaacAPIClassType.CopyableIsaacAPIClassType
|
|
16
16
|
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
17
|
-
local isSerializationBrand = ____SerializationBrand.isSerializationBrand
|
|
18
17
|
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
19
18
|
local ____SerializationType = require("enums.SerializationType")
|
|
20
19
|
local SerializationType = ____SerializationType.SerializationType
|
|
21
20
|
local ____constants = require("features.saveDataManager.constants")
|
|
22
21
|
local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
|
|
22
|
+
local ____serializationBrand = require("features.saveDataManager.serializationBrand")
|
|
23
|
+
local isSerializationBrand = ____serializationBrand.isSerializationBrand
|
|
23
24
|
local ____array = require("functions.array")
|
|
24
25
|
local isArray = ____array.isArray
|
|
26
|
+
local ____enums = require("functions.enums")
|
|
27
|
+
local getEnumValues = ____enums.getEnumValues
|
|
25
28
|
local ____isaacAPIClass = require("functions.isaacAPIClass")
|
|
26
29
|
local getIsaacAPIClassType = ____isaacAPIClass.getIsaacAPIClassType
|
|
27
30
|
local ____log = require("functions.log")
|
|
@@ -35,7 +38,6 @@ local isUserDefinedTSTLClass = ____tstlClass.isUserDefinedTSTLClass
|
|
|
35
38
|
local newTSTLClass = ____tstlClass.newTSTLClass
|
|
36
39
|
local ____utils = require("functions.utils")
|
|
37
40
|
local ensureAllCases = ____utils.ensureAllCases
|
|
38
|
-
local getEnumValues = ____utils.getEnumValues
|
|
39
41
|
local getTraversalDescription = ____utils.getTraversalDescription
|
|
40
42
|
function ____exports.deepCopy(self, value, serializationType, traversalDescription)
|
|
41
43
|
if serializationType == nil then
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Direction } from "isaac-typescript-definitions";
|
|
2
|
+
export declare function directionToDegrees(direction: Direction): int;
|
|
3
|
+
export declare function directionToVector(direction: Direction): Vector;
|
|
4
|
+
export declare function getDirectionName(direction: Direction): string | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____directionNames = require("objects.directionNames")
|
|
3
|
+
local DIRECTION_NAMES = ____directionNames.DIRECTION_NAMES
|
|
4
|
+
local ____directionToDegrees = require("objects.directionToDegrees")
|
|
5
|
+
local DIRECTION_TO_DEGREES = ____directionToDegrees.DIRECTION_TO_DEGREES
|
|
6
|
+
local ____directionToVector = require("objects.directionToVector")
|
|
7
|
+
local DIRECTION_TO_VECTOR = ____directionToVector.DIRECTION_TO_VECTOR
|
|
8
|
+
function ____exports.directionToDegrees(self, direction)
|
|
9
|
+
return DIRECTION_TO_DEGREES[direction]
|
|
10
|
+
end
|
|
11
|
+
function ____exports.directionToVector(self, direction)
|
|
12
|
+
return DIRECTION_TO_VECTOR[direction]
|
|
13
|
+
end
|
|
14
|
+
function ____exports.getDirectionName(self, direction)
|
|
15
|
+
return DIRECTION_NAMES[direction]
|
|
16
|
+
end
|
|
17
|
+
return ____exports
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { Direction, DoorSlot, DoorSlotFlag, RoomShape, RoomType } from "isaac-typescript-definitions";
|
|
2
2
|
export declare function closeAllDoors(): void;
|
|
3
3
|
/**
|
|
4
4
|
* Use this instead of the `GridEntityDoor.Close` method if you want the door to immediately close
|
|
5
5
|
* without an animation.
|
|
6
6
|
*/
|
|
7
7
|
export declare function closeDoorFast(door: GridEntityDoor): void;
|
|
8
|
+
export declare function doorSlotFlagToDoorSlot(doorSlotFlag: DoorSlotFlag): DoorSlot;
|
|
8
9
|
export declare function doorSlotToDirection(doorSlot: DoorSlot): Direction;
|
|
9
10
|
export declare function getAngelRoomDoor(): GridEntityDoor | undefined;
|
|
10
11
|
export declare function getDevilRoomDoor(): GridEntityDoor | undefined;
|
|
@@ -36,33 +37,28 @@ export declare function isDevilRoomDoor(door: GridEntityDoor): boolean;
|
|
|
36
37
|
/** Helper function to see if a door slot could exist for a given room shape. */
|
|
37
38
|
export declare function isDoorSlotInRoomShape(doorSlot: DoorSlot, roomShape: RoomShape): boolean;
|
|
38
39
|
/**
|
|
39
|
-
* This refers to the Repentance door that spawns in a boss room after defeating the boss.
|
|
40
|
-
*
|
|
41
|
-
* It has a sprite filename of "gfx/grid/Door_Downpour.anm2".
|
|
40
|
+
* This refers to the Repentance door that spawns in a boss room after defeating the boss. You have
|
|
41
|
+
* to spend one key to open it. It has a sprite filename of "gfx/grid/Door_Downpour.anm2".
|
|
42
42
|
*/
|
|
43
43
|
export declare function isDoorToDownpour(door: GridEntityDoor): boolean;
|
|
44
44
|
/**
|
|
45
|
-
* This refers to the Repentance door that spawns in a boss room after defeating the boss.
|
|
46
|
-
*
|
|
47
|
-
* It has a sprite filename of "gfx/grid/Door_Mausoleum.anm2".
|
|
45
|
+
* This refers to the Repentance door that spawns in a boss room after defeating the boss. You have
|
|
46
|
+
* to spend two hearts to open it. It has a sprite filename of "gfx/grid/Door_Mausoleum.anm2".
|
|
48
47
|
*/
|
|
49
48
|
export declare function isDoorToMausoleum(door: GridEntityDoor): boolean;
|
|
50
49
|
/**
|
|
51
|
-
* This refers to the "strange door" located on the first room of Depths 2.
|
|
52
|
-
*
|
|
53
|
-
* It has a sprite filename of "gfx/grid/Door_Mausoleum_Alt.anm2".
|
|
50
|
+
* This refers to the "strange door" located on the first room of Depths 2. You open it with either
|
|
51
|
+
* a Polaroid or a Negative. It has a sprite filename of "gfx/grid/Door_Mausoleum_Alt.anm2".
|
|
54
52
|
*/
|
|
55
53
|
export declare function isDoorToMausoleumAscent(door: GridEntityDoor): boolean;
|
|
56
54
|
/**
|
|
57
|
-
* This refers to the Repentance door that spawns in a boss room after defeating the boss.
|
|
58
|
-
*
|
|
59
|
-
* It has a sprite filename of "gfx/grid/Door_Mines.anm2".
|
|
55
|
+
* This refers to the Repentance door that spawns in a boss room after defeating the boss. You have
|
|
56
|
+
* to spend two bombs to open it. It has a sprite filename of "gfx/grid/Door_Mines.anm2".
|
|
60
57
|
*/
|
|
61
58
|
export declare function isDoorToMines(door: GridEntityDoor): boolean;
|
|
62
59
|
/**
|
|
63
|
-
* This refers to the Repentance door that spawns after defeating Mom.
|
|
64
|
-
*
|
|
65
|
-
* It has a sprite filename of "gfx/grid/Door_MomsHeart.anm2".
|
|
60
|
+
* This refers to the Repentance door that spawns after defeating Mom. You open it with the
|
|
61
|
+
* completed knife. It has a sprite filename of "gfx/grid/Door_MomsHeart.anm2".
|
|
66
62
|
*/
|
|
67
63
|
export declare function isDoorToMomsHeart(door: GridEntityDoor): boolean;
|
|
68
64
|
export declare function isHiddenSecretRoomDoor(door: GridEntityDoor): boolean;
|
package/dist/functions/doors.lua
CHANGED
|
@@ -4,41 +4,45 @@ local __TS__New = ____lualib.__TS__New
|
|
|
4
4
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
5
5
|
local __TS__ArrayFind = ____lualib.__TS__ArrayFind
|
|
6
6
|
local ____exports = {}
|
|
7
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
|
+
local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
9
|
+
local DoorState = ____isaac_2Dtypescript_2Ddefinitions.DoorState
|
|
10
|
+
local DoorVariant = ____isaac_2Dtypescript_2Ddefinitions.DoorVariant
|
|
11
|
+
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
12
|
+
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
7
13
|
local ____cachedClasses = require("cachedClasses")
|
|
8
14
|
local game = ____cachedClasses.game
|
|
9
|
-
local
|
|
10
|
-
local
|
|
15
|
+
local ____doorSlotFlagToDoorSlot = require("objects.doorSlotFlagToDoorSlot")
|
|
16
|
+
local DEFAULT_DOOR_SLOT = ____doorSlotFlagToDoorSlot.DEFAULT_DOOR_SLOT
|
|
17
|
+
local DOOR_SLOT_FLAG_TO_DOOR_SLOT = ____doorSlotFlagToDoorSlot.DOOR_SLOT_FLAG_TO_DOOR_SLOT
|
|
11
18
|
local ____doorSlotToDirection = require("objects.doorSlotToDirection")
|
|
12
19
|
local DOOR_SLOT_TO_DIRECTION = ____doorSlotToDirection.DOOR_SLOT_TO_DIRECTION
|
|
13
20
|
local ____roomShapeToDoorSlots = require("objects.roomShapeToDoorSlots")
|
|
14
21
|
local ROOM_SHAPE_TO_DOOR_SLOTS = ____roomShapeToDoorSlots.ROOM_SHAPE_TO_DOOR_SLOTS
|
|
15
|
-
local
|
|
16
|
-
local getEnumValues =
|
|
22
|
+
local ____enums = require("functions.enums")
|
|
23
|
+
local getEnumValues = ____enums.getEnumValues
|
|
17
24
|
function ____exports.getDoors(self, ...)
|
|
18
25
|
local roomTypes = {...}
|
|
19
26
|
local room = game:GetRoom()
|
|
20
27
|
local roomTypesSet = __TS__New(Set, roomTypes)
|
|
28
|
+
local doorSlots = getEnumValues(nil, DoorSlot)
|
|
21
29
|
local doors = {}
|
|
22
|
-
do
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if #roomTypes == 0 or roomTypesSet:has(door.TargetRoomType) then
|
|
31
|
-
doors[#doors + 1] = door
|
|
32
|
-
end
|
|
30
|
+
for ____, doorSlot in ipairs(doorSlots) do
|
|
31
|
+
do
|
|
32
|
+
local door = room:GetDoor(doorSlot)
|
|
33
|
+
if door == nil then
|
|
34
|
+
goto __continue13
|
|
35
|
+
end
|
|
36
|
+
if roomTypesSet.size == 0 or roomTypesSet:has(door.TargetRoomType) then
|
|
37
|
+
doors[#doors + 1] = door
|
|
33
38
|
end
|
|
34
|
-
::__continue12::
|
|
35
|
-
i = i + 1
|
|
36
39
|
end
|
|
40
|
+
::__continue13::
|
|
37
41
|
end
|
|
38
42
|
return doors
|
|
39
43
|
end
|
|
40
44
|
function ____exports.isRepentanceDoor(self, door)
|
|
41
|
-
return door.TargetRoomIndex ==
|
|
45
|
+
return door.TargetRoomIndex == GridRoom.SECRET_EXIT
|
|
42
46
|
end
|
|
43
47
|
function ____exports.isSecretRoomDoor(self, door)
|
|
44
48
|
local sprite = door:GetSprite()
|
|
@@ -61,15 +65,19 @@ function ____exports.closeAllDoors(self)
|
|
|
61
65
|
end
|
|
62
66
|
end
|
|
63
67
|
function ____exports.closeDoorFast(self, door)
|
|
64
|
-
door.State = DoorState.
|
|
68
|
+
door.State = DoorState.CLOSED
|
|
65
69
|
local sprite = door:GetSprite()
|
|
66
70
|
sprite:Play("Closed", true)
|
|
67
71
|
end
|
|
72
|
+
function ____exports.doorSlotFlagToDoorSlot(self, doorSlotFlag)
|
|
73
|
+
local doorSlot = DOOR_SLOT_FLAG_TO_DOOR_SLOT[doorSlotFlag]
|
|
74
|
+
return doorSlot == nil and DEFAULT_DOOR_SLOT or doorSlot
|
|
75
|
+
end
|
|
68
76
|
function ____exports.doorSlotToDirection(self, doorSlot)
|
|
69
77
|
return DOOR_SLOT_TO_DIRECTION[doorSlot]
|
|
70
78
|
end
|
|
71
79
|
function ____exports.getAngelRoomDoor(self)
|
|
72
|
-
local angelRoomDoors = ____exports.getDoors(nil, RoomType.
|
|
80
|
+
local angelRoomDoors = ____exports.getDoors(nil, RoomType.ANGEL)
|
|
73
81
|
local ____temp_0
|
|
74
82
|
if #angelRoomDoors == 0 then
|
|
75
83
|
____temp_0 = nil
|
|
@@ -79,7 +87,7 @@ function ____exports.getAngelRoomDoor(self)
|
|
|
79
87
|
return ____temp_0
|
|
80
88
|
end
|
|
81
89
|
function ____exports.getDevilRoomDoor(self)
|
|
82
|
-
local devilRoomDoors = ____exports.getDoors(nil, RoomType.
|
|
90
|
+
local devilRoomDoors = ____exports.getDoors(nil, RoomType.DEVIL)
|
|
83
91
|
local ____temp_1
|
|
84
92
|
if #devilRoomDoors == 0 then
|
|
85
93
|
____temp_1 = nil
|
|
@@ -89,7 +97,7 @@ function ____exports.getDevilRoomDoor(self)
|
|
|
89
97
|
return ____temp_1
|
|
90
98
|
end
|
|
91
99
|
function ____exports.getDevilRoomOrAngelRoomDoor(self)
|
|
92
|
-
local devilRoomOrAngelRoomDoors = ____exports.getDoors(nil, RoomType.
|
|
100
|
+
local devilRoomOrAngelRoomDoors = ____exports.getDoors(nil, RoomType.DEVIL, RoomType.ANGEL)
|
|
93
101
|
local ____temp_2
|
|
94
102
|
if #devilRoomOrAngelRoomDoors == 0 then
|
|
95
103
|
____temp_2 = nil
|
|
@@ -127,10 +135,10 @@ function ____exports.getUnusedDoorSlots(self)
|
|
|
127
135
|
)
|
|
128
136
|
end
|
|
129
137
|
function ____exports.isAngelRoomDoor(self, door)
|
|
130
|
-
return door.TargetRoomType == RoomType.
|
|
138
|
+
return door.TargetRoomType == RoomType.ANGEL
|
|
131
139
|
end
|
|
132
140
|
function ____exports.isDevilRoomDoor(self, door)
|
|
133
|
-
return door.TargetRoomType == RoomType.
|
|
141
|
+
return door.TargetRoomType == RoomType.DEVIL
|
|
134
142
|
end
|
|
135
143
|
function ____exports.isDoorSlotInRoomShape(self, doorSlot, roomShape)
|
|
136
144
|
local doorSlots = ____exports.getDoorSlotsForRoomShape(nil, roomShape)
|
|
@@ -185,7 +193,7 @@ function ____exports.lockDoor(self, door)
|
|
|
185
193
|
local level = game:GetLevel()
|
|
186
194
|
local roomDescriptor = level:GetRoomByIdx(door.TargetRoomIndex)
|
|
187
195
|
roomDescriptor.VisitedCount = 0
|
|
188
|
-
door:SetVariant(DoorVariant.
|
|
196
|
+
door:SetVariant(DoorVariant.LOCKED)
|
|
189
197
|
door:SetLocked(true)
|
|
190
198
|
door:Close(true)
|
|
191
199
|
end
|
|
@@ -195,7 +203,7 @@ function ____exports.openAllDoors(self)
|
|
|
195
203
|
end
|
|
196
204
|
end
|
|
197
205
|
function ____exports.openDoorFast(self, door)
|
|
198
|
-
door.State = DoorState.
|
|
206
|
+
door.State = DoorState.OPEN
|
|
199
207
|
local sprite = door:GetSprite()
|
|
200
208
|
sprite:Play("Opened", true)
|
|
201
209
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { EntityType } from "isaac-typescript-definitions";
|
|
2
2
|
import { AnyEntity } from "../types/AnyEntity";
|
|
3
3
|
/**
|
|
4
4
|
* Helper function to count the number of entities in room. Use this over the vanilla
|
|
@@ -18,7 +18,7 @@ export declare function countEntities(entityType?: EntityType | int, variant?: n
|
|
|
18
18
|
* Example:
|
|
19
19
|
* ```ts
|
|
20
20
|
* const player = Isaac.GetPlayer();
|
|
21
|
-
* const gapers = getEntities(EntityType.
|
|
21
|
+
* const gapers = getEntities(EntityType.GAPER);
|
|
22
22
|
* const closestGaper = getClosestEntityTo(player, gapers);
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
@@ -39,8 +39,7 @@ export declare function getClosestEntityTo<T extends AnyEntity>(referenceEntity:
|
|
|
39
39
|
* }
|
|
40
40
|
* ```
|
|
41
41
|
*
|
|
42
|
-
* @param entityType Optional. If specified, will only return NPCs that match this entity
|
|
43
|
-
* type.
|
|
42
|
+
* @param entityType Optional. If specified, will only return NPCs that match this entity type.
|
|
44
43
|
* @param variant Optional. If specified, will only return NPCs that match this variant. Default is
|
|
45
44
|
* -1. -1 matches every variant.
|
|
46
45
|
* @param subType Optional. If specified, will only return NPCs that match this sub-type. Default is
|
|
@@ -49,7 +48,7 @@ export declare function getClosestEntityTo<T extends AnyEntity>(referenceEntity:
|
|
|
49
48
|
* returned. Default is false. Will only be taken into account if `matchingEntityType` is specified.
|
|
50
49
|
*/
|
|
51
50
|
export declare function getEntities(entityType?: EntityType | int, variant?: number, subType?: number, ignoreFriendly?: boolean): Entity[];
|
|
52
|
-
/** Helper function to return a string containing
|
|
51
|
+
/** Helper function to return a string containing the entity's type, variant, and sub-type. */
|
|
53
52
|
export declare function getEntityID(entity: Entity): string;
|
|
54
53
|
/**
|
|
55
54
|
* Helper function to compare two different arrays of entities. Returns the entities that are in the
|
|
@@ -14,8 +14,6 @@ local ____random = require("functions.random")
|
|
|
14
14
|
local getRandom = ____random.getRandom
|
|
15
15
|
local ____rng = require("functions.rng")
|
|
16
16
|
local newRNG = ____rng.newRNG
|
|
17
|
-
local ____utils = require("functions.utils")
|
|
18
|
-
local ____repeat = ____utils["repeat"]
|
|
19
17
|
function ____exports.removeEntities(self, entities, cap)
|
|
20
18
|
if #entities == 0 then
|
|
21
19
|
return false
|
|
@@ -171,17 +169,11 @@ function ____exports.rerollEnemy(self, entity)
|
|
|
171
169
|
return filteredNewEntities[1]
|
|
172
170
|
end
|
|
173
171
|
function ____exports.setEntityRandomColor(self, entity)
|
|
174
|
-
local colorValues = {}
|
|
175
172
|
local rng = newRNG(nil, entity.InitSeed)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
local randomColorValue = getRandom(nil, rng)
|
|
181
|
-
colorValues[#colorValues + 1] = randomColorValue
|
|
182
|
-
end
|
|
183
|
-
)
|
|
184
|
-
local color = Color(colorValues[1], colorValues[2], colorValues[3])
|
|
173
|
+
local r = getRandom(nil, rng)
|
|
174
|
+
local g = getRandom(nil, rng)
|
|
175
|
+
local b = getRandom(nil, rng)
|
|
176
|
+
local color = Color(r, g, b)
|
|
185
177
|
entity:SetColor(
|
|
186
178
|
color,
|
|
187
179
|
100000,
|