isaacscript-common 18.3.2 → 18.4.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 CHANGED
@@ -1320,6 +1320,8 @@ declare class CollectibleItemPoolType extends Feature {
1320
1320
  export declare function collectibleSpriteEquals(sprite1: Sprite, sprite2: Sprite): boolean;
1321
1321
 
1322
1322
  /**
1323
+ * Equal to `Color(1, 1, 1)`.
1324
+ *
1323
1325
  * This is a safe version of the `Color.Default` constant. (Other mods can mutate `Color.Default`,
1324
1326
  * so it is not safe to use.)
1325
1327
  *
@@ -11230,8 +11232,18 @@ export declare class ModFeature {
11230
11232
  * conditional logic and early returning at the beginning of every callback function).
11231
11233
  *
11232
11234
  * By default, this is set to null. Override this property in your class if you need to use it.
11235
+ *
11236
+ * The function has the following signature:
11237
+ *
11238
+ * ```ts
11239
+ * (
11240
+ * vanilla: boolean, // Whether or not this is a vanilla or custom callback.
11241
+ * modCallback: ModCallback | ModCallbackCustom,
11242
+ * ...callbackArgs: unknown[]
11243
+ * ) => boolean;
11244
+ * ```
11233
11245
  */
11234
- protected callbackConditionalFunc: (() => boolean) | null;
11246
+ protected callbackConditionalFunc: ((vanilla: boolean, modCallback: ModCallback | ModCallbackCustom, ...callbackArgs: unknown[]) => boolean) | null;
11235
11247
  /**
11236
11248
  * Whether or not the feature has registered its callbacks yet (and submitted its variables to the
11237
11249
  * save data manager, if any).
@@ -14941,6 +14953,8 @@ export declare function validateInterfaceMatchesEnum<T extends Record<Enum, unkn
14941
14953
  export declare function vectorEquals(vector1: Vector, vector2: Vector): boolean;
14942
14954
 
14943
14955
  /**
14956
+ * Equal to `Vector(1, 1)`.
14957
+ *
14944
14958
  * This is a safe version of the `Vector.One` constant. (Other mods can mutate `Vector.One`, so it
14945
14959
  * is not safe to use.)
14946
14960
  */
@@ -14952,6 +14966,8 @@ export declare function vectorToDirection(vector: Vector): Direction;
14952
14966
  export declare function vectorToString(vector: Vector, round?: boolean): string;
14953
14967
 
14954
14968
  /**
14969
+ * Equal to `Vector(0, 0)`.
14970
+ *
14955
14971
  * This is a safe version of the `Vector.Zero` constant. (Other mods can mutate `Vector.Zero`, so it
14956
14972
  * is not safe to use.)
14957
14973
  */
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 18.3.2
3
+ isaacscript-common 18.4.0
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -49377,7 +49377,7 @@ function addCallback(self, modFeature, modFeatureConstructor, mod, modCallback,
49377
49377
  local function wrappedCallback(____, ...)
49378
49378
  local conditionalFunc = modFeature.callbackConditionalFunc
49379
49379
  if conditionalFunc ~= nil then
49380
- local shouldRun = conditionalFunc(nil)
49380
+ local shouldRun = conditionalFunc(nil, vanilla, modCallback, ...)
49381
49381
  if not shouldRun then
49382
49382
  return nil
49383
49383
  end
@@ -1,3 +1,5 @@
1
+ import { ModCallback } from "isaac-typescript-definitions";
2
+ import { ModCallbackCustom } from "../enums/ModCallbackCustom";
1
3
  import { ModUpgradedBase } from "./ModUpgradedBase";
2
4
  export declare const MOD_FEATURE_CALLBACKS_KEY = "__callbacks";
3
5
  export declare const MOD_FEATURE_CUSTOM_CALLBACKS_KEY = "__customCallbacks";
@@ -45,8 +47,18 @@ export declare class ModFeature {
45
47
  * conditional logic and early returning at the beginning of every callback function).
46
48
  *
47
49
  * By default, this is set to null. Override this property in your class if you need to use it.
50
+ *
51
+ * The function has the following signature:
52
+ *
53
+ * ```ts
54
+ * (
55
+ * vanilla: boolean, // Whether or not this is a vanilla or custom callback.
56
+ * modCallback: ModCallback | ModCallbackCustom,
57
+ * ...callbackArgs: unknown[]
58
+ * ) => boolean;
59
+ * ```
48
60
  */
49
- protected callbackConditionalFunc: (() => boolean) | null;
61
+ protected callbackConditionalFunc: ((vanilla: boolean, modCallback: ModCallback | ModCallbackCustom, ...callbackArgs: unknown[]) => boolean) | null;
50
62
  /**
51
63
  * Whether or not the feature has registered its callbacks yet (and submitted its variables to the
52
64
  * save data manager, if any).
@@ -1 +1 @@
1
- {"version":3,"file":"ModFeature.d.ts","sourceRoot":"","sources":["../../../src/classes/ModFeature.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,yBAAyB,gBAAgB,CAAC;AACvD,eAAO,MAAM,gCAAgC,sBAAsB,CAAC;AAyBpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,qBAAa,UAAU;IACrB,OAAO,CAAC,GAAG,CAAkB;IAE7B;;;;;;;;;OASG;IACH,SAAS,CAAC,uBAAuB,EAAE,CAAC,MAAM,OAAO,CAAC,GAAG,IAAI,CAAQ;IAEjE;;;;;;OAMG;IACI,WAAW,UAAS;gBAEf,GAAG,EAAE,eAAe,EAAE,IAAI,UAAO;IAQ7C;;;;;OAKG;IACI,IAAI,CAAC,IAAI,UAAO,GAAG,IAAI;IAqB9B;;;;;;OAMG;IACI,MAAM,IAAI,IAAI;CAGtB"}
1
+ {"version":3,"file":"ModFeature.d.ts","sourceRoot":"","sources":["../../../src/classes/ModFeature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAS/D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,eAAO,MAAM,yBAAyB,gBAAgB,CAAC;AACvD,eAAO,MAAM,gCAAgC,sBAAsB,CAAC;AAyBpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,qBAAa,UAAU;IACrB,OAAO,CAAC,GAAG,CAAkB;IAE7B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,SAAS,CAAC,uBAAuB,EAC7B,CAAC,CACC,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,WAAW,GAAG,iBAAiB,EAC5C,GAAG,YAAY,EAAE,OAAO,EAAE,KACvB,OAAO,CAAC,GACb,IAAI,CAAQ;IAEhB;;;;;;OAMG;IACI,WAAW,UAAS;gBAEf,GAAG,EAAE,eAAe,EAAE,IAAI,UAAO;IAQ7C;;;;;OAKG;IACI,IAAI,CAAC,IAAI,UAAO,GAAG,IAAI;IAqB9B;;;;;;OAMG;IACI,MAAM,IAAI,IAAI;CAGtB"}
@@ -66,7 +66,7 @@ function addCallback(self, modFeature, modFeatureConstructor, mod, modCallback,
66
66
  local function wrappedCallback(____, ...)
67
67
  local conditionalFunc = modFeature.callbackConditionalFunc
68
68
  if conditionalFunc ~= nil then
69
- local shouldRun = conditionalFunc(nil)
69
+ local shouldRun = conditionalFunc(nil, vanilla, modCallback, ...)
70
70
  if not shouldRun then
71
71
  return nil
72
72
  end
@@ -133,16 +133,22 @@ export declare const TELEPORTER_ACTIVATION_DISTANCE: number;
133
133
  */
134
134
  export declare const UI_HEART_WIDTH = 12;
135
135
  /**
136
+ * Equal to `Vector(1, 1)`.
137
+ *
136
138
  * This is a safe version of the `Vector.One` constant. (Other mods can mutate `Vector.One`, so it
137
139
  * is not safe to use.)
138
140
  */
139
141
  export declare const VectorOne: Readonly<Vector>;
140
142
  /**
143
+ * Equal to `Vector(0, 0)`.
144
+ *
141
145
  * This is a safe version of the `Vector.Zero` constant. (Other mods can mutate `Vector.Zero`, so it
142
146
  * is not safe to use.)
143
147
  */
144
148
  export declare const VectorZero: Readonly<Vector>;
145
149
  /**
150
+ * Equal to `Color(1, 1, 1)`.
151
+ *
146
152
  * This is a safe version of the `Color.Default` constant. (Other mods can mutate `Color.Default`,
147
153
  * so it is not safe to use.)
148
154
  *
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/core/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,kBAAkB,EAClB,YAAY,EAEb,MAAM,8BAA8B,CAAC;AAMtC;;;;;GAKG;AACH,eAAO,MAAM,iBAAi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115,13 +115,19 @@ ____exports.TELEPORTER_ACTIVATION_DISTANCE = ____exports.DISTANCE_OF_GRID_TILE /
115
115
  --- This is the number of draw coordinates that each heart spans on the UI in the upper left hand
116
116
  -- corner.
117
117
  ____exports.UI_HEART_WIDTH = 12
118
- --- This is a safe version of the `Vector.One` constant. (Other mods can mutate `Vector.One`, so it
118
+ --- Equal to `Vector(1, 1)`.
119
+ --
120
+ -- This is a safe version of the `Vector.One` constant. (Other mods can mutate `Vector.One`, so it
119
121
  -- is not safe to use.)
120
122
  ____exports.VectorOne = Vector(1, 1)
121
- --- This is a safe version of the `Vector.Zero` constant. (Other mods can mutate `Vector.Zero`, so it
123
+ --- Equal to `Vector(0, 0)`.
124
+ --
125
+ -- This is a safe version of the `Vector.Zero` constant. (Other mods can mutate `Vector.Zero`, so it
122
126
  -- is not safe to use.)
123
127
  ____exports.VectorZero = Vector(0, 0)
124
- --- This is a safe version of the `Color.Default` constant. (Other mods can mutate `Color.Default`,
128
+ --- Equal to `Color(1, 1, 1)`.
129
+ --
130
+ -- This is a safe version of the `Color.Default` constant. (Other mods can mutate `Color.Default`,
125
131
  -- so it is not safe to use.)
126
132
  --
127
133
  -- If you need to mutate this, make a copy first with the `copyColor` helper function.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "18.3.2",
3
+ "version": "18.4.0",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -82,8 +82,24 @@ export class ModFeature {
82
82
  * conditional logic and early returning at the beginning of every callback function).
83
83
  *
84
84
  * By default, this is set to null. Override this property in your class if you need to use it.
85
+ *
86
+ * The function has the following signature:
87
+ *
88
+ * ```ts
89
+ * (
90
+ * vanilla: boolean, // Whether or not this is a vanilla or custom callback.
91
+ * modCallback: ModCallback | ModCallbackCustom,
92
+ * ...callbackArgs: unknown[]
93
+ * ) => boolean;
94
+ * ```
85
95
  */
86
- protected callbackConditionalFunc: (() => boolean) | null = null;
96
+ protected callbackConditionalFunc:
97
+ | ((
98
+ vanilla: boolean,
99
+ modCallback: ModCallback | ModCallbackCustom,
100
+ ...callbackArgs: unknown[]
101
+ ) => boolean)
102
+ | null = null;
87
103
 
88
104
  /**
89
105
  * Whether or not the feature has registered its callbacks yet (and submitted its variables to the
@@ -205,13 +221,18 @@ function initDecoratedCallbacks(
205
221
  modFeature,
206
222
  modFeatureConstructor,
207
223
  mod,
208
- modCallback,
224
+ modCallback, // eslint-disable-line isaacscript/strict-enums
209
225
  callback,
210
226
  parameters,
211
227
  vanilla,
212
228
  );
213
229
  } else {
214
- removeCallback(modFeatureConstructor, mod, modCallback, vanilla);
230
+ removeCallback(
231
+ modFeatureConstructor,
232
+ mod,
233
+ modCallback, // eslint-disable-line isaacscript/strict-enums
234
+ vanilla,
235
+ );
215
236
  }
216
237
  }
217
238
  }
@@ -220,9 +241,8 @@ function addCallback(
220
241
  modFeature: ModFeature,
221
242
  modFeatureConstructor: ModFeatureConstructor,
222
243
  mod: ModUpgradedBase,
223
- modCallback: unknown,
224
- // eslint-disable-next-line @typescript-eslint/ban-types
225
- callback: Function,
244
+ modCallback: ModCallback | ModCallbackCustom,
245
+ callback: Function, // eslint-disable-line @typescript-eslint/ban-types
226
246
  parameters: unknown[],
227
247
  vanilla: boolean,
228
248
  ) {
@@ -232,7 +252,7 @@ function addCallback(
232
252
  // eslint-disable-next-line @typescript-eslint/dot-notation
233
253
  const conditionalFunc = modFeature["callbackConditionalFunc"];
234
254
  if (conditionalFunc !== null) {
235
- const shouldRun = conditionalFunc();
255
+ const shouldRun = conditionalFunc(vanilla, modCallback, ...callbackArgs);
236
256
  if (!shouldRun) {
237
257
  return undefined;
238
258
  }
@@ -284,7 +304,7 @@ function addCallback(
284
304
  function removeCallback(
285
305
  modFeatureConstructor: ModFeatureConstructor,
286
306
  mod: ModUpgradedBase,
287
- modCallback: unknown,
307
+ modCallback: ModCallback | ModCallbackCustom,
288
308
  vanilla: boolean,
289
309
  ) {
290
310
  if (vanilla) {
@@ -190,18 +190,24 @@ export const TELEPORTER_ACTIVATION_DISTANCE = DISTANCE_OF_GRID_TILE / 2;
190
190
  export const UI_HEART_WIDTH = 12;
191
191
 
192
192
  /**
193
+ * Equal to `Vector(1, 1)`.
194
+ *
193
195
  * This is a safe version of the `Vector.One` constant. (Other mods can mutate `Vector.One`, so it
194
196
  * is not safe to use.)
195
197
  */
196
198
  export const VectorOne: Readonly<Vector> = Vector(1, 1);
197
199
 
198
200
  /**
201
+ * Equal to `Vector(0, 0)`.
202
+ *
199
203
  * This is a safe version of the `Vector.Zero` constant. (Other mods can mutate `Vector.Zero`, so it
200
204
  * is not safe to use.)
201
205
  */
202
206
  export const VectorZero: Readonly<Vector> = Vector(0, 0);
203
207
 
204
208
  /**
209
+ * Equal to `Color(1, 1, 1)`.
210
+ *
205
211
  * This is a safe version of the `Color.Default` constant. (Other mods can mutate `Color.Default`,
206
212
  * so it is not safe to use.)
207
213
  *