isaacscript-common 1.0.453 → 1.0.457
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/constants.d.ts
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
export declare const AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125;
|
|
7
7
|
/** Bombs explode when their frame count is equal to this value. */
|
|
8
8
|
export declare const BOMB_EXPLODE_FRAME = 45;
|
|
9
|
+
export declare const CHARACTERS_WITH_AN_ACTIVE_ITEM: Set<PlayerType>;
|
|
9
10
|
export declare const CHARACTERS_WITH_NO_RED_HEARTS: Set<PlayerType>;
|
|
11
|
+
export declare const DEFAULT_ITEM_POOL_TYPE = ItemPoolType.POOL_TREASURE;
|
|
10
12
|
/** This is also the distance that a player spawns from the door that they enter a room from. */
|
|
11
13
|
export declare const DISTANCE_OF_GRID_TILE = 40;
|
|
12
14
|
export declare const DOOR_HITBOX_DISTANCE = 11;
|
|
@@ -23,6 +25,7 @@ export declare const EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45;
|
|
|
23
25
|
*/
|
|
24
26
|
export declare const FIRST_GLITCHED_COLLECTIBLE_TYPE: number;
|
|
25
27
|
export declare const GENESIS_ROOM_VARIANT = 1000;
|
|
28
|
+
export declare const GENESIS_ROOM_SUBTYPE = 99;
|
|
26
29
|
export declare const GOLDEN_TRINKET_SHIFT: number;
|
|
27
30
|
/**
|
|
28
31
|
* This maps the GridEntityXMLType (i.e. the type contained in the room XML/STB file) to the
|
|
@@ -62,6 +65,7 @@ export declare const MAX_ROOM_INDEX = 168;
|
|
|
62
65
|
export declare const MAX_VANILLA_COLLECTIBLE_TYPE = CollectibleType.COLLECTIBLE_MOMS_RING;
|
|
63
66
|
export declare const MOVEMENT_ACTIONS: Set<ButtonAction>;
|
|
64
67
|
export declare const ONE_BY_ONE_ROOM_GRID_SIZE = 135;
|
|
68
|
+
export declare const ROOM_TYPE_TO_ITEM_POOL_TYPE_MAP: Map<RoomType, ItemPoolType>;
|
|
65
69
|
export declare const SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES: Set<CollectibleType>;
|
|
66
70
|
export declare const SHOOTING_ACTIONS: Set<ButtonAction>;
|
|
67
71
|
/**
|
package/dist/constants.lua
CHANGED
|
@@ -3,12 +3,15 @@ require("lualib_bundle");
|
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
____exports.AZAZEL_DEFAULT_BRIMSTONE_DISTANCE = 75.125
|
|
5
5
|
____exports.BOMB_EXPLODE_FRAME = 45
|
|
6
|
+
____exports.CHARACTERS_WITH_AN_ACTIVE_ITEM = __TS__New(Set, {PlayerType.PLAYER_ISAAC, PlayerType.PLAYER_MAGDALENE, PlayerType.PLAYER_JUDAS, PlayerType.PLAYER_BLUEBABY, PlayerType.PLAYER_EVE, PlayerType.PLAYER_EDEN, PlayerType.PLAYER_THELOST, PlayerType.PLAYER_LILITH, PlayerType.PLAYER_KEEPER, PlayerType.PLAYER_APOLLYON, PlayerType.PLAYER_EDEN_B})
|
|
6
7
|
____exports.CHARACTERS_WITH_NO_RED_HEARTS = __TS__New(Set, {PlayerType.PLAYER_BLUEBABY, PlayerType.PLAYER_BLACKJUDAS, PlayerType.PLAYER_JUDAS_B, PlayerType.PLAYER_BLUEBABY_B, PlayerType.PLAYER_THEFORGOTTEN_B, PlayerType.PLAYER_BETHANY_B})
|
|
8
|
+
____exports.DEFAULT_ITEM_POOL_TYPE = ItemPoolType.POOL_TREASURE
|
|
7
9
|
____exports.DISTANCE_OF_GRID_TILE = 40
|
|
8
10
|
____exports.DOOR_HITBOX_DISTANCE = 11
|
|
9
11
|
____exports.EGGY_STATE_FRAME_OF_FINAL_SPIDER = 45
|
|
10
12
|
____exports.FIRST_GLITCHED_COLLECTIBLE_TYPE = (1 << 32) - 1
|
|
11
13
|
____exports.GENESIS_ROOM_VARIANT = 1000
|
|
14
|
+
____exports.GENESIS_ROOM_SUBTYPE = 99
|
|
12
15
|
____exports.GOLDEN_TRINKET_SHIFT = 1 << 15
|
|
13
16
|
____exports.GRID_ENTITY_XML_MAP = __TS__New(Map, {{1000, {GridEntityType.GRID_ROCK, 0}}, {1001, {GridEntityType.GRID_ROCK_BOMB, 0}}, {1002, {GridEntityType.GRID_ROCK_ALT, 0}}, {1003, {GridEntityType.GRID_ROCKT, 0}}, {1008, {GridEntityType.GRID_ROCK_ALT2, 0}}, {1009, {GridEntityType.GRID_ROCK_ALT2, 1}}, {1010, {GridEntityType.GRID_ROCK_SPIKED, 0}}, {1011, {GridEntityType.GRID_ROCK_GOLD, 0}}, {1300, {GridEntityType.GRID_TNT, 0}}, {1490, {GridEntityType.GRID_POOP, 1}}, {1494, {GridEntityType.GRID_POOP, 4}}, {1495, {GridEntityType.GRID_POOP, 2}}, {1496, {GridEntityType.GRID_POOP, 3}}, {1497, {GridEntityType.GRID_POOP, 5}}, {1498, {GridEntityType.GRID_POOP, 6}}, {1500, {GridEntityType.GRID_POOP, 0}}, {1501, {GridEntityType.GRID_POOP, 11}}, {1900, {GridEntityType.GRID_ROCKB, 0}}, {1901, {GridEntityType.GRID_PILLAR, 0}}, {1930, {GridEntityType.GRID_SPIKES, 0}}, {1931, {GridEntityType.GRID_SPIKES_ONOFF, 0}}, {1940, {GridEntityType.GRID_SPIDERWEB, 0}}, {1999, {GridEntityType.GRID_WALL, 0}}, {3000, {GridEntityType.GRID_PIT, 0}}, {3001, {GridEntityType.GRID_PIT, 16}}, {3009, {GridEntityType.GRID_PIT, 0}}, {4000, {GridEntityType.GRID_LOCK, 0}}, {4500, {GridEntityType.GRID_PRESSURE_PLATE, 0}}, {5000, {GridEntityType.GRID_STATUE, 0}}, {5001, {GridEntityType.GRID_STATUE, 1}}, {6100, {GridEntityType.GRID_TELEPORTER, 0}}, {9000, {GridEntityType.GRID_TRAPDOOR, 0}}, {9100, {GridEntityType.GRID_STAIRS, 0}}, {10000, {GridEntityType.GRID_GRAVITY, 0}}})
|
|
14
17
|
____exports.GRID_INDEX_CENTER_OF_1X1_ROOM = 67
|
|
@@ -25,6 +28,7 @@ ____exports.MAX_ROOM_INDEX = 168
|
|
|
25
28
|
____exports.MAX_VANILLA_COLLECTIBLE_TYPE = CollectibleType.COLLECTIBLE_MOMS_RING
|
|
26
29
|
____exports.MOVEMENT_ACTIONS = __TS__New(Set, {ButtonAction.ACTION_LEFT, ButtonAction.ACTION_RIGHT, ButtonAction.ACTION_UP, ButtonAction.ACTION_DOWN})
|
|
27
30
|
____exports.ONE_BY_ONE_ROOM_GRID_SIZE = 135
|
|
31
|
+
____exports.ROOM_TYPE_TO_ITEM_POOL_TYPE_MAP = __TS__New(Map, {{RoomType.ROOM_SHOP, ItemPoolType.POOL_SHOP}, {RoomType.ROOM_TREASURE, ItemPoolType.POOL_TREASURE}, {RoomType.ROOM_BOSS, ItemPoolType.POOL_BOSS}, {RoomType.ROOM_SECRET, ItemPoolType.POOL_SECRET}, {RoomType.ROOM_CURSE, ItemPoolType.POOL_CURSE}, {RoomType.ROOM_CHALLENGE, ItemPoolType.POOL_BOSS}, {RoomType.ROOM_LIBRARY, ItemPoolType.POOL_LIBRARY}, {RoomType.ROOM_DEVIL, ItemPoolType.POOL_DEVIL}, {RoomType.ROOM_ANGEL, ItemPoolType.POOL_ANGEL}, {RoomType.ROOM_CHEST, ItemPoolType.POOL_GOLDEN_CHEST}, {RoomType.ROOM_BLACK_MARKET, ItemPoolType.POOL_SHOP}, {RoomType.ROOM_PLANETARIUM, ItemPoolType.POOL_PLANETARIUM}, {RoomType.ROOM_ULTRASECRET, ItemPoolType.POOL_ULTRA_SECRET}})
|
|
28
32
|
____exports.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES = __TS__New(Set, {CollectibleType.COLLECTIBLE_FORGET_ME_NOW, CollectibleType.COLLECTIBLE_EDENS_SOUL, CollectibleType.COLLECTIBLE_ALABASTER_BOX, CollectibleType.COLLECTIBLE_PLAN_C, CollectibleType.COLLECTIBLE_MAMA_MEGA, CollectibleType.COLLECTIBLE_SACRIFICIAL_ALTAR, CollectibleType.COLLECTIBLE_DEATH_CERTIFICATE, CollectibleType.COLLECTIBLE_R_KEY})
|
|
29
33
|
____exports.SHOOTING_ACTIONS = __TS__New(Set, {ButtonAction.ACTION_SHOOTLEFT, ButtonAction.ACTION_SHOOTRIGHT, ButtonAction.ACTION_SHOOTUP, ButtonAction.ACTION_SHOOTDOWN})
|
|
30
34
|
____exports.UI_HEART_WIDTH = 12
|
|
@@ -36,7 +36,7 @@ export declare function isGlitchedCollectible(entity: Entity): boolean;
|
|
|
36
36
|
* Returns true if the item type in the item config is equal to `ItemType.ITEM_PASSIVE` or
|
|
37
37
|
* `ItemType.ITEM_FAMILIAR`.
|
|
38
38
|
*/
|
|
39
|
-
export declare function isPassiveCollectible(collectibleType: CollectibleType | int):
|
|
39
|
+
export declare function isPassiveCollectible(collectibleType: CollectibleType | int): boolean;
|
|
40
40
|
export declare function isQuestCollectible(collectibleType: CollectibleType | int): boolean;
|
|
41
41
|
export declare function removeAllCollectibles(): void;
|
|
42
42
|
/**
|
|
@@ -118,7 +118,7 @@ function ____exports.isGlitchedCollectible(self, entity)
|
|
|
118
118
|
end
|
|
119
119
|
function ____exports.isPassiveCollectible(self, collectibleType)
|
|
120
120
|
local itemType = ____exports.getCollectibleItemType(nil, collectibleType)
|
|
121
|
-
return (itemType == ItemType.ITEM_PASSIVE) or ItemType.ITEM_FAMILIAR
|
|
121
|
+
return (itemType == ItemType.ITEM_PASSIVE) or (itemType == ItemType.ITEM_FAMILIAR)
|
|
122
122
|
end
|
|
123
123
|
function ____exports.isQuestCollectible(self, collectibleType)
|
|
124
124
|
return ____exports.collectibleHasTag(nil, collectibleType, 32768)
|
package/dist/functions/log.d.ts
CHANGED
|
@@ -38,6 +38,7 @@ export declare function logKColor(this: void, kColor: KColor): void;
|
|
|
38
38
|
export declare function logMap(this: void, map: Map<AnyNotNil, unknown>): void;
|
|
39
39
|
export declare function logTable(this: void, table: unknown): void;
|
|
40
40
|
export declare function logSet(this: void, set: Set<AnyNotNil>): void;
|
|
41
|
+
export declare function logVector(this: void, vector: Vector): void;
|
|
41
42
|
/**
|
|
42
43
|
* Converts every `isaacscript-common` function that begins with "log" to a global function.
|
|
43
44
|
* This is useful for printing out variables from the in-game debug console.
|
package/dist/functions/log.lua
CHANGED
|
@@ -128,6 +128,11 @@ function ____exports.logSet(set)
|
|
|
128
128
|
"The size of the set was: " .. tostring(set.size)
|
|
129
129
|
)
|
|
130
130
|
end
|
|
131
|
+
function ____exports.logVector(vector)
|
|
132
|
+
____exports.log(
|
|
133
|
+
((("Vector: (" .. tostring(vector.X)) .. ", ") .. tostring(vector.Y)) .. ")"
|
|
134
|
+
)
|
|
135
|
+
end
|
|
131
136
|
function ____exports.setLogFunctionsGlobal(self)
|
|
132
137
|
local globals = _G
|
|
133
138
|
globals.log = ____exports.log
|
|
@@ -144,6 +149,7 @@ function ____exports.setLogFunctionsGlobal(self)
|
|
|
144
149
|
globals.logMap = ____exports.logMap
|
|
145
150
|
globals.logTable = ____exports.logTable
|
|
146
151
|
globals.logSet = ____exports.logSet
|
|
152
|
+
globals.logVector = ____exports.logVector
|
|
147
153
|
end
|
|
148
154
|
function ____exports.traceback(self)
|
|
149
155
|
if debug ~= nil then
|