isaacscript-common 2.0.7 → 2.0.10

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.
@@ -1,12 +1,12 @@
1
- import { PillColor, PlayerType } from "isaac-typescript-definitions";
1
+ import { CollectibleType, PillColor, PlayerType } from "isaac-typescript-definitions";
2
2
  export declare const NUM_CARDS: number;
3
3
  export declare const MAX_CARD: number;
4
4
  export declare const NUM_VANILLA_CARDS: number;
5
5
  export declare const MAX_VANILLA_CARD: number;
6
6
  export declare const NUM_COLLECTIBLE_TYPES: number;
7
7
  export declare const MAX_COLLECTIBLE_TYPE: number;
8
- export declare const NUM_VANILLA_COLLECTIBLE_TYPES: number;
9
- export declare const MAX_VANILLA_COLLECTIBLE_TYPE: number;
8
+ export declare const NUM_VANILLA_COLLECTIBLE_TYPES: CollectibleType;
9
+ export declare const MAX_VANILLA_COLLECTIBLE_TYPE: CollectibleType;
10
10
  export declare const NUM_PILL_EFFECTS: number;
11
11
  export declare const MAX_PILL_EFFECT: number;
12
12
  export declare const NUM_VANILLA_PILL_EFFECTS: number;
@@ -16,17 +16,17 @@ ____exports.MAX_CARD = ____exports.NUM_CARDS
16
16
  ____exports.NUM_VANILLA_CARDS = getEnumLength(nil, Card) - 1
17
17
  ____exports.MAX_VANILLA_CARD = ____exports.NUM_VANILLA_CARDS
18
18
  ____exports.NUM_COLLECTIBLE_TYPES = itemConfig:GetCollectibles().Size - 1
19
- ____exports.MAX_COLLECTIBLE_TYPE = ____exports.NUM_COLLECTIBLE_TYPES - 1
20
- ____exports.NUM_VANILLA_COLLECTIBLE_TYPES = getEnumLength(nil, CollectibleType) - 1
19
+ ____exports.MAX_COLLECTIBLE_TYPE = ____exports.NUM_COLLECTIBLE_TYPES
20
+ ____exports.NUM_VANILLA_COLLECTIBLE_TYPES = getLastEnumValue(nil, CollectibleType)
21
21
  ____exports.MAX_VANILLA_COLLECTIBLE_TYPE = ____exports.NUM_VANILLA_COLLECTIBLE_TYPES
22
22
  ____exports.NUM_PILL_EFFECTS = itemConfig:GetPillEffects().Size - 1
23
23
  ____exports.MAX_PILL_EFFECT = ____exports.NUM_PILL_EFFECTS
24
24
  ____exports.NUM_VANILLA_PILL_EFFECTS = getEnumLength(nil, PillEffect)
25
25
  ____exports.MAX_VANILLA_PILL_EFFECT = ____exports.NUM_VANILLA_PILL_EFFECTS
26
26
  ____exports.NUM_TRINKET_TYPES = itemConfig:GetTrinkets().Size - 1
27
- ____exports.MAX_TRINKET_TYPE = ____exports.NUM_COLLECTIBLE_TYPES - 1
27
+ ____exports.MAX_TRINKET_TYPE = ____exports.NUM_TRINKET_TYPES
28
28
  ____exports.NUM_VANILLA_TRINKET_TYPES = getEnumLength(nil, TrinketType) - 1
29
- ____exports.MAX_VANILLA_TRINKET_TYPE = ____exports.NUM_VANILLA_COLLECTIBLE_TYPES
29
+ ____exports.MAX_VANILLA_TRINKET_TYPE = ____exports.NUM_VANILLA_TRINKET_TYPES
30
30
  ____exports.MAX_VANILLA_PLAYER_TYPE = getLastEnumValue(nil, PlayerType)
31
31
  ____exports.MAX_NORMAL_PILL_COLOR = PillColor.WHITE_YELLOW
32
32
  return ____exports
@@ -47,10 +47,10 @@ import { SaveData } from "../../types/private/SaveData";
47
47
  * saveDataManager("feature1", v);
48
48
  * }
49
49
  *
50
- * // Elsewhere in the file, use your variables
50
+ * // Elsewhere in the file, use your variables.
51
51
  * function feature1Function() {
52
52
  * if (v.run.foo1 > 0) {
53
- * // Do stuff
53
+ * // TODO
54
54
  * }
55
55
  * }
56
56
  * ```
@@ -73,7 +73,7 @@ import { SaveData } from "../../types/private/SaveData";
73
73
  * @param key The name of the file or feature that is submitting data to be managed by the save data
74
74
  * manager. The save data manager will throw an error if the key is already registered.
75
75
  * @param v An object that corresponds to the `SaveData` interface. The object is conventionally
76
- * called "v" for brevity (which is short for "local variables").
76
+ * called "v" for brevity. ("v" is short for "local variables").
77
77
  * @param conditionalFunc An optional function to run upon saving this key to disk. For example,
78
78
  * this allows features to only save data to disk if the feature is enabled. Specify a value of `()
79
79
  * => false` to completely disable saving this feature to disk. This is useful if you are using data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "2.0.7",
3
+ "version": "2.0.10",
4
4
  "description": "Helper functions for IsaacScript mods",
5
5
  "keywords": [
6
6
  "isaac",
@@ -28,8 +28,8 @@
28
28
  "isaac-typescript-definitions": "^2.0.13"
29
29
  },
30
30
  "devDependencies": {
31
- "isaacscript-lint": "^1.0.141",
32
- "isaacscript-spell": "file:../isaacscript-spell",
31
+ "isaacscript-lint": "^1.0.142",
32
+ "isaacscript-spell": "^1.0.3",
33
33
  "isaacscript-tsconfig": "^1.1.16",
34
34
  "ts-node": "^10.7.0",
35
35
  "typedoc": "^0.22.15",