isaacscript-common 1.2.174 → 1.2.175
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/classes/null.d.ts +6 -7
- package/dist/classes/null.lua +5 -5
- package/dist/constants.d.ts +10 -10
- package/dist/constants.lua +3 -3
- package/dist/features/collectiblesSeen.d.ts +6 -0
- package/dist/features/collectiblesSeen.lua +43 -0
- package/dist/features/deployJSONRoom.lua +2 -1
- package/dist/features/extraConsoleCommands/commands.d.ts +11 -11
- package/dist/features/extraConsoleCommands/commands.lua +23 -22
- package/dist/features/extraConsoleCommands/init.lua +6 -6
- package/dist/features/playerInventory.d.ts +10 -2
- package/dist/features/playerInventory.lua +51 -15
- package/dist/features/saveDataManager/constants.d.ts +1 -1
- package/dist/features/saveDataManager/constants.lua +1 -1
- package/dist/features/saveDataManager/exports.d.ts +6 -6
- package/dist/features/saveDataManager/exports.lua +4 -4
- package/dist/features/saveDataManager/merge.lua +5 -3
- package/dist/featuresInitialized.d.ts +1 -1
- package/dist/featuresInitialized.lua +3 -3
- package/dist/functions/array.d.ts +39 -39
- package/dist/functions/array.lua +79 -79
- package/dist/functions/cards.d.ts +3 -3
- package/dist/functions/cards.lua +7 -7
- package/dist/functions/charge.d.ts +11 -11
- package/dist/functions/charge.lua +13 -13
- package/dist/functions/collectibles.d.ts +53 -15
- package/dist/functions/collectibles.lua +44 -21
- package/dist/functions/color.d.ts +2 -2
- package/dist/functions/color.lua +6 -6
- package/dist/functions/deepCopy.d.ts +0 -3
- package/dist/functions/deepCopy.lua +5 -22
- package/dist/functions/doors.d.ts +8 -8
- package/dist/functions/doors.lua +16 -16
- package/dist/functions/entity.d.ts +13 -14
- package/dist/functions/entity.lua +27 -34
- package/dist/functions/gridEntity.d.ts +1 -1
- package/dist/functions/gridEntity.lua +5 -5
- package/dist/functions/jsonHelpers.d.ts +7 -7
- package/dist/functions/jsonHelpers.lua +10 -11
- package/dist/functions/log.d.ts +21 -21
- package/dist/functions/log.lua +75 -74
- package/dist/functions/math.d.ts +1 -1
- package/dist/functions/math.lua +3 -3
- package/dist/functions/player.d.ts +6 -8
- package/dist/functions/player.lua +22 -29
- package/dist/functions/playerHealth.d.ts +1 -1
- package/dist/functions/playerHealth.lua +20 -20
- package/dist/functions/positionVelocity.d.ts +3 -0
- package/dist/functions/positionVelocity.lua +19 -5
- package/dist/functions/random.d.ts +7 -7
- package/dist/functions/revive.d.ts +5 -5
- package/dist/functions/revive.lua +8 -8
- package/dist/functions/roomData.d.ts +96 -0
- package/dist/functions/roomData.lua +57 -0
- package/dist/functions/rooms.d.ts +1 -96
- package/dist/functions/rooms.lua +30 -75
- package/dist/functions/set.d.ts +2 -2
- package/dist/functions/set.lua +7 -7
- package/dist/functions/trinketCacheFlag.d.ts +4 -4
- package/dist/functions/trinketCacheFlag.lua +3 -2
- package/dist/functions/trinketGive.d.ts +7 -7
- package/dist/functions/trinketGive.lua +27 -27
- package/dist/functions/trinkets.d.ts +2 -2
- package/dist/functions/trinkets.lua +6 -6
- package/dist/functions/ui.d.ts +13 -13
- package/dist/functions/ui.lua +28 -28
- package/dist/functions/utils.d.ts +6 -0
- package/dist/functions/utils.lua +7 -0
- package/dist/functions/vector.d.ts +2 -0
- package/dist/functions/vector.lua +13 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.lua +8 -0
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.d.ts +1 -1
- package/dist/maps/roomShapeToTopLeftWallGridIndexMap.lua +1 -1
- package/dist/types/CollectibleIndex.d.ts +15 -0
- package/dist/types/CollectibleIndex.lua +3 -0
- package/dist/upgradeMod.lua +3 -0
- package/package.json +2 -2
|
@@ -6,6 +6,33 @@ local ____player = require("functions.player")
|
|
|
6
6
|
local useActiveItemTemp = ____player.useActiveItemTemp
|
|
7
7
|
local ____utils = require("functions.utils")
|
|
8
8
|
local ____repeat = ____utils["repeat"]
|
|
9
|
+
function ____exports.giveTrinketsBack(self, player, trinketSituation)
|
|
10
|
+
if trinketSituation == nil then
|
|
11
|
+
return
|
|
12
|
+
end
|
|
13
|
+
local trinket1 = player:GetTrinket(0)
|
|
14
|
+
local trinket2 = player:GetTrinket(1)
|
|
15
|
+
if trinket1 ~= TrinketType.TRINKET_NULL then
|
|
16
|
+
player:TryRemoveTrinket(trinket1)
|
|
17
|
+
end
|
|
18
|
+
if trinket2 ~= TrinketType.TRINKET_NULL then
|
|
19
|
+
player:TryRemoveTrinket(trinket2)
|
|
20
|
+
end
|
|
21
|
+
____repeat(
|
|
22
|
+
nil,
|
|
23
|
+
trinketSituation.numSmeltedTrinkets,
|
|
24
|
+
function()
|
|
25
|
+
player:AddTrinket(trinketSituation.trinketTypeRemoved, false)
|
|
26
|
+
useActiveItemTemp(nil, player, CollectibleType.COLLECTIBLE_SMELTER)
|
|
27
|
+
end
|
|
28
|
+
)
|
|
29
|
+
if trinketSituation.trinket1 ~= TrinketType.TRINKET_NULL then
|
|
30
|
+
player:AddTrinket(trinketSituation.trinket1, false)
|
|
31
|
+
end
|
|
32
|
+
if trinketSituation.trinket2 ~= TrinketType.TRINKET_NULL then
|
|
33
|
+
player:AddTrinket(trinketSituation.trinket2, false)
|
|
34
|
+
end
|
|
35
|
+
end
|
|
9
36
|
function ____exports.temporarilyRemoveTrinket(self, player, trinketType)
|
|
10
37
|
if not player:HasTrinket(trinketType) then
|
|
11
38
|
return nil
|
|
@@ -42,31 +69,4 @@ function ____exports.temporarilyRemoveTrinkets(self, player)
|
|
|
42
69
|
end
|
|
43
70
|
return {trinketTypeRemoved = TrinketType.TRINKET_NULL, trinket1 = trinket1, trinket2 = trinket2, numSmeltedTrinkets = 0}
|
|
44
71
|
end
|
|
45
|
-
function ____exports.giveTrinketsBack(self, player, trinketSituation)
|
|
46
|
-
if trinketSituation == nil then
|
|
47
|
-
return
|
|
48
|
-
end
|
|
49
|
-
local trinket1 = player:GetTrinket(0)
|
|
50
|
-
local trinket2 = player:GetTrinket(1)
|
|
51
|
-
if trinket1 ~= TrinketType.TRINKET_NULL then
|
|
52
|
-
player:TryRemoveTrinket(trinket1)
|
|
53
|
-
end
|
|
54
|
-
if trinket2 ~= TrinketType.TRINKET_NULL then
|
|
55
|
-
player:TryRemoveTrinket(trinket2)
|
|
56
|
-
end
|
|
57
|
-
____repeat(
|
|
58
|
-
nil,
|
|
59
|
-
trinketSituation.numSmeltedTrinkets,
|
|
60
|
-
function()
|
|
61
|
-
player:AddTrinket(trinketSituation.trinketTypeRemoved, false)
|
|
62
|
-
useActiveItemTemp(nil, player, CollectibleType.COLLECTIBLE_SMELTER)
|
|
63
|
-
end
|
|
64
|
-
)
|
|
65
|
-
if trinketSituation.trinket1 ~= TrinketType.TRINKET_NULL then
|
|
66
|
-
player:AddTrinket(trinketSituation.trinket1, false)
|
|
67
|
-
end
|
|
68
|
-
if trinketSituation.trinket2 ~= TrinketType.TRINKET_NULL then
|
|
69
|
-
player:AddTrinket(trinketSituation.trinket2, false)
|
|
70
|
-
end
|
|
71
|
-
end
|
|
72
72
|
return ____exports
|
|
@@ -18,8 +18,6 @@ export declare function getMaxTrinketType(): int;
|
|
|
18
18
|
* ```
|
|
19
19
|
*/
|
|
20
20
|
export declare function getOpenTrinketSlot(player: EntityPlayer): int | undefined;
|
|
21
|
-
/** Helper function to get all of the trinket entities in the room. */
|
|
22
|
-
export declare function getTrinkets(matchingSubType?: number): EntityPickup[];
|
|
23
21
|
/**
|
|
24
22
|
* Helper function to get the in-game description for a trinket. Returns "Unknown" if the provided
|
|
25
23
|
* trinket type was not valid.
|
|
@@ -36,6 +34,8 @@ export declare function getTrinketDescription(trinketType: TrinketType | int): s
|
|
|
36
34
|
* ```
|
|
37
35
|
*/
|
|
38
36
|
export declare function getTrinketName(trinketType: TrinketType | int): string;
|
|
37
|
+
/** Helper function to get all of the trinket entities in the room. */
|
|
38
|
+
export declare function getTrinkets(matchingSubType?: number): EntityPickup[];
|
|
39
39
|
/**
|
|
40
40
|
* Returns whether or not the player can hold an additional trinket, beyond what they are currently
|
|
41
41
|
* carrying. This takes into account items that modify the max number of trinkets, like Mom's Purse.
|
|
@@ -42,12 +42,6 @@ function ____exports.getOpenTrinketSlot(self, player)
|
|
|
42
42
|
end
|
|
43
43
|
return error("The player has an unknown number of trinket slots: " .. tostring(maxTrinkets))
|
|
44
44
|
end
|
|
45
|
-
function ____exports.getTrinkets(self, matchingSubType)
|
|
46
|
-
if matchingSubType == nil then
|
|
47
|
-
matchingSubType = -1
|
|
48
|
-
end
|
|
49
|
-
return getPickups(nil, PickupVariant.PICKUP_TRINKET, matchingSubType)
|
|
50
|
-
end
|
|
51
45
|
function ____exports.getTrinketDescription(self, trinketType)
|
|
52
46
|
local trinketDescription = TRINKET_DESCRIPTION_MAP:get(trinketType)
|
|
53
47
|
if trinketDescription ~= nil then
|
|
@@ -70,6 +64,12 @@ function ____exports.getTrinketName(self, trinketType)
|
|
|
70
64
|
end
|
|
71
65
|
return DEFAULT_TRINKET_NAME
|
|
72
66
|
end
|
|
67
|
+
function ____exports.getTrinkets(self, matchingSubType)
|
|
68
|
+
if matchingSubType == nil then
|
|
69
|
+
matchingSubType = -1
|
|
70
|
+
end
|
|
71
|
+
return getPickups(nil, PickupVariant.PICKUP_TRINKET, matchingSubType)
|
|
72
|
+
end
|
|
73
73
|
function ____exports.hasOpenTrinketSlot(self, player)
|
|
74
74
|
local character = player:GetPlayerType()
|
|
75
75
|
if character == PlayerType.PLAYER_THESOUL_B then
|
package/dist/functions/ui.d.ts
CHANGED
|
@@ -1,15 +1,4 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
-
/**
|
|
3
|
-
* Helper function to get the width of the first player's hearts on the UI. This is useful for
|
|
4
|
-
* drawing UI elements to the right of where the player's hearts are. Make sure to use this in
|
|
5
|
-
* combination with the the `getHUDOffsetVector` helper function.
|
|
6
|
-
*/
|
|
7
|
-
export declare function getHeartsUIWidth(): int;
|
|
8
|
-
/**
|
|
9
|
-
* Returns how many hearts are in the heart UI row. If the player has more than 6 hearts, this
|
|
10
|
-
* function will return 6.
|
|
11
|
-
*/
|
|
12
|
-
export declare function getHeartRowLength(player: EntityPlayer): int;
|
|
13
2
|
/**
|
|
14
3
|
* In the options menu, players have the ability to set a HUD offset. However, mods do not have
|
|
15
4
|
* access to this value. To get around this, Mod Config Menu provides a separate HUD offset setting
|
|
@@ -21,11 +10,22 @@ export declare function getHeartRowLength(player: EntityPlayer): int;
|
|
|
21
10
|
* a HUD offset that should be added to the position of a UI element.
|
|
22
11
|
*/
|
|
23
12
|
export declare function getHUDOffsetVector(): Vector;
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
/**
|
|
14
|
+
* Returns how many hearts are in the heart UI row. If the player has more than 6 hearts, this
|
|
15
|
+
* function will return 6.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getHeartRowLength(player: EntityPlayer): int;
|
|
18
|
+
/**
|
|
19
|
+
* Helper function to get the width of the first player's hearts on the UI. This is useful for
|
|
20
|
+
* drawing UI elements to the right of where the player's hearts are. Make sure to use this in
|
|
21
|
+
* combination with the the `getHUDOffsetVector` helper function.
|
|
22
|
+
*/
|
|
23
|
+
export declare function getHeartsUIWidth(): int;
|
|
26
24
|
export declare function getScreenBottomLeftPos(): Vector;
|
|
27
25
|
export declare function getScreenBottomRightPos(): Vector;
|
|
28
26
|
export declare function getScreenCenterPos(): Vector;
|
|
27
|
+
export declare function getScreenTopLeftPos(): Vector;
|
|
28
|
+
export declare function getScreenTopRightPos(): Vector;
|
|
29
29
|
/**
|
|
30
30
|
* Get how many hearts are currently being shown on the hearts UI.
|
|
31
31
|
*
|
package/dist/functions/ui.lua
CHANGED
|
@@ -4,6 +4,27 @@ local ____cachedClasses = require("cachedClasses")
|
|
|
4
4
|
local game = ____cachedClasses.game
|
|
5
5
|
local ____constants = require("constants")
|
|
6
6
|
local UI_HEART_WIDTH = ____constants.UI_HEART_WIDTH
|
|
7
|
+
function ____exports.getScreenBottomRightPos(self)
|
|
8
|
+
local screenWidth = Isaac.GetScreenWidth()
|
|
9
|
+
local screenHeight = Isaac.GetScreenHeight()
|
|
10
|
+
return Vector(screenWidth, screenHeight)
|
|
11
|
+
end
|
|
12
|
+
function ____exports.getHUDOffsetVector(self)
|
|
13
|
+
local defaultVector = Vector.Zero
|
|
14
|
+
local hudOffset = math.floor(Options.HUDOffset * 10)
|
|
15
|
+
if hudOffset < 1 or hudOffset > 10 then
|
|
16
|
+
return defaultVector
|
|
17
|
+
end
|
|
18
|
+
local x = hudOffset * 2
|
|
19
|
+
local y = hudOffset
|
|
20
|
+
if y >= 4 then
|
|
21
|
+
y = y + 1
|
|
22
|
+
end
|
|
23
|
+
if y >= 9 then
|
|
24
|
+
y = y + 1
|
|
25
|
+
end
|
|
26
|
+
return Vector(x, y)
|
|
27
|
+
end
|
|
7
28
|
function ____exports.getHeartRowLength(self, player)
|
|
8
29
|
local maxHearts = player:GetMaxHearts()
|
|
9
30
|
local soulHearts = player:GetSoulHearts()
|
|
@@ -12,11 +33,6 @@ function ____exports.getHeartRowLength(self, player)
|
|
|
12
33
|
local heartRowLength = combinedHearts / 2
|
|
13
34
|
return math.min(heartRowLength, 6)
|
|
14
35
|
end
|
|
15
|
-
function ____exports.getScreenBottomRightPos(self)
|
|
16
|
-
local screenWidth = Isaac.GetScreenWidth()
|
|
17
|
-
local screenHeight = Isaac.GetScreenHeight()
|
|
18
|
-
return Vector(screenWidth, screenHeight)
|
|
19
|
-
end
|
|
20
36
|
function ____exports.getHeartsUIWidth(self)
|
|
21
37
|
local level = game:GetLevel()
|
|
22
38
|
local curses = level:GetCurses()
|
|
@@ -45,29 +61,6 @@ function ____exports.getHeartsUIWidth(self)
|
|
|
45
61
|
end
|
|
46
62
|
return width
|
|
47
63
|
end
|
|
48
|
-
function ____exports.getHUDOffsetVector(self)
|
|
49
|
-
local defaultVector = Vector.Zero
|
|
50
|
-
local hudOffset = math.floor(Options.HUDOffset * 10)
|
|
51
|
-
if hudOffset < 1 or hudOffset > 10 then
|
|
52
|
-
return defaultVector
|
|
53
|
-
end
|
|
54
|
-
local x = hudOffset * 2
|
|
55
|
-
local y = hudOffset
|
|
56
|
-
if y >= 4 then
|
|
57
|
-
y = y + 1
|
|
58
|
-
end
|
|
59
|
-
if y >= 9 then
|
|
60
|
-
y = y + 1
|
|
61
|
-
end
|
|
62
|
-
return Vector(x, y)
|
|
63
|
-
end
|
|
64
|
-
function ____exports.getScreenTopLeftPos(self)
|
|
65
|
-
return Vector.Zero
|
|
66
|
-
end
|
|
67
|
-
function ____exports.getScreenTopRightPos(self)
|
|
68
|
-
local bottomRight = ____exports.getScreenBottomRightPos(nil)
|
|
69
|
-
return Vector(bottomRight.X, 0)
|
|
70
|
-
end
|
|
71
64
|
function ____exports.getScreenBottomLeftPos(self)
|
|
72
65
|
local bottomRight = ____exports.getScreenBottomRightPos(nil)
|
|
73
66
|
return Vector(0, bottomRight.Y)
|
|
@@ -76,6 +69,13 @@ function ____exports.getScreenCenterPos(self)
|
|
|
76
69
|
local bottomRight = ____exports.getScreenBottomRightPos(nil)
|
|
77
70
|
return bottomRight / 2
|
|
78
71
|
end
|
|
72
|
+
function ____exports.getScreenTopLeftPos(self)
|
|
73
|
+
return Vector.Zero
|
|
74
|
+
end
|
|
75
|
+
function ____exports.getScreenTopRightPos(self)
|
|
76
|
+
local bottomRight = ____exports.getScreenBottomRightPos(nil)
|
|
77
|
+
return Vector(bottomRight.X, 0)
|
|
78
|
+
end
|
|
79
79
|
function ____exports.getVisibleHearts(self, player)
|
|
80
80
|
local effectiveMaxHearts = player:GetEffectiveMaxHearts()
|
|
81
81
|
local soulHearts = player:GetSoulHearts()
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="typescript-to-lua/language-extensions" />
|
|
1
2
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
3
|
/**
|
|
3
4
|
* Helper function to get type safety on a switch statement.
|
|
@@ -53,6 +54,11 @@ export declare const ensureAllCases: (obj: never) => never;
|
|
|
53
54
|
* `pairs` or `Object.values`.
|
|
54
55
|
*/
|
|
55
56
|
export declare function getEnumValues<T>(transpiledEnum: T): Array<T[keyof T]>;
|
|
57
|
+
/**
|
|
58
|
+
* Helper function to log what is happening in functions that recursively move through nested data
|
|
59
|
+
* structures.
|
|
60
|
+
*/
|
|
61
|
+
export declare function getTraversalDescription(key: AnyNotNil, traversalDescription: string): string;
|
|
56
62
|
/**
|
|
57
63
|
* Converts a hex string like "#33aa33" to a KColor object.
|
|
58
64
|
*
|
package/dist/functions/utils.lua
CHANGED
|
@@ -17,6 +17,13 @@ function ____exports.getEnumValues(self, transpiledEnum)
|
|
|
17
17
|
__TS__ArraySort(enumValues)
|
|
18
18
|
return enumValues
|
|
19
19
|
end
|
|
20
|
+
function ____exports.getTraversalDescription(self, key, traversalDescription)
|
|
21
|
+
if traversalDescription ~= "" then
|
|
22
|
+
traversalDescription = traversalDescription .. " --> "
|
|
23
|
+
end
|
|
24
|
+
traversalDescription = traversalDescription .. tostring(key)
|
|
25
|
+
return traversalDescription
|
|
26
|
+
end
|
|
20
27
|
function ____exports.hexToKColor(self, hexString, alpha)
|
|
21
28
|
hexString = __TS__StringReplace(hexString, "#", "")
|
|
22
29
|
if #hexString ~= HEX_STRING_LENGTH then
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
/// <reference types="typescript-to-lua/language-extensions" />
|
|
2
3
|
export declare function copyVector(vector: Vector): Vector;
|
|
4
|
+
export declare function deserializeVector(vectorTable: LuaTable): Vector;
|
|
3
5
|
export declare function directionToVector(direction: Direction): Vector;
|
|
4
6
|
/**
|
|
5
7
|
* Helper function to get a new vector of length 1. Using this is safer than using the `Vector.One`
|
|
@@ -5,6 +5,19 @@ local DIRECTION_TO_VECTOR = ____directionToVector.DIRECTION_TO_VECTOR
|
|
|
5
5
|
function ____exports.copyVector(self, vector)
|
|
6
6
|
return Vector(vector.X, vector.Y)
|
|
7
7
|
end
|
|
8
|
+
function ____exports.deserializeVector(self, vectorTable)
|
|
9
|
+
local xString = vectorTable.X
|
|
10
|
+
local x = tonumber(xString)
|
|
11
|
+
if x == nil then
|
|
12
|
+
error("Failed to read the X value of a serialized vector.")
|
|
13
|
+
end
|
|
14
|
+
local yString = vectorTable.Y
|
|
15
|
+
local y = tonumber(yString)
|
|
16
|
+
if y == nil then
|
|
17
|
+
error("Failed to read the Y value of a serialized vector.")
|
|
18
|
+
end
|
|
19
|
+
return Vector(x, y)
|
|
20
|
+
end
|
|
8
21
|
function ____exports.directionToVector(self, direction)
|
|
9
22
|
return DIRECTION_TO_VECTOR[direction]
|
|
10
23
|
end
|
package/dist/index.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export * from "./functions/pocketItems";
|
|
|
64
64
|
export * from "./functions/positionVelocity";
|
|
65
65
|
export * from "./functions/random";
|
|
66
66
|
export * from "./functions/revive";
|
|
67
|
+
export * from "./functions/roomData";
|
|
67
68
|
export * from "./functions/rooms";
|
|
68
69
|
export * from "./functions/run";
|
|
69
70
|
export * from "./functions/seeds";
|
|
@@ -90,6 +91,7 @@ export * from "./maps/roomTypeMap";
|
|
|
90
91
|
export * from "./objects/directionNames";
|
|
91
92
|
export * from "./types/AddCallbackParametersCustom";
|
|
92
93
|
export * from "./types/AnyEntity";
|
|
94
|
+
export * from "./types/CollectibleIndex";
|
|
93
95
|
export * from "./types/JSONDoor";
|
|
94
96
|
export * from "./types/JSONEntity";
|
|
95
97
|
export * from "./types/JSONRoom";
|
package/dist/index.lua
CHANGED
|
@@ -514,6 +514,14 @@ do
|
|
|
514
514
|
end
|
|
515
515
|
end
|
|
516
516
|
end
|
|
517
|
+
do
|
|
518
|
+
local ____export = require("functions.roomData")
|
|
519
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
520
|
+
if ____exportKey ~= "default" then
|
|
521
|
+
____exports[____exportKey] = ____exportValue
|
|
522
|
+
end
|
|
523
|
+
end
|
|
524
|
+
end
|
|
517
525
|
do
|
|
518
526
|
local ____export = require("functions.rooms")
|
|
519
527
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
|
+
export declare const DEFAULT_TOP_LEFT_WALL_GRID_INDEX = 0;
|
|
2
3
|
/**
|
|
3
4
|
* Only used for special room shapes where the top left wall grid index is not equal to
|
|
4
5
|
* `DEFAULT_TOP_LEFT_WALL_GRID_INDEX`.
|
|
5
6
|
*/
|
|
6
7
|
export declare const ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP: ReadonlyMap<RoomShape, int>;
|
|
7
|
-
export declare const DEFAULT_TOP_LEFT_WALL_GRID_INDEX = 0;
|
|
@@ -3,6 +3,7 @@ local ____lualib = require("lualib_bundle")
|
|
|
3
3
|
local Map = ____lualib.Map
|
|
4
4
|
local __TS__New = ____lualib.__TS__New
|
|
5
5
|
local ____exports = {}
|
|
6
|
+
____exports.DEFAULT_TOP_LEFT_WALL_GRID_INDEX = 0
|
|
6
7
|
____exports.ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP = __TS__New(Map, {
|
|
7
8
|
{RoomShape.ROOMSHAPE_IH, 30},
|
|
8
9
|
{RoomShape.ROOMSHAPE_IV, 4},
|
|
@@ -10,5 +11,4 @@ ____exports.ROOM_SHAPE_TO_TOP_LEFT_WALL_GRID_INDEX_MAP = __TS__New(Map, {
|
|
|
10
11
|
{RoomShape.ROOMSHAPE_IIH, 56},
|
|
11
12
|
{RoomShape.ROOMSHAPE_LTL, 13}
|
|
12
13
|
})
|
|
13
|
-
____exports.DEFAULT_TOP_LEFT_WALL_GRID_INDEX = 0
|
|
14
14
|
return ____exports
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CollectibleIndex is a specific type of string; see the documentation for the
|
|
3
|
+
* [[`getCollectibleIndex`]] function. Mods can signify that data structures handle collectibles by
|
|
4
|
+
* using this type.
|
|
5
|
+
*
|
|
6
|
+
* Example:
|
|
7
|
+
* ```
|
|
8
|
+
* const collectiblesNameMap = new Map<CollectibleIndex, string>();
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* This type is branded for extra type safety.
|
|
12
|
+
*/
|
|
13
|
+
export declare type CollectibleIndex = string & {
|
|
14
|
+
__collectibleIndexBrand: unknown;
|
|
15
|
+
};
|
package/dist/upgradeMod.lua
CHANGED
|
@@ -77,6 +77,8 @@ local ____roomClearChange = require("callbacks.roomClearChange")
|
|
|
77
77
|
local roomClearChangeCallbackInit = ____roomClearChange.roomClearChangeCallbackInit
|
|
78
78
|
local ____ModUpgraded = require("classes.ModUpgraded")
|
|
79
79
|
local ModUpgraded = ____ModUpgraded.ModUpgraded
|
|
80
|
+
local ____collectiblesSeen = require("features.collectiblesSeen")
|
|
81
|
+
local collectiblesSeenInit = ____collectiblesSeen.collectiblesSeenInit
|
|
80
82
|
local ____deployJSONRoom = require("features.deployJSONRoom")
|
|
81
83
|
local deployJSONRoomInit = ____deployJSONRoom.deployJSONRoomInit
|
|
82
84
|
local ____disableInputs = require("features.disableInputs")
|
|
@@ -155,6 +157,7 @@ function initFeatures(self, mod)
|
|
|
155
157
|
isPonyActiveInit(nil, mod)
|
|
156
158
|
playerInventoryInit(nil, mod)
|
|
157
159
|
taintedLazarusPlayersInit(nil, mod)
|
|
160
|
+
collectiblesSeenInit(nil, mod)
|
|
158
161
|
end
|
|
159
162
|
function ____exports.upgradeMod(self, modVanilla, verbose)
|
|
160
163
|
if verbose == nil then
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.175",
|
|
4
4
|
"description": "Helper functions for IsaacScript mods",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
],
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"isaac-typescript-definitions": "^1.0.371",
|
|
29
|
-
"isaacscript-lint": "^1.0.
|
|
29
|
+
"isaacscript-lint": "^1.0.93",
|
|
30
30
|
"isaacscript-tsconfig": "^1.1.8",
|
|
31
31
|
"typedoc": "^0.22.13",
|
|
32
32
|
"typescript": "4.6.2",
|