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,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { BombVariant, EffectVariant, EntityType, FamiliarVariant, KnifeVariant, LaserVariant, PickupVariant, ProjectileVariant, SlotVariant, TearVariant } from "isaac-typescript-definitions";
|
|
2
2
|
import { EntityTypeNonNPC } from "../types/EntityTypeNonNPC";
|
|
3
3
|
/**
|
|
4
|
-
* Helper function to get all of the `EntityType.
|
|
4
|
+
* Helper function to get all of the `EntityType.BOMB` in the room.
|
|
5
5
|
*
|
|
6
6
|
* Example:
|
|
7
7
|
* ```ts
|
|
@@ -13,7 +13,7 @@ import { EntityTypeNonNPC } from "../types/EntityTypeNonNPC";
|
|
|
13
13
|
*/
|
|
14
14
|
export declare function getBombs(bombVariant?: BombVariant | int, subType?: number): EntityBomb[];
|
|
15
15
|
/**
|
|
16
|
-
* Helper function to get all of the `EntityType.
|
|
16
|
+
* Helper function to get all of the `EntityType.EFFECT` in the room.
|
|
17
17
|
*
|
|
18
18
|
* Example:
|
|
19
19
|
* ```ts
|
|
@@ -37,7 +37,7 @@ export declare function getEffects(effectVariant?: EffectVariant | int, subType?
|
|
|
37
37
|
*/
|
|
38
38
|
export declare function getFamiliars(familiarVariant?: FamiliarVariant | int, subType?: number): EntityFamiliar[];
|
|
39
39
|
/**
|
|
40
|
-
* Helper function to get all of the `EntityType.
|
|
40
|
+
* Helper function to get all of the `EntityType.KNIFE` in the room.
|
|
41
41
|
*
|
|
42
42
|
* Example:
|
|
43
43
|
* ```ts
|
|
@@ -49,7 +49,7 @@ export declare function getFamiliars(familiarVariant?: FamiliarVariant | int, su
|
|
|
49
49
|
*/
|
|
50
50
|
export declare function getKnives(knifeVariant?: KnifeVariant | int, subType?: number): EntityKnife[];
|
|
51
51
|
/**
|
|
52
|
-
* Helper function to get all of the `EntityType.
|
|
52
|
+
* Helper function to get all of the `EntityType.LASER` in the room.
|
|
53
53
|
*
|
|
54
54
|
* Example:
|
|
55
55
|
* ```ts
|
|
@@ -75,7 +75,7 @@ export declare function getNPCs(entityType?: EntityType | int, variant?: int, su
|
|
|
75
75
|
*/
|
|
76
76
|
export declare function getPickups(pickupVariant?: PickupVariant | int, subType?: number): EntityPickup[];
|
|
77
77
|
/**
|
|
78
|
-
* Helper function to get all of the `EntityType.
|
|
78
|
+
* Helper function to get all of the `EntityType.PROJECTILE` in the room.
|
|
79
79
|
*
|
|
80
80
|
* Example:
|
|
81
81
|
* ```ts
|
|
@@ -87,7 +87,7 @@ export declare function getPickups(pickupVariant?: PickupVariant | int, subType?
|
|
|
87
87
|
*/
|
|
88
88
|
export declare function getProjectiles(projectileVariant?: ProjectileVariant | int, subType?: number): EntityProjectile[];
|
|
89
89
|
/**
|
|
90
|
-
* Helper function to get all of the `EntityType.
|
|
90
|
+
* Helper function to get all of the `EntityType.SLOT` in the room.
|
|
91
91
|
*
|
|
92
92
|
* Example:
|
|
93
93
|
* ```ts
|
|
@@ -99,7 +99,7 @@ export declare function getProjectiles(projectileVariant?: ProjectileVariant | i
|
|
|
99
99
|
*/
|
|
100
100
|
export declare function getSlots(slotVariant?: SlotVariant | int, subType?: number): Entity[];
|
|
101
101
|
/**
|
|
102
|
-
* Helper function to get all of the `EntityType.
|
|
102
|
+
* Helper function to get all of the `EntityType.TEAR` in the room.
|
|
103
103
|
*
|
|
104
104
|
* Example:
|
|
105
105
|
* ```ts
|
|
@@ -111,7 +111,7 @@ export declare function getSlots(slotVariant?: SlotVariant | int, subType?: numb
|
|
|
111
111
|
*/
|
|
112
112
|
export declare function getTears(tearVariant?: TearVariant | int, subType?: number): EntityTear[];
|
|
113
113
|
/**
|
|
114
|
-
* Helper function to remove all of the `EntityType.
|
|
114
|
+
* Helper function to remove all of the `EntityType.BOMB` in the room.
|
|
115
115
|
*
|
|
116
116
|
* @param bombVariant Optional. If specified, will only remove bombs that match this variant.
|
|
117
117
|
* @param subType Optional. If specified, will only remove bombs that match this sub-type.
|
|
@@ -131,14 +131,15 @@ export declare function removeAllEffects(effectVariant?: EffectVariant | int, su
|
|
|
131
131
|
/**
|
|
132
132
|
* Helper function to remove all of the familiars in the room.
|
|
133
133
|
*
|
|
134
|
-
* @param familiarVariant Optional. If specified, will only remove familiars that match this
|
|
134
|
+
* @param familiarVariant Optional. If specified, will only remove familiars that match this
|
|
135
|
+
* variant.
|
|
135
136
|
* @param subType Optional. If specified, will only remove familiars that match this sub-type.
|
|
136
137
|
* @param cap Optional. If specified, will only remove the given amount of familiars.
|
|
137
138
|
* @returns True if one or more familiars were removed, false otherwise.
|
|
138
139
|
*/
|
|
139
140
|
export declare function removeAllFamiliars(familiarVariant?: FamiliarVariant | int, subType?: int, cap?: int): boolean;
|
|
140
141
|
/**
|
|
141
|
-
* Helper function to remove all of the `EntityType.
|
|
142
|
+
* Helper function to remove all of the `EntityType.KNIFE` in the room.
|
|
142
143
|
*
|
|
143
144
|
* @param knifeVariant Optional. If specified, will only remove knives that match this variant.
|
|
144
145
|
* @param subType Optional. If specified, will only remove knives that match this sub-type.
|
|
@@ -147,7 +148,7 @@ export declare function removeAllFamiliars(familiarVariant?: FamiliarVariant | i
|
|
|
147
148
|
*/
|
|
148
149
|
export declare function removeAllKnives(knifeVariant?: KnifeVariant | int, subType?: int, cap?: int): boolean;
|
|
149
150
|
/**
|
|
150
|
-
* Helper function to remove all of the `EntityType.
|
|
151
|
+
* Helper function to remove all of the `EntityType.LASER` in the room.
|
|
151
152
|
*
|
|
152
153
|
* @param laserVariant Optional. If specified, will only remove lasers that match this variant.
|
|
153
154
|
* @param subType Optional. If specified, will only remove lasers that match this sub-type.
|
|
@@ -172,16 +173,17 @@ export declare function removeAllNPCs(cap?: int): boolean;
|
|
|
172
173
|
*/
|
|
173
174
|
export declare function removeAllPickups(pickupVariant?: PickupVariant | int, subType?: int, cap?: int): boolean;
|
|
174
175
|
/**
|
|
175
|
-
* Helper function to remove all of the `EntityType.
|
|
176
|
+
* Helper function to remove all of the `EntityType.PROJECTILE` in the room.
|
|
176
177
|
*
|
|
177
|
-
* @param projectileVariant Optional. If specified, will only remove projectiles that match this
|
|
178
|
+
* @param projectileVariant Optional. If specified, will only remove projectiles that match this
|
|
179
|
+
* variant.
|
|
178
180
|
* @param subType Optional. If specified, will only remove projectiles that match this sub-type.
|
|
179
181
|
* @param cap Optional. If specified, will only remove the given amount of projectiles.
|
|
180
182
|
* @returns True if one or more projectiles were removed, false otherwise.
|
|
181
183
|
*/
|
|
182
184
|
export declare function removeAllProjectiles(projectileVariant?: ProjectileVariant | int, subType?: int, cap?: int): boolean;
|
|
183
185
|
/**
|
|
184
|
-
* Helper function to remove all of the `EntityType.
|
|
186
|
+
* Helper function to remove all of the `EntityType.SLOT` in the room.
|
|
185
187
|
*
|
|
186
188
|
* @param slotVariant Optional. If specified, will only remove slots that match this variant.
|
|
187
189
|
* @param subType Optional. If specified, will only remove slots that match this sub-type.
|
|
@@ -190,7 +192,7 @@ export declare function removeAllProjectiles(projectileVariant?: ProjectileVaria
|
|
|
190
192
|
*/
|
|
191
193
|
export declare function removeAllSlots(slotVariant?: SlotVariant | int, subType?: int, cap?: int): boolean;
|
|
192
194
|
/**
|
|
193
|
-
* Helper function to remove all of the `EntityType.
|
|
195
|
+
* Helper function to remove all of the `EntityType.TEAR` in the room.
|
|
194
196
|
*
|
|
195
197
|
* @param tearVariant Optional. If specified, will only remove tears that match this variant.
|
|
196
198
|
* @param subType Optional. If specified, will only remove tears that match this sub-type.
|
|
@@ -198,43 +200,43 @@ export declare function removeAllSlots(slotVariant?: SlotVariant | int, subType?
|
|
|
198
200
|
* @returns True if one or more tears were removed, false otherwise.
|
|
199
201
|
*/
|
|
200
202
|
export declare function removeAllTears(tearVariant?: TearVariant | int, subType?: int, cap?: int): boolean;
|
|
201
|
-
/** Helper function to spawn a `EntityType.
|
|
203
|
+
/** Helper function to spawn a `EntityType.BOMB` (4). */
|
|
202
204
|
export declare function spawnBomb(bombVariant: BombVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityBomb;
|
|
203
|
-
/** Helper function to spawn a `EntityType.
|
|
205
|
+
/** Helper function to spawn a `EntityType.BOMB` (4) with a specific seed. */
|
|
204
206
|
export declare function spawnBombWithSeed(bombVariant: BombVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityBomb;
|
|
205
|
-
/** Helper function to spawn a `EntityType.
|
|
207
|
+
/** Helper function to spawn a `EntityType.EFFECT` (1000). */
|
|
206
208
|
export declare function spawnEffect(effectVariant: EffectVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityEffect;
|
|
207
|
-
/** Helper function to spawn a `EntityType.
|
|
209
|
+
/** Helper function to spawn a `EntityType.EFFECT` (1000) with a specific seed. */
|
|
208
210
|
export declare function spawnEffectWithSeed(effectVariant: EffectVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityEffect;
|
|
209
|
-
/** Helper function to spawn a `EntityType.
|
|
211
|
+
/** Helper function to spawn a `EntityType.FAMILIAR` (3). */
|
|
210
212
|
export declare function spawnFamiliar(familiarVariant: FamiliarVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityFamiliar;
|
|
211
|
-
/** Helper function to spawn a `EntityType.
|
|
213
|
+
/** Helper function to spawn a `EntityType.FAMILIAR` (3) with a specific seed. */
|
|
212
214
|
export declare function spawnFamiliarWithSeed(familiarVariant: FamiliarVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityFamiliar;
|
|
213
|
-
/** Helper function to spawn a `EntityType.
|
|
215
|
+
/** Helper function to spawn a `EntityType.KNIFE` (8). */
|
|
214
216
|
export declare function spawnKnife(knifeVariant: KnifeVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityKnife;
|
|
215
|
-
/** Helper function to spawn a `EntityType.
|
|
217
|
+
/** Helper function to spawn a `EntityType.KNIFE` (8) with a specific seed. */
|
|
216
218
|
export declare function spawnKnifeWithSeed(knifeVariant: KnifeVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityKnife;
|
|
217
|
-
/** Helper function to spawn a `EntityType.
|
|
219
|
+
/** Helper function to spawn a `EntityType.LASER` (7). */
|
|
218
220
|
export declare function spawnLaser(laserVariant: LaserVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityLaser;
|
|
219
|
-
/** Helper function to spawn a `EntityType.
|
|
221
|
+
/** Helper function to spawn a `EntityType.LASER` (7) with a specific seed. */
|
|
220
222
|
export declare function spawnLaserWithSeed(laserVariant: LaserVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityLaser;
|
|
221
223
|
/** Helper function to spawn an NPC. */
|
|
222
224
|
export declare function spawnNPC<T extends number>(entityType: T extends EntityTypeNonNPC ? never : T, variant: int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityNPC;
|
|
223
225
|
/** Helper function to spawn an NPC with a specific seed. */
|
|
224
226
|
export declare function spawnNPCWithSeed(entityType: EntityType | int, variant: int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityNPC;
|
|
225
|
-
/** Helper function to spawn a `EntityType.
|
|
227
|
+
/** Helper function to spawn a `EntityType.PICKUP` (5). */
|
|
226
228
|
export declare function spawnPickup(pickupVariant: PickupVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityPickup;
|
|
227
|
-
/** Helper function to spawn a `EntityType.
|
|
229
|
+
/** Helper function to spawn a `EntityType.PICKUP` (5) with a specific seed. */
|
|
228
230
|
export declare function spawnPickupWithSeed(pickupVariant: PickupVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityPickup;
|
|
229
|
-
/** Helper function to spawn a `EntityType.
|
|
231
|
+
/** Helper function to spawn a `EntityType.PROJECTILE` (9). */
|
|
230
232
|
export declare function spawnProjectile(projectileVariant: ProjectileVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityProjectile;
|
|
231
|
-
/** Helper function to spawn a `EntityType.
|
|
233
|
+
/** Helper function to spawn a `EntityType.PROJECTILE` (9) with a specific seed. */
|
|
232
234
|
export declare function spawnProjectileWithSeed(projectileVariant: ProjectileVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityProjectile;
|
|
233
|
-
/** Helper function to spawn a `EntityType.
|
|
235
|
+
/** Helper function to spawn a `EntityType.SLOT` (6). */
|
|
234
236
|
export declare function spawnSlot(slotVariant: SlotVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): Entity;
|
|
235
|
-
/** Helper function to spawn a `EntityType.
|
|
237
|
+
/** Helper function to spawn a `EntityType.SLOT` (6) with a specific seed. */
|
|
236
238
|
export declare function spawnSlotWithSeed(slotVariant: int | SlotVariant, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): Entity;
|
|
237
|
-
/** Helper function to spawn a `EntityType.
|
|
239
|
+
/** Helper function to spawn a `EntityType.TEAR` (2). */
|
|
238
240
|
export declare function spawnTear(tearVariant: TearVariant | int, subType: int, position: Vector, velocity?: Readonly<Vector>, spawner?: Entity | undefined, seed?: Seed | undefined): EntityTear;
|
|
239
241
|
/** Helper function to spawn a `EntityType.EntityType` (2) with a specific seed. */
|
|
240
242
|
export declare function spawnTearWithSeed(tearVariant: TearVariant | int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined): EntityTear;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
3
4
|
local ____constants = require("constants")
|
|
4
5
|
local VectorZero = ____constants.VectorZero
|
|
5
6
|
local ____entity = require("functions.entity")
|
|
@@ -13,7 +14,7 @@ function ____exports.getBombs(self, bombVariant, subType)
|
|
|
13
14
|
if subType == nil then
|
|
14
15
|
subType = -1
|
|
15
16
|
end
|
|
16
|
-
local entities = getEntities(nil, EntityType.
|
|
17
|
+
local entities = getEntities(nil, EntityType.BOMB, bombVariant, subType)
|
|
17
18
|
local bombs = {}
|
|
18
19
|
for ____, entity in ipairs(entities) do
|
|
19
20
|
local bomb = entity:ToBomb()
|
|
@@ -30,7 +31,7 @@ function ____exports.getEffects(self, effectVariant, subType)
|
|
|
30
31
|
if subType == nil then
|
|
31
32
|
subType = -1
|
|
32
33
|
end
|
|
33
|
-
local entities = getEntities(nil, EntityType.
|
|
34
|
+
local entities = getEntities(nil, EntityType.EFFECT, effectVariant, subType)
|
|
34
35
|
local effects = {}
|
|
35
36
|
for ____, entity in ipairs(entities) do
|
|
36
37
|
local effect = entity:ToEffect()
|
|
@@ -47,7 +48,7 @@ function ____exports.getFamiliars(self, familiarVariant, subType)
|
|
|
47
48
|
if subType == nil then
|
|
48
49
|
subType = -1
|
|
49
50
|
end
|
|
50
|
-
local entities = getEntities(nil, EntityType.
|
|
51
|
+
local entities = getEntities(nil, EntityType.FAMILIAR, familiarVariant, subType)
|
|
51
52
|
local familiars = {}
|
|
52
53
|
for ____, entity in ipairs(entities) do
|
|
53
54
|
local familiar = entity:ToFamiliar()
|
|
@@ -64,7 +65,7 @@ function ____exports.getKnives(self, knifeVariant, subType)
|
|
|
64
65
|
if subType == nil then
|
|
65
66
|
subType = -1
|
|
66
67
|
end
|
|
67
|
-
local entities = getEntities(nil, EntityType.
|
|
68
|
+
local entities = getEntities(nil, EntityType.KNIFE, knifeVariant, subType)
|
|
68
69
|
local knives = {}
|
|
69
70
|
for ____, entity in ipairs(entities) do
|
|
70
71
|
local knife = entity:ToKnife()
|
|
@@ -81,7 +82,7 @@ function ____exports.getLasers(self, laserVariant, subType)
|
|
|
81
82
|
if subType == nil then
|
|
82
83
|
subType = -1
|
|
83
84
|
end
|
|
84
|
-
local entities = getEntities(nil, EntityType.
|
|
85
|
+
local entities = getEntities(nil, EntityType.LASER, laserVariant, subType)
|
|
85
86
|
local lasers = {}
|
|
86
87
|
for ____, entity in ipairs(entities) do
|
|
87
88
|
local laser = entity:ToLaser()
|
|
@@ -118,7 +119,7 @@ function ____exports.getPickups(self, pickupVariant, subType)
|
|
|
118
119
|
if subType == nil then
|
|
119
120
|
subType = -1
|
|
120
121
|
end
|
|
121
|
-
local entities = getEntities(nil, EntityType.
|
|
122
|
+
local entities = getEntities(nil, EntityType.PICKUP, pickupVariant, subType)
|
|
122
123
|
local pickups = {}
|
|
123
124
|
for ____, entity in ipairs(entities) do
|
|
124
125
|
local pickup = entity:ToPickup()
|
|
@@ -135,7 +136,7 @@ function ____exports.getProjectiles(self, projectileVariant, subType)
|
|
|
135
136
|
if subType == nil then
|
|
136
137
|
subType = -1
|
|
137
138
|
end
|
|
138
|
-
local entities = getEntities(nil, EntityType.
|
|
139
|
+
local entities = getEntities(nil, EntityType.PROJECTILE, projectileVariant, subType)
|
|
139
140
|
local projectiles = {}
|
|
140
141
|
for ____, entity in ipairs(entities) do
|
|
141
142
|
local projectile = entity:ToProjectile()
|
|
@@ -152,7 +153,7 @@ function ____exports.getSlots(self, slotVariant, subType)
|
|
|
152
153
|
if subType == nil then
|
|
153
154
|
subType = -1
|
|
154
155
|
end
|
|
155
|
-
local slots = getEntities(nil, EntityType.
|
|
156
|
+
local slots = getEntities(nil, EntityType.SLOT, slotVariant, subType)
|
|
156
157
|
return slots
|
|
157
158
|
end
|
|
158
159
|
function ____exports.getTears(self, tearVariant, subType)
|
|
@@ -162,7 +163,7 @@ function ____exports.getTears(self, tearVariant, subType)
|
|
|
162
163
|
if subType == nil then
|
|
163
164
|
subType = -1
|
|
164
165
|
end
|
|
165
|
-
local entities = getEntities(nil, EntityType.
|
|
166
|
+
local entities = getEntities(nil, EntityType.TEAR, tearVariant, subType)
|
|
166
167
|
local tears = {}
|
|
167
168
|
for ____, entity in ipairs(entities) do
|
|
168
169
|
local tear = entity:ToTear()
|
|
@@ -224,7 +225,7 @@ function ____exports.spawnBomb(self, bombVariant, subType, position, velocity, s
|
|
|
224
225
|
end
|
|
225
226
|
local entity = spawn(
|
|
226
227
|
nil,
|
|
227
|
-
EntityType.
|
|
228
|
+
EntityType.BOMB,
|
|
228
229
|
bombVariant,
|
|
229
230
|
subType,
|
|
230
231
|
position,
|
|
@@ -267,7 +268,7 @@ function ____exports.spawnEffect(self, effectVariant, subType, position, velocit
|
|
|
267
268
|
end
|
|
268
269
|
local entity = spawn(
|
|
269
270
|
nil,
|
|
270
|
-
EntityType.
|
|
271
|
+
EntityType.EFFECT,
|
|
271
272
|
effectVariant,
|
|
272
273
|
subType,
|
|
273
274
|
position,
|
|
@@ -310,7 +311,7 @@ function ____exports.spawnFamiliar(self, familiarVariant, subType, position, vel
|
|
|
310
311
|
end
|
|
311
312
|
local entity = spawn(
|
|
312
313
|
nil,
|
|
313
|
-
EntityType.
|
|
314
|
+
EntityType.FAMILIAR,
|
|
314
315
|
familiarVariant,
|
|
315
316
|
subType,
|
|
316
317
|
position,
|
|
@@ -353,7 +354,7 @@ function ____exports.spawnKnife(self, knifeVariant, subType, position, velocity,
|
|
|
353
354
|
end
|
|
354
355
|
local entity = spawn(
|
|
355
356
|
nil,
|
|
356
|
-
EntityType.
|
|
357
|
+
EntityType.KNIFE,
|
|
357
358
|
knifeVariant,
|
|
358
359
|
subType,
|
|
359
360
|
position,
|
|
@@ -396,7 +397,7 @@ function ____exports.spawnLaser(self, laserVariant, subType, position, velocity,
|
|
|
396
397
|
end
|
|
397
398
|
local entity = spawn(
|
|
398
399
|
nil,
|
|
399
|
-
EntityType.
|
|
400
|
+
EntityType.LASER,
|
|
400
401
|
laserVariant,
|
|
401
402
|
subType,
|
|
402
403
|
position,
|
|
@@ -483,7 +484,7 @@ function ____exports.spawnPickup(self, pickupVariant, subType, position, velocit
|
|
|
483
484
|
end
|
|
484
485
|
local entity = spawn(
|
|
485
486
|
nil,
|
|
486
|
-
EntityType.
|
|
487
|
+
EntityType.PICKUP,
|
|
487
488
|
pickupVariant,
|
|
488
489
|
subType,
|
|
489
490
|
position,
|
|
@@ -526,7 +527,7 @@ function ____exports.spawnProjectile(self, projectileVariant, subType, position,
|
|
|
526
527
|
end
|
|
527
528
|
local entity = spawn(
|
|
528
529
|
nil,
|
|
529
|
-
EntityType.
|
|
530
|
+
EntityType.PROJECTILE,
|
|
530
531
|
projectileVariant,
|
|
531
532
|
subType,
|
|
532
533
|
position,
|
|
@@ -569,7 +570,7 @@ function ____exports.spawnSlot(self, slotVariant, subType, position, velocity, s
|
|
|
569
570
|
end
|
|
570
571
|
return spawn(
|
|
571
572
|
nil,
|
|
572
|
-
EntityType.
|
|
573
|
+
EntityType.SLOT,
|
|
573
574
|
slotVariant,
|
|
574
575
|
subType,
|
|
575
576
|
position,
|
|
@@ -607,7 +608,7 @@ function ____exports.spawnTear(self, tearVariant, subType, position, velocity, s
|
|
|
607
608
|
end
|
|
608
609
|
local entity = spawn(
|
|
609
610
|
nil,
|
|
610
|
-
EntityType.
|
|
611
|
+
EntityType.TEAR,
|
|
611
612
|
tearVariant,
|
|
612
613
|
subType,
|
|
613
614
|
position,
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
/**
|
|
3
|
+
* TypeScriptToLua will transpile TypeScript enums to Lua tables that have a double mapping. Thus,
|
|
4
|
+
* when you iterate over them, you will get both the names of the enums and the values of the enums,
|
|
5
|
+
* in a random order. Use this helper function to get the entries of the enum with the reverse
|
|
6
|
+
* mappings filtered out.
|
|
7
|
+
*
|
|
8
|
+
* This function will return the enum values in a sorted order, which may not necessarily be the
|
|
9
|
+
* same order as which they were declared in.
|
|
10
|
+
*
|
|
11
|
+
* This function will work properly for both number enums and string enums. (Reverse mappings are
|
|
12
|
+
* not created for string enums.)
|
|
13
|
+
*
|
|
14
|
+
* Also see the `getEnumKeys` and `getEnumValues` helper functions.
|
|
15
|
+
*
|
|
16
|
+
* For a more in depth explanation, see:
|
|
17
|
+
* https://isaacscript.github.io/docs/gotchas#iterating-over-enums
|
|
18
|
+
*/
|
|
19
|
+
export declare function getEnumEntries<T>(transpiledEnum: T): Array<[key: string, value: T[keyof T]]>;
|
|
20
|
+
/**
|
|
21
|
+
* TypeScriptToLua will transpile TypeScript enums to Lua tables that have a double mapping. Thus,
|
|
22
|
+
* when you iterate over them, you will get both the names of the enums and the values of the enums,
|
|
23
|
+
* in a random order. If all you need are the keys of an enum, use this helper function.
|
|
24
|
+
*
|
|
25
|
+
* This function will return the enum keys in a sorted order, which may not necessarily be the same
|
|
26
|
+
* order as which they were declared in.
|
|
27
|
+
*
|
|
28
|
+
* This function will work properly for both number enums and string enums. (Reverse mappings are
|
|
29
|
+
* not created for string enums.)
|
|
30
|
+
*
|
|
31
|
+
* Also see the `getEnumEntries` and `getEnumValues` helper functions.
|
|
32
|
+
*
|
|
33
|
+
* For a more in depth explanation, see:
|
|
34
|
+
* https://isaacscript.github.io/docs/gotchas#iterating-over-enums
|
|
35
|
+
*/
|
|
36
|
+
export declare function getEnumKeys<T>(transpiledEnum: T): string[];
|
|
37
|
+
/** Helper function to get the amount of entries inside of an enum. */
|
|
38
|
+
export declare function getEnumLength<T>(transpiledEnum: T): int;
|
|
39
|
+
/**
|
|
40
|
+
* TypeScriptToLua will transpile TypeScript enums to Lua tables that have a double mapping. Thus,
|
|
41
|
+
* when you iterate over them, you will get both the names of the enums and the values of the enums,
|
|
42
|
+
* in a random order. If all you need are the values of an enum, use this helper function.
|
|
43
|
+
*
|
|
44
|
+
* This function will return the enum values in a sorted order, which may not necessarily be the
|
|
45
|
+
* same order as which they were declared in.
|
|
46
|
+
*
|
|
47
|
+
* This function will work properly for both number enums and string enums. (Reverse mappings are
|
|
48
|
+
* not created for string enums.)
|
|
49
|
+
*
|
|
50
|
+
* Also see the `getEnumEntries` and `getEnumKeys` helper functions.
|
|
51
|
+
*
|
|
52
|
+
* For a more in depth explanation, see:
|
|
53
|
+
* https://isaacscript.github.io/docs/gotchas#iterating-over-enums
|
|
54
|
+
*/
|
|
55
|
+
export declare function getEnumValues<T>(transpiledEnum: T): Array<T[keyof T]>;
|
|
56
|
+
export declare function getLastEnumValue<T>(transpiledEnum: T): T[keyof T];
|
|
57
|
+
/**
|
|
58
|
+
* Helper function to check every value of a custom enum for -1. This is helpful as a run-time check
|
|
59
|
+
* because many methods of the Isaac class return -1 if they fail.
|
|
60
|
+
*
|
|
61
|
+
* Example:
|
|
62
|
+
* ```ts
|
|
63
|
+
* enum EntityTypeCustom {
|
|
64
|
+
* FOO = Isaac.GetEntityTypeByName("Foo"),
|
|
65
|
+
* }
|
|
66
|
+
*
|
|
67
|
+
* validateCustomEnum("EntityTypeCustom", EntityTypeCustom);
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare function validateCustomEnum(transpiledEnumName: string, transpiledEnum: unknown): void;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__ArraySort = ____lualib.__TS__ArraySort
|
|
3
|
+
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
function ____exports.getEnumEntries(self, transpiledEnum)
|
|
6
|
+
local enumEntries = {}
|
|
7
|
+
for key, value in pairs(transpiledEnum) do
|
|
8
|
+
if type(key) == "string" then
|
|
9
|
+
enumEntries[#enumEntries + 1] = {key, value}
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
__TS__ArraySort(
|
|
13
|
+
enumEntries,
|
|
14
|
+
function(____, ____bindingPattern0, ____bindingPattern1)
|
|
15
|
+
local value1
|
|
16
|
+
local _key1 = ____bindingPattern0[1]
|
|
17
|
+
value1 = ____bindingPattern0[2]
|
|
18
|
+
local value2
|
|
19
|
+
local _key2 = ____bindingPattern1[1]
|
|
20
|
+
value2 = ____bindingPattern1[2]
|
|
21
|
+
return value1 < value2 and -1 or (value1 > value2 and 1 or 0)
|
|
22
|
+
end
|
|
23
|
+
)
|
|
24
|
+
return enumEntries
|
|
25
|
+
end
|
|
26
|
+
function ____exports.getEnumKeys(self, transpiledEnum)
|
|
27
|
+
local enumEntries = ____exports.getEnumEntries(nil, transpiledEnum)
|
|
28
|
+
return __TS__ArrayMap(
|
|
29
|
+
enumEntries,
|
|
30
|
+
function(____, ____bindingPattern0)
|
|
31
|
+
local key
|
|
32
|
+
key = ____bindingPattern0[1]
|
|
33
|
+
local _value = ____bindingPattern0[2]
|
|
34
|
+
return key
|
|
35
|
+
end
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
function ____exports.getEnumLength(self, transpiledEnum)
|
|
39
|
+
local enumEntries = ____exports.getEnumEntries(nil, transpiledEnum)
|
|
40
|
+
return #enumEntries
|
|
41
|
+
end
|
|
42
|
+
function ____exports.getEnumValues(self, transpiledEnum)
|
|
43
|
+
local enumEntries = ____exports.getEnumEntries(nil, transpiledEnum)
|
|
44
|
+
return __TS__ArrayMap(
|
|
45
|
+
enumEntries,
|
|
46
|
+
function(____, ____bindingPattern0)
|
|
47
|
+
local value
|
|
48
|
+
local _key = ____bindingPattern0[1]
|
|
49
|
+
value = ____bindingPattern0[2]
|
|
50
|
+
return value
|
|
51
|
+
end
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
function ____exports.getLastEnumValue(self, transpiledEnum)
|
|
55
|
+
local enumValues = ____exports.getEnumValues(nil, transpiledEnum)
|
|
56
|
+
local lastElement = enumValues[#enumValues]
|
|
57
|
+
if lastElement == nil then
|
|
58
|
+
error("Failed to get the last value from an enum since the enum was empty.")
|
|
59
|
+
end
|
|
60
|
+
return lastElement
|
|
61
|
+
end
|
|
62
|
+
function ____exports.validateCustomEnum(self, transpiledEnumName, transpiledEnum)
|
|
63
|
+
for ____, ____value in ipairs(____exports.getEnumEntries(nil, transpiledEnum)) do
|
|
64
|
+
local key = ____value[1]
|
|
65
|
+
local value = ____value[2]
|
|
66
|
+
if value == -1 then
|
|
67
|
+
error((("Failed to find custom enum value: " .. transpiledEnumName) .. ".") .. key)
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
return ____exports
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* RNG object; see the documentation of the method for more details.)
|
|
9
9
|
*
|
|
10
10
|
* This function is meant to be called in the EvaluateCache callback (when the cache flag is equal
|
|
11
|
-
* to `CacheFlag.
|
|
11
|
+
* to `CacheFlag.FAMILIARS`).
|
|
12
12
|
*
|
|
13
13
|
* Note that this function is only meant to be used in special circumstances where the familiar
|
|
14
14
|
* count is completely custom and does not correspond to the amount of collectibles. For the general
|
|
@@ -37,7 +37,7 @@ export declare function checkFamiliar(player: EntityPlayer, collectibleType: int
|
|
|
37
37
|
* that the target count is handled automatically.
|
|
38
38
|
*
|
|
39
39
|
* This function is meant to be called in the EvaluateCache callback (when the cache flag is equal
|
|
40
|
-
* to `CacheFlag.
|
|
40
|
+
* to `CacheFlag.FAMILIARS`).
|
|
41
41
|
*
|
|
42
42
|
* Use this function when the amount of familiars should be equal to the amount of associated
|
|
43
43
|
* collectibles that the player has (plus any extras from having used Box of Friends or Monster
|
package/dist/functions/flag.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { DamageFlag } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to add a bit flag to an existing set of bit flags.
|
|
4
|
+
*
|
|
4
5
|
* This is a variadic function, so pass as many flags as you want to add.
|
|
5
6
|
*
|
|
6
7
|
* Example 1:
|
|
@@ -18,14 +19,37 @@
|
|
|
18
19
|
* ```
|
|
19
20
|
*
|
|
20
21
|
* @param flags The existing set of bit flags.
|
|
21
|
-
* @param
|
|
22
|
+
* @param flagsToAdd One or more bit flags to add, each as a separate argument.
|
|
22
23
|
* @returns The combined bit flags.
|
|
23
24
|
*/
|
|
24
|
-
export declare function addFlag(flags:
|
|
25
|
+
export declare function addFlag<T extends BitFlag | BitFlag128>(flags: T | BitFlags<T>, ...flagsToAdd: T[]): BitFlags<T>;
|
|
26
|
+
/**
|
|
27
|
+
* Helper function for casting a flag enum value to a `BitFlags` object.
|
|
28
|
+
*
|
|
29
|
+
* This is useful because the compiler will prevent you from assigning a specific flag to a
|
|
30
|
+
* `BitFlags` property. (It does this to ensure type safety, since `BitFlags` can represent a zero
|
|
31
|
+
* value or a composition of N flags.)
|
|
32
|
+
*
|
|
33
|
+
* For example:
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* player.TearFlags = bitFlags(TearFlag.SPECTRAL);
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function bitFlags<T extends BitFlag | BitFlag128>(flag: T): BitFlags<T>;
|
|
40
|
+
/**
|
|
41
|
+
* Helper function to get the key associated with a particular flag.
|
|
42
|
+
*
|
|
43
|
+
* (Since bit flags are represented by custom objects instead of normal TypeScript enums, you cannot
|
|
44
|
+
* use the reverse mapping to find the associated key of a given enum value. Use this helper
|
|
45
|
+
* function instead of indexing the enum directly.)
|
|
46
|
+
*/
|
|
47
|
+
export declare function getFlagName<T extends BitFlag | BitFlag128>(flag: BitFlag, flagEnum: Record<string, T>): string | undefined;
|
|
25
48
|
/**
|
|
26
49
|
* Helper function to determine if a particular bit flag is set to true.
|
|
27
|
-
*
|
|
28
|
-
*
|
|
50
|
+
*
|
|
51
|
+
* This is a variadic function, so pass as many flags as you want to check for. If passed multiple
|
|
52
|
+
* flags, it will only return true if all of the flags are set.
|
|
29
53
|
*
|
|
30
54
|
* Example:
|
|
31
55
|
* ```ts
|
|
@@ -36,17 +60,25 @@ export declare function addFlag(flags: int, ...flag: int[]): int;
|
|
|
36
60
|
* ```
|
|
37
61
|
*
|
|
38
62
|
* @param flags The existing set of bit flags.
|
|
39
|
-
* @param
|
|
63
|
+
* @param flagsToCheck One or more bit flags to check for, each as a separate argument.
|
|
40
64
|
*/
|
|
41
|
-
export declare function hasFlag(flags:
|
|
65
|
+
export declare function hasFlag<T extends BitFlag | BitFlag128>(flags: T | BitFlags<T>, ...flagsToCheck: T[]): boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Helper function to check if every bit in the flag is turned off.
|
|
68
|
+
*
|
|
69
|
+
* (This is equivalent to checking if the flag is equal to 0, but this is not possible without
|
|
70
|
+
* casting the flag to a number.)
|
|
71
|
+
*/
|
|
72
|
+
export declare function isEmptyFlag<T extends BitFlag | BitFlag128>(flag: T): boolean;
|
|
42
73
|
/**
|
|
43
74
|
* Helper function to determine whether damage to a player in the EntityTakeDmg callback was
|
|
44
75
|
* self-inflicted. For example, damage from a Curse Room door, a Razor, or a Blood Donation Machine
|
|
45
76
|
* would count as self-inflicted damage.
|
|
46
77
|
*/
|
|
47
|
-
export declare function isSelfDamage(damageFlags:
|
|
78
|
+
export declare function isSelfDamage(damageFlags: DamageFlag | BitFlags<DamageFlag>): boolean;
|
|
48
79
|
/**
|
|
49
80
|
* Helper function to remove a bit flag from an existing set of bit flags.
|
|
81
|
+
*
|
|
50
82
|
* This is a variadic function, so pass as many flags as you want to remove.
|
|
51
83
|
*
|
|
52
84
|
* Example:
|
|
@@ -57,7 +89,7 @@ export declare function isSelfDamage(damageFlags: int): boolean;
|
|
|
57
89
|
* ```
|
|
58
90
|
*
|
|
59
91
|
* @param flags The existing set of bit flags.
|
|
60
|
-
* @param
|
|
92
|
+
* @param flagsToRemove One or more bit flags to remove, each as a separate argument.
|
|
61
93
|
* @returns The combined bit flags.
|
|
62
94
|
*/
|
|
63
|
-
export declare function removeFlag(flags:
|
|
95
|
+
export declare function removeFlag<T extends BitFlag | BitFlag128>(flags: T | BitFlags<T>, ...flagsToRemove: T[]): BitFlags<T>;
|