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,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { CacheFlag } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Returns the starting stat that Isaac (the default character) starts with. For example, if you
|
|
4
|
-
* pass this function `CacheFlag.
|
|
4
|
+
* pass this function `CacheFlag.DAMAGE`, it will return 3.5.
|
|
5
5
|
*
|
|
6
6
|
* Note that the default fire delay is represented in the tear stat, not the `MaxFireDelay` value.
|
|
7
7
|
*/
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import { CardType } from "../enums/CardType";
|
|
1
|
+
import { Card, ItemConfigCardType } from "isaac-typescript-definitions";
|
|
3
2
|
/**
|
|
4
3
|
* Helper function to get a card description from a Card enum value.
|
|
5
4
|
*
|
|
6
5
|
* Example:
|
|
7
6
|
* ```ts
|
|
8
|
-
* const card = Card.
|
|
7
|
+
* const card = Card.FOOL;
|
|
9
8
|
* const cardDescription = getCardDescription(card); // cardDescription is "Where journey begins"
|
|
10
9
|
* ```
|
|
11
10
|
*/
|
|
@@ -15,26 +14,19 @@ export declare function getCardDescription(card: Card | int): string;
|
|
|
15
14
|
*
|
|
16
15
|
* Example:
|
|
17
16
|
* ```ts
|
|
18
|
-
* const card = Card.
|
|
17
|
+
* const card = Card.FOOL;
|
|
19
18
|
* const cardName = getCardName(card); // cardName is "0 - The Fool"
|
|
20
19
|
* ```
|
|
21
20
|
*/
|
|
22
21
|
export declare function getCardName(card: Card | int): string;
|
|
23
|
-
export declare function getCardType(card: Card | int):
|
|
22
|
+
export declare function getCardType(card: Card | int): ItemConfigCardType;
|
|
24
23
|
/**
|
|
25
24
|
* Helper function to get a set of cards matching the type. Also see the [[`CardType`]] enum.
|
|
26
25
|
*
|
|
27
26
|
* This function is variadic, meaning that you can you can specify N card types to get a set
|
|
28
27
|
* containing cards that match any of the specified types.
|
|
29
28
|
*/
|
|
30
|
-
export declare function getCardsOfType(...cardTypes:
|
|
31
|
-
/**
|
|
32
|
-
* Helper function to get the final card sub-type in the game.
|
|
33
|
-
*
|
|
34
|
-
* This cannot be reliably determined before run-time due to mods adding a variable amount of new
|
|
35
|
-
* cards.
|
|
36
|
-
*/
|
|
37
|
-
export declare function getMaxCards(): int;
|
|
29
|
+
export declare function getCardsOfType(...cardTypes: ItemConfigCardType[]): Set<Card>;
|
|
38
30
|
/**
|
|
39
31
|
* Has an equal chance of returning any card (e.g. Fool, Reverse Fool, Wild Card, etc.).
|
|
40
32
|
*
|
|
@@ -42,7 +34,7 @@ export declare function getMaxCards(): int;
|
|
|
42
34
|
* - any runes
|
|
43
35
|
* - any objects like Dice Shard
|
|
44
36
|
* - any modded cards (since there is not a way to distinguish between modded cards and modded
|
|
45
|
-
*
|
|
37
|
+
* runes/objects)
|
|
46
38
|
*
|
|
47
39
|
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
|
|
48
40
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
@@ -55,7 +47,7 @@ export declare function getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: Card[
|
|
|
55
47
|
* `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
56
48
|
* @param exceptions Optional. An array of cards to not select.
|
|
57
49
|
*/
|
|
58
|
-
export declare function getRandomCardOfType(cardType:
|
|
50
|
+
export declare function getRandomCardOfType(cardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: Card[]): Card;
|
|
59
51
|
/**
|
|
60
52
|
* Has an equal chance of returning any rune (e.g. Rune of Hagalaz, Blank Rune, Black Rune, Soul of
|
|
61
53
|
* Isaac, etc.). This will never return a Rune Shard.
|
|
@@ -74,10 +66,10 @@ export declare function getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: Card[
|
|
|
74
66
|
*/
|
|
75
67
|
export declare function isCard(card: Card): boolean;
|
|
76
68
|
/** Returns whether or not the given card matches the specified card type. */
|
|
77
|
-
export declare function isCardType(card: Card, cardType:
|
|
69
|
+
export declare function isCardType(card: Card, cardType: ItemConfigCardType): boolean;
|
|
78
70
|
/** Returns true for cards that have `CardType.MODDED`. */
|
|
79
71
|
export declare function isModdedCard(card: Card): boolean;
|
|
80
|
-
/** Returns true for cards that have `CardType.
|
|
72
|
+
/** Returns true for cards that have `CardType.SPECIAL_OBJECT`. */
|
|
81
73
|
export declare function isPocketItemObject(card: Card): boolean;
|
|
82
74
|
/** Returns true for cards that have `CardType.TAROT_REVERSE`. */
|
|
83
75
|
export declare function isReverseTarotCard(card: Card): boolean;
|
package/dist/functions/cards.lua
CHANGED
|
@@ -5,10 +5,13 @@ local Set = ____lualib.Set
|
|
|
5
5
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local initCardObjects, CARD_TYPE_TO_CARDS_MAP, CARD_SET
|
|
8
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
9
|
+
local Card = ____isaac_2Dtypescript_2Ddefinitions.Card
|
|
10
|
+
local ItemConfigCardType = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigCardType
|
|
8
11
|
local ____cachedClasses = require("cachedClasses")
|
|
9
12
|
local itemConfig = ____cachedClasses.itemConfig
|
|
10
|
-
local
|
|
11
|
-
local
|
|
13
|
+
local ____constantsMax = require("constantsMax")
|
|
14
|
+
local MAX_CARD = ____constantsMax.MAX_CARD
|
|
12
15
|
local ____cardDescriptions = require("objects.cardDescriptions")
|
|
13
16
|
local CARD_DESCRIPTIONS = ____cardDescriptions.CARD_DESCRIPTIONS
|
|
14
17
|
local DEFAULT_CARD_DESCRIPTION = ____cardDescriptions.DEFAULT_CARD_DESCRIPTION
|
|
@@ -18,24 +21,23 @@ local DEFAULT_CARD_NAME = ____cardNames.DEFAULT_CARD_NAME
|
|
|
18
21
|
local ____cardTypes = require("objects.cardTypes")
|
|
19
22
|
local CARD_TYPES = ____cardTypes.CARD_TYPES
|
|
20
23
|
local DEFAULT_CARD_TYPE = ____cardTypes.DEFAULT_CARD_TYPE
|
|
24
|
+
local ____enums = require("functions.enums")
|
|
25
|
+
local getEnumValues = ____enums.getEnumValues
|
|
21
26
|
local ____math = require("functions.math")
|
|
22
|
-
local
|
|
27
|
+
local irange = ____math.irange
|
|
23
28
|
local ____rng = require("functions.rng")
|
|
24
29
|
local getRandomSeed = ____rng.getRandomSeed
|
|
25
30
|
local ____set = require("functions.set")
|
|
26
31
|
local addSetsToSet = ____set.addSetsToSet
|
|
27
32
|
local getRandomSetElement = ____set.getRandomSetElement
|
|
28
|
-
local ____utils = require("functions.utils")
|
|
29
|
-
local getEnumValues = ____utils.getEnumValues
|
|
30
33
|
function initCardObjects(self)
|
|
31
|
-
|
|
32
|
-
for ____, cardType in ipairs(getEnumValues(nil, CardType)) do
|
|
34
|
+
for ____, cardType in ipairs(getEnumValues(nil, ItemConfigCardType)) do
|
|
33
35
|
CARD_TYPE_TO_CARDS_MAP:set(
|
|
34
36
|
cardType,
|
|
35
37
|
__TS__New(Set)
|
|
36
38
|
)
|
|
37
39
|
end
|
|
38
|
-
for ____, card in ipairs(
|
|
40
|
+
for ____, card in ipairs(irange(nil, 1, MAX_CARD)) do
|
|
39
41
|
local cardType = ____exports.getCardType(nil, card)
|
|
40
42
|
local cardTypeSet = CARD_TYPE_TO_CARDS_MAP:get(cardType)
|
|
41
43
|
if cardTypeSet == nil then
|
|
@@ -45,10 +47,10 @@ function initCardObjects(self)
|
|
|
45
47
|
end
|
|
46
48
|
local cards = ____exports.getCardsOfType(
|
|
47
49
|
nil,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
ItemConfigCardType.TAROT,
|
|
51
|
+
ItemConfigCardType.SUIT,
|
|
52
|
+
ItemConfigCardType.SPECIAL,
|
|
53
|
+
ItemConfigCardType.TAROT_REVERSE
|
|
52
54
|
)
|
|
53
55
|
addSetsToSet(nil, CARD_SET, cards)
|
|
54
56
|
end
|
|
@@ -73,9 +75,6 @@ function ____exports.getCardsOfType(self, ...)
|
|
|
73
75
|
end
|
|
74
76
|
return matchingCards
|
|
75
77
|
end
|
|
76
|
-
function ____exports.getMaxCards(self)
|
|
77
|
-
return itemConfig:GetCards().Size - 1
|
|
78
|
-
end
|
|
79
78
|
CARD_TYPE_TO_CARDS_MAP = __TS__New(Map)
|
|
80
79
|
CARD_SET = __TS__New(Set)
|
|
81
80
|
function ____exports.getCardDescription(self, card)
|
|
@@ -126,7 +125,7 @@ function ____exports.getRandomRune(self, seedOrRNG, exceptions)
|
|
|
126
125
|
if exceptions == nil then
|
|
127
126
|
exceptions = {}
|
|
128
127
|
end
|
|
129
|
-
local runesSet = ____exports.getCardsOfType(nil,
|
|
128
|
+
local runesSet = ____exports.getCardsOfType(nil, ItemConfigCardType.RUNE)
|
|
130
129
|
runesSet:delete(Card.RUNE_SHARD)
|
|
131
130
|
return getRandomSetElement(nil, runesSet, seedOrRNG, exceptions)
|
|
132
131
|
end
|
|
@@ -137,24 +136,24 @@ function ____exports.isCardType(self, card, cardType)
|
|
|
137
136
|
return cardType == ____exports.getCardType(nil, card)
|
|
138
137
|
end
|
|
139
138
|
function ____exports.isModdedCard(self, card)
|
|
140
|
-
return ____exports.isCardType(nil, card,
|
|
139
|
+
return ____exports.isCardType(nil, card, ItemConfigCardType.MODDED)
|
|
141
140
|
end
|
|
142
141
|
function ____exports.isPocketItemObject(self, card)
|
|
143
|
-
return ____exports.isCardType(nil, card,
|
|
142
|
+
return ____exports.isCardType(nil, card, ItemConfigCardType.SPECIAL_OBJECT)
|
|
144
143
|
end
|
|
145
144
|
function ____exports.isReverseTarotCard(self, card)
|
|
146
|
-
return ____exports.isCardType(nil, card,
|
|
145
|
+
return ____exports.isCardType(nil, card, ItemConfigCardType.TAROT_REVERSE)
|
|
147
146
|
end
|
|
148
147
|
function ____exports.isRune(self, card)
|
|
149
|
-
return ____exports.isCardType(nil, card,
|
|
148
|
+
return ____exports.isCardType(nil, card, ItemConfigCardType.RUNE)
|
|
150
149
|
end
|
|
151
150
|
function ____exports.isSpecialCard(self, card)
|
|
152
|
-
return ____exports.isCardType(nil, card,
|
|
151
|
+
return ____exports.isCardType(nil, card, ItemConfigCardType.SPECIAL)
|
|
153
152
|
end
|
|
154
153
|
function ____exports.isSuitCard(self, card)
|
|
155
|
-
return ____exports.isCardType(nil, card,
|
|
154
|
+
return ____exports.isCardType(nil, card, ItemConfigCardType.SUIT)
|
|
156
155
|
end
|
|
157
156
|
function ____exports.isTarotCard(self, card)
|
|
158
|
-
return ____exports.isCardType(nil, card,
|
|
157
|
+
return ____exports.isCardType(nil, card, ItemConfigCardType.TAROT)
|
|
159
158
|
end
|
|
160
159
|
return ____exports
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { Challenge } from "isaac-typescript-definitions";
|
|
2
2
|
/** Get the proper name for a `Challenge` enum. This will only work for vanilla challenges. */
|
|
3
3
|
export declare function getChallengeName(challenge: Challenge): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { PlayerType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to determine if the given character can have red heart containers. Returns true
|
|
4
4
|
* for characters like Isaac, Magdalene, or Cain. Returns true for Keeper and Tainted Keeper, even
|
|
@@ -31,9 +31,9 @@ export declare function characterGetsBlackHeartFromEternalHeart(character: Playe
|
|
|
31
31
|
*/
|
|
32
32
|
export declare function characterStartsWithActiveItem(character: PlayerType | int): boolean;
|
|
33
33
|
/**
|
|
34
|
-
* Most characters have a 56 frame death animation (i.e. the "Death" animation).
|
|
35
|
-
* The Lost and Tainted Lost have a 38 frame death animation (i.e. the "LostDeath" animation).
|
|
36
|
-
* Tainted Forgotten have a 20 frame death animation (i.e. the "ForgottenDeath" animation).
|
|
34
|
+
* - Most characters have a 56 frame death animation (i.e. the "Death" animation).
|
|
35
|
+
* - The Lost and Tainted Lost have a 38 frame death animation (i.e. the "LostDeath" animation).
|
|
36
|
+
* - Tainted Forgotten have a 20 frame death animation (i.e. the "ForgottenDeath" animation).
|
|
37
37
|
*/
|
|
38
38
|
export declare function getCharacterDeathAnimationName(character: PlayerType | int): string;
|
|
39
39
|
/**
|
|
@@ -44,3 +44,5 @@ export declare function getCharacterDeathAnimationName(character: PlayerType | i
|
|
|
44
44
|
export declare function getCharacterMaxHeartContainers(character: PlayerType | int): int;
|
|
45
45
|
/** Helper function to get the name of a character. Returns "unknown" for modded characters. */
|
|
46
46
|
export declare function getCharacterName(character: PlayerType | int): string;
|
|
47
|
+
export declare function isModdedCharacter(character: PlayerType | int): boolean;
|
|
48
|
+
export declare function isVanillaCharacter(character: PlayerType | int): boolean;
|
|
@@ -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 PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
4
|
+
local ____constants = require("constants")
|
|
5
|
+
local MAX_VANILLA_CHARACTER = ____constants.MAX_VANILLA_CHARACTER
|
|
3
6
|
local ____characterNames = require("objects.characterNames")
|
|
4
7
|
local CHARACTER_NAMES = ____characterNames.CHARACTER_NAMES
|
|
5
8
|
local DEFAULT_CHARACTER_NAME = ____characterNames.DEFAULT_CHARACTER_NAME
|
|
@@ -15,6 +18,9 @@ local ____charactersWithNoSoulHeartsSet = require("sets.charactersWithNoSoulHear
|
|
|
15
18
|
local CHARACTERS_WITH_NO_SOUL_HEARTS_SET = ____charactersWithNoSoulHeartsSet.CHARACTERS_WITH_NO_SOUL_HEARTS_SET
|
|
16
19
|
local ____lostStyleCharactersSet = require("sets.lostStyleCharactersSet")
|
|
17
20
|
local LOST_STYLE_CHARACTERS_SET = ____lostStyleCharactersSet.LOST_STYLE_CHARACTERS_SET
|
|
21
|
+
function ____exports.isVanillaCharacter(self, character)
|
|
22
|
+
return character <= MAX_VANILLA_CHARACTER
|
|
23
|
+
end
|
|
18
24
|
function ____exports.characterCanHaveRedHearts(self, character)
|
|
19
25
|
return not CHARACTERS_WITH_NO_RED_HEARTS_SET:has(character)
|
|
20
26
|
end
|
|
@@ -34,31 +40,34 @@ function ____exports.getCharacterDeathAnimationName(self, character)
|
|
|
34
40
|
if LOST_STYLE_CHARACTERS_SET:has(character) then
|
|
35
41
|
return "LostDeath"
|
|
36
42
|
end
|
|
37
|
-
if character == PlayerType.
|
|
43
|
+
if character == PlayerType.THE_FORGOTTEN_B then
|
|
38
44
|
return "ForgottenDeath"
|
|
39
45
|
end
|
|
40
46
|
return "Death"
|
|
41
47
|
end
|
|
42
48
|
function ____exports.getCharacterMaxHeartContainers(self, character)
|
|
43
|
-
if character == PlayerType.
|
|
49
|
+
if character == PlayerType.KEEPER then
|
|
44
50
|
return 3
|
|
45
51
|
end
|
|
46
|
-
if character == PlayerType.
|
|
52
|
+
if character == PlayerType.THE_FORGOTTEN then
|
|
47
53
|
return 6
|
|
48
54
|
end
|
|
49
|
-
if character == PlayerType.
|
|
55
|
+
if character == PlayerType.THE_SOUL then
|
|
50
56
|
return 6
|
|
51
57
|
end
|
|
52
|
-
if character == PlayerType.
|
|
58
|
+
if character == PlayerType.KEEPER_B then
|
|
53
59
|
return 2
|
|
54
60
|
end
|
|
55
61
|
return 12
|
|
56
62
|
end
|
|
57
63
|
function ____exports.getCharacterName(self, character)
|
|
58
|
-
if character
|
|
64
|
+
if ____exports.isVanillaCharacter(nil, character) then
|
|
59
65
|
return "unknown"
|
|
60
66
|
end
|
|
61
67
|
local characterName = CHARACTER_NAMES[character]
|
|
62
68
|
return characterName == nil and DEFAULT_CHARACTER_NAME or characterName
|
|
63
69
|
end
|
|
70
|
+
function ____exports.isModdedCharacter(self, character)
|
|
71
|
+
return not ____exports.isVanillaCharacter(nil, character)
|
|
72
|
+
end
|
|
64
73
|
return ____exports
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
3
2
|
local getNumChargesToAdd, getNumChargesWithAAAModifier, shouldPlayFullRechargeSound
|
|
3
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
4
|
+
local ActiveSlot = ____isaac_2Dtypescript_2Ddefinitions.ActiveSlot
|
|
5
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
6
|
+
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
7
|
+
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
8
|
+
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
4
9
|
local ____cachedClasses = require("cachedClasses")
|
|
5
10
|
local game = ____cachedClasses.game
|
|
6
11
|
local sfxManager = ____cachedClasses.sfxManager
|
|
@@ -33,7 +38,7 @@ function getNumChargesToAdd(self, player, activeSlot, ignoreBigRoomDoubleCharge)
|
|
|
33
38
|
local activeItem = player:GetActiveItem(activeSlot)
|
|
34
39
|
local activeCharge = player:GetActiveCharge(activeSlot)
|
|
35
40
|
local batteryCharge = player:GetBatteryCharge(activeSlot)
|
|
36
|
-
local hasBattery = player:HasCollectible(CollectibleType.
|
|
41
|
+
local hasBattery = player:HasCollectible(CollectibleType.BATTERY)
|
|
37
42
|
local maxCharges = getCollectibleMaxCharges(nil, activeItem)
|
|
38
43
|
if not hasBattery and activeCharge == maxCharges then
|
|
39
44
|
return 0
|
|
@@ -47,7 +52,7 @@ function getNumChargesToAdd(self, player, activeSlot, ignoreBigRoomDoubleCharge)
|
|
|
47
52
|
if hasBattery and batteryCharge + 1 == maxCharges then
|
|
48
53
|
return 1
|
|
49
54
|
end
|
|
50
|
-
if roomShape >= RoomShape.
|
|
55
|
+
if roomShape >= RoomShape.SHAPE_2x2 and not ignoreBigRoomDoubleCharge then
|
|
51
56
|
return 2
|
|
52
57
|
end
|
|
53
58
|
return 1
|
|
@@ -56,8 +61,8 @@ function getNumChargesWithAAAModifier(self, player, activeSlot, chargesToAdd)
|
|
|
56
61
|
local activeItem = player:GetActiveItem(activeSlot)
|
|
57
62
|
local activeCharge = player:GetActiveCharge(activeSlot)
|
|
58
63
|
local batteryCharge = player:GetBatteryCharge(activeSlot)
|
|
59
|
-
local hasBattery = player:HasCollectible(CollectibleType.
|
|
60
|
-
local hasAAABattery = player:HasTrinket(TrinketType.
|
|
64
|
+
local hasBattery = player:HasCollectible(CollectibleType.BATTERY)
|
|
65
|
+
local hasAAABattery = player:HasTrinket(TrinketType.AAA_BATTERY)
|
|
61
66
|
local maxCharges = getCollectibleMaxCharges(nil, activeItem)
|
|
62
67
|
if not hasAAABattery then
|
|
63
68
|
return chargesToAdd
|
|
@@ -76,17 +81,17 @@ function ____exports.getTotalCharge(self, player, activeSlot)
|
|
|
76
81
|
return activeCharge + batteryCharge
|
|
77
82
|
end
|
|
78
83
|
function ____exports.playChargeSoundEffect(self, player, activeSlot)
|
|
79
|
-
for ____, soundEffect in ipairs({SoundEffect.
|
|
84
|
+
for ____, soundEffect in ipairs({SoundEffect.BATTERY_CHARGE, SoundEffect.BEEP}) do
|
|
80
85
|
sfxManager:Stop(soundEffect)
|
|
81
86
|
end
|
|
82
|
-
local chargeSoundEffect = shouldPlayFullRechargeSound(nil, player, activeSlot) and SoundEffect.
|
|
87
|
+
local chargeSoundEffect = shouldPlayFullRechargeSound(nil, player, activeSlot) and SoundEffect.BATTERY_CHARGE or SoundEffect.BEEP
|
|
83
88
|
sfxManager:Play(chargeSoundEffect)
|
|
84
89
|
end
|
|
85
90
|
function shouldPlayFullRechargeSound(self, player, activeSlot)
|
|
86
91
|
local activeItem = player:GetActiveItem(activeSlot)
|
|
87
92
|
local activeCharge = player:GetActiveCharge(activeSlot)
|
|
88
93
|
local batteryCharge = player:GetBatteryCharge(activeSlot)
|
|
89
|
-
local hasBattery = player:HasCollectible(CollectibleType.
|
|
94
|
+
local hasBattery = player:HasCollectible(CollectibleType.BATTERY)
|
|
90
95
|
local maxCharges = getCollectibleMaxCharges(nil, activeItem)
|
|
91
96
|
if not hasBattery then
|
|
92
97
|
return not player:NeedsCharge(activeSlot)
|
|
@@ -97,7 +102,7 @@ function ____exports.addRoomClearCharge(self, player, ignoreBigRoomDoubleCharge)
|
|
|
97
102
|
if ignoreBigRoomDoubleCharge == nil then
|
|
98
103
|
ignoreBigRoomDoubleCharge = false
|
|
99
104
|
end
|
|
100
|
-
for ____, activeSlot in ipairs({ActiveSlot.
|
|
105
|
+
for ____, activeSlot in ipairs({ActiveSlot.PRIMARY, ActiveSlot.SECONDARY, ActiveSlot.POCKET}) do
|
|
101
106
|
____exports.addRoomClearChargeToSlot(nil, player, activeSlot, ignoreBigRoomDoubleCharge)
|
|
102
107
|
end
|
|
103
108
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { CacheFlag, CollectibleType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Returns a set containing every collectible type with the given cache flag, including modded
|
|
4
4
|
* collectibles.
|
|
@@ -13,9 +13,9 @@ export declare function getCollectiblesForCacheFlag(cacheFlag: CacheFlag): Set<C
|
|
|
13
13
|
*
|
|
14
14
|
* ```ts
|
|
15
15
|
* [
|
|
16
|
-
* CollectibleType.
|
|
17
|
-
* CollectibleType.
|
|
18
|
-
* CollectibleType.
|
|
16
|
+
* CollectibleType.LORD_OF_THE_PIT,
|
|
17
|
+
* CollectibleType.TRANSCENDENCE,
|
|
18
|
+
* CollectibleType.TRANSCENDENCE,
|
|
19
19
|
* ]
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
@@ -3,23 +3,26 @@ local Map = ____lualib.Map
|
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local Set = ____lualib.Set
|
|
5
5
|
local ____exports = {}
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
|
|
8
|
+
local ____constantsMax = require("constantsMax")
|
|
9
|
+
local MAX_COLLECTIBLE_TYPE = ____constantsMax.MAX_COLLECTIBLE_TYPE
|
|
6
10
|
local ____collectibles = require("functions.collectibles")
|
|
7
11
|
local collectibleHasCacheFlag = ____collectibles.collectibleHasCacheFlag
|
|
8
|
-
local
|
|
12
|
+
local ____enums = require("functions.enums")
|
|
13
|
+
local getEnumValues = ____enums.getEnumValues
|
|
9
14
|
local ____math = require("functions.math")
|
|
10
|
-
local
|
|
15
|
+
local irange = ____math.irange
|
|
11
16
|
local ____set = require("functions.set")
|
|
12
17
|
local copySet = ____set.copySet
|
|
13
18
|
local getSortedSetValues = ____set.getSortedSetValues
|
|
14
19
|
local ____utils = require("functions.utils")
|
|
15
|
-
local getEnumValues = ____utils.getEnumValues
|
|
16
20
|
local ____repeat = ____utils["repeat"]
|
|
17
21
|
local CACHE_FLAG_TO_COLLECTIBLES_MAP = __TS__New(Map)
|
|
18
22
|
local function initCacheFlagMap(self)
|
|
19
|
-
local maxCollectibleType = getMaxCollectibleType(nil)
|
|
20
23
|
for ____, cacheFlag in ipairs(getEnumValues(nil, CacheFlag)) do
|
|
21
24
|
local collectiblesSet = __TS__New(Set)
|
|
22
|
-
for ____, collectibleType in ipairs(
|
|
25
|
+
for ____, collectibleType in ipairs(irange(nil, 1, MAX_COLLECTIBLE_TYPE)) do
|
|
23
26
|
if collectibleHasCacheFlag(nil, collectibleType, cacheFlag) then
|
|
24
27
|
collectiblesSet:add(collectibleType)
|
|
25
28
|
end
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { CollectibleType } from "isaac-typescript-definitions";
|
|
2
2
|
/** Returns a set containing every valid collectible type in the game, including modded items. */
|
|
3
3
|
export declare function getCollectibleSet(): Set<CollectibleType | int>;
|
|
@@ -4,16 +4,15 @@ local __TS__New = ____lualib.__TS__New
|
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local ____cachedClasses = require("cachedClasses")
|
|
6
6
|
local itemConfig = ____cachedClasses.itemConfig
|
|
7
|
-
local
|
|
8
|
-
local
|
|
7
|
+
local ____constantsMax = require("constantsMax")
|
|
8
|
+
local MAX_COLLECTIBLE_TYPE = ____constantsMax.MAX_COLLECTIBLE_TYPE
|
|
9
9
|
local ____math = require("functions.math")
|
|
10
|
-
local
|
|
10
|
+
local irange = ____math.irange
|
|
11
11
|
local ____set = require("functions.set")
|
|
12
12
|
local copySet = ____set.copySet
|
|
13
13
|
local COLLECTIBLE_SET = __TS__New(Set)
|
|
14
14
|
local function initCollectibleSet(self)
|
|
15
|
-
|
|
16
|
-
for ____, collectibleType in ipairs(range(nil, 1, maxCollectibleType)) do
|
|
15
|
+
for ____, collectibleType in ipairs(irange(nil, 1, MAX_COLLECTIBLE_TYPE)) do
|
|
17
16
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
18
17
|
if itemConfigItem ~= nil then
|
|
19
18
|
COLLECTIBLE_SET:add(collectibleType)
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { ItemConfigTag } from "../enums/ItemConfigTag";
|
|
1
|
+
import { CollectibleType, ItemConfigTag } from "isaac-typescript-definitions";
|
|
3
2
|
export declare function collectibleHasTag(collectibleType: CollectibleType | int, tag: ItemConfigTag): boolean;
|
|
4
3
|
/**
|
|
5
4
|
* Helper function to get all of the collectible types in the game that have a certain tag.
|
|
@@ -4,20 +4,22 @@ local __TS__New = ____lualib.__TS__New
|
|
|
4
4
|
local Set = ____lualib.Set
|
|
5
5
|
local __TS__Spread = ____lualib.__TS__Spread
|
|
6
6
|
local ____exports = {}
|
|
7
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
|
+
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
7
9
|
local ____cachedClasses = require("cachedClasses")
|
|
8
10
|
local itemConfig = ____cachedClasses.itemConfig
|
|
9
|
-
local
|
|
10
|
-
local
|
|
11
|
-
local
|
|
12
|
-
local
|
|
11
|
+
local ____constantsMax = require("constantsMax")
|
|
12
|
+
local MAX_COLLECTIBLE_TYPE = ____constantsMax.MAX_COLLECTIBLE_TYPE
|
|
13
|
+
local ____enums = require("functions.enums")
|
|
14
|
+
local getEnumValues = ____enums.getEnumValues
|
|
15
|
+
local ____flag = require("functions.flag")
|
|
16
|
+
local getFlagName = ____flag.getFlagName
|
|
13
17
|
local ____math = require("functions.math")
|
|
14
|
-
local
|
|
18
|
+
local irange = ____math.irange
|
|
15
19
|
local ____player = require("functions.player")
|
|
16
20
|
local getPlayerCollectibleCount = ____player.getPlayerCollectibleCount
|
|
17
21
|
local ____set = require("functions.set")
|
|
18
22
|
local copySet = ____set.copySet
|
|
19
|
-
local ____utils = require("functions.utils")
|
|
20
|
-
local getEnumValues = ____utils.getEnumValues
|
|
21
23
|
function ____exports.collectibleHasTag(self, collectibleType, tag)
|
|
22
24
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
23
25
|
if itemConfigItem == nil then
|
|
@@ -27,14 +29,13 @@ function ____exports.collectibleHasTag(self, collectibleType, tag)
|
|
|
27
29
|
end
|
|
28
30
|
local TAG_TO_COLLECTIBLE_TYPES_MAP = __TS__New(Map)
|
|
29
31
|
local function initTagMap(self)
|
|
30
|
-
local maxCollectibleType = getMaxCollectibleType(nil)
|
|
31
32
|
for ____, itemConfigTag in ipairs(getEnumValues(nil, ItemConfigTag)) do
|
|
32
33
|
TAG_TO_COLLECTIBLE_TYPES_MAP:set(
|
|
33
34
|
itemConfigTag,
|
|
34
35
|
__TS__New(Set)
|
|
35
36
|
)
|
|
36
37
|
end
|
|
37
|
-
for ____, collectibleType in ipairs(
|
|
38
|
+
for ____, collectibleType in ipairs(irange(nil, 1, MAX_COLLECTIBLE_TYPE)) do
|
|
38
39
|
for ____, itemConfigTag in ipairs(getEnumValues(nil, ItemConfigTag)) do
|
|
39
40
|
do
|
|
40
41
|
if not ____exports.collectibleHasTag(nil, collectibleType, itemConfigTag) then
|
|
@@ -42,7 +43,8 @@ local function initTagMap(self)
|
|
|
42
43
|
end
|
|
43
44
|
local collectibleTypesSet = TAG_TO_COLLECTIBLE_TYPES_MAP:get(itemConfigTag)
|
|
44
45
|
if collectibleTypesSet == nil then
|
|
45
|
-
|
|
46
|
+
local flagName = getFlagName(nil, itemConfigTag, ItemConfigTag)
|
|
47
|
+
error("Failed to get the collectible types for item tag: " .. tostring(flagName))
|
|
46
48
|
end
|
|
47
49
|
collectibleTypesSet:add(collectibleType)
|
|
48
50
|
end
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { CollectiblePedestalType } from "../enums/CollectiblePedestalType";
|
|
1
|
+
import { CacheFlag, CollectiblePedestalType, CollectibleType, ItemConfigTag, ItemType, PickupPrice } from "isaac-typescript-definitions";
|
|
3
2
|
import { CollectibleIndex } from "../types/CollectibleIndex";
|
|
4
3
|
export declare function clearCollectibleSprite(collectible: EntityPickup): void;
|
|
5
4
|
export declare function collectibleHasCacheFlag(collectibleType: CollectibleType | int, cacheFlag: CacheFlag): boolean;
|
|
@@ -12,7 +11,7 @@ export declare function collectibleSpriteEquals(sprite1: Sprite, sprite2: Sprite
|
|
|
12
11
|
export declare function getCollectibleDescription(collectibleType: CollectibleType | int): string;
|
|
13
12
|
/**
|
|
14
13
|
* Helper function to get the heart cost that a collectible item would be if it were being offered
|
|
15
|
-
* in a Devil Room deal. Returns 0 if passed CollectibleType.
|
|
14
|
+
* in a Devil Room deal. Returns 0 if passed CollectibleType.NULL.
|
|
16
15
|
*/
|
|
17
16
|
export declare function getCollectibleDevilHeartPrice(collectibleType: CollectibleType | int, player: EntityPlayer): PickupPrice;
|
|
18
17
|
/**
|
|
@@ -36,25 +35,26 @@ export declare function getCollectibleGfxFilename(collectibleType: CollectibleTy
|
|
|
36
35
|
*
|
|
37
36
|
* Note that:
|
|
38
37
|
* - The grid index is a necessary part of the collectible index because Diplopia and Crooked Penny
|
|
39
|
-
*
|
|
38
|
+
* can cause two or more collectibles with the same SubType and InitSeed to exist in the same
|
|
39
|
+
* room.
|
|
40
40
|
* - This index will fail in the case where the player uses Diplopia or a successful Crooked Penny
|
|
41
|
-
*
|
|
42
|
-
*
|
|
41
|
+
* seven or more times in the same room, since that will cause two or more collectibles with the
|
|
42
|
+
* same grid index, SubType, and InitSeed to exist.
|
|
43
43
|
* - The SubType is a necessary part of the collectible index because Tainted Isaac will
|
|
44
|
-
*
|
|
44
|
+
* continuously cause collectibles to morph into new sub-types with the same InitSeed.
|
|
45
45
|
* - Using a collectible's position as part of the index is problematic, since players can push a
|
|
46
|
-
*
|
|
47
|
-
* cases for collectibles to be spawned at a position that is not aligned with the grid,
|
|
48
|
-
* pedestal pushed to an adjacent tile, but this case should be extremely rare.)
|
|
46
|
+
* pedestal. (Even using the grid index does not solve this problem, since it is possible in
|
|
47
|
+
* certain cases for collectibles to be spawned at a position that is not aligned with the grid,
|
|
48
|
+
* and the pedestal pushed to an adjacent tile, but this case should be extremely rare.)
|
|
49
49
|
* - Mega Chests spawn two collectibles on the exact same position. However, both of them will have
|
|
50
|
-
*
|
|
50
|
+
* different InitSeeds, so this is not a problem for this indexing scheme.
|
|
51
51
|
* - The indexing scheme used is different for collectibles that are inside of a Treasure Room, in
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* case. (Using the room list index or the room grid index is not suitable for this purpose,
|
|
55
|
-
* both of these values can change in the post-Ascent Treasure Room.) Even though there can
|
|
56
|
-
* Treasure Rooms on an XL floor, both Treasure Rooms should not have collectibles with the
|
|
57
|
-
* grid index, Subtype, and InitSeed.
|
|
52
|
+
* order to handle the case of the player seeing the same collectible again in a post-Ascent
|
|
53
|
+
* Treasure Room. A 5-tuple of stage, stage type, grid index, SubType, and InitSeed is used in
|
|
54
|
+
* this case. (Using the room list index or the room grid index is not suitable for this purpose,
|
|
55
|
+
* since both of these values can change in the post-Ascent Treasure Room.) Even though there can
|
|
56
|
+
* be two Treasure Rooms on an XL floor, both Treasure Rooms should not have collectibles with the
|
|
57
|
+
* same grid index, Subtype, and InitSeed.
|
|
58
58
|
*/
|
|
59
59
|
export declare function getCollectibleIndex(collectible: EntityPickup): CollectibleIndex;
|
|
60
60
|
/**
|
|
@@ -78,7 +78,7 @@ export declare function getCollectibleMaxCharges(collectibleType: CollectibleTyp
|
|
|
78
78
|
*
|
|
79
79
|
* Example:
|
|
80
80
|
* ```ts
|
|
81
|
-
* const collectibleType = CollectibleType.
|
|
81
|
+
* const collectibleType = CollectibleType.SAD_ONION;
|
|
82
82
|
* const collectibleName = getCollectibleName(collectibleType); // collectibleName is "Sad Onion"
|
|
83
83
|
* ```
|
|
84
84
|
*/
|
|
@@ -95,18 +95,11 @@ export declare function getCollectibleQuality(collectibleType: CollectibleType |
|
|
|
95
95
|
*
|
|
96
96
|
* Example:
|
|
97
97
|
* ```ts
|
|
98
|
-
* const collectibleType = CollectibleType.
|
|
98
|
+
* const collectibleType = CollectibleType.SAD_ONION;
|
|
99
99
|
* const itemConfigTags = getCollectibleTags(collectibleType); // itemConfigTags is "18350080"
|
|
100
100
|
* ```
|
|
101
101
|
*/
|
|
102
|
-
export declare function getCollectibleTags(collectibleType: CollectibleType | int):
|
|
103
|
-
/**
|
|
104
|
-
* Helper function to get the final collectible type in the game.
|
|
105
|
-
*
|
|
106
|
-
* This cannot be reliably determined before run-time due to mods adding a variable amount of new
|
|
107
|
-
* collectibles.
|
|
108
|
-
*/
|
|
109
|
-
export declare function getMaxCollectibleType(): int;
|
|
102
|
+
export declare function getCollectibleTags(collectibleType: CollectibleType | int): BitFlags<ItemConfigTag>;
|
|
110
103
|
/** Returns true if the item type in the item config is equal to `ItemType.ITEM_ACTIVE`. */
|
|
111
104
|
export declare function isActiveCollectible(collectibleType: CollectibleType | int): boolean;
|
|
112
105
|
/** Returns true if the collectible has a red question mark sprite. */
|
|
@@ -149,7 +142,7 @@ export declare function setCollectibleBlind(collectible: EntityPickup): void;
|
|
|
149
142
|
/**
|
|
150
143
|
* Helper function to remove the collectible from a collectible pedestal and make it appear as if a
|
|
151
144
|
* player has already taken the item. This is accomplished by changing the sub-type to
|
|
152
|
-
* `CollectibleType.
|
|
145
|
+
* `CollectibleType.NULL` and then setting the sprite to an empty/missing PNG file.
|
|
153
146
|
*
|
|
154
147
|
* For more information, see the documentation for the "clearSprite" helper function.
|
|
155
148
|
*/
|