isaacscript-common 18.2.1 → 18.3.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/index.d.ts +154 -99
- package/dist/isaacscript-common.lua +176 -100
- package/dist/src/callbackClasses.d.ts +2 -0
- package/dist/src/callbackClasses.d.ts.map +1 -1
- package/dist/src/callbackClasses.lua +10 -0
- package/dist/src/callbacks.d.ts +101 -99
- package/dist/src/callbacks.d.ts.map +1 -1
- package/dist/src/callbacks.lua +2 -0
- package/dist/src/classes/callbacks/InputActionFilter.d.ts +11 -0
- package/dist/src/classes/callbacks/InputActionFilter.d.ts.map +1 -0
- package/dist/src/classes/callbacks/InputActionFilter.lua +23 -0
- package/dist/src/classes/callbacks/InputActionPlayer.d.ts +11 -0
- package/dist/src/classes/callbacks/InputActionPlayer.d.ts.map +1 -0
- package/dist/src/classes/callbacks/InputActionPlayer.lua +33 -0
- package/dist/src/enums/ModCallbackCustom.d.ts +141 -99
- package/dist/src/enums/ModCallbackCustom.d.ts.map +1 -1
- package/dist/src/enums/ModCallbackCustom.lua +103 -99
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts +13 -1
- package/dist/src/interfaces/private/AddCallbackParametersCustom.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/callbackClasses.ts +2 -0
- package/src/callbacks.ts +2 -0
- package/src/classes/callbacks/InputActionFilter.ts +46 -0
- package/src/classes/callbacks/InputActionPlayer.ts +67 -0
- package/src/enums/ModCallbackCustom.ts +44 -0
- package/src/interfaces/private/AddCallbackParametersCustom.ts +24 -0
package/dist/src/callbacks.d.ts
CHANGED
|
@@ -2,105 +2,107 @@ import * as cc from "./callbackClasses";
|
|
|
2
2
|
declare const MOD_CALLBACK_CUSTOM_TO_CLASS: {
|
|
3
3
|
readonly 0: typeof cc.EntityTakeDmgFilter;
|
|
4
4
|
readonly 1: typeof cc.EntityTakeDmgPlayer;
|
|
5
|
-
readonly 2: typeof cc.
|
|
6
|
-
readonly 3: typeof cc.
|
|
7
|
-
readonly 4: typeof cc.
|
|
8
|
-
readonly 5: typeof cc.
|
|
9
|
-
readonly 6: typeof cc.
|
|
10
|
-
readonly 7: typeof cc.
|
|
11
|
-
readonly 8: typeof cc.
|
|
12
|
-
readonly 9: typeof cc.
|
|
13
|
-
readonly 10: typeof cc.
|
|
14
|
-
readonly 11: typeof cc.
|
|
15
|
-
readonly 12: typeof cc.
|
|
16
|
-
readonly 13: typeof cc.
|
|
17
|
-
readonly 14: typeof cc.
|
|
18
|
-
readonly 15: typeof cc.
|
|
19
|
-
readonly 16: typeof cc.
|
|
20
|
-
readonly 17: typeof cc.
|
|
21
|
-
readonly 18: typeof cc.
|
|
22
|
-
readonly
|
|
23
|
-
readonly
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly 23: typeof cc.
|
|
27
|
-
readonly 24: typeof cc.
|
|
28
|
-
readonly 25: typeof cc.
|
|
29
|
-
readonly 26: typeof cc.
|
|
30
|
-
readonly 27: typeof cc.
|
|
31
|
-
readonly 28: typeof cc.
|
|
32
|
-
readonly 29: typeof cc.
|
|
33
|
-
readonly 30: typeof cc.
|
|
34
|
-
readonly 31: typeof cc.
|
|
35
|
-
readonly 32: typeof cc.
|
|
36
|
-
readonly 33: typeof cc.
|
|
37
|
-
readonly 34: typeof cc.
|
|
38
|
-
readonly 35: typeof cc.
|
|
39
|
-
readonly 36: typeof cc.
|
|
40
|
-
readonly 37: typeof cc.
|
|
41
|
-
readonly 38: typeof cc.
|
|
42
|
-
readonly 39: typeof cc.
|
|
43
|
-
readonly 40: typeof cc.
|
|
44
|
-
readonly 41: typeof cc.
|
|
45
|
-
readonly 42: typeof cc.
|
|
46
|
-
readonly 43: typeof cc.
|
|
47
|
-
readonly 44: typeof cc.
|
|
48
|
-
readonly 45: typeof cc.
|
|
49
|
-
readonly 46: typeof cc.
|
|
50
|
-
readonly 47: typeof cc.
|
|
51
|
-
readonly 48: typeof cc.
|
|
52
|
-
readonly 49: typeof cc.
|
|
53
|
-
readonly 50: typeof cc.
|
|
54
|
-
readonly 51: typeof cc.
|
|
55
|
-
readonly 52: typeof cc.
|
|
56
|
-
readonly 53: typeof cc.
|
|
57
|
-
readonly 54: typeof cc.
|
|
58
|
-
readonly 55: typeof cc.
|
|
59
|
-
readonly 56: typeof cc.
|
|
60
|
-
readonly 57: typeof cc.
|
|
61
|
-
readonly 58: typeof cc.
|
|
62
|
-
readonly 59: typeof cc.
|
|
63
|
-
readonly 60: typeof cc.
|
|
64
|
-
readonly 61: typeof cc.
|
|
65
|
-
readonly 62: typeof cc.
|
|
66
|
-
readonly 63: typeof cc.
|
|
67
|
-
readonly 64: typeof cc.
|
|
68
|
-
readonly 65: typeof cc.
|
|
69
|
-
readonly 66: typeof cc.
|
|
70
|
-
readonly 67: typeof cc.
|
|
71
|
-
readonly 68: typeof cc.
|
|
72
|
-
readonly 69: typeof cc.
|
|
73
|
-
readonly 70: typeof cc.
|
|
74
|
-
readonly 71: typeof cc.
|
|
75
|
-
readonly 72: typeof cc.
|
|
76
|
-
readonly 73: typeof cc.
|
|
77
|
-
readonly 74: typeof cc.
|
|
78
|
-
readonly 75: typeof cc.
|
|
79
|
-
readonly 76: typeof cc.
|
|
80
|
-
readonly 77: typeof cc.
|
|
81
|
-
readonly 78: typeof cc.
|
|
82
|
-
readonly 79: typeof cc.
|
|
83
|
-
readonly 80: typeof cc.
|
|
84
|
-
readonly 81: typeof cc.
|
|
85
|
-
readonly 82: typeof cc.
|
|
86
|
-
readonly 83: typeof cc.
|
|
87
|
-
readonly 84: typeof cc.
|
|
88
|
-
readonly 85: typeof cc.
|
|
89
|
-
readonly 86: typeof cc.
|
|
90
|
-
readonly 87: typeof cc.
|
|
91
|
-
readonly 88: typeof cc.
|
|
92
|
-
readonly 89: typeof cc.
|
|
93
|
-
readonly 90: typeof cc.
|
|
94
|
-
readonly 91: typeof cc.
|
|
95
|
-
readonly 92: typeof cc.
|
|
96
|
-
readonly 93: typeof cc.
|
|
97
|
-
readonly 94: typeof cc.
|
|
98
|
-
readonly 95: typeof cc.
|
|
99
|
-
readonly 96: typeof cc.
|
|
100
|
-
readonly 97: typeof cc.
|
|
101
|
-
readonly 98: typeof cc.
|
|
102
|
-
readonly 99: typeof cc.
|
|
103
|
-
readonly 100: typeof cc.
|
|
5
|
+
readonly 2: typeof cc.InputActionFilter;
|
|
6
|
+
readonly 3: typeof cc.InputActionPlayer;
|
|
7
|
+
readonly 4: typeof cc.PostAmbushFinished;
|
|
8
|
+
readonly 5: typeof cc.PostAmbushStarted;
|
|
9
|
+
readonly 6: typeof cc.PostBombExploded;
|
|
10
|
+
readonly 7: typeof cc.PostBombInitLate;
|
|
11
|
+
readonly 8: typeof cc.PostBoneSwing;
|
|
12
|
+
readonly 9: typeof cc.PostCollectibleEmpty;
|
|
13
|
+
readonly 10: typeof cc.PostCollectibleInitFirst;
|
|
14
|
+
readonly 11: typeof cc.PostCursedTeleport;
|
|
15
|
+
readonly 12: typeof cc.PostCustomRevive;
|
|
16
|
+
readonly 13: typeof cc.PostDiceRoomActivated;
|
|
17
|
+
readonly 14: typeof cc.PostDoorRender;
|
|
18
|
+
readonly 15: typeof cc.PostDoorUpdate;
|
|
19
|
+
readonly 16: typeof cc.PostEffectInitLate;
|
|
20
|
+
readonly 17: typeof cc.PostEffectStateChanged;
|
|
21
|
+
readonly 18: typeof cc.PostEsauJr;
|
|
22
|
+
readonly 19: typeof cc.PostFamiliarInitLate;
|
|
23
|
+
readonly 20: typeof cc.PostFamiliarStateChanged;
|
|
24
|
+
readonly 22: typeof cc.PostFirstFlip;
|
|
25
|
+
readonly 21: typeof cc.PostFirstEsauJr;
|
|
26
|
+
readonly 23: typeof cc.PostFlip;
|
|
27
|
+
readonly 24: typeof cc.PostGameStartedReordered;
|
|
28
|
+
readonly 25: typeof cc.PostGameStartedReorderedLast;
|
|
29
|
+
readonly 26: typeof cc.PostGreedModeWave;
|
|
30
|
+
readonly 27: typeof cc.PostGridEntityBroken;
|
|
31
|
+
readonly 28: typeof cc.PostGridEntityCollision;
|
|
32
|
+
readonly 29: typeof cc.PostGridEntityCustomBroken;
|
|
33
|
+
readonly 30: typeof cc.PostGridEntityCustomCollision;
|
|
34
|
+
readonly 31: typeof cc.PostGridEntityCustomInit;
|
|
35
|
+
readonly 32: typeof cc.PostGridEntityCustomRemove;
|
|
36
|
+
readonly 33: typeof cc.PostGridEntityCustomRender;
|
|
37
|
+
readonly 34: typeof cc.PostGridEntityCustomStateChanged;
|
|
38
|
+
readonly 35: typeof cc.PostGridEntityCustomUpdate;
|
|
39
|
+
readonly 36: typeof cc.PostGridEntityInit;
|
|
40
|
+
readonly 37: typeof cc.PostGridEntityRemove;
|
|
41
|
+
readonly 38: typeof cc.PostGridEntityRender;
|
|
42
|
+
readonly 39: typeof cc.PostGridEntityStateChanged;
|
|
43
|
+
readonly 40: typeof cc.PostGridEntityUpdate;
|
|
44
|
+
readonly 41: typeof cc.PostHolyMantleRemoved;
|
|
45
|
+
readonly 42: typeof cc.PostItemDischarge;
|
|
46
|
+
readonly 43: typeof cc.PostItemPickup;
|
|
47
|
+
readonly 44: typeof cc.PostKnifeInitLate;
|
|
48
|
+
readonly 45: typeof cc.PostLaserInitLate;
|
|
49
|
+
readonly 46: typeof cc.PostNewLevelReordered;
|
|
50
|
+
readonly 47: typeof cc.PostNewRoomEarly;
|
|
51
|
+
readonly 48: typeof cc.PostNewRoomReordered;
|
|
52
|
+
readonly 49: typeof cc.PostNPCDeathFilter;
|
|
53
|
+
readonly 50: typeof cc.PostNPCInitFilter;
|
|
54
|
+
readonly 51: typeof cc.PostNPCInitLate;
|
|
55
|
+
readonly 52: typeof cc.PostNPCRenderFilter;
|
|
56
|
+
readonly 53: typeof cc.PostNPCStateChanged;
|
|
57
|
+
readonly 54: typeof cc.PostNPCUpdateFilter;
|
|
58
|
+
readonly 55: typeof cc.PostPEffectUpdateReordered;
|
|
59
|
+
readonly 56: typeof cc.PostPickupCollect;
|
|
60
|
+
readonly 57: typeof cc.PostPickupInitFirst;
|
|
61
|
+
readonly 58: typeof cc.PostPickupInitLate;
|
|
62
|
+
readonly 59: typeof cc.PostPickupStateChanged;
|
|
63
|
+
readonly 60: typeof cc.PostPitRender;
|
|
64
|
+
readonly 61: typeof cc.PostPitUpdate;
|
|
65
|
+
readonly 62: typeof cc.PostPlayerChangeHealth;
|
|
66
|
+
readonly 63: typeof cc.PostPlayerChangeStat;
|
|
67
|
+
readonly 64: typeof cc.PostPlayerChangeType;
|
|
68
|
+
readonly 65: typeof cc.PostPlayerCollectibleAdded;
|
|
69
|
+
readonly 66: typeof cc.PostPlayerCollectibleRemoved;
|
|
70
|
+
readonly 67: typeof cc.PostPlayerFatalDamage;
|
|
71
|
+
readonly 68: typeof cc.PostPlayerInitFirst;
|
|
72
|
+
readonly 69: typeof cc.PostPlayerInitLate;
|
|
73
|
+
readonly 70: typeof cc.PostPlayerRenderReordered;
|
|
74
|
+
readonly 71: typeof cc.PostPlayerUpdateReordered;
|
|
75
|
+
readonly 72: typeof cc.PostPoopRender;
|
|
76
|
+
readonly 73: typeof cc.PostPoopUpdate;
|
|
77
|
+
readonly 74: typeof cc.PostPressurePlateRender;
|
|
78
|
+
readonly 75: typeof cc.PostPressurePlateUpdate;
|
|
79
|
+
readonly 76: typeof cc.PostProjectileInitLate;
|
|
80
|
+
readonly 77: typeof cc.PostPurchase;
|
|
81
|
+
readonly 78: typeof cc.PostRockRender;
|
|
82
|
+
readonly 79: typeof cc.PostRockUpdate;
|
|
83
|
+
readonly 80: typeof cc.PostRoomClearChanged;
|
|
84
|
+
readonly 81: typeof cc.PostSacrifice;
|
|
85
|
+
readonly 82: typeof cc.PostSlotAnimationChanged;
|
|
86
|
+
readonly 83: typeof cc.PostSlotCollision;
|
|
87
|
+
readonly 84: typeof cc.PostSlotDestroyed;
|
|
88
|
+
readonly 85: typeof cc.PostSlotInit;
|
|
89
|
+
readonly 86: typeof cc.PostSlotRender;
|
|
90
|
+
readonly 87: typeof cc.PostSlotUpdate;
|
|
91
|
+
readonly 88: typeof cc.PostSpikesRender;
|
|
92
|
+
readonly 89: typeof cc.PostSpikesUpdate;
|
|
93
|
+
readonly 90: typeof cc.PostTearInitLate;
|
|
94
|
+
readonly 91: typeof cc.PostTearInitVeryLate;
|
|
95
|
+
readonly 92: typeof cc.PostTNTRender;
|
|
96
|
+
readonly 93: typeof cc.PostTNTUpdate;
|
|
97
|
+
readonly 94: typeof cc.PostTransformation;
|
|
98
|
+
readonly 95: typeof cc.PostTrinketBreak;
|
|
99
|
+
readonly 96: typeof cc.PreBerserkDeath;
|
|
100
|
+
readonly 97: typeof cc.PreCustomRevive;
|
|
101
|
+
readonly 98: typeof cc.PreGetPedestal;
|
|
102
|
+
readonly 99: typeof cc.PreItemPickup;
|
|
103
|
+
readonly 100: typeof cc.PreNewLevel;
|
|
104
|
+
readonly 101: typeof cc.PreNPCCollisionFilter;
|
|
105
|
+
readonly 102: typeof cc.PreNPCUpdateFilter;
|
|
104
106
|
};
|
|
105
107
|
export type ModCallbackCustomToClass = {
|
|
106
108
|
readonly [Key in keyof typeof MOD_CALLBACK_CUSTOM_TO_CLASS]: InstanceType<(typeof MOD_CALLBACK_CUSTOM_TO_CLASS)[Key]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../src/callbacks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAMxC,QAAA,MAAM,4BAA4B
|
|
1
|
+
{"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../src/callbacks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAMxC,QAAA,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqH8B,CAAC;AAEjE,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,GAAG,IAAI,MAAM,OAAO,4BAA4B,GAAG,YAAY,CACvE,CAAC,OAAO,4BAA4B,CAAC,CAAC,GAAG,CAAC,CAC3C;CACF,CAAC;AAEF,wBAAgB,YAAY,IAAI,wBAAwB,CASvD"}
|
package/dist/src/callbacks.lua
CHANGED
|
@@ -9,6 +9,8 @@ local getEnumValues = ____enums.getEnumValues
|
|
|
9
9
|
local MOD_CALLBACK_CUSTOM_TO_CLASS = {
|
|
10
10
|
[ModCallbackCustom.ENTITY_TAKE_DMG_FILTER] = cc.EntityTakeDmgFilter,
|
|
11
11
|
[ModCallbackCustom.ENTITY_TAKE_DMG_PLAYER] = cc.EntityTakeDmgPlayer,
|
|
12
|
+
[ModCallbackCustom.INPUT_ACTION_FILTER] = cc.InputActionFilter,
|
|
13
|
+
[ModCallbackCustom.INPUT_ACTION_PLAYER] = cc.InputActionPlayer,
|
|
12
14
|
[ModCallbackCustom.POST_AMBUSH_FINISHED] = cc.PostAmbushFinished,
|
|
13
15
|
[ModCallbackCustom.POST_AMBUSH_STARTED] = cc.PostAmbushStarted,
|
|
14
16
|
[ModCallbackCustom.POST_BOMB_EXPLODED] = cc.PostBombExploded,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ButtonAction, InputHook } from "isaac-typescript-definitions";
|
|
2
|
+
import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
|
|
3
|
+
import { CustomCallback } from "../private/CustomCallback";
|
|
4
|
+
type T = ModCallbackCustom.INPUT_ACTION_FILTER;
|
|
5
|
+
export declare class InputActionFilter extends CustomCallback<T> {
|
|
6
|
+
constructor();
|
|
7
|
+
protected shouldFire: (fireArgs: [entity: Entity | undefined, inputHook: InputHook, buttonAction: ButtonAction], optionalArgs: [inputHook?: InputHook | undefined, buttonAction?: ButtonAction | undefined]) => boolean;
|
|
8
|
+
private inputAction;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=InputActionFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputActionFilter.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/InputActionFilter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,SAAS,EAEV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,cAAc,EAGf,MAAM,2BAA2B,CAAC;AAEnC,KAAK,CAAC,GAAG,iBAAiB,CAAC,mBAAmB,CAAC;AAE/C,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,CAAC,CAAC;;IAWtD,UAAmB,UAAU,4LAG1B,OAAO,CASR;IAGF,OAAO,CAAC,WAAW,CAI0D;CAC9E"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
7
|
+
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
8
|
+
local CustomCallback = ____CustomCallback.CustomCallback
|
|
9
|
+
____exports.InputActionFilter = __TS__Class()
|
|
10
|
+
local InputActionFilter = ____exports.InputActionFilter
|
|
11
|
+
InputActionFilter.name = "InputActionFilter"
|
|
12
|
+
__TS__ClassExtends(InputActionFilter, CustomCallback)
|
|
13
|
+
function InputActionFilter.prototype.____constructor(self)
|
|
14
|
+
CustomCallback.prototype.____constructor(self)
|
|
15
|
+
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
16
|
+
local _, inputHook, buttonAction = table.unpack(fireArgs)
|
|
17
|
+
local callbackInputHook, callbackButtonAction = table.unpack(optionalArgs)
|
|
18
|
+
return (callbackInputHook == nil or callbackInputHook == inputHook) and (callbackButtonAction == nil or callbackButtonAction == buttonAction)
|
|
19
|
+
end
|
|
20
|
+
self.inputAction = function(____, entity, inputHook, buttonAction) return self:fire(entity, inputHook, buttonAction) end
|
|
21
|
+
self.callbacksUsed = {{ModCallback.INPUT_ACTION, {self.inputAction}}}
|
|
22
|
+
end
|
|
23
|
+
return ____exports
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ButtonAction, InputHook } from "isaac-typescript-definitions";
|
|
2
|
+
import { ModCallbackCustom } from "../../enums/ModCallbackCustom";
|
|
3
|
+
import { CustomCallback } from "../private/CustomCallback";
|
|
4
|
+
type T = ModCallbackCustom.INPUT_ACTION_PLAYER;
|
|
5
|
+
export declare class InputActionPlayer extends CustomCallback<T> {
|
|
6
|
+
constructor();
|
|
7
|
+
protected shouldFire: (fireArgs: [player: EntityPlayer, inputHook: InputHook, buttonAction: ButtonAction], optionalArgs: [playerVariant?: import("isaac-typescript-definitions").PlayerVariant | undefined, character?: import("isaac-typescript-definitions").PlayerType | undefined, inputHook?: InputHook | undefined, buttonAction?: ButtonAction | undefined]) => boolean;
|
|
8
|
+
private inputAction;
|
|
9
|
+
}
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=InputActionPlayer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputActionPlayer.d.ts","sourceRoot":"","sources":["../../../../src/classes/callbacks/InputActionPlayer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,SAAS,EAEV,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EACL,cAAc,EAGf,MAAM,2BAA2B,CAAC;AAEnC,KAAK,CAAC,GAAG,iBAAiB,CAAC,mBAAmB,CAAC;AAE/C,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,CAAC,CAAC;;IAWtD,UAAmB,UAAU,mVAG1B,OAAO,CAmBR;IAGF,OAAO,CAAC,WAAW,CAejB;CACH"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
6
|
+
local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
7
|
+
local ____CustomCallback = require("src.classes.private.CustomCallback")
|
|
8
|
+
local CustomCallback = ____CustomCallback.CustomCallback
|
|
9
|
+
____exports.InputActionPlayer = __TS__Class()
|
|
10
|
+
local InputActionPlayer = ____exports.InputActionPlayer
|
|
11
|
+
InputActionPlayer.name = "InputActionPlayer"
|
|
12
|
+
__TS__ClassExtends(InputActionPlayer, CustomCallback)
|
|
13
|
+
function InputActionPlayer.prototype.____constructor(self)
|
|
14
|
+
CustomCallback.prototype.____constructor(self)
|
|
15
|
+
self.shouldFire = function(____, fireArgs, optionalArgs)
|
|
16
|
+
local player, inputHook, buttonAction = table.unpack(fireArgs)
|
|
17
|
+
local callbackPlayerVariant, callbackCharacter, callbackInputHook, callbackButtonAction = table.unpack(optionalArgs)
|
|
18
|
+
local character = player:GetPlayerType()
|
|
19
|
+
return (callbackPlayerVariant == nil or callbackPlayerVariant == player.Variant) and (callbackCharacter == nil or callbackCharacter == character) and (callbackInputHook == nil or callbackInputHook == inputHook) and (callbackButtonAction == nil or callbackButtonAction == buttonAction)
|
|
20
|
+
end
|
|
21
|
+
self.inputAction = function(____, entity, inputHook, buttonAction)
|
|
22
|
+
if entity == nil then
|
|
23
|
+
return nil
|
|
24
|
+
end
|
|
25
|
+
local player = entity:ToPlayer()
|
|
26
|
+
if player == nil then
|
|
27
|
+
return nil
|
|
28
|
+
end
|
|
29
|
+
return self:fire(player, inputHook, buttonAction)
|
|
30
|
+
end
|
|
31
|
+
self.callbacksUsed = {{ModCallback.INPUT_ACTION, {self.inputAction}}}
|
|
32
|
+
end
|
|
33
|
+
return ____exports
|