isaacscript-common 2.0.13 → 2.0.16
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/dist/callbacks/subscriptions/postBombInitLate.d.ts +1 -1
- package/dist/callbacks/subscriptions/postCollectibleInitFirst.d.ts +1 -1
- package/dist/callbacks/subscriptions/postEffectInitLate.d.ts +1 -1
- package/dist/callbacks/subscriptions/postFamiliarInitLate.d.ts +1 -1
- package/dist/callbacks/subscriptions/postHolyMantleRemoved.d.ts +2 -2
- package/dist/callbacks/subscriptions/postItemDischarged.d.ts +2 -2
- package/dist/callbacks/subscriptions/postItemPickup.d.ts +1 -1
- package/dist/callbacks/subscriptions/postKnifeInitLate.d.ts +1 -1
- package/dist/callbacks/subscriptions/postLaserInitLate.d.ts +1 -1
- package/dist/callbacks/subscriptions/postNPCInitLate.d.ts +1 -1
- package/dist/callbacks/subscriptions/postNPCStateChanged.d.ts +1 -1
- package/dist/callbacks/subscriptions/postPEffectUpdateReordered.d.ts +2 -2
- package/dist/callbacks/subscriptions/postPickupCollect.d.ts +1 -1
- package/dist/callbacks/subscriptions/postPickupInitLate.d.ts +1 -1
- package/dist/callbacks/subscriptions/postPlayerChangeType.d.ts +1 -1
- package/dist/callbacks/subscriptions/postProjectileInitLate.d.ts +1 -1
- package/dist/callbacks/subscriptions/postPurchase.d.ts +1 -1
- package/dist/callbacks/subscriptions/postTearInitLate.d.ts +1 -1
- package/dist/callbacks/subscriptions/postTearInitVeryLate.d.ts +1 -1
- package/dist/callbacks/subscriptions/postTrinketBreak.d.ts +2 -2
- package/dist/callbacks/subscriptions/preItemPickup.d.ts +1 -1
- package/dist/constants.d.ts +16 -7
- package/dist/constants.lua +2 -2
- package/dist/features/characterHealthConversion.d.ts +1 -1
- package/dist/features/characterStats.d.ts +1 -1
- package/dist/features/deployJSONRoom.lua +2 -2
- package/dist/features/extraConsoleCommands/commands.d.ts +2 -0
- package/dist/features/extraConsoleCommands/commands.lua +14 -0
- package/dist/features/extraConsoleCommands/init.lua +1 -0
- package/dist/features/preventCollectibleRotate.d.ts +1 -1
- package/dist/features/sirenHelpers.d.ts +1 -1
- package/dist/functions/boss.d.ts +3 -3
- package/dist/functions/cards.d.ts +3 -3
- package/dist/functions/character.d.ts +10 -10
- package/dist/functions/collectibleCacheFlag.d.ts +2 -2
- package/dist/functions/collectibleSet.d.ts +1 -1
- package/dist/functions/collectibleTag.d.ts +3 -3
- package/dist/functions/collectibles.d.ts +15 -15
- package/dist/functions/collectibles.lua +2 -1
- package/dist/functions/entity.d.ts +7 -7
- package/dist/functions/entitySpecific.d.ts +38 -38
- package/dist/functions/familiars.lua +1 -1
- package/dist/functions/flying.d.ts +3 -3
- package/dist/functions/gridEntity.d.ts +2 -2
- package/dist/functions/gridEntity.lua +0 -4
- package/dist/functions/level.d.ts +1 -0
- package/dist/functions/level.lua +29 -0
- package/dist/functions/log.d.ts +2 -2
- package/dist/functions/npc.d.ts +1 -1
- package/dist/functions/pickups.d.ts +24 -24
- package/dist/functions/pills.d.ts +3 -3
- package/dist/functions/player.d.ts +24 -17
- package/dist/functions/player.lua +20 -9
- package/dist/functions/rooms.d.ts +24 -1
- package/dist/functions/rooms.lua +56 -21
- package/dist/functions/run.d.ts +1 -1
- package/dist/functions/spawnCollectible.d.ts +1 -1
- package/dist/functions/transformations.d.ts +2 -2
- package/dist/functions/trinketCacheFlag.d.ts +2 -2
- package/dist/functions/trinketGive.d.ts +2 -2
- package/dist/functions/trinketSet.d.ts +1 -1
- package/dist/functions/trinkets.d.ts +5 -5
- package/dist/functions/trinkets.lua +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.lua +8 -0
- package/dist/objects/roomShapeToDoorSlots.d.ts +1 -1
- package/dist/objects/roomShapeToDoorSlotsToGridIndexDelta.lua +3 -3
- package/dist/sets/mineShaftRoomSubTypesSet.d.ts +2 -0
- package/dist/sets/mineShaftRoomSubTypesSet.lua +14 -0
- package/dist/types/PickingUpItem.d.ts +17 -4
- package/dist/types/TrinketSituation.d.ts +3 -3
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostHolyMantleRemovedRegisterParameters = [
|
|
3
3
|
callback: (player: EntityPlayer, oldNumHolyMantles: int, newNumHolyMantles: int) => void,
|
|
4
|
-
playerVariant?: PlayerVariant
|
|
5
|
-
character?: PlayerType
|
|
4
|
+
playerVariant?: PlayerVariant,
|
|
5
|
+
character?: PlayerType
|
|
6
6
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ActiveSlot, CollectibleType } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostItemDischargedRegisterParameters = [
|
|
3
|
-
callback: (player: EntityPlayer, collectibleType: CollectibleType
|
|
4
|
-
collectibleType?: CollectibleType
|
|
3
|
+
callback: (player: EntityPlayer, collectibleType: CollectibleType, activeSlot: ActiveSlot) => void,
|
|
4
|
+
collectibleType?: CollectibleType
|
|
5
5
|
];
|
|
@@ -3,5 +3,5 @@ import { PickingUpItem } from "../../types/PickingUpItem";
|
|
|
3
3
|
export declare type PostItemPickupRegisterParameters = [
|
|
4
4
|
callback: (player: EntityPlayer, pickingUpItem: PickingUpItem) => void,
|
|
5
5
|
itemType?: ItemType,
|
|
6
|
-
itemID?: CollectibleType | TrinketType
|
|
6
|
+
itemID?: CollectibleType | TrinketType
|
|
7
7
|
];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EntityType } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostNPCStateChangedRegisterParameters = [
|
|
3
3
|
callback: (npc: EntityNPC, previousState: int, currentState: int) => void,
|
|
4
|
-
entityType?: EntityType
|
|
4
|
+
entityType?: EntityType,
|
|
5
5
|
variant?: int
|
|
6
6
|
];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PlayerType, PlayerVariant } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostPEffectUpdateReorderedRegisterParameters = [
|
|
3
3
|
callback: (player: EntityPlayer) => void,
|
|
4
|
-
playerVariant?: PlayerVariant
|
|
5
|
-
character?: PlayerType
|
|
4
|
+
playerVariant?: PlayerVariant,
|
|
5
|
+
character?: PlayerType
|
|
6
6
|
];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PlayerType } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostPlayerChangeTypeRegisterParameters = [
|
|
3
|
-
callback: (player: EntityPlayer, oldCharacter: PlayerType
|
|
3
|
+
callback: (player: EntityPlayer, oldCharacter: PlayerType, newCharacter: PlayerType) => void
|
|
4
4
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProjectileVariant } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostProjectileInitLateRegisterParameters = [
|
|
3
3
|
callback: (projectile: EntityProjectile) => void,
|
|
4
|
-
projectileVariant?: ProjectileVariant
|
|
4
|
+
projectileVariant?: ProjectileVariant
|
|
5
5
|
];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PickupVariant } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostPurchaseRegisterParameters = [
|
|
3
3
|
callback: (player: EntityPlayer, pickup: EntityPickup) => void,
|
|
4
|
-
pickupVariant?: PickupVariant
|
|
4
|
+
pickupVariant?: PickupVariant,
|
|
5
5
|
pickupSubType?: int
|
|
6
6
|
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TrinketType } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostTrinketBreakRegisterParameters = [
|
|
3
|
-
callback: (player: EntityPlayer, trinketType: TrinketType
|
|
4
|
-
trinketType?: TrinketType
|
|
3
|
+
callback: (player: EntityPlayer, trinketType: TrinketType) => void,
|
|
4
|
+
trinketType?: TrinketType
|
|
5
5
|
];
|
|
@@ -3,5 +3,5 @@ import { PickingUpItem } from "../../types/PickingUpItem";
|
|
|
3
3
|
export declare type PreItemPickupRegisterParameters = [
|
|
4
4
|
callback: (player: EntityPlayer, pickingUpItem: PickingUpItem) => void,
|
|
5
5
|
itemType?: ItemType,
|
|
6
|
-
itemID?: CollectibleType | TrinketType
|
|
6
|
+
itemID?: CollectibleType | TrinketType
|
|
7
7
|
];
|
package/dist/constants.d.ts
CHANGED
|
@@ -35,8 +35,23 @@ export declare const FIRST_GLITCHED_COLLECTIBLE_TYPE: number;
|
|
|
35
35
|
export declare const GAME_FRAMES_PER_SECOND = 30;
|
|
36
36
|
export declare const GRID_INDEX_CENTER_OF_1X1_ROOM = 67;
|
|
37
37
|
export declare const ISAAC_FRAMES_PER_SECOND = 60;
|
|
38
|
+
/**
|
|
39
|
+
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first column is
|
|
40
|
+
* represented by grid indexes 0, 13, 26, and so on.
|
|
41
|
+
*/
|
|
38
42
|
export declare const LEVEL_GRID_COLUMN_HEIGHT = 13;
|
|
39
|
-
|
|
43
|
+
/**
|
|
44
|
+
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
|
|
45
|
+
* by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
|
|
46
|
+
* on.
|
|
47
|
+
*/
|
|
48
|
+
export declare const LEVEL_GRID_ROW_WIDTH = 13;
|
|
49
|
+
/**
|
|
50
|
+
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
|
|
51
|
+
* by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
|
|
52
|
+
* on. The maximum room index possible is 168. (It is not 169 because we start at 0 instead of 1.)
|
|
53
|
+
*/
|
|
54
|
+
export declare const MAX_LEVEL_GRID_INDEX = 168;
|
|
40
55
|
/**
|
|
41
56
|
* The game has a limit on the number of currently spawned familiars and will refuse to spawn any
|
|
42
57
|
* more if it reaches the limit. Blue flies and blue spiders have a lower priority and will be
|
|
@@ -55,12 +70,6 @@ export declare const MAX_PLAYER_HEART_CONTAINERS = 18;
|
|
|
55
70
|
*/
|
|
56
71
|
export declare const MAX_PLAYER_SPEED_IN_UNITS = 9.8;
|
|
57
72
|
export declare const MAX_PLAYER_TRINKET_SLOTS: number;
|
|
58
|
-
/**
|
|
59
|
-
* The floor is represented by a 13x13 grid. Room indexes start at 0. The first row is represented
|
|
60
|
-
* by grid indexes from 0 to 12. The second row is represented by grid indexes from 13 to 25, and so
|
|
61
|
-
* on. The maximum room index possible is 168. (It is not 169 because we start at 0 instead of 1.)
|
|
62
|
-
*/
|
|
63
|
-
export declare const MAX_ROOM_INDEX = 168;
|
|
64
73
|
export declare const MAX_ROOM_TYPE: RoomType;
|
|
65
74
|
/**
|
|
66
75
|
* The maximum speed stat that a player can have. Any additional speed beyond this will not take
|
package/dist/constants.lua
CHANGED
|
@@ -22,13 +22,13 @@ ____exports.GAME_FRAMES_PER_SECOND = 30
|
|
|
22
22
|
____exports.GRID_INDEX_CENTER_OF_1X1_ROOM = 67
|
|
23
23
|
____exports.ISAAC_FRAMES_PER_SECOND = 60
|
|
24
24
|
____exports.LEVEL_GRID_COLUMN_HEIGHT = 13
|
|
25
|
-
____exports.
|
|
25
|
+
____exports.LEVEL_GRID_ROW_WIDTH = 13
|
|
26
|
+
____exports.MAX_LEVEL_GRID_INDEX = 168
|
|
26
27
|
____exports.MAX_NUM_FAMILIARS = 64
|
|
27
28
|
____exports.MAX_NUM_INPUTS = 4
|
|
28
29
|
____exports.MAX_PLAYER_HEART_CONTAINERS = 18
|
|
29
30
|
____exports.MAX_PLAYER_SPEED_IN_UNITS = 9.8
|
|
30
31
|
____exports.MAX_PLAYER_TRINKET_SLOTS = getEnumLength(nil, TrinketSlot)
|
|
31
|
-
____exports.MAX_ROOM_INDEX = 168
|
|
32
32
|
____exports.MAX_ROOM_TYPE = getLastEnumValue(nil, RoomType)
|
|
33
33
|
____exports.MAX_SPEED_STAT = 2
|
|
34
34
|
____exports.MAX_STAGE = getLastEnumValue(nil, LevelStage)
|
|
@@ -6,5 +6,5 @@ declare type ConversionHeartSubType = HeartSubType.SOUL | HeartSubType.BLACK;
|
|
|
6
6
|
*
|
|
7
7
|
* Call this function once at the beginning of your mod to declare the health conversion type.
|
|
8
8
|
*/
|
|
9
|
-
export declare function registerCharacterHealthConversion(playerType: PlayerType
|
|
9
|
+
export declare function registerCharacterHealthConversion(playerType: PlayerType, conversionHeartSubType: ConversionHeartSubType): void;
|
|
10
10
|
export {};
|
|
@@ -16,4 +16,4 @@ import { CacheFlag, PlayerType } from "isaac-typescript-definitions";
|
|
|
16
16
|
* Note that the format for the `CacheFlag.FIRE_DELAY` value should be in the tears stat format, not
|
|
17
17
|
* the `MaxFireDelay` format.
|
|
18
18
|
*/
|
|
19
|
-
export declare function registerCharacterStats(playerType: PlayerType
|
|
19
|
+
export declare function registerCharacterStats(playerType: PlayerType, statMap: Map<CacheFlag, number> | ReadonlyMap<CacheFlag, number>): void;
|
|
@@ -228,9 +228,9 @@ function spawnAllEntities(self, jsonRoom, rng, verbose)
|
|
|
228
228
|
log("Leaving the room cleared since there were no battle NPCs spawned.")
|
|
229
229
|
end
|
|
230
230
|
end
|
|
231
|
-
function spawnGridEntityForJSONRoom(self,
|
|
231
|
+
function spawnGridEntityForJSONRoom(self, gridEntityXMLType, gridEntityXMLVariant, x, y)
|
|
232
232
|
local room = game:GetRoom()
|
|
233
|
-
local gridEntityTuple = convertXMLGridEntityType(nil,
|
|
233
|
+
local gridEntityTuple = convertXMLGridEntityType(nil, gridEntityXMLType, gridEntityXMLVariant)
|
|
234
234
|
if gridEntityTuple == nil then
|
|
235
235
|
return nil
|
|
236
236
|
end
|
|
@@ -207,6 +207,8 @@ export declare function listGridAll(params: string): void;
|
|
|
207
207
|
export declare function lowHP(): void;
|
|
208
208
|
/** Alias for "debug 9". */
|
|
209
209
|
export declare function luck(): void;
|
|
210
|
+
/** Completely reveals the entire map, including the Ultra Secret Room. */
|
|
211
|
+
export declare function map(): void;
|
|
210
212
|
/**
|
|
211
213
|
* Gives a heart container. Provide a number to give a custom amount of heart containers. (You can
|
|
212
214
|
* use negative numbers to remove heart containers.)
|
|
@@ -10,6 +10,7 @@ local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
|
|
|
10
10
|
local Card = ____isaac_2Dtypescript_2Ddefinitions.Card
|
|
11
11
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
12
12
|
local Direction = ____isaac_2Dtypescript_2Ddefinitions.Direction
|
|
13
|
+
local DisplayFlag = ____isaac_2Dtypescript_2Ddefinitions.DisplayFlag
|
|
13
14
|
local GameStateFlag = ____isaac_2Dtypescript_2Ddefinitions.GameStateFlag
|
|
14
15
|
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
15
16
|
local PillColor = ____isaac_2Dtypescript_2Ddefinitions.PillColor
|
|
@@ -18,6 +19,7 @@ local ____cachedClasses = require("cachedClasses")
|
|
|
18
19
|
local game = ____cachedClasses.game
|
|
19
20
|
local sfxManager = ____cachedClasses.sfxManager
|
|
20
21
|
local ____constants = require("constants")
|
|
22
|
+
local MAX_LEVEL_GRID_INDEX = ____constants.MAX_LEVEL_GRID_INDEX
|
|
21
23
|
local MAX_ROOM_TYPE = ____constants.MAX_ROOM_TYPE
|
|
22
24
|
local MAX_STAGE = ____constants.MAX_STAGE
|
|
23
25
|
local MAX_VANILLA_CHARACTER = ____constants.MAX_VANILLA_CHARACTER
|
|
@@ -35,6 +37,8 @@ local getNPCs = ____entitySpecific.getNPCs
|
|
|
35
37
|
local ____enums = require("functions.enums")
|
|
36
38
|
local getEnumValues = ____enums.getEnumValues
|
|
37
39
|
local getLastEnumValue = ____enums.getLastEnumValue
|
|
40
|
+
local ____flag = require("functions.flag")
|
|
41
|
+
local addFlag = ____flag.addFlag
|
|
38
42
|
local ____log = require("functions.log")
|
|
39
43
|
local logEffects = ____log.logEffects
|
|
40
44
|
local logRoom = ____log.logRoom
|
|
@@ -64,6 +68,7 @@ local restart = ____run.restart
|
|
|
64
68
|
local ____trinkets = require("functions.trinkets")
|
|
65
69
|
local getGoldenTrinketType = ____trinkets.getGoldenTrinketType
|
|
66
70
|
local ____utils = require("functions.utils")
|
|
71
|
+
local irange = ____utils.irange
|
|
67
72
|
local printConsole = ____utils.printConsole
|
|
68
73
|
local printEnabled = ____utils.printEnabled
|
|
69
74
|
local ____cardMap = require("maps.cardMap")
|
|
@@ -513,6 +518,15 @@ end
|
|
|
513
518
|
function ____exports.luck(self)
|
|
514
519
|
Isaac.ExecuteCommand("debug 9")
|
|
515
520
|
end
|
|
521
|
+
function ____exports.map(self)
|
|
522
|
+
local level = game:GetLevel()
|
|
523
|
+
local displayFlags = addFlag(nil, DisplayFlag.VISIBLE, DisplayFlag.SHADOW, DisplayFlag.SHOW_ICON)
|
|
524
|
+
for ____, roomGridIndex in ipairs(irange(nil, MAX_LEVEL_GRID_INDEX)) do
|
|
525
|
+
local roomDesc = level:GetRoomByIdx(roomGridIndex)
|
|
526
|
+
roomDesc.DisplayFlags = displayFlags
|
|
527
|
+
end
|
|
528
|
+
level:UpdateVisibility()
|
|
529
|
+
end
|
|
516
530
|
function ____exports.maxHearts(self, params)
|
|
517
531
|
addHeart(nil, params, HealthType.MAX_HEARTS)
|
|
518
532
|
end
|
|
@@ -174,6 +174,7 @@ commandFunctionsMap:set("listgrid", commands.listGrid)
|
|
|
174
174
|
commandFunctionsMap:set("listgridall", commands.listGridAll)
|
|
175
175
|
commandFunctionsMap:set("lowhp", commands.lowHP)
|
|
176
176
|
commandFunctionsMap:set("luck", commands.luck)
|
|
177
|
+
commandFunctionsMap:set("map", commands.map)
|
|
177
178
|
commandFunctionsMap:set("maxhearts", commands.maxHearts)
|
|
178
179
|
commandFunctionsMap:set("mh", commands.mh)
|
|
179
180
|
commandFunctionsMap:set("miniboss", commands.miniboss)
|
|
@@ -8,4 +8,4 @@ import { CollectibleType } from "isaac-typescript-definitions";
|
|
|
8
8
|
* It is required to pass the intended collectible type to this function since it is possible for
|
|
9
9
|
* collectibles to rotate on the first frame that they are spawned.
|
|
10
10
|
*/
|
|
11
|
-
export declare function preventCollectibleRotate(collectible: EntityPickup, collectibleType: CollectibleType
|
|
11
|
+
export declare function preventCollectibleRotate(collectible: EntityPickup, collectibleType: CollectibleType): void;
|
|
@@ -7,7 +7,7 @@ import { FamiliarVariant } from "isaac-typescript-definitions";
|
|
|
7
7
|
* @param familiarSubType The sub-type to blacklist. Optional. The default is to blacklist all
|
|
8
8
|
* sub-types of the given variant.
|
|
9
9
|
*/
|
|
10
|
-
export declare function setFamiliarNoSirenSteal(familiarVariant: FamiliarVariant
|
|
10
|
+
export declare function setFamiliarNoSirenSteal(familiarVariant: FamiliarVariant, familiarSubType?: int): void;
|
|
11
11
|
/**
|
|
12
12
|
* Helper function to check if the Siren boss has stolen a familiar. Some familiars may need to
|
|
13
13
|
* behave differently when under The Siren's control (e.g. if they auto-target enemies).
|
package/dist/functions/boss.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { EntityTypeNonNPC } from "../types/EntityTypeNonNPC";
|
|
|
6
6
|
* This function will not include bosses on an internal blacklist, such as Death's scythes or Big
|
|
7
7
|
* Horn holes.
|
|
8
8
|
*/
|
|
9
|
-
export declare function getAliveBosses(matchingEntityType?: EntityType
|
|
9
|
+
export declare function getAliveBosses(matchingEntityType?: EntityType, matchingVariant?: int, matchingSubType?: int, ignoreFriendly?: boolean): EntityNPC[];
|
|
10
10
|
/**
|
|
11
11
|
* Helper function to get the set of every boss in the game.
|
|
12
12
|
*
|
|
@@ -25,7 +25,7 @@ export declare function getAllBossesSet(): Set<string>;
|
|
|
25
25
|
*/
|
|
26
26
|
export declare function getBossSet(stage: int, stageType: StageType): ReadonlySet<string> | undefined;
|
|
27
27
|
/** Helper function to get all of the bosses in the room. */
|
|
28
|
-
export declare function getBosses(matchingEntityType?: EntityType
|
|
28
|
+
export declare function getBosses(matchingEntityType?: EntityType, matchingVariant?: int, matchingSubType?: int, ignoreFriendly?: boolean): EntityNPC[];
|
|
29
29
|
/**
|
|
30
30
|
* Helper function to get the set of vanilla bosses for a particular stage across all of the stage
|
|
31
31
|
* types. For example, specifying a stage of 2 will return a set with all of the bosses for
|
|
@@ -54,4 +54,4 @@ export declare function spawnBoss<T extends number>(entityType: T extends Entity
|
|
|
54
54
|
*
|
|
55
55
|
* For more information, see the documentation for the `spawnBoss` function.
|
|
56
56
|
*/
|
|
57
|
-
export declare function spawnBossWithSeed(entityType:
|
|
57
|
+
export declare function spawnBossWithSeed<T extends number>(entityType: T extends EntityTypeNonNPC ? never : T, variant: int, subType: int, position: Vector, seed: Seed, velocity?: Readonly<Vector>, spawner?: Entity | undefined, numSegments?: int): EntityNPC;
|
|
@@ -9,7 +9,7 @@ import { Card, ItemConfigCardType } from "isaac-typescript-definitions";
|
|
|
9
9
|
* const cardDescription = getCardDescription(card); // cardDescription is "Where journey begins"
|
|
10
10
|
* ```
|
|
11
11
|
*/
|
|
12
|
-
export declare function getCardDescription(card: Card
|
|
12
|
+
export declare function getCardDescription(card: Card): string;
|
|
13
13
|
/**
|
|
14
14
|
* Helper function to get a card name from a Card.
|
|
15
15
|
*
|
|
@@ -20,8 +20,8 @@ export declare function getCardDescription(card: Card | int): string;
|
|
|
20
20
|
* const cardName = getCardName(card); // cardName is "0 - The Fool"
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
export declare function getCardName(card: Card
|
|
24
|
-
export declare function getCardType(card: Card
|
|
23
|
+
export declare function getCardName(card: Card): string;
|
|
24
|
+
export declare function getCardType(card: Card): ItemConfigCardType;
|
|
25
25
|
/**
|
|
26
26
|
* Helper function to get a set of cards matching the type. Also see the [[`CardType`]] enum.
|
|
27
27
|
*
|
|
@@ -5,44 +5,44 @@ import { PlayerType } from "isaac-typescript-definitions";
|
|
|
5
5
|
* though coin containers are not technically the same as red heart containers. Returns false for
|
|
6
6
|
* characters like Blue Baby. Returns false for The Lost and Tainted Lost.
|
|
7
7
|
*/
|
|
8
|
-
export declare function characterCanHaveRedHearts(character: PlayerType
|
|
8
|
+
export declare function characterCanHaveRedHearts(character: PlayerType): boolean;
|
|
9
9
|
/**
|
|
10
10
|
* Helper function to determine if the given character can have soul hearts. Returns true for
|
|
11
11
|
* characters like Isaac, Magdalene, or Cain. Returns false for characters like Bethany. Returns
|
|
12
12
|
* false for The Lost and Tainted Lost.
|
|
13
13
|
*/
|
|
14
|
-
export declare function characterCanHaveSoulHearts(character: PlayerType
|
|
14
|
+
export declare function characterCanHaveSoulHearts(character: PlayerType): boolean;
|
|
15
15
|
/**
|
|
16
16
|
* Helper function for determining whether the given character can take free Devil Deals. (e.g. The
|
|
17
17
|
* Lost, Tainted Lost, etc.)
|
|
18
18
|
*/
|
|
19
|
-
export declare function characterCanTakeFreeDevilDeals(character: PlayerType
|
|
19
|
+
export declare function characterCanTakeFreeDevilDeals(character: PlayerType): boolean;
|
|
20
20
|
/**
|
|
21
21
|
* Normally, characters get a red heart container upon reaching a new floor with an eternal heart,
|
|
22
22
|
* but some characters grant a black heart instead. Returns true for Dark Judas and Tainted Judas.
|
|
23
23
|
* Otherwise, returns false.
|
|
24
24
|
*/
|
|
25
|
-
export declare function characterGetsBlackHeartFromEternalHeart(character: PlayerType
|
|
25
|
+
export declare function characterGetsBlackHeartFromEternalHeart(character: PlayerType): boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Helper function to determine if the specified character starts with an active item.
|
|
28
28
|
*
|
|
29
29
|
* For the purposes of this function, the save file is considered to be fully unlocked (e.g. Isaac
|
|
30
30
|
* is considered to starts with the D6, but this is not the case on a brand new save file).
|
|
31
31
|
*/
|
|
32
|
-
export declare function characterStartsWithActiveItem(character: PlayerType
|
|
32
|
+
export declare function characterStartsWithActiveItem(character: PlayerType): boolean;
|
|
33
33
|
/**
|
|
34
34
|
* - Most characters have a 56 frame death animation (i.e. the "Death" animation).
|
|
35
35
|
* - The Lost and Tainted Lost have a 38 frame death animation (i.e. the "LostDeath" animation).
|
|
36
36
|
* - Tainted Forgotten have a 20 frame death animation (i.e. the "ForgottenDeath" animation).
|
|
37
37
|
*/
|
|
38
|
-
export declare function getCharacterDeathAnimationName(character: PlayerType
|
|
38
|
+
export declare function getCharacterDeathAnimationName(character: PlayerType): string;
|
|
39
39
|
/**
|
|
40
40
|
* Returns the maximum heart containers that the provided character can have. Normally, this is 12,
|
|
41
41
|
* but with Keeper it is 3, and with Tainted Keeper it is 2. This does not account for Birthright or
|
|
42
42
|
* Mother's Kiss; use the `getPlayerMaxHeartContainers` helper function for that.
|
|
43
43
|
*/
|
|
44
|
-
export declare function getCharacterMaxHeartContainers(character: PlayerType
|
|
44
|
+
export declare function getCharacterMaxHeartContainers(character: PlayerType): int;
|
|
45
45
|
/** Helper function to get the name of a character. Returns "unknown" for modded characters. */
|
|
46
|
-
export declare function getCharacterName(character: PlayerType
|
|
47
|
-
export declare function isModdedCharacter(character: PlayerType
|
|
48
|
-
export declare function isVanillaCharacter(character: PlayerType
|
|
46
|
+
export declare function getCharacterName(character: PlayerType): string;
|
|
47
|
+
export declare function isModdedCharacter(character: PlayerType): boolean;
|
|
48
|
+
export declare function isVanillaCharacter(character: PlayerType): boolean;
|
|
@@ -3,7 +3,7 @@ import { CacheFlag, CollectibleType } from "isaac-typescript-definitions";
|
|
|
3
3
|
* Returns a set containing every collectible type with the given cache flag, including modded
|
|
4
4
|
* collectibles.
|
|
5
5
|
*/
|
|
6
|
-
export declare function getCollectiblesForCacheFlag(cacheFlag: CacheFlag): Set<CollectibleType
|
|
6
|
+
export declare function getCollectiblesForCacheFlag(cacheFlag: CacheFlag): Set<CollectibleType>;
|
|
7
7
|
/**
|
|
8
8
|
* Returns an array containing every collectible type that the player has that matches the provided
|
|
9
9
|
* CacheFlag.
|
|
@@ -19,4 +19,4 @@ export declare function getCollectiblesForCacheFlag(cacheFlag: CacheFlag): Set<C
|
|
|
19
19
|
* ]
|
|
20
20
|
* ```
|
|
21
21
|
*/
|
|
22
|
-
export declare function getPlayerCollectiblesForCacheFlag(player: EntityPlayer, cacheFlag: CacheFlag):
|
|
22
|
+
export declare function getPlayerCollectiblesForCacheFlag(player: EntityPlayer, cacheFlag: CacheFlag): CollectibleType[];
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CollectibleType } from "isaac-typescript-definitions";
|
|
2
2
|
/** Returns a set containing every valid collectible type in the game, including modded items. */
|
|
3
|
-
export declare function getCollectibleSet(): Set<CollectibleType
|
|
3
|
+
export declare function getCollectibleSet(): Set<CollectibleType>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CollectibleType, ItemConfigTag } from "isaac-typescript-definitions";
|
|
2
|
-
export declare function collectibleHasTag(collectibleType: CollectibleType
|
|
2
|
+
export declare function collectibleHasTag(collectibleType: CollectibleType, tag: ItemConfigTag): boolean;
|
|
3
3
|
/**
|
|
4
4
|
* Helper function to get all of the collectible types in the game that have a certain tag.
|
|
5
5
|
*
|
|
@@ -10,7 +10,7 @@ export declare function collectibleHasTag(collectibleType: CollectibleType | int
|
|
|
10
10
|
* const offensiveCollectibleTypes = getCollectibleTypesWithTag(ItemConfigTag.OFFENSIVE);
|
|
11
11
|
* ```
|
|
12
12
|
*/
|
|
13
|
-
export declare function getCollectibleTypesWithTag(itemConfigTag: ItemConfigTag): Set<CollectibleType
|
|
13
|
+
export declare function getCollectibleTypesWithTag(itemConfigTag: ItemConfigTag): Set<CollectibleType>;
|
|
14
14
|
/** Returns the number of items that a player has towards a particular transformation. */
|
|
15
15
|
export declare function getPlayerNumCollectiblesWithTag(player: EntityPlayer, itemConfigTag: ItemConfigTag): int;
|
|
16
|
-
export declare function isQuestCollectible(collectibleType: CollectibleType
|
|
16
|
+
export declare function isQuestCollectible(collectibleType: CollectibleType): boolean;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { CacheFlag, CollectiblePedestalType, CollectibleType, ItemConfigTag, ItemType, PickupPrice } from "isaac-typescript-definitions";
|
|
2
2
|
import { CollectibleIndex } from "../types/CollectibleIndex";
|
|
3
3
|
export declare function clearCollectibleSprite(collectible: EntityPickup): void;
|
|
4
|
-
export declare function collectibleHasCacheFlag(collectibleType: CollectibleType
|
|
4
|
+
export declare function collectibleHasCacheFlag(collectibleType: CollectibleType, cacheFlag: CacheFlag): boolean;
|
|
5
5
|
/** Helper function to check if two collectible sprites have the same sprite sheet loaded. */
|
|
6
6
|
export declare function collectibleSpriteEquals(sprite1: Sprite, sprite2: Sprite): boolean;
|
|
7
7
|
/**
|
|
8
8
|
* Helper function to get the in-game description for a collectible. Returns "Unknown" if the
|
|
9
9
|
* provided collectible type was not valid.
|
|
10
10
|
*/
|
|
11
|
-
export declare function getCollectibleDescription(collectibleType: CollectibleType
|
|
11
|
+
export declare function getCollectibleDescription(collectibleType: CollectibleType): string;
|
|
12
12
|
/**
|
|
13
13
|
* Helper function to get the heart cost that a collectible item would be if it were being offered
|
|
14
14
|
* in a Devil Room deal. Returns 0 if passed CollectibleType.NULL.
|
|
15
15
|
*/
|
|
16
|
-
export declare function getCollectibleDevilHeartPrice(collectibleType: CollectibleType
|
|
16
|
+
export declare function getCollectibleDevilHeartPrice(collectibleType: CollectibleType, player: EntityPlayer): PickupPrice;
|
|
17
17
|
/**
|
|
18
18
|
* Helper function to get the path to a collectible's sprite. Returns the path to the question mark
|
|
19
19
|
* sprite (i.e. from Curse of the Blind) if the provided collectible type was not valid.
|
|
20
20
|
*/
|
|
21
|
-
export declare function getCollectibleGfxFilename(collectibleType: CollectibleType
|
|
21
|
+
export declare function getCollectibleGfxFilename(collectibleType: CollectibleType): string;
|
|
22
22
|
/**
|
|
23
23
|
* Mods often have to track variables relating to a collectible. Finding an index for these kinds of
|
|
24
24
|
* data structures is difficult, since collectibles are respawned every time a player re-enters a
|
|
@@ -61,17 +61,17 @@ export declare function getCollectibleIndex(collectible: EntityPickup): Collecti
|
|
|
61
61
|
* Helper function to get the initial amount of charges that a collectible has. Returns 0 if the
|
|
62
62
|
* provided collectible type was not valid.
|
|
63
63
|
*/
|
|
64
|
-
export declare function getCollectibleInitCharge(collectibleType: CollectibleType
|
|
64
|
+
export declare function getCollectibleInitCharge(collectibleType: CollectibleType): int;
|
|
65
65
|
/**
|
|
66
66
|
* Helper function to get the `ItemType` of a collectible. Returns `ItemType.ITEM_NULL` if the
|
|
67
67
|
* provided collectible type was not valid.
|
|
68
68
|
*/
|
|
69
|
-
export declare function getCollectibleItemType(collectibleType: CollectibleType
|
|
69
|
+
export declare function getCollectibleItemType(collectibleType: CollectibleType): ItemType;
|
|
70
70
|
/**
|
|
71
71
|
* Helper function to get the maximum amount of charges that a collectible has. Returns 0 if the
|
|
72
72
|
* provided collectible type was not valid.
|
|
73
73
|
*/
|
|
74
|
-
export declare function getCollectibleMaxCharges(collectibleType: CollectibleType
|
|
74
|
+
export declare function getCollectibleMaxCharges(collectibleType: CollectibleType): int;
|
|
75
75
|
/**
|
|
76
76
|
* Helper function to get the name of a collectible. Returns "Unknown" if the provided collectible
|
|
77
77
|
* type is not valid.
|
|
@@ -83,13 +83,13 @@ export declare function getCollectibleMaxCharges(collectibleType: CollectibleTyp
|
|
|
83
83
|
* const collectibleName = getCollectibleName(collectibleType); // collectibleName is "Sad Onion"
|
|
84
84
|
* ```
|
|
85
85
|
*/
|
|
86
|
-
export declare function getCollectibleName(collectibleType: CollectibleType
|
|
86
|
+
export declare function getCollectibleName(collectibleType: CollectibleType): string;
|
|
87
87
|
export declare function getCollectiblePedestalType(collectible: EntityPickup): CollectiblePedestalType;
|
|
88
88
|
/**
|
|
89
89
|
* Helper function to get the path to a collectible's quality. Returns 0 if the provided collectible
|
|
90
90
|
* type was not valid.
|
|
91
91
|
*/
|
|
92
|
-
export declare function getCollectibleQuality(collectibleType: CollectibleType
|
|
92
|
+
export declare function getCollectibleQuality(collectibleType: CollectibleType): int;
|
|
93
93
|
/**
|
|
94
94
|
* Helper function to get the tags of a collectible (which is the composition of zero or more
|
|
95
95
|
* `ItemConfigTag`). Returns 0 if the provided collectible type is not valid.
|
|
@@ -101,9 +101,9 @@ export declare function getCollectibleQuality(collectibleType: CollectibleType |
|
|
|
101
101
|
* const itemConfigTags = getCollectibleTags(collectibleType); // itemConfigTags is "18350080"
|
|
102
102
|
* ```
|
|
103
103
|
*/
|
|
104
|
-
export declare function getCollectibleTags(collectibleType: CollectibleType
|
|
104
|
+
export declare function getCollectibleTags(collectibleType: CollectibleType): BitFlags<ItemConfigTag>;
|
|
105
105
|
/** Returns true if the item type in the item config is equal to `ItemType.ITEM_ACTIVE`. */
|
|
106
|
-
export declare function isActiveCollectible(collectibleType: CollectibleType
|
|
106
|
+
export declare function isActiveCollectible(collectibleType: CollectibleType): boolean;
|
|
107
107
|
/** Returns true if the collectible has a red question mark sprite. */
|
|
108
108
|
export declare function isBlindCollectible(collectible: EntityPickup): boolean;
|
|
109
109
|
/**
|
|
@@ -116,13 +116,13 @@ export declare function isGlitchedCollectible(pickup: EntityPickup): boolean;
|
|
|
116
116
|
* Returns true if the item type in the item config is equal to `ItemType.ITEM_PASSIVE` or
|
|
117
117
|
* `ItemType.ITEM_FAMILIAR`.
|
|
118
118
|
*/
|
|
119
|
-
export declare function isPassiveCollectible(collectibleType: CollectibleType
|
|
119
|
+
export declare function isPassiveCollectible(collectibleType: CollectibleType): boolean;
|
|
120
120
|
/**
|
|
121
121
|
* Helper function to determine if a particular collectible will disappear from the player's
|
|
122
122
|
* inventory upon use. Note that this will not work will modded items, as there is no way to
|
|
123
123
|
* dynamically know if a modded item will disappear.
|
|
124
124
|
*/
|
|
125
|
-
export declare function isSingleUseCollectible(collectibleType: CollectibleType
|
|
125
|
+
export declare function isSingleUseCollectible(collectibleType: CollectibleType): boolean;
|
|
126
126
|
/**
|
|
127
127
|
* Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that it
|
|
128
128
|
* should remove an item.
|
|
@@ -130,7 +130,7 @@ export declare function isSingleUseCollectible(collectibleType: CollectibleType
|
|
|
130
130
|
* The "item tracker" in this function does not refer to the in-game item tracker, but rather to the
|
|
131
131
|
* Python program located at: https://github.com/Rchardon/RebirthItemTracker
|
|
132
132
|
*/
|
|
133
|
-
export declare function removeCollectibleFromItemTracker(collectibleType: CollectibleType
|
|
133
|
+
export declare function removeCollectibleFromItemTracker(collectibleType: CollectibleType): void;
|
|
134
134
|
/**
|
|
135
135
|
* Helper function to remove all pickup delay on a collectible. By default, collectibles have a 20
|
|
136
136
|
* frame delay before they can be picked up by a player.
|
|
@@ -166,7 +166,7 @@ export declare function setCollectibleSprite(collectible: EntityPickup, pngPath:
|
|
|
166
166
|
* Helper function to change the collectible on a pedestal. Simply updating the `SubType` property
|
|
167
167
|
* is not sufficient because the sprite will not change.
|
|
168
168
|
*/
|
|
169
|
-
export declare function setCollectibleSubType(collectible: EntityPickup, newCollectibleType: CollectibleType
|
|
169
|
+
export declare function setCollectibleSubType(collectible: EntityPickup, newCollectibleType: CollectibleType): void;
|
|
170
170
|
/**
|
|
171
171
|
* Helper function to put a message in the log.txt file to let the Rebirth Item Tracker know that
|
|
172
172
|
* the build has been rerolled.
|
|
@@ -3,6 +3,7 @@ local initQuestionMarkSprite, COLLECTIBLE_SPRITE_LAYER, COLLECTIBLE_SHADOW_LAYER
|
|
|
3
3
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
4
4
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
5
5
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
6
|
+
local ItemConfigTagZero = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigTagZero
|
|
6
7
|
local ItemType = ____isaac_2Dtypescript_2Ddefinitions.ItemType
|
|
7
8
|
local PickupPrice = ____isaac_2Dtypescript_2Ddefinitions.PickupPrice
|
|
8
9
|
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
@@ -178,7 +179,7 @@ function ____exports.getCollectibleQuality(self, collectibleType)
|
|
|
178
179
|
end
|
|
179
180
|
function ____exports.getCollectibleTags(self, collectibleType)
|
|
180
181
|
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
181
|
-
return itemConfigItem == nil and
|
|
182
|
+
return itemConfigItem == nil and ItemConfigTagZero or itemConfigItem.Tags
|
|
182
183
|
end
|
|
183
184
|
function ____exports.isActiveCollectible(self, collectibleType)
|
|
184
185
|
local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
|