isaacscript-common 16.1.7 → 17.0.1
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 +191 -50
- package/dist/isaacscript-common.lua +528 -521
- package/dist/src/classes/ModUpgradedBase.d.ts +3 -1
- package/dist/src/classes/ModUpgradedBase.d.ts.map +1 -1
- package/dist/src/classes/ModUpgradedBase.lua +16 -8
- package/dist/src/classes/features/other/ModdedElementSets.d.ts +172 -5
- package/dist/src/classes/features/other/ModdedElementSets.d.ts.map +1 -1
- package/dist/src/classes/features/other/ModdedElementSets.lua +161 -5
- package/dist/src/classes/features/other/Pause.d.ts +1 -0
- package/dist/src/classes/features/other/Pause.d.ts.map +1 -1
- package/dist/src/classes/features/other/Pause.lua +5 -1
- package/dist/src/classes/features/other/PersistentEntities.d.ts +0 -1
- package/dist/src/classes/features/other/PersistentEntities.d.ts.map +1 -1
- package/dist/src/classes/features/other/PersistentEntities.lua +11 -13
- package/dist/src/core/constants.d.ts +3 -1
- package/dist/src/core/constants.d.ts.map +1 -1
- package/dist/src/core/constants.lua +6 -0
- package/dist/src/core/upgradeMod.d.ts.map +1 -1
- package/dist/src/core/upgradeMod.lua +7 -0
- package/dist/src/functions/cards.d.ts +7 -34
- package/dist/src/functions/cards.d.ts.map +1 -1
- package/dist/src/functions/cards.lua +20 -119
- package/dist/src/functions/globals.d.ts.map +1 -1
- package/dist/src/functions/globals.lua +0 -1
- package/dist/src/functions/positionVelocity.d.ts.map +1 -1
- package/dist/src/functions/positionVelocity.lua +5 -5
- package/package.json +2 -2
- package/src/classes/ModUpgradedBase.ts +24 -9
- package/src/classes/features/other/ModdedElementSets.ts +346 -5
- package/src/classes/features/other/Pause.ts +5 -0
- package/src/classes/features/other/PersistentEntities.ts +8 -9
- package/src/core/constants.ts +9 -0
- package/src/core/upgradeMod.ts +10 -0
- package/src/functions/cards.ts +20 -139
- package/src/functions/globals.ts +0 -1
- package/src/functions/positionVelocity.ts +1 -7
- package/dist/src/objects/cardTypeToItemConfigCardType.d.ts +0 -6
- package/dist/src/objects/cardTypeToItemConfigCardType.d.ts.map +0 -1
- package/dist/src/objects/cardTypeToItemConfigCardType.lua +0 -106
- package/src/objects/cardTypeToItemConfigCardType.ts +0 -106
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ModCallback } from "isaac-typescript-definitions";
|
|
2
|
+
import { CallbackPriority } from "isaac-typescript-definitions/dist/src/enums/CallbackPriority";
|
|
2
3
|
import { ModCallbackCustom } from "../enums/ModCallbackCustom";
|
|
3
4
|
import { AddCallbackParametersCustom } from "../interfaces/private/AddCallbackParametersCustom";
|
|
4
5
|
/**
|
|
@@ -25,7 +26,8 @@ export declare class ModUpgradedBase implements Mod {
|
|
|
25
26
|
* `ModCallback.POST_UPDATE` event corresponds to being executed once at the end of every game
|
|
26
27
|
* logic frame.
|
|
27
28
|
*/
|
|
28
|
-
AddCallback<T extends ModCallback>(modCallback: T, ...args: AddCallbackParameters[T]): void;
|
|
29
|
+
AddCallback<T extends ModCallback | string>(modCallback: T, ...args: T extends ModCallback ? AddCallbackParameters[T] : unknown[]): void;
|
|
30
|
+
AddPriorityCallback<T extends ModCallback | string>(modCallback: T, priority: CallbackPriority | int, ...args: T extends ModCallback ? AddCallbackParameters[T] : unknown[]): void;
|
|
29
31
|
/** Returns whether or not a corresponding "save#.dat" file exists for the current mod. */
|
|
30
32
|
HasData(): boolean;
|
|
31
33
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModUpgradedBase.d.ts","sourceRoot":"","sources":["../../../src/classes/ModUpgradedBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"ModUpgradedBase.d.ts","sourceRoot":"","sources":["../../../src/classes/ModUpgradedBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D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AAI;IAQnC;;;;OAIG;IACI,iBAAiB,CAAC,CAAC,SAAS,iBAAiB,EAClD,iBAAiB,EAAE,CAAC,EACpB,GAAG,IAAI,EAAE,2BAA2B,CAAC,CAAC,CAAC,GACtC,IAAI;IAOP;;;;;OAKG;IACI,oBAAoB,CAAC,CAAC,SAAS,iBAAiB,EACrD,iBAAiB,EAAE,CAAC,EACpB,QAAQ,EAAE,2BAA2B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAC1C,IAAI;IAOP;;;OAGG;IACI,eAAe,IAAI,IAAI;IA0C9B;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAqDnB;;;;OAIG;IACH,OAAO,CAAC,aAAa;IAwDrB;;;;OAIG;IACH,OAAO,CAAC,mBAAmB;IAO3B;;;OAGG;IACH,OAAO,CAAC,uBAAuB;CAIhC"}
|
|
@@ -9,6 +9,8 @@ local ____exports = {}
|
|
|
9
9
|
local getExportedMethodsFromFeature
|
|
10
10
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
11
11
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
12
|
+
local ____CallbackPriority = require("isaac-typescript-definitions/dist/src/enums/CallbackPriority")
|
|
13
|
+
local CallbackPriority = ____CallbackPriority.CallbackPriority
|
|
12
14
|
local ____callbacks = require("src.callbacks")
|
|
13
15
|
local getCallbacks = ____callbacks.getCallbacks
|
|
14
16
|
local ____decorators = require("src.decorators")
|
|
@@ -67,12 +69,16 @@ function ModUpgradedBase.prototype.____constructor(self, mod, ____debug, timeThr
|
|
|
67
69
|
self.features = getFeatures(nil, self, self.callbacks)
|
|
68
70
|
end
|
|
69
71
|
function ModUpgradedBase.prototype.AddCallback(self, modCallback, ...)
|
|
72
|
+
self:AddPriorityCallback(modCallback, CallbackPriority.DEFAULT, ...)
|
|
73
|
+
end
|
|
74
|
+
function ModUpgradedBase.prototype.AddPriorityCallback(self, modCallback, priority, ...)
|
|
70
75
|
local args = {...}
|
|
71
76
|
if self.debug then
|
|
72
77
|
local callback = args[1]
|
|
73
78
|
local optionalArg = args[2]
|
|
74
79
|
local parentFunctionDescription = getParentFunctionDescription(nil)
|
|
75
|
-
local
|
|
80
|
+
local customCallback = type(modCallback) == "string"
|
|
81
|
+
local callbackName = customCallback and tostring(modCallback) .. " (custom callback)" or "ModCallback." .. ModCallback[modCallback]
|
|
76
82
|
local signature = parentFunctionDescription == nil and callbackName or (parentFunctionDescription .. " - ") .. callbackName
|
|
77
83
|
--- We don't use the "log" helper function here since it will always show the same "unknown"
|
|
78
84
|
-- prefix.
|
|
@@ -90,13 +96,15 @@ function ModUpgradedBase.prototype.AddCallback(self, modCallback, ...)
|
|
|
90
96
|
return returnValue
|
|
91
97
|
end
|
|
92
98
|
local newArgs = {callbackWithLogger, optionalArg}
|
|
93
|
-
self.mod:
|
|
99
|
+
self.mod:AddPriorityCallback(
|
|
94
100
|
modCallback,
|
|
95
|
-
|
|
101
|
+
priority,
|
|
102
|
+
table.unpack(newArgs)
|
|
96
103
|
)
|
|
97
104
|
else
|
|
98
|
-
self.mod:
|
|
105
|
+
self.mod:AddPriorityCallback(
|
|
99
106
|
modCallback,
|
|
107
|
+
priority,
|
|
100
108
|
__TS__Spread(args)
|
|
101
109
|
)
|
|
102
110
|
end
|
|
@@ -132,7 +140,7 @@ function ModUpgradedBase.prototype.logUsedFeatures(self)
|
|
|
132
140
|
local callbackClass = ____value[2]
|
|
133
141
|
do
|
|
134
142
|
if callbackClass.numConsumers == 0 then
|
|
135
|
-
goto
|
|
143
|
+
goto __continue18
|
|
136
144
|
end
|
|
137
145
|
local modCallbackCustom = tonumber(modCallbackCustomString)
|
|
138
146
|
if modCallbackCustom == nil then
|
|
@@ -143,14 +151,14 @@ function ModUpgradedBase.prototype.logUsedFeatures(self)
|
|
|
143
151
|
((("- ModCallbackCustom." .. tostring(ModCallbackCustom[modCallbackCustom])) .. " (") .. tostring(modCallbackCustom)) .. ")"
|
|
144
152
|
)
|
|
145
153
|
end
|
|
146
|
-
::
|
|
154
|
+
::__continue18::
|
|
147
155
|
end
|
|
148
156
|
for ____, ____value in ipairs(__TS__ObjectEntries(self.features)) do
|
|
149
157
|
local iscFeatureString = ____value[1]
|
|
150
158
|
local featureClass = ____value[2]
|
|
151
159
|
do
|
|
152
160
|
if featureClass.numConsumers == 0 then
|
|
153
|
-
goto
|
|
161
|
+
goto __continue22
|
|
154
162
|
end
|
|
155
163
|
local iscFeature = tonumber(iscFeatureString)
|
|
156
164
|
if iscFeature == nil then
|
|
@@ -161,7 +169,7 @@ function ModUpgradedBase.prototype.logUsedFeatures(self)
|
|
|
161
169
|
((("- ISCFeature." .. tostring(ISCFeature[iscFeature])) .. " (") .. tostring(iscFeature)) .. ")"
|
|
162
170
|
)
|
|
163
171
|
end
|
|
164
|
-
::
|
|
172
|
+
::__continue22::
|
|
165
173
|
end
|
|
166
174
|
end
|
|
167
175
|
function ModUpgradedBase.prototype.initFeature(self, feature)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CacheFlag, CollectibleType, ItemConfigTag, PlayerForm, TrinketType } from "isaac-typescript-definitions";
|
|
1
|
+
import { CacheFlag, CardType, CollectibleType, ItemConfigCardType, ItemConfigTag, PlayerForm, TrinketType } from "isaac-typescript-definitions";
|
|
2
2
|
import { Feature } from "../../private/Feature";
|
|
3
3
|
export declare class ModdedElementSets extends Feature {
|
|
4
4
|
private allCollectibleTypesArray;
|
|
@@ -13,6 +13,12 @@ export declare class ModdedElementSets extends Feature {
|
|
|
13
13
|
private vanillaTrinketTypesSet;
|
|
14
14
|
private moddedTrinketTypesArray;
|
|
15
15
|
private moddedTrinketTypesSet;
|
|
16
|
+
private allCardTypesArray;
|
|
17
|
+
private allCardTypesSet;
|
|
18
|
+
private vanillaCardTypesArray;
|
|
19
|
+
private vanillaCardTypesSet;
|
|
20
|
+
private moddedCardTypesArray;
|
|
21
|
+
private moddedCardTypesSet;
|
|
16
22
|
private tagToCollectibleTypesMap;
|
|
17
23
|
private cacheFlagToCollectibleTypesMap;
|
|
18
24
|
private cacheFlagToTrinketTypesMap;
|
|
@@ -21,17 +27,64 @@ export declare class ModdedElementSets extends Feature {
|
|
|
21
27
|
private flyingTrinketTypesSet;
|
|
22
28
|
private edenActiveCollectibleTypesSet;
|
|
23
29
|
private edenPassiveCollectibleTypesSet;
|
|
30
|
+
private itemConfigCardTypeToCardTypeMap;
|
|
31
|
+
/**
|
|
32
|
+
* The set of cards that are not:
|
|
33
|
+
*
|
|
34
|
+
* - ItemConfigCardType.RUNE
|
|
35
|
+
* - ItemConfigCardType.SPECIAL_OBJECT
|
|
36
|
+
*/
|
|
37
|
+
private cardSet;
|
|
24
38
|
private moddedElementDetection;
|
|
25
39
|
private lazyInitVanillaCollectibleTypes;
|
|
26
40
|
private lazyInitModdedCollectibleTypes;
|
|
27
41
|
private lazyInitVanillaTrinketTypes;
|
|
28
42
|
private lazyInitModdedTrinketTypes;
|
|
43
|
+
private lazyInitVanillaCardTypes;
|
|
44
|
+
private lazyInitModdedCardTypes;
|
|
29
45
|
private lazyInitTagToCollectibleTypesMap;
|
|
30
46
|
private lazyInitCacheFlagToCollectibleTypesMap;
|
|
31
47
|
private lazyInitCacheFlagToTrinketTypesMap;
|
|
32
48
|
private lazyInitFlyingCollectibleTypesSet;
|
|
33
49
|
private lazyInitFlyingTrinketTypesSet;
|
|
34
50
|
private lazyInitEdenCollectibleTypesSet;
|
|
51
|
+
private lazyInitCardTypes;
|
|
52
|
+
/**
|
|
53
|
+
* Returns an array containing every valid card type in the game, including modded cards.
|
|
54
|
+
*
|
|
55
|
+
* Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
|
|
56
|
+
* use the `getCardSet` helper function instead.
|
|
57
|
+
*
|
|
58
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
59
|
+
* not all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
60
|
+
*
|
|
61
|
+
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
62
|
+
*/
|
|
63
|
+
getCardArray(): readonly CardType[];
|
|
64
|
+
/**
|
|
65
|
+
* Returns a set containing every valid card type in the game, including modded cards.
|
|
66
|
+
*
|
|
67
|
+
* Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
|
|
68
|
+
* use the `getCardArray` helper function instead.
|
|
69
|
+
*
|
|
70
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
71
|
+
* not all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
72
|
+
*
|
|
73
|
+
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
74
|
+
*/
|
|
75
|
+
getCardSet(): ReadonlySet<CardType>;
|
|
76
|
+
/**
|
|
77
|
+
* Helper function to get a set of card types matching the `ItemConfigCardType`.
|
|
78
|
+
*
|
|
79
|
+
* This function is variadic, meaning that you can you can specify N card types to get a set
|
|
80
|
+
* containing cards that match any of the specified types.
|
|
81
|
+
*
|
|
82
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
83
|
+
* not all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
84
|
+
*
|
|
85
|
+
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
86
|
+
*/
|
|
87
|
+
getCardTypesOfType(...itemConfigCardTypes: ItemConfigCardType[]): Set<CardType>;
|
|
35
88
|
/**
|
|
36
89
|
* Returns an array containing every valid collectible type in the game, including modded
|
|
37
90
|
* collectibles.
|
|
@@ -70,6 +123,10 @@ export declare class ModdedElementSets extends Feature {
|
|
|
70
123
|
* const guppyCollectibleTypes = getCollectiblesForTransformation(PlayerForm.GUPPY);
|
|
71
124
|
* ```
|
|
72
125
|
*
|
|
126
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
127
|
+
* not all collectibles will necessarily be present when a mod first loads (due to mod load
|
|
128
|
+
* order).
|
|
129
|
+
*
|
|
73
130
|
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
74
131
|
*/
|
|
75
132
|
getCollectiblesForTransformation(playerForm: PlayerForm): ReadonlySet<CollectibleType>;
|
|
@@ -81,6 +138,10 @@ export declare class ModdedElementSets extends Feature {
|
|
|
81
138
|
* not all collectibles will necessarily be present when a mod first loads (due to mod load
|
|
82
139
|
* order).
|
|
83
140
|
*
|
|
141
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
142
|
+
* not all collectibles will necessarily be present when a mod first loads (due to mod load
|
|
143
|
+
* order).
|
|
144
|
+
*
|
|
84
145
|
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
85
146
|
*/
|
|
86
147
|
getCollectiblesWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<CollectibleType>;
|
|
@@ -94,6 +155,10 @@ export declare class ModdedElementSets extends Feature {
|
|
|
94
155
|
* const offensiveCollectibleTypes = getCollectibleTypesWithTag(ItemConfigTag.OFFENSIVE);
|
|
95
156
|
* ```
|
|
96
157
|
*
|
|
158
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
159
|
+
* not all collectibles will necessarily be present when a mod first loads (due to mod load
|
|
160
|
+
* order).
|
|
161
|
+
*
|
|
97
162
|
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
98
163
|
*/
|
|
99
164
|
getCollectiblesWithTag(itemConfigTag: ItemConfigTag): ReadonlySet<CollectibleType>;
|
|
@@ -101,6 +166,10 @@ export declare class ModdedElementSets extends Feature {
|
|
|
101
166
|
* Returns a set containing every valid passive item that can be randomly granted to Eden as a
|
|
102
167
|
* starting item.
|
|
103
168
|
*
|
|
169
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
170
|
+
* not all collectibles will necessarily be present when a mod first loads (due to mod load
|
|
171
|
+
* order).
|
|
172
|
+
*
|
|
104
173
|
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
105
174
|
*/
|
|
106
175
|
getEdenActiveCollectibles(): ReadonlySet<CollectibleType>;
|
|
@@ -108,6 +177,10 @@ export declare class ModdedElementSets extends Feature {
|
|
|
108
177
|
* Returns a set containing every valid passive item that can be randomly granted to Eden as a
|
|
109
178
|
* starting item.
|
|
110
179
|
*
|
|
180
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
181
|
+
* not all collectibles will necessarily be present when a mod first loads (due to mod load
|
|
182
|
+
* order).
|
|
183
|
+
*
|
|
111
184
|
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
112
185
|
*/
|
|
113
186
|
getEdenPassiveCollectibles(): ReadonlySet<CollectibleType>;
|
|
@@ -118,6 +191,10 @@ export declare class ModdedElementSets extends Feature {
|
|
|
118
191
|
* Collectibles that only grant flight conditionally are manually pruned. Collectibles such as
|
|
119
192
|
* Empty Vessel should be checked for via the `hasFlyingTemporaryEffect` function.
|
|
120
193
|
*
|
|
194
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
195
|
+
* not all collectibles will necessarily be present when a mod first loads (due to mod load
|
|
196
|
+
* order).
|
|
197
|
+
*
|
|
121
198
|
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
122
199
|
*
|
|
123
200
|
* @param pruneConditionalItems Whether or not collectibles that only grant flight conditionally
|
|
@@ -128,9 +205,36 @@ export declare class ModdedElementSets extends Feature {
|
|
|
128
205
|
* Returns a set of all of the trinkets that grant flight. (All trinkets that grant flight do so
|
|
129
206
|
* conditionally, like Bat Wing and Azazel's Stump.)
|
|
130
207
|
*
|
|
208
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
209
|
+
* not all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
210
|
+
*
|
|
131
211
|
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
132
212
|
*/
|
|
133
213
|
getFlyingTrinkets(): ReadonlySet<TrinketType>;
|
|
214
|
+
/**
|
|
215
|
+
* Returns an array containing every modded card type in the game.
|
|
216
|
+
*
|
|
217
|
+
* Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
|
|
218
|
+
* use the `getModdedCardSet` helper function instead.
|
|
219
|
+
*
|
|
220
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
221
|
+
* not all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
222
|
+
*
|
|
223
|
+
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
224
|
+
*/
|
|
225
|
+
getModdedCardArray(): readonly CardType[];
|
|
226
|
+
/**
|
|
227
|
+
* Returns a set containing every modded card type in the game.
|
|
228
|
+
*
|
|
229
|
+
* Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
|
|
230
|
+
* use the `getModdedCardArray` helper function instead.
|
|
231
|
+
*
|
|
232
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
233
|
+
* not all cards will necessarily be present when a mod first loads (due to mod load order).
|
|
234
|
+
*
|
|
235
|
+
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
236
|
+
*/
|
|
237
|
+
getModdedCardSet(): ReadonlySet<CardType>;
|
|
134
238
|
/**
|
|
135
239
|
* Returns an array containing every modded collectible type in the game.
|
|
136
240
|
*
|
|
@@ -158,10 +262,10 @@ export declare class ModdedElementSets extends Feature {
|
|
|
158
262
|
*/
|
|
159
263
|
getModdedCollectibleSet(): ReadonlySet<CollectibleType>;
|
|
160
264
|
/**
|
|
161
|
-
* Returns an array containing every
|
|
265
|
+
* Returns an array containing every modded trinket type in the game.
|
|
162
266
|
*
|
|
163
267
|
* Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups,
|
|
164
|
-
* then use the `
|
|
268
|
+
* then use the `getModdedTrinketSet` helper function instead.
|
|
165
269
|
*
|
|
166
270
|
* This function can only be called if at least one callback has been executed. This is because
|
|
167
271
|
* not all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
@@ -170,10 +274,10 @@ export declare class ModdedElementSets extends Feature {
|
|
|
170
274
|
*/
|
|
171
275
|
getModdedTrinketArray(): readonly TrinketType[];
|
|
172
276
|
/**
|
|
173
|
-
* Returns a set containing every
|
|
277
|
+
* Returns a set containing every modded trinket type in the game.
|
|
174
278
|
*
|
|
175
279
|
* Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order,
|
|
176
|
-
* then use the `
|
|
280
|
+
* then use the `getModdedTrinketArray` helper function instead.
|
|
177
281
|
*
|
|
178
282
|
* This function can only be called if at least one callback has been executed. This is because
|
|
179
283
|
* not all trinkets will necessarily be present when a mod first loads (due to mod load order).
|
|
@@ -237,16 +341,61 @@ export declare class ModdedElementSets extends Feature {
|
|
|
237
341
|
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
238
342
|
*/
|
|
239
343
|
getPlayerTrinketsWithCacheFlag(player: EntityPlayer, cacheFlag: CacheFlag): Map<TrinketType, int>;
|
|
344
|
+
/**
|
|
345
|
+
* Has an equal chance of returning any card (e.g. Fool, Reverse Fool, Wild Card, etc.).
|
|
346
|
+
*
|
|
347
|
+
* This will not return:
|
|
348
|
+
* - any runes
|
|
349
|
+
* - any objects like Dice Shard
|
|
350
|
+
*
|
|
351
|
+
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
|
|
352
|
+
* the `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
353
|
+
* @param exceptions Optional. An array of cards to not select.
|
|
354
|
+
*/
|
|
355
|
+
getRandomCard(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
|
|
356
|
+
/**
|
|
357
|
+
* @param itemConfigCardType The item config card type that represents the pool of cards to select
|
|
358
|
+
* from.
|
|
359
|
+
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
|
|
360
|
+
* the `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
361
|
+
* @param exceptions Optional. An array of cards to not select.
|
|
362
|
+
*/
|
|
363
|
+
getRandomCardTypeOfType(itemConfigCardType: ItemConfigCardType, seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
|
|
364
|
+
/**
|
|
365
|
+
* Has an equal chance of returning any rune (e.g. Rune of Hagalaz, Blank Rune, Black Rune, Soul
|
|
366
|
+
* of Isaac, etc.). This will never return a Rune Shard.
|
|
367
|
+
*
|
|
368
|
+
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
|
|
369
|
+
* the `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
370
|
+
* @param exceptions Optional. An array of runes to not select.
|
|
371
|
+
*/
|
|
372
|
+
getRandomRune(seedOrRNG?: Seed | RNG, exceptions?: CardType[]): CardType;
|
|
240
373
|
/**
|
|
241
374
|
* Returns a random active collectible type that that is a valid starting item for Eden.
|
|
242
375
|
*
|
|
376
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
377
|
+
* not all collectibles will necessarily be present when a mod first loads (due to mod load
|
|
378
|
+
* order).
|
|
379
|
+
*
|
|
243
380
|
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
381
|
+
*
|
|
382
|
+
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
|
|
383
|
+
* the `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
384
|
+
* @param exceptions Optional. An array of runes to not select.
|
|
244
385
|
*/
|
|
245
386
|
getRandomEdenActiveCollectible(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
|
|
246
387
|
/**
|
|
247
388
|
* Returns a random passive collectible type that that is a valid starting item for Eden.
|
|
248
389
|
*
|
|
390
|
+
* This function can only be called if at least one callback has been executed. This is because
|
|
391
|
+
* not all collectibles will necessarily be present when a mod first loads (due to mod load
|
|
392
|
+
* order).
|
|
393
|
+
*
|
|
249
394
|
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
395
|
+
*
|
|
396
|
+
* @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided,
|
|
397
|
+
* the `RNG.Next` method will be called. Default is `getRandomSeed()`.
|
|
398
|
+
* @param exceptions Optional. An array of runes to not select.
|
|
250
399
|
*/
|
|
251
400
|
getRandomEdenPassiveCollectible(seedOrRNG?: Seed | RNG, exceptions?: CollectibleType[] | readonly CollectibleType[]): CollectibleType;
|
|
252
401
|
/**
|
|
@@ -283,6 +432,24 @@ export declare class ModdedElementSets extends Feature {
|
|
|
283
432
|
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
284
433
|
*/
|
|
285
434
|
getTrinketsWithCacheFlag(cacheFlag: CacheFlag): ReadonlySet<TrinketType>;
|
|
435
|
+
/**
|
|
436
|
+
* Returns an array containing every valid vanilla card type in the game.
|
|
437
|
+
*
|
|
438
|
+
* Use this if you need to iterate over the cards in order. If you need to do O(1) lookups, then
|
|
439
|
+
* use the `getVanillaCardSet` helper function instead.
|
|
440
|
+
*
|
|
441
|
+
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
442
|
+
*/
|
|
443
|
+
getVanillaCardArray(): readonly CardType[];
|
|
444
|
+
/**
|
|
445
|
+
* Returns a set containing every valid vanilla card type in the game.
|
|
446
|
+
*
|
|
447
|
+
* Use this if you need to do O(1) lookups. If you need to iterate over the cards in order, then
|
|
448
|
+
* use the `getVanillaCardArray` helper function instead.
|
|
449
|
+
*
|
|
450
|
+
* In order to use this function, you must upgrade your mod with `ISCFeature.MODDED_ELEMENT_SETS`.
|
|
451
|
+
*/
|
|
452
|
+
getVanillaCardSet(): ReadonlySet<CardType>;
|
|
286
453
|
/**
|
|
287
454
|
* Returns an array containing every valid vanilla collectible type in the game.
|
|
288
455
|
*
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"ModdedElementSets.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/ModdedElementSets.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,eAAe,EACf,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAkCtC,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,iBAAiB,CAAkB;IAC3C,OAAO,CAAC,eAAe,CAAuB;IAE9C,OAAO,CAAC,qBAAqB,CAAkB;IAC/C,OAAO,CAAC,mBAAmB,CAAuB;IAElD,OAAO,CAAC,oBAAoB,CAAkB;IAC9C,OAAO,CAAC,kBAAkB,CAAuB;IAEjD,OAAO,CAAC,wBAAwB,CAG5B;IAEJ,OAAO,CAAC,8BAA8B,CAGlC;IAEJ,OAAO,CAAC,0BAA0B,CAA0C;IAE5E,OAAO,CAAC,yBAAyB,CAA8B;I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