isaacscript-common 9.2.0 → 9.4.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/callbacks/subscriptions/postGridEntityCollision.d.ts +4 -2
- package/dist/callbacks/subscriptions/postGridEntityCollision.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postGridEntityCollision.lua +8 -0
- package/dist/callbacks/subscriptions/postGridEntityCustomCollision.d.ts +4 -2
- package/dist/callbacks/subscriptions/postGridEntityCustomCollision.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postGridEntityCustomCollision.lua +8 -0
- package/dist/core/constants.d.ts +2 -0
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.lua +2 -0
- package/dist/enums/ModCallbackCustom.d.ts +52 -26
- package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +1 -1
- package/dist/functions/entities.d.ts +4 -0
- package/dist/functions/entities.d.ts.map +1 -1
- package/dist/functions/entities.lua +4 -0
- package/dist/functions/rooms.d.ts +1 -0
- package/dist/functions/rooms.d.ts.map +1 -1
- package/dist/functions/rooms.lua +1 -0
- package/dist/functions/stage.d.ts +8 -0
- package/dist/functions/stage.d.ts.map +1 -1
- package/dist/functions/stage.lua +4 -0
- package/dist/index.d.ts +74 -28
- package/package.json +1 -1
- package/src/callbacks/subscriptions/postGridEntityCollision.ts +21 -1
- package/src/callbacks/subscriptions/postGridEntityCustomCollision.ts +25 -2
- package/src/core/constants.ts +3 -0
- package/src/enums/ModCallbackCustom.ts +52 -26
- package/src/features/extraConsoleCommands/listCommands.ts +1 -1
- package/src/functions/entities.ts +4 -0
- package/src/functions/rooms.ts +1 -0
- package/src/functions/stage.ts +8 -0
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { GridEntityType } from "isaac-typescript-definitions";
|
|
1
|
+
import { EntityType, GridEntityType } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostGridEntityCollisionRegisterParameters = [
|
|
3
3
|
callback: (gridEntity: GridEntity, entity: Entity) => void,
|
|
4
4
|
gridEntityType?: GridEntityType,
|
|
5
|
-
gridEntityVariant?: int
|
|
5
|
+
gridEntityVariant?: int,
|
|
6
|
+
entityType?: EntityType,
|
|
7
|
+
entityVariant?: int
|
|
6
8
|
];
|
|
7
9
|
export declare function postGridEntityCollisionHasSubscriptions(): boolean;
|
|
8
10
|
export declare function postGridEntityCollisionRegister(...args: PostGridEntityCollisionRegisterParameters): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postGridEntityCollision.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postGridEntityCollision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"postGridEntityCollision.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postGridEntityCollision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE1E,oBAAY,yCAAyC,GAAG;IACtD,QAAQ,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI;IAC1D,cAAc,CAAC,EAAE,cAAc;IAC/B,iBAAiB,CAAC,EAAE,GAAG;IACvB,UAAU,CAAC,EAAE,UAAU;IACvB,aAAa,CAAC,EAAE,GAAG;CACpB,CAAC;AAIF,wBAAgB,uCAAuC,IAAI,OAAO,CAEjE;AAED,wBAAgB,+BAA+B,CAC7C,GAAG,IAAI,EAAE,yCAAyC,GACjD,IAAI,CAEN;AAED,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,UAAU,EACtB,MAAM,EAAE,MAAM,GACb,IAAI,CA6CN"}
|
|
@@ -14,6 +14,8 @@ function ____exports.postGridEntityCollisionFire(self, gridEntity, entity)
|
|
|
14
14
|
local callback = ____value[1]
|
|
15
15
|
local callbackGridEntityType = ____value[2]
|
|
16
16
|
local callbackGridEntityVariant = ____value[3]
|
|
17
|
+
local callbackEntityType = ____value[4]
|
|
18
|
+
local callbackEntityVariant = ____value[5]
|
|
17
19
|
do
|
|
18
20
|
if callbackGridEntityType ~= nil and callbackGridEntityType ~= gridEntityType then
|
|
19
21
|
goto __continue5
|
|
@@ -21,6 +23,12 @@ function ____exports.postGridEntityCollisionFire(self, gridEntity, entity)
|
|
|
21
23
|
if callbackGridEntityVariant ~= nil and callbackGridEntityVariant ~= gridEntityVariant then
|
|
22
24
|
goto __continue5
|
|
23
25
|
end
|
|
26
|
+
if callbackEntityType ~= nil and callbackEntityType ~= entity.Type then
|
|
27
|
+
goto __continue5
|
|
28
|
+
end
|
|
29
|
+
if callbackEntityVariant ~= nil and callbackEntityVariant ~= entity.Variant then
|
|
30
|
+
goto __continue5
|
|
31
|
+
end
|
|
24
32
|
callback(nil, gridEntity, entity)
|
|
25
33
|
end
|
|
26
34
|
::__continue5::
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { GridEntityType } from "isaac-typescript-definitions";
|
|
1
|
+
import { EntityType, GridEntityType } from "isaac-typescript-definitions";
|
|
2
2
|
export declare type PostGridEntityCustomCollisionRegisterParameters = [
|
|
3
3
|
callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType, entity: Entity) => void,
|
|
4
|
-
gridEntityTypeCustom?: GridEntityType
|
|
4
|
+
gridEntityTypeCustom?: GridEntityType,
|
|
5
|
+
entityType?: EntityType,
|
|
6
|
+
entityVariant?: int
|
|
5
7
|
];
|
|
6
8
|
export declare function postGridEntityCustomCollisionHasSubscriptions(): boolean;
|
|
7
9
|
export declare function postGridEntityCustomCollisionRegister(...args: PostGridEntityCustomCollisionRegisterParameters): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postGridEntityCustomCollision.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postGridEntityCustomCollision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"postGridEntityCustomCollision.d.ts","sourceRoot":"","sources":["../../../src/callbacks/subscriptions/postGridEntityCustomCollision.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE1E,oBAAY,+CAA+C,GAAG;IAC5D,QAAQ,EAAE,CACR,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,cAAc,EACpC,MAAM,EAAE,MAAM,KACX,IAAI;IACT,oBAAoB,CAAC,EAAE,cAAc;IACrC,UAAU,CAAC,EAAE,UAAU;IACvB,aAAa,CAAC,EAAE,GAAG;CACpB,CAAC;AAIF,wBAAgB,6CAA6C,IAAI,OAAO,CAEvE;AAED,wBAAgB,qCAAqC,CACnD,GAAG,IAAI,EAAE,+CAA+C,GACvD,IAAI,CAEN;AAED,wBAAgB,iCAAiC,CAC/C,UAAU,EAAE,UAAU,EACtB,oBAAoB,EAAE,cAAc,EACpC,MAAM,EAAE,MAAM,GACb,IAAI,CAiCN"}
|
|
@@ -11,10 +11,18 @@ function ____exports.postGridEntityCustomCollisionFire(self, gridEntity, gridEnt
|
|
|
11
11
|
for ____, ____value in ipairs(subscriptions) do
|
|
12
12
|
local callback = ____value[1]
|
|
13
13
|
local callbackGridEntityTypeCustom = ____value[2]
|
|
14
|
+
local callbackEntityType = ____value[3]
|
|
15
|
+
local callbackEntityVariant = ____value[4]
|
|
14
16
|
do
|
|
15
17
|
if callbackGridEntityTypeCustom ~= nil and callbackGridEntityTypeCustom ~= gridEntityTypeCustom then
|
|
16
18
|
goto __continue5
|
|
17
19
|
end
|
|
20
|
+
if callbackEntityType ~= nil and callbackEntityType ~= entity.Type then
|
|
21
|
+
goto __continue5
|
|
22
|
+
end
|
|
23
|
+
if callbackEntityVariant ~= nil and callbackEntityVariant ~= entity.Variant then
|
|
24
|
+
goto __continue5
|
|
25
|
+
end
|
|
18
26
|
callback(nil, gridEntity, gridEntityTypeCustom, entity)
|
|
19
27
|
end
|
|
20
28
|
::__continue5::
|
package/dist/core/constants.d.ts
CHANGED
|
@@ -116,6 +116,8 @@ export declare const MINUTE_IN_MILLISECONDS: number;
|
|
|
116
116
|
export declare const ONE_BY_ONE_ROOM_GRID_SIZE = 135;
|
|
117
117
|
/** After taking damage, `EntityPlayer.SamsonBerserkCharge` is incremented by this amount. */
|
|
118
118
|
export declare const TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = 10000;
|
|
119
|
+
/** For `GridEntityType.TELEPORTER` (23). */
|
|
120
|
+
export declare const TELEPORTER_ACTIVATION_DISTANCE: number;
|
|
119
121
|
/**
|
|
120
122
|
* This is the number of draw coordinates that each heart spans on the UI in the upper left hand
|
|
121
123
|
* corner.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/core/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAMtC;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB;;;;EAI7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,iCAAiC,SAAS,CAAC;AAExD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,4CAA4C,CAAC;AAE7E,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC,iGAAiG;AACjG,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,eAAO,MAAM,sBAAsB,wBAAwB,CAAC;AAE5D,gGAAgG;AAChG,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAExC,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAErC;;;;GAIG;AACH,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,cAAc,iBAAiB,CAAC;AAE7C;;;;GAIG;AAEH,eAAO,MAAM,+BAA+B,wDAAmC,CAAC;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M,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAgB,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,KAAK,CAAkB,CAAC;AAE5D;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAsB,CAAC"}
|
package/dist/core/constants.lua
CHANGED
|
@@ -97,6 +97,8 @@ ____exports.MINUTE_IN_MILLISECONDS = 60 * ____exports.SECOND_IN_MILLISECONDS
|
|
|
97
97
|
____exports.ONE_BY_ONE_ROOM_GRID_SIZE = 135
|
|
98
98
|
--- After taking damage, `EntityPlayer.SamsonBerserkCharge` is incremented by this amount.
|
|
99
99
|
____exports.TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = 10000
|
|
100
|
+
--- For `GridEntityType.TELEPORTER` (23).
|
|
101
|
+
____exports.TELEPORTER_ACTIVATION_DISTANCE = ____exports.DISTANCE_OF_GRID_TILE / 2
|
|
100
102
|
--- This is the number of draw coordinates that each heart spans on the UI in the upper left hand
|
|
101
103
|
-- corner.
|
|
102
104
|
____exports.UI_HEART_WIDTH = 12
|
|
@@ -323,8 +323,10 @@ export declare enum ModCallbackCustom {
|
|
|
323
323
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
324
324
|
* `POST_GRID_ENTITY_CUSTOM_BROKEN` callback instead.
|
|
325
325
|
*
|
|
326
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
327
|
-
*
|
|
326
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
327
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
328
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
329
|
+
* only fire if it matches the variant provided.
|
|
328
330
|
*
|
|
329
331
|
* ```ts
|
|
330
332
|
* function postGridEntityBroken(gridEntity: GridEntity): void {}
|
|
@@ -339,8 +341,14 @@ export declare enum ModCallbackCustom {
|
|
|
339
341
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
340
342
|
* `POST_GRID_ENTITY_CUSTOM_COLLISION` callback instead.
|
|
341
343
|
*
|
|
342
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
343
|
-
*
|
|
344
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
345
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
346
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
347
|
+
* only fire if it matches the variant provided (for the grid entity).
|
|
348
|
+
* - When registering the callback, takes an optional fourth argument that will make the callback
|
|
349
|
+
* only fire if the colliding entity matches the `EntityType` provided.
|
|
350
|
+
* - When registering the callback, takes an optional fifth argument that will make the callback
|
|
351
|
+
* only fire if the colliding entity matches the variant provided.
|
|
344
352
|
*
|
|
345
353
|
* ```ts
|
|
346
354
|
* function postGridEntityCollision(
|
|
@@ -355,7 +363,8 @@ export declare enum ModCallbackCustom {
|
|
|
355
363
|
* with the `spawnCustomGridEntity` helper function.
|
|
356
364
|
*
|
|
357
365
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
358
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
366
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
367
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
359
368
|
*
|
|
360
369
|
* ```ts
|
|
361
370
|
* function postGridEntityCustomBroken(
|
|
@@ -369,8 +378,13 @@ export declare enum ModCallbackCustom {
|
|
|
369
378
|
* The same as the `POST_GRID_ENTITY_COLLISION` callback, but only fires for grid entities created
|
|
370
379
|
* with the `spawnCustomGridEntity` helper function.
|
|
371
380
|
*
|
|
372
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
373
|
-
*
|
|
381
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
382
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
383
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
384
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
385
|
+
* only fire if the the colliding entity matches the `EntityType` provided.
|
|
386
|
+
* - When registering the callback, takes an optional fourth argument that will make the callback
|
|
387
|
+
* only fire if the the colliding entity matches the variant provided.
|
|
374
388
|
*
|
|
375
389
|
* ```ts
|
|
376
390
|
* function postGridEntityCustomCollision(
|
|
@@ -386,7 +400,8 @@ export declare enum ModCallbackCustom {
|
|
|
386
400
|
* the `spawnCustomGridEntity` helper function.
|
|
387
401
|
*
|
|
388
402
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
389
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
403
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
404
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
390
405
|
*
|
|
391
406
|
* ```ts
|
|
392
407
|
* function postGridEntityCustomInit(
|
|
@@ -401,7 +416,8 @@ export declare enum ModCallbackCustom {
|
|
|
401
416
|
* with the `spawnCustomGridEntity` helper function.
|
|
402
417
|
*
|
|
403
418
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
404
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
419
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
420
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
405
421
|
*
|
|
406
422
|
* ```ts
|
|
407
423
|
* function postGridEntityCustomRemove(
|
|
@@ -416,7 +432,8 @@ export declare enum ModCallbackCustom {
|
|
|
416
432
|
* with the `spawnCustomGridEntity` helper function.
|
|
417
433
|
*
|
|
418
434
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
419
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
435
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
436
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
420
437
|
*
|
|
421
438
|
* ```ts
|
|
422
439
|
* function postGridEntityCustomRender(
|
|
@@ -431,7 +448,8 @@ export declare enum ModCallbackCustom {
|
|
|
431
448
|
* created with the `spawnCustomGridEntity` helper function.
|
|
432
449
|
*
|
|
433
450
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
434
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
451
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
452
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
435
453
|
*
|
|
436
454
|
* ```ts
|
|
437
455
|
* function postGridEntityCustomStateChanged(
|
|
@@ -448,7 +466,8 @@ export declare enum ModCallbackCustom {
|
|
|
448
466
|
* with the `spawnCustomGridEntity` helper function.
|
|
449
467
|
*
|
|
450
468
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
451
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
469
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
470
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
452
471
|
*
|
|
453
472
|
* ```ts
|
|
454
473
|
* function postGridEntityCustomUpdate(
|
|
@@ -469,8 +488,10 @@ export declare enum ModCallbackCustom {
|
|
|
469
488
|
* For grid entities created with `spawnCustomGridEntity`, use the `POST_GRID_ENTITY_CUSTOM_INIT`
|
|
470
489
|
* callback instead.
|
|
471
490
|
*
|
|
472
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
473
|
-
*
|
|
491
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
492
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
493
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
494
|
+
* only fire if it matches the variant provided.
|
|
474
495
|
*
|
|
475
496
|
* ```ts
|
|
476
497
|
* function postGridEntityInit(gridEntity: GridEntity): void {}
|
|
@@ -488,8 +509,10 @@ export declare enum ModCallbackCustom {
|
|
|
488
509
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
489
510
|
* `POST_GRID_ENTITY_CUSTOM_REMOVE` callback instead.
|
|
490
511
|
*
|
|
491
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
492
|
-
*
|
|
512
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
513
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
514
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
515
|
+
* only fire if it matches the variant provided.
|
|
493
516
|
*
|
|
494
517
|
* ```ts
|
|
495
518
|
* function postGridEntityRemove(
|
|
@@ -502,14 +525,14 @@ export declare enum ModCallbackCustom {
|
|
|
502
525
|
/**
|
|
503
526
|
* Fires from the `POST_RENDER` callback on every frame that a grid entity exists.
|
|
504
527
|
*
|
|
528
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
529
|
+
* `POST_GRID_ENTITY_CUSTOM_RENDER` callback instead.
|
|
530
|
+
*
|
|
505
531
|
* - When registering the callback, takes an optional second argument that will make the callback
|
|
506
532
|
* only fire if it matches the `GridEntityType` provided.
|
|
507
533
|
* - When registering the callback, takes an optional third argument that will make the callback
|
|
508
534
|
* only fire if it matches the variant provided.
|
|
509
535
|
*
|
|
510
|
-
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
511
|
-
* `POST_GRID_ENTITY_CUSTOM_RENDER` callback instead.
|
|
512
|
-
*
|
|
513
536
|
* ```ts
|
|
514
537
|
* function postGridEntityRender(gridEntity: GridEntity): void {}
|
|
515
538
|
* ```
|
|
@@ -519,12 +542,14 @@ export declare enum ModCallbackCustom {
|
|
|
519
542
|
* Fires from the `POST_UPDATE` callback when a grid entity changes its state. (In this context,
|
|
520
543
|
* "state" refers to the `GridEntity.State` field.)
|
|
521
544
|
*
|
|
522
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
523
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
524
|
-
*
|
|
525
545
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
526
546
|
* `POST_GRID_ENTITY_CUSTOM_STATE_CHANGED` callback instead.
|
|
527
547
|
*
|
|
548
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
549
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
550
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
551
|
+
* only fire if it matches the variant provided.
|
|
552
|
+
*
|
|
528
553
|
* ```ts
|
|
529
554
|
* function postGridEntityStateChanged(
|
|
530
555
|
* gridEntity: GridEntity,
|
|
@@ -537,14 +562,14 @@ export declare enum ModCallbackCustom {
|
|
|
537
562
|
/**
|
|
538
563
|
* Fires from the `POST_UPDATE` callback on every frame that a grid entity exists.
|
|
539
564
|
*
|
|
565
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
566
|
+
* `POST_GRID_ENTITY_CUSTOM_UPDATE` callback instead.
|
|
567
|
+
*
|
|
540
568
|
* - When registering the callback, takes an optional second argument that will make the callback
|
|
541
569
|
* only fire if it matches the `GridEntityType` provided.
|
|
542
570
|
* - When registering the callback, takes an optional third argument that will make the callback
|
|
543
571
|
* only fire if it matches the variant provided.
|
|
544
572
|
*
|
|
545
|
-
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
546
|
-
* `POST_GRID_ENTITY_CUSTOM_UPDATE` callback instead.
|
|
547
|
-
*
|
|
548
573
|
* ```ts
|
|
549
574
|
* function postGridEntityUpdate(gridEntity: GridEntity): void {}
|
|
550
575
|
* ```
|
|
@@ -1166,7 +1191,8 @@ export declare enum ModCallbackCustom {
|
|
|
1166
1191
|
* certain conditions, like if the slot entity is playing the "Idle" animation, and so on.
|
|
1167
1192
|
*
|
|
1168
1193
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
1169
|
-
* only fire if it matches the `SlotVariant` provided.
|
|
1194
|
+
* only fire if it matches the `SlotVariant` provided. (There is no need for any additional
|
|
1195
|
+
* arguments, since only players will cause this callback to fire.)
|
|
1170
1196
|
*
|
|
1171
1197
|
* ```ts
|
|
1172
1198
|
* function postSlotCollision(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModCallbackCustom.d.ts","sourceRoot":"","sources":["../../src/enums/ModCallbackCustom.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,oBAAY,iBAAiB;IAC3B;;;;;;;;;;OAUG;IACH,oBAAoB,IAAA;IAEpB;;;;;;;;;;OAUG;IACH,mBAAmB,IAAA;IAEnB;;;;;;;;;OASG;IACH,kBAAkB,IAAA;IAElB;;;;;;;;;;;;OAYG;IACH,mBAAmB,IAAA;IAEnB;;;;;;OAMG;IACH,eAAe,IAAA;IAEf;;;;;;;;;;;;;OAaG;IACH,sBAAsB,IAAA;IAEtB;;;;;;;;;;;;;;;OAeG;IACH,2BAA2B,IAAA;IAE3B;;;;;;;;OAQG;IACH,oBAAoB,IAAA;IAEpB;;;;;;;;;;;;;;;OAeG;IACH,sBAAsB,IAAA;IAEtB;;;;;;;;;;;;;;;OAeG;IACH,kBAAkB,IAAA;IAElB;;;;;;;;;;;;;OAaG;IACH,wBAAwB,KAAA;IAExB;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;;;;OAYG;IACH,qBAAqB,KAAA;IAErB;;;;;;;;;;;;;;OAcG;IACH,yBAAyB,KAAA;IAEzB;;;;;;;OAOG;IACH,YAAY,KAAA;IAEZ;;;;;;;;;;;;OAYG;IACH,uBAAuB,KAAA;IAEvB;;;;;;;;;;;;;;;OAeG;IACH,2BAA2B,KAAA;IAE3B;;;;;;;;;;OAUG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;;;OAWG;IACH,eAAe,KAAA;IAEf;;;;;;;;;;;OAWG;IACH,SAAS,KAAA;IAET;;;;;;;;;OASG;IACH,2BAA2B,KAAA;IAE3B;;;;;;;;;OASG;IACH,gCAAgC,KAAA;IAEhC;;;;;;OAMG;IACH,oBAAoB,KAAA;IAEpB
|
|
1
|
+
{"version":3,"file":"ModCallbackCustom.d.ts","sourceRoot":"","sources":["../../src/enums/ModCallbackCustom.ts"],"names":[],"mappings":"AASA;;;;;;;GAOG;AACH,oBAAY,iBAA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AcG;IACH,cAAc,KAAA;IAEd;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;OASG;IACH,gBAAgB,KAAA;IAEhB;;;;;;;;;OASG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;OASG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;;;;;OAaG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;OAYG;IACH,wBAAwB,KAAA;IAExB;;;;;;;;;OASG;IACH,eAAe,KAAA;IAEf;;;;;;;;;OASG;IACH,eAAe,KAAA;IAEf;;;;;;;;;;;;;;;;OAgBG;IACH,mBAAmB,KAAA;IAEnB;;;;;;;;;;;;OAYG;IACH,kBAAkB,KAAA;IAElB;;;;;;;;;;;;;OAaG;IACH,iBAAiB,KAAA;IAEjB;;;;;;;;;;;;;;;;OAgBG;IACH,iBAAiB,KAAA;IAEjB;;;;;;;;;;;;;;;;;OAiBG;IACH,eAAe,KAAA;IAEf;;;;;;;;;;;;OAYG;IACH,aAAa,KAAA;CACd"}
|
|
@@ -1054,7 +1054,7 @@ end
|
|
|
1054
1054
|
-- "debug 10".
|
|
1055
1055
|
function ____exports.spam(self)
|
|
1056
1056
|
v.run.spamBloodRights = not v.run.spamBloodRights
|
|
1057
|
-
printEnabled(nil, v.run.
|
|
1057
|
+
printEnabled(nil, v.run.spamBloodRights, "spamming Blood Rights")
|
|
1058
1058
|
end
|
|
1059
1059
|
--- Spawns a golden version of the specified trinket type.
|
|
1060
1060
|
function ____exports.spawnGoldenTrinket(self, params)
|
|
@@ -86,6 +86,10 @@ export declare function getFilteredNewEntities<T extends AnyEntity>(oldEntities:
|
|
|
86
86
|
/**
|
|
87
87
|
* Helper function to measure an entity's velocity to see if it is moving.
|
|
88
88
|
*
|
|
89
|
+
* Use this helper function over checking if the velocity length is equal to 0 because entities can
|
|
90
|
+
* look like they are completely immobile but yet still have a non zero velocity. Thus, using a
|
|
91
|
+
* threshold is needed.
|
|
92
|
+
*
|
|
89
93
|
* @param entity The entity whose velocity to measure.
|
|
90
94
|
* @param threshold Optional. The threshold from 0 to consider to be moving. Default is 0.01.
|
|
91
95
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/functions/entities.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAI1D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAO/C;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,UAAU,GAAE,UAAe,EAC3B,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,GAAG,CAcL;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,UAAU,GAAE,UAAe,EAC3B,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,OAAO,CAGT;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,SAAS,EACpD,eAAe,EAAE,MAAM,EACvB,QAAQ,EAAE,CAAC,EAAE,GACZ,CAAC,GAAG,SAAS,CAaf;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,WAAW,CACzB,UAAU,GAAE,UAAe,EAC3B,OAAO,SAAK,EACZ,OAAO,SAAK,EACZ,cAAc,UAAQ,GACrB,MAAM,EAAE,CAMV;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,GACb,MAAM,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC,CA8B3C;AA0BD,8FAA8F;AAC9F,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,GACX,MAAM,CAER;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,GAAG,EACZ,QAAQ,EAAE,MAAM,EAChB,QAAQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,EACvC,SAAS,GAAE,IAAI,GAAG,GAAG,GAAG,SAAqB,GAC5C,MAAM,CAsCR;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,IAAI,GAAG,GAAG,EACrB,QAAQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,GACtC,MAAM,CAUR"}
|
|
@@ -235,6 +235,10 @@ function ____exports.getFilteredNewEntities(self, oldEntities, newEntities)
|
|
|
235
235
|
end
|
|
236
236
|
--- Helper function to measure an entity's velocity to see if it is moving.
|
|
237
237
|
--
|
|
238
|
+
-- Use this helper function over checking if the velocity length is equal to 0 because entities can
|
|
239
|
+
-- look like they are completely immobile but yet still have a non zero velocity. Thus, using a
|
|
240
|
+
-- threshold is needed.
|
|
241
|
+
--
|
|
238
242
|
-- @param entity The entity whose velocity to measure.
|
|
239
243
|
-- @param threshold Optional. The threshold from 0 to consider to be moving. Default is 0.01.
|
|
240
244
|
function ____exports.isEntityMoving(self, entity, threshold)
|
|
@@ -127,6 +127,7 @@ export declare function inDoubleTrouble(): boolean;
|
|
|
127
127
|
export declare function inGenesisRoom(): boolean;
|
|
128
128
|
/** Helper function to determine if the current room shape is one of the four L room shapes. */
|
|
129
129
|
export declare function inLRoom(): boolean;
|
|
130
|
+
/** Helper function to determine if the current room index is equal to `GridRoom.MEGA_SATAN`. */
|
|
130
131
|
export declare function inMegaSatanRoom(): boolean;
|
|
131
132
|
/**
|
|
132
133
|
* Helper function to determine if the current room is part of the Repentance "escape sequence" in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rooms.d.ts","sourceRoot":"","sources":["../../src/functions/rooms.ts"],"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O,IAAI,OAAO,CAUjC;AAED,gGAAgG;AAChG,wBAAgB,eAAe,IAAI,OAAO,CAIzC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAWhE;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAWtC;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAItC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAMxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,OAAO,CAcxE;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAWrC;AAED,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAG5D;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,IAAI,CA8BrC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAKvC"}
|
package/dist/functions/rooms.lua
CHANGED
|
@@ -305,6 +305,7 @@ function ____exports.inLRoom(self)
|
|
|
305
305
|
local roomShape = room:GetRoomShape()
|
|
306
306
|
return roomShape == RoomShape.LTL or roomShape == RoomShape.LTR or roomShape == RoomShape.LBL or roomShape == RoomShape.LBR
|
|
307
307
|
end
|
|
308
|
+
--- Helper function to determine if the current room index is equal to `GridRoom.MEGA_SATAN`.
|
|
308
309
|
function ____exports.inMegaSatanRoom(self)
|
|
309
310
|
local roomGridIndex = getRoomGridIndex(nil)
|
|
310
311
|
return roomGridIndex == asNumber(nil, GridRoom.MEGA_SATAN)
|
|
@@ -26,6 +26,10 @@ export declare function getStage(): LevelStage;
|
|
|
26
26
|
export declare function getStageType(): StageType;
|
|
27
27
|
/** Helper function to directly warp to a specific stage using the "stage" console command. */
|
|
28
28
|
export declare function goToStage(stage: LevelStage, stageType: StageType): void;
|
|
29
|
+
/**
|
|
30
|
+
* Helper function to check if the provided stage type is equal to `StageType.REPENTANCE` or
|
|
31
|
+
* `StageType.REPENTANCE_B`.
|
|
32
|
+
*/
|
|
29
33
|
export declare function isRepentanceStage(stageType: StageType): boolean;
|
|
30
34
|
export declare function onAscent(): boolean;
|
|
31
35
|
export declare function onCathedral(): boolean;
|
|
@@ -47,6 +51,10 @@ export declare function onFinalFloor(): boolean;
|
|
|
47
51
|
* first floor and The Ascent.
|
|
48
52
|
*/
|
|
49
53
|
export declare function onFirstFloor(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Helper function to check if the current stage type is equal to `StageType.REPENTANCE` or
|
|
56
|
+
* `StageType.REPENTANCE_B`.
|
|
57
|
+
*/
|
|
50
58
|
export declare function onRepentanceStage(): boolean;
|
|
51
59
|
export declare function onSheol(): boolean;
|
|
52
60
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stage.d.ts","sourceRoot":"","sources":["../../src/functions/stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EACV,QAAQ,EACR,SAAS,EACV,MAAM,8BAA8B,CAAC;AAOtC;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CA6B/D;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,CAmBzE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CASvC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,EAAE,WAAW,EAAE,GAAG,GAAG,MAAM,CAG3E;AAED,6CAA6C;AAC7C,wBAAgB,QAAQ,IAAI,UAAU,CAIrC;AAED,iDAAiD;AACjD,wBAAgB,YAAY,IAAI,SAAS,CAIxC;AAED,8FAA8F;AAC9F,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,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,8FAA8F;AAC9F,wBAAgB,SAAS,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,CAIvE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,OAAO,CAI/D;AAED,wBAAgB,QAAQ,IAAI,OAAO,CAElC;AAED,wBAAgB,WAAW,IAAI,OAAO,CASrC;AAED,wBAAgB,OAAO,IAAI,OAAO,CASjC;AAED,wBAAgB,UAAU,IAAI,OAAO,CAQpC;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAUtC;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAKtC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAK3C;AAED,wBAAgB,OAAO,IAAI,OAAO,CAQjC;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,UAAU,EACjB,SAAS,EAAE,SAAS,EACpB,MAAM,UAAQ,GACb,IAAI,CAUN;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,CAE9D"}
|
package/dist/functions/stage.lua
CHANGED
|
@@ -14,9 +14,13 @@ local STAGE_TYPE_TO_LETTER = ____stageTypeToLetter.STAGE_TYPE_TO_LETTER
|
|
|
14
14
|
local ____types = require("functions.types")
|
|
15
15
|
local asLevelStage = ____types.asLevelStage
|
|
16
16
|
local asNumber = ____types.asNumber
|
|
17
|
+
--- Helper function to check if the provided stage type is equal to `StageType.REPENTANCE` or
|
|
18
|
+
-- `StageType.REPENTANCE_B`.
|
|
17
19
|
function ____exports.isRepentanceStage(self, stageType)
|
|
18
20
|
return stageType == StageType.REPENTANCE or stageType == StageType.REPENTANCE_B
|
|
19
21
|
end
|
|
22
|
+
--- Helper function to check if the current stage type is equal to `StageType.REPENTANCE` or
|
|
23
|
+
-- `StageType.REPENTANCE_B`.
|
|
20
24
|
function ____exports.onRepentanceStage(self)
|
|
21
25
|
local level = game:GetLevel()
|
|
22
26
|
local stageType = level:GetStageType()
|
package/dist/index.d.ts
CHANGED
|
@@ -5433,6 +5433,7 @@ export declare function initCustomDoor(mod: ModUpgraded, effectVariant: EffectVa
|
|
|
5433
5433
|
/** Helper function to determine if the current room shape is one of the four L room shapes. */
|
|
5434
5434
|
export declare function inLRoom(): boolean;
|
|
5435
5435
|
|
|
5436
|
+
/** Helper function to determine if the current room index is equal to `GridRoom.MEGA_SATAN`. */
|
|
5436
5437
|
export declare function inMegaSatanRoom(): boolean;
|
|
5437
5438
|
|
|
5438
5439
|
/**
|
|
@@ -5783,6 +5784,10 @@ export declare function isEntity(variable: unknown): variable is Entity;
|
|
|
5783
5784
|
/**
|
|
5784
5785
|
* Helper function to measure an entity's velocity to see if it is moving.
|
|
5785
5786
|
*
|
|
5787
|
+
* Use this helper function over checking if the velocity length is equal to 0 because entities can
|
|
5788
|
+
* look like they are completely immobile but yet still have a non zero velocity. Thus, using a
|
|
5789
|
+
* threshold is needed.
|
|
5790
|
+
*
|
|
5786
5791
|
* @param entity The entity whose velocity to measure.
|
|
5787
5792
|
* @param threshold Optional. The threshold from 0 to consider to be moving. Default is 0.01.
|
|
5788
5793
|
*/
|
|
@@ -6049,6 +6054,10 @@ export declare function isReflectionRender(): boolean;
|
|
|
6049
6054
|
*/
|
|
6050
6055
|
export declare function isRepentanceDoor(door: GridEntityDoor): boolean;
|
|
6051
6056
|
|
|
6057
|
+
/**
|
|
6058
|
+
* Helper function to check if the provided stage type is equal to `StageType.REPENTANCE` or
|
|
6059
|
+
* `StageType.REPENTANCE_B`.
|
|
6060
|
+
*/
|
|
6052
6061
|
export declare function isRepentanceStage(stageType: StageType): boolean;
|
|
6053
6062
|
|
|
6054
6063
|
/** Returns true for cards that have `ItemConfigCardType.TAROT_REVERSE`. */
|
|
@@ -7014,8 +7023,10 @@ export declare enum ModCallbackCustom {
|
|
|
7014
7023
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7015
7024
|
* `POST_GRID_ENTITY_CUSTOM_BROKEN` callback instead.
|
|
7016
7025
|
*
|
|
7017
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
7018
|
-
*
|
|
7026
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
7027
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
7028
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
7029
|
+
* only fire if it matches the variant provided.
|
|
7019
7030
|
*
|
|
7020
7031
|
* ```ts
|
|
7021
7032
|
* function postGridEntityBroken(gridEntity: GridEntity): void {}
|
|
@@ -7030,8 +7041,14 @@ export declare enum ModCallbackCustom {
|
|
|
7030
7041
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7031
7042
|
* `POST_GRID_ENTITY_CUSTOM_COLLISION` callback instead.
|
|
7032
7043
|
*
|
|
7033
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
7034
|
-
*
|
|
7044
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
7045
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
7046
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
7047
|
+
* only fire if it matches the variant provided (for the grid entity).
|
|
7048
|
+
* - When registering the callback, takes an optional fourth argument that will make the callback
|
|
7049
|
+
* only fire if the colliding entity matches the `EntityType` provided.
|
|
7050
|
+
* - When registering the callback, takes an optional fifth argument that will make the callback
|
|
7051
|
+
* only fire if the colliding entity matches the variant provided.
|
|
7035
7052
|
*
|
|
7036
7053
|
* ```ts
|
|
7037
7054
|
* function postGridEntityCollision(
|
|
@@ -7046,7 +7063,8 @@ export declare enum ModCallbackCustom {
|
|
|
7046
7063
|
* with the `spawnCustomGridEntity` helper function.
|
|
7047
7064
|
*
|
|
7048
7065
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
7049
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
7066
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
7067
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
7050
7068
|
*
|
|
7051
7069
|
* ```ts
|
|
7052
7070
|
* function postGridEntityCustomBroken(
|
|
@@ -7060,8 +7078,13 @@ export declare enum ModCallbackCustom {
|
|
|
7060
7078
|
* The same as the `POST_GRID_ENTITY_COLLISION` callback, but only fires for grid entities created
|
|
7061
7079
|
* with the `spawnCustomGridEntity` helper function.
|
|
7062
7080
|
*
|
|
7063
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
7064
|
-
*
|
|
7081
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
7082
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
7083
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
7084
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
7085
|
+
* only fire if the the colliding entity matches the `EntityType` provided.
|
|
7086
|
+
* - When registering the callback, takes an optional fourth argument that will make the callback
|
|
7087
|
+
* only fire if the the colliding entity matches the variant provided.
|
|
7065
7088
|
*
|
|
7066
7089
|
* ```ts
|
|
7067
7090
|
* function postGridEntityCustomCollision(
|
|
@@ -7077,7 +7100,8 @@ export declare enum ModCallbackCustom {
|
|
|
7077
7100
|
* the `spawnCustomGridEntity` helper function.
|
|
7078
7101
|
*
|
|
7079
7102
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
7080
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
7103
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
7104
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
7081
7105
|
*
|
|
7082
7106
|
* ```ts
|
|
7083
7107
|
* function postGridEntityCustomInit(
|
|
@@ -7092,7 +7116,8 @@ export declare enum ModCallbackCustom {
|
|
|
7092
7116
|
* with the `spawnCustomGridEntity` helper function.
|
|
7093
7117
|
*
|
|
7094
7118
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
7095
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
7119
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
7120
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
7096
7121
|
*
|
|
7097
7122
|
* ```ts
|
|
7098
7123
|
* function postGridEntityCustomRemove(
|
|
@@ -7107,7 +7132,8 @@ export declare enum ModCallbackCustom {
|
|
|
7107
7132
|
* with the `spawnCustomGridEntity` helper function.
|
|
7108
7133
|
*
|
|
7109
7134
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
7110
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
7135
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
7136
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
7111
7137
|
*
|
|
7112
7138
|
* ```ts
|
|
7113
7139
|
* function postGridEntityCustomRender(
|
|
@@ -7122,7 +7148,8 @@ export declare enum ModCallbackCustom {
|
|
|
7122
7148
|
* created with the `spawnCustomGridEntity` helper function.
|
|
7123
7149
|
*
|
|
7124
7150
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
7125
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
7151
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
7152
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
7126
7153
|
*
|
|
7127
7154
|
* ```ts
|
|
7128
7155
|
* function postGridEntityCustomStateChanged(
|
|
@@ -7139,7 +7166,8 @@ export declare enum ModCallbackCustom {
|
|
|
7139
7166
|
* with the `spawnCustomGridEntity` helper function.
|
|
7140
7167
|
*
|
|
7141
7168
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
7142
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
7169
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
7170
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
7143
7171
|
*
|
|
7144
7172
|
* ```ts
|
|
7145
7173
|
* function postGridEntityCustomUpdate(
|
|
@@ -7160,8 +7188,10 @@ export declare enum ModCallbackCustom {
|
|
|
7160
7188
|
* For grid entities created with `spawnCustomGridEntity`, use the `POST_GRID_ENTITY_CUSTOM_INIT`
|
|
7161
7189
|
* callback instead.
|
|
7162
7190
|
*
|
|
7163
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
7164
|
-
*
|
|
7191
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
7192
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
7193
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
7194
|
+
* only fire if it matches the variant provided.
|
|
7165
7195
|
*
|
|
7166
7196
|
* ```ts
|
|
7167
7197
|
* function postGridEntityInit(gridEntity: GridEntity): void {}
|
|
@@ -7179,8 +7209,10 @@ export declare enum ModCallbackCustom {
|
|
|
7179
7209
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7180
7210
|
* `POST_GRID_ENTITY_CUSTOM_REMOVE` callback instead.
|
|
7181
7211
|
*
|
|
7182
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
7183
|
-
*
|
|
7212
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
7213
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
7214
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
7215
|
+
* only fire if it matches the variant provided.
|
|
7184
7216
|
*
|
|
7185
7217
|
* ```ts
|
|
7186
7218
|
* function postGridEntityRemove(
|
|
@@ -7193,14 +7225,14 @@ export declare enum ModCallbackCustom {
|
|
|
7193
7225
|
/**
|
|
7194
7226
|
* Fires from the `POST_RENDER` callback on every frame that a grid entity exists.
|
|
7195
7227
|
*
|
|
7228
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7229
|
+
* `POST_GRID_ENTITY_CUSTOM_RENDER` callback instead.
|
|
7230
|
+
*
|
|
7196
7231
|
* - When registering the callback, takes an optional second argument that will make the callback
|
|
7197
7232
|
* only fire if it matches the `GridEntityType` provided.
|
|
7198
7233
|
* - When registering the callback, takes an optional third argument that will make the callback
|
|
7199
7234
|
* only fire if it matches the variant provided.
|
|
7200
7235
|
*
|
|
7201
|
-
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7202
|
-
* `POST_GRID_ENTITY_CUSTOM_RENDER` callback instead.
|
|
7203
|
-
*
|
|
7204
7236
|
* ```ts
|
|
7205
7237
|
* function postGridEntityRender(gridEntity: GridEntity): void {}
|
|
7206
7238
|
* ```
|
|
@@ -7210,12 +7242,14 @@ export declare enum ModCallbackCustom {
|
|
|
7210
7242
|
* Fires from the `POST_UPDATE` callback when a grid entity changes its state. (In this context,
|
|
7211
7243
|
* "state" refers to the `GridEntity.State` field.)
|
|
7212
7244
|
*
|
|
7213
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
7214
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
7215
|
-
*
|
|
7216
7245
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7217
7246
|
* `POST_GRID_ENTITY_CUSTOM_STATE_CHANGED` callback instead.
|
|
7218
7247
|
*
|
|
7248
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
7249
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
7250
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
7251
|
+
* only fire if it matches the variant provided.
|
|
7252
|
+
*
|
|
7219
7253
|
* ```ts
|
|
7220
7254
|
* function postGridEntityStateChanged(
|
|
7221
7255
|
* gridEntity: GridEntity,
|
|
@@ -7228,14 +7262,14 @@ export declare enum ModCallbackCustom {
|
|
|
7228
7262
|
/**
|
|
7229
7263
|
* Fires from the `POST_UPDATE` callback on every frame that a grid entity exists.
|
|
7230
7264
|
*
|
|
7265
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7266
|
+
* `POST_GRID_ENTITY_CUSTOM_UPDATE` callback instead.
|
|
7267
|
+
*
|
|
7231
7268
|
* - When registering the callback, takes an optional second argument that will make the callback
|
|
7232
7269
|
* only fire if it matches the `GridEntityType` provided.
|
|
7233
7270
|
* - When registering the callback, takes an optional third argument that will make the callback
|
|
7234
7271
|
* only fire if it matches the variant provided.
|
|
7235
7272
|
*
|
|
7236
|
-
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
7237
|
-
* `POST_GRID_ENTITY_CUSTOM_UPDATE` callback instead.
|
|
7238
|
-
*
|
|
7239
7273
|
* ```ts
|
|
7240
7274
|
* function postGridEntityUpdate(gridEntity: GridEntity): void {}
|
|
7241
7275
|
* ```
|
|
@@ -7857,7 +7891,8 @@ export declare enum ModCallbackCustom {
|
|
|
7857
7891
|
* certain conditions, like if the slot entity is playing the "Idle" animation, and so on.
|
|
7858
7892
|
*
|
|
7859
7893
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
7860
|
-
* only fire if it matches the `SlotVariant` provided.
|
|
7894
|
+
* only fire if it matches the `SlotVariant` provided. (There is no need for any additional
|
|
7895
|
+
* arguments, since only players will cause this callback to fire.)
|
|
7861
7896
|
*
|
|
7862
7897
|
* ```ts
|
|
7863
7898
|
* function postSlotCollision(
|
|
@@ -8263,6 +8298,10 @@ export declare function onFinalFloor(): boolean;
|
|
|
8263
8298
|
*/
|
|
8264
8299
|
export declare function onFirstFloor(): boolean;
|
|
8265
8300
|
|
|
8301
|
+
/**
|
|
8302
|
+
* Helper function to check if the current stage type is equal to `StageType.REPENTANCE` or
|
|
8303
|
+
* `StageType.REPENTANCE_B`.
|
|
8304
|
+
*/
|
|
8266
8305
|
export declare function onRepentanceStage(): boolean;
|
|
8267
8306
|
|
|
8268
8307
|
/**
|
|
@@ -8571,7 +8610,9 @@ gridEntityVariant?: int
|
|
|
8571
8610
|
declare type PostGridEntityCollisionRegisterParameters = [
|
|
8572
8611
|
callback: (gridEntity: GridEntity, entity: Entity) => void,
|
|
8573
8612
|
gridEntityType?: GridEntityType,
|
|
8574
|
-
gridEntityVariant?: int
|
|
8613
|
+
gridEntityVariant?: int,
|
|
8614
|
+
entityType?: EntityType,
|
|
8615
|
+
entityVariant?: int
|
|
8575
8616
|
];
|
|
8576
8617
|
|
|
8577
8618
|
declare type PostGridEntityCustomBrokenRegisterParameters = [
|
|
@@ -8581,7 +8622,9 @@ gridEntityTypeCustom?: GridEntityType
|
|
|
8581
8622
|
|
|
8582
8623
|
declare type PostGridEntityCustomCollisionRegisterParameters = [
|
|
8583
8624
|
callback: (gridEntity: GridEntity, gridEntityTypeCustom: GridEntityType, entity: Entity) => void,
|
|
8584
|
-
gridEntityTypeCustom?: GridEntityType
|
|
8625
|
+
gridEntityTypeCustom?: GridEntityType,
|
|
8626
|
+
entityType?: EntityType,
|
|
8627
|
+
entityVariant?: int
|
|
8585
8628
|
];
|
|
8586
8629
|
|
|
8587
8630
|
declare type PostGridEntityCustomInitRegisterParameters = [
|
|
@@ -11285,6 +11328,9 @@ export declare function tanh(x: number): number;
|
|
|
11285
11328
|
*/
|
|
11286
11329
|
export declare function teleport(roomGridIndex: int, direction?: Direction, roomTransitionAnim?: RoomTransitionAnim, force?: boolean): void;
|
|
11287
11330
|
|
|
11331
|
+
/** For `GridEntityType.TELEPORTER` (23). */
|
|
11332
|
+
export declare const TELEPORTER_ACTIVATION_DISTANCE: number;
|
|
11333
|
+
|
|
11288
11334
|
/**
|
|
11289
11335
|
* Helper function to temporarily remove a specific kind of trinket from the player. Use this in
|
|
11290
11336
|
* combination with the `giveTrinketsBack` function to take away and give back a trinket on the same
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { GridEntityType } from "isaac-typescript-definitions";
|
|
1
|
+
import { EntityType, GridEntityType } from "isaac-typescript-definitions";
|
|
2
2
|
|
|
3
3
|
export type PostGridEntityCollisionRegisterParameters = [
|
|
4
4
|
callback: (gridEntity: GridEntity, entity: Entity) => void,
|
|
5
5
|
gridEntityType?: GridEntityType,
|
|
6
6
|
gridEntityVariant?: int,
|
|
7
|
+
entityType?: EntityType,
|
|
8
|
+
entityVariant?: int,
|
|
7
9
|
];
|
|
8
10
|
|
|
9
11
|
const subscriptions: PostGridEntityCollisionRegisterParameters[] = [];
|
|
@@ -29,6 +31,8 @@ export function postGridEntityCollisionFire(
|
|
|
29
31
|
callback,
|
|
30
32
|
callbackGridEntityType,
|
|
31
33
|
callbackGridEntityVariant,
|
|
34
|
+
callbackEntityType,
|
|
35
|
+
callbackEntityVariant,
|
|
32
36
|
] of subscriptions) {
|
|
33
37
|
// Handle the optional 2nd callback argument.
|
|
34
38
|
if (
|
|
@@ -46,6 +50,22 @@ export function postGridEntityCollisionFire(
|
|
|
46
50
|
continue;
|
|
47
51
|
}
|
|
48
52
|
|
|
53
|
+
// Handle the optional 4th callback argument.
|
|
54
|
+
if (
|
|
55
|
+
callbackEntityType !== undefined &&
|
|
56
|
+
callbackEntityType !== entity.Type
|
|
57
|
+
) {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Handle the optional 5th callback argument.
|
|
62
|
+
if (
|
|
63
|
+
callbackEntityVariant !== undefined &&
|
|
64
|
+
callbackEntityVariant !== entity.Variant
|
|
65
|
+
) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
|
|
49
69
|
callback(gridEntity, entity);
|
|
50
70
|
}
|
|
51
71
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GridEntityType } from "isaac-typescript-definitions";
|
|
1
|
+
import { EntityType, GridEntityType } from "isaac-typescript-definitions";
|
|
2
2
|
|
|
3
3
|
export type PostGridEntityCustomCollisionRegisterParameters = [
|
|
4
4
|
callback: (
|
|
@@ -7,6 +7,8 @@ export type PostGridEntityCustomCollisionRegisterParameters = [
|
|
|
7
7
|
entity: Entity,
|
|
8
8
|
) => void,
|
|
9
9
|
gridEntityTypeCustom?: GridEntityType,
|
|
10
|
+
entityType?: EntityType,
|
|
11
|
+
entityVariant?: int,
|
|
10
12
|
];
|
|
11
13
|
|
|
12
14
|
const subscriptions: PostGridEntityCustomCollisionRegisterParameters[] = [];
|
|
@@ -26,7 +28,12 @@ export function postGridEntityCustomCollisionFire(
|
|
|
26
28
|
gridEntityTypeCustom: GridEntityType,
|
|
27
29
|
entity: Entity,
|
|
28
30
|
): void {
|
|
29
|
-
for (const [
|
|
31
|
+
for (const [
|
|
32
|
+
callback,
|
|
33
|
+
callbackGridEntityTypeCustom,
|
|
34
|
+
callbackEntityType,
|
|
35
|
+
callbackEntityVariant,
|
|
36
|
+
] of subscriptions) {
|
|
30
37
|
// Handle the optional 2nd callback argument.
|
|
31
38
|
if (
|
|
32
39
|
callbackGridEntityTypeCustom !== undefined &&
|
|
@@ -35,6 +42,22 @@ export function postGridEntityCustomCollisionFire(
|
|
|
35
42
|
continue;
|
|
36
43
|
}
|
|
37
44
|
|
|
45
|
+
// Handle the optional 3rd callback argument.
|
|
46
|
+
if (
|
|
47
|
+
callbackEntityType !== undefined &&
|
|
48
|
+
callbackEntityType !== entity.Type
|
|
49
|
+
) {
|
|
50
|
+
continue;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Handle the optional 4th callback argument.
|
|
54
|
+
if (
|
|
55
|
+
callbackEntityVariant !== undefined &&
|
|
56
|
+
callbackEntityVariant !== entity.Variant
|
|
57
|
+
) {
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
|
|
38
61
|
callback(gridEntity, gridEntityTypeCustom, entity);
|
|
39
62
|
}
|
|
40
63
|
}
|
package/src/core/constants.ts
CHANGED
|
@@ -161,6 +161,9 @@ export const ONE_BY_ONE_ROOM_GRID_SIZE = 135;
|
|
|
161
161
|
/** After taking damage, `EntityPlayer.SamsonBerserkCharge` is incremented by this amount. */
|
|
162
162
|
export const TAINTED_SAMSON_BERSERK_CHARGE_FROM_TAKING_DAMAGE = 10000;
|
|
163
163
|
|
|
164
|
+
/** For `GridEntityType.TELEPORTER` (23). */
|
|
165
|
+
export const TELEPORTER_ACTIVATION_DISTANCE = DISTANCE_OF_GRID_TILE / 2;
|
|
166
|
+
|
|
164
167
|
/**
|
|
165
168
|
* This is the number of draw coordinates that each heart spans on the UI in the upper left hand
|
|
166
169
|
* corner.
|
|
@@ -356,8 +356,10 @@ export enum ModCallbackCustom {
|
|
|
356
356
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
357
357
|
* `POST_GRID_ENTITY_CUSTOM_BROKEN` callback instead.
|
|
358
358
|
*
|
|
359
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
360
|
-
*
|
|
359
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
360
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
361
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
362
|
+
* only fire if it matches the variant provided.
|
|
361
363
|
*
|
|
362
364
|
* ```ts
|
|
363
365
|
* function postGridEntityBroken(gridEntity: GridEntity): void {}
|
|
@@ -373,8 +375,14 @@ export enum ModCallbackCustom {
|
|
|
373
375
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
374
376
|
* `POST_GRID_ENTITY_CUSTOM_COLLISION` callback instead.
|
|
375
377
|
*
|
|
376
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
377
|
-
*
|
|
378
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
379
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
380
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
381
|
+
* only fire if it matches the variant provided (for the grid entity).
|
|
382
|
+
* - When registering the callback, takes an optional fourth argument that will make the callback
|
|
383
|
+
* only fire if the colliding entity matches the `EntityType` provided.
|
|
384
|
+
* - When registering the callback, takes an optional fifth argument that will make the callback
|
|
385
|
+
* only fire if the colliding entity matches the variant provided.
|
|
378
386
|
*
|
|
379
387
|
* ```ts
|
|
380
388
|
* function postGridEntityCollision(
|
|
@@ -390,7 +398,8 @@ export enum ModCallbackCustom {
|
|
|
390
398
|
* with the `spawnCustomGridEntity` helper function.
|
|
391
399
|
*
|
|
392
400
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
393
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
401
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
402
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
394
403
|
*
|
|
395
404
|
* ```ts
|
|
396
405
|
* function postGridEntityCustomBroken(
|
|
@@ -405,8 +414,13 @@ export enum ModCallbackCustom {
|
|
|
405
414
|
* The same as the `POST_GRID_ENTITY_COLLISION` callback, but only fires for grid entities created
|
|
406
415
|
* with the `spawnCustomGridEntity` helper function.
|
|
407
416
|
*
|
|
408
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
409
|
-
*
|
|
417
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
418
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
419
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
420
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
421
|
+
* only fire if the the colliding entity matches the `EntityType` provided.
|
|
422
|
+
* - When registering the callback, takes an optional fourth argument that will make the callback
|
|
423
|
+
* only fire if the the colliding entity matches the variant provided.
|
|
410
424
|
*
|
|
411
425
|
* ```ts
|
|
412
426
|
* function postGridEntityCustomCollision(
|
|
@@ -423,7 +437,8 @@ export enum ModCallbackCustom {
|
|
|
423
437
|
* the `spawnCustomGridEntity` helper function.
|
|
424
438
|
*
|
|
425
439
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
426
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
440
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
441
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
427
442
|
*
|
|
428
443
|
* ```ts
|
|
429
444
|
* function postGridEntityCustomInit(
|
|
@@ -439,7 +454,8 @@ export enum ModCallbackCustom {
|
|
|
439
454
|
* with the `spawnCustomGridEntity` helper function.
|
|
440
455
|
*
|
|
441
456
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
442
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
457
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
458
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
443
459
|
*
|
|
444
460
|
* ```ts
|
|
445
461
|
* function postGridEntityCustomRemove(
|
|
@@ -455,7 +471,8 @@ export enum ModCallbackCustom {
|
|
|
455
471
|
* with the `spawnCustomGridEntity` helper function.
|
|
456
472
|
*
|
|
457
473
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
458
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
474
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
475
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
459
476
|
*
|
|
460
477
|
* ```ts
|
|
461
478
|
* function postGridEntityCustomRender(
|
|
@@ -471,7 +488,8 @@ export enum ModCallbackCustom {
|
|
|
471
488
|
* created with the `spawnCustomGridEntity` helper function.
|
|
472
489
|
*
|
|
473
490
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
474
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
491
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
492
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
475
493
|
*
|
|
476
494
|
* ```ts
|
|
477
495
|
* function postGridEntityCustomStateChanged(
|
|
@@ -489,7 +507,8 @@ export enum ModCallbackCustom {
|
|
|
489
507
|
* with the `spawnCustomGridEntity` helper function.
|
|
490
508
|
*
|
|
491
509
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
492
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
510
|
+
* only fire if it matches the `GridEntityType` provided. (Custom grid entities do not have
|
|
511
|
+
* variants, so there is no need for an optional third argument to filter by variant.)
|
|
493
512
|
*
|
|
494
513
|
* ```ts
|
|
495
514
|
* function postGridEntityCustomUpdate(
|
|
@@ -511,8 +530,10 @@ export enum ModCallbackCustom {
|
|
|
511
530
|
* For grid entities created with `spawnCustomGridEntity`, use the `POST_GRID_ENTITY_CUSTOM_INIT`
|
|
512
531
|
* callback instead.
|
|
513
532
|
*
|
|
514
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
515
|
-
*
|
|
533
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
534
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
535
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
536
|
+
* only fire if it matches the variant provided.
|
|
516
537
|
*
|
|
517
538
|
* ```ts
|
|
518
539
|
* function postGridEntityInit(gridEntity: GridEntity): void {}
|
|
@@ -531,8 +552,10 @@ export enum ModCallbackCustom {
|
|
|
531
552
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
532
553
|
* `POST_GRID_ENTITY_CUSTOM_REMOVE` callback instead.
|
|
533
554
|
*
|
|
534
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
535
|
-
*
|
|
555
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
556
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
557
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
558
|
+
* only fire if it matches the variant provided.
|
|
536
559
|
*
|
|
537
560
|
* ```ts
|
|
538
561
|
* function postGridEntityRemove(
|
|
@@ -546,14 +569,14 @@ export enum ModCallbackCustom {
|
|
|
546
569
|
/**
|
|
547
570
|
* Fires from the `POST_RENDER` callback on every frame that a grid entity exists.
|
|
548
571
|
*
|
|
572
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
573
|
+
* `POST_GRID_ENTITY_CUSTOM_RENDER` callback instead.
|
|
574
|
+
*
|
|
549
575
|
* - When registering the callback, takes an optional second argument that will make the callback
|
|
550
576
|
* only fire if it matches the `GridEntityType` provided.
|
|
551
577
|
* - When registering the callback, takes an optional third argument that will make the callback
|
|
552
578
|
* only fire if it matches the variant provided.
|
|
553
579
|
*
|
|
554
|
-
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
555
|
-
* `POST_GRID_ENTITY_CUSTOM_RENDER` callback instead.
|
|
556
|
-
*
|
|
557
580
|
* ```ts
|
|
558
581
|
* function postGridEntityRender(gridEntity: GridEntity): void {}
|
|
559
582
|
* ```
|
|
@@ -564,12 +587,14 @@ export enum ModCallbackCustom {
|
|
|
564
587
|
* Fires from the `POST_UPDATE` callback when a grid entity changes its state. (In this context,
|
|
565
588
|
* "state" refers to the `GridEntity.State` field.)
|
|
566
589
|
*
|
|
567
|
-
* When registering the callback, takes an optional second argument that will make the callback
|
|
568
|
-
* only fire if it matches the `GridEntityType` provided.
|
|
569
|
-
*
|
|
570
590
|
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
571
591
|
* `POST_GRID_ENTITY_CUSTOM_STATE_CHANGED` callback instead.
|
|
572
592
|
*
|
|
593
|
+
* - When registering the callback, takes an optional second argument that will make the callback
|
|
594
|
+
* only fire if it matches the `GridEntityType` provided.
|
|
595
|
+
* - When registering the callback, takes an optional third argument that will make the callback
|
|
596
|
+
* only fire if it matches the variant provided.
|
|
597
|
+
*
|
|
573
598
|
* ```ts
|
|
574
599
|
* function postGridEntityStateChanged(
|
|
575
600
|
* gridEntity: GridEntity,
|
|
@@ -583,14 +608,14 @@ export enum ModCallbackCustom {
|
|
|
583
608
|
/**
|
|
584
609
|
* Fires from the `POST_UPDATE` callback on every frame that a grid entity exists.
|
|
585
610
|
*
|
|
611
|
+
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
612
|
+
* `POST_GRID_ENTITY_CUSTOM_UPDATE` callback instead.
|
|
613
|
+
*
|
|
586
614
|
* - When registering the callback, takes an optional second argument that will make the callback
|
|
587
615
|
* only fire if it matches the `GridEntityType` provided.
|
|
588
616
|
* - When registering the callback, takes an optional third argument that will make the callback
|
|
589
617
|
* only fire if it matches the variant provided.
|
|
590
618
|
*
|
|
591
|
-
* For grid entities created with `spawnCustomGridEntity`, use the
|
|
592
|
-
* `POST_GRID_ENTITY_CUSTOM_UPDATE` callback instead.
|
|
593
|
-
*
|
|
594
619
|
* ```ts
|
|
595
620
|
* function postGridEntityUpdate(gridEntity: GridEntity): void {}
|
|
596
621
|
* ```
|
|
@@ -1251,7 +1276,8 @@ export enum ModCallbackCustom {
|
|
|
1251
1276
|
* certain conditions, like if the slot entity is playing the "Idle" animation, and so on.
|
|
1252
1277
|
*
|
|
1253
1278
|
* When registering the callback, takes an optional second argument that will make the callback
|
|
1254
|
-
* only fire if it matches the `SlotVariant` provided.
|
|
1279
|
+
* only fire if it matches the `SlotVariant` provided. (There is no need for any additional
|
|
1280
|
+
* arguments, since only players will cause this callback to fire.)
|
|
1255
1281
|
*
|
|
1256
1282
|
* ```ts
|
|
1257
1283
|
* function postSlotCollision(
|
|
@@ -1249,7 +1249,7 @@ export function sounds(): void {
|
|
|
1249
1249
|
*/
|
|
1250
1250
|
export function spam(): void {
|
|
1251
1251
|
v.run.spamBloodRights = !v.run.spamBloodRights;
|
|
1252
|
-
printEnabled(v.run.
|
|
1252
|
+
printEnabled(v.run.spamBloodRights, "spamming Blood Rights");
|
|
1253
1253
|
}
|
|
1254
1254
|
|
|
1255
1255
|
/** Spawns a golden version of the specified trinket type. */
|
|
@@ -234,6 +234,10 @@ export function getFilteredNewEntities<T extends AnyEntity>(
|
|
|
234
234
|
/**
|
|
235
235
|
* Helper function to measure an entity's velocity to see if it is moving.
|
|
236
236
|
*
|
|
237
|
+
* Use this helper function over checking if the velocity length is equal to 0 because entities can
|
|
238
|
+
* look like they are completely immobile but yet still have a non zero velocity. Thus, using a
|
|
239
|
+
* threshold is needed.
|
|
240
|
+
*
|
|
237
241
|
* @param entity The entity whose velocity to measure.
|
|
238
242
|
* @param threshold Optional. The threshold from 0 to consider to be moving. Default is 0.01.
|
|
239
243
|
*/
|
package/src/functions/rooms.ts
CHANGED
package/src/functions/stage.ts
CHANGED
|
@@ -116,6 +116,10 @@ export function goToStage(stage: LevelStage, stageType: StageType): void {
|
|
|
116
116
|
Isaac.ExecuteCommand(command);
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Helper function to check if the provided stage type is equal to `StageType.REPENTANCE` or
|
|
121
|
+
* `StageType.REPENTANCE_B`.
|
|
122
|
+
*/
|
|
119
123
|
export function isRepentanceStage(stageType: StageType): boolean {
|
|
120
124
|
return (
|
|
121
125
|
stageType === StageType.REPENTANCE || stageType === StageType.REPENTANCE_B
|
|
@@ -191,6 +195,10 @@ export function onFirstFloor(): boolean {
|
|
|
191
195
|
return effectiveStage === 1 && !isOnAscent;
|
|
192
196
|
}
|
|
193
197
|
|
|
198
|
+
/**
|
|
199
|
+
* Helper function to check if the current stage type is equal to `StageType.REPENTANCE` or
|
|
200
|
+
* `StageType.REPENTANCE_B`.
|
|
201
|
+
*/
|
|
194
202
|
export function onRepentanceStage(): boolean {
|
|
195
203
|
const level = game.GetLevel();
|
|
196
204
|
const stageType = level.GetStageType();
|