isaacscript-common 6.6.3 → 6.7.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/customRevive.lua +4 -4
- package/dist/callbacks/postCursedTeleport.lua +2 -2
- package/dist/callbacks/postCustomDoorEnter.d.ts +1 -1
- package/dist/callbacks/postCustomDoorEnter.lua +6 -6
- package/dist/callbacks/postDiceRoomActivated.lua +2 -2
- package/dist/callbacks/postFlip.lua +3 -3
- package/dist/callbacks/postGridEntity.lua +3 -3
- package/dist/callbacks/postGridEntityCollision.lua +3 -3
- package/dist/callbacks/postGridEntityRender.lua +2 -2
- package/dist/callbacks/postNewRoomEarly.lua +5 -5
- package/dist/callbacks/postPickupCollect.lua +2 -2
- package/dist/callbacks/postPitRender.lua +2 -2
- package/dist/callbacks/postPitUpdate.lua +2 -2
- package/dist/callbacks/postPlayerCollectible.lua +2 -2
- package/dist/callbacks/postPoopRender.lua +2 -2
- package/dist/callbacks/postPoopUpdate.lua +2 -2
- package/dist/callbacks/postPressurePlateRender.lua +2 -2
- package/dist/callbacks/postPressurePlateUpdate.lua +2 -2
- package/dist/callbacks/postPurchase.lua +2 -2
- package/dist/callbacks/postRockRender.lua +2 -2
- package/dist/callbacks/postRockUpdate.lua +2 -2
- package/dist/callbacks/postSlotInitUpdate.lua +2 -2
- package/dist/callbacks/postSlotRender.lua +2 -2
- package/dist/callbacks/postSpikesRender.lua +2 -2
- package/dist/callbacks/postSpikesUpdate.lua +2 -2
- package/dist/callbacks/postTNTRender.lua +2 -2
- package/dist/callbacks/postTNTUpdate.lua +2 -2
- package/dist/callbacks/preBerserkDeath.lua +2 -2
- package/dist/callbacks/preNewLevel.lua +2 -2
- package/dist/callbacks/subscriptions/postDoorRender.d.ts +2 -3
- package/dist/callbacks/subscriptions/postDoorRender.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postDoorRender.lua +3 -3
- package/dist/callbacks/subscriptions/postDoorUpdate.d.ts +2 -3
- package/dist/callbacks/subscriptions/postDoorUpdate.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postDoorUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postPitRender.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPitRender.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPitRender.lua +3 -3
- package/dist/callbacks/subscriptions/postPitUpdate.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPitUpdate.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPitUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postPoopRender.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPoopRender.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPoopRender.lua +3 -3
- package/dist/callbacks/subscriptions/postPoopUpdate.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPoopUpdate.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPoopUpdate.lua +3 -3
- package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPressurePlateRender.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPressurePlateRender.lua +3 -3
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts +2 -3
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPressurePlateUpdate.lua +3 -3
- package/dist/enums/private/SerializationBrand.d.ts +0 -4
- package/dist/enums/private/SerializationBrand.d.ts.map +1 -1
- package/dist/features/characterStats.lua +2 -2
- package/dist/features/collectibleItemPoolType.lua +2 -2
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +5 -5
- package/dist/features/customStage/backdrop.lua +2 -2
- package/dist/features/customStage/{gridEntities.d.ts → customStageGridEntities.d.ts} +1 -1
- package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -0
- package/dist/features/customStage/{gridEntities.lua → customStageGridEntities.lua} +8 -8
- package/dist/features/customStage/{util.d.ts → customStageUtils.d.ts} +1 -1
- package/dist/features/customStage/customStageUtils.d.ts.map +1 -0
- package/dist/features/customStage/{util.lua → customStageUtils.lua} +0 -0
- package/dist/features/customStage/exports.lua +4 -4
- package/dist/features/customStage/init.lua +6 -6
- package/dist/features/customStage/shadows.lua +2 -2
- package/dist/features/customStage/versusScreen.lua +4 -4
- package/dist/features/debugDisplay/v.lua +4 -4
- package/dist/features/deployJSONRoom.lua +20 -20
- package/dist/features/extraConsoleCommands/commandsSubroutines.lua +3 -3
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +14 -14
- package/dist/features/pause.lua +2 -2
- package/dist/features/persistentEntities.lua +2 -2
- package/dist/features/preventCollectibleRotation.lua +2 -2
- package/dist/features/saveDataManager/exports.d.ts.map +1 -1
- package/dist/features/saveDataManager/merge.lua +4 -3
- package/dist/features/sirenHelpers.lua +2 -2
- package/dist/functions/ambush.lua +5 -5
- package/dist/functions/array.d.ts.map +1 -1
- package/dist/functions/array.lua +1 -1
- package/dist/functions/{boss.d.ts → bosses.d.ts} +22 -4
- package/dist/functions/bosses.d.ts.map +1 -0
- package/dist/functions/{boss.lua → bosses.lua} +38 -13
- package/dist/functions/collectibleTag.lua +2 -2
- package/dist/functions/collectibles.lua +5 -5
- package/dist/functions/deepCopy.d.ts +8 -5
- package/dist/functions/deepCopy.d.ts.map +1 -1
- package/dist/functions/deepCopy.lua +142 -38
- package/dist/functions/deepCopyTests.d.ts +6 -1
- package/dist/functions/deepCopyTests.d.ts.map +1 -1
- package/dist/functions/deepCopyTests.lua +19 -16
- package/dist/functions/{entity.d.ts → entities.d.ts} +21 -19
- package/dist/functions/entities.d.ts.map +1 -0
- package/dist/functions/{entity.lua → entities.lua} +25 -20
- package/dist/functions/{entitySpecific.d.ts → entitiesSpecific.d.ts} +145 -68
- package/dist/functions/entitiesSpecific.d.ts.map +1 -0
- package/dist/functions/{entitySpecific.lua → entitiesSpecific.lua} +203 -65
- package/dist/functions/familiars.lua +2 -2
- package/dist/functions/{gridEntity.d.ts → gridEntities.d.ts} +48 -17
- package/dist/functions/gridEntities.d.ts.map +1 -0
- package/dist/functions/{gridEntity.lua → gridEntities.lua} +140 -90
- package/dist/functions/gridEntitiesSpecific.d.ts +141 -0
- package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -0
- package/dist/functions/gridEntitiesSpecific.lua +366 -0
- package/dist/functions/log.d.ts +1 -1
- package/dist/functions/log.d.ts.map +1 -1
- package/dist/functions/log.lua +16 -12
- package/dist/functions/mergeTests.d.ts +7 -1
- package/dist/functions/mergeTests.d.ts.map +1 -1
- package/dist/functions/mergeTests.lua +86 -7
- package/dist/functions/{npc.d.ts → npcs.d.ts} +24 -2
- package/dist/functions/npcs.d.ts.map +1 -0
- package/dist/functions/{npc.lua → npcs.lua} +44 -9
- package/dist/functions/pickups.d.ts +4 -119
- package/dist/functions/pickups.d.ts.map +1 -1
- package/dist/functions/pickups.lua +10 -439
- package/dist/functions/pickupsSpecific.d.ts +229 -0
- package/dist/functions/pickupsSpecific.d.ts.map +1 -0
- package/dist/functions/pickupsSpecific.lua +560 -0
- package/dist/functions/playerHealth.lua +6 -6
- package/dist/functions/{player.d.ts → players.d.ts} +1 -1
- package/dist/functions/players.d.ts.map +1 -0
- package/dist/functions/{player.lua → players.lua} +0 -0
- package/dist/functions/pocketItems.lua +2 -2
- package/dist/functions/positionVelocity.lua +6 -6
- package/dist/functions/pressurePlate.d.ts +10 -0
- package/dist/functions/pressurePlate.d.ts.map +1 -0
- package/dist/functions/pressurePlate.lua +29 -0
- package/dist/functions/revive.lua +7 -7
- package/dist/functions/rooms.lua +2 -2
- package/dist/functions/saveFile.lua +3 -3
- package/dist/functions/spawnCollectible.lua +4 -4
- package/dist/functions/{sprite.d.ts → sprites.d.ts} +1 -1
- package/dist/functions/sprites.d.ts.map +1 -0
- package/dist/functions/{sprite.lua → sprites.lua} +0 -0
- package/dist/functions/table.d.ts +1 -1
- package/dist/functions/table.lua +1 -1
- package/dist/functions/transformations.lua +2 -2
- package/dist/functions/trinketGive.lua +2 -2
- package/dist/functions/trinkets.lua +6 -6
- package/dist/functions/utils.d.ts +7 -0
- package/dist/functions/utils.d.ts.map +1 -1
- package/dist/functions/utils.lua +35 -22
- package/dist/index.d.ts +10 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.lua +26 -10
- package/dist/types/AnyGridEntity.d.ts +10 -0
- package/dist/types/AnyGridEntity.d.ts.map +1 -0
- package/dist/types/AnyGridEntity.lua +2 -0
- package/package.json +2 -2
- package/src/callbacks/customRevive.ts +2 -2
- package/src/callbacks/postCursedTeleport.ts +2 -2
- package/src/callbacks/postCustomDoorEnter.ts +3 -3
- package/src/callbacks/postDiceRoomActivated.ts +1 -1
- package/src/callbacks/postFlip.ts +1 -1
- package/src/callbacks/postGridEntity.ts +1 -1
- package/src/callbacks/postGridEntityCollision.ts +1 -1
- package/src/callbacks/postGridEntityRender.ts +1 -1
- package/src/callbacks/postNewRoomEarly.ts +9 -3
- package/src/callbacks/postPickupCollect.ts +1 -1
- package/src/callbacks/postPitRender.ts +1 -1
- package/src/callbacks/postPitUpdate.ts +1 -1
- package/src/callbacks/postPlayerCollectible.ts +2 -2
- package/src/callbacks/postPoopRender.ts +1 -1
- package/src/callbacks/postPoopUpdate.ts +1 -1
- package/src/callbacks/postPressurePlateRender.ts +1 -1
- package/src/callbacks/postPressurePlateUpdate.ts +1 -1
- package/src/callbacks/postPurchase.ts +1 -1
- package/src/callbacks/postRockRender.ts +1 -1
- package/src/callbacks/postRockUpdate.ts +1 -1
- package/src/callbacks/postSacrifice.ts +1 -1
- package/src/callbacks/postSlotInitUpdate.ts +1 -1
- package/src/callbacks/postSlotRender.ts +1 -1
- package/src/callbacks/postSpikesRender.ts +1 -1
- package/src/callbacks/postSpikesUpdate.ts +1 -1
- package/src/callbacks/postTNTRender.ts +1 -1
- package/src/callbacks/postTNTUpdate.ts +1 -1
- package/src/callbacks/preBerserkDeath.ts +1 -1
- package/src/callbacks/preNewLevel.ts +1 -1
- package/src/callbacks/subscriptions/postDoorRender.ts +7 -5
- package/src/callbacks/subscriptions/postDoorUpdate.ts +7 -5
- package/src/callbacks/subscriptions/postPitRender.ts +6 -7
- package/src/callbacks/subscriptions/postPitUpdate.ts +6 -7
- package/src/callbacks/subscriptions/postPoopRender.ts +7 -5
- package/src/callbacks/subscriptions/postPoopUpdate.ts +7 -5
- package/src/callbacks/subscriptions/postPressurePlateRender.ts +7 -5
- package/src/callbacks/subscriptions/postPressurePlateUpdate.ts +7 -5
- package/src/enums/private/SerializationBrand.ts +0 -4
- package/src/features/characterStats.ts +1 -1
- package/src/features/collectibleItemPoolType.ts +1 -1
- package/src/features/customGridEntity.ts +6 -3
- package/src/features/customStage/backdrop.ts +1 -1
- package/src/features/customStage/{gridEntities.ts → customStageGridEntities.ts} +3 -3
- package/src/features/customStage/{util.ts → customStageUtils.ts} +0 -0
- package/src/features/customStage/exports.ts +2 -2
- package/src/features/customStage/init.ts +1 -1
- package/src/features/customStage/shadows.ts +1 -1
- package/src/features/customStage/versusScreen.ts +2 -2
- package/src/features/debugDisplay/v.ts +2 -2
- package/src/features/deployJSONRoom.ts +11 -7
- package/src/features/extraConsoleCommands/commandsSubroutines.ts +2 -2
- package/src/features/extraConsoleCommands/listCommands.ts +13 -9
- package/src/features/pause.ts +1 -1
- package/src/features/persistentEntities.ts +2 -2
- package/src/features/preventCollectibleRotation.ts +1 -1
- package/src/features/saveDataManager/exports.ts +7 -4
- package/src/features/saveDataManager/merge.ts +3 -3
- package/src/features/sirenHelpers.ts +1 -1
- package/src/functions/ambush.ts +2 -2
- package/src/functions/array.ts +5 -2
- package/src/functions/bitwise.ts +2 -2
- package/src/functions/{boss.ts → bosses.ts} +29 -21
- package/src/functions/collectibleTag.ts +1 -1
- package/src/functions/collectibles.ts +2 -2
- package/src/functions/deepCopy.ts +98 -19
- package/src/functions/deepCopyTests.ts +75 -19
- package/src/functions/{entity.ts → entities.ts} +23 -21
- package/src/functions/{entitySpecific.ts → entitiesSpecific.ts} +170 -99
- package/src/functions/familiars.ts +1 -1
- package/src/functions/{gridEntity.ts → gridEntities.ts} +110 -34
- package/src/functions/gridEntitiesSpecific.ts +490 -0
- package/src/functions/log.ts +19 -10
- package/src/functions/mergeTests.ts +152 -4
- package/src/functions/{npc.ts → npcs.ts} +42 -11
- package/src/functions/pickups.ts +8 -475
- package/src/functions/pickupsSpecific.ts +613 -0
- package/src/functions/playerHealth.ts +1 -1
- package/src/functions/{player.ts → players.ts} +0 -0
- package/src/functions/pocketItems.ts +1 -1
- package/src/functions/positionVelocity.ts +3 -3
- package/src/functions/pressurePlate.ts +29 -0
- package/src/functions/revive.ts +2 -2
- package/src/functions/rooms.ts +1 -1
- package/src/functions/saveFile.ts +1 -1
- package/src/functions/spawnCollectible.ts +2 -2
- package/src/functions/{sprite.ts → sprites.ts} +0 -0
- package/src/functions/table.ts +1 -1
- package/src/functions/transformations.ts +1 -1
- package/src/functions/trinketGive.ts +4 -4
- package/src/functions/trinkets.ts +3 -3
- package/src/functions/tstlClass.ts +1 -1
- package/src/functions/ui.ts +3 -3
- package/src/functions/utils.ts +32 -13
- package/src/index.ts +10 -8
- package/src/types/AnyGridEntity.ts +9 -0
- package/dist/features/customStage/gridEntities.d.ts.map +0 -1
- package/dist/features/customStage/util.d.ts.map +0 -1
- package/dist/functions/boss.d.ts.map +0 -1
- package/dist/functions/entity.d.ts.map +0 -1
- package/dist/functions/entitySpecific.d.ts.map +0 -1
- package/dist/functions/gridEntity.d.ts.map +0 -1
- package/dist/functions/gridEntitySpecific.d.ts +0 -29
- package/dist/functions/gridEntitySpecific.d.ts.map +0 -1
- package/dist/functions/gridEntitySpecific.lua +0 -114
- package/dist/functions/npc.d.ts.map +0 -1
- package/dist/functions/player.d.ts.map +0 -1
- package/dist/functions/sprite.d.ts.map +0 -1
- package/src/functions/gridEntitySpecific.ts +0 -143
|
@@ -1 +1 @@
|
|
|
1
|
-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cAAc,CAAC,CAAC,EAC9B,YAAY,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,EAChC,WAAW,EAAE,KAAK,CAAC,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,CAAC,GACrC,OAAO,CAET;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,aAAa,EAAE,CAAC,EAAE,GAAG,SAAS,CAAC,EAAE,EACjC,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,CAAC,EAAE,CAKL;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,KAAK,EAAE,CAAC,EAAE,EACV,SAAS,GAAE,IAAI,GAAG,GAAqB,GACtC,IAAI,CAWN;AAED,+DAA+D;AAC/D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,GAAG,MAAM,CAEpE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAM3E"}
|
package/dist/functions/array.lua
CHANGED
|
@@ -4,8 +4,16 @@ import { EntityType, StageType } from "isaac-typescript-definitions";
|
|
|
4
4
|
*
|
|
5
5
|
* This function will not include bosses on an internal blacklist, such as Death's scythes or Big
|
|
6
6
|
* Horn holes.
|
|
7
|
+
*
|
|
8
|
+
* @param entityType Optional. If specified, will only get the bosses that match the type. Default
|
|
9
|
+
* is -1, which matches every type.
|
|
10
|
+
* @param variant Optional. If specified, will only get the bosses that match the variant. Default
|
|
11
|
+
* is -1, which matches every variant.
|
|
12
|
+
* @param subType Optional. If specified, will only get the bosses that match the sub-type. Default
|
|
13
|
+
* is -1, which matches every sub-type.
|
|
14
|
+
* @param ignoreFriendly Optional. Default is false.
|
|
7
15
|
*/
|
|
8
|
-
export declare function getAliveBosses(
|
|
16
|
+
export declare function getAliveBosses(entityType?: EntityType, variant?: number, subType?: number, ignoreFriendly?: boolean): EntityNPC[];
|
|
9
17
|
/**
|
|
10
18
|
* Helper function to get the set of every boss in the game.
|
|
11
19
|
*
|
|
@@ -23,8 +31,18 @@ export declare function getAllBossesSet(): Set<string>;
|
|
|
23
31
|
* Also see the `getAllBossesSet` and `getCombinedBossSet` functions.
|
|
24
32
|
*/
|
|
25
33
|
export declare function getBossSet(stage: int, stageType: StageType): ReadonlySet<string> | undefined;
|
|
26
|
-
/**
|
|
27
|
-
|
|
34
|
+
/**
|
|
35
|
+
* Helper function to get all of the bosses in the room.
|
|
36
|
+
*
|
|
37
|
+
* @param entityType Optional. If specified, will only get the bosses that match the type. Default
|
|
38
|
+
* is -1, which matches every type.
|
|
39
|
+
* @param variant Optional. If specified, will only get the bosses that match the variant. Default
|
|
40
|
+
* is -1, which matches every variant.
|
|
41
|
+
* @param subType Optional. If specified, will only get the bosses that match the sub-type. Default
|
|
42
|
+
* is -1, which matches every sub-type.
|
|
43
|
+
* @param ignoreFriendly Optional. Default is false.
|
|
44
|
+
*/
|
|
45
|
+
export declare function getBosses(entityType?: EntityType, variant?: int, subType?: int, ignoreFriendly?: boolean): EntityNPC[];
|
|
28
46
|
/**
|
|
29
47
|
* Helper function to get the set of vanilla bosses for a particular stage across all of the stage
|
|
30
48
|
* types. For example, specifying a stage of 2 will return a set with all of the bosses for
|
|
@@ -54,4 +72,4 @@ export declare function spawnBoss(entityType: EntityType, variant: int, subType:
|
|
|
54
72
|
* For more information, see the documentation for the `spawnBoss` function.
|
|
55
73
|
*/
|
|
56
74
|
export declare function spawnBossWithSeed(entityType: EntityType, variant: int, subType: int, position: Vector, seedOrRNG: Seed | RNG, velocity?: Vector, spawner?: Entity | undefined, numSegments?: int): EntityNPC;
|
|
57
|
-
//# sourceMappingURL=
|
|
75
|
+
//# sourceMappingURL=bosses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bosses.d.ts","sourceRoot":"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AG,EACZ,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,IAAI,GAAG,GAAG,EACrB,QAAQ,GAAE,MAAmB,EAC7B,OAAO,GAAE,MAAM,GAAG,SAAqB,EACvC,WAAW,CAAC,EAAE,GAAG,GAChB,SAAS,CAYX"}
|
|
@@ -15,11 +15,11 @@ local STAGE_TO_COMBINED_BOSS_SET_MAP = ____bossSets.STAGE_TO_COMBINED_BOSS_SET_M
|
|
|
15
15
|
local STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP = ____bossSets.STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP
|
|
16
16
|
local ____sinEntityTypesSet = require("sets.sinEntityTypesSet")
|
|
17
17
|
local SIN_ENTITY_TYPES_SET = ____sinEntityTypesSet.SIN_ENTITY_TYPES_SET
|
|
18
|
-
local
|
|
19
|
-
local getNPCs =
|
|
20
|
-
local spawnNPC =
|
|
21
|
-
local
|
|
22
|
-
local getAliveNPCs =
|
|
18
|
+
local ____entitiesSpecific = require("functions.entitiesSpecific")
|
|
19
|
+
local getNPCs = ____entitiesSpecific.getNPCs
|
|
20
|
+
local spawnNPC = ____entitiesSpecific.spawnNPC
|
|
21
|
+
local ____npcs = require("functions.npcs")
|
|
22
|
+
local getAliveNPCs = ____npcs.getAliveNPCs
|
|
23
23
|
local ____rng = require("functions.rng")
|
|
24
24
|
local isRNG = ____rng.isRNG
|
|
25
25
|
local ____set = require("functions.set")
|
|
@@ -69,15 +69,32 @@ DEFAULT_BOSS_MULTI_SEGMENTS = 4
|
|
|
69
69
|
--
|
|
70
70
|
-- This function will not include bosses on an internal blacklist, such as Death's scythes or Big
|
|
71
71
|
-- Horn holes.
|
|
72
|
-
|
|
72
|
+
--
|
|
73
|
+
-- @param entityType Optional. If specified, will only get the bosses that match the type. Default
|
|
74
|
+
-- is -1, which matches every type.
|
|
75
|
+
-- @param variant Optional. If specified, will only get the bosses that match the variant. Default
|
|
76
|
+
-- is -1, which matches every variant.
|
|
77
|
+
-- @param subType Optional. If specified, will only get the bosses that match the sub-type. Default
|
|
78
|
+
-- is -1, which matches every sub-type.
|
|
79
|
+
-- @param ignoreFriendly Optional. Default is false.
|
|
80
|
+
function ____exports.getAliveBosses(self, entityType, variant, subType, ignoreFriendly)
|
|
81
|
+
if entityType == nil then
|
|
82
|
+
entityType = -1
|
|
83
|
+
end
|
|
84
|
+
if variant == nil then
|
|
85
|
+
variant = -1
|
|
86
|
+
end
|
|
87
|
+
if subType == nil then
|
|
88
|
+
subType = -1
|
|
89
|
+
end
|
|
73
90
|
if ignoreFriendly == nil then
|
|
74
91
|
ignoreFriendly = false
|
|
75
92
|
end
|
|
76
93
|
local aliveNPCs = getAliveNPCs(
|
|
77
94
|
nil,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
95
|
+
entityType,
|
|
96
|
+
variant,
|
|
97
|
+
subType,
|
|
81
98
|
ignoreFriendly
|
|
82
99
|
)
|
|
83
100
|
return __TS__ArrayFilter(
|
|
@@ -111,15 +128,23 @@ function ____exports.getBossSet(self, stage, stageType)
|
|
|
111
128
|
return copySet(nil, bossSet)
|
|
112
129
|
end
|
|
113
130
|
--- Helper function to get all of the bosses in the room.
|
|
114
|
-
|
|
131
|
+
--
|
|
132
|
+
-- @param entityType Optional. If specified, will only get the bosses that match the type. Default
|
|
133
|
+
-- is -1, which matches every type.
|
|
134
|
+
-- @param variant Optional. If specified, will only get the bosses that match the variant. Default
|
|
135
|
+
-- is -1, which matches every variant.
|
|
136
|
+
-- @param subType Optional. If specified, will only get the bosses that match the sub-type. Default
|
|
137
|
+
-- is -1, which matches every sub-type.
|
|
138
|
+
-- @param ignoreFriendly Optional. Default is false.
|
|
139
|
+
function ____exports.getBosses(self, entityType, variant, subType, ignoreFriendly)
|
|
115
140
|
if ignoreFriendly == nil then
|
|
116
141
|
ignoreFriendly = false
|
|
117
142
|
end
|
|
118
143
|
local npcs = getNPCs(
|
|
119
144
|
nil,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
145
|
+
entityType,
|
|
146
|
+
variant,
|
|
147
|
+
subType,
|
|
123
148
|
ignoreFriendly
|
|
124
149
|
)
|
|
125
150
|
return __TS__ArrayFilter(
|
|
@@ -14,8 +14,8 @@ local ____enums = require("functions.enums")
|
|
|
14
14
|
local getEnumValues = ____enums.getEnumValues
|
|
15
15
|
local ____flag = require("functions.flag")
|
|
16
16
|
local getFlagName = ____flag.getFlagName
|
|
17
|
-
local
|
|
18
|
-
local getPlayerCollectibleCount =
|
|
17
|
+
local ____players = require("functions.players")
|
|
18
|
+
local getPlayerCollectibleCount = ____players.getPlayerCollectibleCount
|
|
19
19
|
local ____set = require("functions.set")
|
|
20
20
|
local copySet = ____set.copySet
|
|
21
21
|
function ____exports.collectibleHasTag(self, collectibleType, tag)
|
|
@@ -27,15 +27,15 @@ local COLLECTIBLE_NAME_MAP = ____collectibleNameMap.COLLECTIBLE_NAME_MAP
|
|
|
27
27
|
local DEFAULT_COLLECTIBLE_NAME = ____collectibleNameMap.DEFAULT_COLLECTIBLE_NAME
|
|
28
28
|
local ____singleUseActiveCollectibleTypesSet = require("sets.singleUseActiveCollectibleTypesSet")
|
|
29
29
|
local SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET = ____singleUseActiveCollectibleTypesSet.SINGLE_USE_ACTIVE_COLLECTIBLE_TYPES_SET
|
|
30
|
-
local
|
|
31
|
-
local getEntityID =
|
|
30
|
+
local ____entities = require("functions.entities")
|
|
31
|
+
local getEntityID = ____entities.getEntityID
|
|
32
32
|
local ____pickupVariants = require("functions.pickupVariants")
|
|
33
33
|
local isCollectible = ____pickupVariants.isCollectible
|
|
34
34
|
local ____roomData = require("functions.roomData")
|
|
35
35
|
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
36
|
-
local
|
|
37
|
-
local clearSprite =
|
|
38
|
-
local spriteEquals =
|
|
36
|
+
local ____sprites = require("functions.sprites")
|
|
37
|
+
local clearSprite = ____sprites.clearSprite
|
|
38
|
+
local spriteEquals = ____sprites.spriteEquals
|
|
39
39
|
local ____utils = require("functions.utils")
|
|
40
40
|
local irange = ____utils.irange
|
|
41
41
|
function initQuestionMarkSprite(self)
|
|
@@ -21,10 +21,13 @@ import { SerializationType } from "../enums/SerializationType";
|
|
|
21
21
|
* - other Isaac API objects such as `EntityPtr` (that have a type of "userdata")
|
|
22
22
|
*
|
|
23
23
|
* @param value The primitive or object to copy.
|
|
24
|
-
* @param serializationType Has 3 possible values. Can
|
|
25
|
-
* to Lua tables, or can deserialize Lua tables to
|
|
26
|
-
* `SerializationType.NONE`.
|
|
27
|
-
* @param traversalDescription Used to track the current key that we are operating on.
|
|
24
|
+
* @param serializationType Optional. Has 3 possible values. Can copy objects as-is, or can
|
|
25
|
+
* serialize objects to Lua tables, or can deserialize Lua tables to
|
|
26
|
+
* objects. Default is `SerializationType.NONE`.
|
|
27
|
+
* @param traversalDescription Optional. Used to track the current key that we are operating on.
|
|
28
|
+
* Default is an empty string.
|
|
29
|
+
* @param insideMap Optional. Tracks whether or not the deep copy function is in the process of
|
|
30
|
+
* recursively copying a TSTL Map. Default is false.
|
|
28
31
|
*/
|
|
29
|
-
export declare function deepCopy(value: unknown, serializationType?: SerializationType, traversalDescription?: string): unknown;
|
|
32
|
+
export declare function deepCopy(value: unknown, serializationType?: SerializationType, traversalDescription?: string, insideMap?: boolean): unknown;
|
|
30
33
|
//# sourceMappingURL=deepCopy.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepCopy.d.ts","sourceRoot":"","sources":["../../src/functions/deepCopy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AA4B/D
|
|
1
|
+
{"version":3,"file":"deepCopy.d.ts","sourceRoot":"","sources":["../../src/functions/deepCopy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AA4B/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,OAAO,EACd,iBAAiB,oBAAyB,EAC1C,oBAAoB,SAAK,EACzB,SAAS,UAAQ,GAChB,OAAO,CAkDT"}
|
|
@@ -66,17 +66,23 @@ local twoDimensionalSort = ____utils.twoDimensionalSort
|
|
|
66
66
|
-- - other Isaac API objects such as `EntityPtr` (that have a type of "userdata")
|
|
67
67
|
--
|
|
68
68
|
-- @param value The primitive or object to copy.
|
|
69
|
-
-- @param serializationType Has 3 possible values. Can
|
|
70
|
-
-- to Lua tables, or can deserialize Lua tables to
|
|
71
|
-
-- `SerializationType.NONE`.
|
|
72
|
-
-- @param traversalDescription Used to track the current key that we are operating on.
|
|
73
|
-
|
|
69
|
+
-- @param serializationType Optional. Has 3 possible values. Can copy objects as-is, or can
|
|
70
|
+
-- serialize objects to Lua tables, or can deserialize Lua tables to
|
|
71
|
+
-- objects. Default is `SerializationType.NONE`.
|
|
72
|
+
-- @param traversalDescription Optional. Used to track the current key that we are operating on.
|
|
73
|
+
-- Default is an empty string.
|
|
74
|
+
-- @param insideMap Optional. Tracks whether or not the deep copy function is in the process of
|
|
75
|
+
-- recursively copying a TSTL Map. Default is false.
|
|
76
|
+
function ____exports.deepCopy(self, value, serializationType, traversalDescription, insideMap)
|
|
74
77
|
if serializationType == nil then
|
|
75
78
|
serializationType = SerializationType.NONE
|
|
76
79
|
end
|
|
77
80
|
if traversalDescription == nil then
|
|
78
81
|
traversalDescription = ""
|
|
79
82
|
end
|
|
83
|
+
if insideMap == nil then
|
|
84
|
+
insideMap = false
|
|
85
|
+
end
|
|
80
86
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
81
87
|
local logString = "deepCopy is operating on: " .. traversalDescription
|
|
82
88
|
if serializationType == SerializationType.SERIALIZE then
|
|
@@ -109,7 +115,13 @@ function ____exports.deepCopy(self, value, serializationType, traversalDescripti
|
|
|
109
115
|
if ____cond6 then
|
|
110
116
|
do
|
|
111
117
|
local luaTable = value
|
|
112
|
-
return deepCopyTable(
|
|
118
|
+
return deepCopyTable(
|
|
119
|
+
nil,
|
|
120
|
+
luaTable,
|
|
121
|
+
serializationType,
|
|
122
|
+
traversalDescription,
|
|
123
|
+
insideMap
|
|
124
|
+
)
|
|
113
125
|
end
|
|
114
126
|
end
|
|
115
127
|
____cond6 = ____cond6 or ____switch6 == "userdata"
|
|
@@ -120,15 +132,33 @@ function ____exports.deepCopy(self, value, serializationType, traversalDescripti
|
|
|
120
132
|
end
|
|
121
133
|
until true
|
|
122
134
|
end
|
|
123
|
-
function deepCopyTable(self, luaTable, serializationType, traversalDescription)
|
|
135
|
+
function deepCopyTable(self, luaTable, serializationType, traversalDescription, insideMap)
|
|
124
136
|
if isDefaultMap(nil, luaTable) or luaTable[SerializationBrand.DEFAULT_MAP] ~= nil then
|
|
125
|
-
return deepCopyDefaultMap(
|
|
137
|
+
return deepCopyDefaultMap(
|
|
138
|
+
nil,
|
|
139
|
+
luaTable,
|
|
140
|
+
serializationType,
|
|
141
|
+
traversalDescription,
|
|
142
|
+
insideMap
|
|
143
|
+
)
|
|
126
144
|
end
|
|
127
145
|
if isTSTLMap(nil, luaTable) or luaTable[SerializationBrand.MAP] ~= nil then
|
|
128
|
-
return deepCopyMap(
|
|
146
|
+
return deepCopyMap(
|
|
147
|
+
nil,
|
|
148
|
+
luaTable,
|
|
149
|
+
serializationType,
|
|
150
|
+
traversalDescription,
|
|
151
|
+
insideMap
|
|
152
|
+
)
|
|
129
153
|
end
|
|
130
154
|
if isTSTLSet(nil, luaTable) or luaTable[SerializationBrand.SET] ~= nil then
|
|
131
|
-
return deepCopySet(
|
|
155
|
+
return deepCopySet(
|
|
156
|
+
nil,
|
|
157
|
+
luaTable,
|
|
158
|
+
serializationType,
|
|
159
|
+
traversalDescription,
|
|
160
|
+
insideMap
|
|
161
|
+
)
|
|
132
162
|
end
|
|
133
163
|
local className = getTSTLClassName(nil, luaTable)
|
|
134
164
|
if className == "WeakMap" then
|
|
@@ -138,18 +168,36 @@ function deepCopyTable(self, luaTable, serializationType, traversalDescription)
|
|
|
138
168
|
error("The deep copy function does not support copying the \"WeakSet\" class for: " .. traversalDescription)
|
|
139
169
|
end
|
|
140
170
|
if isUserDefinedTSTLClass(nil, luaTable) then
|
|
141
|
-
return deepCopyTSTLClass(
|
|
171
|
+
return deepCopyTSTLClass(
|
|
172
|
+
nil,
|
|
173
|
+
luaTable,
|
|
174
|
+
serializationType,
|
|
175
|
+
traversalDescription,
|
|
176
|
+
insideMap
|
|
177
|
+
)
|
|
142
178
|
end
|
|
143
179
|
checkMetatable(nil, luaTable, traversalDescription)
|
|
144
180
|
if isSerializedIsaacAPIClass(nil, luaTable) and serializationType == SerializationType.DESERIALIZE then
|
|
145
181
|
return deserializeIsaacAPIClass(nil, luaTable)
|
|
146
182
|
end
|
|
147
183
|
if isArray(nil, luaTable) then
|
|
148
|
-
return deepCopyArray(
|
|
149
|
-
|
|
150
|
-
|
|
184
|
+
return deepCopyArray(
|
|
185
|
+
nil,
|
|
186
|
+
luaTable,
|
|
187
|
+
serializationType,
|
|
188
|
+
traversalDescription,
|
|
189
|
+
insideMap
|
|
190
|
+
)
|
|
191
|
+
end
|
|
192
|
+
return deepCopyNormalLuaTable(
|
|
193
|
+
nil,
|
|
194
|
+
luaTable,
|
|
195
|
+
serializationType,
|
|
196
|
+
traversalDescription,
|
|
197
|
+
insideMap
|
|
198
|
+
)
|
|
151
199
|
end
|
|
152
|
-
function deepCopyDefaultMap(self, defaultMap, serializationType, traversalDescription)
|
|
200
|
+
function deepCopyDefaultMap(self, defaultMap, serializationType, traversalDescription, insideMap)
|
|
153
201
|
local ____isDefaultMap_result_0
|
|
154
202
|
if isDefaultMap(nil, defaultMap) then
|
|
155
203
|
____isDefaultMap_result_0 = defaultMap:getConstructorArg()
|
|
@@ -158,7 +206,17 @@ function deepCopyDefaultMap(self, defaultMap, serializationType, traversalDescri
|
|
|
158
206
|
end
|
|
159
207
|
local constructorArg = ____isDefaultMap_result_0
|
|
160
208
|
if serializationType == SerializationType.SERIALIZE and not isPrimitive(nil, constructorArg) then
|
|
161
|
-
|
|
209
|
+
if insideMap then
|
|
210
|
+
error("Failed to deep copy a DefaultMap because it was instantiated with a factory function and was also inside of another map. You cannot use a nested DefaultMap in this way because factory functions are not serializable. (In other words, there is no way to copy the function that you are using for the DefaultMap into the \"save#.dat\" file.) Instead, refactor your data structure so that the DefaultMap is not nested.")
|
|
211
|
+
else
|
|
212
|
+
return deepCopyMap(
|
|
213
|
+
nil,
|
|
214
|
+
defaultMap,
|
|
215
|
+
serializationType,
|
|
216
|
+
traversalDescription,
|
|
217
|
+
insideMap
|
|
218
|
+
)
|
|
219
|
+
end
|
|
162
220
|
end
|
|
163
221
|
local newDefaultMap = getNewDefaultMap(
|
|
164
222
|
nil,
|
|
@@ -167,7 +225,14 @@ function deepCopyDefaultMap(self, defaultMap, serializationType, traversalDescri
|
|
|
167
225
|
traversalDescription,
|
|
168
226
|
constructorArg
|
|
169
227
|
)
|
|
170
|
-
|
|
228
|
+
insideMap = true
|
|
229
|
+
local ____getCopiedEntries_result_1 = getCopiedEntries(
|
|
230
|
+
nil,
|
|
231
|
+
defaultMap,
|
|
232
|
+
serializationType,
|
|
233
|
+
traversalDescription,
|
|
234
|
+
insideMap
|
|
235
|
+
)
|
|
171
236
|
local entries = ____getCopiedEntries_result_1.entries
|
|
172
237
|
local convertedNumberKeysToStrings = ____getCopiedEntries_result_1.convertedNumberKeysToStrings
|
|
173
238
|
if convertedNumberKeysToStrings then
|
|
@@ -186,19 +251,20 @@ function deepCopyDefaultMap(self, defaultMap, serializationType, traversalDescri
|
|
|
186
251
|
newDefaultMap[key] = value
|
|
187
252
|
end
|
|
188
253
|
end
|
|
254
|
+
insideMap = false
|
|
189
255
|
return newDefaultMap
|
|
190
256
|
end
|
|
191
257
|
function getNewDefaultMap(self, defaultMap, serializationType, traversalDescription, constructorArg)
|
|
192
258
|
repeat
|
|
193
|
-
local
|
|
194
|
-
local
|
|
195
|
-
if
|
|
259
|
+
local ____switch33 = serializationType
|
|
260
|
+
local ____cond33 = ____switch33 == SerializationType.NONE
|
|
261
|
+
if ____cond33 then
|
|
196
262
|
do
|
|
197
263
|
return __TS__New(DefaultMap, constructorArg)
|
|
198
264
|
end
|
|
199
265
|
end
|
|
200
|
-
|
|
201
|
-
if
|
|
266
|
+
____cond33 = ____cond33 or ____switch33 == SerializationType.SERIALIZE
|
|
267
|
+
if ____cond33 then
|
|
202
268
|
do
|
|
203
269
|
local newDefaultMap = {}
|
|
204
270
|
newDefaultMap[SerializationBrand.DEFAULT_MAP] = ""
|
|
@@ -206,8 +272,8 @@ function getNewDefaultMap(self, defaultMap, serializationType, traversalDescript
|
|
|
206
272
|
return newDefaultMap
|
|
207
273
|
end
|
|
208
274
|
end
|
|
209
|
-
|
|
210
|
-
if
|
|
275
|
+
____cond33 = ____cond33 or ____switch33 == SerializationType.DESERIALIZE
|
|
276
|
+
if ____cond33 then
|
|
211
277
|
do
|
|
212
278
|
if isDefaultMap(nil, defaultMap) then
|
|
213
279
|
error(("The deep copy function failed to deserialize a default map of \"" .. traversalDescription) .. "\", since it was not a Lua table.")
|
|
@@ -221,7 +287,7 @@ function getNewDefaultMap(self, defaultMap, serializationType, traversalDescript
|
|
|
221
287
|
end
|
|
222
288
|
until true
|
|
223
289
|
end
|
|
224
|
-
function deepCopyMap(self, map, serializationType, traversalDescription)
|
|
290
|
+
function deepCopyMap(self, map, serializationType, traversalDescription, insideMap)
|
|
225
291
|
local newMap
|
|
226
292
|
if serializationType == SerializationType.SERIALIZE then
|
|
227
293
|
newMap = {}
|
|
@@ -229,7 +295,14 @@ function deepCopyMap(self, map, serializationType, traversalDescription)
|
|
|
229
295
|
else
|
|
230
296
|
newMap = __TS__New(Map)
|
|
231
297
|
end
|
|
232
|
-
|
|
298
|
+
insideMap = true
|
|
299
|
+
local ____getCopiedEntries_result_2 = getCopiedEntries(
|
|
300
|
+
nil,
|
|
301
|
+
map,
|
|
302
|
+
serializationType,
|
|
303
|
+
traversalDescription,
|
|
304
|
+
insideMap
|
|
305
|
+
)
|
|
233
306
|
local entries = ____getCopiedEntries_result_2.entries
|
|
234
307
|
local convertedNumberKeysToStrings = ____getCopiedEntries_result_2.convertedNumberKeysToStrings
|
|
235
308
|
if convertedNumberKeysToStrings then
|
|
@@ -248,9 +321,10 @@ function deepCopyMap(self, map, serializationType, traversalDescription)
|
|
|
248
321
|
newMap[key] = value
|
|
249
322
|
end
|
|
250
323
|
end
|
|
324
|
+
insideMap = false
|
|
251
325
|
return newMap
|
|
252
326
|
end
|
|
253
|
-
function deepCopySet(self, set, serializationType, traversalDescription)
|
|
327
|
+
function deepCopySet(self, set, serializationType, traversalDescription, insideMap)
|
|
254
328
|
local newSet
|
|
255
329
|
if serializationType == SerializationType.SERIALIZE then
|
|
256
330
|
newSet = {}
|
|
@@ -258,7 +332,13 @@ function deepCopySet(self, set, serializationType, traversalDescription)
|
|
|
258
332
|
else
|
|
259
333
|
newSet = __TS__New(Set)
|
|
260
334
|
end
|
|
261
|
-
local ____getCopiedEntries_result_3 = getCopiedEntries(
|
|
335
|
+
local ____getCopiedEntries_result_3 = getCopiedEntries(
|
|
336
|
+
nil,
|
|
337
|
+
set,
|
|
338
|
+
serializationType,
|
|
339
|
+
traversalDescription,
|
|
340
|
+
insideMap
|
|
341
|
+
)
|
|
262
342
|
local entries = ____getCopiedEntries_result_3.entries
|
|
263
343
|
local convertedNumberKeysToStrings = ____getCopiedEntries_result_3.convertedNumberKeysToStrings
|
|
264
344
|
if convertedNumberKeysToStrings then
|
|
@@ -278,14 +358,20 @@ function deepCopySet(self, set, serializationType, traversalDescription)
|
|
|
278
358
|
end
|
|
279
359
|
return newSet
|
|
280
360
|
end
|
|
281
|
-
function deepCopyTSTLClass(self, tstlClass, serializationType, traversalDescription)
|
|
361
|
+
function deepCopyTSTLClass(self, tstlClass, serializationType, traversalDescription, insideMap)
|
|
282
362
|
local newClass
|
|
283
363
|
if serializationType == SerializationType.SERIALIZE then
|
|
284
364
|
newClass = {}
|
|
285
365
|
else
|
|
286
366
|
newClass = newTSTLClass(nil, tstlClass)
|
|
287
367
|
end
|
|
288
|
-
local ____getCopiedEntries_result_4 = getCopiedEntries(
|
|
368
|
+
local ____getCopiedEntries_result_4 = getCopiedEntries(
|
|
369
|
+
nil,
|
|
370
|
+
tstlClass,
|
|
371
|
+
serializationType,
|
|
372
|
+
traversalDescription,
|
|
373
|
+
insideMap
|
|
374
|
+
)
|
|
289
375
|
local entries = ____getCopiedEntries_result_4.entries
|
|
290
376
|
local convertedNumberKeysToStrings = ____getCopiedEntries_result_4.convertedNumberKeysToStrings
|
|
291
377
|
if convertedNumberKeysToStrings then
|
|
@@ -298,17 +384,29 @@ function deepCopyTSTLClass(self, tstlClass, serializationType, traversalDescript
|
|
|
298
384
|
end
|
|
299
385
|
return newClass
|
|
300
386
|
end
|
|
301
|
-
function deepCopyArray(self, array, serializationType, traversalDescription)
|
|
387
|
+
function deepCopyArray(self, array, serializationType, traversalDescription, insideMap)
|
|
302
388
|
local newArray = {}
|
|
303
389
|
for ____, value in ipairs(array) do
|
|
304
|
-
local newValue = ____exports.deepCopy(
|
|
390
|
+
local newValue = ____exports.deepCopy(
|
|
391
|
+
nil,
|
|
392
|
+
value,
|
|
393
|
+
serializationType,
|
|
394
|
+
traversalDescription,
|
|
395
|
+
insideMap
|
|
396
|
+
)
|
|
305
397
|
newArray[#newArray + 1] = newValue
|
|
306
398
|
end
|
|
307
399
|
return newArray
|
|
308
400
|
end
|
|
309
|
-
function deepCopyNormalLuaTable(self, luaTable, serializationType, traversalDescription)
|
|
401
|
+
function deepCopyNormalLuaTable(self, luaTable, serializationType, traversalDescription, insideMap)
|
|
310
402
|
local newTable = {}
|
|
311
|
-
local ____getCopiedEntries_result_5 = getCopiedEntries(
|
|
403
|
+
local ____getCopiedEntries_result_5 = getCopiedEntries(
|
|
404
|
+
nil,
|
|
405
|
+
luaTable,
|
|
406
|
+
serializationType,
|
|
407
|
+
traversalDescription,
|
|
408
|
+
insideMap
|
|
409
|
+
)
|
|
312
410
|
local entries = ____getCopiedEntries_result_5.entries
|
|
313
411
|
local convertedNumberKeysToStrings = ____getCopiedEntries_result_5.convertedNumberKeysToStrings
|
|
314
412
|
if convertedNumberKeysToStrings then
|
|
@@ -321,7 +419,7 @@ function deepCopyNormalLuaTable(self, luaTable, serializationType, traversalDesc
|
|
|
321
419
|
end
|
|
322
420
|
return newTable
|
|
323
421
|
end
|
|
324
|
-
function getCopiedEntries(self, object, serializationType, traversalDescription)
|
|
422
|
+
function getCopiedEntries(self, object, serializationType, traversalDescription, insideMap)
|
|
325
423
|
local entries = {}
|
|
326
424
|
if isTSTLMap(nil, object) or isTSTLSet(nil, object) or isDefaultMap(nil, object) then
|
|
327
425
|
for ____, ____value in __TS__Iterator(object:entries()) do
|
|
@@ -353,14 +451,20 @@ function getCopiedEntries(self, object, serializationType, traversalDescription)
|
|
|
353
451
|
local value = ____value[2]
|
|
354
452
|
do
|
|
355
453
|
if isSerializationBrand(nil, key) then
|
|
356
|
-
goto
|
|
454
|
+
goto __continue80
|
|
357
455
|
end
|
|
358
456
|
traversalDescription = getTraversalDescription(nil, key, traversalDescription)
|
|
359
|
-
local newValue = ____exports.deepCopy(
|
|
457
|
+
local newValue = ____exports.deepCopy(
|
|
458
|
+
nil,
|
|
459
|
+
value,
|
|
460
|
+
serializationType,
|
|
461
|
+
traversalDescription,
|
|
462
|
+
insideMap
|
|
463
|
+
)
|
|
360
464
|
local keyToUse = convertNumberKeysToStrings and tostring(key) or key
|
|
361
465
|
copiedEntries[#copiedEntries + 1] = {keyToUse, newValue}
|
|
362
466
|
end
|
|
363
|
-
::
|
|
467
|
+
::__continue80::
|
|
364
468
|
end
|
|
365
469
|
return {entries = copiedEntries, convertedNumberKeysToStrings = convertNumberKeysToStrings}
|
|
366
470
|
end
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Run the suite of tests that prove that the "deepCopy" helper function works properly.
|
|
3
|
+
*
|
|
4
|
+
* This function is only useful if you are troubleshooting the "deepCopy" function.
|
|
5
|
+
*/
|
|
6
|
+
export declare function runDeepCopyTests(): void;
|
|
2
7
|
//# sourceMappingURL=deepCopyTests.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepCopyTests.d.ts","sourceRoot":"","sources":["../../src/functions/deepCopyTests.ts"],"names":[],"mappings":"AASA,wBAAgB,
|
|
1
|
+
{"version":3,"file":"deepCopyTests.d.ts","sourceRoot":"","sources":["../../src/functions/deepCopyTests.ts"],"names":[],"mappings":"AASA;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAqBvC"}
|