isaacscript-common 2.0.33 → 2.2.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/README.md +1 -1
- package/callbacks/customRevive.lua +11 -11
- package/callbacks/itemPickup.lua +7 -7
- package/callbacks/postBombInitLate.lua +2 -2
- package/callbacks/postBoneSwing.lua +2 -2
- package/callbacks/postCollectibleInitFirst.lua +3 -3
- package/callbacks/postCursedTeleport.lua +6 -6
- package/callbacks/postCustomDoorEnter.lua +9 -9
- package/callbacks/postDoorRender.lua +2 -2
- package/callbacks/postDoorUpdate.lua +2 -2
- package/callbacks/postEffectInitLate.lua +2 -2
- package/callbacks/postEffectStateChanged.lua +3 -3
- package/callbacks/postEsauJr.lua +5 -5
- package/callbacks/postFamiliarInitLate.lua +2 -2
- package/callbacks/postFamiliarStateChanged.lua +3 -3
- package/callbacks/postFlip.lua +4 -4
- package/callbacks/postGreedModeWave.lua +3 -3
- package/callbacks/postGridEntity.lua +7 -7
- package/callbacks/postGridEntityCollision.lua +4 -4
- package/callbacks/postGridEntityRender.lua +2 -2
- package/callbacks/postHolyMantleRemoved.lua +5 -5
- package/callbacks/postItemDischarged.lua +7 -7
- package/callbacks/postKnifeInitLate.lua +2 -2
- package/callbacks/postLaserInitLate.lua +2 -2
- package/callbacks/postNPCInitLate.lua +2 -2
- package/callbacks/postNPCStateChanged.lua +3 -3
- package/callbacks/postNewRoomEarly.lua +4 -4
- package/callbacks/postPickupCollect.lua +3 -3
- package/callbacks/postPickupInitLate.lua +2 -2
- package/callbacks/postPickupStateChanged.lua +3 -3
- package/callbacks/postPitRender.lua +2 -2
- package/callbacks/postPitUpdate.lua +2 -2
- package/callbacks/postPlayerChangeHealth.lua +8 -8
- package/callbacks/postPlayerChangeType.lua +5 -5
- package/callbacks/postPlayerFatalDamage.lua +6 -6
- package/callbacks/postPlayerInitLate.lua +3 -3
- package/callbacks/postPlayerReordered.lua +7 -7
- package/callbacks/postPoopRender.lua +2 -2
- package/callbacks/postPoopUpdate.lua +2 -2
- package/callbacks/postPressurePlateRender.lua +2 -2
- package/callbacks/postPressurePlateUpdate.lua +2 -2
- package/callbacks/postProjectileInitLate.lua +2 -2
- package/callbacks/postPurchase.lua +6 -6
- package/callbacks/postRockRender.lua +2 -2
- package/callbacks/postRockUpdate.lua +2 -2
- package/callbacks/postRoomClearChanged.lua +3 -3
- package/callbacks/postSacrifice.lua +4 -4
- package/callbacks/postSlotInitUpdate.lua +4 -4
- package/callbacks/postSlotRender.lua +6 -6
- package/callbacks/postSpikesRender.lua +2 -2
- package/callbacks/postSpikesUpdate.lua +2 -2
- package/callbacks/postTNTRender.lua +2 -2
- package/callbacks/postTNTUpdate.lua +2 -2
- package/callbacks/postTearInitLate.lua +2 -2
- package/callbacks/postTearInitVeryLate.lua +2 -2
- package/callbacks/postTransformation.lua +6 -6
- package/callbacks/postTrinketBreak.lua +5 -5
- package/callbacks/preBerserkDeath.lua +5 -5
- package/callbacks/preNewLevel.lua +3 -3
- package/callbacks/reorderedCallbacks.lua +4 -4
- package/classes/DefaultMap.d.ts +11 -7
- package/classes/ModUpgraded.d.ts +8 -2
- package/classes/ModUpgraded.lua +1 -1
- package/constants.d.ts +5 -5
- package/constants.lua +2 -2
- package/{constantsMax.d.ts → constantsFirstLast.d.ts} +0 -0
- package/{constantsMax.lua → constantsFirstLast.lua} +2 -2
- package/enums/HealthType.d.ts +2 -2
- package/enums/ModCallbackCustom.d.ts +753 -2
- package/features/characterHealthConversion.d.ts +1 -2
- package/features/characterHealthConversion.lua +3 -3
- package/features/characterStats.lua +3 -3
- package/features/debugDisplay/debugDisplay.lua +4 -4
- package/features/debugDisplay/exports.d.ts +36 -36
- package/features/debugDisplay/exports.lua +2 -2
- package/features/debugDisplay/v.lua +2 -2
- package/features/deployJSONRoom.d.ts +1 -1
- package/features/deployJSONRoom.lua +15 -15
- package/features/disableInputs.d.ts +5 -5
- package/features/disableInputs.lua +3 -3
- package/features/disableSound.d.ts +2 -2
- package/features/disableSound.lua +4 -4
- package/features/extraConsoleCommands/commandsDisplay.d.ts +18 -18
- package/features/extraConsoleCommands/commandsDisplay.lua +1 -1
- package/features/extraConsoleCommands/commandsSubroutines.lua +10 -10
- package/features/extraConsoleCommands/init.d.ts +3 -2
- package/features/extraConsoleCommands/init.lua +83 -83
- package/features/extraConsoleCommands/{commands.d.ts → listCommands.d.ts} +17 -17
- package/features/extraConsoleCommands/{commands.lua → listCommands.lua} +36 -36
- package/features/fadeInRemover.lua +3 -3
- package/features/fastReset.lua +4 -4
- package/features/forgottenSwitch.lua +2 -2
- package/features/getCollectibleItemPoolType.lua +6 -6
- package/features/playerInventory.lua +10 -10
- package/features/{isPonyActive.d.ts → ponyDetection.d.ts} +0 -0
- package/features/{isPonyActive.lua → ponyDetection.lua} +7 -7
- package/features/{preventCollectibleRotate.d.ts → preventCollectibleRotation.d.ts} +1 -1
- package/features/{preventCollectibleRotate.lua → preventCollectibleRotation.lua} +9 -9
- package/features/runInNFrames.lua +3 -3
- package/features/saveDataManager/exports.d.ts +15 -12
- package/features/saveDataManager/exports.lua +6 -6
- package/features/saveDataManager/load.d.ts +1 -1
- package/features/saveDataManager/load.lua +4 -4
- package/features/saveDataManager/main.d.ts +1 -1
- package/features/saveDataManager/main.lua +11 -11
- package/features/saveDataManager/maps.d.ts +1 -1
- package/features/saveDataManager/merge.lua +10 -10
- package/features/saveDataManager/save.d.ts +1 -1
- package/features/saveDataManager/save.lua +5 -5
- package/features/saveDataManager/serializationBrand.lua +2 -2
- package/features/sirenHelpers.lua +3 -3
- package/features/taintedLazarusPlayers.lua +2 -2
- package/functions/array.lua +3 -3
- package/functions/benchmark.lua +1 -1
- package/functions/boss.lua +7 -7
- package/functions/cacheFlag.lua +1 -1
- package/functions/cards.d.ts +1 -1
- package/functions/cards.lua +13 -13
- package/functions/challenges.lua +1 -1
- package/functions/character.lua +9 -9
- package/functions/charge.lua +3 -3
- package/functions/chargeBar.d.ts +1 -8
- package/functions/chargeBar.lua +1 -1
- package/functions/collectibleCacheFlag.d.ts +4 -4
- package/functions/collectibleCacheFlag.lua +6 -6
- package/functions/collectibleSet.lua +5 -5
- package/functions/collectibleTag.lua +6 -6
- package/functions/collectibles.lua +15 -15
- package/functions/color.d.ts +17 -3
- package/functions/color.lua +5 -5
- package/functions/debug.lua +1 -1
- package/functions/deepCopy.lua +13 -13
- package/functions/deepCopyTests.lua +6 -6
- package/functions/direction.lua +3 -3
- package/functions/doors.lua +6 -6
- package/functions/eden.lua +5 -5
- package/functions/entity.lua +5 -5
- package/functions/entitySpecific.d.ts +15 -1
- package/functions/entitySpecific.lua +10 -2
- package/functions/enums.d.ts +3 -3
- package/functions/enums.lua +2 -2
- package/functions/familiars.lua +2 -2
- package/functions/flying.lua +2 -2
- package/functions/globals.lua +3 -3
- package/functions/gridEntity.lua +10 -10
- package/functions/gridEntitySpecific.lua +2 -2
- package/functions/input.lua +4 -4
- package/functions/jsonHelpers.lua +1 -1
- package/functions/jsonRoom.d.ts +1 -1
- package/functions/jsonRoom.lua +4 -4
- package/functions/kColor.d.ts +1 -1
- package/functions/kColor.lua +5 -5
- package/functions/level.lua +3 -3
- package/functions/log.lua +15 -15
- package/functions/math.lua +1 -1
- package/functions/mergeTests.lua +7 -7
- package/functions/npc.lua +3 -3
- package/functions/pickups.lua +6 -6
- package/functions/pills.lua +15 -15
- package/functions/player.lua +11 -11
- package/functions/playerDataStructures.d.ts +51 -0
- package/functions/playerDataStructures.lua +5 -1
- package/functions/playerHealth.d.ts +1 -1
- package/functions/playerHealth.lua +4 -4
- package/functions/playerIndex.lua +1 -1
- package/functions/pocketItems.d.ts +1 -1
- package/functions/pocketItems.lua +3 -3
- package/functions/positionVelocity.lua +6 -6
- package/functions/random.lua +1 -1
- package/functions/revive.lua +6 -6
- package/functions/rng.d.ts +1 -1
- package/functions/rng.lua +6 -6
- package/functions/roomData.lua +4 -4
- package/functions/roomGrid.lua +3 -3
- package/functions/roomShape.lua +8 -8
- package/functions/rooms.lua +12 -12
- package/functions/run.lua +4 -4
- package/functions/seeds.lua +2 -2
- package/functions/serialization.lua +5 -5
- package/functions/set.lua +2 -2
- package/functions/sound.lua +2 -2
- package/functions/spawnCollectible.lua +10 -10
- package/functions/sprite.lua +3 -3
- package/functions/stage.lua +2 -2
- package/functions/transformations.lua +6 -6
- package/functions/trinketCacheFlag.lua +3 -3
- package/functions/trinketGive.d.ts +1 -1
- package/functions/trinketGive.lua +3 -3
- package/functions/trinkets.d.ts +3 -3
- package/functions/trinkets.lua +14 -14
- package/functions/tstlClass.lua +1 -1
- package/functions/ui.lua +3 -3
- package/functions/utils.d.ts +2 -2
- package/functions/utils.lua +1 -1
- package/functions/vector.d.ts +1 -1
- package/functions/vector.lua +5 -5
- package/index.d.ts +14 -13
- package/index.lua +123 -123
- package/initCustomCallbacks.lua +58 -58
- package/initFeatures.lua +19 -19
- package/{types → interfaces}/AddCallbackParameterCustom.d.ts +0 -0
- package/{types → interfaces}/AddCallbackParameterCustom.lua +1 -1
- package/interfaces/ChargeBarSprites.d.ts +13 -0
- package/{types/JSONDoor.lua → interfaces/ChargeBarSprites.lua} +0 -0
- package/{types → interfaces}/JSONDoor.d.ts +1 -0
- package/{types/JSONEntity.lua → interfaces/JSONDoor.lua} +0 -0
- package/{types → interfaces}/JSONEntity.d.ts +1 -0
- package/{types/JSONRoom.lua → interfaces/JSONEntity.lua} +0 -0
- package/{types → interfaces}/JSONRoom.d.ts +1 -5
- package/{types/JSONRooms.lua → interfaces/JSONRoom.lua} +0 -0
- package/{types → interfaces}/JSONRooms.d.ts +0 -0
- package/{types/JSONSpawn.lua → interfaces/JSONRooms.lua} +0 -0
- package/{types → interfaces}/JSONSpawn.d.ts +1 -0
- package/{types/PlayerHealth.lua → interfaces/JSONSpawn.lua} +0 -0
- package/{types → interfaces}/PlayerHealth.d.ts +1 -0
- package/{types/PocketItemDescription.lua → interfaces/PlayerHealth.lua} +0 -0
- package/{types → interfaces}/PocketItemDescription.d.ts +1 -0
- package/{types/Primitive.lua → interfaces/PocketItemDescription.lua} +0 -0
- package/interfaces/SaveData.d.ts +29 -0
- package/{types/private → interfaces}/SaveData.lua +0 -0
- package/{types → interfaces}/TrinketSituation.d.ts +1 -0
- package/{types → interfaces}/TrinketSituation.lua +0 -0
- package/{types → interfaces}/private/TSTLClassMetatable.d.ts +0 -0
- package/{types → interfaces}/private/TSTLClassMetatable.lua +0 -0
- package/maps/cardMap.lua +85 -85
- package/maps/characterMap.lua +58 -58
- package/maps/defaultPlayerStatMap.lua +1 -1
- package/maps/pillEffectMap.lua +39 -39
- package/maps/roomTypeMap.lua +12 -12
- package/objects/LRoomShapeToRectangles.lua +1 -1
- package/objects/callbackRegisterFunctions.d.ts +1 -1
- package/objects/callbackRegisterFunctions.lua +76 -76
- package/objects/directionToVector.lua +1 -1
- package/objects/isaacAPIClassTypeToBrand.lua +2 -2
- package/objects/isaacAPIClassTypeToCopyFunction.lua +5 -5
- package/objects/roomShapeBounds.lua +1 -1
- package/objects/roomShapeLayoutSizes.lua +1 -1
- package/objects/roomShapeToDoorSlotsToGridIndexDelta.lua +1 -1
- package/objects/roomShapeToTopLeftPosition.lua +1 -1
- package/objects/roomTypeNames.lua +1 -1
- package/objects/serializedIsaacAPIClassTypeToIdentityFunction.lua +5 -5
- package/package.json +2 -2
- package/patchErrorFunctions.lua +1 -1
- package/types/CollectibleIndex.d.ts +2 -2
- package/types/PickingUpItem.d.ts +12 -2
- package/types/PickingUpItem.lua +3 -0
- package/types/PlayerIndex.d.ts +2 -2
- package/types/private/IsaacAPIClass.d.ts +1 -1
- package/types/private/SerializedIsaacAPIClass.d.ts +1 -1
- package/types/private/TSTLClass.d.ts +1 -1
- package/upgradeMod.d.ts +2 -1
- package/upgradeMod.lua +7 -7
- package/types/Primitive.d.ts +0 -1
- package/types/private/SaveData.d.ts +0 -22
|
@@ -6,17 +6,17 @@ local postPickupInitCollectible, v
|
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
7
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
8
8
|
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
9
|
-
local ____cachedClasses = require("
|
|
9
|
+
local ____cachedClasses = require("cachedClasses")
|
|
10
10
|
local game = ____cachedClasses.game
|
|
11
|
-
local ____featuresInitialized = require("
|
|
11
|
+
local ____featuresInitialized = require("featuresInitialized")
|
|
12
12
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
13
|
-
local ____entity = require("
|
|
13
|
+
local ____entity = require("functions.entity")
|
|
14
14
|
local getEntityID = ____entity.getEntityID
|
|
15
|
-
local ____pickupVariants = require("
|
|
15
|
+
local ____pickupVariants = require("functions.pickupVariants")
|
|
16
16
|
local isCollectible = ____pickupVariants.isCollectible
|
|
17
|
-
local ____rooms = require("
|
|
17
|
+
local ____rooms = require("functions.rooms")
|
|
18
18
|
local getRoomItemPoolType = ____rooms.getRoomItemPoolType
|
|
19
|
-
local ____exports = require("
|
|
19
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
20
20
|
local saveDataManager = ____exports.saveDataManager
|
|
21
21
|
function postPickupInitCollectible(self, pickup)
|
|
22
22
|
local itemPool = game:GetItemPool()
|
|
@@ -8,27 +8,27 @@ local newPlayerInventory, useItemD4, postGameStarted, postItemPickup, addCollect
|
|
|
8
8
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
9
9
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
10
10
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
11
|
-
local ____DefaultMap = require("
|
|
11
|
+
local ____DefaultMap = require("classes.DefaultMap")
|
|
12
12
|
local DefaultMap = ____DefaultMap.DefaultMap
|
|
13
|
-
local ____ModCallbackCustom = require("
|
|
13
|
+
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
14
14
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
15
|
-
local ____featuresInitialized = require("
|
|
15
|
+
local ____featuresInitialized = require("featuresInitialized")
|
|
16
16
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
17
|
-
local ____array = require("
|
|
17
|
+
local ____array = require("functions.array")
|
|
18
18
|
local arrayRemoveInPlace = ____array.arrayRemoveInPlace
|
|
19
19
|
local copyArray = ____array.copyArray
|
|
20
|
-
local ____collectibles = require("
|
|
20
|
+
local ____collectibles = require("functions.collectibles")
|
|
21
21
|
local isActiveCollectible = ____collectibles.isActiveCollectible
|
|
22
|
-
local ____collectibleSet = require("
|
|
22
|
+
local ____collectibleSet = require("functions.collectibleSet")
|
|
23
23
|
local getCollectibleSet = ____collectibleSet.getCollectibleSet
|
|
24
|
-
local ____playerIndex = require("
|
|
24
|
+
local ____playerIndex = require("functions.playerIndex")
|
|
25
25
|
local getAllPlayers = ____playerIndex.getAllPlayers
|
|
26
26
|
local getPlayerIndex = ____playerIndex.getPlayerIndex
|
|
27
|
-
local ____utils = require("
|
|
27
|
+
local ____utils = require("functions.utils")
|
|
28
28
|
local ____repeat = ____utils["repeat"]
|
|
29
|
-
local ____PickingUpItem = require("
|
|
29
|
+
local ____PickingUpItem = require("types.PickingUpItem")
|
|
30
30
|
local pickingUpItemIsCollectible = ____PickingUpItem.pickingUpItemIsCollectible
|
|
31
|
-
local ____exports = require("
|
|
31
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
32
32
|
local saveDataManager = ____exports.saveDataManager
|
|
33
33
|
function newPlayerInventory(self, player)
|
|
34
34
|
local inventory = {}
|
|
File without changes
|
|
@@ -6,17 +6,17 @@ local postPEffectUpdateReordered, FLAGS_WHEN_PONY_IS_ACTIVE, v
|
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
7
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
8
8
|
local EntityFlag = ____isaac_2Dtypescript_2Ddefinitions.EntityFlag
|
|
9
|
-
local ____ModCallbackCustom = require("
|
|
9
|
+
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
10
10
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
11
|
-
local ____featuresInitialized = require("
|
|
11
|
+
local ____featuresInitialized = require("featuresInitialized")
|
|
12
12
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
13
|
-
local ____flag = require("
|
|
13
|
+
local ____flag = require("functions.flag")
|
|
14
14
|
local hasFlag = ____flag.hasFlag
|
|
15
|
-
local ____playerDataStructures = require("
|
|
15
|
+
local ____playerDataStructures = require("functions.playerDataStructures")
|
|
16
16
|
local setAddPlayer = ____playerDataStructures.setAddPlayer
|
|
17
17
|
local setDeletePlayer = ____playerDataStructures.setDeletePlayer
|
|
18
18
|
local setHasPlayer = ____playerDataStructures.setHasPlayer
|
|
19
|
-
local ____exports = require("
|
|
19
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
20
20
|
local saveDataManager = ____exports.saveDataManager
|
|
21
21
|
function postPEffectUpdateReordered(self, player)
|
|
22
22
|
local effects = player:GetEffects()
|
|
@@ -38,8 +38,8 @@ end
|
|
|
38
38
|
local FEATURE_NAME = "pony activation detector"
|
|
39
39
|
FLAGS_WHEN_PONY_IS_ACTIVE = {EntityFlag.NO_KNOCKBACK, EntityFlag.NO_PHYSICS_KNOCKBACK, EntityFlag.NO_DAMAGE_BLINK}
|
|
40
40
|
v = {run = {playersIsPonyActive = __TS__New(Set)}}
|
|
41
|
-
function ____exports.
|
|
42
|
-
saveDataManager(nil, "
|
|
41
|
+
function ____exports.ponyDetectionInit(self, mod)
|
|
42
|
+
saveDataManager(nil, "ponyDetection", v)
|
|
43
43
|
mod:AddCallbackCustom(ModCallbackCustom.POST_PEFFECT_UPDATE_REORDERED, postPEffectUpdateReordered)
|
|
44
44
|
end
|
|
45
45
|
function ____exports.isPonyActive(self, player)
|
|
@@ -8,4 +8,4 @@ import { CollectibleType } from "isaac-typescript-definitions";
|
|
|
8
8
|
* It is required to pass the intended collectible type to this function since it is possible for
|
|
9
9
|
* collectibles to rotate on the first frame that they are spawned.
|
|
10
10
|
*/
|
|
11
|
-
export declare function
|
|
11
|
+
export declare function preventCollectibleRotation(collectible: EntityPickup, collectibleType: CollectibleType): void;
|
|
@@ -8,17 +8,17 @@ local Card = ____isaac_2Dtypescript_2Ddefinitions.Card
|
|
|
8
8
|
local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
9
9
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
10
10
|
local PickupVariant = ____isaac_2Dtypescript_2Ddefinitions.PickupVariant
|
|
11
|
-
local ____cachedClasses = require("
|
|
11
|
+
local ____cachedClasses = require("cachedClasses")
|
|
12
12
|
local game = ____cachedClasses.game
|
|
13
|
-
local ____featuresInitialized = require("
|
|
13
|
+
local ____featuresInitialized = require("featuresInitialized")
|
|
14
14
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
15
|
-
local ____collectibles = require("
|
|
15
|
+
local ____collectibles = require("functions.collectibles")
|
|
16
16
|
local setCollectibleSubType = ____collectibles.setCollectibleSubType
|
|
17
|
-
local ____entity = require("
|
|
17
|
+
local ____entity = require("functions.entity")
|
|
18
18
|
local getEntityID = ____entity.getEntityID
|
|
19
|
-
local ____pickupVariants = require("
|
|
19
|
+
local ____pickupVariants = require("functions.pickupVariants")
|
|
20
20
|
local isCollectible = ____pickupVariants.isCollectible
|
|
21
|
-
local ____exports = require("
|
|
21
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
22
22
|
local saveDataManager = ____exports.saveDataManager
|
|
23
23
|
function useCardSoulOfIsaac(self)
|
|
24
24
|
v.room.trackedCollectibles:clear()
|
|
@@ -40,12 +40,12 @@ function getMapIndex(self, collectible)
|
|
|
40
40
|
end
|
|
41
41
|
local FEATURE_NAME = "prevent collectible rotation"
|
|
42
42
|
v = {room = {trackedCollectibles = __TS__New(Map)}}
|
|
43
|
-
function ____exports.
|
|
44
|
-
saveDataManager(nil, "
|
|
43
|
+
function ____exports.preventCollectibleRotationInit(self, mod)
|
|
44
|
+
saveDataManager(nil, "preventCollectibleRotation", v)
|
|
45
45
|
mod:AddCallback(ModCallback.POST_USE_CARD, useCardSoulOfIsaac, Card.SOUL_ISAAC)
|
|
46
46
|
mod:AddCallback(ModCallback.POST_PICKUP_UPDATE, postPickupUpdateCollectible, PickupVariant.COLLECTIBLE)
|
|
47
47
|
end
|
|
48
|
-
function ____exports.
|
|
48
|
+
function ____exports.preventCollectibleRotation(self, collectible, collectibleType)
|
|
49
49
|
errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
|
|
50
50
|
if not isCollectible(nil, collectible) then
|
|
51
51
|
local entityID = getEntityID(nil, collectible)
|
|
@@ -5,11 +5,11 @@ local ____exports = {}
|
|
|
5
5
|
local postUpdate, postRender, checkExecuteQueuedFunctions, v
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
7
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
8
|
-
local ____cachedClasses = require("
|
|
8
|
+
local ____cachedClasses = require("cachedClasses")
|
|
9
9
|
local game = ____cachedClasses.game
|
|
10
|
-
local ____featuresInitialized = require("
|
|
10
|
+
local ____featuresInitialized = require("featuresInitialized")
|
|
11
11
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
12
|
-
local ____exports = require("
|
|
12
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
13
13
|
local saveDataManager = ____exports.saveDataManager
|
|
14
14
|
function postUpdate(self)
|
|
15
15
|
local gameFrameCount = game:GetFrameCount()
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SaveData } from "../../
|
|
1
|
+
import { SaveData } from "../../interfaces/SaveData";
|
|
2
2
|
/**
|
|
3
3
|
* This is the entry point to the save data manager, a system which provides two major features:
|
|
4
4
|
*
|
|
@@ -36,7 +36,7 @@ import { SaveData } from "../../types/private/SaveData";
|
|
|
36
36
|
*
|
|
37
37
|
* // These variables are reset at the beginning of every room.
|
|
38
38
|
* room: {
|
|
39
|
-
*
|
|
39
|
+
* foo4: 0,
|
|
40
40
|
* },
|
|
41
41
|
* };
|
|
42
42
|
* // Every child object is optional; only create the ones that you need.
|
|
@@ -50,7 +50,7 @@ import { SaveData } from "../../types/private/SaveData";
|
|
|
50
50
|
* // Elsewhere in the file, use your variables.
|
|
51
51
|
* function feature1Function() {
|
|
52
52
|
* if (v.run.foo1 > 0) {
|
|
53
|
-
* //
|
|
53
|
+
* // Insert code here.
|
|
54
54
|
* }
|
|
55
55
|
* }
|
|
56
56
|
* ```
|
|
@@ -59,16 +59,18 @@ import { SaveData } from "../../types/private/SaveData";
|
|
|
59
59
|
* can possibly run).
|
|
60
60
|
* - Save data is recorded to disk in the `PRE_GAME_EXIT` callback.
|
|
61
61
|
*
|
|
62
|
-
* Note that before using the save data manager, you must call the
|
|
62
|
+
* Note that before using the save data manager, you must call the `upgradeMod` function. (Upgrade
|
|
63
|
+
* your mod before registering any of your own callbacks so that the save data manager will run
|
|
64
|
+
* before any of your code does.)
|
|
63
65
|
*
|
|
64
66
|
* If you want the save data manager to load data before the `POST_PLAYER_INIT` callback (i.e. in
|
|
65
|
-
* the main menu), then you should explicitly call the
|
|
67
|
+
* the main menu), then you should explicitly call the `saveDataManagerLoad` function. (The save
|
|
66
68
|
* data manager cannot do this on its own because it cannot know when your mod features are finished
|
|
67
69
|
* initializing.)
|
|
68
70
|
*
|
|
69
71
|
* Finally, some features may have variables that need to be automatically reset per run/level, but
|
|
70
72
|
* not saved to disk on game exit. (For example, if they contain functions or other non-serializable
|
|
71
|
-
* data.) For these cases, set
|
|
73
|
+
* data.) For these cases, set the second argument to `() => false`.
|
|
72
74
|
*
|
|
73
75
|
* @param key The name of the file or feature that is submitting data to be managed by the save data
|
|
74
76
|
* manager. The save data manager will throw an error if the key is already registered.
|
|
@@ -77,10 +79,10 @@ import { SaveData } from "../../types/private/SaveData";
|
|
|
77
79
|
* @param conditionalFunc An optional function to run upon saving this key to disk. For example,
|
|
78
80
|
* this allows features to only save data to disk if the feature is enabled.
|
|
79
81
|
* Specify a value of `() => false` to completely disable saving this feature
|
|
80
|
-
* to disk.
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* keys.
|
|
82
|
+
* to disk. Disabling saving to disk is useful if you are using data that is
|
|
83
|
+
* not serializable. Alternatively, it could be useful if you want to use the
|
|
84
|
+
* save data manager to automatically reset variables on run/level/room, but
|
|
85
|
+
* not clutter the the "save#.dat" file with unnecessary keys.
|
|
84
86
|
*/
|
|
85
87
|
export declare function saveDataManager(key: string, v: SaveData, conditionalFunc?: () => boolean): void;
|
|
86
88
|
/**
|
|
@@ -88,7 +90,8 @@ export declare function saveDataManager(key: string, v: SaveData, conditionalFun
|
|
|
88
90
|
* when a new run is started). Use this function to explicitly force the save data manager to load
|
|
89
91
|
* all of its variables from disk immediately.
|
|
90
92
|
*
|
|
91
|
-
*
|
|
93
|
+
* Obviously, doing this will overwrite the current data, so using this function can potentially
|
|
94
|
+
* result in lost state.
|
|
92
95
|
*/
|
|
93
96
|
export declare function saveDataManagerLoad(): void;
|
|
94
97
|
/**
|
|
@@ -112,7 +115,7 @@ export declare function saveDataManagerSetGlobal(): void;
|
|
|
112
115
|
*
|
|
113
116
|
* For example:
|
|
114
117
|
*
|
|
115
|
-
* ```
|
|
118
|
+
* ```ts
|
|
116
119
|
* const v = {
|
|
117
120
|
* room: {
|
|
118
121
|
* foo: 123,
|
|
@@ -2,19 +2,19 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local Map = ____lualib.Map
|
|
3
3
|
local __TS__ObjectKeys = ____lualib.__TS__ObjectKeys
|
|
4
4
|
local ____exports = {}
|
|
5
|
-
local ____SerializationType = require("
|
|
5
|
+
local ____SerializationType = require("enums.SerializationType")
|
|
6
6
|
local SerializationType = ____SerializationType.SerializationType
|
|
7
|
-
local ____featuresInitialized = require("
|
|
7
|
+
local ____featuresInitialized = require("featuresInitialized")
|
|
8
8
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
9
|
-
local ____deepCopy = require("
|
|
9
|
+
local ____deepCopy = require("functions.deepCopy")
|
|
10
10
|
local deepCopy = ____deepCopy.deepCopy
|
|
11
|
-
local ____constants = require("
|
|
11
|
+
local ____constants = require("features.saveDataManager.constants")
|
|
12
12
|
local SAVE_DATA_MANAGER_FEATURE_NAME = ____constants.SAVE_DATA_MANAGER_FEATURE_NAME
|
|
13
|
-
local ____main = require("
|
|
13
|
+
local ____main = require("features.saveDataManager.main")
|
|
14
14
|
local forceSaveDataManagerLoad = ____main.forceSaveDataManagerLoad
|
|
15
15
|
local forceSaveDataManagerSave = ____main.forceSaveDataManagerSave
|
|
16
16
|
local restoreDefaultSaveData = ____main.restoreDefaultSaveData
|
|
17
|
-
local ____maps = require("
|
|
17
|
+
local ____maps = require("features.saveDataManager.maps")
|
|
18
18
|
local saveDataConditionalFuncMap = ____maps.saveDataConditionalFuncMap
|
|
19
19
|
local saveDataDefaultsMap = ____maps.saveDataDefaultsMap
|
|
20
20
|
local saveDataMap = ____maps.saveDataMap
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
/// <reference types="typescript-to-lua/language-extensions" />
|
|
3
|
-
import { SaveData } from "../../
|
|
3
|
+
import { SaveData } from "../../interfaces/SaveData";
|
|
4
4
|
export declare function loadFromDisk(mod: Mod, oldSaveData: LuaTable<string, SaveData>): void;
|
|
@@ -2,15 +2,15 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__StringTrim = ____lualib.__TS__StringTrim
|
|
3
3
|
local ____exports = {}
|
|
4
4
|
local readSaveDatFile, tryLoadModData, DEFAULT_MOD_DATA
|
|
5
|
-
local ____jsonHelpers = require("
|
|
5
|
+
local ____jsonHelpers = require("functions.jsonHelpers")
|
|
6
6
|
local jsonDecode = ____jsonHelpers.jsonDecode
|
|
7
|
-
local ____log = require("
|
|
7
|
+
local ____log = require("functions.log")
|
|
8
8
|
local log = ____log.log
|
|
9
9
|
local logError = ____log.logError
|
|
10
|
-
local ____constants = require("
|
|
10
|
+
local ____constants = require("features.saveDataManager.constants")
|
|
11
11
|
local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
|
|
12
12
|
local SAVE_DATA_MANAGER_FEATURE_NAME = ____constants.SAVE_DATA_MANAGER_FEATURE_NAME
|
|
13
|
-
local ____merge = require("
|
|
13
|
+
local ____merge = require("features.saveDataManager.merge")
|
|
14
14
|
local merge = ____merge.merge
|
|
15
15
|
function readSaveDatFile(self, mod)
|
|
16
16
|
local renderFrameCount = Isaac.GetFrameCount()
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { SaveDataKey } from "../../enums/private/SaveDataKey";
|
|
2
|
-
import { SaveData } from "../../
|
|
2
|
+
import { SaveData } from "../../interfaces/SaveData";
|
|
3
3
|
export declare function restoreDefaultSaveData(subscriberName: string, saveData: SaveData, saveDataKey: SaveDataKey): void;
|
|
@@ -4,30 +4,30 @@ local ____exports = {}
|
|
|
4
4
|
local postPlayerInit, preGameExit, postNewLevel, postNewRoomEarly, restoreDefaultsAll, restoreDefaults, clearAndCopyAllElements, mod, loadedDataOnThisRun
|
|
5
5
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
6
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
7
|
-
local ____cachedClasses = require("
|
|
7
|
+
local ____cachedClasses = require("cachedClasses")
|
|
8
8
|
local game = ____cachedClasses.game
|
|
9
|
-
local ____ModCallbackCustom = require("
|
|
9
|
+
local ____ModCallbackCustom = require("enums.ModCallbackCustom")
|
|
10
10
|
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
11
|
-
local ____SaveDataKey = require("
|
|
11
|
+
local ____SaveDataKey = require("enums.private.SaveDataKey")
|
|
12
12
|
local RESETTABLE_SAVE_DATA_KEYS = ____SaveDataKey.RESETTABLE_SAVE_DATA_KEYS
|
|
13
13
|
local SaveDataKey = ____SaveDataKey.SaveDataKey
|
|
14
|
-
local ____SerializationType = require("
|
|
14
|
+
local ____SerializationType = require("enums.SerializationType")
|
|
15
15
|
local SerializationType = ____SerializationType.SerializationType
|
|
16
|
-
local ____deepCopy = require("
|
|
16
|
+
local ____deepCopy = require("functions.deepCopy")
|
|
17
17
|
local deepCopy = ____deepCopy.deepCopy
|
|
18
|
-
local ____log = require("
|
|
18
|
+
local ____log = require("functions.log")
|
|
19
19
|
local logError = ____log.logError
|
|
20
|
-
local ____table = require("
|
|
20
|
+
local ____table = require("functions.table")
|
|
21
21
|
local clearTable = ____table.clearTable
|
|
22
|
-
local ____constants = require("
|
|
22
|
+
local ____constants = require("features.saveDataManager.constants")
|
|
23
23
|
local SAVE_DATA_MANAGER_FEATURE_NAME = ____constants.SAVE_DATA_MANAGER_FEATURE_NAME
|
|
24
|
-
local ____load = require("
|
|
24
|
+
local ____load = require("features.saveDataManager.load")
|
|
25
25
|
local loadFromDisk = ____load.loadFromDisk
|
|
26
|
-
local ____maps = require("
|
|
26
|
+
local ____maps = require("features.saveDataManager.maps")
|
|
27
27
|
local saveDataConditionalFuncMap = ____maps.saveDataConditionalFuncMap
|
|
28
28
|
local saveDataDefaultsMap = ____maps.saveDataDefaultsMap
|
|
29
29
|
local saveDataMap = ____maps.saveDataMap
|
|
30
|
-
local ____save = require("
|
|
30
|
+
local ____save = require("features.saveDataManager.save")
|
|
31
31
|
local saveToDisk = ____save.saveToDisk
|
|
32
32
|
function postPlayerInit(self)
|
|
33
33
|
if mod == nil then
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="typescript-to-lua/language-extensions" />
|
|
2
|
-
import { SaveData } from "../../
|
|
2
|
+
import { SaveData } from "../../interfaces/SaveData";
|
|
3
3
|
/**
|
|
4
4
|
* The save data map is indexed by subscriber name. We use Lua tables instead of TypeScriptToLua
|
|
5
5
|
* Maps for the master map so that we can access the variables via the in-game console when
|
|
@@ -4,26 +4,26 @@ local __TS__InstanceOf = ____lualib.__TS__InstanceOf
|
|
|
4
4
|
local Set = ____lualib.Set
|
|
5
5
|
local ____exports = {}
|
|
6
6
|
local mergeArray, mergeTSTLObject, mergeTable
|
|
7
|
-
local ____SerializationBrand = require("
|
|
7
|
+
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
8
8
|
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
9
|
-
local ____SerializationType = require("
|
|
9
|
+
local ____SerializationType = require("enums.SerializationType")
|
|
10
10
|
local SerializationType = ____SerializationType.SerializationType
|
|
11
|
-
local ____array = require("
|
|
11
|
+
local ____array = require("functions.array")
|
|
12
12
|
local isArray = ____array.isArray
|
|
13
|
-
local ____deepCopy = require("
|
|
13
|
+
local ____deepCopy = require("functions.deepCopy")
|
|
14
14
|
local deepCopy = ____deepCopy.deepCopy
|
|
15
|
-
local ____log = require("
|
|
15
|
+
local ____log = require("functions.log")
|
|
16
16
|
local log = ____log.log
|
|
17
|
-
local ____serialization = require("
|
|
17
|
+
local ____serialization = require("functions.serialization")
|
|
18
18
|
local deserializeIsaacAPIClass = ____serialization.deserializeIsaacAPIClass
|
|
19
19
|
local isSerializedIsaacAPIClass = ____serialization.isSerializedIsaacAPIClass
|
|
20
|
-
local ____table = require("
|
|
20
|
+
local ____table = require("functions.table")
|
|
21
21
|
local clearTable = ____table.clearTable
|
|
22
|
-
local ____utils = require("
|
|
22
|
+
local ____utils = require("functions.utils")
|
|
23
23
|
local getTraversalDescription = ____utils.getTraversalDescription
|
|
24
|
-
local ____constants = require("
|
|
24
|
+
local ____constants = require("features.saveDataManager.constants")
|
|
25
25
|
local SAVE_DATA_MANAGER_DEBUG = ____constants.SAVE_DATA_MANAGER_DEBUG
|
|
26
|
-
local ____serializationBrand = require("
|
|
26
|
+
local ____serializationBrand = require("features.saveDataManager.serializationBrand")
|
|
27
27
|
local isSerializationBrand = ____serializationBrand.isSerializationBrand
|
|
28
28
|
function ____exports.merge(self, oldObject, newTable, traversalDescription)
|
|
29
29
|
if SAVE_DATA_MANAGER_DEBUG then
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="isaac-typescript-definitions" />
|
|
2
2
|
/// <reference types="typescript-to-lua/language-extensions" />
|
|
3
|
-
import { SaveData } from "../../
|
|
3
|
+
import { SaveData } from "../../interfaces/SaveData";
|
|
4
4
|
export declare function saveToDisk(mod: Mod, saveDataMap: LuaTable<string, SaveData>, saveDataConditionalFuncMap: Map<string, () => boolean>): void;
|
|
@@ -3,15 +3,15 @@ local Map = ____lualib.Map
|
|
|
3
3
|
local __TS__ObjectKeys = ____lualib.__TS__ObjectKeys
|
|
4
4
|
local ____exports = {}
|
|
5
5
|
local getAllSaveDataToWriteToDisk
|
|
6
|
-
local ____SerializationType = require("
|
|
6
|
+
local ____SerializationType = require("enums.SerializationType")
|
|
7
7
|
local SerializationType = ____SerializationType.SerializationType
|
|
8
|
-
local ____deepCopy = require("
|
|
8
|
+
local ____deepCopy = require("functions.deepCopy")
|
|
9
9
|
local deepCopy = ____deepCopy.deepCopy
|
|
10
|
-
local ____jsonHelpers = require("
|
|
10
|
+
local ____jsonHelpers = require("functions.jsonHelpers")
|
|
11
11
|
local jsonEncode = ____jsonHelpers.jsonEncode
|
|
12
|
-
local ____log = require("
|
|
12
|
+
local ____log = require("functions.log")
|
|
13
13
|
local log = ____log.log
|
|
14
|
-
local ____constants = require("
|
|
14
|
+
local ____constants = require("features.saveDataManager.constants")
|
|
15
15
|
local SAVE_DATA_MANAGER_FEATURE_NAME = ____constants.SAVE_DATA_MANAGER_FEATURE_NAME
|
|
16
16
|
function getAllSaveDataToWriteToDisk(self, saveDataMap, saveDataConditionalFuncMap)
|
|
17
17
|
local allSaveData = {}
|
|
@@ -2,9 +2,9 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local Set = ____lualib.Set
|
|
3
3
|
local __TS__New = ____lualib.__TS__New
|
|
4
4
|
local ____exports = {}
|
|
5
|
-
local ____SerializationBrand = require("
|
|
5
|
+
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
6
6
|
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
7
|
-
local ____enums = require("
|
|
7
|
+
local ____enums = require("functions.enums")
|
|
8
8
|
local getEnumValues = ____enums.getEnumValues
|
|
9
9
|
local SERIALIZATION_BRANDS = getEnumValues(nil, SerializationBrand)
|
|
10
10
|
local SERIALIZATION_BRAND_SET = __TS__New(Set, SERIALIZATION_BRANDS)
|
|
@@ -5,11 +5,11 @@ local postNPCInitSirenHelper, checkReturnFamiliarToPlayer, blacklistEntryExists,
|
|
|
5
5
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
6
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
7
7
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
8
|
-
local ____featuresInitialized = require("
|
|
8
|
+
local ____featuresInitialized = require("featuresInitialized")
|
|
9
9
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
10
|
-
local ____entity = require("
|
|
10
|
+
local ____entity = require("functions.entity")
|
|
11
11
|
local getEntities = ____entity.getEntities
|
|
12
|
-
local ____exports = require("
|
|
12
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
13
13
|
local saveDataManager = ____exports.saveDataManager
|
|
14
14
|
function postNPCInitSirenHelper(self, npc)
|
|
15
15
|
checkReturnFamiliarToPlayer(nil, npc)
|
|
@@ -6,9 +6,9 @@ local postPlayerInit, checkDequeue, v
|
|
|
6
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
7
7
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
8
8
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
9
|
-
local ____featuresInitialized = require("
|
|
9
|
+
local ____featuresInitialized = require("featuresInitialized")
|
|
10
10
|
local errorIfFeaturesNotInitialized = ____featuresInitialized.errorIfFeaturesNotInitialized
|
|
11
|
-
local ____exports = require("
|
|
11
|
+
local ____exports = require("features.saveDataManager.exports")
|
|
12
12
|
local saveDataManager = ____exports.saveDataManager
|
|
13
13
|
function postPlayerInit(self, player)
|
|
14
14
|
local entityPtr = EntityPtr(player)
|
package/functions/array.lua
CHANGED
|
@@ -11,13 +11,13 @@ local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
|
11
11
|
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
12
12
|
local __TS__ArrayReduce = ____lualib.__TS__ArrayReduce
|
|
13
13
|
local ____exports = {}
|
|
14
|
-
local ____random = require("
|
|
14
|
+
local ____random = require("functions.random")
|
|
15
15
|
local getRandomInt = ____random.getRandomInt
|
|
16
|
-
local ____rng = require("
|
|
16
|
+
local ____rng = require("functions.rng")
|
|
17
17
|
local getRandomSeed = ____rng.getRandomSeed
|
|
18
18
|
local isRNG = ____rng.isRNG
|
|
19
19
|
local newRNG = ____rng.newRNG
|
|
20
|
-
local ____utils = require("
|
|
20
|
+
local ____utils = require("functions.utils")
|
|
21
21
|
local erange = ____utils.erange
|
|
22
22
|
local ____repeat = ____utils["repeat"]
|
|
23
23
|
function ____exports.getRandomArrayIndex(self, array, seedOrRNG)
|
package/functions/benchmark.lua
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local __TS__ArrayForEach = ____lualib.__TS__ArrayForEach
|
|
3
3
|
local ____exports = {}
|
|
4
|
-
local ____log = require("
|
|
4
|
+
local ____log = require("functions.log")
|
|
5
5
|
local log = ____log.log
|
|
6
6
|
function ____exports.benchmark(self, numTrials, ...)
|
|
7
7
|
local functions = {...}
|
package/functions/boss.lua
CHANGED
|
@@ -7,22 +7,22 @@ local getNumBossSegments, DEFAULT_BOSS_MULTI_SEGMENTS
|
|
|
7
7
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
8
8
|
local EntityType = ____isaac_2Dtypescript_2Ddefinitions.EntityType
|
|
9
9
|
local LokiVariant = ____isaac_2Dtypescript_2Ddefinitions.LokiVariant
|
|
10
|
-
local ____constants = require("
|
|
10
|
+
local ____constants = require("constants")
|
|
11
11
|
local VectorZero = ____constants.VectorZero
|
|
12
|
-
local ____bossSets = require("
|
|
12
|
+
local ____bossSets = require("sets.bossSets")
|
|
13
13
|
local ALL_BOSSES_SET = ____bossSets.ALL_BOSSES_SET
|
|
14
14
|
local STAGE_TO_COMBINED_BOSS_SET_MAP = ____bossSets.STAGE_TO_COMBINED_BOSS_SET_MAP
|
|
15
15
|
local STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP = ____bossSets.STAGE_TO_STAGE_TYPE_TO_BOSS_SET_MAP
|
|
16
|
-
local ____sinEntityTypesSet = require("
|
|
16
|
+
local ____sinEntityTypesSet = require("sets.sinEntityTypesSet")
|
|
17
17
|
local SIN_ENTITY_TYPES_SET = ____sinEntityTypesSet.SIN_ENTITY_TYPES_SET
|
|
18
|
-
local ____entitySpecific = require("
|
|
18
|
+
local ____entitySpecific = require("functions.entitySpecific")
|
|
19
19
|
local getNPCs = ____entitySpecific.getNPCs
|
|
20
20
|
local spawnNPC = ____entitySpecific.spawnNPC
|
|
21
|
-
local ____npc = require("
|
|
21
|
+
local ____npc = require("functions.npc")
|
|
22
22
|
local getAliveNPCs = ____npc.getAliveNPCs
|
|
23
|
-
local ____set = require("
|
|
23
|
+
local ____set = require("functions.set")
|
|
24
24
|
local copySet = ____set.copySet
|
|
25
|
-
local ____utils = require("
|
|
25
|
+
local ____utils = require("functions.utils")
|
|
26
26
|
local ____repeat = ____utils["repeat"]
|
|
27
27
|
function getNumBossSegments(self, entityType, variant, numSegments)
|
|
28
28
|
if numSegments ~= nil then
|
package/functions/cacheFlag.lua
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
|
-
local ____defaultPlayerStatMap = require("
|
|
2
|
+
local ____defaultPlayerStatMap = require("maps.defaultPlayerStatMap")
|
|
3
3
|
local DEFAULT_PLAYER_STAT_MAP = ____defaultPlayerStatMap.DEFAULT_PLAYER_STAT_MAP
|
|
4
4
|
function ____exports.getDefaultPlayerStat(self, cacheFlag)
|
|
5
5
|
return DEFAULT_PLAYER_STAT_MAP:get(cacheFlag)
|
package/functions/cards.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export declare function getCardDescription(card: Card): string;
|
|
|
25
25
|
export declare function getCardName(card: Card): string;
|
|
26
26
|
export declare function getCardType(card: Card): ItemConfigCardType;
|
|
27
27
|
/**
|
|
28
|
-
* Helper function to get a set of cards matching the type. Also see the
|
|
28
|
+
* Helper function to get a set of cards matching the type. Also see the `CardType` enum.
|
|
29
29
|
*
|
|
30
30
|
* This function is variadic, meaning that you can you can specify N card types to get a set
|
|
31
31
|
* containing cards that match any of the specified types.
|
package/functions/cards.lua
CHANGED
|
@@ -8,30 +8,30 @@ local initCardObjects, CARD_TYPE_TO_CARDS_MAP, CARD_SET
|
|
|
8
8
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
9
9
|
local Card = ____isaac_2Dtypescript_2Ddefinitions.Card
|
|
10
10
|
local ItemConfigCardType = ____isaac_2Dtypescript_2Ddefinitions.ItemConfigCardType
|
|
11
|
-
local ____cachedClasses = require("
|
|
11
|
+
local ____cachedClasses = require("cachedClasses")
|
|
12
12
|
local itemConfig = ____cachedClasses.itemConfig
|
|
13
|
-
local
|
|
14
|
-
local FIRST_CARD =
|
|
15
|
-
local FIRST_MODDED_CARD =
|
|
16
|
-
local LAST_CARD =
|
|
17
|
-
local MAX_VANILLA_CARD =
|
|
18
|
-
local ____cardDescriptions = require("
|
|
13
|
+
local ____constantsFirstLast = require("constantsFirstLast")
|
|
14
|
+
local FIRST_CARD = ____constantsFirstLast.FIRST_CARD
|
|
15
|
+
local FIRST_MODDED_CARD = ____constantsFirstLast.FIRST_MODDED_CARD
|
|
16
|
+
local LAST_CARD = ____constantsFirstLast.LAST_CARD
|
|
17
|
+
local MAX_VANILLA_CARD = ____constantsFirstLast.MAX_VANILLA_CARD
|
|
18
|
+
local ____cardDescriptions = require("objects.cardDescriptions")
|
|
19
19
|
local CARD_DESCRIPTIONS = ____cardDescriptions.CARD_DESCRIPTIONS
|
|
20
20
|
local DEFAULT_CARD_DESCRIPTION = ____cardDescriptions.DEFAULT_CARD_DESCRIPTION
|
|
21
|
-
local ____cardNames = require("
|
|
21
|
+
local ____cardNames = require("objects.cardNames")
|
|
22
22
|
local CARD_NAMES = ____cardNames.CARD_NAMES
|
|
23
23
|
local DEFAULT_CARD_NAME = ____cardNames.DEFAULT_CARD_NAME
|
|
24
|
-
local ____cardTypes = require("
|
|
24
|
+
local ____cardTypes = require("objects.cardTypes")
|
|
25
25
|
local CARD_TYPES = ____cardTypes.CARD_TYPES
|
|
26
26
|
local DEFAULT_CARD_TYPE = ____cardTypes.DEFAULT_CARD_TYPE
|
|
27
|
-
local ____enums = require("
|
|
27
|
+
local ____enums = require("functions.enums")
|
|
28
28
|
local getEnumValues = ____enums.getEnumValues
|
|
29
|
-
local ____rng = require("
|
|
29
|
+
local ____rng = require("functions.rng")
|
|
30
30
|
local getRandomSeed = ____rng.getRandomSeed
|
|
31
|
-
local ____set = require("
|
|
31
|
+
local ____set = require("functions.set")
|
|
32
32
|
local addSetsToSet = ____set.addSetsToSet
|
|
33
33
|
local getRandomSetElement = ____set.getRandomSetElement
|
|
34
|
-
local ____utils = require("
|
|
34
|
+
local ____utils = require("functions.utils")
|
|
35
35
|
local irange = ____utils.irange
|
|
36
36
|
function initCardObjects(self)
|
|
37
37
|
for ____, cardType in ipairs(getEnumValues(nil, ItemConfigCardType)) do
|
package/functions/challenges.lua
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
|
-
local ____challengeNames = require("
|
|
2
|
+
local ____challengeNames = require("objects.challengeNames")
|
|
3
3
|
local CHALLENGE_NAMES = ____challengeNames.CHALLENGE_NAMES
|
|
4
4
|
local DEFAULT_CHALLENGE_NAME = ____challengeNames.DEFAULT_CHALLENGE_NAME
|
|
5
5
|
function ____exports.getChallengeName(self, challenge)
|