isaacscript-common 7.0.0 → 7.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/dist/callbacks/postPlayerChangeHealth.lua +8 -1
- package/dist/callbacks/postPlayerChangeStat.d.ts +3 -0
- package/dist/callbacks/postPlayerChangeStat.d.ts.map +1 -0
- package/dist/callbacks/postPlayerChangeStat.lua +88 -0
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts +2 -2
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.d.ts.map +1 -1
- package/dist/callbacks/subscriptions/postPlayerChangeHealth.lua +9 -2
- package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts +12 -0
- package/dist/callbacks/subscriptions/postPlayerChangeStat.d.ts.map +1 -0
- package/dist/callbacks/subscriptions/postPlayerChangeStat.lua +35 -0
- package/dist/classes/DefaultMap.d.ts +5 -5
- package/dist/classes/DefaultMap.d.ts.map +1 -1
- package/dist/core/constants.d.ts +1 -1
- package/dist/core/constants.d.ts.map +1 -1
- package/dist/core/constants.lua +1 -1
- 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/ModCallbackCustom.d.ts +70 -39
- package/dist/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/enums/ModCallbackCustom.lua +37 -35
- 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/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 +28 -0
- package/dist/enums/StatType.d.ts.map +1 -0
- package/dist/enums/StatType.lua +28 -0
- 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/enums/private/CopyableIsaacAPIClassType.d.ts +5 -1
- package/dist/enums/private/CopyableIsaacAPIClassType.d.ts.map +1 -1
- package/dist/enums/private/CopyableIsaacAPIClassType.lua +3 -1
- package/dist/enums/private/SerializationBrand.d.ts +1 -0
- package/dist/enums/private/SerializationBrand.d.ts.map +1 -1
- package/dist/enums/private/SerializationBrand.lua +1 -0
- 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 +1 -1
- package/dist/features/customStage/init.lua +2 -2
- package/dist/features/customStage/versusScreen.lua +2 -2
- package/dist/features/saveDataManager/merge.d.ts +1 -0
- package/dist/features/saveDataManager/merge.d.ts.map +1 -1
- package/dist/features/saveDataManager/merge.lua +1 -0
- package/dist/functions/bitSet128.d.ts +25 -0
- package/dist/functions/bitSet128.d.ts.map +1 -0
- package/dist/functions/bitSet128.lua +71 -0
- 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 +2 -2
- package/dist/functions/collectibles.lua +2 -2
- package/dist/functions/color.d.ts +1 -1
- package/dist/functions/color.d.ts.map +1 -1
- package/dist/functions/color.lua +2 -2
- package/dist/functions/deepCopy.d.ts +1 -0
- package/dist/functions/deepCopy.d.ts.map +1 -1
- package/dist/functions/deepCopy.lua +1 -0
- package/dist/functions/familiars.d.ts +4 -4
- package/dist/functions/familiars.lua +4 -4
- package/dist/functions/flag.d.ts +1 -1
- package/dist/functions/flag.lua +1 -1
- package/dist/functions/flying.lua +2 -2
- package/dist/functions/index.d.ts +2 -1
- package/dist/functions/index.d.ts.map +1 -1
- package/dist/functions/index.lua +16 -8
- package/dist/functions/input.d.ts +4 -1
- package/dist/functions/input.d.ts.map +1 -1
- package/dist/functions/input.lua +10 -2
- package/dist/functions/jsonRoom.lua +4 -4
- package/dist/functions/kColor.d.ts +1 -1
- package/dist/functions/kColor.d.ts.map +1 -1
- package/dist/functions/kColor.lua +2 -2
- package/dist/functions/log.lua +1 -1
- package/dist/functions/npcs.d.ts +2 -2
- package/dist/functions/npcs.lua +2 -2
- package/dist/functions/playerIndex.d.ts +1 -1
- package/dist/functions/playerIndex.lua +1 -1
- package/dist/functions/playerStats.d.ts +6 -0
- package/dist/functions/playerStats.d.ts.map +1 -0
- package/dist/functions/playerStats.lua +21 -0
- package/dist/functions/players.d.ts +1 -1
- package/dist/functions/players.lua +1 -1
- package/dist/functions/rng.d.ts +1 -1
- package/dist/functions/rng.d.ts.map +1 -1
- package/dist/functions/rng.lua +2 -2
- package/dist/functions/rockAlt.d.ts.map +1 -1
- package/dist/functions/rockAlt.lua +11 -20
- package/dist/functions/roomTransition.d.ts +1 -1
- package/dist/functions/roomTransition.lua +1 -1
- package/dist/functions/rooms.d.ts +1 -1
- package/dist/functions/rooms.d.ts.map +1 -1
- package/dist/functions/rooms.lua +2 -1
- package/dist/functions/sprites.d.ts +3 -3
- package/dist/functions/sprites.lua +3 -3
- package/dist/functions/tears.d.ts +5 -4
- package/dist/functions/tears.d.ts.map +1 -1
- package/dist/functions/tears.lua +5 -4
- package/dist/functions/utils.d.ts +4 -1
- package/dist/functions/utils.d.ts.map +1 -1
- package/dist/functions/utils.lua +4 -1
- package/dist/functions/vector.d.ts +1 -1
- package/dist/functions/vector.d.ts.map +1 -1
- package/dist/functions/vector.lua +2 -2
- package/dist/initCustomCallbacks.d.ts.map +1 -1
- package/dist/initCustomCallbacks.lua +3 -0
- 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/SaveData.d.ts +2 -5
- package/dist/interfaces/SaveData.d.ts.map +1 -1
- package/dist/interfaces/StatTypeType.d.ts +21 -0
- package/dist/interfaces/StatTypeType.d.ts.map +1 -0
- package/dist/interfaces/StatTypeType.lua +4 -0
- package/dist/interfaces/TrinketSituation.d.ts +1 -1
- package/dist/interfaces/TrinketSituation.d.ts.map +1 -1
- package/dist/interfaces/index.d.ts +1 -0
- package/dist/interfaces/index.d.ts.map +1 -1
- package/dist/interfaces/private/AddCallbackParameterCustom.d.ts +2 -0
- package/dist/interfaces/private/AddCallbackParameterCustom.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/objects/callbackRegisterFunctions.d.ts.map +1 -1
- package/dist/objects/callbackRegisterFunctions.lua +3 -0
- package/dist/objects/isaacAPIClassTypeToBrand.d.ts.map +1 -1
- package/dist/objects/isaacAPIClassTypeToBrand.lua +7 -1
- package/dist/objects/isaacAPIClassTypeToFunctions.d.ts.map +1 -1
- package/dist/objects/isaacAPIClassTypeToFunctions.lua +12 -1
- 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/postPlayerChangeHealth.ts +7 -1
- package/src/callbacks/postPlayerChangeStat.ts +110 -0
- package/src/callbacks/subscriptions/postPlayerChangeHealth.ts +5 -1
- package/src/callbacks/subscriptions/postPlayerChangeStat.ts +55 -0
- package/src/classes/DefaultMap.ts +7 -7
- package/src/core/constants.ts +1 -1
- package/src/enums/AmbushType.ts +1 -0
- package/src/enums/CornerType.ts +1 -0
- package/src/enums/ModCallbackCustom.ts +36 -4
- package/src/enums/PocketItemType.ts +1 -0
- package/src/enums/RockAltType.ts +1 -0
- package/src/enums/SerializationType.ts +1 -0
- package/src/enums/SlotDestructionType.ts +1 -0
- package/src/enums/StatType.ts +47 -0
- package/src/enums/index.ts +1 -0
- package/src/enums/indexTypeDoc.ts +1 -0
- package/src/enums/private/CopyableIsaacAPIClassType.ts +5 -1
- package/src/enums/private/SerializationBrand.ts +1 -0
- package/src/features/customStage/backdrop.ts +1 -1
- package/src/features/customStage/init.ts +2 -2
- package/src/features/customStage/versusScreen.ts +2 -2
- package/src/features/fastReset.ts +1 -1
- package/src/features/indexTypeDoc.ts +2 -1
- package/src/features/saveDataManager/merge.ts +1 -0
- package/src/functions/bitSet128.ts +96 -0
- package/src/functions/cacheFlag.ts +90 -1
- package/src/functions/collectibles.ts +2 -2
- package/src/functions/color.ts +3 -2
- package/src/functions/deepCopy.ts +1 -0
- package/src/functions/familiars.ts +4 -4
- package/src/functions/flag.ts +1 -1
- package/src/functions/flying.ts +1 -1
- package/src/functions/index.ts +2 -1
- package/src/functions/indexTypeDoc.ts +2 -1
- package/src/functions/input.ts +15 -2
- package/src/functions/jsonRoom.ts +4 -4
- package/src/functions/kColor.ts +2 -2
- package/src/functions/log.ts +1 -1
- package/src/functions/npcs.ts +2 -2
- package/src/functions/playerIndex.ts +1 -1
- package/src/functions/playerStats.ts +25 -0
- package/src/functions/players.ts +1 -1
- package/src/functions/rng.ts +2 -2
- package/src/functions/rockAlt.ts +28 -13
- package/src/functions/roomTransition.ts +1 -1
- package/src/functions/rooms.ts +2 -1
- package/src/functions/sprites.ts +3 -3
- package/src/functions/tears.ts +5 -4
- package/src/functions/utils.ts +5 -1
- package/src/functions/vector.ts +2 -2
- package/src/initCustomCallbacks.ts +2 -0
- 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/SaveData.ts +1 -5
- package/src/interfaces/StatTypeType.ts +21 -0
- package/src/interfaces/TrinketSituation.ts +1 -1
- package/src/interfaces/index.ts +1 -0
- package/src/interfaces/indexTypeDoc.ts +1 -0
- package/src/interfaces/private/AddCallbackParameterCustom.ts +2 -0
- package/src/maps/keyboardToString.ts +77 -0
- package/src/objects/callbackRegisterFunctions.ts +2 -0
- package/src/objects/isaacAPIClassTypeToBrand.ts +1 -0
- package/src/objects/isaacAPIClassTypeToFunctions.ts +12 -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/functions/collectibleCacheFlag.d.ts +0 -24
- package/dist/functions/collectibleCacheFlag.d.ts.map +0 -1
- package/dist/functions/collectibleCacheFlag.lua +0 -80
- package/src/functions/collectibleCacheFlag.ts +0 -90
package/dist/enums/index.lua
CHANGED
|
@@ -63,4 +63,12 @@ do
|
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
|
+
do
|
|
67
|
+
local ____export = require("enums.StatType")
|
|
68
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
69
|
+
if ____exportKey ~= "default" then
|
|
70
|
+
____exports[____exportKey] = ____exportValue
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
66
74
|
return ____exports
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* - This must match the JSDoc comments for `deepCopy` and `merge`.
|
|
3
|
+
* - This must match the `SerializableIsaacAPIClass` type union.
|
|
4
|
+
*/
|
|
2
5
|
export declare enum CopyableIsaacAPIClassType {
|
|
6
|
+
BIT_SET_128 = "BitSet128",
|
|
3
7
|
COLOR = "Color",
|
|
4
8
|
K_COLOR = "KColor",
|
|
5
9
|
RNG = "RNG",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyableIsaacAPIClassType.d.ts","sourceRoot":"","sources":["../../../src/enums/private/CopyableIsaacAPIClassType.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"CopyableIsaacAPIClassType.d.ts","sourceRoot":"","sources":["../../../src/enums/private/CopyableIsaacAPIClassType.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oBAAY,yBAAyB;IACnC,WAAW,cAAc;IACzB,KAAK,UAAU;IACf,OAAO,WAAW;IAClB,GAAG,QAAQ;IACX,MAAM,WAAW;CAClB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
|
-
--- This must match the
|
|
2
|
+
--- - This must match the JSDoc comments for `deepCopy` and `merge`.
|
|
3
|
+
-- - This must match the `SerializableIsaacAPIClass` type union.
|
|
3
4
|
____exports.CopyableIsaacAPIClassType = {}
|
|
5
|
+
____exports.CopyableIsaacAPIClassType.BIT_SET_128 = "BitSet128"
|
|
4
6
|
____exports.CopyableIsaacAPIClassType.COLOR = "Color"
|
|
5
7
|
____exports.CopyableIsaacAPIClassType.K_COLOR = "KColor"
|
|
6
8
|
____exports.CopyableIsaacAPIClassType.RNG = "RNG"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SerializationBrand.d.ts","sourceRoot":"","sources":["../../../src/enums/private/SerializationBrand.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,kBAAkB;IAE5B,WAAW,uBAAuB;IAClC,GAAG,eAAe;IAClB,GAAG,eAAe;IAGlB,KAAK,YAAY;IACjB,OAAO,cAAc;IACrB,GAAG,UAAU;IACb,MAAM,aAAa;IAEnB;;;OAGG;IACH,iBAAiB,6BAA6B;IAE9C;;;;;;;;;;OAUG;IACH,uBAAuB,mCAAmC;CAC3D"}
|
|
1
|
+
{"version":3,"file":"SerializationBrand.d.ts","sourceRoot":"","sources":["../../../src/enums/private/SerializationBrand.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,oBAAY,kBAAkB;IAE5B,WAAW,uBAAuB;IAClC,GAAG,eAAe;IAClB,GAAG,eAAe;IAGlB,WAAW,kBAAkB;IAC7B,KAAK,YAAY;IACjB,OAAO,cAAc;IACrB,GAAG,UAAU;IACb,MAAM,aAAa;IAEnB;;;OAGG;IACH,iBAAiB,6BAA6B;IAE9C;;;;;;;;;;OAUG;IACH,uBAAuB,mCAAmC;CAC3D"}
|
|
@@ -8,6 +8,7 @@ ____exports.SerializationBrand = {}
|
|
|
8
8
|
____exports.SerializationBrand.DEFAULT_MAP = "__TSTL_DEFAULT_MAP"
|
|
9
9
|
____exports.SerializationBrand.MAP = "__TSTL_MAP"
|
|
10
10
|
____exports.SerializationBrand.SET = "__TSTL_SET"
|
|
11
|
+
____exports.SerializationBrand.BIT_SET_128 = "__BIT_SET_128"
|
|
11
12
|
____exports.SerializationBrand.COLOR = "__COLOR"
|
|
12
13
|
____exports.SerializationBrand.K_COLOR = "__K_COLOR"
|
|
13
14
|
____exports.SerializationBrand.RNG = "__RNG"
|
|
@@ -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"}
|
|
@@ -179,7 +179,7 @@ N_FLOOR_ANM2_LAYERS = {18, 19}
|
|
|
179
179
|
BACKDROP_EFFECT_VARIANT = EffectVariant.LADDER
|
|
180
180
|
BACKDROP_EFFECT_SUBTYPE = 101
|
|
181
181
|
local BACKDROP_ROOM_TYPE_SET = __TS__New(Set, {RoomType.DEFAULT, RoomType.BOSS, RoomType.MINI_BOSS})
|
|
182
|
-
function ____exports.
|
|
182
|
+
function ____exports.setCustomStageBackdrop(self, customStage)
|
|
183
183
|
local room = game:GetRoom()
|
|
184
184
|
local roomType = room:GetType()
|
|
185
185
|
local decorationSeed = room:GetDecorationSeed()
|
|
@@ -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
|
|
@@ -123,10 +123,10 @@ PLAYER_PORTRAIT_PNG_PATH_PREFIX = "gfx/ui/stage"
|
|
|
123
123
|
local VANILLA_VERSUS_PLAYBACK_SPEED = 0.5
|
|
124
124
|
local versusScreenSprite = Sprite()
|
|
125
125
|
--- Unfortunately, we must split the background layer into an entirely different sprite so that we
|
|
126
|
-
-- can color it with the `Color`
|
|
126
|
+
-- can color it with the `Color` field.
|
|
127
127
|
local versusScreenBackgroundSprite = Sprite()
|
|
128
128
|
--- Unfortunately, we must split the dirt layer into an entirely different sprite so that we can
|
|
129
|
-
-- color it with the `Color`
|
|
129
|
+
-- color it with the `Color` field.
|
|
130
130
|
local versusScreenDirtSpotSprite = Sprite()
|
|
131
131
|
--- We must load the sprites in an init function to prevent issues with mods that replace the vanilla
|
|
132
132
|
-- files. (For some reason, loading the sprites will cause the overwrite to no longer apply on the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/features/saveDataManager/merge.ts"],"names":[],"mappings":";AAgBA
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/features/saveDataManager/merge.ts"],"names":[],"mappings":";AAgBA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,KAAK,CACnB,SAAS,EACL,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAC1B,GAAG,CAAC,SAAS,EAAE,OAAO,CAAC,GACvB,GAAG,CAAC,SAAS,CAAC,EAClB,QAAQ,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,EACpC,oBAAoB,EAAE,MAAM,GAC3B,IAAI,CA2BN"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="typescript-to-lua/language-extensions" />
|
|
2
|
+
/// <reference types="isaac-typescript-definitions" />
|
|
3
|
+
export declare type SerializedBitSet128 = LuaMap<string, unknown> & {
|
|
4
|
+
readonly __serializedBitSet128Brand: symbol;
|
|
5
|
+
};
|
|
6
|
+
/** Helper function to copy a `BitSet128` Isaac API class. */
|
|
7
|
+
export declare function copyBitSet128(bitSet128: BitSet128): BitSet128;
|
|
8
|
+
/**
|
|
9
|
+
* Helper function to convert a `SerializedBitSet128` object to a normal `BitSet128` object. (This
|
|
10
|
+
* is used by the save data manager when reading data from the "save#.dat" file.)
|
|
11
|
+
*/
|
|
12
|
+
export declare function deserializeBitSet128(bitSet128: SerializedBitSet128): BitSet128;
|
|
13
|
+
/** Helper function to check if something is an instantiated `BitSet128` object. */
|
|
14
|
+
export declare function isBitSet128(object: unknown): object is BitSet128;
|
|
15
|
+
/**
|
|
16
|
+
* Used to determine is the given table is a serialized `BitSet128` object created by the save data
|
|
17
|
+
* manager and/or the `deepCopy` function.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isSerializedBitSet128(object: unknown): object is SerializedBitSet128;
|
|
20
|
+
/**
|
|
21
|
+
* Helper function to convert a `BitSet128` object to a `SerializedBitSet128` object. (This is used
|
|
22
|
+
* by the save data manager when writing data from the "save#.dat" file.)
|
|
23
|
+
*/
|
|
24
|
+
export declare function serializeBitSet128(bitSet128: BitSet128): SerializedBitSet128;
|
|
25
|
+
//# sourceMappingURL=bitSet128.d.ts.map
|
|
@@ -0,0 +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,CAyBX;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"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local OBJECT_NAME
|
|
3
|
+
local ____SerializationBrand = require("enums.private.SerializationBrand")
|
|
4
|
+
local SerializationBrand = ____SerializationBrand.SerializationBrand
|
|
5
|
+
local ____isaacAPIClass = require("functions.isaacAPIClass")
|
|
6
|
+
local isIsaacAPIClassOfType = ____isaacAPIClass.isIsaacAPIClassOfType
|
|
7
|
+
local ____table = require("functions.table")
|
|
8
|
+
local copyValuesToTable = ____table.copyValuesToTable
|
|
9
|
+
local getNumbersFromTable = ____table.getNumbersFromTable
|
|
10
|
+
local tableHasKeys = ____table.tableHasKeys
|
|
11
|
+
local ____types = require("functions.types")
|
|
12
|
+
local isTable = ____types.isTable
|
|
13
|
+
--- Helper function to check if something is an instantiated `BitSet128` object.
|
|
14
|
+
function ____exports.isBitSet128(self, object)
|
|
15
|
+
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
|
16
|
+
end
|
|
17
|
+
OBJECT_NAME = "BitSet128"
|
|
18
|
+
local KEYS = {"l", "h"}
|
|
19
|
+
--- Helper function to copy a `BitSet128` Isaac API class.
|
|
20
|
+
function ____exports.copyBitSet128(self, bitSet128)
|
|
21
|
+
if not ____exports.isBitSet128(nil, bitSet128) then
|
|
22
|
+
error(((("Failed to copy a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
23
|
+
end
|
|
24
|
+
local lowBits = bitSet128.l
|
|
25
|
+
local highBits = bitSet128.h
|
|
26
|
+
return BitSet128(lowBits, highBits)
|
|
27
|
+
end
|
|
28
|
+
--- Helper function to convert a `SerializedBitSet128` object to a normal `BitSet128` object. (This
|
|
29
|
+
-- is used by the save data manager when reading data from the "save#.dat" file.)
|
|
30
|
+
function ____exports.deserializeBitSet128(self, bitSet128)
|
|
31
|
+
if not isTable(nil, bitSet128) then
|
|
32
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object was not a Lua table.")
|
|
33
|
+
end
|
|
34
|
+
local l, h = table.unpack(getNumbersFromTable(
|
|
35
|
+
nil,
|
|
36
|
+
bitSet128,
|
|
37
|
+
OBJECT_NAME,
|
|
38
|
+
table.unpack(KEYS)
|
|
39
|
+
))
|
|
40
|
+
if l == nil then
|
|
41
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: l")
|
|
42
|
+
end
|
|
43
|
+
if h == nil then
|
|
44
|
+
error(("Failed to deserialize a " .. OBJECT_NAME) .. " object since the provided object did not have a value for: h")
|
|
45
|
+
end
|
|
46
|
+
return BitSet128(l, h)
|
|
47
|
+
end
|
|
48
|
+
--- Used to determine is the given table is a serialized `BitSet128` object created by the save data
|
|
49
|
+
-- manager and/or the `deepCopy` function.
|
|
50
|
+
function ____exports.isSerializedBitSet128(self, object)
|
|
51
|
+
if not isTable(nil, object) then
|
|
52
|
+
return false
|
|
53
|
+
end
|
|
54
|
+
return tableHasKeys(
|
|
55
|
+
nil,
|
|
56
|
+
object,
|
|
57
|
+
table.unpack(KEYS)
|
|
58
|
+
) and object[SerializationBrand.BIT_SET_128] ~= nil
|
|
59
|
+
end
|
|
60
|
+
--- Helper function to convert a `BitSet128` object to a `SerializedBitSet128` object. (This is used
|
|
61
|
+
-- by the save data manager when writing data from the "save#.dat" file.)
|
|
62
|
+
function ____exports.serializeBitSet128(self, bitSet128)
|
|
63
|
+
if not ____exports.isBitSet128(nil, bitSet128) then
|
|
64
|
+
error(((("Failed to serialize a " .. OBJECT_NAME) .. " object since the provided object was not a userdata ") .. OBJECT_NAME) .. " class.")
|
|
65
|
+
end
|
|
66
|
+
local bitSet128Table = {}
|
|
67
|
+
copyValuesToTable(nil, bitSet128, KEYS, bitSet128Table)
|
|
68
|
+
bitSet128Table[SerializationBrand.BIT_SET_128] = ""
|
|
69
|
+
return bitSet128Table
|
|
70
|
+
end
|
|
71
|
+
return ____exports
|
|
@@ -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
|
|
@@ -218,8 +218,8 @@ export declare function setCollectibleGlitched(collectible: EntityPickup): void;
|
|
|
218
218
|
*/
|
|
219
219
|
export declare function setCollectibleSprite(collectible: EntityPickup, pngPath: string | undefined): void;
|
|
220
220
|
/**
|
|
221
|
-
* Helper function to change the collectible on a pedestal. Simply updating the `SubType`
|
|
222
|
-
*
|
|
221
|
+
* Helper function to change the collectible on a pedestal. Simply updating the `SubType` field is
|
|
222
|
+
* not sufficient because the sprite will not change.
|
|
223
223
|
*/
|
|
224
224
|
export declare function setCollectibleSubType(collectible: EntityPickup, newCollectibleType: CollectibleType): void;
|
|
225
225
|
/**
|
|
@@ -84,8 +84,8 @@ function ____exports.setCollectibleSprite(self, collectible, pngPath)
|
|
|
84
84
|
sprite:LoadGraphics()
|
|
85
85
|
end
|
|
86
86
|
end
|
|
87
|
-
--- Helper function to change the collectible on a pedestal. Simply updating the `SubType`
|
|
88
|
-
--
|
|
87
|
+
--- Helper function to change the collectible on a pedestal. Simply updating the `SubType` field is
|
|
88
|
+
-- not sufficient because the sprite will not change.
|
|
89
89
|
function ____exports.setCollectibleSubType(self, collectible, newCollectibleType)
|
|
90
90
|
if not isCollectible(nil, collectible) then
|
|
91
91
|
local entityID = getEntityID(nil, collectible)
|
|
@@ -21,7 +21,7 @@ export declare function deserializeColor(color: SerializedColor): Color;
|
|
|
21
21
|
* @param alpha Optional. The alpha value to use. Default is 1.
|
|
22
22
|
*/
|
|
23
23
|
export declare function getRandomColor(seedOrRNG?: Seed | RNG, alpha?: number): Color;
|
|
24
|
-
/** Helper function to check if something is an instantiated Color object. */
|
|
24
|
+
/** Helper function to check if something is an instantiated `Color` object. */
|
|
25
25
|
export declare function isColor(object: unknown): object is Color;
|
|
26
26
|
/**
|
|
27
27
|
* Used to determine is the given table is a serialized `Color` object created by the save data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/functions/color.ts"],"names":[],"mappings":";;;;AAOA,oBAAY,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACtD,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;CACzC,CAAC;AAKF,wBAAgB,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,OAAO,CAEjE;AAED,yDAAyD;AACzD,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAgB7C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,CA8B9D;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,KAAK,SAAI,GACR,KAAK,CAQP;AAED
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/functions/color.ts"],"names":[],"mappings":";;;;AAOA,oBAAY,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACtD,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;CACzC,CAAC;AAKF,wBAAgB,WAAW,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,OAAO,CAEjE;AAED,yDAAyD;AACzD,wBAAgB,SAAS,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAgB7C;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,eAAe,GAAG,KAAK,CA8B9D;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,SAAS,GAAE,IAAI,GAAG,GAAqB,EACvC,KAAK,SAAI,GACR,KAAK,CAQP;AAED,+EAA+E;AAC/E,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,KAAK,CAExD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,eAAe,CAM5E;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,KAAK,GAAG,eAAe,CAW5D"}
|
package/dist/functions/color.lua
CHANGED
|
@@ -17,10 +17,11 @@ local getNumbersFromTable = ____table.getNumbersFromTable
|
|
|
17
17
|
local tableHasKeys = ____table.tableHasKeys
|
|
18
18
|
local ____types = require("functions.types")
|
|
19
19
|
local isTable = ____types.isTable
|
|
20
|
-
--- Helper function to check if something is an instantiated Color object.
|
|
20
|
+
--- Helper function to check if something is an instantiated `Color` object.
|
|
21
21
|
function ____exports.isColor(self, object)
|
|
22
22
|
return isIsaacAPIClassOfType(nil, object, OBJECT_NAME)
|
|
23
23
|
end
|
|
24
|
+
OBJECT_NAME = "Color"
|
|
24
25
|
local KEYS = {
|
|
25
26
|
"R",
|
|
26
27
|
"G",
|
|
@@ -30,7 +31,6 @@ local KEYS = {
|
|
|
30
31
|
"GO",
|
|
31
32
|
"BO"
|
|
32
33
|
}
|
|
33
|
-
OBJECT_NAME = "Color"
|
|
34
34
|
function ____exports.colorEquals(self, color1, color2)
|
|
35
35
|
return isaacAPIClassEquals(nil, color1, color2, KEYS)
|
|
36
36
|
end
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deepCopy.d.ts","sourceRoot":"","sources":["../../src/functions/deepCopy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AA6B/D
|
|
1
|
+
{"version":3,"file":"deepCopy.d.ts","sourceRoot":"","sources":["../../src/functions/deepCopy.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AA6B/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,OAAO,EACd,iBAAiB,oBAAyB,EAC1C,oBAAoB,SAAK,EACzB,SAAS,UAAQ,GAChB,OAAO,CAkDT"}
|
|
@@ -7,8 +7,8 @@ import { CollectibleType, FamiliarVariant } from "isaac-typescript-definitions";
|
|
|
7
7
|
* specify an incorrect RNG object. (The vanilla method is bugged in that it does not increment the
|
|
8
8
|
* RNG object; see the documentation of the method for more details.)
|
|
9
9
|
*
|
|
10
|
-
* This function is meant to be called in the
|
|
11
|
-
* to `CacheFlag.FAMILIARS`).
|
|
10
|
+
* This function is meant to be called in the `EVALUATE_CACHE` callback (when the cache flag is
|
|
11
|
+
* equal to `CacheFlag.FAMILIARS`).
|
|
12
12
|
*
|
|
13
13
|
* Note that this function is only meant to be used in special circumstances where the familiar
|
|
14
14
|
* count is completely custom and does not correspond to the amount of collectibles. For the general
|
|
@@ -36,8 +36,8 @@ export declare function checkFamiliar(player: EntityPlayer, collectibleType: Col
|
|
|
36
36
|
* Use this helper function instead of invoking the `EntityPlayer.CheckFamiliar` method directly so
|
|
37
37
|
* that the target count is handled automatically.
|
|
38
38
|
*
|
|
39
|
-
* This function is meant to be called in the
|
|
40
|
-
* to `CacheFlag.FAMILIARS`).
|
|
39
|
+
* This function is meant to be called in the `EVALUATE_CACHE` callback (when the cache flag is
|
|
40
|
+
* equal to `CacheFlag.FAMILIARS`).
|
|
41
41
|
*
|
|
42
42
|
* Use this function when the amount of familiars should be equal to the amount of associated
|
|
43
43
|
* collectibles that the player has (plus any extras from having used Box of Friends or Monster
|
|
@@ -14,8 +14,8 @@ local getFamiliars = ____entitiesSpecific.getFamiliars
|
|
|
14
14
|
-- specify an incorrect RNG object. (The vanilla method is bugged in that it does not increment the
|
|
15
15
|
-- RNG object; see the documentation of the method for more details.)
|
|
16
16
|
--
|
|
17
|
-
-- This function is meant to be called in the
|
|
18
|
-
-- to `CacheFlag.FAMILIARS`).
|
|
17
|
+
-- This function is meant to be called in the `EVALUATE_CACHE` callback (when the cache flag is
|
|
18
|
+
-- equal to `CacheFlag.FAMILIARS`).
|
|
19
19
|
--
|
|
20
20
|
-- Note that this function is only meant to be used in special circumstances where the familiar
|
|
21
21
|
-- count is completely custom and does not correspond to the amount of collectibles. For the general
|
|
@@ -50,8 +50,8 @@ end
|
|
|
50
50
|
-- Use this helper function instead of invoking the `EntityPlayer.CheckFamiliar` method directly so
|
|
51
51
|
-- that the target count is handled automatically.
|
|
52
52
|
--
|
|
53
|
-
-- This function is meant to be called in the
|
|
54
|
-
-- to `CacheFlag.FAMILIARS`).
|
|
53
|
+
-- This function is meant to be called in the `EVALUATE_CACHE` callback (when the cache flag is
|
|
54
|
+
-- equal to `CacheFlag.FAMILIARS`).
|
|
55
55
|
--
|
|
56
56
|
-- Use this function when the amount of familiars should be equal to the amount of associated
|
|
57
57
|
-- collectibles that the player has (plus any extras from having used Box of Friends or Monster
|
package/dist/functions/flag.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare function addFlag<T extends BitFlag | BitFlag128>(flags: T | BitFl
|
|
|
29
29
|
* Helper function for casting a flag enum value to a `BitFlags` object.
|
|
30
30
|
*
|
|
31
31
|
* This is useful because the compiler will prevent you from assigning a specific flag to a
|
|
32
|
-
* `BitFlags`
|
|
32
|
+
* `BitFlags` field. (It does this to ensure type safety, since `BitFlags` can represent a zero
|
|
33
33
|
* value or a composition of N flags.)
|
|
34
34
|
*
|
|
35
35
|
* For example:
|
package/dist/functions/flag.lua
CHANGED
|
@@ -35,7 +35,7 @@ end
|
|
|
35
35
|
--- Helper function for casting a flag enum value to a `BitFlags` object.
|
|
36
36
|
--
|
|
37
37
|
-- This is useful because the compiler will prevent you from assigning a specific flag to a
|
|
38
|
-
-- `BitFlags`
|
|
38
|
+
-- `BitFlags` field. (It does this to ensure type safety, since `BitFlags` can represent a zero
|
|
39
39
|
-- value or a composition of N flags.)
|
|
40
40
|
--
|
|
41
41
|
-- For example:
|
|
@@ -9,8 +9,8 @@ local CollectibleType = ____isaac_2Dtypescript_2Ddefinitions.CollectibleType
|
|
|
9
9
|
local NullItemID = ____isaac_2Dtypescript_2Ddefinitions.NullItemID
|
|
10
10
|
local PlayerType = ____isaac_2Dtypescript_2Ddefinitions.PlayerType
|
|
11
11
|
local TrinketType = ____isaac_2Dtypescript_2Ddefinitions.TrinketType
|
|
12
|
-
local
|
|
13
|
-
local getCollectiblesForCacheFlag =
|
|
12
|
+
local ____cacheFlag = require("functions.cacheFlag")
|
|
13
|
+
local getCollectiblesForCacheFlag = ____cacheFlag.getCollectiblesForCacheFlag
|
|
14
14
|
local ____set = require("functions.set")
|
|
15
15
|
local copySet = ____set.copySet
|
|
16
16
|
local deleteSetsFromSet = ____set.deleteSetsFromSet
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from "./ambush";
|
|
2
2
|
export * from "./array";
|
|
3
3
|
export * from "./benchmark";
|
|
4
|
+
export * from "./bitSet128";
|
|
4
5
|
export * from "./bitwise";
|
|
5
6
|
export * from "./bombs";
|
|
6
7
|
export * from "./bosses";
|
|
@@ -10,7 +11,6 @@ export * from "./challenges";
|
|
|
10
11
|
export * from "./characters";
|
|
11
12
|
export * from "./charge";
|
|
12
13
|
export * from "./chargeBar";
|
|
13
|
-
export * from "./collectibleCacheFlag";
|
|
14
14
|
export * from "./collectibles";
|
|
15
15
|
export * from "./collectibleSet";
|
|
16
16
|
export * from "./collectibleTag";
|
|
@@ -61,6 +61,7 @@ export * from "./playerDataStructures";
|
|
|
61
61
|
export * from "./playerHealth";
|
|
62
62
|
export * from "./playerIndex";
|
|
63
63
|
export * from "./players";
|
|
64
|
+
export * from "./playerStats";
|
|
64
65
|
export * from "./pocketItems";
|
|
65
66
|
export * from "./positionVelocity";
|
|
66
67
|
export * from "./pressurePlate";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/functions/index.ts"],"names":[],"mappings":"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"}
|
package/dist/functions/index.lua
CHANGED
|
@@ -23,6 +23,14 @@ do
|
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
26
|
+
do
|
|
27
|
+
local ____export = require("functions.bitSet128")
|
|
28
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
29
|
+
if ____exportKey ~= "default" then
|
|
30
|
+
____exports[____exportKey] = ____exportValue
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
26
34
|
do
|
|
27
35
|
local ____export = require("functions.bitwise")
|
|
28
36
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -95,14 +103,6 @@ do
|
|
|
95
103
|
end
|
|
96
104
|
end
|
|
97
105
|
end
|
|
98
|
-
do
|
|
99
|
-
local ____export = require("functions.collectibleCacheFlag")
|
|
100
|
-
for ____exportKey, ____exportValue in pairs(____export) do
|
|
101
|
-
if ____exportKey ~= "default" then
|
|
102
|
-
____exports[____exportKey] = ____exportValue
|
|
103
|
-
end
|
|
104
|
-
end
|
|
105
|
-
end
|
|
106
106
|
do
|
|
107
107
|
local ____export = require("functions.collectibles")
|
|
108
108
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -503,6 +503,14 @@ do
|
|
|
503
503
|
end
|
|
504
504
|
end
|
|
505
505
|
end
|
|
506
|
+
do
|
|
507
|
+
local ____export = require("functions.playerStats")
|
|
508
|
+
for ____exportKey, ____exportValue in pairs(____export) do
|
|
509
|
+
if ____exportKey ~= "default" then
|
|
510
|
+
____exports[____exportKey] = ____exportValue
|
|
511
|
+
end
|
|
512
|
+
end
|
|
513
|
+
end
|
|
506
514
|
do
|
|
507
515
|
local ____export = require("functions.pocketItems")
|
|
508
516
|
for ____exportKey, ____exportValue in pairs(____export) do
|
|
@@ -29,5 +29,8 @@ export declare function isMoveActionTriggeredOnAnyInput(): boolean;
|
|
|
29
29
|
export declare function isShootAction(buttonAction: ButtonAction): boolean;
|
|
30
30
|
export declare function isShootActionPressedOnAnyInput(): boolean;
|
|
31
31
|
export declare function isShootActionTriggeredOnAnyInput(): boolean;
|
|
32
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Helper function to get the string that would be typed if someone pressed the corresponding key.
|
|
34
|
+
*/
|
|
35
|
+
export declare function keyboardToString(keyboard: Keyboard, uppercase: boolean): string | undefined;
|
|
33
36
|
//# sourceMappingURL=input.d.ts.map
|