isaacscript-common 1.2.292 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cachedClasses.d.ts +1 -1
- package/dist/cachedClasses.lua +0 -1
- package/dist/callbacks/customRevive.lua +13 -8
- package/dist/callbacks/itemPickup.lua +3 -1
- package/dist/callbacks/postBombInitLate.lua +3 -1
- package/dist/callbacks/postBoneSwing.lua +5 -2
- package/dist/callbacks/postCollectibleInitFirst.lua +4 -1
- package/dist/callbacks/postCursedTeleport.lua +16 -8
- package/dist/callbacks/postCustomDoorEnter.d.ts +1 -1
- package/dist/callbacks/postCustomDoorEnter.lua +16 -10
- package/dist/callbacks/postEffectInitLate.lua +3 -1
- package/dist/callbacks/postEffectStateChanged.lua +3 -1
- package/dist/callbacks/postEsauJr.lua +5 -2
- package/dist/callbacks/postFamiliarInitLate.lua +3 -1
- package/dist/callbacks/postFamiliarStateChanged.lua +3 -1
- package/dist/callbacks/postFlip.lua +9 -5
- package/dist/callbacks/postGreedModeWave.d.ts +1 -0
- package/dist/callbacks/postGreedModeWave.lua +32 -0
- package/dist/callbacks/postGreedWave.d.ts +1 -0
- package/dist/callbacks/postGreedWave.lua +31 -0
- package/dist/callbacks/postGridEntity.lua +4 -2
- package/dist/callbacks/postGridEntityCollision.lua +5 -2
- package/dist/callbacks/postHolyMantleRemoved.lua +3 -1
- package/dist/callbacks/postItemDischarged.lua +10 -5
- package/dist/callbacks/postKnifeInitLate.lua +3 -1
- package/dist/callbacks/postLaserInitLate.lua +3 -1
- package/dist/callbacks/postNPCInitLate.lua +3 -1
- package/dist/callbacks/postNPCStateChanged.lua +3 -1
- package/dist/callbacks/postNewRoomEarly.lua +7 -5
- package/dist/callbacks/postPickupCollect.lua +3 -1
- package/dist/callbacks/postPickupInitLate.lua +3 -1
- package/dist/callbacks/postPickupStateChanged.lua +3 -1
- package/dist/callbacks/postPlayerChangeHealth.lua +2 -2
- package/dist/callbacks/postPlayerFatalDamage.lua +4 -1
- package/dist/callbacks/postPlayerInitLate.lua +3 -1
- package/dist/callbacks/postPlayerReordered.lua +7 -6
- package/dist/callbacks/postProjectileInitLate.lua +3 -1
- package/dist/callbacks/postRoomClearChanged.lua +4 -3
- package/dist/callbacks/postSacrifice.lua +8 -4
- package/dist/callbacks/postSlotInitUpdate.lua +4 -2
- package/dist/callbacks/postSlotRender.lua +3 -1
- package/dist/callbacks/postTearInitLate.lua +3 -1
- package/dist/callbacks/postTearInitVeryLate.lua +3 -1
- package/dist/callbacks/postTransformation.lua +7 -12
- package/dist/callbacks/postTrinketBreak.lua +8 -3
- package/dist/callbacks/preBerserkDeath.lua +3 -2
- package/dist/callbacks/preNewLevel.lua +5 -3
- package/dist/callbacks/reorderedCallbacks.lua +7 -5
- package/dist/callbacks/subscriptions/postBombInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postBombInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postBoneSwing.d.ts +3 -1
- package/dist/callbacks/subscriptions/postBoneSwing.lua +3 -3
- package/dist/callbacks/subscriptions/postCollectibleInitFirst.d.ts +5 -2
- package/dist/callbacks/subscriptions/postCollectibleInitFirst.lua +3 -3
- package/dist/callbacks/subscriptions/postCursedTeleport.d.ts +3 -1
- package/dist/callbacks/subscriptions/postCursedTeleport.lua +3 -3
- package/dist/callbacks/subscriptions/postCustomDoorEnter.d.ts +5 -2
- package/dist/callbacks/subscriptions/postCustomDoorEnter.lua +3 -3
- package/dist/callbacks/subscriptions/postCustomRevive.d.ts +4 -1
- package/dist/callbacks/subscriptions/postCustomRevive.lua +3 -3
- package/dist/callbacks/subscriptions/postEffectInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postEffectInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postEffectStateChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postEffectStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postEsauJr.d.ts +3 -1
- package/dist/callbacks/subscriptions/postEsauJr.lua +3 -3
- package/dist/callbacks/subscriptions/postFamiliarInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postFamiliarInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postFamiliarStateChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postFamiliarStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postFirstEsauJr.d.ts +3 -1
- package/dist/callbacks/subscriptions/postFirstEsauJr.lua +3 -3
- package/dist/callbacks/subscriptions/postFirstFlip.d.ts +3 -1
- package/dist/callbacks/subscriptions/postFirstFlip.lua +3 -3
- package/dist/callbacks/subscriptions/postFlip.d.ts +3 -1
- package/dist/callbacks/subscriptions/postFlip.lua +3 -3
- package/dist/callbacks/subscriptions/postGameStartedReordered.d.ts +3 -1
- package/dist/callbacks/subscriptions/postGameStartedReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postGreedModeWave.d.ts +4 -0
- package/dist/callbacks/subscriptions/postGreedModeWave.lua +16 -0
- package/dist/callbacks/subscriptions/postGreedWave.d.ts +2 -0
- package/dist/callbacks/subscriptions/postGreedWave.lua +16 -0
- package/dist/callbacks/subscriptions/postGridEntityBroken.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityBroken.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityCollision.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityCollision.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityInit.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityInit.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityRemove.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityRemove.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityStateChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postGridEntityUpdate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postGridEntityUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postHolyMantleRemoved.d.ts +6 -2
- package/dist/callbacks/subscriptions/postHolyMantleRemoved.lua +16 -4
- package/dist/callbacks/subscriptions/postItemDischarged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postItemDischarged.lua +3 -3
- package/dist/callbacks/subscriptions/postItemPickup.d.ts +6 -2
- package/dist/callbacks/subscriptions/postItemPickup.lua +3 -3
- package/dist/callbacks/subscriptions/postKnifeInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postKnifeInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postLaserInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postLaserInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postNPCInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postNPCInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postNPCStateChanged.d.ts +6 -2
- package/dist/callbacks/subscriptions/postNPCStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postNewLevelReordered.d.ts +1 -1
- package/dist/callbacks/subscriptions/postNewLevelReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postNewRoomEarly.d.ts +1 -1
- package/dist/callbacks/subscriptions/postNewRoomEarly.lua +3 -3
- package/dist/callbacks/subscriptions/postNewRoomReordered.d.ts +1 -1
- package/dist/callbacks/subscriptions/postNewRoomReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.d.ts +6 -2
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.lua +8 -4
- package/dist/callbacks/subscriptions/postPickupCollect.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPickupCollect.lua +3 -3
- package/dist/callbacks/subscriptions/postPickupInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPickupInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPickupStateChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPickupStateChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerChangeType.d.ts +4 -2
- package/dist/callbacks/subscriptions/postPlayerChangeType.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerFatalDamage.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerInitReordered.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerInitReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerRenderReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.d.ts +5 -2
- package/dist/callbacks/subscriptions/postPlayerUpdateReordered.lua +3 -3
- package/dist/callbacks/subscriptions/postProjectileInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postProjectileInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postPurchase.d.ts +6 -2
- package/dist/callbacks/subscriptions/postPurchase.lua +3 -3
- package/dist/callbacks/subscriptions/postRoomClearChanged.d.ts +3 -1
- package/dist/callbacks/subscriptions/postRoomClearChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postSacrifice.d.ts +3 -1
- package/dist/callbacks/subscriptions/postSacrifice.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotAnimationChanged.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotAnimationChanged.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotDestroyed.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotDestroyed.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotInit.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotInit.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotRender.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotRender.lua +3 -3
- package/dist/callbacks/subscriptions/postSlotUpdate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postSlotUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postTearInitLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postTearInitLate.lua +3 -3
- package/dist/callbacks/subscriptions/postTearInitVeryLate.d.ts +5 -2
- package/dist/callbacks/subscriptions/postTearInitVeryLate.lua +3 -3
- package/dist/callbacks/subscriptions/postTransformation.d.ts +5 -2
- package/dist/callbacks/subscriptions/postTransformation.lua +3 -3
- package/dist/callbacks/subscriptions/postTrinketBreak.d.ts +5 -2
- package/dist/callbacks/subscriptions/postTrinketBreak.lua +3 -3
- package/dist/callbacks/subscriptions/preBerserkDeath.d.ts +5 -2
- package/dist/callbacks/subscriptions/preBerserkDeath.lua +3 -3
- package/dist/callbacks/subscriptions/preCustomRevive.d.ts +3 -1
- package/dist/callbacks/subscriptions/preCustomRevive.lua +3 -3
- package/dist/callbacks/subscriptions/preItemPickup.d.ts +6 -2
- package/dist/callbacks/subscriptions/preItemPickup.lua +3 -3
- package/dist/callbacks/subscriptions/preNewLevel.d.ts +3 -1
- package/dist/callbacks/subscriptions/preNewLevel.lua +3 -3
- package/dist/classes/ModUpgraded.d.ts +5 -5
- package/dist/constants.d.ts +9 -43
- package/dist/constants.lua +16 -13
- package/dist/constantsMax.d.ts +16 -0
- package/dist/constantsMax.lua +27 -0
- package/dist/enums/CardType.lua +1 -1
- package/dist/enums/CollectiblePedestalType.lua +1 -1
- package/dist/enums/HealthType.d.ts +3 -3
- package/dist/enums/HealthType.lua +1 -2
- package/dist/enums/ModCallbacksCustom.d.ts +56 -48
- package/dist/enums/ModCallbacksCustom.lua +47 -46
- package/dist/enums/PillEffectClass.lua +1 -1
- package/dist/enums/PillEffectType.lua +1 -1
- package/dist/enums/PocketItemType.lua +1 -2
- package/dist/enums/SerializationType.lua +1 -2
- package/dist/enums/private/CopyableIsaacAPIClassType.d.ts +1 -1
- package/dist/enums/private/CopyableIsaacAPIClassType.lua +2 -3
- package/dist/enums/private/SaveDataKeys.d.ts +4 -4
- package/dist/enums/private/SaveDataKeys.lua +5 -6
- package/dist/enums/private/SerializationBrand.d.ts +3 -4
- package/dist/enums/private/SerializationBrand.lua +2 -15
- package/dist/features/characterHealthConversion.d.ts +2 -2
- package/dist/features/characterHealthConversion.lua +8 -4
- package/dist/features/characterStats.d.ts +4 -4
- package/dist/features/characterStats.lua +3 -1
- package/dist/features/debugDisplay.lua +12 -11
- package/dist/features/deployJSONRoom.d.ts +3 -3
- package/dist/features/deployJSONRoom.lua +35 -21
- package/dist/features/disableInputs.d.ts +1 -1
- package/dist/features/disableInputs.lua +6 -3
- package/dist/features/disableSound.lua +3 -1
- package/dist/features/extraConsoleCommands/commands.d.ts +5 -3
- package/dist/features/extraConsoleCommands/commands.lua +96 -56
- package/dist/features/extraConsoleCommands/commandsDisplay.lua +0 -1
- package/dist/features/extraConsoleCommands/commandsSubroutines.d.ts +1 -1
- package/dist/features/extraConsoleCommands/commandsSubroutines.lua +13 -10
- package/dist/features/extraConsoleCommands/init.lua +17 -9
- package/dist/features/extraConsoleCommands/v.lua +0 -1
- package/dist/features/fadeInRemover.lua +3 -2
- package/dist/features/fastReset.lua +7 -5
- package/dist/features/forgottenSwitch.lua +6 -3
- package/dist/features/getCollectibleItemPoolType.d.ts +1 -1
- package/dist/features/getCollectibleItemPoolType.lua +6 -2
- package/dist/features/isPonyActive.lua +5 -2
- package/dist/features/playerInventory.d.ts +1 -1
- package/dist/features/playerInventory.lua +7 -3
- package/dist/features/preventCollectibleRotate.d.ts +1 -1
- package/dist/features/preventCollectibleRotate.lua +9 -4
- package/dist/features/runInNFrames.lua +4 -2
- package/dist/features/saveDataManager/constants.lua +0 -1
- package/dist/features/saveDataManager/exports.d.ts +9 -8
- package/dist/features/saveDataManager/main.lua +11 -9
- package/dist/features/saveDataManager/maps.d.ts +5 -0
- package/dist/features/saveDataManager/merge.d.ts +1 -1
- package/dist/features/saveDataManager/merge.lua +2 -1
- package/dist/features/saveDataManager/serializationBrand.d.ts +1 -0
- package/dist/features/saveDataManager/serializationBrand.lua +17 -0
- package/dist/features/sirenHelpers.d.ts +1 -1
- package/dist/features/sirenHelpers.lua +5 -2
- package/dist/features/taintedLazarusPlayers.lua +6 -3
- package/dist/featuresInitialized.lua +0 -1
- package/dist/functions/array.d.ts +18 -2
- package/dist/functions/array.lua +29 -3
- package/dist/functions/bitwise.lua +0 -1
- package/dist/functions/boss.d.ts +1 -1
- package/dist/functions/boss.lua +12 -9
- package/dist/functions/cacheFlag.d.ts +2 -2
- package/dist/functions/cacheFlag.lua +0 -1
- package/dist/functions/cards.d.ts +9 -17
- package/dist/functions/cards.lua +22 -23
- package/dist/functions/challenges.d.ts +1 -1
- package/dist/functions/challenges.lua +0 -1
- package/dist/functions/character.d.ts +6 -4
- package/dist/functions/character.lua +16 -7
- package/dist/functions/charge.d.ts +1 -1
- package/dist/functions/charge.lua +14 -9
- package/dist/functions/chargeBar.lua +0 -1
- package/dist/functions/collectibleCacheFlag.d.ts +4 -4
- package/dist/functions/collectibleCacheFlag.lua +8 -5
- package/dist/functions/collectibleSet.d.ts +1 -1
- package/dist/functions/collectibleSet.lua +4 -5
- package/dist/functions/collectibleTag.d.ts +1 -2
- package/dist/functions/collectibleTag.lua +12 -10
- package/dist/functions/collectibles.d.ts +21 -28
- package/dist/functions/collectibles.lua +29 -26
- package/dist/functions/color.lua +9 -1
- package/dist/functions/debug.d.ts +12 -0
- package/dist/functions/debug.lua +3 -1
- package/dist/functions/deepCopy.d.ts +1 -1
- package/dist/functions/deepCopy.lua +4 -2
- package/dist/functions/direction.d.ts +4 -0
- package/dist/functions/direction.lua +17 -0
- package/dist/functions/doors.d.ts +12 -16
- package/dist/functions/doors.lua +34 -26
- package/dist/functions/easing.lua +0 -1
- package/dist/functions/entity.d.ts +4 -5
- package/dist/functions/entity.lua +4 -12
- package/dist/functions/entitySpecific.d.ts +35 -33
- package/dist/functions/entitySpecific.lua +20 -19
- package/dist/functions/enums.d.ts +70 -0
- package/dist/functions/enums.lua +71 -0
- package/dist/functions/familiars.d.ts +2 -2
- package/dist/functions/familiars.lua +0 -1
- package/dist/functions/flag.d.ts +42 -10
- package/dist/functions/flag.lua +31 -13
- package/dist/functions/flying.d.ts +2 -2
- package/dist/functions/flying.lua +20 -14
- package/dist/functions/globals.lua +5 -2
- package/dist/functions/gridEntity.d.ts +18 -16
- package/dist/functions/gridEntity.lua +39 -26
- package/dist/functions/input.d.ts +14 -4
- package/dist/functions/input.lua +38 -80
- package/dist/functions/jsonHelpers.d.ts +9 -7
- package/dist/functions/jsonHelpers.lua +0 -1
- package/dist/functions/kColor.lua +14 -3
- package/dist/functions/language.lua +9 -8
- package/dist/functions/log.d.ts +21 -15
- package/dist/functions/log.lua +61 -36
- package/dist/functions/math.d.ts +19 -8
- package/dist/functions/math.lua +33 -22
- package/dist/functions/mergeTests.lua +0 -1
- package/dist/functions/npc.d.ts +1 -1
- package/dist/functions/npc.lua +32 -16
- package/dist/functions/pickups.d.ts +10 -26
- package/dist/functions/pickups.lua +31 -29
- package/dist/functions/pills.d.ts +14 -13
- package/dist/functions/pills.lua +9 -3
- package/dist/functions/player.d.ts +11 -11
- package/dist/functions/player.lua +79 -66
- package/dist/functions/playerHealth.lua +19 -16
- package/dist/functions/playerIndex.d.ts +3 -3
- package/dist/functions/playerIndex.lua +9 -6
- package/dist/functions/pocketItems.d.ts +1 -1
- package/dist/functions/pocketItems.lua +21 -12
- package/dist/functions/positionVelocity.lua +4 -1
- package/dist/functions/random.d.ts +2 -3
- package/dist/functions/random.lua +0 -1
- package/dist/functions/revive.lua +18 -13
- package/dist/functions/roomData.d.ts +2 -2
- package/dist/functions/roomData.lua +11 -13
- package/dist/functions/roomGrid.d.ts +2 -2
- package/dist/functions/roomGrid.lua +0 -1
- package/dist/functions/roomShape.d.ts +2 -2
- package/dist/functions/rooms.d.ts +19 -14
- package/dist/functions/rooms.lua +42 -22
- package/dist/functions/run.d.ts +1 -1
- package/dist/functions/run.lua +3 -2
- package/dist/functions/seeds.d.ts +7 -0
- package/dist/functions/seeds.lua +7 -1
- package/dist/functions/sound.lua +4 -3
- package/dist/functions/spawnCollectible.d.ts +5 -5
- package/dist/functions/spawnCollectible.lua +7 -4
- package/dist/functions/sprite.d.ts +1 -1
- package/dist/functions/sprite.lua +3 -4
- package/dist/functions/stage.d.ts +4 -4
- package/dist/functions/stage.lua +3 -2
- package/dist/functions/string.d.ts +8 -1
- package/dist/functions/string.lua +10 -2
- package/dist/functions/tears.d.ts +4 -4
- package/dist/functions/tears.lua +0 -1
- package/dist/functions/transformations.d.ts +5 -3
- package/dist/functions/transformations.lua +31 -20
- package/dist/functions/trinketCacheFlag.d.ts +1 -1
- package/dist/functions/trinketCacheFlag.lua +8 -6
- package/dist/functions/trinketGive.d.ts +14 -3
- package/dist/functions/trinketGive.lua +46 -28
- package/dist/functions/trinketSet.d.ts +1 -1
- package/dist/functions/trinketSet.lua +4 -5
- package/dist/functions/trinkets.d.ts +8 -17
- package/dist/functions/trinkets.lua +17 -34
- package/dist/functions/ui.lua +7 -5
- package/dist/functions/utils.d.ts +1 -61
- package/dist/functions/utils.lua +3 -50
- package/dist/functions/vector.d.ts +1 -2
- package/dist/functions/vector.lua +8 -6
- package/dist/index.d.ts +4 -6
- package/dist/index.lua +17 -34
- package/dist/initCustomCallbacks.lua +3 -1
- package/dist/initFeatures.lua +0 -1
- package/dist/lualib_bundle.lua +14 -1
- package/dist/maps/cardMap.d.ts +1 -1
- package/dist/maps/characterMap.d.ts +1 -1
- package/dist/maps/collectibleDescriptionMap.d.ts +1 -1
- package/dist/maps/collectibleNameMap.d.ts +1 -1
- package/dist/maps/defaultPlayerStatMap.d.ts +1 -1
- package/dist/maps/defaultPlayerStatMap.lua +8 -6
- package/dist/maps/gridEntityTypeToBrokenStateMap.d.ts +1 -1
- package/dist/maps/gridEntityTypeToBrokenStateMap.lua +19 -12
- package/dist/maps/gridEntityXMLMap.d.ts +1 -1
- package/dist/maps/gridEntityXMLMap.lua +44 -34
- package/dist/maps/pillEffectMap.d.ts +1 -1
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.d.ts +1 -1
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.lua +7 -5
- package/dist/maps/roomTypeMap.d.ts +1 -1
- package/dist/maps/roomTypeMap.lua +37 -35
- package/dist/maps/trinketDescriptionMap.d.ts +1 -1
- package/dist/maps/trinketNameMap.d.ts +1 -1
- package/dist/objects/LRoomShapeToRectangles.d.ts +1 -1
- package/dist/objects/LRoomShapeToRectangles.lua +6 -5
- package/dist/objects/callbackRegisterFunctions.d.ts +2 -2
- package/dist/objects/callbackRegisterFunctions.lua +3 -1
- package/dist/objects/cardDescriptions.d.ts +1 -1
- package/dist/objects/cardDescriptions.lua +89 -90
- package/dist/objects/cardNames.d.ts +1 -1
- package/dist/objects/cardNames.lua +89 -90
- package/dist/objects/cardTypes.d.ts +3 -4
- package/dist/objects/cardTypes.lua +102 -104
- package/dist/objects/challengeNames.d.ts +1 -1
- package/dist/objects/challengeNames.lua +48 -48
- package/dist/objects/characterNames.d.ts +1 -1
- package/dist/objects/characterNames.lua +44 -44
- package/dist/objects/coinSubTypeToValue.d.ts +1 -1
- package/dist/objects/coinSubTypeToValue.lua +10 -8
- package/dist/objects/colors.lua +0 -1
- package/dist/objects/directionNames.d.ts +1 -1
- package/dist/objects/directionNames.lua +2 -1
- package/dist/objects/directionToDegrees.d.ts +1 -1
- package/dist/objects/directionToDegrees.lua +2 -1
- package/dist/objects/directionToVector.d.ts +1 -1
- package/dist/objects/directionToVector.lua +2 -1
- package/dist/objects/doorSlotFlagToDoorSlot.d.ts +5 -0
- package/dist/objects/doorSlotFlagToDoorSlot.lua +16 -0
- package/dist/objects/doorSlotToDirection.d.ts +1 -1
- package/dist/objects/doorSlotToDirection.lua +11 -10
- package/dist/objects/isaacAPIClassTypeToBrand.lua +1 -2
- package/dist/objects/isaacAPIClassTypeToCopyFunction.lua +1 -2
- package/dist/objects/pillEffectClasses.d.ts +3 -4
- package/dist/objects/pillEffectClasses.lua +55 -57
- package/dist/objects/pillEffectNames.d.ts +1 -1
- package/dist/objects/pillEffectNames.lua +52 -53
- package/dist/objects/pillEffectTypes.d.ts +3 -4
- package/dist/objects/pillEffectTypes.lua +54 -56
- package/dist/objects/roomShapeBounds.d.ts +1 -1
- package/dist/objects/roomShapeBounds.lua +14 -16
- package/dist/objects/roomShapeLayoutSizes.d.ts +1 -1
- package/dist/objects/roomShapeLayoutSizes.lua +14 -14
- package/dist/objects/roomShapeToBottomRightPosition.d.ts +1 -1
- package/dist/objects/roomShapeToBottomRightPosition.lua +14 -16
- package/dist/objects/roomShapeToDoorSlots.d.ts +1 -1
- package/dist/objects/roomShapeToDoorSlots.lua +35 -33
- package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.d.ts +2 -2
- package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.lua +68 -66
- package/dist/objects/roomShapeToGridWidth.d.ts +1 -1
- package/dist/objects/roomShapeToGridWidth.lua +14 -14
- package/dist/objects/roomShapeToTopLeftPosition.d.ts +1 -1
- package/dist/objects/roomShapeToTopLeftPosition.lua +14 -14
- package/dist/objects/roomShapeVolumes.d.ts +1 -1
- package/dist/objects/roomShapeVolumes.lua +14 -14
- package/dist/objects/roomTypeNames.d.ts +1 -1
- package/dist/objects/roomTypeNames.lua +32 -32
- package/dist/objects/serializedIsaacAPIClassTypeToIdentityFunction.lua +1 -2
- package/dist/objects/stageTypeToLetter.d.ts +1 -1
- package/dist/objects/stageTypeToLetter.lua +8 -7
- package/dist/objects/transformationNames.d.ts +1 -1
- package/dist/objects/transformationNames.lua +16 -17
- package/dist/patchErrorFunctions.lua +1 -2
- package/dist/sets/LRoomShapesSet.d.ts +1 -1
- package/dist/sets/LRoomShapesSet.lua +3 -1
- package/dist/sets/bossSets.lua +241 -211
- package/dist/sets/charactersThatStartWithAnActiveItemSet.d.ts +1 -1
- package/dist/sets/charactersThatStartWithAnActiveItemSet.lua +13 -11
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.d.ts +1 -1
- package/dist/sets/charactersWithBlackHeartFromEternalHeartSet.lua +3 -1
- package/dist/sets/charactersWithFreeDevilDealsSet.d.ts +1 -1
- package/dist/sets/charactersWithFreeDevilDealsSet.lua +3 -1
- package/dist/sets/charactersWithNoRedHeartsSet.d.ts +1 -1
- package/dist/sets/charactersWithNoRedHeartsSet.lua +10 -8
- package/dist/sets/charactersWithNoSoulHeartsSet.d.ts +1 -1
- package/dist/sets/charactersWithNoSoulHeartsSet.lua +7 -5
- package/dist/sets/chestPickupVariantsSet.d.ts +1 -1
- package/dist/sets/chestPickupVariantsSet.lua +14 -12
- package/dist/sets/familiarsThatShootPlayerTearsSet.d.ts +1 -1
- package/dist/sets/familiarsThatShootPlayerTearsSet.lua +2 -0
- package/dist/sets/lostStyleCharactersSet.d.ts +1 -1
- package/dist/sets/lostStyleCharactersSet.lua +7 -5
- package/dist/sets/redHeartSubTypesSet.d.ts +1 -1
- package/dist/sets/redHeartSubTypesSet.lua +3 -1
- package/dist/sets/sinEntityTypesSet.d.ts +1 -1
- package/dist/sets/sinEntityTypesSet.lua +9 -7
- package/dist/sets/singleUseActiveCollectibleTypesSet.d.ts +1 -1
- package/dist/sets/singleUseActiveCollectibleTypesSet.lua +10 -8
- package/dist/sets/storyBossesSet.d.ts +1 -1
- package/dist/sets/storyBossesSet.lua +15 -13
- package/dist/types/AddCallbackParameterCustom.d.ts +123 -0
- package/dist/types/AddCallbackParameterCustom.lua +4 -0
- package/dist/types/AddCallbackParametersCustom.d.ts +120 -277
- package/dist/types/AnyEntity.lua +0 -1
- package/dist/types/CollectibleIndex.lua +0 -1
- package/dist/types/EntityTypeNonNPC.lua +0 -1
- package/dist/types/JSONDoor.lua +0 -1
- package/dist/types/JSONEntity.lua +0 -1
- package/dist/types/JSONRoom.lua +0 -1
- package/dist/types/JSONRooms.lua +0 -1
- package/dist/types/JSONSpawn.lua +0 -1
- package/dist/types/PickingUpItem.d.ts +1 -1
- package/dist/types/PickingUpItem.lua +5 -3
- package/dist/types/PlayerHealth.d.ts +1 -1
- package/dist/types/PlayerHealth.lua +0 -1
- package/dist/types/PlayerIndex.lua +0 -1
- package/dist/types/PocketItemDescription.d.ts +1 -1
- package/dist/types/PocketItemDescription.lua +0 -1
- package/dist/types/Primitive.lua +0 -1
- package/dist/types/TrinketSituation.d.ts +1 -1
- package/dist/types/TrinketSituation.lua +0 -1
- package/dist/types/private/IsaacAPIClass.lua +0 -1
- package/dist/types/private/SaveData.lua +0 -1
- package/dist/types/private/SerializedIsaacAPIClass.lua +0 -1
- package/dist/types/private/TSTLClass.lua +0 -1
- package/dist/types/private/TSTLClassMetatable.lua +0 -1
- package/dist/upgradeMod.d.ts +1 -1
- package/package.json +9 -6
package/dist/functions/stage.lua
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local StageType = ____isaac_2Dtypescript_2Ddefinitions.StageType
|
|
3
4
|
local ____cachedClasses = require("cachedClasses")
|
|
4
5
|
local game = ____cachedClasses.game
|
|
5
6
|
local ____stageTypeToLetter = require("objects.stageTypeToLetter")
|
|
6
7
|
local STAGE_TYPE_TO_LETTER = ____stageTypeToLetter.STAGE_TYPE_TO_LETTER
|
|
7
8
|
function ____exports.isRepentanceStage(self, stageType)
|
|
8
|
-
return stageType == StageType.
|
|
9
|
+
return stageType == StageType.REPENTANCE or stageType == StageType.REPENTANCE_B
|
|
9
10
|
end
|
|
10
11
|
function ____exports.onRepentanceStage(self)
|
|
11
12
|
local level = game:GetLevel()
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
export declare function capitalizeFirstLetter(string: string): string;
|
|
2
|
-
export declare function
|
|
2
|
+
export declare function removeAllCharacters(string: string, character: string): string;
|
|
3
|
+
/**
|
|
4
|
+
* Helper function to remove one or more substrings from a string, if they exist. Returns the
|
|
5
|
+
* modified string.
|
|
6
|
+
*
|
|
7
|
+
* This function is variadic, meaning that you can pass as many substrings as you want to remove.
|
|
8
|
+
*/
|
|
9
|
+
export declare function removeSubstring(string: string, ...substrings: string[]): string;
|
|
3
10
|
/** Helper function to trim a prefix from a string, if it exists. Returns the trimmed string. */
|
|
4
11
|
export declare function trimPrefix(string: string, prefix: string): string;
|
|
5
12
|
/** Helper function to trim a suffix from a string, if it exists. Returns the trimmed string. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__StringReplaceAll = ____lualib.__TS__StringReplaceAll
|
|
2
3
|
local __TS__StringStartsWith = ____lualib.__TS__StringStartsWith
|
|
3
4
|
local __TS__StringSlice = ____lualib.__TS__StringSlice
|
|
4
5
|
local __TS__StringEndsWith = ____lualib.__TS__StringEndsWith
|
|
@@ -9,8 +10,15 @@ function ____exports.capitalizeFirstLetter(self, ____string)
|
|
|
9
10
|
local restOfString = string.sub(____string, 2)
|
|
10
11
|
return capitalizedFirstLetter .. restOfString
|
|
11
12
|
end
|
|
12
|
-
function ____exports.
|
|
13
|
-
return (
|
|
13
|
+
function ____exports.removeAllCharacters(self, ____string, character)
|
|
14
|
+
return __TS__StringReplaceAll(____string, character, "")
|
|
15
|
+
end
|
|
16
|
+
function ____exports.removeSubstring(self, ____string, ...)
|
|
17
|
+
local substrings = {...}
|
|
18
|
+
for ____, substring in ipairs(substrings) do
|
|
19
|
+
____string = __TS__StringReplaceAll(____string, substring, "")
|
|
20
|
+
end
|
|
21
|
+
return ____string
|
|
14
22
|
end
|
|
15
23
|
function ____exports.trimPrefix(self, ____string, prefix)
|
|
16
24
|
if not __TS__StringStartsWith(____string, prefix) then
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
export declare function addTearsStat(player: EntityPlayer, tearsStat: float): void;
|
|
8
8
|
/**
|
|
9
9
|
* - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` attribute. This is
|
|
10
|
-
*
|
|
10
|
+
* equivalent to how many tears the player can shoot per frame.
|
|
11
11
|
* - If you already have a "tears" stat and you want to convert it back to MaxFireDelay, then use
|
|
12
|
-
*
|
|
12
|
+
* this function.
|
|
13
13
|
* - In this context, the "tears stat" represents what is shown on the in-game stat UI.
|
|
14
14
|
*/
|
|
15
15
|
export declare function getFireDelay(tearsStat: float): float;
|
|
16
16
|
/**
|
|
17
17
|
* - The `EntityPlayer` object stores a player's tear rate in the `MaxFireDelay` attribute. This is
|
|
18
|
-
*
|
|
18
|
+
* equivalent to how many tears the player can shoot per frame.
|
|
19
19
|
* - If you want to convert this to the "tears" stat that is shown on the in-game stat UI, then use
|
|
20
|
-
*
|
|
20
|
+
* this function.
|
|
21
21
|
*/
|
|
22
22
|
export declare function getTearsStat(fireDelay: float): float;
|
package/dist/functions/tears.lua
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { CollectibleType, PlayerForm } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to get all of the collectible types in the game that count towards a particular
|
|
4
4
|
* transformation.
|
|
@@ -6,18 +6,20 @@
|
|
|
6
6
|
* For example, to get all of the collectible types that count towards Guppy:
|
|
7
7
|
*
|
|
8
8
|
* ```ts
|
|
9
|
-
* const guppyCollectibleTypes = getCollectibleTypesForTransformation(PlayerForm.
|
|
9
|
+
* const guppyCollectibleTypes = getCollectibleTypesForTransformation(PlayerForm.GUPPY);
|
|
10
10
|
* ```
|
|
11
11
|
*/
|
|
12
12
|
export declare function getCollectibleTypesForTransformation(playerForm: PlayerForm): Set<CollectibleType | int>;
|
|
13
13
|
/** Returns the number of items that a player has towards a particular transformation. */
|
|
14
14
|
export declare function getPlayerNumCollectiblesForTransformation(player: EntityPlayer, playerForm: PlayerForm): int;
|
|
15
|
+
/** Returns a set of the player's current transformations. */
|
|
16
|
+
export declare function getPlayerTransformations(player: EntityPlayer): Set<PlayerForm>;
|
|
15
17
|
/**
|
|
16
18
|
* Helper function to get a transformation name from a PlayerForm enum.
|
|
17
19
|
*
|
|
18
20
|
* Example:
|
|
19
21
|
* ```ts
|
|
20
|
-
* const transformationName = getTransformationName(PlayerForm.
|
|
22
|
+
* const transformationName = getTransformationName(PlayerForm.LORD_OF_THE_FLIES);
|
|
21
23
|
* // transformationName is "Beelzebub"
|
|
22
24
|
* ```
|
|
23
25
|
*/
|
|
@@ -5,8 +5,9 @@ local Set = ____lualib.Set
|
|
|
5
5
|
local __TS__Spread = ____lualib.__TS__Spread
|
|
6
6
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
7
7
|
local ____exports = {}
|
|
8
|
-
local
|
|
9
|
-
local ItemConfigTag =
|
|
8
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
9
|
+
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
10
|
+
local PlayerForm = ____isaac_2Dtypescript_2Ddefinitions.PlayerForm
|
|
10
11
|
local ____transformationNames = require("objects.transformationNames")
|
|
11
12
|
local DEFAULT_TRANSFORMATION_NAME = ____transformationNames.DEFAULT_TRANSFORMATION_NAME
|
|
12
13
|
local TRANSFORMATION_NAMES = ____transformationNames.TRANSFORMATION_NAMES
|
|
@@ -14,27 +15,27 @@ local ____collectibles = require("functions.collectibles")
|
|
|
14
15
|
local getCollectibleTags = ____collectibles.getCollectibleTags
|
|
15
16
|
local ____collectibleTag = require("functions.collectibleTag")
|
|
16
17
|
local getCollectibleTypesWithTag = ____collectibleTag.getCollectibleTypesWithTag
|
|
18
|
+
local ____enums = require("functions.enums")
|
|
19
|
+
local getEnumValues = ____enums.getEnumValues
|
|
17
20
|
local ____flag = require("functions.flag")
|
|
18
21
|
local hasFlag = ____flag.hasFlag
|
|
19
|
-
local ____math = require("functions.math")
|
|
20
|
-
local range = ____math.range
|
|
21
22
|
local ____player = require("functions.player")
|
|
22
23
|
local getPlayerCollectibleCount = ____player.getPlayerCollectibleCount
|
|
23
24
|
local TRANSFORMATION_TO_TAG_MAP = __TS__New(Map, {
|
|
24
|
-
{PlayerForm.
|
|
25
|
-
{PlayerForm.
|
|
26
|
-
{PlayerForm.
|
|
27
|
-
{PlayerForm.
|
|
28
|
-
{PlayerForm.
|
|
29
|
-
{PlayerForm.
|
|
30
|
-
{PlayerForm.
|
|
31
|
-
{PlayerForm.
|
|
32
|
-
{PlayerForm.
|
|
33
|
-
{PlayerForm.
|
|
34
|
-
{PlayerForm.
|
|
35
|
-
{PlayerForm.
|
|
25
|
+
{PlayerForm.GUPPY, ItemConfigTag.GUPPY},
|
|
26
|
+
{PlayerForm.BEELZEBUB, ItemConfigTag.FLY},
|
|
27
|
+
{PlayerForm.FUN_GUY, ItemConfigTag.MUSHROOM},
|
|
28
|
+
{PlayerForm.SERAPHIM, ItemConfigTag.ANGEL},
|
|
29
|
+
{PlayerForm.BOB, ItemConfigTag.BOB},
|
|
30
|
+
{PlayerForm.SPUN, ItemConfigTag.SYRINGE},
|
|
31
|
+
{PlayerForm.YES_MOTHER, ItemConfigTag.MOM},
|
|
32
|
+
{PlayerForm.CONJOINED, ItemConfigTag.BABY},
|
|
33
|
+
{PlayerForm.LEVIATHAN, ItemConfigTag.DEVIL},
|
|
34
|
+
{PlayerForm.OH_CRAP, ItemConfigTag.POOP},
|
|
35
|
+
{PlayerForm.BOOKWORM, ItemConfigTag.BOOK},
|
|
36
|
+
{PlayerForm.SPIDER_BABY, ItemConfigTag.SPIDER}
|
|
36
37
|
})
|
|
37
|
-
local TRANSFORMATIONS_THAT_GRANT_FLYING = __TS__New(Set, {PlayerForm.
|
|
38
|
+
local TRANSFORMATIONS_THAT_GRANT_FLYING = __TS__New(Set, {PlayerForm.GUPPY, PlayerForm.BEELZEBUB, PlayerForm.SERAPHIM, PlayerForm.LEVIATHAN})
|
|
38
39
|
function ____exports.getCollectibleTypesForTransformation(self, playerForm)
|
|
39
40
|
local itemConfigTag = TRANSFORMATION_TO_TAG_MAP:get(playerForm)
|
|
40
41
|
if itemConfigTag == nil then
|
|
@@ -50,24 +51,34 @@ function ____exports.getPlayerNumCollectiblesForTransformation(self, player, pla
|
|
|
50
51
|
__TS__Spread(collectibleTypes:values())
|
|
51
52
|
)
|
|
52
53
|
end
|
|
54
|
+
function ____exports.getPlayerTransformations(self, player)
|
|
55
|
+
local transformations = __TS__New(Set)
|
|
56
|
+
for ____, playerForm in ipairs(getEnumValues(nil, PlayerForm)) do
|
|
57
|
+
if player:HasPlayerForm(playerForm) then
|
|
58
|
+
transformations:add(playerForm)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
return transformations
|
|
62
|
+
end
|
|
53
63
|
function ____exports.getTransformationName(self, playerForm)
|
|
54
64
|
local transformationName = TRANSFORMATION_NAMES[playerForm]
|
|
55
65
|
return transformationName == nil and DEFAULT_TRANSFORMATION_NAME or transformationName
|
|
56
66
|
end
|
|
57
67
|
function ____exports.getTransformationsForCollectibleType(self, collectibleType)
|
|
58
68
|
local itemConfigTags = getCollectibleTags(nil, collectibleType)
|
|
69
|
+
local playerForms = getEnumValues(nil, PlayerForm)
|
|
59
70
|
local transformationSet = __TS__New(Set)
|
|
60
|
-
for ____, playerForm in ipairs(
|
|
71
|
+
for ____, playerForm in ipairs(playerForms) do
|
|
61
72
|
do
|
|
62
73
|
local itemConfigTag = TRANSFORMATION_TO_TAG_MAP:get(playerForm)
|
|
63
74
|
if itemConfigTag == nil then
|
|
64
|
-
goto
|
|
75
|
+
goto __continue11
|
|
65
76
|
end
|
|
66
77
|
if hasFlag(nil, itemConfigTags, itemConfigTag) then
|
|
67
78
|
transformationSet:add(playerForm)
|
|
68
79
|
end
|
|
69
80
|
end
|
|
70
|
-
::
|
|
81
|
+
::__continue11::
|
|
71
82
|
end
|
|
72
83
|
return transformationSet
|
|
73
84
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { CacheFlag, TrinketType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Returns a map containing every trinket type that the player has that matches the provided
|
|
4
4
|
* CacheFlag. The values of the map correspond to the multiplier for that trinket.
|
|
@@ -5,20 +5,22 @@ local Set = ____lualib.Set
|
|
|
5
5
|
local __TS__Iterator = ____lualib.__TS__Iterator
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local initCacheFlagMap, CACHE_FLAG_TO_TRINKETS_MAP
|
|
8
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
9
|
+
local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
|
|
10
|
+
local ____constantsMax = require("constantsMax")
|
|
11
|
+
local MAX_TRINKET_TYPE = ____constantsMax.MAX_TRINKET_TYPE
|
|
12
|
+
local ____enums = require("functions.enums")
|
|
13
|
+
local getEnumValues = ____enums.getEnumValues
|
|
8
14
|
local ____math = require("functions.math")
|
|
9
|
-
local
|
|
15
|
+
local irange = ____math.irange
|
|
10
16
|
local ____set = require("functions.set")
|
|
11
17
|
local copySet = ____set.copySet
|
|
12
18
|
local ____trinkets = require("functions.trinkets")
|
|
13
|
-
local getMaxTrinketType = ____trinkets.getMaxTrinketType
|
|
14
19
|
local trinketHasCacheFlag = ____trinkets.trinketHasCacheFlag
|
|
15
|
-
local ____utils = require("functions.utils")
|
|
16
|
-
local getEnumValues = ____utils.getEnumValues
|
|
17
20
|
function initCacheFlagMap(self)
|
|
18
|
-
local maxTrinketID = getMaxTrinketType(nil)
|
|
19
21
|
for ____, cacheFlag in ipairs(getEnumValues(nil, CacheFlag)) do
|
|
20
22
|
local trinketsSet = __TS__New(Set)
|
|
21
|
-
for ____, trinketType in ipairs(
|
|
23
|
+
for ____, trinketType in ipairs(irange(nil, 1, MAX_TRINKET_TYPE)) do
|
|
22
24
|
if trinketHasCacheFlag(nil, trinketType, cacheFlag) then
|
|
23
25
|
trinketsSet:add(trinketType)
|
|
24
26
|
end
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { TrinketType } from "isaac-typescript-definitions";
|
|
2
2
|
import { TrinketSituation } from "../types/TrinketSituation";
|
|
3
3
|
/**
|
|
4
4
|
* Helper function to restore the player's trinkets back to the way they were before the
|
|
@@ -6,9 +6,20 @@ import { TrinketSituation } from "../types/TrinketSituation";
|
|
|
6
6
|
* removed.
|
|
7
7
|
*/
|
|
8
8
|
export declare function giveTrinketsBack(player: EntityPlayer, trinketSituation: TrinketSituation | undefined): void;
|
|
9
|
+
/**
|
|
10
|
+
* Helper function to smelt a trinket. Before smelting, this function will automatically remove the
|
|
11
|
+
* trinkets that the player is holding, if any, and then give them back after the new trinket is
|
|
12
|
+
* smelted.
|
|
13
|
+
*
|
|
14
|
+
* @param player The player to smelt the trinkets to.
|
|
15
|
+
* @param trinketType The trinket type to smelt.
|
|
16
|
+
* @param numTrinkets Optional. If specified, will smelt the given number of trinkets. Use this to
|
|
17
|
+
* avoid calling this function multiple times. Default is 1.
|
|
18
|
+
*/
|
|
19
|
+
export declare function smeltTrinket(player: EntityPlayer, trinketType: TrinketType | int, numTrinkets?: number): void;
|
|
9
20
|
/**
|
|
10
21
|
* Helper function to temporarily remove a specific kind of trinket from the player. Use this in
|
|
11
|
-
* combination with the `
|
|
22
|
+
* combination with the `giveTrinketsBack` function to take away and give back a trinket on the same
|
|
12
23
|
* frame. This function correctly handles multiple trinket slots and ensures that all copies of the
|
|
13
24
|
* trinket are removed, including smelted trinkets.
|
|
14
25
|
*
|
|
@@ -19,7 +30,7 @@ export declare function giveTrinketsBack(player: EntityPlayer, trinketSituation:
|
|
|
19
30
|
export declare function temporarilyRemoveTrinket(player: EntityPlayer, trinketType: TrinketType | int): TrinketSituation | undefined;
|
|
20
31
|
/**
|
|
21
32
|
* Helper function to temporarily removes a player's held trinkets, if any. This will not remove any
|
|
22
|
-
* smelted trinkets. Use this in combination with the `
|
|
33
|
+
* smelted trinkets. Use this in combination with the `giveTrinketsBack` function to take away and
|
|
23
34
|
* give back trinkets on the same frame.
|
|
24
35
|
*
|
|
25
36
|
* @returns Undefined if the player does not have any trinkets, or TrinketSituation if they do.
|
|
@@ -1,21 +1,38 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
3
|
-
local
|
|
4
|
-
local
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
4
|
+
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
5
|
+
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
5
6
|
local ____player = require("functions.player")
|
|
6
7
|
local useActiveItemTemp = ____player.useActiveItemTemp
|
|
8
|
+
local ____trinkets = require("functions.trinkets")
|
|
9
|
+
local getGoldenTrinketType = ____trinkets.getGoldenTrinketType
|
|
7
10
|
local ____utils = require("functions.utils")
|
|
8
11
|
local ____repeat = ____utils["repeat"]
|
|
12
|
+
function ____exports.temporarilyRemoveTrinkets(self, player)
|
|
13
|
+
local trinketType1 = player:GetTrinket(TrinketSlot.SLOT_1)
|
|
14
|
+
local trinketType2 = player:GetTrinket(TrinketSlot.SLOT_2)
|
|
15
|
+
if trinketType1 == TrinketType.NULL and trinketType2 == TrinketType.NULL then
|
|
16
|
+
return nil
|
|
17
|
+
end
|
|
18
|
+
if trinketType1 ~= TrinketType.NULL then
|
|
19
|
+
player:TryRemoveTrinket(trinketType1)
|
|
20
|
+
end
|
|
21
|
+
if trinketType2 ~= TrinketType.NULL then
|
|
22
|
+
player:TryRemoveTrinket(trinketType2)
|
|
23
|
+
end
|
|
24
|
+
return {trinketTypeRemoved = TrinketType.NULL, trinketType1 = trinketType1, trinketType2 = trinketType2, numSmeltedTrinkets = 0}
|
|
25
|
+
end
|
|
9
26
|
function ____exports.giveTrinketsBack(self, player, trinketSituation)
|
|
10
27
|
if trinketSituation == nil then
|
|
11
28
|
return
|
|
12
29
|
end
|
|
13
|
-
local trinketType1 = player:GetTrinket(
|
|
14
|
-
local trinketType2 = player:GetTrinket(
|
|
15
|
-
if trinketType1 ~= TrinketType.
|
|
30
|
+
local trinketType1 = player:GetTrinket(TrinketSlot.SLOT_1)
|
|
31
|
+
local trinketType2 = player:GetTrinket(TrinketSlot.SLOT_2)
|
|
32
|
+
if trinketType1 ~= TrinketType.NULL then
|
|
16
33
|
player:TryRemoveTrinket(trinketType1)
|
|
17
34
|
end
|
|
18
|
-
if trinketType2 ~= TrinketType.
|
|
35
|
+
if trinketType2 ~= TrinketType.NULL then
|
|
19
36
|
player:TryRemoveTrinket(trinketType2)
|
|
20
37
|
end
|
|
21
38
|
____repeat(
|
|
@@ -23,50 +40,51 @@ function ____exports.giveTrinketsBack(self, player, trinketSituation)
|
|
|
23
40
|
trinketSituation.numSmeltedTrinkets,
|
|
24
41
|
function()
|
|
25
42
|
player:AddTrinket(trinketSituation.trinketTypeRemoved, false)
|
|
26
|
-
useActiveItemTemp(nil, player, CollectibleType.
|
|
43
|
+
useActiveItemTemp(nil, player, CollectibleType.SMELTER)
|
|
27
44
|
end
|
|
28
45
|
)
|
|
29
|
-
if trinketSituation.trinketType1 ~= TrinketType.
|
|
46
|
+
if trinketSituation.trinketType1 ~= TrinketType.NULL then
|
|
30
47
|
player:AddTrinket(trinketSituation.trinketType1, false)
|
|
31
48
|
end
|
|
32
|
-
if trinketSituation.trinketType2 ~= TrinketType.
|
|
49
|
+
if trinketSituation.trinketType2 ~= TrinketType.NULL then
|
|
33
50
|
player:AddTrinket(trinketSituation.trinketType2, false)
|
|
34
51
|
end
|
|
35
52
|
end
|
|
53
|
+
function ____exports.smeltTrinket(self, player, trinketType, numTrinkets)
|
|
54
|
+
if numTrinkets == nil then
|
|
55
|
+
numTrinkets = 1
|
|
56
|
+
end
|
|
57
|
+
local trinketSituation = ____exports.temporarilyRemoveTrinkets(nil, player)
|
|
58
|
+
____repeat(
|
|
59
|
+
nil,
|
|
60
|
+
numTrinkets,
|
|
61
|
+
function()
|
|
62
|
+
player:AddTrinket(trinketType)
|
|
63
|
+
useActiveItemTemp(nil, player, CollectibleType.SMELTER)
|
|
64
|
+
end
|
|
65
|
+
)
|
|
66
|
+
____exports.giveTrinketsBack(nil, player, trinketSituation)
|
|
67
|
+
end
|
|
36
68
|
function ____exports.temporarilyRemoveTrinket(self, player, trinketType)
|
|
37
69
|
if not player:HasTrinket(trinketType) then
|
|
38
70
|
return nil
|
|
39
71
|
end
|
|
40
|
-
local trinketType1 = player:GetTrinket(
|
|
41
|
-
local trinketType2 = player:GetTrinket(
|
|
72
|
+
local trinketType1 = player:GetTrinket(TrinketSlot.SLOT_1)
|
|
73
|
+
local trinketType2 = player:GetTrinket(TrinketSlot.SLOT_2)
|
|
42
74
|
local numTrinkets = 0
|
|
43
75
|
while player:HasTrinket(trinketType) do
|
|
44
76
|
player:TryRemoveTrinket(trinketType)
|
|
45
77
|
numTrinkets = numTrinkets + 1
|
|
46
78
|
end
|
|
47
79
|
local numSmeltedTrinkets = numTrinkets
|
|
48
|
-
local trinketWasInSlot1 = trinketType1 == trinketType or trinketType1
|
|
80
|
+
local trinketWasInSlot1 = trinketType1 == trinketType or trinketType1 == getGoldenTrinketType(nil, trinketType)
|
|
49
81
|
if trinketWasInSlot1 then
|
|
50
82
|
numSmeltedTrinkets = numSmeltedTrinkets - 1
|
|
51
83
|
end
|
|
52
|
-
local trinketWasInSlot2 = trinketType2 == trinketType or trinketType2
|
|
84
|
+
local trinketWasInSlot2 = trinketType2 == trinketType or trinketType2 == getGoldenTrinketType(nil, trinketType)
|
|
53
85
|
if trinketWasInSlot2 then
|
|
54
86
|
numSmeltedTrinkets = numSmeltedTrinkets - 1
|
|
55
87
|
end
|
|
56
88
|
return {trinketTypeRemoved = trinketType, trinketType1 = trinketType1, trinketType2 = trinketType2, numSmeltedTrinkets = numSmeltedTrinkets}
|
|
57
89
|
end
|
|
58
|
-
function ____exports.temporarilyRemoveTrinkets(self, player)
|
|
59
|
-
local trinketType1 = player:GetTrinket(0)
|
|
60
|
-
local trinketType2 = player:GetTrinket(1)
|
|
61
|
-
if trinketType1 == TrinketType.TRINKET_NULL and trinketType2 == TrinketType.TRINKET_NULL then
|
|
62
|
-
return nil
|
|
63
|
-
end
|
|
64
|
-
if trinketType1 ~= TrinketType.TRINKET_NULL then
|
|
65
|
-
player:TryRemoveTrinket(trinketType1)
|
|
66
|
-
end
|
|
67
|
-
if trinketType2 ~= TrinketType.TRINKET_NULL then
|
|
68
|
-
player:TryRemoveTrinket(trinketType2)
|
|
69
|
-
end
|
|
70
|
-
return {trinketTypeRemoved = TrinketType.TRINKET_NULL, trinketType1 = trinketType1, trinketType2 = trinketType2, numSmeltedTrinkets = 0}
|
|
71
|
-
end
|
|
72
90
|
return ____exports
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { TrinketType } from "isaac-typescript-definitions";
|
|
2
2
|
/** Returns a set containing every valid trinket type in the game, including modded items. */
|
|
3
3
|
export declare function getTrinketSet(): Set<TrinketType | 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 ____constantsMax = require("constantsMax")
|
|
8
|
+
local MAX_TRINKET_TYPE = ____constantsMax.MAX_TRINKET_TYPE
|
|
7
9
|
local ____math = require("functions.math")
|
|
8
|
-
local
|
|
10
|
+
local irange = ____math.irange
|
|
9
11
|
local ____set = require("functions.set")
|
|
10
12
|
local copySet = ____set.copySet
|
|
11
|
-
local ____trinkets = require("functions.trinkets")
|
|
12
|
-
local getMaxTrinketType = ____trinkets.getMaxTrinketType
|
|
13
13
|
local TRINKET_SET = __TS__New(Set)
|
|
14
14
|
local function initTrinketSet(self)
|
|
15
|
-
|
|
16
|
-
for ____, trinketType in ipairs(range(nil, 1, maxTrinketID)) do
|
|
15
|
+
for ____, trinketType in ipairs(irange(nil, 1, MAX_TRINKET_TYPE)) do
|
|
17
16
|
local itemConfigTrinket = itemConfig:GetTrinket(trinketType)
|
|
18
17
|
if itemConfigTrinket ~= nil then
|
|
19
18
|
TRINKET_SET:add(trinketType)
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import { CacheFlag, TrinketType } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
|
-
* Helper function to get the
|
|
4
|
-
*
|
|
3
|
+
* Helper function to get the corresponding golden trinket type from a normal trinket type.
|
|
4
|
+
*
|
|
5
|
+
* For example, passing `TrinketType.SWALLOWED_PENNY` would result in 32769, which is the value that
|
|
6
|
+
* corresponds to the golden trinket sub-type for Swallowed Penny.
|
|
5
7
|
*/
|
|
6
|
-
export declare function
|
|
8
|
+
export declare function getGoldenTrinketType(trinketType: TrinketType | int): TrinketType | int;
|
|
7
9
|
/**
|
|
8
10
|
* Returns the slot number corresponding to where a trinket can be safely inserted.
|
|
9
11
|
*
|
|
@@ -13,7 +15,7 @@ export declare function getMaxTrinketType(): int;
|
|
|
13
15
|
* const trinketSlot = getOpenTrinketSlotNum(player);
|
|
14
16
|
* if (trinketSlot !== undefined) {
|
|
15
17
|
* // They have one or more open trinket slots
|
|
16
|
-
* player.AddTrinket(TrinketType.
|
|
18
|
+
* player.AddTrinket(TrinketType.SWALLOWED_PENNY);
|
|
17
19
|
* }
|
|
18
20
|
* ```
|
|
19
21
|
*/
|
|
@@ -29,7 +31,7 @@ export declare function getTrinketDescription(trinketType: TrinketType | int): s
|
|
|
29
31
|
*
|
|
30
32
|
* Example:
|
|
31
33
|
* ```ts
|
|
32
|
-
* const trinketType = TrinketType.
|
|
34
|
+
* const trinketType = TrinketType.SWALLOWED_PENNY;
|
|
33
35
|
* const trinketName = getTrinketName(trinketType); // trinketName is "Swallowed Penny"
|
|
34
36
|
* ```
|
|
35
37
|
*/
|
|
@@ -55,15 +57,4 @@ export declare function isGoldenTrinket(trinketType: TrinketType | int): boolean
|
|
|
55
57
|
* will be removed, making it appear like the collectible has already been taken by the player.
|
|
56
58
|
*/
|
|
57
59
|
export declare function setTrinketSprite(trinket: EntityPickup, pngPath: string | undefined): void;
|
|
58
|
-
/**
|
|
59
|
-
* Helper function to smelt a trinket. Before smelting, this function will automatically remove the
|
|
60
|
-
* trinkets that the player is holding, if any, and then give them back after the new trinket is
|
|
61
|
-
* smelted.
|
|
62
|
-
*
|
|
63
|
-
* @param player The player to smelt the trinkets to.
|
|
64
|
-
* @param trinketType The trinket type to smelt.
|
|
65
|
-
* @param numTrinkets Optional. If specified, will smelt the given number of trinkets. Use this to
|
|
66
|
-
* avoid calling this function multiple times. Default is 1.
|
|
67
|
-
*/
|
|
68
|
-
export declare function smeltTrinket(player: EntityPlayer, trinketType: TrinketType | int, numTrinkets?: number): void;
|
|
69
60
|
export declare function trinketHasCacheFlag(trinketType: TrinketType | int, cacheFlag: CacheFlag): boolean;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
4
|
+
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
5
|
+
local TrinketSlot = ____isaac_2Dtypescript_2Ddefinitions.TrinketSlot
|
|
6
|
+
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
3
7
|
local ____cachedClasses = require("cachedClasses")
|
|
4
8
|
local itemConfig = ____cachedClasses.itemConfig
|
|
5
|
-
local ____constants = require("constants")
|
|
6
|
-
local TRINKET_GOLDEN_FLAG = ____constants.TRINKET_GOLDEN_FLAG
|
|
7
9
|
local ____trinketDescriptionMap = require("maps.trinketDescriptionMap")
|
|
8
10
|
local DEFAULT_TRINKET_DESCRIPTION = ____trinketDescriptionMap.DEFAULT_TRINKET_DESCRIPTION
|
|
9
11
|
local TRINKET_DESCRIPTION_MAP = ____trinketDescriptionMap.TRINKET_DESCRIPTION_MAP
|
|
@@ -14,30 +16,26 @@ local ____flag = require("functions.flag")
|
|
|
14
16
|
local hasFlag = ____flag.hasFlag
|
|
15
17
|
local ____player = require("functions.player")
|
|
16
18
|
local isCharacter = ____player.isCharacter
|
|
17
|
-
local useActiveItemTemp = ____player.useActiveItemTemp
|
|
18
19
|
local ____sprite = require("functions.sprite")
|
|
19
20
|
local clearSprite = ____sprite.clearSprite
|
|
20
|
-
local
|
|
21
|
-
local
|
|
22
|
-
local temporarilyRemoveTrinkets = ____trinketGive.temporarilyRemoveTrinkets
|
|
23
|
-
local ____utils = require("functions.utils")
|
|
24
|
-
local ____repeat = ____utils["repeat"]
|
|
21
|
+
local GOLDEN_TRINKET_FLAG = 32767
|
|
22
|
+
local GOLDEN_TRINKET_ADJUSTMENT = 32768
|
|
25
23
|
local TRINKET_SPRITE_LAYER = 0
|
|
26
|
-
function ____exports.
|
|
27
|
-
return
|
|
24
|
+
function ____exports.getGoldenTrinketType(self, trinketType)
|
|
25
|
+
return trinketType + GOLDEN_TRINKET_ADJUSTMENT
|
|
28
26
|
end
|
|
29
27
|
function ____exports.getOpenTrinketSlot(self, player)
|
|
30
28
|
local maxTrinkets = player:GetMaxTrinkets()
|
|
31
|
-
local trinketType1 = player:GetTrinket(
|
|
32
|
-
local trinketType2 = player:GetTrinket(
|
|
29
|
+
local trinketType1 = player:GetTrinket(TrinketSlot.SLOT_1)
|
|
30
|
+
local trinketType2 = player:GetTrinket(TrinketSlot.SLOT_2)
|
|
33
31
|
if maxTrinkets == 1 then
|
|
34
|
-
return trinketType1 == TrinketType.
|
|
32
|
+
return trinketType1 == TrinketType.NULL and 0 or nil
|
|
35
33
|
end
|
|
36
34
|
if maxTrinkets == 2 then
|
|
37
|
-
if trinketType1 == TrinketType.
|
|
35
|
+
if trinketType1 == TrinketType.NULL then
|
|
38
36
|
return 0
|
|
39
37
|
end
|
|
40
|
-
return trinketType2 == TrinketType.
|
|
38
|
+
return trinketType2 == TrinketType.NULL and 1 or nil
|
|
41
39
|
end
|
|
42
40
|
return error("The player has an unknown number of trinket slots: " .. tostring(maxTrinkets))
|
|
43
41
|
end
|
|
@@ -64,17 +62,17 @@ function ____exports.getTrinketName(self, trinketType)
|
|
|
64
62
|
return DEFAULT_TRINKET_NAME
|
|
65
63
|
end
|
|
66
64
|
function ____exports.hasOpenTrinketSlot(self, player)
|
|
67
|
-
if isCharacter(nil, player, PlayerType.
|
|
65
|
+
if isCharacter(nil, player, PlayerType.THE_SOUL_B) then
|
|
68
66
|
return false
|
|
69
67
|
end
|
|
70
68
|
local openTrinketSlot = ____exports.getOpenTrinketSlot(nil, player)
|
|
71
69
|
return openTrinketSlot ~= nil
|
|
72
70
|
end
|
|
73
71
|
function ____exports.isGoldenTrinket(self, trinketType)
|
|
74
|
-
return trinketType
|
|
72
|
+
return hasFlag(nil, trinketType, GOLDEN_TRINKET_FLAG)
|
|
75
73
|
end
|
|
76
74
|
function ____exports.setTrinketSprite(self, trinket, pngPath)
|
|
77
|
-
if trinket.Variant ~=
|
|
75
|
+
if trinket.Variant ~= PickupVariant.TRINKET then
|
|
78
76
|
error("You cannot set a trinket sprite for pickups of variant: " .. tostring(trinket.Variant))
|
|
79
77
|
end
|
|
80
78
|
local sprite = trinket:GetSprite()
|
|
@@ -85,21 +83,6 @@ function ____exports.setTrinketSprite(self, trinket, pngPath)
|
|
|
85
83
|
sprite:LoadGraphics()
|
|
86
84
|
end
|
|
87
85
|
end
|
|
88
|
-
function ____exports.smeltTrinket(self, player, trinketType, numTrinkets)
|
|
89
|
-
if numTrinkets == nil then
|
|
90
|
-
numTrinkets = 1
|
|
91
|
-
end
|
|
92
|
-
local trinketSituation = temporarilyRemoveTrinkets(nil, player)
|
|
93
|
-
____repeat(
|
|
94
|
-
nil,
|
|
95
|
-
numTrinkets,
|
|
96
|
-
function()
|
|
97
|
-
player:AddTrinket(trinketType)
|
|
98
|
-
useActiveItemTemp(nil, player, CollectibleType.COLLECTIBLE_SMELTER)
|
|
99
|
-
end
|
|
100
|
-
)
|
|
101
|
-
giveTrinketsBack(nil, player, trinketSituation)
|
|
102
|
-
end
|
|
103
86
|
function ____exports.trinketHasCacheFlag(self, trinketType, cacheFlag)
|
|
104
87
|
local itemConfigItem = itemConfig:GetTrinket(trinketType)
|
|
105
88
|
if itemConfigItem == nil then
|
package/dist/functions/ui.lua
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
|
2
1
|
local ____exports = {}
|
|
2
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
|
+
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
4
|
+
local LevelCurse = ____isaac_2Dtypescript_2Ddefinitions.LevelCurse
|
|
3
5
|
local ____cachedClasses = require("cachedClasses")
|
|
4
6
|
local game = ____cachedClasses.game
|
|
5
7
|
local ____constants = require("constants")
|
|
@@ -42,23 +44,23 @@ function ____exports.getHeartsUIWidth(self)
|
|
|
42
44
|
local player = Isaac.GetPlayer()
|
|
43
45
|
local extraLives = player:GetExtraLives()
|
|
44
46
|
local effects = player:GetEffects()
|
|
45
|
-
local hasHolyMantleEffect = effects:HasCollectibleEffect(CollectibleType.
|
|
47
|
+
local hasHolyMantleEffect = effects:HasCollectibleEffect(CollectibleType.HOLY_MANTLE)
|
|
46
48
|
local heartRowLength = ____exports.getHeartRowLength(nil, player)
|
|
47
49
|
if hasHolyMantleEffect then
|
|
48
50
|
heartRowLength = heartRowLength + 1
|
|
49
51
|
end
|
|
50
|
-
if curses == LevelCurse.
|
|
52
|
+
if curses == LevelCurse.UNKNOWN then
|
|
51
53
|
heartRowLength = 1
|
|
52
54
|
end
|
|
53
55
|
local width = heartRowLength * UI_HEART_WIDTH
|
|
54
56
|
if extraLives > 9 then
|
|
55
57
|
width = width + 20
|
|
56
|
-
if player:HasCollectible(CollectibleType.
|
|
58
|
+
if player:HasCollectible(CollectibleType.GUPPYS_COLLAR) then
|
|
57
59
|
width = width + 6
|
|
58
60
|
end
|
|
59
61
|
elseif extraLives > 0 then
|
|
60
62
|
width = width + 16
|
|
61
|
-
if player:HasCollectible(CollectibleType.
|
|
63
|
+
if player:HasCollectible(CollectibleType.GUPPYS_COLLAR) then
|
|
62
64
|
width = width + 4
|
|
63
65
|
end
|
|
64
66
|
end
|