isaacscript-common 7.18.0 → 8.1.0
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/core/constantsFirstLast.d.ts +10 -85
- package/dist/core/constantsFirstLast.d.ts.map +1 -1
- package/dist/core/constantsFirstLast.lua +10 -90
- package/dist/enums/ModCallbackCustom.d.ts +21 -0
- package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/features/characterStats.lua +2 -2
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +9 -5
- package/dist/features/firstLast.d.ts +190 -0
- package/dist/features/firstLast.d.ts.map +1 -0
- package/dist/features/firstLast.lua +341 -0
- package/dist/functions/array.d.ts +1 -9
- package/dist/functions/array.d.ts.map +1 -1
- package/dist/functions/array.lua +0 -6
- package/dist/functions/cards.d.ts +0 -8
- package/dist/functions/cards.d.ts.map +1 -1
- package/dist/functions/cards.lua +9 -24
- package/dist/functions/{cacheFlag.d.ts → collectibleCacheFlag.d.ts} +8 -8
- package/dist/functions/collectibleCacheFlag.d.ts.map +1 -0
- package/dist/functions/{cacheFlag.lua → collectibleCacheFlag.lua} +12 -13
- package/dist/functions/collectibleSet.d.ts +18 -0
- package/dist/functions/collectibleSet.d.ts.map +1 -1
- package/dist/functions/collectibleSet.lua +29 -9
- package/dist/functions/collectibles.d.ts +0 -13
- package/dist/functions/collectibles.d.ts.map +1 -1
- package/dist/functions/collectibles.lua +0 -18
- package/dist/functions/flying.lua +2 -2
- package/dist/functions/pills.d.ts +0 -10
- package/dist/functions/pills.d.ts.map +1 -1
- package/dist/functions/pills.lua +0 -15
- package/dist/functions/players.d.ts +12 -0
- package/dist/functions/players.d.ts.map +1 -1
- package/dist/functions/players.lua +52 -9
- package/dist/functions/random.d.ts.map +1 -1
- package/dist/functions/random.lua +2 -0
- package/dist/functions/stats.d.ts +9 -0
- package/dist/functions/stats.d.ts.map +1 -0
- package/dist/functions/stats.lua +11 -0
- package/dist/functions/trinketCacheFlag.d.ts +9 -1
- package/dist/functions/trinketCacheFlag.d.ts.map +1 -1
- package/dist/functions/trinketCacheFlag.lua +28 -10
- package/dist/functions/trinketSet.d.ts +18 -0
- package/dist/functions/trinketSet.d.ts.map +1 -1
- package/dist/functions/trinketSet.lua +29 -9
- package/dist/functions/trinkets.d.ts +1 -10
- package/dist/functions/trinkets.d.ts.map +1 -1
- package/dist/functions/trinkets.lua +0 -24
- package/dist/index.d.ts +259 -117
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +14 -6
- package/dist/initFeatures.d.ts.map +1 -1
- package/dist/initFeatures.lua +3 -0
- package/package.json +1 -1
- package/src/core/constantsFirstLast.ts +12 -125
- package/src/enums/ModCallbackCustom.ts +21 -0
- package/src/features/characterStats.ts +1 -1
- package/src/features/extraConsoleCommands/listCommands.ts +8 -5
- package/src/features/firstLast.ts +429 -0
- package/src/functions/array.ts +1 -9
- package/src/functions/cards.ts +5 -28
- package/src/functions/{cacheFlag.ts → collectibleCacheFlag.ts} +13 -16
- package/src/functions/collectibleSet.ts +28 -21
- package/src/functions/collectibles.ts +0 -22
- package/src/functions/flying.ts +1 -1
- package/src/functions/pills.ts +0 -22
- package/src/functions/players.ts +41 -0
- package/src/functions/random.ts +3 -0
- package/src/functions/stats.ts +12 -0
- package/src/functions/trinketCacheFlag.ts +29 -7
- package/src/functions/trinketSet.ts +28 -21
- package/src/functions/trinkets.ts +0 -34
- package/src/index.ts +2 -1
- package/src/initFeatures.ts +2 -0
- package/dist/functions/cacheFlag.d.ts.map +0 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B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end
|
|
249
249
|
end
|
|
250
|
+
do
|
|
251
|
+
local ____export = require("features.firstLast")
|
|
252
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
253
|
+
if ____exportKey ~= "default" then
|
|
254
|
+
____exports[____exportKey] = ____exportValue
|
|
255
|
+
end
|
|
256
|
+
end
|
|
257
|
+
end
|
|
250
258
|
do
|
|
251
259
|
local ____export = require("features.forgottenSwitch")
|
|
252
260
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -432,7 +440,7 @@ do
|
|
|
432
440
|
end
|
|
433
441
|
end
|
|
434
442
|
do
|
|
435
|
-
local ____export = require("functions.
|
|
443
|
+
local ____export = require("functions.cards")
|
|
436
444
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
437
445
|
if ____exportKey ~= "default" then
|
|
438
446
|
____exports[____exportKey] = ____exportValue
|
|
@@ -440,7 +448,7 @@ do
|
|
|
440
448
|
end
|
|
441
449
|
end
|
|
442
450
|
do
|
|
443
|
-
local ____export = require("functions.
|
|
451
|
+
local ____export = require("functions.challenges")
|
|
444
452
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
445
453
|
if ____exportKey ~= "default" then
|
|
446
454
|
____exports[____exportKey] = ____exportValue
|
|
@@ -448,7 +456,7 @@ do
|
|
|
448
456
|
end
|
|
449
457
|
end
|
|
450
458
|
do
|
|
451
|
-
local ____export = require("functions.
|
|
459
|
+
local ____export = require("functions.characters")
|
|
452
460
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
453
461
|
if ____exportKey ~= "default" then
|
|
454
462
|
____exports[____exportKey] = ____exportValue
|
|
@@ -456,7 +464,7 @@ do
|
|
|
456
464
|
end
|
|
457
465
|
end
|
|
458
466
|
do
|
|
459
|
-
local ____export = require("functions.
|
|
467
|
+
local ____export = require("functions.charge")
|
|
460
468
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
461
469
|
if ____exportKey ~= "default" then
|
|
462
470
|
____exports[____exportKey] = ____exportValue
|
|
@@ -464,7 +472,7 @@ do
|
|
|
464
472
|
end
|
|
465
473
|
end
|
|
466
474
|
do
|
|
467
|
-
local ____export = require("functions.
|
|
475
|
+
local ____export = require("functions.chargeBar")
|
|
468
476
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
469
477
|
if ____exportKey ~= "default" then
|
|
470
478
|
____exports[____exportKey] = ____exportValue
|
|
@@ -472,7 +480,7 @@ do
|
|
|
472
480
|
end
|
|
473
481
|
end
|
|
474
482
|
do
|
|
475
|
-
local ____export = require("functions.
|
|
483
|
+
local ____export = require("functions.collectibleCacheFlag")
|
|
476
484
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
477
485
|
if ____exportKey ~= "default" then
|
|
478
486
|
____exports[____exportKey] = ____exportValue
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initFeatures.d.ts","sourceRoot":"","sources":["../src/initFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"initFeatures.d.ts","sourceRoot":"","sources":["../src/initFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AA+BpD,wBAAgB,YAAY,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAGnD"}
|
package/dist/initFeatures.lua
CHANGED
|
@@ -24,6 +24,8 @@ local ____fadeInRemover = require("features.fadeInRemover")
|
|
|
24
24
|
local fadeInRemoverInit = ____fadeInRemover.fadeInRemoverInit
|
|
25
25
|
local ____fastReset = require("features.fastReset")
|
|
26
26
|
local fastResetInit = ____fastReset.fastResetInit
|
|
27
|
+
local ____firstLast = require("features.firstLast")
|
|
28
|
+
local firstLastInit = ____firstLast.firstLastInit
|
|
27
29
|
local ____forgottenSwitch = require("features.forgottenSwitch")
|
|
28
30
|
local forgottenSwitchInit = ____forgottenSwitch.forgottenSwitchInit
|
|
29
31
|
local ____pause = require("features.pause")
|
|
@@ -71,6 +73,7 @@ function initFeaturesMinor(self, mod)
|
|
|
71
73
|
disableInputsInit(nil, mod)
|
|
72
74
|
fadeInRemoverInit(nil, mod)
|
|
73
75
|
fastResetInit(nil, mod)
|
|
76
|
+
firstLastInit(nil, mod)
|
|
74
77
|
forgottenSwitchInit(nil, mod)
|
|
75
78
|
collectibleItemPoolTypeInit(nil, mod)
|
|
76
79
|
pauseInit(nil, mod)
|
package/package.json
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// Constants related to modded items can be found in the "firstLast.ts" file.
|
|
2
|
+
|
|
1
3
|
import {
|
|
2
4
|
Card,
|
|
3
5
|
CollectibleType,
|
|
@@ -9,15 +11,6 @@ import {
|
|
|
9
11
|
TrinketType,
|
|
10
12
|
} from "isaac-typescript-definitions";
|
|
11
13
|
import { getEnumLength, getLastEnumValue } from "../functions/enums";
|
|
12
|
-
import {
|
|
13
|
-
asCard,
|
|
14
|
-
asCollectibleType,
|
|
15
|
-
asNumber,
|
|
16
|
-
asPillEffect,
|
|
17
|
-
asPlayerType,
|
|
18
|
-
asTrinketType,
|
|
19
|
-
} from "../functions/types";
|
|
20
|
-
import { itemConfig } from "./cachedClasses";
|
|
21
14
|
|
|
22
15
|
// ------------
|
|
23
16
|
// Collectibles
|
|
@@ -26,16 +19,6 @@ import { itemConfig } from "./cachedClasses";
|
|
|
26
19
|
/** Equal to `CollectibleType.SAD_ONION`. */
|
|
27
20
|
export const FIRST_COLLECTIBLE_TYPE = CollectibleType.SAD_ONION;
|
|
28
21
|
|
|
29
|
-
/**
|
|
30
|
-
* Will change depending on how many modded collectibles there are.
|
|
31
|
-
*
|
|
32
|
-
* Equal to `itemConfig.GetCollectibles().Size - 1`. (`Size` includes invalid collectibles, like
|
|
33
|
-
* 666. We subtract one to account for `CollectibleType.NULL`.)
|
|
34
|
-
*/
|
|
35
|
-
export const LAST_COLLECTIBLE_TYPE = asCollectibleType(
|
|
36
|
-
itemConfig.GetCollectibles().Size - 1,
|
|
37
|
-
);
|
|
38
|
-
|
|
39
22
|
/**
|
|
40
23
|
* Calculated from the `CollectibleType` enum.
|
|
41
24
|
*
|
|
@@ -44,138 +27,51 @@ export const LAST_COLLECTIBLE_TYPE = asCollectibleType(
|
|
|
44
27
|
*/
|
|
45
28
|
export const LAST_VANILLA_COLLECTIBLE_TYPE = getLastEnumValue(CollectibleType);
|
|
46
29
|
|
|
47
|
-
/**
|
|
48
|
-
* If there are no modded collectibles, this constant will represent a collectible type that does
|
|
49
|
-
* not exist.
|
|
50
|
-
*/
|
|
51
|
-
export const FIRST_MODDED_COLLECTIBLE_TYPE = asCollectibleType(
|
|
52
|
-
asNumber(LAST_VANILLA_COLLECTIBLE_TYPE) + 1,
|
|
53
|
-
);
|
|
54
|
-
|
|
55
|
-
/** Calculated from the `CollectibleType` enum. `CollectibleType.NULL` is not included. */
|
|
30
|
+
/** Calculated from the `CollectibleType` enum. (`CollectibleType.NULL` is not included.) */
|
|
56
31
|
export const NUM_VANILLA_COLLECTIBLE_TYPES = getEnumLength(CollectibleType) - 1;
|
|
57
32
|
|
|
58
|
-
/** Unlike vanilla collectible types, modded collectible types are always contiguous. */
|
|
59
|
-
export const NUM_MODDED_COLLECTIBLE_TYPES =
|
|
60
|
-
LAST_COLLECTIBLE_TYPE - LAST_VANILLA_COLLECTIBLE_TYPE;
|
|
61
|
-
|
|
62
|
-
export const NUM_COLLECTIBLE_TYPES =
|
|
63
|
-
NUM_VANILLA_COLLECTIBLE_TYPES + NUM_MODDED_COLLECTIBLE_TYPES;
|
|
64
|
-
|
|
65
33
|
// --------
|
|
66
34
|
// Trinkets
|
|
67
35
|
// --------
|
|
68
36
|
|
|
69
|
-
/**
|
|
70
|
-
* Will change depending on how many modded cards there are.
|
|
71
|
-
*
|
|
72
|
-
* Equal to `itemConfig.GetTrinkets().Size - 1`. (We subtract one to account for
|
|
73
|
-
* `TrinketType.NULL`.)
|
|
74
|
-
*/
|
|
75
|
-
export const NUM_TRINKET_TYPES = itemConfig.GetTrinkets().Size - 1;
|
|
76
|
-
|
|
77
|
-
/** Calculated from the `TrinketType` enum. `TrinketType.NULL` is not included. */
|
|
78
|
-
export const NUM_VANILLA_TRINKET_TYPES = getEnumLength(TrinketType) - 1;
|
|
79
|
-
|
|
80
|
-
export const NUM_MODDED_TRINKET_TYPES =
|
|
81
|
-
NUM_TRINKET_TYPES - NUM_VANILLA_TRINKET_TYPES;
|
|
82
|
-
|
|
83
37
|
/** Equal to `TrinketType.SWALLOWED_PENNY`. */
|
|
84
38
|
export const FIRST_TRINKET_TYPE = TrinketType.SWALLOWED_PENNY;
|
|
85
39
|
|
|
86
|
-
/**
|
|
87
|
-
* Will change depending on how many modded cards there are.
|
|
88
|
-
*
|
|
89
|
-
* Equal to `itemConfig.GetTrinkets().Size - 1`. (We subtract one to account for
|
|
90
|
-
* `TrinketType.NULL`.)
|
|
91
|
-
*/
|
|
92
|
-
export const LAST_TRINKET_TYPE = asTrinketType(NUM_TRINKET_TYPES);
|
|
93
|
-
|
|
94
40
|
/** Calculated from the `TrinketType` enum. */
|
|
95
41
|
export const LAST_VANILLA_TRINKET_TYPE = getLastEnumValue(TrinketType);
|
|
96
42
|
|
|
97
|
-
/**
|
|
98
|
-
|
|
99
|
-
*/
|
|
100
|
-
export const FIRST_MODDED_TRINKET_TYPE = asTrinketType(
|
|
101
|
-
asNumber(LAST_VANILLA_TRINKET_TYPE) + 1,
|
|
102
|
-
);
|
|
43
|
+
/** Calculated from the `TrinketType` enum. (`TrinketType.NULL` is not included.) */
|
|
44
|
+
export const NUM_VANILLA_TRINKET_TYPES = getEnumLength(TrinketType) - 1;
|
|
103
45
|
|
|
104
46
|
// -----
|
|
105
47
|
// Cards
|
|
106
48
|
// -----
|
|
107
49
|
|
|
108
|
-
/**
|
|
109
|
-
* Will change depending on how many modded cards there are.
|
|
110
|
-
*
|
|
111
|
-
* Equal to `itemConfig.GetCards().Size - 1`. (We subtract one to account for `Card.NULL`.)
|
|
112
|
-
*/
|
|
113
|
-
export const NUM_CARDS = itemConfig.GetCards().Size - 1;
|
|
114
|
-
|
|
115
|
-
/** Calculated from the `Card` enum. `Card.NULL` is not included. */
|
|
116
|
-
export const NUM_VANILLA_CARDS = getEnumLength(Card) - 1;
|
|
117
|
-
|
|
118
|
-
export const NUM_MODDED_CARDS = NUM_CARDS - NUM_VANILLA_CARDS;
|
|
119
|
-
|
|
120
50
|
/** Equal to `Card.FOOL`. */
|
|
121
51
|
export const FIRST_CARD = Card.FOOL;
|
|
122
52
|
|
|
123
|
-
/**
|
|
124
|
-
* Will change depending on how many modded cards there are.
|
|
125
|
-
*
|
|
126
|
-
* Equal to `itemConfig.GetCards().Size - 1`. (We subtract one to account for `Card.NULL`.)
|
|
127
|
-
*/
|
|
128
|
-
export const LAST_CARD = asCard(NUM_CARDS);
|
|
129
|
-
|
|
130
53
|
/** Calculated from the `Card` enum. */
|
|
131
|
-
export const
|
|
54
|
+
export const LAST_VANILLA_CARD = getLastEnumValue(Card);
|
|
132
55
|
|
|
133
|
-
/**
|
|
134
|
-
export const
|
|
56
|
+
/** Calculated from the `Card` enum. `Card.NULL` is not included. */
|
|
57
|
+
export const NUM_VANILLA_CARDS = getEnumLength(Card) - 1;
|
|
135
58
|
|
|
136
59
|
// ------------
|
|
137
60
|
// Pill Effects
|
|
138
61
|
// ------------
|
|
139
62
|
|
|
140
|
-
/**
|
|
141
|
-
* Will change depending on how many modded pill effects there are.
|
|
142
|
-
*
|
|
143
|
-
* Equal to `itemConfig.GetPillEffects().Size - 1`. (We subtract one to account for
|
|
144
|
-
* `PillEffect.NULL`.)
|
|
145
|
-
*/
|
|
146
|
-
export const NUM_PILL_EFFECTS = itemConfig.GetPillEffects().Size - 1;
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Calculated from the `PillEffect` enum.
|
|
150
|
-
*
|
|
151
|
-
* (There is no `PillEffect.NULL` in the custom enum, so we don't have to subtract one here.)
|
|
152
|
-
*/
|
|
153
|
-
export const NUM_VANILLA_PILL_EFFECTS = getEnumLength(PillEffect);
|
|
154
|
-
|
|
155
|
-
export const NUM_MODDED_PILL_EFFECTS =
|
|
156
|
-
NUM_PILL_EFFECTS - NUM_VANILLA_PILL_EFFECTS;
|
|
157
|
-
|
|
158
63
|
/** Equal to `PillEffect.BAD_GAS`. */
|
|
159
64
|
export const FIRST_PILL_EFFECT = PillEffect.BAD_GAS;
|
|
160
65
|
|
|
161
|
-
/**
|
|
162
|
-
* Will change depending on how many modded pill effects there are.
|
|
163
|
-
*
|
|
164
|
-
* Equal to `itemConfig.GetPillEffects().Size - 1`. (We subtract one to account for
|
|
165
|
-
* `PillEffect.NULL`.)
|
|
166
|
-
*/
|
|
167
|
-
export const LAST_PILL_EFFECT = asPillEffect(NUM_PILL_EFFECTS);
|
|
168
|
-
|
|
169
66
|
/** Calculated from the `PillEffect` enum. */
|
|
170
67
|
export const LAST_VANILLA_PILL_EFFECT = getLastEnumValue(PillEffect);
|
|
171
68
|
|
|
172
69
|
/**
|
|
173
|
-
*
|
|
174
|
-
*
|
|
70
|
+
* Calculated from the `PillEffect` enum.
|
|
71
|
+
*
|
|
72
|
+
* (There is no `PillEffect.NULL` in the custom enum, so we do not have to subtract one here.)
|
|
175
73
|
*/
|
|
176
|
-
export const
|
|
177
|
-
asNumber(LAST_VANILLA_PILL_EFFECT) + 1,
|
|
178
|
-
);
|
|
74
|
+
export const NUM_VANILLA_PILL_EFFECTS = getEnumLength(PillEffect);
|
|
179
75
|
|
|
180
76
|
// -----------
|
|
181
77
|
// Pill Colors
|
|
@@ -217,15 +113,6 @@ export const FIRST_CHARACTER = PlayerType.ISAAC;
|
|
|
217
113
|
/** Calculated from the `PlayerType` enum. */
|
|
218
114
|
export const LAST_VANILLA_CHARACTER = getLastEnumValue(PlayerType);
|
|
219
115
|
|
|
220
|
-
/**
|
|
221
|
-
* If there are no modded characters, this constant will represent a character that does not exist.
|
|
222
|
-
* (There is no way to determine the amount of modded characters at run-time, since there is no
|
|
223
|
-
* exposed player config.)
|
|
224
|
-
*/
|
|
225
|
-
export const FIRST_MODDED_CHARACTER = asPlayerType(
|
|
226
|
-
asNumber(LAST_VANILLA_CHARACTER) + 1,
|
|
227
|
-
);
|
|
228
|
-
|
|
229
116
|
// ----------
|
|
230
117
|
// Room Types
|
|
231
118
|
// ----------
|
|
@@ -353,6 +353,9 @@ export enum ModCallbackCustom {
|
|
|
353
353
|
* the broken state for the respective grid entity type. (For example, this will fire for a
|
|
354
354
|
* `GridEntityType.ROCK` (2) when its state changes to `RockState.BROKEN` (2).)
|
|
355
355
|
*
|
|
356
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
357
|
+
* `POST_GRID_ENTITY_CUSTOM_BROKEN` callback instead.
|
|
358
|
+
*
|
|
356
359
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
357
360
|
* only fire if it matches the `GridEntityType` provided.
|
|
358
361
|
*
|
|
@@ -367,6 +370,9 @@ export enum ModCallbackCustom {
|
|
|
367
370
|
* this, the callback will not continue to fire. It will only fire again once the entity moves out
|
|
368
371
|
* of range and then moves back into range.)
|
|
369
372
|
*
|
|
373
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
374
|
+
* `POST_GRID_ENTITY_CUSTOM_COLLISION` callback instead.
|
|
375
|
+
*
|
|
370
376
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
371
377
|
* only fire if it matches the `GridEntityType` provided.
|
|
372
378
|
*
|
|
@@ -502,6 +508,9 @@ export enum ModCallbackCustom {
|
|
|
502
508
|
* - in the `POST_UPDATE` callback (if the entity appeared mid-way through the room, like when the
|
|
503
509
|
* trapdoor appears after defeating It Lives!)
|
|
504
510
|
*
|
|
511
|
+
* For grid entities created with `spawnCustomGridEntity`, use the `POST_GRID_ENTITY_CUSTOM_INIT`
|
|
512
|
+
* callback instead.
|
|
513
|
+
*
|
|
505
514
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
506
515
|
* only fire if it matches the `GridEntityType` provided.
|
|
507
516
|
*
|
|
@@ -519,6 +528,9 @@ export enum ModCallbackCustom {
|
|
|
519
528
|
*
|
|
520
529
|
* This will fire when a Polty/Kineti picks up a grid entity.
|
|
521
530
|
*
|
|
531
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
532
|
+
* `POST_GRID_ENTITY_CUSTOM_REMOVE` callback instead.
|
|
533
|
+
*
|
|
522
534
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
523
535
|
* only fire if it matches the `GridEntityType` provided.
|
|
524
536
|
*
|
|
@@ -539,6 +551,9 @@ export enum ModCallbackCustom {
|
|
|
539
551
|
* - When registering the callback, takes an optional third argument that will make the callback
|
|
540
552
|
* only fire if it matches the variant provided.
|
|
541
553
|
*
|
|
554
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
555
|
+
* `POST_GRID_ENTITY_CUSTOM_RENDER` callback instead.
|
|
556
|
+
*
|
|
542
557
|
* ```ts
|
|
543
558
|
* function postGridEntityRender(gridEntity: GridEntity): void {}
|
|
544
559
|
* ```
|
|
@@ -552,6 +567,9 @@ export enum ModCallbackCustom {
|
|
|
552
567
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
553
568
|
* only fire if it matches the `GridEntityType` provided.
|
|
554
569
|
*
|
|
570
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
571
|
+
* `POST_GRID_ENTITY_CUSTOM_STATE_CHANGED` callback instead.
|
|
572
|
+
*
|
|
555
573
|
* ```ts
|
|
556
574
|
* function postGridEntityStateChanged(
|
|
557
575
|
* gridEntity: GridEntity,
|
|
@@ -570,6 +588,9 @@ export enum ModCallbackCustom {
|
|
|
570
588
|
* - When registering the callback, takes an optional third argument that will make the callback
|
|
571
589
|
* only fire if it matches the variant provided.
|
|
572
590
|
*
|
|
591
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
592
|
+
* `POST_GRID_ENTITY_CUSTOM_UPDATE` callback instead.
|
|
593
|
+
*
|
|
573
594
|
* ```ts
|
|
574
595
|
* function postGridEntityUpdate(gridEntity: GridEntity): void {}
|
|
575
596
|
* ```
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
PlayerType,
|
|
11
11
|
} from "isaac-typescript-definitions";
|
|
12
12
|
import { errorIfFeaturesNotInitialized } from "../featuresInitialized";
|
|
13
|
-
import { getDefaultPlayerStat } from "../functions/cacheFlag";
|
|
14
13
|
import { addStat } from "../functions/players";
|
|
14
|
+
import { getDefaultPlayerStat } from "../functions/stats";
|
|
15
15
|
|
|
16
16
|
const FEATURE_NAME = "characterStats";
|
|
17
17
|
|
|
@@ -47,8 +47,6 @@ import {
|
|
|
47
47
|
FIRST_PILL_EFFECT,
|
|
48
48
|
FIRST_ROOM_TYPE,
|
|
49
49
|
FIRST_STAGE,
|
|
50
|
-
LAST_CARD,
|
|
51
|
-
LAST_PILL_EFFECT,
|
|
52
50
|
LAST_ROOM_TYPE,
|
|
53
51
|
LAST_STAGE,
|
|
54
52
|
LAST_VANILLA_CHARACTER,
|
|
@@ -95,6 +93,7 @@ import { CARD_MAP } from "../../maps/cardMap";
|
|
|
95
93
|
import { CHARACTER_MAP } from "../../maps/characterMap";
|
|
96
94
|
import { PILL_EFFECT_MAP } from "../../maps/pillEffectMap";
|
|
97
95
|
import { ROOM_TYPE_MAP } from "../../maps/roomTypeMap";
|
|
96
|
+
import { getLastCard, getLastPillEffect } from "../firstLast";
|
|
98
97
|
import {
|
|
99
98
|
addHeart,
|
|
100
99
|
devilAngel,
|
|
@@ -337,7 +336,8 @@ export function card(params: string): void {
|
|
|
337
336
|
|
|
338
337
|
cardNum = match[1];
|
|
339
338
|
} else {
|
|
340
|
-
|
|
339
|
+
const lastCard = getLastCard();
|
|
340
|
+
if (num < FIRST_CARD || num > lastCard) {
|
|
341
341
|
printConsole(`Invalid card sub-type: ${num}`);
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
@@ -352,10 +352,12 @@ export function card(params: string): void {
|
|
|
352
352
|
|
|
353
353
|
/** Spawns every card on the ground, starting at the top-left-most tile. */
|
|
354
354
|
export function cards(): void {
|
|
355
|
+
const lastCard = getLastCard();
|
|
356
|
+
|
|
355
357
|
let cardType = 1;
|
|
356
358
|
for (let y = 0; y <= 6; y++) {
|
|
357
359
|
for (let x = 0; x <= 12; x++) {
|
|
358
|
-
if (asCard(cardType) ===
|
|
360
|
+
if (asCard(cardType) === lastCard) {
|
|
359
361
|
return;
|
|
360
362
|
}
|
|
361
363
|
|
|
@@ -876,7 +878,8 @@ export function pill(params: string): void {
|
|
|
876
878
|
|
|
877
879
|
pillEffect = match[1];
|
|
878
880
|
} else {
|
|
879
|
-
|
|
881
|
+
const lastPillEffect = getLastPillEffect();
|
|
882
|
+
if (num < FIRST_PILL_EFFECT || num > lastPillEffect) {
|
|
880
883
|
printConsole(`Invalid pill effect ID: ${num}`);
|
|
881
884
|
return;
|
|
882
885
|
}
|