isaacscript-common 2.0.33 → 2.2.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 +1 -1
- package/callbacks/customRevive.lua +11 -11
- package/callbacks/itemPickup.lua +7 -7
- package/callbacks/postBombInitLate.lua +2 -2
- package/callbacks/postBoneSwing.lua +2 -2
- package/callbacks/postCollectibleInitFirst.lua +3 -3
- package/callbacks/postCursedTeleport.lua +6 -6
- package/callbacks/postCustomDoorEnter.lua +9 -9
- package/callbacks/postDoorRender.lua +2 -2
- package/callbacks/postDoorUpdate.lua +2 -2
- package/callbacks/postEffectInitLate.lua +2 -2
- package/callbacks/postEffectStateChanged.lua +3 -3
- package/callbacks/postEsauJr.lua +5 -5
- package/callbacks/postFamiliarInitLate.lua +2 -2
- package/callbacks/postFamiliarStateChanged.lua +3 -3
- package/callbacks/postFlip.lua +4 -4
- package/callbacks/postGreedModeWave.lua +3 -3
- package/callbacks/postGridEntity.lua +7 -7
- package/callbacks/postGridEntityCollision.lua +4 -4
- package/callbacks/postGridEntityRender.lua +2 -2
- package/callbacks/postHolyMantleRemoved.lua +5 -5
- package/callbacks/postItemDischarged.lua +7 -7
- package/callbacks/postKnifeInitLate.lua +2 -2
- package/callbacks/postLaserInitLate.lua +2 -2
- package/callbacks/postNPCInitLate.lua +2 -2
- package/callbacks/postNPCStateChanged.lua +3 -3
- package/callbacks/postNewRoomEarly.lua +4 -4
- package/callbacks/postPickupCollect.lua +3 -3
- package/callbacks/postPickupInitLate.lua +2 -2
- package/callbacks/postPickupStateChanged.lua +3 -3
- package/callbacks/postPitRender.lua +2 -2
- package/callbacks/postPitUpdate.lua +2 -2
- package/callbacks/postPlayerChangeHealth.lua +8 -8
- package/callbacks/postPlayerChangeType.lua +5 -5
- package/callbacks/postPlayerFatalDamage.lua +6 -6
- package/callbacks/postPlayerInitLate.lua +3 -3
- package/callbacks/postPlayerReordered.lua +7 -7
- package/callbacks/postPoopRender.lua +2 -2
- package/callbacks/postPoopUpdate.lua +2 -2
- package/callbacks/postPressurePlateRender.lua +2 -2
- package/callbacks/postPressurePlateUpdate.lua +2 -2
- package/callbacks/postProjectileInitLate.lua +2 -2
- package/callbacks/postPurchase.lua +6 -6
- package/callbacks/postRockRender.lua +2 -2
- package/callbacks/postRockUpdate.lua +2 -2
- package/callbacks/postRoomClearChanged.lua +3 -3
- package/callbacks/postSacrifice.lua +4 -4
- package/callbacks/postSlotInitUpdate.lua +4 -4
- package/callbacks/postSlotRender.lua +6 -6
- package/callbacks/postSpikesRender.lua +2 -2
- package/callbacks/postSpikesUpdate.lua +2 -2
- package/callbacks/postTNTRender.lua +2 -2
- package/callbacks/postTNTUpdate.lua +2 -2
- package/callbacks/postTearInitLate.lua +2 -2
- package/callbacks/postTearInitVeryLate.lua +2 -2
- package/callbacks/postTransformation.lua +6 -6
- package/callbacks/postTrinketBreak.lua +5 -5
- package/callbacks/preBerserkDeath.lua +5 -5
- package/callbacks/preNewLevel.lua +3 -3
- package/callbacks/reorderedCallbacks.lua +4 -4
- package/classes/DefaultMap.d.ts +11 -7
- package/classes/ModUpgraded.d.ts +8 -2
- package/classes/ModUpgraded.lua +1 -1
- package/constants.d.ts +5 -5
- package/constants.lua +2 -2
- package/{constantsMax.d.ts → constantsFirstLast.d.ts} +0 -0
- package/{constantsMax.lua → constantsFirstLast.lua} +2 -2
- package/enums/HealthType.d.ts +2 -2
- package/enums/ModCallbackCustom.d.ts +753 -2
- package/features/characterHealthConversion.d.ts +1 -2
- package/features/characterHealthConversion.lua +3 -3
- package/features/characterStats.lua +3 -3
- package/features/debugDisplay/debugDisplay.lua +4 -4
- package/features/debugDisplay/exports.d.ts +36 -36
- package/features/debugDisplay/exports.lua +2 -2
- package/features/debugDisplay/v.lua +2 -2
- package/features/deployJSONRoom.d.ts +1 -1
- package/features/deployJSONRoom.lua +15 -15
- package/features/disableInputs.d.ts +5 -5
- package/features/disableInputs.lua +3 -3
- package/features/disableSound.d.ts +2 -2
- package/features/disableSound.lua +4 -4
- package/features/extraConsoleCommands/commandsDisplay.d.ts +18 -18
- package/features/extraConsoleCommands/commandsDisplay.lua +1 -1
- package/features/extraConsoleCommands/commandsSubroutines.lua +10 -10
- package/features/extraConsoleCommands/init.d.ts +3 -2
- package/features/extraConsoleCommands/init.lua +83 -83
- package/features/extraConsoleCommands/{commands.d.ts → listCommands.d.ts} +17 -17
- package/features/extraConsoleCommands/{commands.lua → listCommands.lua} +36 -36
- package/features/fadeInRemover.lua +3 -3
- package/features/fastReset.lua +4 -4
- package/features/forgottenSwitch.lua +2 -2
- package/features/getCollectibleItemPoolType.lua +6 -6
- package/features/playerInventory.lua +10 -10
- package/features/{isPonyActive.d.ts → ponyDetection.d.ts} +0 -0
- package/features/{isPonyActive.lua → ponyDetection.lua} +7 -7
- package/features/{preventCollectibleRotate.d.ts → preventCollectibleRotation.d.ts} +1 -1
- package/features/{preventCollectibleRotate.lua → preventCollectibleRotation.lua} +9 -9
- package/features/runInNFrames.lua +3 -3
- package/features/saveDataManager/exports.d.ts +15 -12
- package/features/saveDataManager/exports.lua +6 -6
- package/features/saveDataManager/load.d.ts +1 -1
- package/features/saveDataManager/load.lua +4 -4
- package/features/saveDataManager/main.d.ts +1 -1
- package/features/saveDataManager/main.lua +11 -11
- package/features/saveDataManager/maps.d.ts +1 -1
- package/features/saveDataManager/merge.lua +10 -10
- package/features/saveDataManager/save.d.ts +1 -1
- package/features/saveDataManager/save.lua +5 -5
- package/features/saveDataManager/serializationBrand.lua +2 -2
- package/features/sirenHelpers.lua +3 -3
- package/features/taintedLazarusPlayers.lua +2 -2
- package/functions/array.lua +3 -3
- package/functions/benchmark.lua +1 -1
- package/functions/boss.lua +7 -7
- package/functions/cacheFlag.lua +1 -1
- package/functions/cards.d.ts +1 -1
- package/functions/cards.lua +13 -13
- package/functions/challenges.lua +1 -1
- package/functions/character.lua +9 -9
- package/functions/charge.lua +3 -3
- package/functions/chargeBar.d.ts +1 -8
- package/functions/chargeBar.lua +1 -1
- package/functions/collectibleCacheFlag.d.ts +4 -4
- package/functions/collectibleCacheFlag.lua +6 -6
- package/functions/collectibleSet.lua +5 -5
- package/functions/collectibleTag.lua +6 -6
- package/functions/collectibles.lua +15 -15
- package/functions/color.d.ts +17 -3
- package/functions/color.lua +5 -5
- package/functions/debug.lua +1 -1
- package/functions/deepCopy.lua +13 -13
- package/functions/deepCopyTests.lua +6 -6
- package/functions/direction.lua +3 -3
- package/functions/doors.lua +6 -6
- package/functions/eden.lua +5 -5
- package/functions/entity.lua +5 -5
- package/functions/entitySpecific.d.ts +15 -1
- package/functions/entitySpecific.lua +10 -2
- package/functions/enums.d.ts +3 -3
- package/functions/enums.lua +2 -2
- package/functions/familiars.lua +2 -2
- package/functions/flying.lua +2 -2
- package/functions/globals.lua +3 -3
- package/functions/gridEntity.lua +10 -10
- package/functions/gridEntitySpecific.lua +2 -2
- package/functions/input.lua +4 -4
- package/functions/jsonHelpers.lua +1 -1
- package/functions/jsonRoom.d.ts +1 -1
- package/functions/jsonRoom.lua +4 -4
- package/functions/kColor.d.ts +1 -1
- package/functions/kColor.lua +5 -5
- package/functions/level.lua +3 -3
- package/functions/log.lua +15 -15
- package/functions/math.lua +1 -1
- package/functions/mergeTests.lua +7 -7
- package/functions/npc.lua +3 -3
- package/functions/pickups.lua +6 -6
- package/functions/pills.lua +15 -15
- package/functions/player.lua +11 -11
- package/functions/playerDataStructures.d.ts +51 -0
- package/functions/playerDataStructures.lua +5 -1
- package/functions/playerHealth.d.ts +1 -1
- package/functions/playerHealth.lua +4 -4
- package/functions/playerIndex.lua +1 -1
- package/functions/pocketItems.d.ts +1 -1
- package/functions/pocketItems.lua +3 -3
- package/functions/positionVelocity.lua +6 -6
- package/functions/random.lua +1 -1
- package/functions/revive.lua +6 -6
- package/functions/rng.d.ts +1 -1
- package/functions/rng.lua +6 -6
- package/functions/roomData.lua +4 -4
- package/functions/roomGrid.lua +3 -3
- package/functions/roomShape.lua +8 -8
- package/functions/rooms.lua +12 -12
- package/functions/run.lua +4 -4
- package/functions/seeds.lua +2 -2
- package/functions/serialization.lua +5 -5
- package/functions/set.lua +2 -2
- package/functions/sound.lua +2 -2
- package/functions/spawnCollectible.lua +10 -10
- package/functions/sprite.lua +3 -3
- package/functions/stage.lua +2 -2
- package/functions/transformations.lua +6 -6
- package/functions/trinketCacheFlag.lua +3 -3
- package/functions/trinketGive.d.ts +1 -1
- package/functions/trinketGive.lua +3 -3
- package/functions/trinkets.d.ts +3 -3
- package/functions/trinkets.lua +14 -14
- package/functions/tstlClass.lua +1 -1
- package/functions/ui.lua +3 -3
- package/functions/utils.d.ts +2 -2
- package/functions/utils.lua +1 -1
- package/functions/vector.d.ts +1 -1
- package/functions/vector.lua +5 -5
- package/index.d.ts +14 -13
- package/index.lua +123 -123
- package/initCustomCallbacks.lua +58 -58
- package/initFeatures.lua +19 -19
- package/{types → interfaces}/AddCallbackParameterCustom.d.ts +0 -0
- package/{types → interfaces}/AddCallbackParameterCustom.lua +1 -1
- package/interfaces/ChargeBarSprites.d.ts +13 -0
- package/{types/JSONDoor.lua → interfaces/ChargeBarSprites.lua} +0 -0
- package/{types → interfaces}/JSONDoor.d.ts +1 -0
- package/{types/JSONEntity.lua → interfaces/JSONDoor.lua} +0 -0
- package/{types → interfaces}/JSONEntity.d.ts +1 -0
- package/{types/JSONRoom.lua → interfaces/JSONEntity.lua} +0 -0
- package/{types → interfaces}/JSONRoom.d.ts +1 -5
- package/{types/JSONRooms.lua → interfaces/JSONRoom.lua} +0 -0
- package/{types → interfaces}/JSONRooms.d.ts +0 -0
- package/{types/JSONSpawn.lua → interfaces/JSONRooms.lua} +0 -0
- package/{types → interfaces}/JSONSpawn.d.ts +1 -0
- package/{types/PlayerHealth.lua → interfaces/JSONSpawn.lua} +0 -0
- package/{types → interfaces}/PlayerHealth.d.ts +1 -0
- package/{types/PocketItemDescription.lua → interfaces/PlayerHealth.lua} +0 -0
- package/{types → interfaces}/PocketItemDescription.d.ts +1 -0
- package/{types/Primitive.lua → interfaces/PocketItemDescription.lua} +0 -0
- package/interfaces/SaveData.d.ts +29 -0
- package/{types/private → interfaces}/SaveData.lua +0 -0
- package/{types → interfaces}/TrinketSituation.d.ts +1 -0
- package/{types → interfaces}/TrinketSituation.lua +0 -0
- package/{types → interfaces}/private/TSTLClassMetatable.d.ts +0 -0
- package/{types → interfaces}/private/TSTLClassMetatable.lua +0 -0
- package/maps/cardMap.lua +85 -85
- package/maps/characterMap.lua +58 -58
- package/maps/defaultPlayerStatMap.lua +1 -1
- package/maps/pillEffectMap.lua +39 -39
- package/maps/roomTypeMap.lua +12 -12
- package/objects/LRoomShapeToRectangles.lua +1 -1
- package/objects/callbackRegisterFunctions.d.ts +1 -1
- package/objects/callbackRegisterFunctions.lua +76 -76
- package/objects/directionToVector.lua +1 -1
- package/objects/isaacAPIClassTypeToBrand.lua +2 -2
- package/objects/isaacAPIClassTypeToCopyFunction.lua +5 -5
- package/objects/roomShapeBounds.lua +1 -1
- package/objects/roomShapeLayoutSizes.lua +1 -1
- package/objects/roomShapeToDoorSlotsToGridIndexDelta.lua +1 -1
- package/objects/roomShapeToTopLeftPosition.lua +1 -1
- package/objects/roomTypeNames.lua +1 -1
- package/objects/serializedIsaacAPIClassTypeToIdentityFunction.lua +5 -5
- package/package.json +2 -2
- package/patchErrorFunctions.lua +1 -1
- package/types/CollectibleIndex.d.ts +2 -2
- package/types/PickingUpItem.d.ts +12 -2
- package/types/PickingUpItem.lua +3 -0
- package/types/PlayerIndex.d.ts +2 -2
- package/types/private/IsaacAPIClass.d.ts +1 -1
- package/types/private/SerializedIsaacAPIClass.d.ts +1 -1
- package/types/private/TSTLClass.d.ts +1 -1
- package/upgradeMod.d.ts +2 -1
- package/upgradeMod.lua +7 -7
- package/types/Primitive.d.ts +0 -1
- package/types/private/SaveData.d.ts +0 -22
package/functions/character.lua
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
3
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
4
|
-
local
|
|
5
|
-
local LAST_VANILLA_CHARACTER =
|
|
6
|
-
local ____characterNames = require("
|
|
4
|
+
local ____constantsFirstLast = require("constantsFirstLast")
|
|
5
|
+
local LAST_VANILLA_CHARACTER = ____constantsFirstLast.LAST_VANILLA_CHARACTER
|
|
6
|
+
local ____characterNames = require("objects.characterNames")
|
|
7
7
|
local CHARACTER_NAMES = ____characterNames.CHARACTER_NAMES
|
|
8
8
|
local DEFAULT_CHARACTER_NAME = ____characterNames.DEFAULT_CHARACTER_NAME
|
|
9
|
-
local ____charactersThatStartWithAnActiveItemSet = require("
|
|
9
|
+
local ____charactersThatStartWithAnActiveItemSet = require("sets.charactersThatStartWithAnActiveItemSet")
|
|
10
10
|
local CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET = ____charactersThatStartWithAnActiveItemSet.CHARACTERS_THAT_START_WITH_AN_ACTIVE_ITEM_SET
|
|
11
|
-
local ____charactersWithBlackHeartFromEternalHeartSet = require("
|
|
11
|
+
local ____charactersWithBlackHeartFromEternalHeartSet = require("sets.charactersWithBlackHeartFromEternalHeartSet")
|
|
12
12
|
local CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET = ____charactersWithBlackHeartFromEternalHeartSet.CHARACTERS_WITH_BLACK_HEART_FROM_ETERNAL_HEART_SET
|
|
13
|
-
local ____charactersWithFreeDevilDealsSet = require("
|
|
13
|
+
local ____charactersWithFreeDevilDealsSet = require("sets.charactersWithFreeDevilDealsSet")
|
|
14
14
|
local CHARACTERS_WITH_FREE_DEVIL_DEALS_SET = ____charactersWithFreeDevilDealsSet.CHARACTERS_WITH_FREE_DEVIL_DEALS_SET
|
|
15
|
-
local ____charactersWithNoRedHeartsSet = require("
|
|
15
|
+
local ____charactersWithNoRedHeartsSet = require("sets.charactersWithNoRedHeartsSet")
|
|
16
16
|
local CHARACTERS_WITH_NO_RED_HEARTS_SET = ____charactersWithNoRedHeartsSet.CHARACTERS_WITH_NO_RED_HEARTS_SET
|
|
17
|
-
local ____charactersWithNoSoulHeartsSet = require("
|
|
17
|
+
local ____charactersWithNoSoulHeartsSet = require("sets.charactersWithNoSoulHeartsSet")
|
|
18
18
|
local CHARACTERS_WITH_NO_SOUL_HEARTS_SET = ____charactersWithNoSoulHeartsSet.CHARACTERS_WITH_NO_SOUL_HEARTS_SET
|
|
19
|
-
local ____lostStyleCharactersSet = require("
|
|
19
|
+
local ____lostStyleCharactersSet = require("sets.lostStyleCharactersSet")
|
|
20
20
|
local LOST_STYLE_CHARACTERS_SET = ____lostStyleCharactersSet.LOST_STYLE_CHARACTERS_SET
|
|
21
21
|
function ____exports.isVanillaCharacter(self, character)
|
|
22
22
|
return character <= LAST_VANILLA_CHARACTER
|
package/functions/charge.lua
CHANGED
|
@@ -6,12 +6,12 @@ local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
|
6
6
|
local RoomShape = ____isaac_2Dtypescript_2Ddefinitions.RoomShape
|
|
7
7
|
local SoundEffect = ____isaac_2Dtypescript_2Ddefinitions.SoundEffect
|
|
8
8
|
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
9
|
-
local ____cachedClasses = require("
|
|
9
|
+
local ____cachedClasses = require("cachedClasses")
|
|
10
10
|
local game = ____cachedClasses.game
|
|
11
11
|
local sfxManager = ____cachedClasses.sfxManager
|
|
12
|
-
local ____collectibles = require("
|
|
12
|
+
local ____collectibles = require("functions.collectibles")
|
|
13
13
|
local getCollectibleMaxCharges = ____collectibles.getCollectibleMaxCharges
|
|
14
|
-
local ____playerIndex = require("
|
|
14
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
15
15
|
local getPlayers = ____playerIndex.getPlayers
|
|
16
16
|
function ____exports.addRoomClearChargeToSlot(self, player, activeSlot, ignoreBigRoomDoubleCharge)
|
|
17
17
|
if ignoreBigRoomDoubleCharge == nil then
|
package/functions/chargeBar.d.ts
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
-
|
|
3
|
-
export interface ChargeBarSprites {
|
|
4
|
-
back: Sprite;
|
|
5
|
-
meter: Sprite;
|
|
6
|
-
meterBattery: Sprite;
|
|
7
|
-
lines: Sprite;
|
|
8
|
-
maxCharges: int;
|
|
9
|
-
}
|
|
2
|
+
import { ChargeBarSprites } from "../interfaces/ChargeBarSprites";
|
|
10
3
|
/**
|
|
11
4
|
* Constructor for a `ChargeBarSprites` object. For more information, see the `renderChargeBar`
|
|
12
5
|
* helper function.
|
package/functions/chargeBar.lua
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local getChargeBarClamp
|
|
3
|
-
local ____constants = require("
|
|
3
|
+
local ____constants = require("constants")
|
|
4
4
|
local VectorZero = ____constants.VectorZero
|
|
5
5
|
function getChargeBarClamp(self, charges, maxCharges)
|
|
6
6
|
local meterMultiplier = 24 / maxCharges
|
|
@@ -9,14 +9,14 @@ export declare function getCollectiblesForCacheFlag(cacheFlag: CacheFlag): Set<C
|
|
|
9
9
|
* Returns an array containing every collectible type that the player has that matches the provided
|
|
10
10
|
* CacheFlag.
|
|
11
11
|
*
|
|
12
|
-
* For example, if
|
|
13
|
-
* return:
|
|
12
|
+
* For example, if the cache flag is `CacheFlag.FLYING`, and the player has one Lord of the Pit and
|
|
13
|
+
* two Dead Doves, then this function would return:
|
|
14
14
|
*
|
|
15
15
|
* ```ts
|
|
16
16
|
* [
|
|
17
17
|
* CollectibleType.LORD_OF_THE_PIT,
|
|
18
|
-
* CollectibleType.
|
|
19
|
-
* CollectibleType.
|
|
18
|
+
* CollectibleType.DEAD_DOVE,
|
|
19
|
+
* CollectibleType.DEAD_DOVE,
|
|
20
20
|
* ]
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
@@ -5,18 +5,18 @@ local Set = ____lualib.Set
|
|
|
5
5
|
local ____exports = {}
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
7
|
local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
|
|
8
|
-
local ____cachedClasses = require("
|
|
8
|
+
local ____cachedClasses = require("cachedClasses")
|
|
9
9
|
local itemConfig = ____cachedClasses.itemConfig
|
|
10
|
-
local ____collectibles = require("
|
|
10
|
+
local ____collectibles = require("functions.collectibles")
|
|
11
11
|
local getCollectibleTypeRange = ____collectibles.getCollectibleTypeRange
|
|
12
|
-
local ____enums = require("
|
|
12
|
+
local ____enums = require("functions.enums")
|
|
13
13
|
local getEnumValues = ____enums.getEnumValues
|
|
14
|
-
local ____flag = require("
|
|
14
|
+
local ____flag = require("functions.flag")
|
|
15
15
|
local hasFlag = ____flag.hasFlag
|
|
16
|
-
local ____set = require("
|
|
16
|
+
local ____set = require("functions.set")
|
|
17
17
|
local copySet = ____set.copySet
|
|
18
18
|
local getSortedSetValues = ____set.getSortedSetValues
|
|
19
|
-
local ____utils = require("
|
|
19
|
+
local ____utils = require("functions.utils")
|
|
20
20
|
local ____repeat = ____utils["repeat"]
|
|
21
21
|
function ____exports.collectibleHasCacheFlag(self, collectibleType, cacheFlag)
|
|
22
22
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
@@ -2,13 +2,13 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local Set = ____lualib.Set
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
|
-
local ____cachedClasses = require("
|
|
5
|
+
local ____cachedClasses = require("cachedClasses")
|
|
6
6
|
local itemConfig = ____cachedClasses.itemConfig
|
|
7
|
-
local
|
|
8
|
-
local LAST_VANILLA_COLLECTIBLE_TYPE =
|
|
9
|
-
local ____collectibles = require("
|
|
7
|
+
local ____constantsFirstLast = require("constantsFirstLast")
|
|
8
|
+
local LAST_VANILLA_COLLECTIBLE_TYPE = ____constantsFirstLast.LAST_VANILLA_COLLECTIBLE_TYPE
|
|
9
|
+
local ____collectibles = require("functions.collectibles")
|
|
10
10
|
local getCollectibleTypeRange = ____collectibles.getCollectibleTypeRange
|
|
11
|
-
local ____set = require("
|
|
11
|
+
local ____set = require("functions.set")
|
|
12
12
|
local copySet = ____set.copySet
|
|
13
13
|
local ALL_COLLECTIBLES_SET = __TS__New(Set)
|
|
14
14
|
local VANILLA_COLLECTIBLES_SET = __TS__New(Set)
|
|
@@ -6,17 +6,17 @@ local __TS__Spread = ____lualib.__TS__Spread
|
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
8
|
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
9
|
-
local ____cachedClasses = require("
|
|
9
|
+
local ____cachedClasses = require("cachedClasses")
|
|
10
10
|
local itemConfig = ____cachedClasses.itemConfig
|
|
11
|
-
local ____collectibles = require("
|
|
11
|
+
local ____collectibles = require("functions.collectibles")
|
|
12
12
|
local getCollectibleTypeRange = ____collectibles.getCollectibleTypeRange
|
|
13
|
-
local ____enums = require("
|
|
13
|
+
local ____enums = require("functions.enums")
|
|
14
14
|
local getEnumValues = ____enums.getEnumValues
|
|
15
|
-
local ____flag = require("
|
|
15
|
+
local ____flag = require("functions.flag")
|
|
16
16
|
local getFlagName = ____flag.getFlagName
|
|
17
|
-
local ____player = require("
|
|
17
|
+
local ____player = require("functions.player")
|
|
18
18
|
local getPlayerCollectibleCount = ____player.getPlayerCollectibleCount
|
|
19
|
-
local ____set = require("
|
|
19
|
+
local ____set = require("functions.set")
|
|
20
20
|
local copySet = ____set.copySet
|
|
21
21
|
function ____exports.collectibleHasTag(self, collectibleType, tag)
|
|
22
22
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
@@ -8,34 +8,34 @@ local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
|
|
|
8
8
|
local PickupPrice = ____isaac_2Dtypescript_2Ddefinitions.PickupPrice
|
|
9
9
|
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
10
10
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
11
|
-
local ____cachedClasses = require("
|
|
11
|
+
local ____cachedClasses = require("cachedClasses")
|
|
12
12
|
local game = ____cachedClasses.game
|
|
13
13
|
local itemConfig = ____cachedClasses.itemConfig
|
|
14
|
-
local ____constants = require("
|
|
14
|
+
local ____constants = require("constants")
|
|
15
15
|
local BLIND_ITEM_PNG_PATH = ____constants.BLIND_ITEM_PNG_PATH
|
|
16
|
-
local
|
|
17
|
-
local FIRST_COLLECTIBLE_TYPE =
|
|
18
|
-
local FIRST_MODDED_COLLECTIBLE_TYPE =
|
|
19
|
-
local LAST_COLLECTIBLE_TYPE =
|
|
20
|
-
local LAST_VANILLA_COLLECTIBLE_TYPE =
|
|
21
|
-
local ____collectibleDescriptionMap = require("
|
|
16
|
+
local ____constantsFirstLast = require("constantsFirstLast")
|
|
17
|
+
local FIRST_COLLECTIBLE_TYPE = ____constantsFirstLast.FIRST_COLLECTIBLE_TYPE
|
|
18
|
+
local FIRST_MODDED_COLLECTIBLE_TYPE = ____constantsFirstLast.FIRST_MODDED_COLLECTIBLE_TYPE
|
|
19
|
+
local LAST_COLLECTIBLE_TYPE = ____constantsFirstLast.LAST_COLLECTIBLE_TYPE
|
|
20
|
+
local LAST_VANILLA_COLLECTIBLE_TYPE = ____constantsFirstLast.LAST_VANILLA_COLLECTIBLE_TYPE
|
|
21
|
+
local ____collectibleDescriptionMap = require("maps.collectibleDescriptionMap")
|
|
22
22
|
local COLLECTIBLE_DESCRIPTION_MAP = ____collectibleDescriptionMap.COLLECTIBLE_DESCRIPTION_MAP
|
|
23
23
|
local DEFAULT_COLLECTIBLE_DESCRIPTION = ____collectibleDescriptionMap.DEFAULT_COLLECTIBLE_DESCRIPTION
|
|
24
|
-
local ____collectibleNameMap = require("
|
|
24
|
+
local ____collectibleNameMap = require("maps.collectibleNameMap")
|
|
25
25
|
local COLLECTIBLE_NAME_MAP = ____collectibleNameMap.COLLECTIBLE_NAME_MAP
|
|
26
26
|
local DEFAULT_COLLECTIBLE_NAME = ____collectibleNameMap.DEFAULT_COLLECTIBLE_NAME
|
|
27
|
-
local ____singleUseActiveCollectibleTypesSet = require("
|
|
27
|
+
local ____singleUseActiveCollectibleTypesSet = require("sets.singleUseActiveCollectibleTypesSet")
|
|
28
28
|
local SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET = ____singleUseActiveCollectibleTypesSet.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET
|
|
29
|
-
local ____entity = require("
|
|
29
|
+
local ____entity = require("functions.entity")
|
|
30
30
|
local getEntityID = ____entity.getEntityID
|
|
31
|
-
local ____pickupVariants = require("
|
|
31
|
+
local ____pickupVariants = require("functions.pickupVariants")
|
|
32
32
|
local isCollectible = ____pickupVariants.isCollectible
|
|
33
|
-
local ____roomData = require("
|
|
33
|
+
local ____roomData = require("functions.roomData")
|
|
34
34
|
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
35
|
-
local ____sprite = require("
|
|
35
|
+
local ____sprite = require("functions.sprite")
|
|
36
36
|
local clearSprite = ____sprite.clearSprite
|
|
37
37
|
local spriteEquals = ____sprite.spriteEquals
|
|
38
|
-
local ____utils = require("
|
|
38
|
+
local ____utils = require("functions.utils")
|
|
39
39
|
local irange = ____utils.irange
|
|
40
40
|
function initQuestionMarkSprite(self)
|
|
41
41
|
local sprite = Sprite()
|
package/functions/color.d.ts
CHANGED
|
@@ -2,13 +2,16 @@
|
|
|
2
2
|
/// <reference types="typescript-to-lua/language-extensions" />
|
|
3
3
|
import { SerializationType } from "../enums/SerializationType";
|
|
4
4
|
declare type SerializedColor = LuaTable<string, unknown> & {
|
|
5
|
-
__serializedColorBrand:
|
|
5
|
+
__serializedColorBrand: void;
|
|
6
6
|
};
|
|
7
7
|
interface CopyColorReturn {
|
|
8
8
|
[SerializationType.NONE]: Color;
|
|
9
9
|
[SerializationType.SERIALIZE]: SerializedColor;
|
|
10
10
|
[SerializationType.DESERIALIZE]: Color;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* @category color
|
|
14
|
+
*/
|
|
12
15
|
export declare function colorEquals(color1: Color, color2: Color): boolean;
|
|
13
16
|
/**
|
|
14
17
|
* Helper function to copy a `Color` object.
|
|
@@ -16,16 +19,27 @@ export declare function colorEquals(color1: Color, color2: Color): boolean;
|
|
|
16
19
|
* @param color The Color object to copy. In the case of deserialization, this will actually be a
|
|
17
20
|
* Lua table instead of an instantiated Color class.
|
|
18
21
|
* @param serializationType Default is `SerializationType.NONE`.
|
|
22
|
+
* @category color
|
|
19
23
|
*/
|
|
20
24
|
export declare function copyColor<C extends Color | SerializedColor, S extends SerializationType>(color: C, serializationType: S): CopyColorReturn[S];
|
|
21
25
|
export declare function copyColor<C extends Color | SerializedColor>(color: C): CopyColorReturn[SerializationType.NONE];
|
|
22
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Returns `Color(1, 1, 1)`.
|
|
28
|
+
*
|
|
29
|
+
* @category color
|
|
30
|
+
*/
|
|
23
31
|
export declare function getDefaultColor(): Color;
|
|
24
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Helper function to check if something is an instantiated Color object.
|
|
34
|
+
*
|
|
35
|
+
* @category color
|
|
36
|
+
*/
|
|
25
37
|
export declare function isColor(object: unknown): object is Color;
|
|
26
38
|
/**
|
|
27
39
|
* Used to determine is the given table is a serialized `Color` object created by the save data
|
|
28
40
|
* manager and/or the `deepCopy` function.
|
|
41
|
+
*
|
|
42
|
+
* @category color
|
|
29
43
|
*/
|
|
30
44
|
export declare function isSerializedColor(object: unknown): object is SerializedColor;
|
|
31
45
|
export {};
|
package/functions/color.lua
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local OBJECT_NAME
|
|
3
|
-
local ____SerializationBrand = require("
|
|
3
|
+
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
4
4
|
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
5
|
-
local ____SerializationType = require("
|
|
5
|
+
local ____SerializationType = require("enums.SerializationType")
|
|
6
6
|
local SerializationType = ____SerializationType.SerializationType
|
|
7
|
-
local ____isaacAPIClass = require("
|
|
7
|
+
local ____isaacAPIClass = require("functions.isaacAPIClass")
|
|
8
8
|
local isaacAPIClassEquals = ____isaacAPIClass.isaacAPIClassEquals
|
|
9
9
|
local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
10
|
-
local ____table = require("
|
|
10
|
+
local ____table = require("functions.table")
|
|
11
11
|
local copyValuesToTable = ____table.copyValuesToTable
|
|
12
12
|
local getNumbersFromTable = ____table.getNumbersFromTable
|
|
13
13
|
local tableHasKeys = ____table.tableHasKeys
|
|
14
|
-
local ____utils = require("
|
|
14
|
+
local ____utils = require("functions.utils")
|
|
15
15
|
local ensureAllCases = ____utils.ensureAllCases
|
|
16
16
|
function ____exports.isColor(self, object)
|
|
17
17
|
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
package/functions/debug.lua
CHANGED
package/functions/deepCopy.lua
CHANGED
|
@@ -9,34 +9,34 @@ local __TS__Iterator = ____lualib.__TS__Iterator
|
|
|
9
9
|
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
10
10
|
local ____exports = {}
|
|
11
11
|
local deepCopyTable, deepCopyDefaultMap, deepCopyMap, deepCopySet, deepCopyTSTLClass, deepCopyArray, deepCopyNormalLuaTable, getCopiedEntries, checkMetatable, deepCopyUserdata, COPYABLE_ISAAC_API_CLASS_TYPES_SET
|
|
12
|
-
local ____DefaultMap = require("
|
|
12
|
+
local ____DefaultMap = require("classes.DefaultMap")
|
|
13
13
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
14
|
-
local ____CopyableIsaacAPIClassType = require("
|
|
14
|
+
local ____CopyableIsaacAPIClassType = require("enums.private.CopyableIsaacAPIClassType")
|
|
15
15
|
local CopyableIsaacAPIClassType = ____CopyableIsaacAPIClassType.CopyableIsaacAPIClassType
|
|
16
|
-
local ____SerializationBrand = require("
|
|
16
|
+
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
17
17
|
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
18
|
-
local ____SerializationType = require("
|
|
18
|
+
local ____SerializationType = require("enums.SerializationType")
|
|
19
19
|
local SerializationType = ____SerializationType.SerializationType
|
|
20
|
-
local ____constants = require("
|
|
20
|
+
local ____constants = require("features.saveDataManager.constants")
|
|
21
21
|
local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
|
|
22
|
-
local ____serializationBrand = require("
|
|
22
|
+
local ____serializationBrand = require("features.saveDataManager.serializationBrand")
|
|
23
23
|
local isSerializationBrand = ____serializationBrand.isSerializationBrand
|
|
24
|
-
local ____array = require("
|
|
24
|
+
local ____array = require("functions.array")
|
|
25
25
|
local isArray = ____array.isArray
|
|
26
|
-
local ____enums = require("
|
|
26
|
+
local ____enums = require("functions.enums")
|
|
27
27
|
local getEnumValues = ____enums.getEnumValues
|
|
28
|
-
local ____isaacAPIClass = require("
|
|
28
|
+
local ____isaacAPIClass = require("functions.isaacAPIClass")
|
|
29
29
|
local getIsaacAPIClassType = ____isaacAPIClass.getIsaacAPIClassType
|
|
30
|
-
local ____log = require("
|
|
30
|
+
local ____log = require("functions.log")
|
|
31
31
|
local log = ____log.log
|
|
32
|
-
local ____serialization = require("
|
|
32
|
+
local ____serialization = require("functions.serialization")
|
|
33
33
|
local copyIsaacAPIClass = ____serialization.copyIsaacAPIClass
|
|
34
34
|
local deserializeIsaacAPIClass = ____serialization.deserializeIsaacAPIClass
|
|
35
35
|
local isSerializedIsaacAPIClass = ____serialization.isSerializedIsaacAPIClass
|
|
36
|
-
local ____tstlClass = require("
|
|
36
|
+
local ____tstlClass = require("functions.tstlClass")
|
|
37
37
|
local isUserDefinedTSTLClass = ____tstlClass.isUserDefinedTSTLClass
|
|
38
38
|
local newTSTLClass = ____tstlClass.newTSTLClass
|
|
39
|
-
local ____utils = require("
|
|
39
|
+
local ____utils = require("functions.utils")
|
|
40
40
|
local ensureAllCases = ____utils.ensureAllCases
|
|
41
41
|
local getTraversalDescription = ____utils.getTraversalDescription
|
|
42
42
|
function ____exports.deepCopy(self, value, serializationType, traversalDescription)
|
|
@@ -5,17 +5,17 @@ local __TS__InstanceOf = ____lualib.__TS__InstanceOf
|
|
|
5
5
|
local Set = ____lualib.Set
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local copiedObjectIsTable, copiedObjectHasKeyAndValueString, copiedTableHasKeyAndValueNumber, copiedTableDoesNotCoerceTypes, copiedObjectHasNoReferencesForPrimitivesForward, copiedObjectHasNoReferencesForPrimitivesBackward, copiedObjectHasNoReferencesForArray, copiedObjectHasChildObject, copiedMapIsMap, copiedMapHasValue, copiedSetIsSet, copiedSetHasValue, copiedMapHasChildMap, copiedDefaultMapHasChildDefaultMap, copiedDefaultMapHasBrand
|
|
8
|
-
local ____DefaultMap = require("
|
|
8
|
+
local ____DefaultMap = require("classes.DefaultMap")
|
|
9
9
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
10
|
-
local ____SerializationBrand = require("
|
|
10
|
+
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
11
11
|
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
12
|
-
local ____SerializationType = require("
|
|
12
|
+
local ____SerializationType = require("enums.SerializationType")
|
|
13
13
|
local SerializationType = ____SerializationType.SerializationType
|
|
14
|
-
local ____array = require("
|
|
14
|
+
local ____array = require("functions.array")
|
|
15
15
|
local arrayEquals = ____array.arrayEquals
|
|
16
|
-
local ____deepCopy = require("
|
|
16
|
+
local ____deepCopy = require("functions.deepCopy")
|
|
17
17
|
local deepCopy = ____deepCopy.deepCopy
|
|
18
|
-
local ____log = require("
|
|
18
|
+
local ____log = require("functions.log")
|
|
19
19
|
local log = ____log.log
|
|
20
20
|
function copiedObjectIsTable(self)
|
|
21
21
|
local oldObject = {abc = "def"}
|
package/functions/direction.lua
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
|
-
local ____directionNames = require("
|
|
2
|
+
local ____directionNames = require("objects.directionNames")
|
|
3
3
|
local DIRECTION_NAMES = ____directionNames.DIRECTION_NAMES
|
|
4
|
-
local ____directionToDegrees = require("
|
|
4
|
+
local ____directionToDegrees = require("objects.directionToDegrees")
|
|
5
5
|
local DIRECTION_TO_DEGREES = ____directionToDegrees.DIRECTION_TO_DEGREES
|
|
6
|
-
local ____directionToVector = require("
|
|
6
|
+
local ____directionToVector = require("objects.directionToVector")
|
|
7
7
|
local DIRECTION_TO_VECTOR = ____directionToVector.DIRECTION_TO_VECTOR
|
|
8
8
|
function ____exports.directionToDegrees(self, direction)
|
|
9
9
|
return DIRECTION_TO_DEGREES[direction]
|
package/functions/doors.lua
CHANGED
|
@@ -11,18 +11,18 @@ local DoorState = ____isaac_2Dtypescript_2Ddefinitions.DoorState
|
|
|
11
11
|
local DoorVariant = ____isaac_2Dtypescript_2Ddefinitions.DoorVariant
|
|
12
12
|
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
13
13
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
14
|
-
local ____cachedClasses = require("
|
|
14
|
+
local ____cachedClasses = require("cachedClasses")
|
|
15
15
|
local game = ____cachedClasses.game
|
|
16
|
-
local ____doorSlotFlagToDoorSlot = require("
|
|
16
|
+
local ____doorSlotFlagToDoorSlot = require("objects.doorSlotFlagToDoorSlot")
|
|
17
17
|
local DEFAULT_DOOR_SLOT = ____doorSlotFlagToDoorSlot.DEFAULT_DOOR_SLOT
|
|
18
18
|
local DOOR_SLOT_FLAG_TO_DOOR_SLOT = ____doorSlotFlagToDoorSlot.DOOR_SLOT_FLAG_TO_DOOR_SLOT
|
|
19
|
-
local ____doorSlotToDirection = require("
|
|
19
|
+
local ____doorSlotToDirection = require("objects.doorSlotToDirection")
|
|
20
20
|
local DOOR_SLOT_TO_DIRECTION = ____doorSlotToDirection.DOOR_SLOT_TO_DIRECTION
|
|
21
|
-
local ____roomShapeToDoorSlots = require("
|
|
21
|
+
local ____roomShapeToDoorSlots = require("objects.roomShapeToDoorSlots")
|
|
22
22
|
local ROOM_SHAPE_TO_DOOR_SLOTS = ____roomShapeToDoorSlots.ROOM_SHAPE_TO_DOOR_SLOTS
|
|
23
|
-
local ____direction = require("
|
|
23
|
+
local ____direction = require("functions.direction")
|
|
24
24
|
local directionToVector = ____direction.directionToVector
|
|
25
|
-
local ____enums = require("
|
|
25
|
+
local ____enums = require("functions.enums")
|
|
26
26
|
local getEnumValues = ____enums.getEnumValues
|
|
27
27
|
function ____exports.doorSlotToDirection(self, doorSlot)
|
|
28
28
|
return DOOR_SLOT_TO_DIRECTION[doorSlot]
|
package/functions/eden.lua
CHANGED
|
@@ -5,16 +5,16 @@ local __TS__Iterator = ____lualib.__TS__Iterator
|
|
|
5
5
|
local ____exports = {}
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
7
|
local ItemConfigTag = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTag
|
|
8
|
-
local ____collectibles = require("
|
|
8
|
+
local ____collectibles = require("functions.collectibles")
|
|
9
9
|
local isHiddenCollectible = ____collectibles.isHiddenCollectible
|
|
10
10
|
local isPassiveCollectible = ____collectibles.isPassiveCollectible
|
|
11
|
-
local ____collectibleSet = require("
|
|
11
|
+
local ____collectibleSet = require("functions.collectibleSet")
|
|
12
12
|
local getCollectibleSet = ____collectibleSet.getCollectibleSet
|
|
13
|
-
local ____collectibleTag = require("
|
|
13
|
+
local ____collectibleTag = require("functions.collectibleTag")
|
|
14
14
|
local collectibleHasTag = ____collectibleTag.collectibleHasTag
|
|
15
|
-
local ____rng = require("
|
|
15
|
+
local ____rng = require("functions.rng")
|
|
16
16
|
local getRandomSeed = ____rng.getRandomSeed
|
|
17
|
-
local ____set = require("
|
|
17
|
+
local ____set = require("functions.set")
|
|
18
18
|
local copySet = ____set.copySet
|
|
19
19
|
local getRandomSetElement = ____set.getRandomSetElement
|
|
20
20
|
local EDEN_PASSIVE_COLLECTIBLES_SET = __TS__New(Set)
|
package/functions/entity.lua
CHANGED
|
@@ -4,15 +4,15 @@ local __TS__New = ____lualib.__TS__New
|
|
|
4
4
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
5
5
|
local __TS__StringSplit = ____lualib.__TS__StringSplit
|
|
6
6
|
local ____exports = {}
|
|
7
|
-
local ____cachedClasses = require("
|
|
7
|
+
local ____cachedClasses = require("cachedClasses")
|
|
8
8
|
local game = ____cachedClasses.game
|
|
9
|
-
local ____constants = require("
|
|
9
|
+
local ____constants = require("constants")
|
|
10
10
|
local VectorZero = ____constants.VectorZero
|
|
11
|
-
local ____storyBossesSet = require("
|
|
11
|
+
local ____storyBossesSet = require("sets.storyBossesSet")
|
|
12
12
|
local STORY_BOSSES_SET = ____storyBossesSet.STORY_BOSSES_SET
|
|
13
|
-
local ____random = require("
|
|
13
|
+
local ____random = require("functions.random")
|
|
14
14
|
local getRandom = ____random.getRandom
|
|
15
|
-
local ____rng = require("
|
|
15
|
+
local ____rng = require("functions.rng")
|
|
16
16
|
local newRNG = ____rng.newRNG
|
|
17
17
|
function ____exports.removeEntities(self, entities, cap)
|
|
18
18
|
if #entities == 0 then
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BombVariant, EffectVariant, EntityType, FamiliarVariant, KnifeVariant, LaserVariant, PickupVariant, ProjectileVariant, SlotVariant, TearVariant } from "isaac-typescript-definitions";
|
|
1
|
+
import { BombVariant, EffectVariant, EntityType, FamiliarVariant, KnifeVariant, LaserVariant, PickupVariant, ProjectilesMode, ProjectileVariant, SlotVariant, TearVariant } from "isaac-typescript-definitions";
|
|
2
2
|
/**
|
|
3
3
|
* Helper function to get all of the `EntityType.BOMB` in the room.
|
|
4
4
|
*
|
|
@@ -118,6 +118,20 @@ export declare function getSlots(slotVariant?: SlotVariant, subType?: number): E
|
|
|
118
118
|
* ```
|
|
119
119
|
*/
|
|
120
120
|
export declare function getTears(tearVariant?: TearVariant, subType?: number): EntityTear[];
|
|
121
|
+
/**
|
|
122
|
+
* The base game `EntityNPC.FireProjectiles` method does not return anything, which is a problem in
|
|
123
|
+
* situations where you need to work with the fired projectiles. This function invokes that method,
|
|
124
|
+
* and then returns the projectiles that were spawned.
|
|
125
|
+
*
|
|
126
|
+
* @param npc The EntityNPC firing projectiles.
|
|
127
|
+
* @param position The starting position of the projectiles.
|
|
128
|
+
* @param velocity The starting velocity of the projectiles.
|
|
129
|
+
* @param projectilesMode A ProjectilesMode enum value defining how to fire the projectiles.
|
|
130
|
+
* @param projectileParams A ProjectileParams object containing various parameters for the
|
|
131
|
+
* projectiles.
|
|
132
|
+
* @returns An array of EntityProjectiles containing all fired projectiles.
|
|
133
|
+
*/
|
|
134
|
+
export declare function npcFireProjectiles(npc: EntityNPC, position: Vector, velocity: Vector, projectilesMode: ProjectilesMode, projectileParams: ProjectileParams): EntityProjectile[];
|
|
121
135
|
/**
|
|
122
136
|
* Helper function to remove all of the `EntityType.BOMB` in the room.
|
|
123
137
|
*
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
3
3
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
4
|
-
local ____constants = require("
|
|
4
|
+
local ____constants = require("constants")
|
|
5
5
|
local VectorZero = ____constants.VectorZero
|
|
6
|
-
local ____entity = require("
|
|
6
|
+
local ____entity = require("functions.entity")
|
|
7
7
|
local getEntities = ____entity.getEntities
|
|
8
|
+
local getFilteredNewEntities = ____entity.getFilteredNewEntities
|
|
8
9
|
local removeEntities = ____entity.removeEntities
|
|
9
10
|
local spawn = ____entity.spawn
|
|
10
11
|
function ____exports.getBombs(self, bombVariant, subType)
|
|
@@ -173,6 +174,13 @@ function ____exports.getTears(self, tearVariant, subType)
|
|
|
173
174
|
end
|
|
174
175
|
return tears
|
|
175
176
|
end
|
|
177
|
+
function ____exports.npcFireProjectiles(self, npc, position, velocity, projectilesMode, projectileParams)
|
|
178
|
+
local oldEntities = ____exports.getProjectiles(nil)
|
|
179
|
+
npc:FireProjectiles(position, velocity, projectilesMode, projectileParams)
|
|
180
|
+
local newEntities = ____exports.getProjectiles(nil)
|
|
181
|
+
local filteredNewEntities = getFilteredNewEntities(nil, oldEntities, newEntities)
|
|
182
|
+
return filteredNewEntities
|
|
183
|
+
end
|
|
176
184
|
function ____exports.removeAllBombs(self, bombVariant, subType, cap)
|
|
177
185
|
local bombs = ____exports.getBombs(nil, bombVariant, subType)
|
|
178
186
|
return removeEntities(nil, bombs, cap)
|
package/functions/enums.d.ts
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* Also see the `getEnumKeys` and `getEnumValues` helper functions.
|
|
15
15
|
*
|
|
16
16
|
* For a more in depth explanation, see:
|
|
17
|
-
* https://isaacscript.github.io/
|
|
17
|
+
* https://isaacscript.github.io/gotchas#iterating-over-enums
|
|
18
18
|
*/
|
|
19
19
|
export declare function getEnumEntries<T>(transpiledEnum: T): Array<[key: string, value: T[keyof T]]>;
|
|
20
20
|
/**
|
|
@@ -31,7 +31,7 @@ export declare function getEnumEntries<T>(transpiledEnum: T): Array<[key: string
|
|
|
31
31
|
* Also see the `getEnumEntries` and `getEnumValues` helper functions.
|
|
32
32
|
*
|
|
33
33
|
* For a more in depth explanation, see:
|
|
34
|
-
* https://isaacscript.github.io/
|
|
34
|
+
* https://isaacscript.github.io/gotchas#iterating-over-enums
|
|
35
35
|
*/
|
|
36
36
|
export declare function getEnumKeys<T>(transpiledEnum: T): string[];
|
|
37
37
|
/** Helper function to get the amount of entries inside of an enum. */
|
|
@@ -50,7 +50,7 @@ export declare function getEnumLength<T>(transpiledEnum: T): int;
|
|
|
50
50
|
* Also see the `getEnumEntries` and `getEnumKeys` helper functions.
|
|
51
51
|
*
|
|
52
52
|
* For a more in depth explanation, see:
|
|
53
|
-
* https://isaacscript.github.io/
|
|
53
|
+
* https://isaacscript.github.io/gotchas#iterating-over-enums
|
|
54
54
|
*/
|
|
55
55
|
export declare function getEnumValues<T>(transpiledEnum: T): Array<T[keyof T]>;
|
|
56
56
|
export declare function getLastEnumValue<T>(transpiledEnum: T): T[keyof T];
|
package/functions/enums.lua
CHANGED
|
@@ -2,9 +2,9 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__ArraySort = ____lualib.__TS__ArraySort
|
|
3
3
|
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
4
4
|
local ____exports = {}
|
|
5
|
-
local ____array = require("
|
|
5
|
+
local ____array = require("functions.array")
|
|
6
6
|
local getRandomArrayElement = ____array.getRandomArrayElement
|
|
7
|
-
local ____rng = require("
|
|
7
|
+
local ____rng = require("functions.rng")
|
|
8
8
|
local getRandomSeed = ____rng.getRandomSeed
|
|
9
9
|
function ____exports.getEnumEntries(self, transpiledEnum)
|
|
10
10
|
local enumEntries = {}
|
package/functions/familiars.lua
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
|
-
local ____cachedClasses = require("
|
|
2
|
+
local ____cachedClasses = require("cachedClasses")
|
|
3
3
|
local itemConfig = ____cachedClasses.itemConfig
|
|
4
|
-
local ____familiarsThatShootPlayerTearsSet = require("
|
|
4
|
+
local ____familiarsThatShootPlayerTearsSet = require("sets.familiarsThatShootPlayerTearsSet")
|
|
5
5
|
local FAMILIARS_THAT_SHOOT_PLAYER_TEARS_SET = ____familiarsThatShootPlayerTearsSet.FAMILIARS_THAT_SHOOT_PLAYER_TEARS_SET
|
|
6
6
|
function ____exports.checkFamiliar(self, player, collectibleType, targetCount, familiarVariant, familiarSubType)
|
|
7
7
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
package/functions/flying.lua
CHANGED
|
@@ -9,9 +9,9 @@ local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
|
9
9
|
local NullItemID = ____isaac_2Dtypescript_2Ddefinitions.NullItemID
|
|
10
10
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
11
11
|
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
12
|
-
local ____collectibleCacheFlag = require("
|
|
12
|
+
local ____collectibleCacheFlag = require("functions.collectibleCacheFlag")
|
|
13
13
|
local getCollectiblesForCacheFlag = ____collectibleCacheFlag.getCollectiblesForCacheFlag
|
|
14
|
-
local ____set = require("
|
|
14
|
+
local ____set = require("functions.set")
|
|
15
15
|
local copySet = ____set.copySet
|
|
16
16
|
local deleteSetsFromSet = ____set.deleteSetsFromSet
|
|
17
17
|
local FLYING_CHARACTERS = __TS__New(Set, {
|
package/functions/globals.lua
CHANGED
|
@@ -5,11 +5,11 @@ local __TS__ArraySort = ____lualib.__TS__ArraySort
|
|
|
5
5
|
local __TS__ArrayForEach = ____lualib.__TS__ArrayForEach
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local twoDimensionalSort
|
|
8
|
-
local ____debug = require("
|
|
8
|
+
local ____debug = require("functions.debug")
|
|
9
9
|
local isLuaDebugEnabled = ____debug.isLuaDebugEnabled
|
|
10
|
-
local ____log = require("
|
|
10
|
+
local ____log = require("functions.log")
|
|
11
11
|
local log = ____log.log
|
|
12
|
-
local ____set = require("
|
|
12
|
+
local ____set = require("functions.set")
|
|
13
13
|
local addSetsToSet = ____set.addSetsToSet
|
|
14
14
|
local copySet = ____set.copySet
|
|
15
15
|
function twoDimensionalSort(self, a, b)
|