isaacscript-common 31.6.0 → 31.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.rollup.d.ts +12 -2
- package/dist/isaacscript-common.lua +16 -11
- package/dist/src/classes/DefaultMap.d.ts +2 -0
- package/dist/src/classes/DefaultMap.d.ts.map +1 -1
- package/dist/src/classes/ModUpgraded.d.ts.map +1 -1
- package/dist/src/classes/features/other/DisableInputs.d.ts.map +1 -1
- package/dist/src/classes/features/other/DisableInputs.lua +4 -6
- package/dist/src/functions/decorators.d.ts +4 -0
- package/dist/src/functions/decorators.d.ts.map +1 -1
- package/dist/src/functions/decorators.lua +4 -0
- package/dist/src/functions/input.d.ts +2 -2
- package/dist/src/functions/input.d.ts.map +1 -1
- package/dist/src/functions/input.lua +11 -4
- package/dist/src/functions/playerDataStructures.d.ts +2 -0
- package/dist/src/functions/playerDataStructures.d.ts.map +1 -1
- package/dist/src/functions/playerDataStructures.lua +2 -0
- package/dist/src/functions/sprites.d.ts +2 -0
- package/dist/src/functions/sprites.d.ts.map +1 -1
- package/dist/src/functions/sprites.lua +2 -0
- package/package.json +1 -1
- package/src/classes/DefaultMap.ts +2 -0
- package/src/classes/ModUpgraded.ts +1 -0
- package/src/classes/features/other/DisableInputs.ts +6 -5
- package/src/functions/decorators.ts +4 -0
- package/src/functions/input.ts +12 -4
- package/src/functions/playerDataStructures.ts +2 -0
- package/src/functions/sprites.ts +2 -0
package/dist/index.rollup.d.ts
CHANGED
|
@@ -1285,6 +1285,7 @@ export declare function calculateStageTypeRepentance(stage: LevelStage): StageTy
|
|
|
1285
1285
|
* A decorator function that signifies that the decorated class method should be automatically
|
|
1286
1286
|
* registered with `Mod.AddCallback`.
|
|
1287
1287
|
*
|
|
1288
|
+
* @allowEmptyVariadic
|
|
1288
1289
|
* @ignore
|
|
1289
1290
|
*/
|
|
1290
1291
|
export declare function Callback<T extends ModCallback>(modCallback: T, ...optionalArgs: AllButFirst<AddCallbackParameters[T]>): <Class extends ModFeature, Fn extends AddCallbackParameters[T][0]>(target: Class, propertyKey: string, _descriptor: TypedPropertyDescriptor<Fn>) => void;
|
|
@@ -1293,6 +1294,7 @@ export declare function Callback<T extends ModCallback>(modCallback: T, ...optio
|
|
|
1293
1294
|
* A decorator function that signifies that the decorated class method should be automatically
|
|
1294
1295
|
* registered with `ModUpgraded.AddCallbackCustom`.
|
|
1295
1296
|
*
|
|
1297
|
+
* @allowEmptyVariadic
|
|
1296
1298
|
* @ignore
|
|
1297
1299
|
*/
|
|
1298
1300
|
export declare function CallbackCustom<T extends ModCallbackCustom>(modCallbackCustom: T, ...optionalArgs: AllButFirst<AddCallbackParametersCustom[T]>): <Class extends ModFeature, Fn extends AddCallbackParametersCustom[T][0]>(target: Class, propertyKey: string, _descriptor: TypedPropertyDescriptor<Fn>) => void;
|
|
@@ -1540,6 +1542,8 @@ export declare function clearRoomDisplayFlags(roomGridIndex: int): void;
|
|
|
1540
1542
|
* This function will still work identically if PNG file does not exist, but it will cause a
|
|
1541
1543
|
* spurious error to appear in the "log.txt" file. If silencing these errors is desired, you can
|
|
1542
1544
|
* create a transparent 1 pixel PNG file in your mod's resources folder at `EMPTY_PNG_PATH`.
|
|
1545
|
+
*
|
|
1546
|
+
* @allowEmptyVariadic
|
|
1543
1547
|
*/
|
|
1544
1548
|
export declare function clearSprite(sprite: Sprite, ...layerIDs: int[]): void;
|
|
1545
1549
|
|
|
@@ -3357,6 +3361,8 @@ export declare class DefaultMap<Key, Value, Args extends unknown[] = []> extends
|
|
|
3357
3361
|
/**
|
|
3358
3362
|
* If the key exists, this will return the same thing as the normal `Map.get` method. Otherwise,
|
|
3359
3363
|
* it will set a default value for the provided key, and then return the default value.
|
|
3364
|
+
*
|
|
3365
|
+
* @allowEmptyVariadic
|
|
3360
3366
|
*/
|
|
3361
3367
|
getAndSetDefault(key: Key, ...args: Args): Value;
|
|
3362
3368
|
/**
|
|
@@ -3420,6 +3426,8 @@ export declare function defaultMapGetNPC<V, Args extends unknown[]>(map: Default
|
|
|
3420
3426
|
* player.MoveSpeed = defaultMapGetPlayer(v.run.playersSpeedBoost, player);
|
|
3421
3427
|
* }
|
|
3422
3428
|
* ```
|
|
3429
|
+
*
|
|
3430
|
+
* @allowEmptyVariadic
|
|
3423
3431
|
*/
|
|
3424
3432
|
export declare function defaultMapGetPlayer<V, Args extends unknown[]>(map: DefaultMap<PlayerIndex, V, Args>, player: EntityPlayer, ...extraArgs: Args): V;
|
|
3425
3433
|
|
|
@@ -5686,7 +5694,7 @@ export declare function getMapPartialMatch<T>(searchText: string, map: ReadonlyM
|
|
|
5686
5694
|
*/
|
|
5687
5695
|
export declare function getMatchingGridEntities(gridEntityType: GridEntityType, variant: int): GridEntity[];
|
|
5688
5696
|
|
|
5689
|
-
export declare function getMoveActions():
|
|
5697
|
+
export declare function getMoveActions(controllerIndex: ControllerIndex): ButtonAction[];
|
|
5690
5698
|
|
|
5691
5699
|
/**
|
|
5692
5700
|
* Helper function to get the corresponding music value for a stage and stage type combination.
|
|
@@ -6931,7 +6939,7 @@ export declare function getScreenTopRightPos(): Readonly<Vector>;
|
|
|
6931
6939
|
*/
|
|
6932
6940
|
export declare function getSetCombinations<T>(set: Set<T> | ReadonlySet<T>, includeEmptyArray: boolean): ReadonlyArray<ReadonlySet<T>>;
|
|
6933
6941
|
|
|
6934
|
-
export declare function getShootActions():
|
|
6942
|
+
export declare function getShootActions(controllerIndex: ControllerIndex): ButtonAction[];
|
|
6935
6943
|
|
|
6936
6944
|
/**
|
|
6937
6945
|
* Helper function to get the corresponding "Siren Helper" entity for a stolen familiar.
|
|
@@ -14227,6 +14235,7 @@ export declare function printEnabled(enabled: boolean, description: string): voi
|
|
|
14227
14235
|
* A decorator function that signifies that the decorated class method should be automatically
|
|
14228
14236
|
* registered with `Mod.AddPriorityCallback`.
|
|
14229
14237
|
*
|
|
14238
|
+
* @allowEmptyVariadic
|
|
14230
14239
|
* @ignore
|
|
14231
14240
|
*/
|
|
14232
14241
|
export declare function PriorityCallback<T extends ModCallback>(modCallback: T, priority: CallbackPriority | int, ...optionalArgs: AllButFirst<AddCallbackParameters[T]>): <Class extends ModFeature, Fn extends AddCallbackParameters[T][0]>(target: Class, propertyKey: string, _descriptor: TypedPropertyDescriptor<Fn>) => void;
|
|
@@ -14235,6 +14244,7 @@ export declare function PriorityCallback<T extends ModCallback>(modCallback: T,
|
|
|
14235
14244
|
* A decorator function that signifies that the decorated class method should be automatically
|
|
14236
14245
|
* registered with `ModUpgraded.AddCallbackCustom`.
|
|
14237
14246
|
*
|
|
14247
|
+
* @allowEmptyVariadic
|
|
14238
14248
|
* @ignore
|
|
14239
14249
|
*/
|
|
14240
14250
|
export declare function PriorityCallbackCustom<T extends ModCallbackCustom>(modCallbackCustom: T, priority: CallbackPriority | int, ...optionalArgs: AllButFirst<AddCallbackParametersCustom[T]>): <Class extends ModFeature, Fn extends AddCallbackParametersCustom[T][0]>(target: Class, propertyKey: string, _descriptor: TypedPropertyDescriptor<Fn>) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 31.
|
|
3
|
+
isaacscript-common 31.7.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -25735,6 +25735,7 @@ return ____exports
|
|
|
25735
25735
|
["src.functions.input"] = function(...)
|
|
25736
25736
|
local ____lualib = require("lualib_bundle")
|
|
25737
25737
|
local __TS__New = ____lualib.__TS__New
|
|
25738
|
+
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
25738
25739
|
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
25739
25740
|
local ____exports = {}
|
|
25740
25741
|
local ____isaac_2Dtypescript_2Ddefinitions = require("lua_modules.isaac-typescript-definitions.dist.src.index")
|
|
@@ -25771,11 +25772,17 @@ function ____exports.controllerToString(self, controller)
|
|
|
25771
25772
|
end
|
|
25772
25773
|
return trimPrefix(nil, key, "BUTTON_")
|
|
25773
25774
|
end
|
|
25774
|
-
function ____exports.getMoveActions(self)
|
|
25775
|
-
return
|
|
25775
|
+
function ____exports.getMoveActions(self, controllerIndex)
|
|
25776
|
+
return __TS__ArrayFilter(
|
|
25777
|
+
____exports.MOVEMENT_ACTIONS,
|
|
25778
|
+
function(____, buttonAction) return Input.IsActionPressed(buttonAction, controllerIndex) end
|
|
25779
|
+
)
|
|
25776
25780
|
end
|
|
25777
|
-
function ____exports.getShootActions(self)
|
|
25778
|
-
return
|
|
25781
|
+
function ____exports.getShootActions(self, controllerIndex)
|
|
25782
|
+
return __TS__ArrayFilter(
|
|
25783
|
+
____exports.SHOOTING_ACTIONS,
|
|
25784
|
+
function(____, buttonAction) return Input.IsActionPressed(buttonAction, controllerIndex) end
|
|
25785
|
+
)
|
|
25779
25786
|
end
|
|
25780
25787
|
function ____exports.isActionPressed(self, controllerIndex, ...)
|
|
25781
25788
|
local buttonActions = {...}
|
|
@@ -40900,8 +40907,8 @@ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
|
40900
40907
|
local ____decorators = require("src.decorators")
|
|
40901
40908
|
local Exported = ____decorators.Exported
|
|
40902
40909
|
local ____input = require("src.functions.input")
|
|
40903
|
-
local
|
|
40904
|
-
local
|
|
40910
|
+
local MOVEMENT_ACTIONS_SET = ____input.MOVEMENT_ACTIONS_SET
|
|
40911
|
+
local SHOOTING_ACTIONS_SET = ____input.SHOOTING_ACTIONS_SET
|
|
40905
40912
|
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
40906
40913
|
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
40907
40914
|
local ____Feature = require("src.classes.private.Feature")
|
|
@@ -40983,13 +40990,11 @@ function DisableInputs.prototype.disableAllInputsExceptFor(self, key, whitelist)
|
|
|
40983
40990
|
end
|
|
40984
40991
|
__TS__DecorateLegacy({Exported}, DisableInputs.prototype, "disableAllInputsExceptFor", true)
|
|
40985
40992
|
function DisableInputs.prototype.disableMovementInputs(self, key)
|
|
40986
|
-
|
|
40987
|
-
self:enableAllInputsExceptFor(key, moveActions)
|
|
40993
|
+
self:enableAllInputsExceptFor(key, MOVEMENT_ACTIONS_SET)
|
|
40988
40994
|
end
|
|
40989
40995
|
__TS__DecorateLegacy({Exported}, DisableInputs.prototype, "disableMovementInputs", true)
|
|
40990
40996
|
function DisableInputs.prototype.disableShootingInputs(self, key)
|
|
40991
|
-
|
|
40992
|
-
self:enableAllInputsExceptFor(key, shootActions)
|
|
40997
|
+
self:enableAllInputsExceptFor(key, SHOOTING_ACTIONS_SET)
|
|
40993
40998
|
end
|
|
40994
40999
|
__TS__DecorateLegacy({Exported}, DisableInputs.prototype, "disableShootingInputs", true)
|
|
40995
41000
|
return ____exports
|
|
@@ -88,6 +88,8 @@ export declare class DefaultMap<Key, Value, Args extends unknown[] = []> extends
|
|
|
88
88
|
/**
|
|
89
89
|
* If the key exists, this will return the same thing as the normal `Map.get` method. Otherwise,
|
|
90
90
|
* it will set a default value for the provided key, and then return the default value.
|
|
91
|
+
*
|
|
92
|
+
* @allowEmptyVariadic
|
|
91
93
|
*/
|
|
92
94
|
getAndSetDefault(key: Key, ...args: Args): Value;
|
|
93
95
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultMap.d.ts","sourceRoot":"","sources":["../../../src/classes/DefaultMap.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;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,QAAQ,CAAC,YAAY,CAAoB;IACjD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAEtB;IAEd;;;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
|
|
1
|
+
{"version":3,"file":"DefaultMap.d.ts","sourceRoot":"","sources":["../../../src/classes/DefaultMap.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8EG;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,QAAQ,CAAC,YAAY,CAAoB;IACjD,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAEtB;IAEd;;;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;;;;;OAKG;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModUpgraded.d.ts","sourceRoot":"","sources":["../../../src/classes/ModUpgraded.ts"],"names":[],"m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AIG;IACH,OAAO,CAAC,mBAAmB;CAM5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DisableInputs.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/DisableInputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"DisableInputs.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/DisableInputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAQjE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AA4BhD,qBAAa,aAAc,SAAQ,OAAO;IAiCxC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAIa;IAG7C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAIW;IAG7C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAIe;IAE9C,OAAO,CAAC,cAAc;IAwBtB;;;;;OAKG;IAEI,gBAAgB,IAAI,OAAO;IAQlC;;;;;;;;;;OAUG;IAEI,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKzC;;;;;;;;;;;;;;;OAeG;IAEI,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,aAAa,EAAE,YAAY,EAAE,GAAG,IAAI;IAKzE;;;;;;;;;;;;OAYG;IAEI,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK1C;;;;;;;;;;;;;OAaG;IAEI,wBAAwB,CAC7B,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,GACvD,IAAI;IAKP;;;;;;;;;;;;;OAaG;IAEI,yBAAyB,CAC9B,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,GAAG,CAAC,YAAY,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,GACvD,IAAI;IAKP;;;;;;;;;;;;;OAaG;IAEI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI/C;;;;;;;;;;;;OAYG;IAEI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAGhD"}
|
|
@@ -12,8 +12,8 @@ local ModCallback = ____isaac_2Dtypescript_2Ddefinitions.ModCallback
|
|
|
12
12
|
local ____decorators = require("src.decorators")
|
|
13
13
|
local Exported = ____decorators.Exported
|
|
14
14
|
local ____input = require("src.functions.input")
|
|
15
|
-
local
|
|
16
|
-
local
|
|
15
|
+
local MOVEMENT_ACTIONS_SET = ____input.MOVEMENT_ACTIONS_SET
|
|
16
|
+
local SHOOTING_ACTIONS_SET = ____input.SHOOTING_ACTIONS_SET
|
|
17
17
|
local ____ReadonlySet = require("src.types.ReadonlySet")
|
|
18
18
|
local ReadonlySet = ____ReadonlySet.ReadonlySet
|
|
19
19
|
local ____Feature = require("src.classes.private.Feature")
|
|
@@ -95,13 +95,11 @@ function DisableInputs.prototype.disableAllInputsExceptFor(self, key, whitelist)
|
|
|
95
95
|
end
|
|
96
96
|
__TS__DecorateLegacy({Exported}, DisableInputs.prototype, "disableAllInputsExceptFor", true)
|
|
97
97
|
function DisableInputs.prototype.disableMovementInputs(self, key)
|
|
98
|
-
|
|
99
|
-
self:enableAllInputsExceptFor(key, moveActions)
|
|
98
|
+
self:enableAllInputsExceptFor(key, MOVEMENT_ACTIONS_SET)
|
|
100
99
|
end
|
|
101
100
|
__TS__DecorateLegacy({Exported}, DisableInputs.prototype, "disableMovementInputs", true)
|
|
102
101
|
function DisableInputs.prototype.disableShootingInputs(self, key)
|
|
103
|
-
|
|
104
|
-
self:enableAllInputsExceptFor(key, shootActions)
|
|
102
|
+
self:enableAllInputsExceptFor(key, SHOOTING_ACTIONS_SET)
|
|
105
103
|
end
|
|
106
104
|
__TS__DecorateLegacy({Exported}, DisableInputs.prototype, "disableShootingInputs", true)
|
|
107
105
|
return ____exports
|
|
@@ -29,6 +29,7 @@ import type { AllButFirst } from "../types/AllButFirst";
|
|
|
29
29
|
* A decorator function that signifies that the decorated class method should be automatically
|
|
30
30
|
* registered with `Mod.AddCallback`.
|
|
31
31
|
*
|
|
32
|
+
* @allowEmptyVariadic
|
|
32
33
|
* @ignore
|
|
33
34
|
*/
|
|
34
35
|
export declare function Callback<T extends ModCallback>(modCallback: T, ...optionalArgs: AllButFirst<AddCallbackParameters[T]>): <Class extends ModFeature, Fn extends AddCallbackParameters[T][0]>(target: Class, propertyKey: string, _descriptor: TypedPropertyDescriptor<Fn>) => void;
|
|
@@ -36,6 +37,7 @@ export declare function Callback<T extends ModCallback>(modCallback: T, ...optio
|
|
|
36
37
|
* A decorator function that signifies that the decorated class method should be automatically
|
|
37
38
|
* registered with `ModUpgraded.AddCallbackCustom`.
|
|
38
39
|
*
|
|
40
|
+
* @allowEmptyVariadic
|
|
39
41
|
* @ignore
|
|
40
42
|
*/
|
|
41
43
|
export declare function CallbackCustom<T extends ModCallbackCustom>(modCallbackCustom: T, ...optionalArgs: AllButFirst<AddCallbackParametersCustom[T]>): <Class extends ModFeature, Fn extends AddCallbackParametersCustom[T][0]>(target: Class, propertyKey: string, _descriptor: TypedPropertyDescriptor<Fn>) => void;
|
|
@@ -43,6 +45,7 @@ export declare function CallbackCustom<T extends ModCallbackCustom>(modCallbackC
|
|
|
43
45
|
* A decorator function that signifies that the decorated class method should be automatically
|
|
44
46
|
* registered with `Mod.AddPriorityCallback`.
|
|
45
47
|
*
|
|
48
|
+
* @allowEmptyVariadic
|
|
46
49
|
* @ignore
|
|
47
50
|
*/
|
|
48
51
|
export declare function PriorityCallback<T extends ModCallback>(modCallback: T, priority: CallbackPriority | int, ...optionalArgs: AllButFirst<AddCallbackParameters[T]>): <Class extends ModFeature, Fn extends AddCallbackParameters[T][0]>(target: Class, propertyKey: string, _descriptor: TypedPropertyDescriptor<Fn>) => void;
|
|
@@ -50,6 +53,7 @@ export declare function PriorityCallback<T extends ModCallback>(modCallback: T,
|
|
|
50
53
|
* A decorator function that signifies that the decorated class method should be automatically
|
|
51
54
|
* registered with `ModUpgraded.AddCallbackCustom`.
|
|
52
55
|
*
|
|
56
|
+
* @allowEmptyVariadic
|
|
53
57
|
* @ignore
|
|
54
58
|
*/
|
|
55
59
|
export declare function PriorityCallbackCustom<T extends ModCallbackCustom>(modCallbackCustom: T, priority: CallbackPriority | int, ...optionalArgs: AllButFirst<AddCallbackParametersCustom[T]>): <Class extends ModFeature, Fn extends AddCallbackParametersCustom[T][0]>(target: Class, propertyKey: string, _descriptor: TypedPropertyDescriptor<Fn>) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../src/functions/decorators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAChG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAKxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AACrG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../src/functions/decorators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8DAA8D,CAAC;AAChG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAKxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,mDAAmD,CAAC;AACrG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD;;;;;;GAMG;AAGH,wBAAgB,QAAQ,CAAC,CAAC,SAAS,WAAW,EAC5C,WAAW,EAAE,CAAC,EACd,GAAG,YAAY,EAAE,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,4JAOvD;AAED;;;;;;GAMG;AAGH,wBAAgB,cAAc,CAAC,CAAC,SAAS,iBAAiB,EACxD,iBAAiB,EAAE,CAAC,EACpB,GAAG,YAAY,EAAE,WAAW,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,kKAO7D;AAED;;;;;;GAMG;AAEH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,WAAW,EACpD,WAAW,EAAE,CAAC,EACd,QAAQ,EAAE,gBAAgB,GAAG,GAAG,EAChC,GAAG,YAAY,EAAE,WAAW,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,kGAIvC,MAAM,+CAElB,IAAI,CA6BR;AAED;;;;;;GAMG;AAEH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,iBAAiB,EAChE,iBAAiB,EAAE,CAAC,EACpB,QAAQ,EAAE,gBAAgB,GAAG,GAAG,EAChC,GAAG,YAAY,EAAE,WAAW,CAAC,2BAA2B,CAAC,CAAC,CAAC,CAAC,wGAO7C,MAAM,+CAElB,IAAI,CA6BR"}
|
|
@@ -9,6 +9,7 @@ local getTSTLClassName = ____tstlClass.getTSTLClassName
|
|
|
9
9
|
--- A decorator function that signifies that the decorated class method should be automatically
|
|
10
10
|
-- registered with `Mod.AddPriorityCallback`.
|
|
11
11
|
--
|
|
12
|
+
-- @allowEmptyVariadic
|
|
12
13
|
-- @ignore
|
|
13
14
|
function ____exports.PriorityCallback(self, modCallback, priority, ...)
|
|
14
15
|
local optionalArgs = {...}
|
|
@@ -31,6 +32,7 @@ end
|
|
|
31
32
|
--- A decorator function that signifies that the decorated class method should be automatically
|
|
32
33
|
-- registered with `ModUpgraded.AddCallbackCustom`.
|
|
33
34
|
--
|
|
35
|
+
-- @allowEmptyVariadic
|
|
34
36
|
-- @ignore
|
|
35
37
|
function ____exports.PriorityCallbackCustom(self, modCallbackCustom, priority, ...)
|
|
36
38
|
local optionalArgs = {...}
|
|
@@ -53,6 +55,7 @@ end
|
|
|
53
55
|
--- A decorator function that signifies that the decorated class method should be automatically
|
|
54
56
|
-- registered with `Mod.AddCallback`.
|
|
55
57
|
--
|
|
58
|
+
-- @allowEmptyVariadic
|
|
56
59
|
-- @ignore
|
|
57
60
|
function ____exports.Callback(self, modCallback, ...)
|
|
58
61
|
return ____exports.PriorityCallback(nil, modCallback, CallbackPriority.DEFAULT, ...)
|
|
@@ -60,6 +63,7 @@ end
|
|
|
60
63
|
--- A decorator function that signifies that the decorated class method should be automatically
|
|
61
64
|
-- registered with `ModUpgraded.AddCallbackCustom`.
|
|
62
65
|
--
|
|
66
|
+
-- @allowEmptyVariadic
|
|
63
67
|
-- @ignore
|
|
64
68
|
function ____exports.CallbackCustom(self, modCallbackCustom, ...)
|
|
65
69
|
return ____exports.PriorityCallbackCustom(nil, modCallbackCustom, CallbackPriority.DEFAULT, ...)
|
|
@@ -11,8 +11,8 @@ export declare const SHOOTING_ACTIONS_SET: ReadonlySet<ButtonAction>;
|
|
|
11
11
|
* Returns undefined if the submitted controller value was not valid.
|
|
12
12
|
*/
|
|
13
13
|
export declare function controllerToString(controller: Controller): string | undefined;
|
|
14
|
-
export declare function getMoveActions():
|
|
15
|
-
export declare function getShootActions():
|
|
14
|
+
export declare function getMoveActions(controllerIndex: ControllerIndex): ButtonAction[];
|
|
15
|
+
export declare function getShootActions(controllerIndex: ControllerIndex): ButtonAction[];
|
|
16
16
|
/**
|
|
17
17
|
* Helper function to check if a player is pressing a specific button (i.e. holding it down).
|
|
18
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/functions/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AED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,eAAe,EAAE,eAAe,EAChC,GAAG,aAAa,EAAE,YAAY,EAAE,GAC/B,OAAO,CAIT;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,aAAa,EAAE,YAAY,EAAE,GAC/B,OAAO,CAIT;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,IAAI,EAAE,QAAQ,EAAE,GAAG,OAAO,CAI9D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAE9C;AAED,wBAAgB,YAAY,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAEhE;AAED,wBAAgB,mBAAmB,CAAC,eAAe,EAAE,eAAe,GAAG,OAAO,CAE7E;AAED,wBAAgB,6BAA6B,IAAI,OAAO,CAIvD;AAED,wBAAgB,qBAAqB,CACnC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAET;AAED,wBAAgB,+BAA+B,IAAI,OAAO,CAIzD;AAED,wBAAgB,aAAa,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAEjE;AAED,wBAAgB,oBAAoB,CAClC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAET;AAED,wBAAgB,8BAA8B,IAAI,OAAO,CAIxD;AAED,wBAAgB,sBAAsB,CACpC,eAAe,EAAE,eAAe,GAC/B,OAAO,CAET;AAED,wBAAgB,gCAAgC,IAAI,OAAO,CAI1D;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,OAAO,GACjB,MAAM,GAAG,SAAS,CAQpB"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
local ____lualib = require("lualib_bundle")
|
|
2
2
|
local __TS__New = ____lualib.__TS__New
|
|
3
|
+
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
3
4
|
local __TS__ArraySome = ____lualib.__TS__ArraySome
|
|
4
5
|
local ____exports = {}
|
|
5
6
|
local ____isaac_2Dtypescript_2Ddefinitions = require("isaac-typescript-definitions")
|
|
@@ -40,11 +41,17 @@ function ____exports.controllerToString(self, controller)
|
|
|
40
41
|
end
|
|
41
42
|
return trimPrefix(nil, key, "BUTTON_")
|
|
42
43
|
end
|
|
43
|
-
function ____exports.getMoveActions(self)
|
|
44
|
-
return
|
|
44
|
+
function ____exports.getMoveActions(self, controllerIndex)
|
|
45
|
+
return __TS__ArrayFilter(
|
|
46
|
+
____exports.MOVEMENT_ACTIONS,
|
|
47
|
+
function(____, buttonAction) return Input.IsActionPressed(buttonAction, controllerIndex) end
|
|
48
|
+
)
|
|
45
49
|
end
|
|
46
|
-
function ____exports.getShootActions(self)
|
|
47
|
-
return
|
|
50
|
+
function ____exports.getShootActions(self, controllerIndex)
|
|
51
|
+
return __TS__ArrayFilter(
|
|
52
|
+
____exports.SHOOTING_ACTIONS,
|
|
53
|
+
function(____, buttonAction) return Input.IsActionPressed(buttonAction, controllerIndex) end
|
|
54
|
+
)
|
|
48
55
|
end
|
|
49
56
|
--- Helper function to check if a player is pressing a specific button (i.e. holding it down).
|
|
50
57
|
--
|
|
@@ -18,6 +18,8 @@ import type { PlayerIndex } from "../types/PlayerIndex";
|
|
|
18
18
|
* player.MoveSpeed = defaultMapGetPlayer(v.run.playersSpeedBoost, player);
|
|
19
19
|
* }
|
|
20
20
|
* ```
|
|
21
|
+
*
|
|
22
|
+
* @allowEmptyVariadic
|
|
21
23
|
*/
|
|
22
24
|
export declare function defaultMapGetPlayer<V, Args extends unknown[]>(map: DefaultMap<PlayerIndex, V, Args>, player: EntityPlayer, ...extraArgs: Args): V;
|
|
23
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playerDataStructures.d.ts","sourceRoot":"","sources":["../../../src/functions/playerDataStructures.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD
|
|
1
|
+
{"version":3,"file":"playerDataStructures.d.ts","sourceRoot":"","sources":["../../../src/functions/playerDataStructures.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,IAAI,SAAS,OAAO,EAAE,EAC3D,GAAG,EAAE,UAAU,CAAC,WAAW,EAAE,CAAC,EAAE,IAAI,CAAC,EACrC,MAAM,EAAE,YAAY,EACpB,GAAG,SAAS,EAAE,IAAI,GACjB,CAAC,CAGH;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,EACnC,GAAG,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,EACxB,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,CAAC,GACP,IAAI,CAEN;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,GAAG,CAAC,WAAW,EAAE,OAAO,CAAC,EAC9B,MAAM,EAAE,YAAY,GACnB,OAAO,CAGT;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,GAAG,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,EACxB,MAAM,EAAE,YAAY,GACnB,CAAC,GAAG,SAAS,CAGf;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,GAAG,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,EACxB,MAAM,EAAE,YAAY,GACnB,OAAO,CAGT;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAC5B,GAAG,EAAE,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC,EACxB,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,CAAC,GACP,IAAI,CAGN;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,CAAC,WAAW,CAAC,EACrB,MAAM,EAAE,YAAY,GACnB,GAAG,CAAC,WAAW,CAAC,CAGlB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,GAAG,CAAC,WAAW,CAAC,EACrB,MAAM,EAAE,YAAY,GACnB,OAAO,CAGT;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,GAAG,CAAC,WAAW,CAAC,EACrB,MAAM,EAAE,YAAY,GACnB,OAAO,CAGT"}
|
|
@@ -42,6 +42,8 @@ end
|
|
|
42
42
|
-- player.MoveSpeed = defaultMapGetPlayer(v.run.playersSpeedBoost, player);
|
|
43
43
|
-- }
|
|
44
44
|
-- ```
|
|
45
|
+
--
|
|
46
|
+
-- @allowEmptyVariadic
|
|
45
47
|
function ____exports.defaultMapGetPlayer(self, map, player, ...)
|
|
46
48
|
local playerIndex = getPlayerIndex(nil, player)
|
|
47
49
|
return map:getAndSetDefault(playerIndex, ...)
|
|
@@ -18,6 +18,8 @@
|
|
|
18
18
|
* This function will still work identically if PNG file does not exist, but it will cause a
|
|
19
19
|
* spurious error to appear in the "log.txt" file. If silencing these errors is desired, you can
|
|
20
20
|
* create a transparent 1 pixel PNG file in your mod's resources folder at `EMPTY_PNG_PATH`.
|
|
21
|
+
*
|
|
22
|
+
* @allowEmptyVariadic
|
|
21
23
|
*/
|
|
22
24
|
export declare function clearSprite(sprite: Sprite, ...layerIDs: int[]): void;
|
|
23
25
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sprites.d.ts","sourceRoot":"","sources":["../../../src/functions/sprites.ts"],"names":[],"mappings":";;;AAKA
|
|
1
|
+
{"version":3,"file":"sprites.d.ts","sourceRoot":"","sources":["../../../src/functions/sprites.ts"],"names":[],"mappings":";;;AAKA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,CAWpE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,GACjB,GAAG,CAmBL;AAED;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAepE;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAInE;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,GAAG,EACZ,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,GAAG,EACZ,UAAU,EAAE,GAAG,EACf,MAAM,EAAE,GAAG,EACX,OAAO,EAAE,GAAG,EACZ,UAAU,EAAE,GAAG,GACd,OAAO,CAaT;AAED,uFAAuF;AACvF,wBAAgB,WAAW,CACzB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,GAAG,GACX,OAAO,CAIT"}
|
|
@@ -30,6 +30,8 @@ end
|
|
|
30
30
|
-- This function will still work identically if PNG file does not exist, but it will cause a
|
|
31
31
|
-- spurious error to appear in the "log.txt" file. If silencing these errors is desired, you can
|
|
32
32
|
-- create a transparent 1 pixel PNG file in your mod's resources folder at `EMPTY_PNG_PATH`.
|
|
33
|
+
--
|
|
34
|
+
-- @allowEmptyVariadic
|
|
33
35
|
function ____exports.clearSprite(self, sprite, ...)
|
|
34
36
|
local layerIDs = {...}
|
|
35
37
|
if #layerIDs == 0 then
|
package/package.json
CHANGED
|
@@ -118,6 +118,8 @@ export class DefaultMap<Key, Value, Args extends unknown[] = []> extends Map<
|
|
|
118
118
|
/**
|
|
119
119
|
* If the key exists, this will return the same thing as the normal `Map.get` method. Otherwise,
|
|
120
120
|
* it will set a default value for the provided key, and then return the default value.
|
|
121
|
+
*
|
|
122
|
+
* @allowEmptyVariadic
|
|
121
123
|
*/
|
|
122
124
|
public getAndSetDefault(key: Key, ...args: Args): Value {
|
|
123
125
|
const value = super.get(key);
|
|
@@ -197,6 +197,7 @@ export class ModUpgraded implements Mod {
|
|
|
197
197
|
): void {
|
|
198
198
|
const callbackClass = this.callbacks[modCallbackCustom];
|
|
199
199
|
// @ts-expect-error The compiler is not smart enough to figure out that the parameters match.
|
|
200
|
+
// eslint-disable-next-line isaacscript/require-variadic-function-argument
|
|
200
201
|
callbackClass.addSubscriber(priority, ...args);
|
|
201
202
|
this.initFeature(callbackClass);
|
|
202
203
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { ButtonAction } from "isaac-typescript-definitions";
|
|
2
2
|
import { InputHook, ModCallback } from "isaac-typescript-definitions";
|
|
3
3
|
import { Exported } from "../../../decorators";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
MOVEMENT_ACTIONS_SET,
|
|
6
|
+
SHOOTING_ACTIONS_SET,
|
|
7
|
+
} from "../../../functions/input";
|
|
5
8
|
import { ReadonlySet } from "../../../types/ReadonlySet";
|
|
6
9
|
import { Feature } from "../../private/Feature";
|
|
7
10
|
|
|
@@ -243,8 +246,7 @@ export class DisableInputs extends Feature {
|
|
|
243
246
|
*/
|
|
244
247
|
@Exported
|
|
245
248
|
public disableMovementInputs(key: string): void {
|
|
246
|
-
|
|
247
|
-
this.enableAllInputsExceptFor(key, moveActions);
|
|
249
|
+
this.enableAllInputsExceptFor(key, MOVEMENT_ACTIONS_SET);
|
|
248
250
|
}
|
|
249
251
|
|
|
250
252
|
/**
|
|
@@ -262,7 +264,6 @@ export class DisableInputs extends Feature {
|
|
|
262
264
|
*/
|
|
263
265
|
@Exported
|
|
264
266
|
public disableShootingInputs(key: string): void {
|
|
265
|
-
|
|
266
|
-
this.enableAllInputsExceptFor(key, shootActions);
|
|
267
|
+
this.enableAllInputsExceptFor(key, SHOOTING_ACTIONS_SET);
|
|
267
268
|
}
|
|
268
269
|
}
|
|
@@ -36,6 +36,7 @@ import { getTSTLClassName } from "./tstlClass";
|
|
|
36
36
|
* A decorator function that signifies that the decorated class method should be automatically
|
|
37
37
|
* registered with `Mod.AddCallback`.
|
|
38
38
|
*
|
|
39
|
+
* @allowEmptyVariadic
|
|
39
40
|
* @ignore
|
|
40
41
|
*/
|
|
41
42
|
// We tell TypeDoc to ignore this function because it generates a bunch of spam.
|
|
@@ -55,6 +56,7 @@ export function Callback<T extends ModCallback>(
|
|
|
55
56
|
* A decorator function that signifies that the decorated class method should be automatically
|
|
56
57
|
* registered with `ModUpgraded.AddCallbackCustom`.
|
|
57
58
|
*
|
|
59
|
+
* @allowEmptyVariadic
|
|
58
60
|
* @ignore
|
|
59
61
|
*/
|
|
60
62
|
// We tell TypeDoc to ignore this function because it generates a bunch of spam.
|
|
@@ -74,6 +76,7 @@ export function CallbackCustom<T extends ModCallbackCustom>(
|
|
|
74
76
|
* A decorator function that signifies that the decorated class method should be automatically
|
|
75
77
|
* registered with `Mod.AddPriorityCallback`.
|
|
76
78
|
*
|
|
79
|
+
* @allowEmptyVariadic
|
|
77
80
|
* @ignore
|
|
78
81
|
*/
|
|
79
82
|
// We tell TypeDoc to ignore this function because it generates a bunch of spam.
|
|
@@ -121,6 +124,7 @@ export function PriorityCallback<T extends ModCallback>(
|
|
|
121
124
|
* A decorator function that signifies that the decorated class method should be automatically
|
|
122
125
|
* registered with `ModUpgraded.AddCallbackCustom`.
|
|
123
126
|
*
|
|
127
|
+
* @allowEmptyVariadic
|
|
124
128
|
* @ignore
|
|
125
129
|
*/
|
|
126
130
|
// We tell TypeDoc to ignore this function because it generates a bunch of spam.
|
package/src/functions/input.ts
CHANGED
|
@@ -58,12 +58,20 @@ export function controllerToString(controller: Controller): string | undefined {
|
|
|
58
58
|
return trimPrefix(key, "BUTTON_");
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
export function getMoveActions(
|
|
62
|
-
|
|
61
|
+
export function getMoveActions(
|
|
62
|
+
controllerIndex: ControllerIndex,
|
|
63
|
+
): ButtonAction[] {
|
|
64
|
+
return MOVEMENT_ACTIONS.filter((buttonAction) =>
|
|
65
|
+
Input.IsActionPressed(buttonAction, controllerIndex),
|
|
66
|
+
);
|
|
63
67
|
}
|
|
64
68
|
|
|
65
|
-
export function getShootActions(
|
|
66
|
-
|
|
69
|
+
export function getShootActions(
|
|
70
|
+
controllerIndex: ControllerIndex,
|
|
71
|
+
): ButtonAction[] {
|
|
72
|
+
return SHOOTING_ACTIONS.filter((buttonAction) =>
|
|
73
|
+
Input.IsActionPressed(buttonAction, controllerIndex),
|
|
74
|
+
);
|
|
67
75
|
}
|
|
68
76
|
|
|
69
77
|
/**
|
|
@@ -19,6 +19,8 @@ import { getPlayerIndex } from "./playerIndex";
|
|
|
19
19
|
* player.MoveSpeed = defaultMapGetPlayer(v.run.playersSpeedBoost, player);
|
|
20
20
|
* }
|
|
21
21
|
* ```
|
|
22
|
+
*
|
|
23
|
+
* @allowEmptyVariadic
|
|
22
24
|
*/
|
|
23
25
|
export function defaultMapGetPlayer<V, Args extends unknown[]>(
|
|
24
26
|
map: DefaultMap<PlayerIndex, V, Args>,
|
package/src/functions/sprites.ts
CHANGED
|
@@ -20,6 +20,8 @@ import { eRange } from "./utils";
|
|
|
20
20
|
* This function will still work identically if PNG file does not exist, but it will cause a
|
|
21
21
|
* spurious error to appear in the "log.txt" file. If silencing these errors is desired, you can
|
|
22
22
|
* create a transparent 1 pixel PNG file in your mod's resources folder at `EMPTY_PNG_PATH`.
|
|
23
|
+
*
|
|
24
|
+
* @allowEmptyVariadic
|
|
23
25
|
*/
|
|
24
26
|
export function clearSprite(sprite: Sprite, ...layerIDs: int[]): void {
|
|
25
27
|
if (layerIDs.length === 0) {
|