isaacscript-common 30.6.0 → 30.6.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.
@@ -3457,6 +3457,13 @@ declare class DisableInputs extends Feature {
3457
3457
  private isActionTriggered;
3458
3458
  private getActionValue;
3459
3459
  private getReturnValue;
3460
+ /**
3461
+ * Helper function to check if the `ISCFeature.DISABLE_INPUTS` feature is turned on in some
3462
+ * capacity.
3463
+ *
3464
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DISABLE_INPUTS`.
3465
+ */
3466
+ areInputsEnabled(): boolean;
3460
3467
  /**
3461
3468
  * Helper function to enable all inputs. Use this function to set things back to normal after
3462
3469
  * having used one of the other helper functions to disable inputs.
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 30.6.0
3
+ isaacscript-common 30.6.1
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -40622,6 +40622,9 @@ function DisableInputs.prototype.getReturnValue(self, buttonAction, booleanCallb
40622
40622
  end
40623
40623
  return nil
40624
40624
  end
40625
+ function DisableInputs.prototype.areInputsEnabled(self)
40626
+ return v.run.disableInputs.size == 0 and v.run.enableAllInputsWithBlacklistMap.size == 0 and v.run.disableAllInputsWithWhitelistMap.size == 0
40627
+ end
40625
40628
  function DisableInputs.prototype.enableAllInputs(self, key)
40626
40629
  v.run.disableAllInputsWithWhitelistMap:delete(key)
40627
40630
  v.run.enableAllInputsWithBlacklistMap:delete(key)
@@ -40654,6 +40657,7 @@ function DisableInputs.prototype.disableShootingInputs(self, key)
40654
40657
  local shootActions = getShootActions(nil)
40655
40658
  self:enableAllInputsExceptFor(key, shootActions)
40656
40659
  end
40660
+ __TS__Decorate({Exported}, DisableInputs.prototype, "areInputsEnabled", true)
40657
40661
  __TS__Decorate({Exported}, DisableInputs.prototype, "enableAllInputs", true)
40658
40662
  __TS__Decorate({Exported}, DisableInputs.prototype, "disableInputs", true)
40659
40663
  __TS__Decorate({Exported}, DisableInputs.prototype, "disableAllInputs", true)
@@ -5,6 +5,13 @@ export declare class DisableInputs extends Feature {
5
5
  private isActionTriggered;
6
6
  private getActionValue;
7
7
  private getReturnValue;
8
+ /**
9
+ * Helper function to check if the `ISCFeature.DISABLE_INPUTS` feature is turned on in some
10
+ * capacity.
11
+ *
12
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DISABLE_INPUTS`.
13
+ */
14
+ areInputsEnabled(): boolean;
8
15
  /**
9
16
  * Helper function to enable all inputs. Use this function to set things back to normal after
10
17
  * having used one of the other helper functions to disable inputs.
@@ -1 +1 @@
1
- {"version":3,"file":"DisableInputs.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/DisableInputs.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAGb,MAAM,8BAA8B,CAAC;AAItC,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AA4BhD,qBAAa,aAAc,SAAQ,OAAO;IAiCxC,OAAO,CAAC,eAAe,CAIsB;IAG7C,OAAO,CAAC,iBAAiB,CAIoB;IAG7C,OAAO,CAAC,cAAc,CAIwB;IAE9C,OAAO,CAAC,cAAc;IAwBtB;;;;;;;;;;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,SAA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BAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAK/C;;;;;;;;;;;;OAYG;IAEI,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAIhD"}
@@ -61,6 +61,9 @@ function DisableInputs.prototype.getReturnValue(self, buttonAction, booleanCallb
61
61
  end
62
62
  return nil
63
63
  end
64
+ function DisableInputs.prototype.areInputsEnabled(self)
65
+ return v.run.disableInputs.size == 0 and v.run.enableAllInputsWithBlacklistMap.size == 0 and v.run.disableAllInputsWithWhitelistMap.size == 0
66
+ end
64
67
  function DisableInputs.prototype.enableAllInputs(self, key)
65
68
  v.run.disableAllInputsWithWhitelistMap:delete(key)
66
69
  v.run.enableAllInputsWithBlacklistMap:delete(key)
@@ -93,6 +96,7 @@ function DisableInputs.prototype.disableShootingInputs(self, key)
93
96
  local shootActions = getShootActions(nil)
94
97
  self:enableAllInputsExceptFor(key, shootActions)
95
98
  end
99
+ __TS__Decorate({Exported}, DisableInputs.prototype, "areInputsEnabled", true)
96
100
  __TS__Decorate({Exported}, DisableInputs.prototype, "enableAllInputs", true)
97
101
  __TS__Decorate({Exported}, DisableInputs.prototype, "disableInputs", true)
98
102
  __TS__Decorate({Exported}, DisableInputs.prototype, "disableAllInputs", true)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "30.6.0",
3
+ "version": "30.6.1",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -111,6 +111,21 @@ export class DisableInputs extends Feature {
111
111
  return undefined;
112
112
  }
113
113
 
114
+ /**
115
+ * Helper function to check if the `ISCFeature.DISABLE_INPUTS` feature is turned on in some
116
+ * capacity.
117
+ *
118
+ * In order to use this function, you must upgrade your mod with `ISCFeature.DISABLE_INPUTS`.
119
+ */
120
+ @Exported
121
+ public areInputsEnabled(): boolean {
122
+ return (
123
+ v.run.disableInputs.size === 0 &&
124
+ v.run.enableAllInputsWithBlacklistMap.size === 0 &&
125
+ v.run.disableAllInputsWithWhitelistMap.size === 0
126
+ );
127
+ }
128
+
114
129
  /**
115
130
  * Helper function to enable all inputs. Use this function to set things back to normal after
116
131
  * having used one of the other helper functions to disable inputs.