isaacscript-common 39.3.0 → 39.3.2
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.rollup.d.ts +5 -2
- package/dist/isaacscript-common.lua +2 -2
- package/dist/src/functions/gridEntities.d.ts +5 -2
- package/dist/src/functions/gridEntities.d.ts.map +1 -1
- package/dist/src/functions/gridEntities.lua +6 -3
- package/package.json +2 -2
- package/src/functions/gridEntities.ts +11 -5
package/dist/index.rollup.d.ts
CHANGED
|
@@ -8931,8 +8931,11 @@ export declare function isPoopPickup(pickup: EntityPickup): pickup is EntityPick
|
|
|
8931
8931
|
|
|
8932
8932
|
/**
|
|
8933
8933
|
* Helper function to detect whether a given Void Portal is one that randomly spawns after a boss is
|
|
8934
|
-
* defeated or is one that naturally spawns in the room after Hush.
|
|
8935
|
-
*
|
|
8934
|
+
* defeated or is one that naturally spawns in the room after Hush.
|
|
8935
|
+
*
|
|
8936
|
+
* Under the hood, this is determined by looking at the `VarData` of the entity:
|
|
8937
|
+
* - The `VarData` of Void Portals that are spawned after bosses will be equal to 1.
|
|
8938
|
+
* - The `VarData` of the Void Portal in the room after Hush is equal to 0.
|
|
8936
8939
|
*/
|
|
8937
8940
|
export declare function isPostBossVoidPortal(gridEntity: GridEntity): boolean;
|
|
8938
8941
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 39.3.
|
|
3
|
+
isaacscript-common 39.3.2
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -28370,7 +28370,7 @@ function ____exports.isPoopGridEntityXMLType(self, gridEntityXMLType)
|
|
|
28370
28370
|
end
|
|
28371
28371
|
function ____exports.isPostBossVoidPortal(self, gridEntity)
|
|
28372
28372
|
local saveState = gridEntity:GetSaveState()
|
|
28373
|
-
return saveState.VarData == 1
|
|
28373
|
+
return saveState.Type == GridEntityType.TRAPDOOR and saveState.Variant == TrapdoorVariant.VOID_PORTAL and saveState.VarData == 1
|
|
28374
28374
|
end
|
|
28375
28375
|
function ____exports.removeAllGridEntitiesExcept(self, ...)
|
|
28376
28376
|
local gridEntityTypes = {...}
|
|
@@ -144,8 +144,11 @@ export declare function isGridEntityXMLType(num: number): num is GridEntityXMLTy
|
|
|
144
144
|
export declare function isPoopGridEntityXMLType(gridEntityXMLType: GridEntityXMLType): boolean;
|
|
145
145
|
/**
|
|
146
146
|
* Helper function to detect whether a given Void Portal is one that randomly spawns after a boss is
|
|
147
|
-
* defeated or is one that naturally spawns in the room after Hush.
|
|
148
|
-
*
|
|
147
|
+
* defeated or is one that naturally spawns in the room after Hush.
|
|
148
|
+
*
|
|
149
|
+
* Under the hood, this is determined by looking at the `VarData` of the entity:
|
|
150
|
+
* - The `VarData` of Void Portals that are spawned after bosses will be equal to 1.
|
|
151
|
+
* - The `VarData` of the Void Portal in the room after Hush is equal to 0.
|
|
149
152
|
*/
|
|
150
153
|
export declare function isPostBossVoidPortal(gridEntity: GridEntity): boolean;
|
|
151
154
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../../src/functions/gridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAGL,cAAc,EAIf,MAAM,8BAA8B,CAAC;AAWtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA0C1D;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,GAAG,GACxB,CAAC,cAAc,EAAE,GAAG,CAAC,GAAG,SAAS,CAenC;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,cAAc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,0BAA0B,CACxC,UAAU,EAAE,UAAU,GACrB,UAAU,EAAE,CA2Bd;AAED;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,UAAU,GAAG,SAAS,CAIvD;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,GAAG,CAO7C;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,UAAU,GACrB,OAAO,CAWT;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAIlE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,IAAI,iBAAiB,CAEzE;AAED,4EAA4E;AAC5E,wBAAgB,uBAAuB,CACrC,iBAAiB,EAAE,iBAAiB,GACnC,OAAO,CAET;AAED
|
|
1
|
+
{"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../../src/functions/gridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAGL,cAAc,EAIf,MAAM,8BAA8B,CAAC;AAWtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AA0C1D;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,GAAG,GACxB,CAAC,cAAc,EAAE,GAAG,CAAC,GAAG,SAAS,CAenC;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,cAAc,EAC9B,OAAO,SAAK,GACX,OAAO,CAiBT;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,EAAE,CAKzC;AAED;;;;;;;;;GASG;AACH,wBAAgB,kCAAkC,CAChD,UAAU,EAAE,UAAU,GACrB,MAAM,EAAE,C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ED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,cAAc,EAAE,cAAc,EAC9B,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAExB;AAED;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,GAAG,EACZ,mBAAmB,EAAE,GAAG,GAAG,MAAM,GAChC,UAAU,GAAG,SAAS,CAgCxB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,GAAG,GAAG,UAAU,GAAG,SAAS,CAkBtE"}
|
|
@@ -464,11 +464,14 @@ function ____exports.isPoopGridEntityXMLType(self, gridEntityXMLType)
|
|
|
464
464
|
return POOP_GRID_ENTITY_XML_TYPES_SET:has(gridEntityXMLType)
|
|
465
465
|
end
|
|
466
466
|
--- Helper function to detect whether a given Void Portal is one that randomly spawns after a boss is
|
|
467
|
-
-- defeated or is one that naturally spawns in the room after Hush.
|
|
468
|
-
--
|
|
467
|
+
-- defeated or is one that naturally spawns in the room after Hush.
|
|
468
|
+
--
|
|
469
|
+
-- Under the hood, this is determined by looking at the `VarData` of the entity:
|
|
470
|
+
-- - The `VarData` of Void Portals that are spawned after bosses will be equal to 1.
|
|
471
|
+
-- - The `VarData` of the Void Portal in the room after Hush is equal to 0.
|
|
469
472
|
function ____exports.isPostBossVoidPortal(self, gridEntity)
|
|
470
473
|
local saveState = gridEntity:GetSaveState()
|
|
471
|
-
return saveState.VarData == 1
|
|
474
|
+
return saveState.Type == GridEntityType.TRAPDOOR and saveState.Variant == TrapdoorVariant.VOID_PORTAL and saveState.VarData == 1
|
|
472
475
|
end
|
|
473
476
|
--- Helper function to all grid entities in the room except for ones matching the grid entity types
|
|
474
477
|
-- provided.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "isaacscript-common",
|
|
3
|
-
"version": "39.3.
|
|
3
|
+
"version": "39.3.2",
|
|
4
4
|
"description": "Helper functions and features for IsaacScript mods.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"isaac",
|
|
@@ -25,6 +25,6 @@
|
|
|
25
25
|
"main": "dist/src/index",
|
|
26
26
|
"types": "dist/index.rollup.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"isaac-typescript-definitions": "^17.0.
|
|
28
|
+
"isaac-typescript-definitions": "^17.0.2"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -501,14 +501,20 @@ export function isPoopGridEntityXMLType(
|
|
|
501
501
|
|
|
502
502
|
/**
|
|
503
503
|
* Helper function to detect whether a given Void Portal is one that randomly spawns after a boss is
|
|
504
|
-
* defeated or is one that naturally spawns in the room after Hush.
|
|
505
|
-
*
|
|
504
|
+
* defeated or is one that naturally spawns in the room after Hush.
|
|
505
|
+
*
|
|
506
|
+
* Under the hood, this is determined by looking at the `VarData` of the entity:
|
|
507
|
+
* - The `VarData` of Void Portals that are spawned after bosses will be equal to 1.
|
|
508
|
+
* - The `VarData` of the Void Portal in the room after Hush is equal to 0.
|
|
506
509
|
*/
|
|
507
510
|
export function isPostBossVoidPortal(gridEntity: GridEntity): boolean {
|
|
508
|
-
// - The VarData of Void Portals that are spawned after bosses will be equal to 1.
|
|
509
|
-
// - The VarData of the Void Portal in the room after Hush is equal to 0.
|
|
510
511
|
const saveState = gridEntity.GetSaveState();
|
|
511
|
-
|
|
512
|
+
|
|
513
|
+
return (
|
|
514
|
+
saveState.Type === GridEntityType.TRAPDOOR &&
|
|
515
|
+
saveState.Variant === TrapdoorVariant.VOID_PORTAL &&
|
|
516
|
+
saveState.VarData === 1
|
|
517
|
+
);
|
|
512
518
|
}
|
|
513
519
|
|
|
514
520
|
/**
|