isaacscript-common 7.1.0 → 7.2.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/callbacks/itemPickup.d.ts.map +1 -1
- package/dist/callbacks/itemPickup.lua +3 -1
- package/dist/callbacks/postCustomDoorEnter.d.ts.map +1 -1
- package/dist/callbacks/postCustomDoorEnter.lua +14 -11
- package/dist/callbacks/postDiceRoomActivated.d.ts.map +1 -1
- package/dist/callbacks/postDiceRoomActivated.lua +5 -4
- package/dist/callbacks/postItemDischarged.lua +2 -1
- package/dist/callbacks/postPlayerChangeStat.d.ts.map +1 -1
- package/dist/callbacks/postPlayerChangeStat.lua +44 -15
- package/dist/callbacks/postSlotDestroyed.lua +3 -3
- package/dist/classes/DefaultMap.d.ts +5 -5
- package/dist/classes/DefaultMap.d.ts.map +1 -1
- package/dist/core/constants.d.ts +2 -2
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.lua +3 -1
- package/dist/core/constantsFirstLast.d.ts +2 -0
- package/dist/core/constantsFirstLast.d.ts.map +1 -1
- package/dist/core/constantsFirstLast.lua +36 -9
- package/dist/enums/AmbushType.d.ts +1 -0
- package/dist/enums/AmbushType.d.ts.map +1 -1
- package/dist/enums/AmbushType.lua +1 -0
- package/dist/enums/CornerType.d.ts +1 -0
- package/dist/enums/CornerType.d.ts.map +1 -1
- package/dist/enums/CornerType.lua +1 -0
- package/dist/enums/PocketItemType.d.ts +1 -0
- package/dist/enums/PocketItemType.d.ts.map +1 -1
- package/dist/enums/PocketItemType.lua +1 -0
- package/dist/enums/RockAltType.d.ts +1 -0
- package/dist/enums/RockAltType.d.ts.map +1 -1
- package/dist/enums/RockAltType.lua +1 -0
- package/dist/enums/SaveDataKey.d.ts +11 -0
- package/dist/enums/SaveDataKey.d.ts.map +1 -0
- package/dist/enums/{private/SaveDataKey.lua → SaveDataKey.lua} +2 -0
- package/dist/enums/SerializationType.d.ts +1 -0
- package/dist/enums/SerializationType.d.ts.map +1 -1
- package/dist/enums/SerializationType.lua +1 -0
- package/dist/enums/SlotDestructionType.d.ts +1 -0
- package/dist/enums/SlotDestructionType.d.ts.map +1 -1
- package/dist/enums/SlotDestructionType.lua +1 -0
- package/dist/enums/StatType.d.ts +1 -3
- package/dist/enums/StatType.d.ts.map +1 -1
- package/dist/enums/StatType.lua +0 -2
- package/dist/enums/index.d.ts +1 -0
- package/dist/enums/index.d.ts.map +1 -1
- package/dist/enums/index.lua +8 -0
- package/dist/features/customGridEntity.d.ts.map +1 -1
- package/dist/features/customGridEntity.lua +3 -1
- package/dist/features/customStage/backdrop.d.ts +1 -1
- package/dist/features/customStage/backdrop.d.ts.map +1 -1
- package/dist/features/customStage/backdrop.lua +5 -3
- package/dist/features/customStage/customStageGridEntities.d.ts.map +1 -1
- package/dist/features/customStage/customStageGridEntities.lua +3 -1
- package/dist/features/customStage/exports.d.ts.map +1 -1
- package/dist/features/customStage/exports.lua +3 -1
- package/dist/features/customStage/init.lua +2 -2
- package/dist/features/customStage/shadows.d.ts.map +1 -1
- package/dist/features/customStage/shadows.lua +2 -1
- package/dist/features/deployJSONRoom.lua +13 -10
- package/dist/features/extraConsoleCommands/listCommands.d.ts.map +1 -1
- package/dist/features/extraConsoleCommands/listCommands.lua +8 -2
- package/dist/features/saveDataManager/exports.d.ts +2 -1
- package/dist/features/saveDataManager/exports.d.ts.map +1 -1
- package/dist/features/saveDataManager/main.d.ts +1 -1
- package/dist/features/saveDataManager/main.d.ts.map +1 -1
- package/dist/features/saveDataManager/main.lua +1 -1
- package/dist/functions/bitSet128.d.ts.map +1 -1
- package/dist/functions/bosses.d.ts.map +1 -1
- package/dist/functions/bosses.lua +3 -1
- package/dist/functions/cacheFlag.d.ts +23 -1
- package/dist/functions/cacheFlag.d.ts.map +1 -1
- package/dist/functions/cacheFlag.lua +78 -0
- package/dist/functions/collectibles.d.ts.map +1 -1
- package/dist/functions/deepCopy.lua +2 -1
- package/dist/functions/doors.d.ts.map +1 -1
- package/dist/functions/doors.lua +3 -1
- package/dist/functions/entities.lua +2 -1
- package/dist/functions/flying.lua +2 -2
- package/dist/functions/gridEntities.lua +2 -1
- package/dist/functions/gridEntitiesSpecific.d.ts.map +1 -1
- package/dist/functions/gridEntitiesSpecific.lua +5 -3
- package/dist/functions/index.d.ts +0 -1
- package/dist/functions/index.d.ts.map +1 -1
- package/dist/functions/index.lua +0 -8
- package/dist/functions/input.d.ts +5 -2
- package/dist/functions/input.d.ts.map +1 -1
- package/dist/functions/input.lua +11 -3
- package/dist/functions/kColor.d.ts.map +1 -1
- package/dist/functions/levelGrid.d.ts.map +1 -1
- package/dist/functions/levelGrid.lua +3 -1
- package/dist/functions/nextStage.d.ts.map +1 -1
- package/dist/functions/nextStage.lua +7 -5
- package/dist/functions/npcs.d.ts.map +1 -1
- package/dist/functions/npcs.lua +4 -2
- package/dist/functions/pills.d.ts.map +1 -1
- package/dist/functions/pills.lua +9 -3
- package/dist/functions/playerIndex.d.ts.map +1 -1
- package/dist/functions/playerIndex.lua +2 -1
- package/dist/functions/playerStats.d.ts.map +1 -1
- package/dist/functions/playerStats.lua +1 -2
- package/dist/functions/players.d.ts +1 -1
- package/dist/functions/players.d.ts.map +1 -1
- package/dist/functions/players.lua +13 -15
- package/dist/functions/pocketItems.d.ts.map +1 -1
- package/dist/functions/pocketItems.lua +3 -1
- package/dist/functions/rng.d.ts.map +1 -1
- package/dist/functions/rng.lua +3 -0
- package/dist/functions/rockAlt.d.ts.map +1 -1
- package/dist/functions/rockAlt.lua +11 -20
- package/dist/functions/rooms.d.ts +4 -4
- package/dist/functions/rooms.d.ts.map +1 -1
- package/dist/functions/rooms.lua +18 -16
- package/dist/functions/spawnCollectible.d.ts.map +1 -1
- package/dist/functions/stage.d.ts.map +1 -1
- package/dist/functions/stage.lua +8 -2
- package/dist/functions/trinkets.d.ts.map +1 -1
- package/dist/functions/trinkets.lua +4 -2
- package/dist/functions/types.d.ts +64 -0
- package/dist/functions/types.d.ts.map +1 -1
- package/dist/functions/types.lua +63 -0
- package/dist/functions/vector.d.ts.map +1 -1
- package/dist/interfaces/ChargeBarSprites.d.ts +1 -1
- package/dist/interfaces/Corner.d.ts +5 -0
- package/dist/interfaces/Corner.d.ts.map +1 -1
- package/dist/interfaces/CustomStageLua.d.ts +57 -0
- package/dist/interfaces/CustomStageLua.d.ts.map +1 -1
- package/dist/interfaces/GridEntityCustomData.d.ts +6 -0
- package/dist/interfaces/GridEntityCustomData.d.ts.map +1 -1
- package/dist/interfaces/JSONRoomsFile.d.ts +7 -3
- package/dist/interfaces/JSONRoomsFile.d.ts.map +1 -1
- package/dist/interfaces/PlayerHealth.d.ts +1 -1
- package/dist/interfaces/PlayerHealth.d.ts.map +1 -1
- package/dist/interfaces/PocketItemDescription.d.ts +1 -1
- package/dist/interfaces/PocketItemDescription.d.ts.map +1 -1
- package/dist/interfaces/RoomDescription.d.ts +1 -1
- package/dist/interfaces/RoomDescription.d.ts.map +1 -1
- package/dist/interfaces/StatTypeType.d.ts +4 -1
- package/dist/interfaces/StatTypeType.d.ts.map +1 -1
- package/dist/interfaces/TrinketSituation.d.ts +1 -1
- package/dist/interfaces/TrinketSituation.d.ts.map +1 -1
- package/dist/maps/keyboardToString.d.ts +4 -0
- package/dist/maps/keyboardToString.d.ts.map +1 -0
- package/dist/maps/keyboardToString.lua +73 -0
- package/dist/types/AnyEntity.d.ts +5 -0
- package/dist/types/AnyEntity.d.ts.map +1 -1
- package/dist/types/AnyGridEntity.d.ts +5 -0
- package/dist/types/AnyGridEntity.d.ts.map +1 -1
- package/dist/types/CollectibleIndex.d.ts +4 -3
- package/dist/types/CollectibleIndex.d.ts.map +1 -1
- package/dist/types/Immutable.d.ts +3 -1
- package/dist/types/Immutable.d.ts.map +1 -1
- package/dist/types/PickupIndex.d.ts +4 -2
- package/dist/types/PickupIndex.d.ts.map +1 -1
- package/dist/types/PlayerIndex.d.ts +3 -2
- package/dist/types/PlayerIndex.d.ts.map +1 -1
- package/dist/types/SerializedIsaacAPIClass.d.ts +6 -0
- package/dist/types/SerializedIsaacAPIClass.d.ts.map +1 -1
- package/dist/types/TSTLClass.d.ts +5 -0
- package/dist/types/TSTLClass.d.ts.map +1 -1
- package/dist/types/TrapdoorDestination.d.ts +3 -0
- package/dist/types/TrapdoorDestination.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/callbacks/itemPickup.ts +5 -2
- package/src/callbacks/postCustomDoorEnter.ts +18 -11
- package/src/callbacks/postDiceRoomActivated.ts +7 -12
- package/src/callbacks/postItemDischarged.ts +3 -1
- package/src/callbacks/postPlayerChangeStat.ts +45 -3
- package/src/callbacks/postSlotDestroyed.ts +3 -2
- package/src/callbacks/reorderedCallbacks.ts +2 -2
- package/src/classes/DefaultMap.ts +8 -8
- package/src/core/constants.ts +3 -3
- package/src/core/constantsFirstLast.ts +29 -14
- package/src/enums/AmbushType.ts +1 -0
- package/src/enums/CornerType.ts +1 -0
- package/src/enums/PocketItemType.ts +1 -0
- package/src/enums/RockAltType.ts +1 -0
- package/src/enums/SaveDataKey.ts +10 -0
- package/src/enums/SerializationType.ts +1 -0
- package/src/enums/SlotDestructionType.ts +1 -0
- package/src/enums/StatType.ts +7 -7
- package/src/enums/index.ts +1 -0
- package/src/enums/indexTypeDoc.ts +1 -0
- package/src/features/customGridEntity.ts +2 -1
- package/src/features/customStage/backdrop.ts +5 -3
- package/src/features/customStage/customStageGridEntities.ts +2 -1
- package/src/features/customStage/exports.ts +5 -4
- package/src/features/customStage/init.ts +2 -2
- package/src/features/customStage/shadows.ts +2 -1
- package/src/features/deployJSONRoom.ts +14 -19
- package/src/features/extraConsoleCommands/listCommands.ts +3 -2
- package/src/features/fastReset.ts +1 -1
- package/src/features/indexTypeDoc.ts +2 -1
- package/src/features/saveDataManager/exports.ts +4 -4
- package/src/features/saveDataManager/main.ts +1 -1
- package/src/features/saveDataManager/save.ts +1 -1
- package/src/functions/bitSet128.ts +1 -5
- package/src/functions/bosses.ts +2 -1
- package/src/functions/cacheFlag.ts +90 -1
- package/src/functions/cards.ts +3 -3
- package/src/functions/collectibles.ts +2 -8
- package/src/functions/color.ts +1 -1
- package/src/functions/deepCopy.ts +2 -2
- package/src/functions/dimensions.ts +1 -1
- package/src/functions/doors.ts +2 -2
- package/src/functions/entities.ts +2 -2
- package/src/functions/flying.ts +1 -1
- package/src/functions/gridEntities.ts +2 -2
- package/src/functions/gridEntitiesSpecific.ts +4 -3
- package/src/functions/index.ts +0 -1
- package/src/functions/indexTypeDoc.ts +0 -1
- package/src/functions/input.ts +17 -4
- package/src/functions/jsonHelpers.ts +1 -1
- package/src/functions/kColor.ts +1 -5
- package/src/functions/levelGrid.ts +3 -2
- package/src/functions/nextStage.ts +6 -5
- package/src/functions/npcs.ts +3 -2
- package/src/functions/pills.ts +11 -9
- package/src/functions/playerIndex.ts +3 -1
- package/src/functions/playerStats.ts +0 -1
- package/src/functions/players.ts +5 -6
- package/src/functions/pocketItems.ts +4 -4
- package/src/functions/rng.ts +8 -5
- package/src/functions/rockAlt.ts +28 -13
- package/src/functions/rooms.ts +27 -26
- package/src/functions/spawnCollectible.ts +1 -2
- package/src/functions/stage.ts +3 -2
- package/src/functions/trinkets.ts +6 -5
- package/src/functions/types.ts +100 -0
- package/src/functions/vector.ts +1 -5
- package/src/interfaces/ChargeBarSprites.ts +1 -1
- package/src/interfaces/Corner.ts +5 -0
- package/src/interfaces/CustomStageLua.ts +66 -0
- package/src/interfaces/GridEntityCustomData.ts +6 -0
- package/src/interfaces/JSONRoomsFile.ts +7 -3
- package/src/interfaces/PlayerHealth.ts +1 -1
- package/src/interfaces/PocketItemDescription.ts +1 -1
- package/src/interfaces/RoomDescription.ts +1 -1
- package/src/interfaces/StatTypeType.ts +4 -1
- package/src/interfaces/TrinketSituation.ts +1 -1
- package/src/maps/keyboardToString.ts +77 -0
- package/src/types/AnyEntity.ts +5 -0
- package/src/types/AnyGridEntity.ts +5 -0
- package/src/types/CollectibleIndex.ts +4 -3
- package/src/types/Immutable.ts +3 -1
- package/src/types/PickupIndex.ts +4 -2
- package/src/types/PlayerIndex.ts +3 -2
- package/src/types/SerializedIsaacAPIClass.ts +6 -0
- package/src/types/TSTLClass.ts +5 -0
- package/src/types/TrapdoorDestination.ts +3 -0
- package/dist/enums/private/SaveDataKey.d.ts +0 -7
- package/dist/enums/private/SaveDataKey.d.ts.map +0 -1
- package/dist/functions/collectibleCacheFlag.d.ts +0 -24
- package/dist/functions/collectibleCacheFlag.d.ts.map +0 -1
- package/dist/functions/collectibleCacheFlag.lua +0 -80
- package/src/enums/private/SaveDataKey.ts +0 -6
- package/src/functions/collectibleCacheFlag.ts +0 -90
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/enums/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC"}
|
package/dist/enums/index.lua
CHANGED
|
@@ -47,6 +47,14 @@ do
|
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
|
+
do
|
|
51
|
+
local ____export = require("enums.SaveDataKey")
|
|
52
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
53
|
+
if ____exportKey ~= "default" then
|
|
54
|
+
____exports[____exportKey] = ____exportValue
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
50
58
|
do
|
|
51
59
|
local ____export = require("enums.SerializationType")
|
|
52
60
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customGridEntity.d.ts","sourceRoot":"","sources":["../../src/features/customGridEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,kBAAkB,EAClB,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"customGridEntity.d.ts","sourceRoot":"","sources":["../../src/features/customGridEntity.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,kBAAkB,EAClB,cAAc,EAGf,MAAM,8BAA8B,CAAC;AAGtC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAcrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAqB1E,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CAmB3D;AAkID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,qBAAqB,CACnC,oBAAoB,EAAE,cAAc,EACpC,mBAAmB,EAAE,GAAG,GAAG,MAAM,EACjC,kBAAkB,EAAE,kBAAkB,EACtC,QAAQ,EAAE,MAAM,EAChB,gBAAgB,CAAC,EAAE,MAAM,EACzB,SAAS,UAAQ,GAChB,UAAU,CAyEZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,CACpC,+BAA+B,EAAE,GAAG,GAAG,MAAM,GAAG,UAAU,EAC1D,UAAU,UAAO,GAChB,UAAU,GAAG,SAAS,CAqCxB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,KAAK,CAC5C;IAAC,UAAU,EAAE,UAAU;IAAE,IAAI,EAAE,oBAAoB;CAAC,CACrD,CAiBA"}
|
|
@@ -34,6 +34,8 @@ local removeGridEntity = ____gridEntities.removeGridEntity
|
|
|
34
34
|
local spawnGridEntityWithVariant = ____gridEntities.spawnGridEntityWithVariant
|
|
35
35
|
local ____roomData = require("functions.roomData")
|
|
36
36
|
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
37
|
+
local ____types = require("functions.types")
|
|
38
|
+
local asNumber = ____types.asNumber
|
|
37
39
|
local ____vector = require("functions.vector")
|
|
38
40
|
local isVector = ____vector.isVector
|
|
39
41
|
local ____runInNFrames = require("features.runInNFrames")
|
|
@@ -183,7 +185,7 @@ function ____exports.spawnCustomGridEntity(self, gridEntityTypeCustom, gridIndex
|
|
|
183
185
|
local roomListIndex = getRoomListIndex(nil)
|
|
184
186
|
local gridIndex = isVector(nil, gridIndexOrPosition) and room:GetGridIndex(gridIndexOrPosition) or gridIndexOrPosition
|
|
185
187
|
local existingGridEntity = room:GetGridEntity(gridIndex)
|
|
186
|
-
local isExistingDecoration = existingGridEntity ~= nil and existingGridEntity:GetType() == GridEntityType.DECORATION and existingGridEntity:GetVariant() == DecorationVariant.CUSTOM_GRID_ENTITY
|
|
188
|
+
local isExistingDecoration = existingGridEntity ~= nil and existingGridEntity:GetType() == GridEntityType.DECORATION and existingGridEntity:GetVariant() == asNumber(nil, DecorationVariant.CUSTOM_GRID_ENTITY)
|
|
187
189
|
local decoration = isExistingDecoration and existingGridEntity or spawnGridEntityWithVariant(nil, GridEntityType.DECORATION, DecorationVariant.CUSTOM_GRID_ENTITY, gridIndexOrPosition)
|
|
188
190
|
if decoration == nil then
|
|
189
191
|
error("Failed to spawn a decoration for a custom grid entity.")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backdrop.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/backdrop.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AA2EnE,wBAAgB,
|
|
1
|
+
{"version":3,"file":"backdrop.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/backdrop.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AA2EnE,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAcrE"}
|
|
@@ -36,12 +36,13 @@ end
|
|
|
36
36
|
function spawnWallEntity(self, customStage, rng, isExtraWall)
|
|
37
37
|
local room = game:GetRoom()
|
|
38
38
|
local roomShape = room:GetRoomShape()
|
|
39
|
+
local seed = 1
|
|
39
40
|
local wallEffect = spawnEffectWithSeed(
|
|
40
41
|
nil,
|
|
41
42
|
BACKDROP_EFFECT_VARIANT,
|
|
42
43
|
BACKDROP_EFFECT_SUBTYPE,
|
|
43
44
|
VectorZero,
|
|
44
|
-
|
|
45
|
+
seed
|
|
45
46
|
)
|
|
46
47
|
wallEffect:AddEntityFlags(EntityFlag.RENDER_WALL)
|
|
47
48
|
local sprite = wallEffect:GetSprite()
|
|
@@ -81,12 +82,13 @@ end
|
|
|
81
82
|
function spawnFloorEntity(self, customStage, rng)
|
|
82
83
|
local room = game:GetRoom()
|
|
83
84
|
local roomShape = room:GetRoomShape()
|
|
85
|
+
local seed = 1
|
|
84
86
|
local floorEffect = spawnEffectWithSeed(
|
|
85
87
|
nil,
|
|
86
88
|
BACKDROP_EFFECT_VARIANT,
|
|
87
89
|
0,
|
|
88
90
|
VectorZero,
|
|
89
|
-
|
|
91
|
+
seed
|
|
90
92
|
)
|
|
91
93
|
floorEffect:AddEntityFlags(EntityFlag.RENDER_FLOOR)
|
|
92
94
|
local sprite = floorEffect:GetSprite()
|
|
@@ -179,7 +181,7 @@ N_FLOOR_ANM2_LAYERS = {18, 19}
|
|
|
179
181
|
BACKDROP_EFFECT_VARIANT = EffectVariant.LADDER
|
|
180
182
|
BACKDROP_EFFECT_SUBTYPE = 101
|
|
181
183
|
local BACKDROP_ROOM_TYPE_SET = __TS__New(Set, {RoomType.DEFAULT, RoomType.BOSS, RoomType.MINI_BOSS})
|
|
182
|
-
function ____exports.
|
|
184
|
+
function ____exports.setCustomStageBackdrop(self, customStage)
|
|
183
185
|
local room = game:GetRoom()
|
|
184
186
|
local roomType = room:GetType()
|
|
185
187
|
local decorationSeed = room:GetDecorationSeed()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customStageGridEntities.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageGridEntities.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"customStageGridEntities.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/customStageGridEntities.ts"],"names":[],"mappings":";AAmBA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAMnE,0CAA0C;AAC1C,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAyBN;AAED,oCAAoC;AACpC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAqBN;AAED,mCAAmC;AACnC,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAkBN;AAED,mCAAmC;AACnC,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAmBN;AAuDD,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAsBN;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE,UAAU,GACrB,IAAI,CAsBN"}
|
|
@@ -21,6 +21,8 @@ local getCollectibles = ____pickupsSpecific.getCollectibles
|
|
|
21
21
|
local getTrinkets = ____pickupsSpecific.getTrinkets
|
|
22
22
|
local ____stage = require("functions.stage")
|
|
23
23
|
local calculateStageType = ____stage.calculateStageType
|
|
24
|
+
local ____types = require("functions.types")
|
|
25
|
+
local asNumber = ____types.asNumber
|
|
24
26
|
local ____vector = require("functions.vector")
|
|
25
27
|
local vectorEquals = ____vector.vectorEquals
|
|
26
28
|
local ____exports = require("features.customTrapdoor.exports")
|
|
@@ -162,7 +164,7 @@ function ____exports.setCustomDecorationGraphics(self, customStage, gridEntity)
|
|
|
162
164
|
return
|
|
163
165
|
end
|
|
164
166
|
local variant = gridEntity:GetVariant()
|
|
165
|
-
if variant ~= DecorationVariant.VANILLA_DECORATION then
|
|
167
|
+
if variant ~= asNumber(nil, DecorationVariant.VANILLA_DECORATION) then
|
|
166
168
|
return
|
|
167
169
|
end
|
|
168
170
|
local sprite = gridEntity:GetSprite()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/exports.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,OAAO,EACL,UAAU,EACV,UAAU,EAGV,SAAS,EACV,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/exports.ts"],"names":[],"mappings":"AACA;;;;;;GAMG;AAEH,OAAO,EACL,UAAU,EACV,UAAU,EAGV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAoBtC,eAAO,MAAM,kBAAkB,wBAAwB,CAAC;AACxD,eAAO,MAAM,uBAAuB,qBAAqB,CAAC;AAE1D,eAAO,MAAM,mBAAmB,YAAmB,CAAC;AAEpD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,UAAU,UAAO,EACjB,OAAO,UAAQ,GACd,IAAI,CAwDN;AA4ED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,GAAG,EACZ,OAAO,EAAE,GAAG,EACZ,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,GACtB,IAAI,CAGN;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAEzC"}
|
|
@@ -22,6 +22,8 @@ local getRoomDataForTypeVariant = ____rooms.getRoomDataForTypeVariant
|
|
|
22
22
|
local getRoomsInsideGrid = ____rooms.getRoomsInsideGrid
|
|
23
23
|
local ____stage = require("functions.stage")
|
|
24
24
|
local setStage = ____stage.setStage
|
|
25
|
+
local ____types = require("functions.types")
|
|
26
|
+
local asNumber = ____types.asNumber
|
|
25
27
|
local ____customStageUtils = require("features.customStage.customStageUtils")
|
|
26
28
|
local getRandomCustomStageRoom = ____customStageUtils.getRandomCustomStageRoom
|
|
27
29
|
local ____v = require("features.customStage.v")
|
|
@@ -115,7 +117,7 @@ function ____exports.setCustomStage(self, name, firstFloor, verbose)
|
|
|
115
117
|
baseStage = baseStage + 1
|
|
116
118
|
end
|
|
117
119
|
local baseStageType = customStage.baseStageType == nil and ____exports.DEFAULT_BASE_STAGE_TYPE or customStage.baseStageType
|
|
118
|
-
local reseed = stage >= baseStage
|
|
120
|
+
local reseed = asNumber(nil, stage) >= baseStage
|
|
119
121
|
setStage(nil, baseStage, baseStageType, reseed)
|
|
120
122
|
setStageRoomsData(nil, customStage, rng, verbose)
|
|
121
123
|
local targetStage = ____exports.INVALID_STAGE_VALUE
|
|
@@ -18,7 +18,7 @@ local removeFlag = ____flag.removeFlag
|
|
|
18
18
|
local ____exports = require("features.saveDataManager.exports")
|
|
19
19
|
local saveDataManager = ____exports.saveDataManager
|
|
20
20
|
local ____backdrop = require("features.customStage.backdrop")
|
|
21
|
-
local
|
|
21
|
+
local setCustomStageBackdrop = ____backdrop.setCustomStageBackdrop
|
|
22
22
|
local ____customStageGridEntities = require("features.customStage.customStageGridEntities")
|
|
23
23
|
local convertVanillaTrapdoors = ____customStageGridEntities.convertVanillaTrapdoors
|
|
24
24
|
local removeUrnRewards = ____customStageGridEntities.removeUrnRewards
|
|
@@ -124,7 +124,7 @@ function postNewRoomReordered(self)
|
|
|
124
124
|
if customStage == nil then
|
|
125
125
|
return
|
|
126
126
|
end
|
|
127
|
-
|
|
127
|
+
setCustomStageBackdrop(nil, customStage)
|
|
128
128
|
setShadows(nil, customStage)
|
|
129
129
|
playVersusScreenAnimation(nil, customStage)
|
|
130
130
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/shadows.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAqCnE,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"shadows.d.ts","sourceRoot":"","sources":["../../../src/features/customStage/shadows.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAqCnE,wBAAgB,UAAU,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAsCzD"}
|
|
@@ -48,12 +48,13 @@ function ____exports.setShadows(self, customStage)
|
|
|
48
48
|
if shadows == nil then
|
|
49
49
|
return
|
|
50
50
|
end
|
|
51
|
+
local seed = 1
|
|
51
52
|
local shadowEffect = spawnEffectWithSeed(
|
|
52
53
|
nil,
|
|
53
54
|
SHADOW_EFFECT_VARIANT,
|
|
54
55
|
SHADOW_EFFECT_SUBTYPE,
|
|
55
56
|
centerPos,
|
|
56
|
-
|
|
57
|
+
seed
|
|
57
58
|
)
|
|
58
59
|
local sprite = shadowEffect:GetSprite()
|
|
59
60
|
sprite:Load(ISAACSCRIPT_CUSTOM_STAGE_GFX_PATH .. "/stage-shadow.anm2", false)
|
|
@@ -40,7 +40,6 @@ 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 getGridEntityIDFromConstituents = ____gridEntities.getGridEntityIDFromConstituents
|
|
44
43
|
local removeAllGridExcept = ____gridEntities.removeAllGridExcept
|
|
45
44
|
local removeGridEntity = ____gridEntities.removeGridEntity
|
|
46
45
|
local setGridEntityInvisible = ____gridEntities.setGridEntityInvisible
|
|
@@ -62,6 +61,9 @@ local setRoomCleared = ____rooms.setRoomCleared
|
|
|
62
61
|
local setRoomUncleared = ____rooms.setRoomUncleared
|
|
63
62
|
local ____spawnCollectible = require("functions.spawnCollectible")
|
|
64
63
|
local spawnCollectible = ____spawnCollectible.spawnCollectible
|
|
64
|
+
local ____types = require("functions.types")
|
|
65
|
+
local asCollectibleType = ____types.asCollectibleType
|
|
66
|
+
local asNumber = ____types.asNumber
|
|
65
67
|
local ____runInNFrames = require("features.runInNFrames")
|
|
66
68
|
local runNextGameFrame = ____runInNFrames.runNextGameFrame
|
|
67
69
|
local ____exports = require("features.saveDataManager.exports")
|
|
@@ -225,8 +227,8 @@ function spawnAllEntities(self, jsonRoom, rng, verbose)
|
|
|
225
227
|
error("Failed to get the first JSON entity from an \"entity\" array.")
|
|
226
228
|
end
|
|
227
229
|
local entityTypeString = firstXMLEntity["$"].type
|
|
228
|
-
local
|
|
229
|
-
if
|
|
230
|
+
local entityTypeNumber = tonumber(entityTypeString)
|
|
231
|
+
if entityTypeNumber == nil then
|
|
230
232
|
error("Failed to convert the entity type to a number: " .. entityTypeString)
|
|
231
233
|
end
|
|
232
234
|
local variantString = firstXMLEntity["$"].variant
|
|
@@ -239,19 +241,20 @@ function spawnAllEntities(self, jsonRoom, rng, verbose)
|
|
|
239
241
|
if subType == nil then
|
|
240
242
|
error("Failed to convert the entity sub-type to a number: " .. tostring(subType))
|
|
241
243
|
end
|
|
242
|
-
if
|
|
244
|
+
if entityTypeNumber >= 1000 then
|
|
245
|
+
local gridEntityXMLType = entityTypeNumber
|
|
243
246
|
if verbose then
|
|
244
|
-
|
|
245
|
-
log(((((("Spawning grid entity " .. gridEntityID) .. " at: (") .. tostring(x)) .. ", ") .. tostring(y)) .. ")")
|
|
247
|
+
log(((((((("Spawning grid entity " .. tostring(gridEntityXMLType)) .. ".") .. tostring(variant)) .. " at: (") .. tostring(x)) .. ", ") .. tostring(y)) .. ")")
|
|
246
248
|
end
|
|
247
249
|
spawnGridEntityForJSONRoom(
|
|
248
250
|
nil,
|
|
249
|
-
|
|
251
|
+
gridEntityXMLType,
|
|
250
252
|
variant,
|
|
251
253
|
x,
|
|
252
254
|
y
|
|
253
255
|
)
|
|
254
256
|
else
|
|
257
|
+
local entityType = entityTypeNumber
|
|
255
258
|
if verbose then
|
|
256
259
|
local entityID = getEntityIDFromConstituents(nil, entityType, variant, subType)
|
|
257
260
|
log(((((("Spawning normal entity " .. entityID) .. " at: (") .. tostring(x)) .. ", ") .. tostring(y)) .. ")")
|
|
@@ -306,11 +309,11 @@ function spawnNormalEntityForJSONRoom(self, entityType, variant, subType, x, y,
|
|
|
306
309
|
local position = gridCoordinatesToWorldPosition(nil, x, y)
|
|
307
310
|
local seed = rng:Next()
|
|
308
311
|
local entity
|
|
309
|
-
if entityType == EntityType.PICKUP and variant == PickupVariant.COLLECTIBLE then
|
|
312
|
+
if entityType == EntityType.PICKUP and variant == asNumber(nil, PickupVariant.COLLECTIBLE) then
|
|
310
313
|
local options = roomType == RoomType.ANGEL
|
|
311
314
|
entity = spawnCollectible(
|
|
312
315
|
nil,
|
|
313
|
-
subType,
|
|
316
|
+
asCollectibleType(nil, subType),
|
|
314
317
|
position,
|
|
315
318
|
seed,
|
|
316
319
|
options
|
|
@@ -325,7 +328,7 @@ function spawnNormalEntityForJSONRoom(self, entityType, variant, subType, x, y,
|
|
|
325
328
|
seed
|
|
326
329
|
)
|
|
327
330
|
end
|
|
328
|
-
if entityType == EntityType.PITFALL and variant == PitfallVariant.PITFALL then
|
|
331
|
+
if entityType == EntityType.PITFALL and variant == asNumber(nil, PitfallVariant.PITFALL) then
|
|
329
332
|
entity.EntityCollisionClass = EntityCollisionClass.ENEMIES
|
|
330
333
|
entity.GridCollisionClass = EntityGridCollisionClass.WALLS
|
|
331
334
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/listCommands.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"listCommands.d.ts","sourceRoot":"","sources":["../../../src/features/extraConsoleCommands/listCommands.ts"],"names":[],"mappings":"AA4GA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CA2C/C;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,gEAAgE;AAChE,wBAAgB,MAAM,IAAI,IAAI,CAK7B;AAED,sEAAsE;AACtE,wBAAgB,OAAO,IAAI,IAAI,CAkB9B;AAED,2CAA2C;AAC3C,wBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEvC;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAEhD;AAED,+CAA+C;AAC/C,wBAAgB,WAAW,IAAI,IAAI,CAElC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAcjD;AAED,2CAA2C;AAC3C,wBAAgB,EAAE,IAAI,IAAI,CAEzB;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAczC;AAED;;;GAGG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAc1C;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE/C;AAED,iDAAiD;AACjD,wBAAgB,QAAQ,IAAI,IAAI,CAE/B;AAED,4CAA4C;AAC5C,wBAAgB,QA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nseeded = ____run.setUnseeded
|
|
87
87
|
local ____trinkets = require("functions.trinkets")
|
|
88
88
|
local getGoldenTrinketType = ____trinkets.getGoldenTrinketType
|
|
89
|
+
local ____types = require("functions.types")
|
|
90
|
+
local asCard = ____types.asCard
|
|
89
91
|
local ____utils = require("functions.utils")
|
|
90
92
|
local irange = ____utils.irange
|
|
91
93
|
local printConsole = ____utils.printConsole
|
|
@@ -378,11 +380,15 @@ function ____exports.cards(self)
|
|
|
378
380
|
do
|
|
379
381
|
local x = 0
|
|
380
382
|
while x <= 12 do
|
|
381
|
-
if cardType == LAST_CARD then
|
|
383
|
+
if asCard(nil, cardType) == LAST_CARD then
|
|
382
384
|
return
|
|
383
385
|
end
|
|
384
386
|
local position = gridCoordinatesToWorldPosition(nil, x, y)
|
|
385
|
-
spawnCard(
|
|
387
|
+
spawnCard(
|
|
388
|
+
nil,
|
|
389
|
+
asCard(nil, cardType),
|
|
390
|
+
position
|
|
391
|
+
)
|
|
386
392
|
cardType = cardType + 1
|
|
387
393
|
x = x + 1
|
|
388
394
|
end
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SaveDataKey } from "../../enums/SaveDataKey";
|
|
1
2
|
import { SaveData } from "../../interfaces/SaveData";
|
|
2
3
|
/**
|
|
3
4
|
* This is the entry point to the save data manager, a system which provides two major features:
|
|
@@ -136,5 +137,5 @@ export declare function saveDataManagerSetGlobal(): void;
|
|
|
136
137
|
* saveDataManagerReset("file1", "room");
|
|
137
138
|
* ```
|
|
138
139
|
*/
|
|
139
|
-
export declare function saveDataManagerReset(key: string, childObjectKey:
|
|
140
|
+
export declare function saveDataManagerReset(key: string, childObjectKey: SaveDataKey): void;
|
|
140
141
|
//# sourceMappingURL=exports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/features/saveDataManager/exports.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/features/saveDataManager/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAKtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAarD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,GAAG,EAAE,KAAK,EACpD,GAAG,EAAE,MAAM,EAAE,qEAAqE;AAClF,CAAC,EAAE,QAAQ,CAAC,UAAU,EAAE,GAAG,EAAE,KAAK,CAAC,EACnC,eAAe,CAAC,EAAE,MAAM,OAAO,GAC9B,IAAI,CAAC;AACR,wBAAgB,eAAe,CAC7B,GAAG,EAAE,MAAM,EAAE,kEAAkE;AAC/E,CAAC,EAAE,QAAQ,EACX,eAAe,EAAE,KAAK,GACrB,IAAI,CAAC;AA+CR;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAG1C;AAQD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAK/C;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,oBAAoB,CAClC,GAAG,EAAE,MAAM,EACX,cAAc,EAAE,WAAW,GAC1B,IAAI,CAiBN"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModUpgraded } from "../../classes/ModUpgraded";
|
|
2
|
-
import { SaveDataKey } from "../../enums/
|
|
2
|
+
import { SaveDataKey } from "../../enums/SaveDataKey";
|
|
3
3
|
import { SaveData } from "../../interfaces/SaveData";
|
|
4
4
|
export declare function saveDataManagerInit(incomingMod: ModUpgraded): void;
|
|
5
5
|
export declare function restoreDefaultSaveData(subscriberName: string, saveData: SaveData, saveDataKey: SaveDataKey): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/features/saveDataManager/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/features/saveDataManager/main.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAGxD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAKtD,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAsBrD,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,IAAI,CAUlE;AAuED,wBAAgB,sBAAsB,CACpC,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,WAAW,GACvB,IAAI,CA4CN;AAiBD,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAM/C"}
|
|
@@ -9,7 +9,7 @@ local ____cachedClasses = require("core.cachedClasses")
|
|
|
9
9
|
local game = ____cachedClasses.game
|
|
10
10
|
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
11
11
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
12
|
-
local ____SaveDataKey = require("enums.
|
|
12
|
+
local ____SaveDataKey = require("enums.SaveDataKey")
|
|
13
13
|
local SaveDataKey = ____SaveDataKey.SaveDataKey
|
|
14
14
|
local ____SerializationType = require("enums.SerializationType")
|
|
15
15
|
local SerializationType = ____SerializationType.SerializationType
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bitSet128.d.ts","sourceRoot":"","sources":["../../src/functions/bitSet128.ts"],"names":[],"mappings":";;AAKA,oBAAY,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC1D,QAAQ,CAAC,0BAA0B,EAAE,MAAM,CAAC;CAC7C,CAAC;AAKF,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAW7D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,mBAAmB,GAC7B,SAAS,
|
|
1
|
+
{"version":3,"file":"bitSet128.d.ts","sourceRoot":"","sources":["../../src/functions/bitSet128.ts"],"names":[],"mappings":";;AAKA,oBAAY,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC1D,QAAQ,CAAC,0BAA0B,EAAE,MAAM,CAAC;CAC7C,CAAC;AAKF,6DAA6D;AAC7D,wBAAgB,aAAa,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,CAW7D;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,mBAAmB,GAC7B,SAAS,CAqBX;AAED,mFAAmF;AACnF,wBAAgB,WAAW,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,SAAS,CAEhE;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,OAAO,GACd,MAAM,IAAI,mBAAmB,CAQ/B;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,SAAS,GAAG,mBAAmB,CAW5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../src/functions/bosses.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,SAAS,EACV,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"bosses.d.ts","sourceRoot":"","sources":["../../src/functions/bosses.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,SAAS,EACV,MAAM,8BAA8B,CAAC;AAyBtC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC5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AE,GAAG,GAChB,SAAS,CAYX"}
|
|
@@ -24,6 +24,8 @@ local ____rng = require("functions.rng")
|
|
|
24
24
|
local isRNG = ____rng.isRNG
|
|
25
25
|
local ____set = require("functions.set")
|
|
26
26
|
local copySet = ____set.copySet
|
|
27
|
+
local ____types = require("functions.types")
|
|
28
|
+
local asNumber = ____types.asNumber
|
|
27
29
|
local ____utils = require("functions.utils")
|
|
28
30
|
local ____repeat = ____utils["repeat"]
|
|
29
31
|
function getNumBossSegments(self, entityType, variant, numSegments)
|
|
@@ -41,7 +43,7 @@ function getNumBossSegments(self, entityType, variant, numSegments)
|
|
|
41
43
|
____cond18 = ____cond18 or ____switch18 == EntityType.LOKI
|
|
42
44
|
if ____cond18 then
|
|
43
45
|
do
|
|
44
|
-
return variant == LokiVariant.LOKII and 2 or 1
|
|
46
|
+
return variant == asNumber(nil, LokiVariant.LOKII) and 2 or 1
|
|
45
47
|
end
|
|
46
48
|
end
|
|
47
49
|
____cond18 = ____cond18 or ____switch18 == EntityType.GURGLING
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import { CacheFlag } from "isaac-typescript-definitions";
|
|
1
|
+
import { CacheFlag, CollectibleType } from "isaac-typescript-definitions";
|
|
2
|
+
export declare function collectibleHasCacheFlag(collectibleType: CollectibleType, cacheFlag: CacheFlag): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Returns a set containing every collectible type with the given cache flag, including modded
|
|
5
|
+
* collectibles.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getCollectiblesForCacheFlag(cacheFlag: CacheFlag): Set<CollectibleType>;
|
|
2
8
|
/**
|
|
3
9
|
* Returns the starting stat that Isaac (the default character) starts with. For example, if you
|
|
4
10
|
* pass this function `CacheFlag.DAMAGE`, it will return 3.5.
|
|
@@ -6,4 +12,20 @@ import { CacheFlag } from "isaac-typescript-definitions";
|
|
|
6
12
|
* Note that the default fire delay is represented in the tear stat, not the `MaxFireDelay` value.
|
|
7
13
|
*/
|
|
8
14
|
export declare function getDefaultPlayerStat(cacheFlag: CacheFlag): number | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Returns an array containing every collectible type that the player has that matches the provided
|
|
17
|
+
* CacheFlag.
|
|
18
|
+
*
|
|
19
|
+
* For example, if the cache flag is `CacheFlag.FLYING`, and the player has one Lord of the Pit and
|
|
20
|
+
* two Dead Doves, then this function would return:
|
|
21
|
+
*
|
|
22
|
+
* ```ts
|
|
23
|
+
* [
|
|
24
|
+
* CollectibleType.LORD_OF_THE_PIT,
|
|
25
|
+
* CollectibleType.DEAD_DOVE,
|
|
26
|
+
* CollectibleType.DEAD_DOVE,
|
|
27
|
+
* ]
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function getPlayerCollectiblesForCacheFlag(player: EntityPlayer, cacheFlag: CacheFlag): CollectibleType[];
|
|
9
31
|
//# sourceMappingURL=cacheFlag.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cacheFlag.d.ts","sourceRoot":"","sources":["../../src/functions/cacheFlag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"cacheFlag.d.ts","sourceRoot":"","sources":["../../src/functions/cacheFlag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AA4B1E,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GACnB,OAAO,CAOT;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,SAAS,EAAE,SAAS,GACnB,GAAG,CAAC,eAAe,CAAC,CAYtB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,CAE7E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,YAAY,EACpB,SAAS,EAAE,SAAS,GACnB,eAAe,EAAE,CAYnB"}
|
|
@@ -1,6 +1,56 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local Map = ____lualib.Map
|
|
3
|
+
local __TS__New = ____lualib.__TS__New
|
|
4
|
+
local Set = ____lualib.Set
|
|
1
5
|
local ____exports = {}
|
|
6
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
|
+
local CacheFlag = ____isaac_2Dtypescript_2Ddefinitions.CacheFlag
|
|
8
|
+
local ____cachedClasses = require("core.cachedClasses")
|
|
9
|
+
local itemConfig = ____cachedClasses.itemConfig
|
|
2
10
|
local ____defaultPlayerStatMap = require("maps.defaultPlayerStatMap")
|
|
3
11
|
local DEFAULT_PLAYER_STAT_MAP = ____defaultPlayerStatMap.DEFAULT_PLAYER_STAT_MAP
|
|
12
|
+
local ____collectibleSet = require("functions.collectibleSet")
|
|
13
|
+
local getCollectibleArray = ____collectibleSet.getCollectibleArray
|
|
14
|
+
local ____enums = require("functions.enums")
|
|
15
|
+
local getEnumValues = ____enums.getEnumValues
|
|
16
|
+
local ____flag = require("functions.flag")
|
|
17
|
+
local hasFlag = ____flag.hasFlag
|
|
18
|
+
local ____set = require("functions.set")
|
|
19
|
+
local copySet = ____set.copySet
|
|
20
|
+
local getSortedSetValues = ____set.getSortedSetValues
|
|
21
|
+
local ____utils = require("functions.utils")
|
|
22
|
+
local ____repeat = ____utils["repeat"]
|
|
23
|
+
function ____exports.collectibleHasCacheFlag(self, collectibleType, cacheFlag)
|
|
24
|
+
local itemConfigItem = itemConfig:GetCollectible(collectibleType)
|
|
25
|
+
if itemConfigItem == nil then
|
|
26
|
+
return false
|
|
27
|
+
end
|
|
28
|
+
return hasFlag(nil, itemConfigItem.CacheFlags, cacheFlag)
|
|
29
|
+
end
|
|
30
|
+
local CACHE_FLAG_TO_COLLECTIBLES_MAP = __TS__New(Map)
|
|
31
|
+
local function initCacheFlagMap(self)
|
|
32
|
+
for ____, cacheFlag in ipairs(getEnumValues(nil, CacheFlag)) do
|
|
33
|
+
local collectiblesSet = __TS__New(Set)
|
|
34
|
+
for ____, collectibleType in ipairs(getCollectibleArray(nil)) do
|
|
35
|
+
if ____exports.collectibleHasCacheFlag(nil, collectibleType, cacheFlag) then
|
|
36
|
+
collectiblesSet:add(collectibleType)
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
CACHE_FLAG_TO_COLLECTIBLES_MAP:set(cacheFlag, collectiblesSet)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
--- Returns a set containing every collectible type with the given cache flag, including modded
|
|
43
|
+
-- collectibles.
|
|
44
|
+
function ____exports.getCollectiblesForCacheFlag(self, cacheFlag)
|
|
45
|
+
if CACHE_FLAG_TO_COLLECTIBLES_MAP.size == 0 then
|
|
46
|
+
initCacheFlagMap(nil)
|
|
47
|
+
end
|
|
48
|
+
local collectiblesSet = CACHE_FLAG_TO_COLLECTIBLES_MAP:get(cacheFlag)
|
|
49
|
+
if collectiblesSet == nil then
|
|
50
|
+
return __TS__New(Set)
|
|
51
|
+
end
|
|
52
|
+
return copySet(nil, collectiblesSet)
|
|
53
|
+
end
|
|
4
54
|
--- Returns the starting stat that Isaac (the default character) starts with. For example, if you
|
|
5
55
|
-- pass this function `CacheFlag.DAMAGE`, it will return 3.5.
|
|
6
56
|
--
|
|
@@ -8,4 +58,32 @@ local DEFAULT_PLAYER_STAT_MAP = ____defaultPlayerStatMap.DEFAULT_PLAYER_STAT_MAP
|
|
|
8
58
|
function ____exports.getDefaultPlayerStat(self, cacheFlag)
|
|
9
59
|
return DEFAULT_PLAYER_STAT_MAP:get(cacheFlag)
|
|
10
60
|
end
|
|
61
|
+
--- Returns an array containing every collectible type that the player has that matches the provided
|
|
62
|
+
-- CacheFlag.
|
|
63
|
+
--
|
|
64
|
+
-- For example, if the cache flag is `CacheFlag.FLYING`, and the player has one Lord of the Pit and
|
|
65
|
+
-- two Dead Doves, then this function would return:
|
|
66
|
+
--
|
|
67
|
+
-- ```ts
|
|
68
|
+
-- [
|
|
69
|
+
-- CollectibleType.LORD_OF_THE_PIT,
|
|
70
|
+
-- CollectibleType.DEAD_DOVE,
|
|
71
|
+
-- CollectibleType.DEAD_DOVE,
|
|
72
|
+
-- ]
|
|
73
|
+
-- ```
|
|
74
|
+
function ____exports.getPlayerCollectiblesForCacheFlag(self, player, cacheFlag)
|
|
75
|
+
local collectiblesForCacheFlag = ____exports.getCollectiblesForCacheFlag(nil, cacheFlag)
|
|
76
|
+
local playerCollectibles = {}
|
|
77
|
+
for ____, collectibleType in ipairs(getSortedSetValues(nil, collectiblesForCacheFlag)) do
|
|
78
|
+
local numCollectibles = player:GetCollectibleNum(collectibleType)
|
|
79
|
+
____repeat(
|
|
80
|
+
nil,
|
|
81
|
+
numCollectibles,
|
|
82
|
+
function()
|
|
83
|
+
playerCollectibles[#playerCollectibles + 1] = collectibleType
|
|
84
|
+
end
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
return playerCollectibles
|
|
88
|
+
end
|
|
11
89
|
return ____exports
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collectibles.d.ts","sourceRoot":"","sources":["../../src/functions/collectibles.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,eAAe,EAEf,aAAa,EAEb,QAAQ,EACR,WAAW,EAGZ,MAAM,8BAA8B,CAAC;AAkBtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAyB7D,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,YAAY,GAAG,IAAI,CAEtE;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,GACd,OAAO,CAsBT;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,eAAe,GAC/B,MAAM,CAeR;AAED;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1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GG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,YAAY,EACzB,kBAAkB,EAAE,eAAe,GAClC,IAAI,CA2BN;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,IAAI,IAAI,CAK5D"}
|
|
@@ -40,6 +40,7 @@ local isTSTLSet = ____tstlClass.isTSTLSet
|
|
|
40
40
|
local isUserDefinedTSTLClass = ____tstlClass.isUserDefinedTSTLClass
|
|
41
41
|
local newTSTLClass = ____tstlClass.newTSTLClass
|
|
42
42
|
local ____types = require("functions.types")
|
|
43
|
+
local asString = ____types.asString
|
|
43
44
|
local isNumber = ____types.isNumber
|
|
44
45
|
local isPrimitive = ____types.isPrimitive
|
|
45
46
|
local ____utils = require("functions.utils")
|
|
@@ -459,7 +460,7 @@ function getCopiedEntries(self, object, serializationType, traversalDescription,
|
|
|
459
460
|
function(____, ____bindingPattern0)
|
|
460
461
|
local key
|
|
461
462
|
key = ____bindingPattern0[1]
|
|
462
|
-
return key == SerializationBrand.OBJECT_WITH_NUMBER_KEYS
|
|
463
|
+
return key == asString(nil, SerializationBrand.OBJECT_WITH_NUMBER_KEYS)
|
|
463
464
|
end
|
|
464
465
|
)
|
|
465
466
|
local hasNumberKeys = __TS__ArraySome(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EAIZ,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"doors.d.ts","sourceRoot":"","sources":["../../src/functions/doors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EAIZ,SAAS,EACT,QAAQ,EACT,MAAM,8BAA8B,CAAC;AAwBtC,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,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OG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAUnD;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,IAAI,CAMnC;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAKvD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,SAAS,EAAE,QAAQ,EAAE,GAAG,GAAG,CAK5D;AAED,+CAA+C;AAC/C,wBAAgB,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,CAGrD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,GAAG,KAAK,EAAE,cAAc,EAAE,GAAG,IAAI,CAI5D"}
|
package/dist/functions/doors.lua
CHANGED
|
@@ -37,6 +37,8 @@ local ____enums = require("functions.enums")
|
|
|
37
37
|
local getEnumValues = ____enums.getEnumValues
|
|
38
38
|
local ____tstlClass = require("functions.tstlClass")
|
|
39
39
|
local isTSTLSet = ____tstlClass.isTSTLSet
|
|
40
|
+
local ____types = require("functions.types")
|
|
41
|
+
local asNumber = ____types.asNumber
|
|
40
42
|
function ____exports.doorSlotToDirection(self, doorSlot)
|
|
41
43
|
return DOOR_SLOT_TO_DIRECTION[doorSlot]
|
|
42
44
|
end
|
|
@@ -77,7 +79,7 @@ end
|
|
|
77
79
|
--- Helper function to check if the provided door leads to the "secret exit" off-grid room that takes
|
|
78
80
|
-- you to the Repentance floor.
|
|
79
81
|
function ____exports.isRepentanceDoor(self, door)
|
|
80
|
-
return door.TargetRoomIndex == GridRoom.SECRET_EXIT
|
|
82
|
+
return door.TargetRoomIndex == asNumber(nil, GridRoom.SECRET_EXIT)
|
|
81
83
|
end
|
|
82
84
|
--- This refers to the hole in the wall that appears after bombing the entrance to a secret room.
|
|
83
85
|
-- Note that the door still exists before it has been bombed open. It has a sprite filename of
|
|
@@ -19,6 +19,7 @@ local ____rng = require("functions.rng")
|
|
|
19
19
|
local isRNG = ____rng.isRNG
|
|
20
20
|
local newRNG = ____rng.newRNG
|
|
21
21
|
local ____types = require("functions.types")
|
|
22
|
+
local asNumber = ____types.asNumber
|
|
22
23
|
local isPrimitive = ____types.isPrimitive
|
|
23
24
|
local ____vector = require("functions.vector")
|
|
24
25
|
local isVector = ____vector.isVector
|
|
@@ -179,7 +180,7 @@ function ____exports.getEntities(self, entityType, variant, subType, ignoreFrien
|
|
|
179
180
|
if ignoreFriendly == nil then
|
|
180
181
|
ignoreFriendly = false
|
|
181
182
|
end
|
|
182
|
-
if entityType == -1 then
|
|
183
|
+
if asNumber(nil, entityType) == -1 then
|
|
183
184
|
return Isaac.GetRoomEntities()
|
|
184
185
|
end
|
|
185
186
|
return Isaac.FindByType(entityType, variant, subType, ignoreFriendly)
|