isaacscript-common 7.17.0 → 7.17.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.
@@ -9,8 +9,10 @@ export declare function disableInputsInit(mod: Mod): void;
9
9
  */
10
10
  export declare function enableAllInputs(key: string): void;
11
11
  /**
12
- * Helper function to disable specific inputs, like opening the console. (To disable all inputs, see
13
- * the `disableAllInputs` function.)
12
+ * Helper function to disable specific inputs, like opening the console.
13
+ *
14
+ * This function is variadic, meaning that you can pass as many inputs as you want to disable. (To
15
+ * disable all inputs, see the `disableAllInputs` function.
14
16
  *
15
17
  * Use the `enableAllInputs` helper function to set things back to normal.
16
18
  *
@@ -18,7 +20,7 @@ export declare function enableAllInputs(key: string): void;
18
20
  * that multiple mod features can work in tandem.
19
21
  * @param buttonActions An array of the actions to action.
20
22
  */
21
- export declare function disableInputs(key: string, buttonActions: ButtonAction[]): void;
23
+ export declare function disableInputs(key: string, ...buttonActions: ButtonAction[]): void;
22
24
  /**
23
25
  * Helper function to disable all inputs. This is useful because `EntityPlayer.ControlsEnabled` can
24
26
  * be changed by the game under certain conditions.
@@ -1 +1 @@
1
- {"version":3,"file":"disableInputs.d.ts","sourceRoot":"","sources":["../../src/features/disableInputs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,8BAA8B,CAAC;AA0BtC,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,GAAG,IAAI,CAoBhD;AAqDD;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAKjD;AAED;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,MAAM,EACX,aAAa,EAAE,YAAY,EAAE,GAC5B,IAAI,CAKN;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAKlD;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAw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;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAGvD;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAGvD"}
@@ -71,15 +71,18 @@ function ____exports.enableAllInputs(self, key)
71
71
  v.run.disableAllInputsWithWhitelistMap:delete(key)
72
72
  v.run.enableAllInputsWithBlacklistMap:delete(key)
73
73
  end
74
- --- Helper function to disable specific inputs, like opening the console. (To disable all inputs, see
75
- -- the `disableAllInputs` function.)
74
+ --- Helper function to disable specific inputs, like opening the console.
75
+ --
76
+ -- This function is variadic, meaning that you can pass as many inputs as you want to disable. (To
77
+ -- disable all inputs, see the `disableAllInputs` function.
76
78
  --
77
79
  -- Use the `enableAllInputs` helper function to set things back to normal.
78
80
  --
79
81
  -- @param key The name of the mod feature that is requesting the enable/disable. This is needed so
80
82
  -- that multiple mod features can work in tandem.
81
83
  -- @param buttonActions An array of the actions to action.
82
- function ____exports.disableInputs(self, key, buttonActions)
84
+ function ____exports.disableInputs(self, key, ...)
85
+ local buttonActions = {...}
83
86
  errorIfFeaturesNotInitialized(nil, FEATURE_NAME)
84
87
  local buttonActionsSet = __TS__New(Set, buttonActions)
85
88
  v.run.disableInputs:set(key, buttonActionsSet)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "7.17.0",
3
+ "version": "7.17.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -116,8 +116,10 @@ export function enableAllInputs(key: string): void {
116
116
  }
117
117
 
118
118
  /**
119
- * Helper function to disable specific inputs, like opening the console. (To disable all inputs, see
120
- * the `disableAllInputs` function.)
119
+ * Helper function to disable specific inputs, like opening the console.
120
+ *
121
+ * This function is variadic, meaning that you can pass as many inputs as you want to disable. (To
122
+ * disable all inputs, see the `disableAllInputs` function.
121
123
  *
122
124
  * Use the `enableAllInputs` helper function to set things back to normal.
123
125
  *
@@ -127,7 +129,7 @@ export function enableAllInputs(key: string): void {
127
129
  */
128
130
  export function disableInputs(
129
131
  key: string,
130
- buttonActions: ButtonAction[],
132
+ ...buttonActions: ButtonAction[]
131
133
  ): void {
132
134
  errorIfFeaturesNotInitialized(FEATURE_NAME);
133
135