isaacscript-common 16.1.1 → 16.1.3
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/index.d.ts +10 -3
- package/dist/isaacscript-common.lua +10 -7
- package/dist/src/classes/features/other/ModdedElementSets.d.ts.map +1 -1
- package/dist/src/classes/features/other/ModdedElementSets.lua +3 -3
- package/dist/src/functions/collectibles.d.ts +1 -1
- package/dist/src/functions/collectibles.lua +1 -1
- package/dist/src/functions/doors.d.ts.map +1 -1
- package/dist/src/functions/doors.lua +5 -0
- package/dist/src/functions/trinkets.d.ts +9 -2
- package/dist/src/functions/trinkets.d.ts.map +1 -1
- package/dist/src/functions/trinkets.lua +7 -2
- package/package.json +2 -2
- package/src/classes/features/other/ModdedElementSets.ts +7 -5
- package/src/functions/collectibles.ts +1 -1
- package/src/functions/doors.ts +7 -0
- package/src/functions/trinkets.ts +9 -2
package/dist/index.d.ts
CHANGED
|
@@ -6496,15 +6496,22 @@ export declare function getVanillaCardTypes(): CardType[];
|
|
|
6496
6496
|
*
|
|
6497
6497
|
* This function is only useful when building collectible type objects. For most purposes, you
|
|
6498
6498
|
* should use the `getVanillaCollectibleArray` or `getVanillaCollectibleSet` helper functions
|
|
6499
|
-
* instead.
|
|
6499
|
+
* instead (which are part of `ISCFeature.MODDED_ELEMENT_SETS`).
|
|
6500
6500
|
*/
|
|
6501
6501
|
export declare function getVanillaCollectibleTypeRange(): CollectibleType[];
|
|
6502
6502
|
|
|
6503
6503
|
/** Helper function to get an array with every vanilla pill effect. */
|
|
6504
6504
|
export declare function getVanillaPillEffects(): PillEffect[];
|
|
6505
6505
|
|
|
6506
|
-
/**
|
|
6507
|
-
|
|
6506
|
+
/**
|
|
6507
|
+
* Helper function to get an array that represents the range from the first trinket type to the last
|
|
6508
|
+
* vanilla trinket type. This will include integers that do not represent any valid trinket types.
|
|
6509
|
+
*
|
|
6510
|
+
* This function is only useful when building collectible type objects. For most purposes, you
|
|
6511
|
+
* should use the `getVanillaTrinketArray` or `getVanillaTrinketSet` helper functions instead (which
|
|
6512
|
+
* are part of `ISCFeature.MODDED_ELEMENT_SETS`).
|
|
6513
|
+
*/
|
|
6514
|
+
export declare function getVanillaTrinketTypeRange(): TrinketType[];
|
|
6508
6515
|
|
|
6509
6516
|
/**
|
|
6510
6517
|
* Get how many hearts are currently being shown on the hearts UI.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 16.1.
|
|
3
|
+
isaacscript-common 16.1.3
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -7127,8 +7127,6 @@ ____exports.TrinketType.ACE_SPADES = 45
|
|
|
7127
7127
|
____exports.TrinketType[____exports.TrinketType.ACE_SPADES] = "ACE_SPADES"
|
|
7128
7128
|
____exports.TrinketType.ISAACS_FORK = 46
|
|
7129
7129
|
____exports.TrinketType[____exports.TrinketType.ISAACS_FORK] = "ISAACS_FORK"
|
|
7130
|
-
____exports.TrinketType.POLAROID_OBSOLETE = 47
|
|
7131
|
-
____exports.TrinketType[____exports.TrinketType.POLAROID_OBSOLETE] = "POLAROID_OBSOLETE"
|
|
7132
7130
|
____exports.TrinketType.MISSING_PAGE = 48
|
|
7133
7131
|
____exports.TrinketType[____exports.TrinketType.MISSING_PAGE] = "MISSING_PAGE"
|
|
7134
7132
|
____exports.TrinketType.BLOODY_PENNY = 49
|
|
@@ -20057,6 +20055,7 @@ local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
|
20057
20055
|
local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
|
|
20058
20056
|
local DoorState = ____isaac_2Dtypescript_2Ddefinitions.DoorState
|
|
20059
20057
|
local DoorVariant = ____isaac_2Dtypescript_2Ddefinitions.DoorVariant
|
|
20058
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
20060
20059
|
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
20061
20060
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
20062
20061
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
@@ -20109,6 +20108,10 @@ function ____exports.getDoors(self, ...)
|
|
|
20109
20108
|
if door == nil then
|
|
20110
20109
|
goto __continue25
|
|
20111
20110
|
end
|
|
20111
|
+
local gridEntityType = door:GetType()
|
|
20112
|
+
if gridEntityType ~= GridEntityType.DOOR then
|
|
20113
|
+
goto __continue25
|
|
20114
|
+
end
|
|
20112
20115
|
if roomTypesSet.size == 0 or roomTypesSet:has(door.TargetRoomType) then
|
|
20113
20116
|
doors[#doors + 1] = door
|
|
20114
20117
|
end
|
|
@@ -27079,7 +27082,7 @@ function ____exports.getTrinketName(self, trinketType)
|
|
|
27079
27082
|
end
|
|
27080
27083
|
return DEFAULT_TRINKET_NAME
|
|
27081
27084
|
end
|
|
27082
|
-
function ____exports.
|
|
27085
|
+
function ____exports.getVanillaTrinketTypeRange(self)
|
|
27083
27086
|
return iRange(nil, FIRST_TRINKET_TYPE, LAST_VANILLA_TRINKET_TYPE)
|
|
27084
27087
|
end
|
|
27085
27088
|
function ____exports.hasOpenTrinketSlot(self, player)
|
|
@@ -32177,7 +32180,7 @@ local deleteSetsFromSet = ____set.deleteSetsFromSet
|
|
|
32177
32180
|
local getRandomSetElement = ____set.getRandomSetElement
|
|
32178
32181
|
local getSortedSetValues = ____set.getSortedSetValues
|
|
32179
32182
|
local ____trinkets = require("src.functions.trinkets")
|
|
32180
|
-
local
|
|
32183
|
+
local getVanillaTrinketTypeRange = ____trinkets.getVanillaTrinketTypeRange
|
|
32181
32184
|
local trinketHasCacheFlag = ____trinkets.trinketHasCacheFlag
|
|
32182
32185
|
local ____utils = require("src.functions.utils")
|
|
32183
32186
|
local ____repeat = ____utils["repeat"]
|
|
@@ -32268,8 +32271,8 @@ function ModdedElementSets.prototype.lazyInitVanillaTrinketTypes(self)
|
|
|
32268
32271
|
if #self.vanillaTrinketTypesArray > 0 then
|
|
32269
32272
|
return
|
|
32270
32273
|
end
|
|
32271
|
-
local
|
|
32272
|
-
for ____, trinketType in ipairs(
|
|
32274
|
+
local vanillaTrinketTypeRange = getVanillaTrinketTypeRange(nil)
|
|
32275
|
+
for ____, trinketType in ipairs(vanillaTrinketTypeRange) do
|
|
32273
32276
|
local itemConfigItem = itemConfig:GetTrinket(trinketType)
|
|
32274
32277
|
if itemConfigItem ~= nil then
|
|
32275
32278
|
local ____self_vanillaTrinketTypesArray_4 = self.vanillaTrinketTypesArray
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModdedElementSets.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/ModdedElementSets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,eAAe,EACf,aAAa,EACb,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AA2BtC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AA4BhD,qBAAa,iBAAkB,SAAQ,OAAO;IAC5C,OAAO,CAAC,wBAAwB,CAAyB;IACzD,OAAO,CAAC,sBAAsB,CAA8B;IAE5D,OAAO,CAAC,4BAA4B,CAAyB;IAC7D,OAAO,CAAC,0BAA0B,CAA8B;IAEhE,OAAO,CAAC,2BAA2B,CAAyB;IAC5D,OAAO,CAAC,yBAAyB,CAA8B;IAE/D,OAAO,CAAC,oBAAoB,CAAqB;IACjD,OAAO,CAAC,kBAAkB,CAA0B;IAEpD,OAAO,CAAC,wBAAwB,CAAqB;IACrD,OAAO,CAAC,sBAAsB,CAA0B;IAExD,OAAO,CAAC,uBAAuB,CAAqB;IACpD,OAAO,CAAC,qBAAqB,CAA0B;IAEvD,OAAO,CAAC,wBAAwB,CAG5B;IAEJ,OAAO,CAAC,8BAA8B,CAGlC;IAEJ,OAAO,CAAC,0BAA0B,CAA0C;IAE5E,OAAO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S,WAAW,EAAE;IAKvD;;;;;;;OAOG;IAEI,oBAAoB,IAAI,WAAW,CAAC,WAAW,CAAC;CAIxD"}
|
|
@@ -41,7 +41,7 @@ local deleteSetsFromSet = ____set.deleteSetsFromSet
|
|
|
41
41
|
local getRandomSetElement = ____set.getRandomSetElement
|
|
42
42
|
local getSortedSetValues = ____set.getSortedSetValues
|
|
43
43
|
local ____trinkets = require("src.functions.trinkets")
|
|
44
|
-
local
|
|
44
|
+
local getVanillaTrinketTypeRange = ____trinkets.getVanillaTrinketTypeRange
|
|
45
45
|
local trinketHasCacheFlag = ____trinkets.trinketHasCacheFlag
|
|
46
46
|
local ____utils = require("src.functions.utils")
|
|
47
47
|
local ____repeat = ____utils["repeat"]
|
|
@@ -132,8 +132,8 @@ function ModdedElementSets.prototype.lazyInitVanillaTrinketTypes(self)
|
|
|
132
132
|
if #self.vanillaTrinketTypesArray > 0 then
|
|
133
133
|
return
|
|
134
134
|
end
|
|
135
|
-
local
|
|
136
|
-
for ____, trinketType in ipairs(
|
|
135
|
+
local vanillaTrinketTypeRange = getVanillaTrinketTypeRange(nil)
|
|
136
|
+
for ____, trinketType in ipairs(vanillaTrinketTypeRange) do
|
|
137
137
|
local itemConfigItem = itemConfig:GetTrinket(trinketType)
|
|
138
138
|
if itemConfigItem ~= nil then
|
|
139
139
|
local ____self_vanillaTrinketTypesArray_4 = self.vanillaTrinketTypesArray
|
|
@@ -140,7 +140,7 @@ export declare function getCollectibleTags(collectibleType: CollectibleType): Bi
|
|
|
140
140
|
*
|
|
141
141
|
* This function is only useful when building collectible type objects. For most purposes, you
|
|
142
142
|
* should use the `getVanillaCollectibleArray` or `getVanillaCollectibleSet` helper functions
|
|
143
|
-
* instead.
|
|
143
|
+
* instead (which are part of `ISCFeature.MODDED_ELEMENT_SETS`).
|
|
144
144
|
*/
|
|
145
145
|
export declare function getVanillaCollectibleTypeRange(): CollectibleType[];
|
|
146
146
|
/** Returns true if the item type in the item config is equal to `ItemType.ITEM_ACTIVE`. */
|
|
@@ -357,7 +357,7 @@ end
|
|
|
357
357
|
--
|
|
358
358
|
-- This function is only useful when building collectible type objects. For most purposes, you
|
|
359
359
|
-- should use the `getVanillaCollectibleArray` or `getVanillaCollectibleSet` helper functions
|
|
360
|
-
-- instead.
|
|
360
|
+
-- instead (which are part of `ISCFeature.MODDED_ELEMENT_SETS`).
|
|
361
361
|
function ____exports.getVanillaCollectibleTypeRange(self)
|
|
362
362
|
return iRange(nil, FIRST_COLLECTIBLE_TYPE, LAST_VANILLA_COLLECTIBLE_TYPE)
|
|
363
363
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,
|
|
1
|
+
{"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EAKZ,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAmBtC,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAKxD;AAED,wBAAgB,sBAAsB,CAAC,YAAY,EAAE,YAAY,GAAG,QAAQ,CAG3E;AAED,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,QAAQ,CAAC,YAAY,CAAC,GACpC,QAAQ,EAAE,CAWZ;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAEjE;AAED,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,QAAQ,GAAG,YAAY,CAEvE;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EACL,QAAQ,EAAE,GACV,SAAS,QAAQ,EAAE,GACnB,GAAG,CAAC,QAAQ,CAAC,GACb,WAAW,CAAC,Q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;AACH,wBAAgB,YAAY,IAAI,IAAI,CAMnC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAKvD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,GAAG,CAK5D;AAED,+CAA+C;AAC/C,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAGrD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI,CAI5D"}
|
|
@@ -12,6 +12,7 @@ local DoorSlot = ____isaac_2Dtypescript_2Ddefinitions.DoorSlot
|
|
|
12
12
|
local DoorSlotFlag = ____isaac_2Dtypescript_2Ddefinitions.DoorSlotFlag
|
|
13
13
|
local DoorState = ____isaac_2Dtypescript_2Ddefinitions.DoorState
|
|
14
14
|
local DoorVariant = ____isaac_2Dtypescript_2Ddefinitions.DoorVariant
|
|
15
|
+
local GridEntityType = ____isaac_2Dtypescript_2Ddefinitions.GridEntityType
|
|
15
16
|
local GridRoom = ____isaac_2Dtypescript_2Ddefinitions.GridRoom
|
|
16
17
|
local RoomType = ____isaac_2Dtypescript_2Ddefinitions.RoomType
|
|
17
18
|
local ____cachedClasses = require("src.core.cachedClasses")
|
|
@@ -72,6 +73,10 @@ function ____exports.getDoors(self, ...)
|
|
|
72
73
|
if door == nil then
|
|
73
74
|
goto __continue25
|
|
74
75
|
end
|
|
76
|
+
local gridEntityType = door:GetType()
|
|
77
|
+
if gridEntityType ~= GridEntityType.DOOR then
|
|
78
|
+
goto __continue25
|
|
79
|
+
end
|
|
75
80
|
if roomTypesSet.size == 0 or roomTypesSet:has(door.TargetRoomType) then
|
|
76
81
|
doors[#doors + 1] = door
|
|
77
82
|
end
|
|
@@ -46,8 +46,15 @@ export declare function getTrinketGfxFilename(trinketType: TrinketType): string;
|
|
|
46
46
|
* This function works for both vanilla and modded trinkets.
|
|
47
47
|
*/
|
|
48
48
|
export declare function getTrinketName(trinketType: TrinketType): string;
|
|
49
|
-
/**
|
|
50
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Helper function to get an array that represents the range from the first trinket type to the last
|
|
51
|
+
* vanilla trinket type. This will include integers that do not represent any valid trinket types.
|
|
52
|
+
*
|
|
53
|
+
* This function is only useful when building collectible type objects. For most purposes, you
|
|
54
|
+
* should use the `getVanillaTrinketArray` or `getVanillaTrinketSet` helper functions instead (which
|
|
55
|
+
* are part of `ISCFeature.MODDED_ELEMENT_SETS`).
|
|
56
|
+
*/
|
|
57
|
+
export declare function getVanillaTrinketTypeRange(): TrinketType[];
|
|
51
58
|
/**
|
|
52
59
|
* Returns whether or not the player can hold an additional trinket, beyond what they are currently
|
|
53
60
|
* carrying. This takes into account items that modify the max number of trinkets, like Mom's Purse.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trinkets.d.ts","sourceRoot":"","sources":["../../../src/functions/trinkets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAGT,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAmCtC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,WAAW,GAAG,WAAW,CAE1E;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,GAAG,SAAS,CAkBxE;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CActE;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAOtE;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAc/D;AAED
|
|
1
|
+
{"version":3,"file":"trinkets.d.ts","sourceRoot":"","sources":["../../../src/functions/trinkets.ts"],"names":[],"mappings":"AAAA,OAAO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122
122
|
end
|
|
123
|
-
--- Helper function to get an array that represents
|
|
124
|
-
|
|
123
|
+
--- Helper function to get an array that represents the range from the first trinket type to the last
|
|
124
|
+
-- vanilla trinket type. This will include integers that do not represent any valid trinket types.
|
|
125
|
+
--
|
|
126
|
+
-- This function is only useful when building collectible type objects. For most purposes, you
|
|
127
|
+
-- should use the `getVanillaTrinketArray` or `getVanillaTrinketSet` helper functions instead (which
|
|
128
|
+
-- are part of `ISCFeature.MODDED_ELEMENT_SETS`).
|
|
129
|
+
function ____exports.getVanillaTrinketTypeRange(self)
|
|
125
130
|
return iRange(nil, FIRST_TRINKET_TYPE, LAST_VANILLA_TRINKET_TYPE)
|
|
126
131
|
end
|
|
127
132
|
--- Returns whether or not the player can hold an additional trinket, beyond what they are currently
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "16.1.
|
|
3
|
+
"version": "16.1.3",
|
|
4
4
|
"description": "Helper functions and features for IsaacScript mods.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"main": "dist/src/index",
|
|
23
23
|
"types": "dist/src/index.d.ts",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"isaac-typescript-definitions": "^9.5.
|
|
25
|
+
"isaac-typescript-definitions": "^9.5.2"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
getSortedSetValues,
|
|
28
28
|
} from "../../../functions/set";
|
|
29
29
|
import {
|
|
30
|
-
|
|
30
|
+
getVanillaTrinketTypeRange,
|
|
31
31
|
trinketHasCacheFlag,
|
|
32
32
|
} from "../../../functions/trinkets";
|
|
33
33
|
import { repeat } from "../../../functions/utils";
|
|
@@ -115,7 +115,8 @@ export class ModdedElementSets extends Feature {
|
|
|
115
115
|
|
|
116
116
|
const vanillaCollectibleTypeRange = getVanillaCollectibleTypeRange();
|
|
117
117
|
for (const collectibleType of vanillaCollectibleTypeRange) {
|
|
118
|
-
// Vanilla collectible types are not contiguous, so we must check every value.
|
|
118
|
+
// Vanilla collectible types are not contiguous, so we must check every value. (There are
|
|
119
|
+
// several gaps, e.g. 666.)
|
|
119
120
|
const itemConfigItem = itemConfig.GetCollectible(collectibleType);
|
|
120
121
|
if (itemConfigItem !== undefined) {
|
|
121
122
|
this.vanillaCollectibleTypesArray.push(collectibleType);
|
|
@@ -156,9 +157,10 @@ export class ModdedElementSets extends Feature {
|
|
|
156
157
|
return;
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
const
|
|
160
|
-
for (const trinketType of
|
|
161
|
-
// Vanilla trinket types are contiguous,
|
|
160
|
+
const vanillaTrinketTypeRange = getVanillaTrinketTypeRange();
|
|
161
|
+
for (const trinketType of vanillaTrinketTypeRange) {
|
|
162
|
+
// Vanilla trinket types are not contiguous, so we must check every value. (The only gap is 47
|
|
163
|
+
// for `POLAROID_OBSOLETE`.)
|
|
162
164
|
const itemConfigItem = itemConfig.GetTrinket(trinketType);
|
|
163
165
|
if (itemConfigItem !== undefined) {
|
|
164
166
|
this.vanillaTrinketTypesArray.push(trinketType);
|
|
@@ -412,7 +412,7 @@ export function getCollectibleTags(
|
|
|
412
412
|
*
|
|
413
413
|
* This function is only useful when building collectible type objects. For most purposes, you
|
|
414
414
|
* should use the `getVanillaCollectibleArray` or `getVanillaCollectibleSet` helper functions
|
|
415
|
-
* instead.
|
|
415
|
+
* instead (which are part of `ISCFeature.MODDED_ELEMENT_SETS`).
|
|
416
416
|
*/
|
|
417
417
|
export function getVanillaCollectibleTypeRange(): CollectibleType[] {
|
|
418
418
|
return iRange(FIRST_COLLECTIBLE_TYPE, LAST_VANILLA_COLLECTIBLE_TYPE);
|
package/src/functions/doors.ts
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
DoorSlotFlag,
|
|
5
5
|
DoorState,
|
|
6
6
|
DoorVariant,
|
|
7
|
+
GridEntityType,
|
|
7
8
|
GridRoom,
|
|
8
9
|
RoomShape,
|
|
9
10
|
RoomType,
|
|
@@ -194,6 +195,12 @@ export function getDoors(...roomTypes: RoomType[]): GridEntityDoor[] {
|
|
|
194
195
|
continue;
|
|
195
196
|
}
|
|
196
197
|
|
|
198
|
+
// In Repentance, sometimes doors won't be doors for some reason.
|
|
199
|
+
const gridEntityType = door.GetType();
|
|
200
|
+
if (gridEntityType !== GridEntityType.DOOR) {
|
|
201
|
+
continue;
|
|
202
|
+
}
|
|
203
|
+
|
|
197
204
|
if (roomTypesSet.size === 0 || roomTypesSet.has(door.TargetRoomType)) {
|
|
198
205
|
doors.push(door);
|
|
199
206
|
}
|
|
@@ -145,8 +145,15 @@ export function getTrinketName(trinketType: TrinketType): string {
|
|
|
145
145
|
return DEFAULT_TRINKET_NAME;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
-
/**
|
|
149
|
-
|
|
148
|
+
/**
|
|
149
|
+
* Helper function to get an array that represents the range from the first trinket type to the last
|
|
150
|
+
* vanilla trinket type. This will include integers that do not represent any valid trinket types.
|
|
151
|
+
*
|
|
152
|
+
* This function is only useful when building collectible type objects. For most purposes, you
|
|
153
|
+
* should use the `getVanillaTrinketArray` or `getVanillaTrinketSet` helper functions instead (which
|
|
154
|
+
* are part of `ISCFeature.MODDED_ELEMENT_SETS`).
|
|
155
|
+
*/
|
|
156
|
+
export function getVanillaTrinketTypeRange(): TrinketType[] {
|
|
150
157
|
return iRange(FIRST_TRINKET_TYPE, LAST_VANILLA_TRINKET_TYPE);
|
|
151
158
|
}
|
|
152
159
|
|