isaacscript-common 15.6.0 → 15.6.2
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/index.d.ts +17 -11
- package/dist/isaacscript-common.lua +100 -90
- package/dist/src/callbacks.d.ts +1 -1
- package/dist/src/callbacks.d.ts.map +1 -1
- package/dist/src/classes/DefaultMap.d.ts +1 -1
- package/dist/src/classes/DefaultMap.d.ts.map +1 -1
- package/dist/src/classes/ModUpgradedBase.lua +1 -1
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts +1 -1
- package/dist/src/classes/callbacks/PostCollectibleEmpty.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostCustomRevive.d.ts +1 -1
- package/dist/src/classes/callbacks/PostCustomRevive.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts +1 -1
- package/dist/src/classes/callbacks/PostDiceRoomActivated.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts +1 -1
- package/dist/src/classes/callbacks/PostGridEntityCollision.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts +1 -1
- package/dist/src/classes/callbacks/PostGridEntityCustomCollision.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostGridEntityCustomRemove.d.ts +1 -1
- package/dist/src/classes/callbacks/PostGridEntityCustomRemove.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostGridEntityRemove.d.ts +1 -1
- package/dist/src/classes/callbacks/PostGridEntityRemove.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostItemDischarge.d.ts +3 -3
- package/dist/src/classes/callbacks/PostItemDischarge.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostPurchase.d.ts +1 -1
- package/dist/src/classes/callbacks/PostPurchase.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts +1 -1
- package/dist/src/classes/callbacks/PostRoomClearChanged.d.ts.map +1 -1
- package/dist/src/classes/callbacks/PostTransformation.d.ts +1 -1
- package/dist/src/classes/callbacks/PostTransformation.d.ts.map +1 -1
- package/dist/src/classes/features/callbackLogic/CustomRevive.lua +1 -1
- package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.d.ts +1 -1
- package/dist/src/classes/features/callbackLogic/GridEntityUpdateDetection.d.ts.map +1 -1
- package/dist/src/classes/features/other/CustomHotkeys.lua +2 -2
- package/dist/src/classes/features/other/CustomStages.lua +4 -4
- package/dist/src/classes/features/other/ForgottenSwitch.d.ts +2 -1
- package/dist/src/classes/features/other/ForgottenSwitch.d.ts.map +1 -1
- package/dist/src/classes/features/other/ForgottenSwitch.lua +2 -2
- package/dist/src/classes/features/other/PickupIndexCreation.d.ts +2 -2
- package/dist/src/classes/features/other/PickupIndexCreation.d.ts.map +1 -1
- package/dist/src/classes/features/other/PickupIndexCreation.lua +33 -48
- package/dist/src/classes/features/other/PressInput.d.ts +1 -1
- package/dist/src/classes/features/other/PressInput.d.ts.map +1 -1
- package/dist/src/classes/features/other/PressInput.lua +28 -9
- package/dist/src/classes/features/other/RoomHistory.d.ts +2 -2
- package/dist/src/classes/features/other/extraConsoleCommands/commands.d.ts.map +1 -1
- package/dist/src/classes/features/other/extraConsoleCommands/commands.lua +1 -1
- package/dist/src/classes/private/CustomCallback.d.ts +2 -2
- package/dist/src/classes/private/CustomCallback.d.ts.map +1 -1
- package/dist/src/core/upgradeMod.d.ts +1 -1
- package/dist/src/core/upgradeMod.d.ts.map +1 -1
- package/dist/src/functions/bitSet128.d.ts +1 -1
- package/dist/src/functions/bitSet128.d.ts.map +1 -1
- package/dist/src/functions/color.d.ts +1 -1
- package/dist/src/functions/color.d.ts.map +1 -1
- package/dist/src/functions/flag.lua +5 -1
- package/dist/src/functions/gridIndex.lua +1 -1
- package/dist/src/functions/input.d.ts +1 -1
- package/dist/src/functions/input.d.ts.map +1 -1
- package/dist/src/functions/input.lua +0 -3
- package/dist/src/functions/kColor.d.ts +1 -1
- package/dist/src/functions/kColor.d.ts.map +1 -1
- package/dist/src/functions/logEntities.lua +9 -9
- package/dist/src/functions/logMisc.lua +1 -4
- package/dist/src/functions/pills.d.ts +3 -3
- package/dist/src/functions/pills.lua +3 -3
- package/dist/src/functions/rng.d.ts +1 -1
- package/dist/src/functions/rng.d.ts.map +1 -1
- package/dist/src/functions/roomShapeWalls.lua +2 -2
- package/dist/src/functions/run.lua +1 -1
- package/dist/src/functions/ui.d.ts +1 -1
- package/dist/src/functions/ui.lua +1 -1
- package/dist/src/functions/vector.d.ts +7 -1
- package/dist/src/functions/vector.d.ts.map +1 -1
- package/dist/src/functions/vector.lua +4 -0
- package/dist/src/interfaces/CustomStageTSConfig.d.ts +1 -1
- package/dist/src/interfaces/CustomStageTSConfig.d.ts.map +1 -1
- package/dist/src/interfaces/PlayerHealth.d.ts +1 -1
- package/dist/src/interfaces/PlayerHealth.d.ts.map +1 -1
- package/dist/src/interfaces/SaveData.d.ts +12 -12
- package/dist/src/interfaces/SaveData.d.ts.map +1 -1
- package/dist/src/interfaces/private/CustomStage.d.ts +3 -3
- package/dist/src/interfaces/private/CustomStage.d.ts.map +1 -1
- package/dist/src/objects/isaacAPIClassTypeToFunctions.d.ts +2 -2
- package/dist/src/objects/isaacAPIClassTypeToFunctions.d.ts.map +1 -1
- package/dist/src/types/AllButFirst.d.ts +1 -1
- package/dist/src/types/AllButFirst.d.ts.map +1 -1
- package/dist/src/types/AllButLast.d.ts +1 -1
- package/dist/src/types/AllButLast.d.ts.map +1 -1
- package/dist/src/types/AnyClass.d.ts +1 -1
- package/dist/src/types/AnyClass.d.ts.map +1 -1
- package/dist/src/types/AnyEntity.d.ts +1 -1
- package/dist/src/types/AnyEntity.d.ts.map +1 -1
- package/dist/src/types/AnyFunction.d.ts +1 -1
- package/dist/src/types/AnyFunction.d.ts.map +1 -1
- package/dist/src/types/AnyGridEntity.d.ts +1 -1
- package/dist/src/types/AnyGridEntity.d.ts.map +1 -1
- package/dist/src/types/CollectibleIndex.d.ts +1 -1
- package/dist/src/types/CollectibleIndex.d.ts.map +1 -1
- package/dist/src/types/ConversionHeartSubType.d.ts +1 -1
- package/dist/src/types/ConversionHeartSubType.d.ts.map +1 -1
- package/dist/src/types/EntityID.d.ts +1 -1
- package/dist/src/types/EntityID.d.ts.map +1 -1
- package/dist/src/types/FunctionTuple.d.ts +1 -1
- package/dist/src/types/FunctionTuple.d.ts.map +1 -1
- package/dist/src/types/GridEntityID.d.ts +1 -1
- package/dist/src/types/GridEntityID.d.ts.map +1 -1
- package/dist/src/types/HasAllEnumKeys.d.ts +1 -1
- package/dist/src/types/HasAllEnumKeys.d.ts.map +1 -1
- package/dist/src/types/HasFunction.d.ts +1 -1
- package/dist/src/types/HasFunction.d.ts.map +1 -1
- package/dist/src/types/Immutable.d.ts +6 -6
- package/dist/src/types/Immutable.d.ts.map +1 -1
- package/dist/src/types/LowercaseKeys.d.ts +1 -1
- package/dist/src/types/LowercaseKeys.d.ts.map +1 -1
- package/dist/src/types/ModUpgraded.d.ts +3 -3
- package/dist/src/types/ModUpgraded.d.ts.map +1 -1
- package/dist/src/types/PickingUpItem.d.ts +1 -1
- package/dist/src/types/PickingUpItem.d.ts.map +1 -1
- package/dist/src/types/PickupIndex.d.ts +1 -1
- package/dist/src/types/PickupIndex.d.ts.map +1 -1
- package/dist/src/types/PlayerIndex.d.ts +1 -1
- package/dist/src/types/PlayerIndex.d.ts.map +1 -1
- package/dist/src/types/PossibleStatType.d.ts +1 -1
- package/dist/src/types/PossibleStatType.d.ts.map +1 -1
- package/dist/src/types/PublicInterface.d.ts +1 -1
- package/dist/src/types/PublicInterface.d.ts.map +1 -1
- package/dist/src/types/StartsWithLowercase.d.ts +1 -1
- package/dist/src/types/StartsWithLowercase.d.ts.map +1 -1
- package/dist/src/types/StartsWithUppercase.d.ts +1 -1
- package/dist/src/types/StartsWithUppercase.d.ts.map +1 -1
- package/dist/src/types/TSTLClass.d.ts +1 -1
- package/dist/src/types/TSTLClass.d.ts.map +1 -1
- package/dist/src/types/TupleToIntersection.d.ts +1 -1
- package/dist/src/types/TupleToIntersection.d.ts.map +1 -1
- package/dist/src/types/TupleToUnion.d.ts +1 -1
- package/dist/src/types/TupleToUnion.d.ts.map +1 -1
- package/dist/src/types/UnionToIntersection.d.ts +1 -1
- package/dist/src/types/UnionToIntersection.d.ts.map +1 -1
- package/dist/src/types/UppercaseKeys.d.ts +1 -1
- package/dist/src/types/UppercaseKeys.d.ts.map +1 -1
- package/dist/src/types/WeightedArray.d.ts +1 -1
- package/dist/src/types/WeightedArray.d.ts.map +1 -1
- package/dist/src/types/Writable.d.ts +1 -1
- package/dist/src/types/Writable.d.ts.map +1 -1
- package/dist/src/types/private/AllButFirst.d.ts +1 -1
- package/dist/src/types/private/AllButFirst.d.ts.map +1 -1
- package/dist/src/types/private/CallbackTuple.d.ts +2 -2
- package/dist/src/types/private/CallbackTuple.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/classes/features/other/ForgottenSwitch.ts +2 -2
- package/src/classes/features/other/PickupIndexCreation.ts +43 -53
- package/src/classes/features/other/PressInput.ts +29 -7
- package/src/classes/features/other/RoomHistory.ts +2 -2
- package/src/classes/features/other/extraConsoleCommands/commands.ts +2 -0
- package/src/functions/flag.ts +1 -1
- package/src/functions/input.ts +1 -5
- package/src/functions/pills.ts +3 -3
- package/src/functions/ui.ts +1 -1
- package/src/functions/vector.ts +6 -0
package/dist/index.d.ts
CHANGED
|
@@ -1363,7 +1363,7 @@ export declare function combineSets<T>(...sets: Array<Set<T> | ReadonlySet<T>>):
|
|
|
1363
1363
|
* Helper function to get the enum name for the specified `Controller` value. Note that this will
|
|
1364
1364
|
* trim off the "BUTTON_" prefix.
|
|
1365
1365
|
*/
|
|
1366
|
-
export declare function controllerToString(controller: Controller): string
|
|
1366
|
+
export declare function controllerToString(controller: Controller): string;
|
|
1367
1367
|
|
|
1368
1368
|
/**
|
|
1369
1369
|
* This is the type that is fed to `registerCharacterHealthConversion` helper function to signify
|
|
@@ -3801,7 +3801,7 @@ declare class ForgottenSwitch extends Feature {
|
|
|
3801
3801
|
*
|
|
3802
3802
|
* In order to use this function, you must upgrade your mod with `ISCFeature.FORGOTTEN_SWITCH`.
|
|
3803
3803
|
*/
|
|
3804
|
-
forgottenSwitch(): void;
|
|
3804
|
+
forgottenSwitch(player: EntityPlayer): void;
|
|
3805
3805
|
}
|
|
3806
3806
|
|
|
3807
3807
|
declare type FunctionIsNotSerializable = "Error: Functions are not serializable. For more information, see: https://isaacscript.github.io/main/gotchas#functions-are-not-serializable";
|
|
@@ -4865,7 +4865,7 @@ export declare function getHearts(heartSubType?: HeartSubType): EntityPickupHear
|
|
|
4865
4865
|
/**
|
|
4866
4866
|
* Helper function to get the width of the first player's hearts on the UI. This is useful for
|
|
4867
4867
|
* drawing UI elements to the right of where the player's hearts are. Make sure to use this in
|
|
4868
|
-
* combination with the
|
|
4868
|
+
* combination with the `getHUDOffsetVector` helper function.
|
|
4869
4869
|
*/
|
|
4870
4870
|
export declare function getHeartsUIWidth(): int;
|
|
4871
4871
|
|
|
@@ -5268,9 +5268,9 @@ export declare function getPillEffectName(pillEffect: PillEffect): string;
|
|
|
5268
5268
|
|
|
5269
5269
|
/**
|
|
5270
5270
|
* Helper function to get a pill effect type from a PillEffect enum value. In this context, the type
|
|
5271
|
-
* is equal to positive, negative, or neutral. This is derived from the suffix of the
|
|
5272
|
-
*
|
|
5273
|
-
*
|
|
5271
|
+
* is equal to positive, negative, or neutral. This is derived from the suffix of the "class" tag in
|
|
5272
|
+
* the "pocketitems.xml" file. Use the `getPillEffectClass` helper function to determine the "power"
|
|
5273
|
+
* of the pill.
|
|
5274
5274
|
*
|
|
5275
5275
|
* Due to limitations in the API, this function will not work properly for modded pill effects, and
|
|
5276
5276
|
* will always return `DEFAULT_PILL_EFFECT_TYPE` in those cases.
|
|
@@ -11322,7 +11322,8 @@ export declare type PickupIndex = int & {
|
|
|
11322
11322
|
declare class PickupIndexCreation extends Feature {
|
|
11323
11323
|
private roomHistory;
|
|
11324
11324
|
private postPickupInit;
|
|
11325
|
-
private
|
|
11325
|
+
private setPickupIndex;
|
|
11326
|
+
private getPickupIndexFromPreviousData;
|
|
11326
11327
|
private postEntityRemovePickup;
|
|
11327
11328
|
private checkDespawningFromPlayerLeavingRoom;
|
|
11328
11329
|
/**
|
|
@@ -11330,7 +11331,6 @@ declare class PickupIndexCreation extends Feature {
|
|
|
11330
11331
|
* Keep track of the metadata for later.
|
|
11331
11332
|
*/
|
|
11332
11333
|
private trackDespawningPickupMetadata;
|
|
11333
|
-
private postNewRoomReordered;
|
|
11334
11334
|
private getPostAscentPickupIndex;
|
|
11335
11335
|
/**
|
|
11336
11336
|
* Mods often have to track variables relating to a pickups. Finding an index for these kinds of
|
|
@@ -11726,7 +11726,7 @@ declare class PressInput extends Feature {
|
|
|
11726
11726
|
*
|
|
11727
11727
|
* In order to use this function, you must upgrade your mod with `ISCFeature.PRESS_INPUT`.
|
|
11728
11728
|
*/
|
|
11729
|
-
pressInput(buttonAction: ButtonAction): void;
|
|
11729
|
+
pressInput(player: EntityPlayer, buttonAction: ButtonAction): void;
|
|
11730
11730
|
}
|
|
11731
11731
|
|
|
11732
11732
|
declare class PreventChildEntities extends Feature {
|
|
@@ -12561,8 +12561,8 @@ declare class RoomHistory extends Feature {
|
|
|
12561
12561
|
/**
|
|
12562
12562
|
* Helper function to detect if the game is in the state where the room index has changed to a new
|
|
12563
12563
|
* room, but the entities from the previous room are currently in the process of despawning. (At
|
|
12564
|
-
* this point, the `POST_NEW_ROOM` callback
|
|
12565
|
-
* entry in the room history array for the current room.)
|
|
12564
|
+
* this point, the `POST_NEW_ROOM` callback and the `POST_NEW_ROOM_EARLY` callback will not have
|
|
12565
|
+
* fired yet, and there will not be an entry in the room history array for the current room.)
|
|
12566
12566
|
*
|
|
12567
12567
|
* This function is intended to be used in the `POST_ENTITY_REMOVE` callback to detect when an
|
|
12568
12568
|
* entity is despawning.
|
|
@@ -14505,6 +14505,12 @@ export declare function validateEnumContiguous<T>(transpiledEnumName: string, tr
|
|
|
14505
14505
|
*/
|
|
14506
14506
|
export declare function validateInterfaceMatchesEnum<T extends Record<Enum, unknown>, Enum extends string | number>(): void;
|
|
14507
14507
|
|
|
14508
|
+
/**
|
|
14509
|
+
* Helper function to compare two vectors for equality.
|
|
14510
|
+
*
|
|
14511
|
+
* This function is useful because vectors are not directly comparable. In other words, `Vector(1.2)
|
|
14512
|
+
* === Vector(1.2)` will be equal to false.
|
|
14513
|
+
*/
|
|
14508
14514
|
export declare function vectorEquals(vector1: Vector, vector2: Vector): boolean;
|
|
14509
14515
|
|
|
14510
14516
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 15.6.
|
|
3
|
+
isaacscript-common 15.6.2
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -25,7 +25,15 @@ information about using TypeScript, see the website: https://isaacscript.github.
|
|
|
25
25
|
|
|
26
26
|
--]]
|
|
27
27
|
|
|
28
|
+
---@diagnostic disable: assign-type-mismatch
|
|
28
29
|
---@diagnostic disable: deprecated
|
|
30
|
+
---@diagnostic disable: lowercase-global
|
|
31
|
+
---@diagnostic disable: need-check-nil
|
|
32
|
+
---@diagnostic disable: redefined-local
|
|
33
|
+
---@diagnostic disable: redundant-parameter
|
|
34
|
+
---@diagnostic disable: unused-function
|
|
35
|
+
---@diagnostic disable: unused-local
|
|
36
|
+
---@diagnostic disable: unused-vararg
|
|
29
37
|
|
|
30
38
|
|
|
31
39
|
local ____modules = {}
|
|
@@ -16788,6 +16796,8 @@ end
|
|
|
16788
16796
|
return ____exports
|
|
16789
16797
|
end,
|
|
16790
16798
|
["src.functions.flag"] = function(...)
|
|
16799
|
+
local ____lualib = require("lualib_bundle")
|
|
16800
|
+
local __TS__ObjectEntries = ____lualib.__TS__ObjectEntries
|
|
16791
16801
|
local ____exports = {}
|
|
16792
16802
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
16793
16803
|
local DamageFlag = ____isaac_2Dtypescript_2Ddefinitions.DamageFlag
|
|
@@ -16803,7 +16813,9 @@ function ____exports.bitFlags(self, flag)
|
|
|
16803
16813
|
return flag
|
|
16804
16814
|
end
|
|
16805
16815
|
function ____exports.getFlagName(self, flag, flagEnum)
|
|
16806
|
-
for
|
|
16816
|
+
for ____, ____value in ipairs(__TS__ObjectEntries(flagEnum)) do
|
|
16817
|
+
local key = ____value[1]
|
|
16818
|
+
local value = ____value[2]
|
|
16807
16819
|
if value == flag then
|
|
16808
16820
|
return key
|
|
16809
16821
|
end
|
|
@@ -23256,7 +23268,7 @@ function ____exports.restart(self, character)
|
|
|
23256
23268
|
local command = "restart " .. tostring(character)
|
|
23257
23269
|
log(
|
|
23258
23270
|
nil,
|
|
23259
|
-
(((("Restarting the run as PlayerType." ..
|
|
23271
|
+
(((("Restarting the run as PlayerType." .. PlayerType[character]) .. " (") .. tostring(character)) .. ") with a console command of: ") .. command
|
|
23260
23272
|
)
|
|
23261
23273
|
Isaac.ExecuteCommand(command)
|
|
23262
23274
|
end
|
|
@@ -27382,10 +27394,7 @@ function ____exports.logPlayerHealth(self, player)
|
|
|
27382
27394
|
)
|
|
27383
27395
|
log(nil, " Soul heart types: [")
|
|
27384
27396
|
for ____, soulHeartType in ipairs(playerHealth.soulHeartTypes) do
|
|
27385
|
-
log(
|
|
27386
|
-
nil,
|
|
27387
|
-
" HeartSubType." .. tostring(HeartSubType[soulHeartType])
|
|
27388
|
-
)
|
|
27397
|
+
log(nil, " HeartSubType." .. HeartSubType[soulHeartType])
|
|
27389
27398
|
end
|
|
27390
27399
|
log(nil, " ]")
|
|
27391
27400
|
end
|
|
@@ -31340,7 +31349,7 @@ function CustomRevive.prototype.logStateChanged(self)
|
|
|
31340
31349
|
if DEBUG then
|
|
31341
31350
|
log(
|
|
31342
31351
|
nil,
|
|
31343
|
-
((("Custom revive state changed: " ..
|
|
31352
|
+
((("Custom revive state changed: " .. CustomReviveState[self.v.run.state]) .. " (") .. tostring(self.v.run.state)) .. ")"
|
|
31344
31353
|
)
|
|
31345
31354
|
end
|
|
31346
31355
|
end
|
|
@@ -33886,12 +33895,8 @@ local ____decorators = require("src.decorators")
|
|
|
33886
33895
|
local Exported = ____decorators.Exported
|
|
33887
33896
|
local ____ISCFeature = require("src.enums.ISCFeature")
|
|
33888
33897
|
local ISCFeature = ____ISCFeature.ISCFeature
|
|
33889
|
-
local ____ModCallbackCustom = require("src.enums.ModCallbackCustom")
|
|
33890
|
-
local ModCallbackCustom = ____ModCallbackCustom.ModCallbackCustom
|
|
33891
33898
|
local ____entities = require("src.functions.entities")
|
|
33892
33899
|
local getEntityID = ____entities.getEntityID
|
|
33893
|
-
local ____entitiesSpecific = require("src.functions.entitiesSpecific")
|
|
33894
|
-
local getPickups = ____entitiesSpecific.getPickups
|
|
33895
33900
|
local ____roomData = require("src.functions.roomData")
|
|
33896
33901
|
local getRoomListIndex = ____roomData.getRoomListIndex
|
|
33897
33902
|
local ____stage = require("src.functions.stage")
|
|
@@ -33931,53 +33936,41 @@ function PickupIndexCreation.prototype.____constructor(self, roomHistory)
|
|
|
33931
33936
|
room = {pickupIndexes = __TS__New(Map)}
|
|
33932
33937
|
}
|
|
33933
33938
|
self.postPickupInit = function(____, pickup)
|
|
33934
|
-
self:
|
|
33939
|
+
self:setPickupIndex(pickup)
|
|
33935
33940
|
end
|
|
33936
33941
|
self.postEntityRemovePickup = function(____, entity)
|
|
33937
33942
|
self:checkDespawningFromPlayerLeavingRoom(entity)
|
|
33938
33943
|
end
|
|
33939
|
-
self.postNewRoomReordered = function()
|
|
33940
|
-
local room = game:GetRoom()
|
|
33941
|
-
local isFirstVisit = room:IsFirstVisit()
|
|
33942
|
-
if isFirstVisit then
|
|
33943
|
-
return
|
|
33944
|
-
end
|
|
33945
|
-
local roomListIndex = getRoomListIndex(nil)
|
|
33946
|
-
local pickupDescriptions = self.v.level.pickupData:getAndSetDefault(roomListIndex)
|
|
33947
|
-
for ____, pickup in ipairs(getPickups(nil)) do
|
|
33948
|
-
local pickupIndex = getStoredPickupIndex(nil, pickup, pickupDescriptions)
|
|
33949
|
-
if pickupIndex == nil then
|
|
33950
|
-
pickupIndex = self:getPostAscentPickupIndex(pickup)
|
|
33951
|
-
end
|
|
33952
|
-
if pickupIndex == nil then
|
|
33953
|
-
local ____self_v_run_0, ____pickupCounter_1 = self.v.run, "pickupCounter"
|
|
33954
|
-
____self_v_run_0[____pickupCounter_1] = ____self_v_run_0[____pickupCounter_1] + 1
|
|
33955
|
-
pickupIndex = self.v.run.pickupCounter
|
|
33956
|
-
end
|
|
33957
|
-
local ptrHash = GetPtrHash(pickup)
|
|
33958
|
-
self.v.room.pickupIndexes:set(ptrHash, pickupIndex)
|
|
33959
|
-
end
|
|
33960
|
-
end
|
|
33961
33944
|
self.featuresUsed = {ISCFeature.ROOM_HISTORY}
|
|
33962
33945
|
self.callbacksUsed = {{ModCallback.POST_PICKUP_INIT, {self.postPickupInit}}, {ModCallback.POST_ENTITY_REMOVE, {self.postEntityRemovePickup, EntityType.PICKUP}}}
|
|
33963
|
-
self.customCallbacksUsed = {{ModCallbackCustom.POST_NEW_ROOM_REORDERED, {self.postNewRoomReordered}}}
|
|
33964
33946
|
self.roomHistory = roomHistory
|
|
33965
33947
|
end
|
|
33966
|
-
function PickupIndexCreation.prototype.
|
|
33948
|
+
function PickupIndexCreation.prototype.setPickupIndex(self, pickup)
|
|
33967
33949
|
local ptrHash = GetPtrHash(pickup)
|
|
33968
33950
|
if self.v.room.pickupIndexes:has(ptrHash) then
|
|
33969
33951
|
return
|
|
33970
33952
|
end
|
|
33953
|
+
local pickupIndexFromLevelData = self:getPickupIndexFromPreviousData(pickup)
|
|
33971
33954
|
local room = game:GetRoom()
|
|
33972
33955
|
local isFirstVisit = room:IsFirstVisit()
|
|
33973
33956
|
local roomFrameCount = room:GetFrameCount()
|
|
33974
|
-
if not isFirstVisit and roomFrameCount <= 0 then
|
|
33957
|
+
if pickupIndexFromLevelData ~= nil and not isFirstVisit and roomFrameCount <= 0 then
|
|
33958
|
+
self.v.room.pickupIndexes:set(ptrHash, pickupIndexFromLevelData)
|
|
33975
33959
|
return
|
|
33976
33960
|
end
|
|
33977
|
-
local
|
|
33978
|
-
|
|
33961
|
+
local ____self_v_run_0, ____pickupCounter_1 = self.v.run, "pickupCounter"
|
|
33962
|
+
____self_v_run_0[____pickupCounter_1] = ____self_v_run_0[____pickupCounter_1] + 1
|
|
33979
33963
|
self.v.room.pickupIndexes:set(ptrHash, self.v.run.pickupCounter)
|
|
33980
33964
|
end
|
|
33965
|
+
function PickupIndexCreation.prototype.getPickupIndexFromPreviousData(self, pickup)
|
|
33966
|
+
local roomListIndex = getRoomListIndex(nil)
|
|
33967
|
+
local pickupDescriptions = self.v.level.pickupData:getAndSetDefault(roomListIndex)
|
|
33968
|
+
local pickupIndex = getStoredPickupIndex(nil, pickup, pickupDescriptions)
|
|
33969
|
+
if pickupIndex == nil then
|
|
33970
|
+
pickupIndex = self:getPostAscentPickupIndex(pickup)
|
|
33971
|
+
end
|
|
33972
|
+
return pickupIndex
|
|
33973
|
+
end
|
|
33981
33974
|
function PickupIndexCreation.prototype.checkDespawningFromPlayerLeavingRoom(self, entity)
|
|
33982
33975
|
local ptrHash = GetPtrHash(entity)
|
|
33983
33976
|
local pickupIndex = self.v.room.pickupIndexes:get(ptrHash)
|
|
@@ -34004,16 +33997,16 @@ function PickupIndexCreation.prototype.trackDespawningPickupMetadata(self, entit
|
|
|
34004
33997
|
local room = game:GetRoom()
|
|
34005
33998
|
local roomType = room:GetType()
|
|
34006
33999
|
repeat
|
|
34007
|
-
local
|
|
34008
|
-
local
|
|
34009
|
-
if
|
|
34000
|
+
local ____switch17 = roomType
|
|
34001
|
+
local ____cond17 = ____switch17 == RoomType.TREASURE
|
|
34002
|
+
if ____cond17 then
|
|
34010
34003
|
do
|
|
34011
34004
|
self.v.run.pickupDataTreasureRooms:set(pickupIndex, pickupDescription)
|
|
34012
34005
|
break
|
|
34013
34006
|
end
|
|
34014
34007
|
end
|
|
34015
|
-
|
|
34016
|
-
if
|
|
34008
|
+
____cond17 = ____cond17 or ____switch17 == RoomType.BOSS
|
|
34009
|
+
if ____cond17 then
|
|
34017
34010
|
do
|
|
34018
34011
|
self.v.run.pickupDataBossRooms:set(pickupIndex, pickupDescription)
|
|
34019
34012
|
break
|
|
@@ -34033,15 +34026,15 @@ function PickupIndexCreation.prototype.getPostAscentPickupIndex(self, pickup)
|
|
|
34033
34026
|
local room = game:GetRoom()
|
|
34034
34027
|
local roomType = room:GetType()
|
|
34035
34028
|
repeat
|
|
34036
|
-
local
|
|
34037
|
-
local
|
|
34038
|
-
if
|
|
34029
|
+
local ____switch23 = roomType
|
|
34030
|
+
local ____cond23 = ____switch23 == RoomType.TREASURE
|
|
34031
|
+
if ____cond23 then
|
|
34039
34032
|
do
|
|
34040
34033
|
return getStoredPickupIndex(nil, pickup, self.v.run.pickupDataTreasureRooms)
|
|
34041
34034
|
end
|
|
34042
34035
|
end
|
|
34043
|
-
|
|
34044
|
-
if
|
|
34036
|
+
____cond23 = ____cond23 or ____switch23 == RoomType.BOSS
|
|
34037
|
+
if ____cond23 then
|
|
34045
34038
|
do
|
|
34046
34039
|
return getStoredPickupIndex(nil, pickup, self.v.run.pickupDataBossRooms)
|
|
34047
34040
|
end
|
|
@@ -34056,15 +34049,16 @@ end
|
|
|
34056
34049
|
function PickupIndexCreation.prototype.getPickupIndex(self, pickup)
|
|
34057
34050
|
local ptrHash = GetPtrHash(pickup)
|
|
34058
34051
|
local pickupIndexInitial = self.v.room.pickupIndexes:get(ptrHash)
|
|
34059
|
-
if pickupIndexInitial
|
|
34060
|
-
|
|
34052
|
+
if pickupIndexInitial ~= nil then
|
|
34053
|
+
return pickupIndexInitial
|
|
34061
34054
|
end
|
|
34055
|
+
self:setPickupIndex(pickup)
|
|
34062
34056
|
local pickupIndex = self.v.room.pickupIndexes:get(ptrHash)
|
|
34063
|
-
if pickupIndex
|
|
34064
|
-
|
|
34065
|
-
error("Failed to generate a new pickup index for pickup: " .. entityID)
|
|
34057
|
+
if pickupIndex ~= nil then
|
|
34058
|
+
return pickupIndex
|
|
34066
34059
|
end
|
|
34067
|
-
|
|
34060
|
+
local entityID = getEntityID(nil, pickup)
|
|
34061
|
+
error("Failed to generate a new pickup index for pickup: " .. entityID)
|
|
34068
34062
|
end
|
|
34069
34063
|
__TS__Decorate({Exported}, PickupIndexCreation.prototype, "getPickupIndex", true)
|
|
34070
34064
|
return ____exports
|
|
@@ -34230,9 +34224,6 @@ local SHOOTING_ACTIONS = {ButtonAction.SHOOT_LEFT, ButtonAction.SHOOT_RIGHT, But
|
|
|
34230
34224
|
____exports.SHOOTING_ACTIONS_SET = __TS__New(Set, SHOOTING_ACTIONS)
|
|
34231
34225
|
function ____exports.controllerToString(self, controller)
|
|
34232
34226
|
local key = Controller[controller]
|
|
34233
|
-
if key == nil then
|
|
34234
|
-
return nil
|
|
34235
|
-
end
|
|
34236
34227
|
return trimPrefix(nil, key, "BUTTON_")
|
|
34237
34228
|
end
|
|
34238
34229
|
function ____exports.getMoveActions(self)
|
|
@@ -34370,7 +34361,7 @@ function CustomHotkeys.prototype.setConditionalHotkey(self, getKeyFunc, triggerF
|
|
|
34370
34361
|
end
|
|
34371
34362
|
function CustomHotkeys.prototype.setHotkey(self, keyboard, triggerFunc)
|
|
34372
34363
|
if self.staticHotkeyFunctionMap:has(keyboard) then
|
|
34373
|
-
error(((("Failed to register a hotkey due to a hotkey already being defined for: Keyboard." ..
|
|
34364
|
+
error(((("Failed to register a hotkey due to a hotkey already being defined for: Keyboard." .. Keyboard[keyboard]) .. " (") .. tostring(keyboard)) .. ")")
|
|
34374
34365
|
end
|
|
34375
34366
|
self.staticHotkeyFunctionMap:set(keyboard, triggerFunc)
|
|
34376
34367
|
end
|
|
@@ -34382,7 +34373,7 @@ function CustomHotkeys.prototype.unsetConditionalHotkey(self, getKeyFunc)
|
|
|
34382
34373
|
end
|
|
34383
34374
|
function CustomHotkeys.prototype.unsetHotkey(self, keyboard)
|
|
34384
34375
|
if not self.staticHotkeyFunctionMap:has(keyboard) then
|
|
34385
|
-
error(((("Failed to unregister a hotkey since there is no existing hotkey defined for: Keyboard." ..
|
|
34376
|
+
error(((("Failed to unregister a hotkey since there is no existing hotkey defined for: Keyboard." .. Keyboard[keyboard]) .. " (") .. tostring(keyboard)) .. ")")
|
|
34386
34377
|
end
|
|
34387
34378
|
self.staticHotkeyFunctionMap:delete(keyboard)
|
|
34388
34379
|
end
|
|
@@ -39128,7 +39119,7 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
|
|
|
39128
39119
|
if roomType == RoomType.DEFAULT then
|
|
39129
39120
|
logError(
|
|
39130
39121
|
nil,
|
|
39131
|
-
(((("Failed to find any custom rooms for RoomType." ..
|
|
39122
|
+
(((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") for custom stage: ") .. customStage.name
|
|
39132
39123
|
)
|
|
39133
39124
|
end
|
|
39134
39125
|
goto __continue26
|
|
@@ -39138,7 +39129,7 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
|
|
|
39138
39129
|
if roomDoorSlotFlagMap == nil then
|
|
39139
39130
|
logError(
|
|
39140
39131
|
nil,
|
|
39141
|
-
(((((((("Failed to find any custom rooms for RoomType." ..
|
|
39132
|
+
(((((((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ") for custom stage: ") .. customStage.name
|
|
39142
39133
|
)
|
|
39143
39134
|
goto __continue26
|
|
39144
39135
|
end
|
|
@@ -39147,13 +39138,13 @@ function CustomStages.prototype.setStageRoomsData(self, customStage, rng, verbos
|
|
|
39147
39138
|
if roomsMetadata == nil then
|
|
39148
39139
|
logError(
|
|
39149
39140
|
nil,
|
|
39150
|
-
(((((((((("Failed to find any custom rooms for RoomType." ..
|
|
39141
|
+
(((((((((("Failed to find any custom rooms for RoomType." .. RoomType[roomType]) .. " (") .. tostring(roomType)) .. ") + RoomShape.") .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ") + DoorSlotFlags ") .. tostring(doorSlotFlags)) .. " for custom stage: ") .. customStage.name
|
|
39151
39142
|
)
|
|
39152
39143
|
local header = ("For reference, a DoorSlotFlags of " .. tostring(doorSlotFlags)) .. " is equal to the following doors being enabled:\n"
|
|
39153
39144
|
local doorSlots = doorSlotFlagsToDoorSlots(nil, doorSlotFlags)
|
|
39154
39145
|
local doorSlotLines = __TS__ArrayMap(
|
|
39155
39146
|
doorSlots,
|
|
39156
|
-
function(____, doorSlot) return ((("- DoorSlot." ..
|
|
39147
|
+
function(____, doorSlot) return ((("- DoorSlot." .. DoorSlot[doorSlot]) .. " (") .. tostring(doorSlot)) .. ")" end
|
|
39157
39148
|
)
|
|
39158
39149
|
local explanation = header .. table.concat(doorSlotLines, "\n")
|
|
39159
39150
|
logError(nil, explanation)
|
|
@@ -40015,7 +40006,7 @@ function ____exports.getGridIndexesBetween(self, gridIndex1, gridIndex2, roomSha
|
|
|
40015
40006
|
if isOnVerticalLine then
|
|
40016
40007
|
return iRange(nil, gridIndex1, gridIndex2, gridWidth)
|
|
40017
40008
|
end
|
|
40018
|
-
error(((((((("Failed to get the grid indexes between " .. tostring(gridIndex1)) .. " and ") .. tostring(gridIndex2)) .. " for RoomShape.") ..
|
|
40009
|
+
error(((((((("Failed to get the grid indexes between " .. tostring(gridIndex1)) .. " and ") .. tostring(gridIndex2)) .. " for RoomShape.") .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ") since they are not on the same horizontal or vertical line.")
|
|
40019
40010
|
end
|
|
40020
40011
|
return ____exports
|
|
40021
40012
|
end,
|
|
@@ -40058,7 +40049,7 @@ function getVanillaWallGridIndexSetForRoomShape(self, roomShape)
|
|
|
40058
40049
|
local corners = getRoomShapeCorners(nil, roomShape)
|
|
40059
40050
|
local lRoom = isLRoom(nil, roomShape)
|
|
40060
40051
|
if lRoom and #corners ~= 6 then
|
|
40061
|
-
error(((("Failed to get the correct amount of corners for: RoomShape." ..
|
|
40052
|
+
error(((("Failed to get the correct amount of corners for: RoomShape." .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ")")
|
|
40062
40053
|
end
|
|
40063
40054
|
repeat
|
|
40064
40055
|
local ____switch7 = roomShape
|
|
@@ -40280,7 +40271,7 @@ function ____exports.isVanillaWallGridIndex(self, gridIndex)
|
|
|
40280
40271
|
wallGridIndexSet = ROOM_SHAPE_TO_WALL_GRID_INDEX_SET:get(roomShape)
|
|
40281
40272
|
end
|
|
40282
40273
|
if wallGridIndexSet == nil then
|
|
40283
|
-
error(((("Failed to find the wall grid index set for: RoomShape." ..
|
|
40274
|
+
error(((("Failed to find the wall grid index set for: RoomShape." .. RoomShape[roomShape]) .. " (") .. tostring(roomShape)) .. ")")
|
|
40284
40275
|
end
|
|
40285
40276
|
return wallGridIndexSet:has(gridIndex)
|
|
40286
40277
|
end
|
|
@@ -44462,23 +44453,23 @@ function getEntityLogLine(self, entity, num)
|
|
|
44462
44453
|
msg = msg .. getEntityID(nil, entity)
|
|
44463
44454
|
local bomb = entity:ToBomb()
|
|
44464
44455
|
if bomb ~= nil then
|
|
44465
|
-
msg = msg .. (" (bomb - BombVariant." ..
|
|
44456
|
+
msg = msg .. (" (bomb - BombVariant." .. BombVariant[bomb.Variant]) .. ")"
|
|
44466
44457
|
end
|
|
44467
44458
|
local effect = entity:ToEffect()
|
|
44468
44459
|
if effect ~= nil then
|
|
44469
|
-
msg = msg .. (((" (effect - EffectVariant." ..
|
|
44460
|
+
msg = msg .. (((" (effect - EffectVariant." .. EffectVariant[effect.Variant]) .. ") (State: ") .. tostring(effect.State)) .. ")"
|
|
44470
44461
|
end
|
|
44471
44462
|
local familiar = entity:ToFamiliar()
|
|
44472
44463
|
if familiar ~= nil then
|
|
44473
|
-
msg = msg .. (((" (familiar - FamiliarVariant." ..
|
|
44464
|
+
msg = msg .. (((" (familiar - FamiliarVariant." .. FamiliarVariant[familiar.Variant]) .. ") (State: ") .. tostring(familiar.State)) .. ")"
|
|
44474
44465
|
end
|
|
44475
44466
|
local knife = entity:ToKnife()
|
|
44476
44467
|
if knife ~= nil then
|
|
44477
|
-
msg = msg .. (" (knife - KnifeVariant." ..
|
|
44468
|
+
msg = msg .. (" (knife - KnifeVariant." .. KnifeVariant[knife.Variant]) .. ")"
|
|
44478
44469
|
end
|
|
44479
44470
|
local laser = entity:ToLaser()
|
|
44480
44471
|
if laser ~= nil then
|
|
44481
|
-
msg = msg .. (" (laser - LaserVariant." ..
|
|
44472
|
+
msg = msg .. (" (laser - LaserVariant." .. LaserVariant[laser.Variant]) .. ")"
|
|
44482
44473
|
end
|
|
44483
44474
|
local npc = entity:ToNPC()
|
|
44484
44475
|
if npc ~= nil then
|
|
@@ -44486,19 +44477,19 @@ function getEntityLogLine(self, entity, num)
|
|
|
44486
44477
|
end
|
|
44487
44478
|
local pickup = entity:ToPickup()
|
|
44488
44479
|
if pickup ~= nil then
|
|
44489
|
-
msg = msg .. (((" (pickup - PickupVariant." ..
|
|
44480
|
+
msg = msg .. (((" (pickup - PickupVariant." .. PickupVariant[pickup.Variant]) .. ") (State: ") .. tostring(pickup.State)) .. ")"
|
|
44490
44481
|
end
|
|
44491
44482
|
local player = entity:ToPlayer()
|
|
44492
44483
|
if player ~= nil then
|
|
44493
|
-
msg = msg .. (" (player - PlayerVariant." ..
|
|
44484
|
+
msg = msg .. (" (player - PlayerVariant." .. PlayerVariant[player.Variant]) .. ")"
|
|
44494
44485
|
end
|
|
44495
44486
|
local projectile = entity:ToProjectile()
|
|
44496
44487
|
if projectile ~= nil then
|
|
44497
|
-
msg = msg .. (" (projectile - ProjectileVariant." ..
|
|
44488
|
+
msg = msg .. (" (projectile - ProjectileVariant." .. ProjectileVariant[projectile.Variant]) .. "))"
|
|
44498
44489
|
end
|
|
44499
44490
|
local tear = entity:ToTear()
|
|
44500
44491
|
if tear ~= nil then
|
|
44501
|
-
msg = msg .. (" (tear - TearVariant." ..
|
|
44492
|
+
msg = msg .. (" (tear - TearVariant." .. TearVariant[tear.Variant]) .. "))"
|
|
44502
44493
|
end
|
|
44503
44494
|
msg = msg .. "\n"
|
|
44504
44495
|
msg = msg .. (" - Index: " .. tostring(entity.Index)) .. "\n"
|
|
@@ -45410,7 +45401,7 @@ function ____exports.getCharge(self, params)
|
|
|
45410
45401
|
local totalCharge = getTotalCharge(nil, player, activeSlot)
|
|
45411
45402
|
printConsole(
|
|
45412
45403
|
nil,
|
|
45413
|
-
(((("Total charge for ActiveSlot." ..
|
|
45404
|
+
(((("Total charge for ActiveSlot." .. ActiveSlot[activeSlot]) .. " (") .. tostring(activeSlot)) .. ") is: ") .. tostring(totalCharge)
|
|
45414
45405
|
)
|
|
45415
45406
|
end
|
|
45416
45407
|
function ____exports.getPosition(self)
|
|
@@ -46295,8 +46286,7 @@ return ____exports
|
|
|
46295
46286
|
local ____lualib = require("lualib_bundle")
|
|
46296
46287
|
local __TS__Class = ____lualib.__TS__Class
|
|
46297
46288
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
46298
|
-
local
|
|
46299
|
-
local __TS__New = ____lualib.__TS__New
|
|
46289
|
+
local __TS__ArraySplice = ____lualib.__TS__ArraySplice
|
|
46300
46290
|
local __TS__Decorate = ____lualib.__TS__Decorate
|
|
46301
46291
|
local ____exports = {}
|
|
46302
46292
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
@@ -46304,6 +46294,8 @@ local InputHook = ____isaac_2Dtypescript_2Ddefinitions.InputHook
|
|
|
46304
46294
|
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
46305
46295
|
local ____decorators = require("src.decorators")
|
|
46306
46296
|
local Exported = ____decorators.Exported
|
|
46297
|
+
local ____playerIndex = require("src.functions.playerIndex")
|
|
46298
|
+
local getPlayerIndex = ____playerIndex.getPlayerIndex
|
|
46307
46299
|
local ____Feature = require("src.classes.private.Feature")
|
|
46308
46300
|
local Feature = ____Feature.Feature
|
|
46309
46301
|
____exports.PressInput = __TS__Class()
|
|
@@ -46312,18 +46304,36 @@ PressInput.name = "PressInput"
|
|
|
46312
46304
|
__TS__ClassExtends(PressInput, Feature)
|
|
46313
46305
|
function PressInput.prototype.____constructor(self)
|
|
46314
46306
|
Feature.prototype.____constructor(self)
|
|
46315
|
-
self.v = {run = {
|
|
46316
|
-
self.isActionTriggered = function(____,
|
|
46317
|
-
if
|
|
46307
|
+
self.v = {run = {buttonActionTuples = {}}}
|
|
46308
|
+
self.isActionTriggered = function(____, entity, _inputHook, buttonAction)
|
|
46309
|
+
if entity == nil then
|
|
46318
46310
|
return nil
|
|
46319
46311
|
end
|
|
46320
|
-
|
|
46321
|
-
|
|
46312
|
+
local player = entity:ToPlayer()
|
|
46313
|
+
if player == nil then
|
|
46314
|
+
return nil
|
|
46315
|
+
end
|
|
46316
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
46317
|
+
do
|
|
46318
|
+
local i = #self.v.run.buttonActionTuples - 1
|
|
46319
|
+
while i >= 0 do
|
|
46320
|
+
local tuple = self.v.run.buttonActionTuples[i + 1]
|
|
46321
|
+
local tuplePlayerIndex, tupleButtonAction = table.unpack(tuple)
|
|
46322
|
+
if tuplePlayerIndex == playerIndex and tupleButtonAction == buttonAction then
|
|
46323
|
+
__TS__ArraySplice(self.v.run.buttonActionTuples, i)
|
|
46324
|
+
return true
|
|
46325
|
+
end
|
|
46326
|
+
i = i - 1
|
|
46327
|
+
end
|
|
46328
|
+
end
|
|
46329
|
+
return nil
|
|
46322
46330
|
end
|
|
46323
46331
|
self.callbacksUsed = {{ModCallback.INPUT_ACTION, {self.isActionTriggered, InputHook.IS_ACTION_TRIGGERED}}}
|
|
46324
46332
|
end
|
|
46325
|
-
function PressInput.prototype.pressInput(self, buttonAction)
|
|
46326
|
-
|
|
46333
|
+
function PressInput.prototype.pressInput(self, player, buttonAction)
|
|
46334
|
+
local playerIndex = getPlayerIndex(nil, player)
|
|
46335
|
+
local ____self_v_run_buttonActionTuples_0 = self.v.run.buttonActionTuples
|
|
46336
|
+
____self_v_run_buttonActionTuples_0[#____self_v_run_buttonActionTuples_0 + 1] = {playerIndex, buttonAction}
|
|
46327
46337
|
end
|
|
46328
46338
|
__TS__Decorate({Exported}, PressInput.prototype, "pressInput", true)
|
|
46329
46339
|
return ____exports
|
|
@@ -46352,8 +46362,8 @@ function ForgottenSwitch.prototype.____constructor(self, pressInput)
|
|
|
46352
46362
|
self.featuresUsed = {ISCFeature.PRESS_INPUT}
|
|
46353
46363
|
self.pressInput = pressInput
|
|
46354
46364
|
end
|
|
46355
|
-
function ForgottenSwitch.prototype.forgottenSwitch(self)
|
|
46356
|
-
self.pressInput:pressInput(ButtonAction.DROP)
|
|
46365
|
+
function ForgottenSwitch.prototype.forgottenSwitch(self, player)
|
|
46366
|
+
self.pressInput:pressInput(player, ButtonAction.DROP)
|
|
46357
46367
|
end
|
|
46358
46368
|
__TS__Decorate({Exported}, ForgottenSwitch.prototype, "forgottenSwitch", true)
|
|
46359
46369
|
return ____exports
|
|
@@ -48747,7 +48757,7 @@ function ModUpgradedBase.prototype.AddCallback(self, modCallback, ...)
|
|
|
48747
48757
|
local callback = args[1]
|
|
48748
48758
|
local optionalArg = args[2]
|
|
48749
48759
|
local parentFunctionDescription = getParentFunctionDescription(nil)
|
|
48750
|
-
local callbackName = "ModCallback." ..
|
|
48760
|
+
local callbackName = "ModCallback." .. ModCallback[modCallback]
|
|
48751
48761
|
local signature = parentFunctionDescription == nil and callbackName or (parentFunctionDescription .. " - ") .. callbackName
|
|
48752
48762
|
local function callbackWithLogger(____, ...)
|
|
48753
48763
|
local startTime = getTime(nil)
|
package/dist/src/callbacks.d.ts
CHANGED
|
@@ -101,7 +101,7 @@ declare const MOD_CALLBACK_CUSTOM_TO_CLASS: {
|
|
|
101
101
|
readonly 98: typeof cc.PreNPCCollisionFilter;
|
|
102
102
|
readonly 99: typeof cc.PreNPCUpdateFilter;
|
|
103
103
|
};
|
|
104
|
-
export
|
|
104
|
+
export type ModCallbackCustomToClass = {
|
|
105
105
|
readonly [key in keyof typeof MOD_CALLBACK_CUSTOM_TO_CLASS]: InstanceType<typeof MOD_CALLBACK_CUSTOM_TO_CLASS[key]>;
|
|
106
106
|
};
|
|
107
107
|
export declare function getCallbacks(): ModCallbackCustomToClass;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../src/callbacks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAKxC,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkHvB,CAAC;AAEZ,
|
|
1
|
+
{"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../src/callbacks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAKxC,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkHvB,CAAC;AAEZ,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,GAAG,IAAI,MAAM,OAAO,4BAA4B,GAAG,YAAY,CACvE,OAAO,4BAA4B,CAAC,GAAG,CAAC,CACzC;CACF,CAAC;AAEF,wBAAgB,YAAY,IAAI,wBAAwB,CASvD"}
|
|
@@ -107,5 +107,5 @@ export declare class DefaultMap<Key, Value, Args extends unknown[] = []> extends
|
|
|
107
107
|
* A function that creates the default value for your `DefaultMap`. For example, if it was a
|
|
108
108
|
* `DefaultMap` containing maps, the factory function would be: `() => new Map()`
|
|
109
109
|
*/
|
|
110
|
-
export
|
|
110
|
+
export type FactoryFunction<V, Args extends unknown[]> = (...args: Args) => V;
|
|
111
111
|
//# sourceMappingURL=DefaultMap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultMap.d.ts","sourceRoot":"","sources":["../../../src/classes/DefaultMap.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AACH,qBAAa,UAAU,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,SAAS,OAAO,EAAE,GAAG,EAAE,CAAE,SAAQ,GAAG,CAC1E,GAAG,EACH,KAAK,CACN;IACC,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,mBAAmB,CAA2C;IAEtE;;;OAGG;gBAED,6BAA6B,EAAE,KAAK,GAAG,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,EACnE,gBAAgB,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAqB3C;;;OAGG;IACI,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK;IAWvD;;;OAGG;IACI,eAAe,CAAC,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK;IAY5C;;;OAGG;IACI,iBAAiB,IAAI,KAAK,GAAG,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC;CAWjE;AAGD;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"DefaultMap.d.ts","sourceRoot":"","sources":["../../../src/classes/DefaultMap.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgFG;AACH,qBAAa,UAAU,CAAC,GAAG,EAAE,KAAK,EAAE,IAAI,SAAS,OAAO,EAAE,GAAG,EAAE,CAAE,SAAQ,GAAG,CAC1E,GAAG,EACH,KAAK,CACN;IACC,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,mBAAmB,CAA2C;IAEtE;;;OAGG;gBAED,6BAA6B,EAAE,KAAK,GAAG,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC,EACnE,gBAAgB,CAAC,EAAE,QAAQ,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IAqB3C;;;OAGG;IACI,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK;IAWvD;;;OAGG;IACI,eAAe,CAAC,GAAG,IAAI,EAAE,IAAI,GAAG,KAAK;IAY5C;;;OAGG;IACI,iBAAiB,IAAI,KAAK,GAAG,eAAe,CAAC,KAAK,EAAE,IAAI,CAAC;CAWjE;AAGD;;;GAGG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,EAAE,IAAI,SAAS,OAAO,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,IAAI,KAAK,CAAC,CAAC"}
|
|
@@ -72,7 +72,7 @@ function ModUpgradedBase.prototype.AddCallback(self, modCallback, ...)
|
|
|
72
72
|
local callback = args[1]
|
|
73
73
|
local optionalArg = args[2]
|
|
74
74
|
local parentFunctionDescription = getParentFunctionDescription(nil)
|
|
75
|
-
local callbackName = "ModCallback." ..
|
|
75
|
+
local callbackName = "ModCallback." .. ModCallback[modCallback]
|
|
76
76
|
local signature = parentFunctionDescription == nil and callbackName or (parentFunctionDescription .. " - ") .. callbackName
|
|
77
77
|
--- We don't use the "log" helper function here since it will always show the same "unknown"
|
|
78
78
|
-- prefix.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CollectibleType } from "isaac-typescript-definitions";
|
|
2
2
|
import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
|
|
3
3
|
import { CustomCallback, OptionalArgs } from "../private/CustomCallback";
|
|
4
|
-
|
|
4
|
+
type T = ModCallbackCustom.POST_COLLECTIBLE_EMPTY;
|
|
5
5
|
export declare class PostCollectibleEmpty extends CustomCallback<T> {
|
|
6
6
|
v: {
|
|
7
7
|
room: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostCollectibleEmpty.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostCollectibleEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGhB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAC;AAEnC,
|
|
1
|
+
{"version":3,"file":"PostCollectibleEmpty.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostCollectibleEmpty.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGhB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAC;AAEnC,KAAK,CAAC,GAAG,iBAAiB,CAAC,sBAAsB,CAAC;AAElD,qBAAa,oBAAqB,SAAQ,cAAc,CAAC,CAAC,CAAC;IACzC,CAAC;;;;MAIf;;IAcF,UAAmB,UAAU,wGAEb,aAAa,CAAC,CAAC,KAC5B,OAAO,CAQR;IAIF,OAAO,CAAC,2BAA2B,CAajC;IAEF,OAAO,CAAC,sBAAsB;CAQ/B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
|
|
2
2
|
import { CustomCallback, OptionalArgs } from "../private/CustomCallback";
|
|
3
|
-
|
|
3
|
+
type T = ModCallbackCustom.POST_CUSTOM_REVIVE;
|
|
4
4
|
export declare class PostCustomRevive extends CustomCallback<ModCallbackCustom.POST_CUSTOM_REVIVE> {
|
|
5
5
|
constructor();
|
|
6
6
|
protected shouldFire: (fireArgs: [player: EntityPlayer, revivalType: number], optionalArgs: OptionalArgs<T>) => boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostCustomRevive.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostCustomRevive.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAC;AAEnC,
|
|
1
|
+
{"version":3,"file":"PostCustomRevive.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostCustomRevive.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAC;AAEnC,KAAK,CAAC,GAAG,iBAAiB,CAAC,kBAAkB,CAAC;AAE9C,qBAAa,gBAAiB,SAAQ,cAAc,CAAC,iBAAiB,CAAC,kBAAkB,CAAC;;IAQxF,UAAmB,UAAU,wEAEb,aAAa,CAAC,CAAC,KAC5B,OAAO,CAOR;CACH"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DiceFloorSubType } from "isaac-typescript-definitions";
|
|
2
2
|
import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
|
|
3
3
|
import { CustomCallback, OptionalArgs } from "../private/CustomCallback";
|
|
4
|
-
|
|
4
|
+
type T = ModCallbackCustom.POST_DICE_ROOM_ACTIVATED;
|
|
5
5
|
export declare class PostDiceRoomActivated extends CustomCallback<T> {
|
|
6
6
|
v: {
|
|
7
7
|
room: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostDiceRoomActivated.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostDiceRoomActivated.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAGjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGlE,OAAO,EACL,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAC;AAEnC,
|
|
1
|
+
{"version":3,"file":"PostDiceRoomActivated.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/PostDiceRoomActivated.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAGjB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAGlE,OAAO,EACL,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAC;AAEnC,KAAK,CAAC,GAAG,iBAAiB,CAAC,wBAAwB,CAAC;AAEpD,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,CAAC,CAAC;IAC1C,CAAC;;;;MAIf;;IAcF,UAAmB,UAAU,uFAEb,aAAa,CAAC,CAAC,KAC5B,OAAO,CAQR;IAIF,OAAO,CAAC,yBAAyB,CAgB/B;CACH"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
|
|
2
2
|
import { CustomCallback } from "../private/CustomCallback";
|
|
3
|
-
|
|
3
|
+
type T = ModCallbackCustom.POST_GRID_ENTITY_COLLISION;
|
|
4
4
|
export declare class PostGridEntityCollision extends CustomCallback<T> {
|
|
5
5
|
constructor();
|
|
6
6
|
protected shouldFire: (fireArgs: [gridEntity: GridEntity, entity: Entity], optionalArgs: [gridEntityType?: import("isaac-typescript-definitions").GridEntityType | undefined, gridEntityVariant?: number | undefined, entityType?: import("isaac-typescript-definitions").EntityType | undefined, entityVariant?: number | undefined, entitySubType?: number | undefined]) => boolean;
|