isaacscript-common 7.13.0 → 7.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/deployJSONRoom.lua +2 -2
- package/dist/functions/collectibleSet.d.ts.map +1 -1
- package/dist/functions/collectibleSet.lua +2 -2
- package/dist/functions/gridEntities.d.ts +2 -2
- package/dist/functions/gridEntities.d.ts.map +1 -1
- package/dist/functions/gridEntities.lua +2 -2
- package/dist/functions/trinketSet.d.ts +44 -0
- package/dist/functions/trinketSet.d.ts.map +1 -0
- package/dist/functions/trinketSet.lua +101 -0
- package/dist/index.d.ts +11363 -174
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +8 -0
- package/package.json +1 -1
- package/src/features/deployJSONRoom.ts +2 -2
- package/src/functions/collectibleSet.ts +4 -3
- package/src/functions/gridEntities.ts +2 -2
- package/src/functions/trinketSet.ts +133 -0
- package/src/index.ts +1 -0
|
@@ -40,7 +40,7 @@ local ____gridEntities = require("functions.gridEntities")
|
|
|
40
40
|
local convertXMLGridEntityType = ____gridEntities.convertXMLGridEntityType
|
|
41
41
|
local getAllGridIndexes = ____gridEntities.getAllGridIndexes
|
|
42
42
|
local getGridEntities = ____gridEntities.getGridEntities
|
|
43
|
-
local
|
|
43
|
+
local removeAllGridEntitiesExcept = ____gridEntities.removeAllGridEntitiesExcept
|
|
44
44
|
local removeGridEntity = ____gridEntities.removeGridEntity
|
|
45
45
|
local setGridEntityInvisible = ____gridEntities.setGridEntityInvisible
|
|
46
46
|
local spawnGridEntityWithVariant = ____gridEntities.spawnGridEntityWithVariant
|
|
@@ -157,7 +157,7 @@ function ____exports.emptyRoom(self, fillWithDecorations)
|
|
|
157
157
|
removeSpecificNPCs(nil)
|
|
158
158
|
removeAllMatchingEntities(nil, EntityType.EFFECT, EffectVariant.DEVIL)
|
|
159
159
|
removeAllMatchingEntities(nil, EntityType.EFFECT, EffectVariant.ANGEL)
|
|
160
|
-
|
|
160
|
+
removeAllGridEntitiesExcept(nil, GridEntityType.WALL, GridEntityType.DOOR)
|
|
161
161
|
setRoomCleared(nil)
|
|
162
162
|
if fillWithDecorations then
|
|
163
163
|
fillRoomWithDecorations(nil)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectibleSet.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"collectibleSet.d.ts","sourceRoot":"","sources":["../../src/functions/collectibleSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAwD/D;;;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,SAAS,eAAe,EAAE,CAKhE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CAAC,eAAe,CAAC,CAKhE;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,IAAI,SAAS,eAAe,EAAE,CAKtE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,WAAW,CAAC,eAAe,CAAC,CAKtE;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,IAAI,SAAS,eAAe,EAAE,CAKvE;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,IAAI,WAAW,CAAC,eAAe,CAAC,CAKvE"}
|
|
@@ -38,14 +38,14 @@ local function initCollectibleArraysAndSets(self)
|
|
|
38
38
|
::__continue4::
|
|
39
39
|
end
|
|
40
40
|
__TS__ArraySort(ALL_COLLECTIBLES_ARRAY)
|
|
41
|
-
__TS__ArraySort(VANILLA_COLLECTIBLES_ARRAY)
|
|
42
|
-
__TS__ArraySort(MODDED_COLLECTIBLES_ARRAY)
|
|
43
41
|
for ____, collectibleType in ipairs(ALL_COLLECTIBLES_ARRAY) do
|
|
44
42
|
ALL_COLLECTIBLES_SET:add(collectibleType)
|
|
45
43
|
end
|
|
44
|
+
__TS__ArraySort(VANILLA_COLLECTIBLES_ARRAY)
|
|
46
45
|
for ____, collectibleType in ipairs(VANILLA_COLLECTIBLES_ARRAY) do
|
|
47
46
|
VANILLA_COLLECTIBLES_SET:add(collectibleType)
|
|
48
47
|
end
|
|
48
|
+
__TS__ArraySort(MODDED_COLLECTIBLES_ARRAY)
|
|
49
49
|
for ____, collectibleType in ipairs(MODDED_COLLECTIBLES_ARRAY) do
|
|
50
50
|
MODDED_COLLECTIBLES_SET:add(collectibleType)
|
|
51
51
|
end
|
|
@@ -122,7 +122,7 @@ export declare function isPostBossVoidPortal(gridEntity: GridEntity): boolean;
|
|
|
122
122
|
* For example:
|
|
123
123
|
*
|
|
124
124
|
* ```ts
|
|
125
|
-
*
|
|
125
|
+
* removeAllGridEntitiesExcept(
|
|
126
126
|
* GridEntityType.WALL,
|
|
127
127
|
* GridEntityType.DOOR,
|
|
128
128
|
* );
|
|
@@ -130,7 +130,7 @@ export declare function isPostBossVoidPortal(gridEntity: GridEntity): boolean;
|
|
|
130
130
|
*
|
|
131
131
|
* @returns The grid entities that were removed.
|
|
132
132
|
*/
|
|
133
|
-
export declare function
|
|
133
|
+
export declare function removeAllGridEntitiesExcept(...gridEntityTypes: GridEntityType[]): GridEntity[];
|
|
134
134
|
/**
|
|
135
135
|
* Helper function to remove all of the grid entities in the room that match the grid entity types
|
|
136
136
|
* provided.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gridEntities.d.ts","sourceRoot":"","sources":["../../src/functions/gridEntities.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EAGjB,cAAc,EACd,iBAAiB,EAGjB,eAAe,EAChB,MAAM,8BAA8B,CAAC;AAStC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAgCvD;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,iBAAiB,EAAE,iBAAiB,EACpC,oBAAoB,EAAE,GAAG,GACxB,CAAC,cAAc,EAAE,GAAG,CA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AAU,EAAE,OAAO,GAClB,IAAI,CAqCN;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI,CAGnE;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,gBAAgB,EAAE,GAAG,GAAG,IAAI,CA4B1D;AAED;;;;;;;;;;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"}
|
|
@@ -370,14 +370,14 @@ end
|
|
|
370
370
|
-- For example:
|
|
371
371
|
--
|
|
372
372
|
-- ```ts
|
|
373
|
-
--
|
|
373
|
+
-- removeAllGridEntitiesExcept(
|
|
374
374
|
-- GridEntityType.WALL,
|
|
375
375
|
-- GridEntityType.DOOR,
|
|
376
376
|
-- );
|
|
377
377
|
-- ```
|
|
378
378
|
--
|
|
379
379
|
-- @returns The grid entities that were removed.
|
|
380
|
-
function ____exports.
|
|
380
|
+
function ____exports.removeAllGridEntitiesExcept(self, ...)
|
|
381
381
|
local gridEntityTypes = {...}
|
|
382
382
|
local gridEntityTypeExceptions = __TS__New(Set, gridEntityTypes)
|
|
383
383
|
local gridEntities = ____exports.getGridEntities(nil)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { TrinketType } from "isaac-typescript-definitions";
|
|
2
|
+
/**
|
|
3
|
+
* Returns an array containing every valid trinket type in the game, including modded trinkets.
|
|
4
|
+
*
|
|
5
|
+
* Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
|
|
6
|
+
* use the `getTrinketSet` helper function instead.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getModdedTrinketArray(): readonly TrinketType[];
|
|
9
|
+
/**
|
|
10
|
+
* Returns a set containing every valid trinket type in the game, including modded trinkets.
|
|
11
|
+
*
|
|
12
|
+
* Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
|
|
13
|
+
* use the `getTrinketArray` helper function instead.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getModdedTrinketSet(): ReadonlySet<TrinketType>;
|
|
16
|
+
/**
|
|
17
|
+
* Returns an array containing every modded trinket type in the game.
|
|
18
|
+
*
|
|
19
|
+
* Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
|
|
20
|
+
* use the `getModdedTrinketSet` helper function instead.
|
|
21
|
+
*/
|
|
22
|
+
export declare function getTrinketArray(): readonly TrinketType[];
|
|
23
|
+
/**
|
|
24
|
+
* Returns a set containing every modded trinket type in the game.
|
|
25
|
+
*
|
|
26
|
+
* Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
|
|
27
|
+
* use the `getModdedTrinketArray` helper function instead.
|
|
28
|
+
*/
|
|
29
|
+
export declare function getTrinketSet(): ReadonlySet<TrinketType>;
|
|
30
|
+
/**
|
|
31
|
+
* Returns an array containing every valid vanilla trinket type in the game.
|
|
32
|
+
*
|
|
33
|
+
* Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
|
|
34
|
+
* use the `getVanillaTrinketSet` helper function instead.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getVanillaTrinketArray(): readonly TrinketType[];
|
|
37
|
+
/**
|
|
38
|
+
* Returns a set containing every valid vanilla trinket type in the game.
|
|
39
|
+
*
|
|
40
|
+
* Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
|
|
41
|
+
* use the `getVanillaTrinketArray` helper function instead.
|
|
42
|
+
*/
|
|
43
|
+
export declare function getVanillaTrinketSet(): ReadonlySet<TrinketType>;
|
|
44
|
+
//# sourceMappingURL=trinketSet.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trinketSet.d.ts","sourceRoot":"","sources":["../../src/functions/trinketSet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAwD3D;;;;;GAKG;AACH,wBAAgB,qBAAqB,IAAI,SAAS,WAAW,EAAE,CAK9D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,WAAW,CAAC,WAAW,CAAC,CAK9D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,SAAS,WAAW,EAAE,CAKxD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,WAAW,CAAC,WAAW,CAAC,CAKxD;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAAI,SAAS,WAAW,EAAE,CAK/D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,WAAW,CAAC,WAAW,CAAC,CAK/D"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Set = ____lualib.Set
|
|
3
|
+
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local __TS__ArraySort = ____lualib.__TS__ArraySort
|
|
5
|
+
local ____exports = {}
|
|
6
|
+
local ____cachedClasses = require("core.cachedClasses")
|
|
7
|
+
local itemConfig = ____cachedClasses.itemConfig
|
|
8
|
+
local ____constantsFirstLast = require("core.constantsFirstLast")
|
|
9
|
+
local FIRST_TRINKET_TYPE = ____constantsFirstLast.FIRST_TRINKET_TYPE
|
|
10
|
+
local LAST_TRINKET_TYPE = ____constantsFirstLast.LAST_TRINKET_TYPE
|
|
11
|
+
local LAST_VANILLA_TRINKET_TYPE = ____constantsFirstLast.LAST_VANILLA_TRINKET_TYPE
|
|
12
|
+
local ____utils = require("functions.utils")
|
|
13
|
+
local irange = ____utils.irange
|
|
14
|
+
local ALL_TRINKETS_ARRAY = {}
|
|
15
|
+
local VANILLA_TRINKETS_ARRAY = {}
|
|
16
|
+
local MODDED_TRINKETS_ARRAY = {}
|
|
17
|
+
local ALL_TRINKETS_SET = __TS__New(Set)
|
|
18
|
+
local VANILLA_TRINKETS_SET = __TS__New(Set)
|
|
19
|
+
local MODDED_TRINKETS_SET = __TS__New(Set)
|
|
20
|
+
local function initTrinketArraysAndSets(self)
|
|
21
|
+
if #ALL_TRINKETS_ARRAY ~= 0 then
|
|
22
|
+
return
|
|
23
|
+
end
|
|
24
|
+
local trinketTypeRange = irange(nil, FIRST_TRINKET_TYPE, LAST_TRINKET_TYPE)
|
|
25
|
+
for ____, trinketType in ipairs(trinketTypeRange) do
|
|
26
|
+
do
|
|
27
|
+
local itemConfigItem = itemConfig:GetTrinket(trinketType)
|
|
28
|
+
if itemConfigItem == nil then
|
|
29
|
+
goto __continue4
|
|
30
|
+
end
|
|
31
|
+
ALL_TRINKETS_ARRAY[#ALL_TRINKETS_ARRAY + 1] = trinketType
|
|
32
|
+
if trinketType <= LAST_VANILLA_TRINKET_TYPE then
|
|
33
|
+
VANILLA_TRINKETS_ARRAY[#VANILLA_TRINKETS_ARRAY + 1] = trinketType
|
|
34
|
+
else
|
|
35
|
+
MODDED_TRINKETS_ARRAY[#MODDED_TRINKETS_ARRAY + 1] = trinketType
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
::__continue4::
|
|
39
|
+
end
|
|
40
|
+
__TS__ArraySort(ALL_TRINKETS_ARRAY)
|
|
41
|
+
for ____, trinketType in ipairs(ALL_TRINKETS_ARRAY) do
|
|
42
|
+
ALL_TRINKETS_SET:add(trinketType)
|
|
43
|
+
end
|
|
44
|
+
__TS__ArraySort(VANILLA_TRINKETS_ARRAY)
|
|
45
|
+
for ____, trinketType in ipairs(VANILLA_TRINKETS_ARRAY) do
|
|
46
|
+
VANILLA_TRINKETS_SET:add(trinketType)
|
|
47
|
+
end
|
|
48
|
+
__TS__ArraySort(MODDED_TRINKETS_ARRAY)
|
|
49
|
+
for ____, trinketType in ipairs(MODDED_TRINKETS_ARRAY) do
|
|
50
|
+
MODDED_TRINKETS_SET:add(trinketType)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
--- Returns an array containing every valid trinket type in the game, including modded trinkets.
|
|
54
|
+
--
|
|
55
|
+
-- Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
|
|
56
|
+
-- use the `getTrinketSet` helper function instead.
|
|
57
|
+
function ____exports.getModdedTrinketArray(self)
|
|
58
|
+
initTrinketArraysAndSets(nil)
|
|
59
|
+
return MODDED_TRINKETS_ARRAY
|
|
60
|
+
end
|
|
61
|
+
--- Returns a set containing every valid trinket type in the game, including modded trinkets.
|
|
62
|
+
--
|
|
63
|
+
-- Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
|
|
64
|
+
-- use the `getTrinketArray` helper function instead.
|
|
65
|
+
function ____exports.getModdedTrinketSet(self)
|
|
66
|
+
initTrinketArraysAndSets(nil)
|
|
67
|
+
return MODDED_TRINKETS_SET
|
|
68
|
+
end
|
|
69
|
+
--- Returns an array containing every modded trinket type in the game.
|
|
70
|
+
--
|
|
71
|
+
-- Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
|
|
72
|
+
-- use the `getModdedTrinketSet` helper function instead.
|
|
73
|
+
function ____exports.getTrinketArray(self)
|
|
74
|
+
initTrinketArraysAndSets(nil)
|
|
75
|
+
return ALL_TRINKETS_ARRAY
|
|
76
|
+
end
|
|
77
|
+
--- Returns a set containing every modded trinket type in the game.
|
|
78
|
+
--
|
|
79
|
+
-- Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
|
|
80
|
+
-- use the `getModdedTrinketArray` helper function instead.
|
|
81
|
+
function ____exports.getTrinketSet(self)
|
|
82
|
+
initTrinketArraysAndSets(nil)
|
|
83
|
+
return ALL_TRINKETS_SET
|
|
84
|
+
end
|
|
85
|
+
--- Returns an array containing every valid vanilla trinket type in the game.
|
|
86
|
+
--
|
|
87
|
+
-- Use this if you need to iterate over the trinkets in order. If you need to do O(1) lookups, then
|
|
88
|
+
-- use the `getVanillaTrinketSet` helper function instead.
|
|
89
|
+
function ____exports.getVanillaTrinketArray(self)
|
|
90
|
+
initTrinketArraysAndSets(nil)
|
|
91
|
+
return VANILLA_TRINKETS_ARRAY
|
|
92
|
+
end
|
|
93
|
+
--- Returns a set containing every valid vanilla trinket type in the game.
|
|
94
|
+
--
|
|
95
|
+
-- Use this if you need to do O(1) lookups. If you need to iterate over the trinkets in order, then
|
|
96
|
+
-- use the `getVanillaTrinketArray` helper function instead.
|
|
97
|
+
function ____exports.getVanillaTrinketSet(self)
|
|
98
|
+
initTrinketArraysAndSets(nil)
|
|
99
|
+
return VANILLA_TRINKETS_SET
|
|
100
|
+
end
|
|
101
|
+
return ____exports
|