isaacscript-common 30.11.7 → 30.11.9

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.
@@ -2793,6 +2793,17 @@ declare class DebugDisplay extends Feature {
2793
2793
  * player. Use this function to specify a callback function that returns the string that should be
2794
2794
  * drawn.
2795
2795
  *
2796
+ * Once the function is set, the library will call it automatically on every frame. For this
2797
+ * reason, you typically only need to set the function once at the beginning of your mod.
2798
+ *
2799
+ * For example, this would draw the number of the player's collectibles next to their head:
2800
+ *
2801
+ * ```ts
2802
+ * setPlayerDisplay((player) => {
2803
+ * return `collectible count: ${player.GetCollectibleCount()}`;
2804
+ * });
2805
+ * ```
2806
+ *
2796
2807
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2797
2808
  */
2798
2809
  setPlayerDisplay(textCallback: (player: EntityPlayer) => string): void;
@@ -2801,6 +2812,9 @@ declare class DebugDisplay extends Feature {
2801
2812
  * tear. Use this function to specify a callback function that returns the string that should be
2802
2813
  * drawn.
2803
2814
  *
2815
+ * Once the function is set, the library will call it automatically on every frame. For this
2816
+ * reason, you typically only need to set the function once at the beginning of your mod.
2817
+ *
2804
2818
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2805
2819
  */
2806
2820
  setTearDisplay(textCallback: (tear: EntityTear) => string): void;
@@ -2809,6 +2823,9 @@ declare class DebugDisplay extends Feature {
2809
2823
  * each familiar. Use this function to specify a callback function that returns the string that
2810
2824
  * should be drawn.
2811
2825
  *
2826
+ * Once the function is set, the library will call it automatically on every frame. For this
2827
+ * reason, you typically only need to set the function once at the beginning of your mod.
2828
+ *
2812
2829
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2813
2830
  */
2814
2831
  setFamiliarDisplay(textCallback: (familiar: EntityFamiliar) => string): void;
@@ -2817,6 +2834,9 @@ declare class DebugDisplay extends Feature {
2817
2834
  * bomb. Use this function to specify a callback function that returns the string that should be
2818
2835
  * drawn.
2819
2836
  *
2837
+ * Once the function is set, the library will call it automatically on every frame. For this
2838
+ * reason, you typically only need to set the function once at the beginning of your mod.
2839
+ *
2820
2840
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2821
2841
  */
2822
2842
  setBombDisplay(textCallback: (bomb: EntityBomb) => string): void;
@@ -2825,6 +2845,9 @@ declare class DebugDisplay extends Feature {
2825
2845
  * pickup. Use this function to specify a callback function that returns the string that should be
2826
2846
  * drawn.
2827
2847
  *
2848
+ * Once the function is set, the library will call it automatically on every frame. For this
2849
+ * reason, you typically only need to set the function once at the beginning of your mod.
2850
+ *
2828
2851
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2829
2852
  */
2830
2853
  setPickupDisplay(textCallback: (pickup: EntityPickup) => string): void;
@@ -2833,6 +2856,9 @@ declare class DebugDisplay extends Feature {
2833
2856
  * slot. Use this function to specify a callback function that returns the string that should be
2834
2857
  * drawn.
2835
2858
  *
2859
+ * Once the function is set, the library will call it automatically on every frame. For this
2860
+ * reason, you typically only need to set the function once at the beginning of your mod.
2861
+ *
2836
2862
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2837
2863
  */
2838
2864
  setSlotDisplay(textCallback: (slot: Entity) => string): void;
@@ -2841,6 +2867,9 @@ declare class DebugDisplay extends Feature {
2841
2867
  * laser. Use this function to specify a callback function that returns the string that should be
2842
2868
  * drawn.
2843
2869
  *
2870
+ * Once the function is set, the library will call it automatically on every frame. For this
2871
+ * reason, you typically only need to set the function once at the beginning of your mod.
2872
+ *
2844
2873
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2845
2874
  */
2846
2875
  setLaserDisplay(textCallback: (laser: EntityLaser) => string): void;
@@ -2849,6 +2878,9 @@ declare class DebugDisplay extends Feature {
2849
2878
  * knife. Use this function to specify a callback function that returns the string that should be
2850
2879
  * drawn.
2851
2880
  *
2881
+ * Once the function is set, the library will call it automatically on every frame. For this
2882
+ * reason, you typically only need to set the function once at the beginning of your mod.
2883
+ *
2852
2884
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2853
2885
  */
2854
2886
  setKnifeDisplay(textCallback: (knife: EntityKnife) => string): void;
@@ -2857,6 +2889,9 @@ declare class DebugDisplay extends Feature {
2857
2889
  * each projectile. Use this function to specify a callback function that returns the string that
2858
2890
  * should be drawn.
2859
2891
  *
2892
+ * Once the function is set, the library will call it automatically on every frame. For this
2893
+ * reason, you typically only need to set the function once at the beginning of your mod.
2894
+ *
2860
2895
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2861
2896
  */
2862
2897
  setProjectileDisplay(textCallback: (projectile: EntityProjectile) => string): void;
@@ -2865,6 +2900,9 @@ declare class DebugDisplay extends Feature {
2865
2900
  * draw text on the screen next to each effect. Use this function to specify a callback function
2866
2901
  * that returns the string that should be drawn.
2867
2902
  *
2903
+ * Once the function is set, the library will call it automatically on every frame. For this
2904
+ * reason, you typically only need to set the function once at the beginning of your mod.
2905
+ *
2868
2906
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2869
2907
  */
2870
2908
  setEffectDisplay(textCallback: (effect: EntityEffect) => string): void;
@@ -2873,6 +2911,9 @@ declare class DebugDisplay extends Feature {
2873
2911
  * NPC. Use this function to specify a callback function that returns the string that should be
2874
2912
  * drawn.
2875
2913
  *
2914
+ * Once the function is set, the library will call it automatically on every frame. For this
2915
+ * reason, you typically only need to set the function once at the beginning of your mod.
2916
+ *
2876
2917
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2877
2918
  */
2878
2919
  setNPCDisplay(textCallback: (npc: EntityNPC) => string): void;
@@ -2881,6 +2922,9 @@ declare class DebugDisplay extends Feature {
2881
2922
  * rock. Use this function to specify a callback function that returns the string that should be
2882
2923
  * drawn.
2883
2924
  *
2925
+ * Once the function is set, the library will call it automatically on every frame. For this
2926
+ * reason, you typically only need to set the function once at the beginning of your mod.
2927
+ *
2884
2928
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2885
2929
  */
2886
2930
  setRockDisplay(textCallback: (rock: GridEntityRock) => string): void;
@@ -2889,6 +2933,9 @@ declare class DebugDisplay extends Feature {
2889
2933
  * pit. Use this function to specify a callback function that returns the string that should be
2890
2934
  * drawn.
2891
2935
  *
2936
+ * Once the function is set, the library will call it automatically on every frame. For this
2937
+ * reason, you typically only need to set the function once at the beginning of your mod.
2938
+ *
2892
2939
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2893
2940
  */
2894
2941
  setPitDisplay(textCallback: (pit: GridEntityPit) => string): void;
@@ -2897,6 +2944,9 @@ declare class DebugDisplay extends Feature {
2897
2944
  * spikes. Use this function to specify a callback function that returns the string that should be
2898
2945
  * drawn.
2899
2946
  *
2947
+ * Once the function is set, the library will call it automatically on every frame. For this
2948
+ * reason, you typically only need to set the function once at the beginning of your mod.
2949
+ *
2900
2950
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2901
2951
  */
2902
2952
  setSpikesDisplay(textCallback: (spikes: GridEntitySpikes) => string): void;
@@ -2905,6 +2955,9 @@ declare class DebugDisplay extends Feature {
2905
2955
  * TNT. Use this function to specify a callback function that returns the string that should be
2906
2956
  * drawn.
2907
2957
  *
2958
+ * Once the function is set, the library will call it automatically on every frame. For this
2959
+ * reason, you typically only need to set the function once at the beginning of your mod.
2960
+ *
2908
2961
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2909
2962
  */
2910
2963
  setTNTDisplay(textCallback: (tnt: GridEntityTNT) => string): void;
@@ -2913,6 +2966,9 @@ declare class DebugDisplay extends Feature {
2913
2966
  * poop. Use this function to specify a callback function that returns the string that should be
2914
2967
  * drawn.
2915
2968
  *
2969
+ * Once the function is set, the library will call it automatically on every frame. For this
2970
+ * reason, you typically only need to set the function once at the beginning of your mod.
2971
+ *
2916
2972
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2917
2973
  */
2918
2974
  setPoopDisplay(textCallback: (poop: GridEntityPoop) => string): void;
@@ -2921,6 +2977,9 @@ declare class DebugDisplay extends Feature {
2921
2977
  * door. Use this function to specify a callback function that returns the string that should be
2922
2978
  * drawn.
2923
2979
  *
2980
+ * Once the function is set, the library will call it automatically on every frame. For this
2981
+ * reason, you typically only need to set the function once at the beginning of your mod.
2982
+ *
2924
2983
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2925
2984
  */
2926
2985
  setDoorDisplay(textCallback: (door: GridEntityDoor) => string): void;
@@ -2929,6 +2988,9 @@ declare class DebugDisplay extends Feature {
2929
2988
  * to each pressure plate. Use this function to specify a callback function that returns the
2930
2989
  * string that should be drawn.
2931
2990
  *
2991
+ * Once the function is set, the library will call it automatically on every frame. For this
2992
+ * reason, you typically only need to set the function once at the beginning of your mod.
2993
+ *
2932
2994
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
2933
2995
  */
2934
2996
  setPressurePlateDisplay(textCallback: (pressurePlate: GridEntityPressurePlate) => string): void;
@@ -6091,8 +6153,8 @@ export declare function getPressurePlates(pressurePlateVariant?: PressurePlateVa
6091
6153
  export declare function getProjectiles(projectileVariant?: ProjectileVariant | -1, subType?: number): EntityProjectile[];
6092
6154
 
6093
6155
  /**
6094
- * This returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the
6095
- * high end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
6156
+ * Returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the high
6157
+ * end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
6096
6158
  *
6097
6159
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
6098
6160
  * `RNG.Next` method will be called. Default is `getRandomSeed()`.
@@ -6151,7 +6213,7 @@ export declare function getRandomColor(seedOrRNG?: Seed | RNG, alpha?: number):
6151
6213
  export declare function getRandomEnumValue<T>(transpiledEnum: T, seedOrRNG?: Seed | RNG, exceptions?: Array<T[keyof T]> | ReadonlyArray<T[keyof T]>): T[keyof T];
6152
6214
 
6153
6215
  /**
6154
- * This returns a random float between min and max.
6216
+ * Returns a random float between min and max.
6155
6217
  *
6156
6218
  * For example:
6157
6219
  *
@@ -6181,7 +6243,7 @@ export declare function getRandomFromWeightedArray<T>(weightedArray: WeightedArr
6181
6243
  export declare function getRandomIndexFromWeightedArray<T>(weightedArray: WeightedArray<T>, seedOrRNG?: Seed | RNG): int;
6182
6244
 
6183
6245
  /**
6184
- * This returns a random integer between min and max. It is inclusive on both ends.
6246
+ * Returns a random integer between min and max. It is inclusive on both ends.
6185
6247
  *
6186
6248
  * Note that this function will run the `Next` method on the `RNG` object before returning the
6187
6249
  * random number.
@@ -7222,6 +7284,8 @@ export declare function hasArmor(entity: Entity): boolean;
7222
7284
  *
7223
7285
  * This function is variadic, meaning that you can supply as many collectible types as you want to
7224
7286
  * check for. Returns true if the player has any of the supplied collectible types.
7287
+ *
7288
+ * This function always passes `false` to the `ignoreModifiers` argument.
7225
7289
  */
7226
7290
  export declare function hasCollectible(player: EntityPlayer, ...collectibleTypes: CollectibleType[]): boolean;
7227
7291
 
@@ -1,6 +1,6 @@
1
1
  --[[
2
2
 
3
- isaacscript-common 30.11.7
3
+ isaacscript-common 30.11.9
4
4
 
5
5
  This is the "isaacscript-common" library, which was created with the IsaacScript tool.
6
6
 
@@ -1305,7 +1305,6 @@ do
1305
1305
  end
1306
1306
  end
1307
1307
  end
1308
- Map[Symbol.species] = Map
1309
1308
  function Map.prototype.clear(self)
1310
1309
  self.items = {}
1311
1310
  self.nextKey = {}
@@ -1413,6 +1412,7 @@ do
1413
1412
  end
1414
1413
  }
1415
1414
  end
1415
+ Map[Symbol.species] = Map
1416
1416
  end
1417
1417
 
1418
1418
  local __TS__Match = string.match
@@ -1889,7 +1889,6 @@ do
1889
1889
  end
1890
1890
  end
1891
1891
  end
1892
- Set[Symbol.species] = Set
1893
1892
  function Set.prototype.add(self, value)
1894
1893
  local isNewValue = not self:has(value)
1895
1894
  if isNewValue then
@@ -1989,6 +1988,7 @@ do
1989
1988
  end
1990
1989
  }
1991
1990
  end
1991
+ Set[Symbol.species] = Set
1992
1992
  end
1993
1993
 
1994
1994
  local function __TS__SparseArrayNew(...)
@@ -2040,7 +2040,6 @@ do
2040
2040
  end
2041
2041
  end
2042
2042
  end
2043
- WeakMap[Symbol.species] = WeakMap
2044
2043
  function WeakMap.prototype.delete(self, key)
2045
2044
  local contains = self:has(key)
2046
2045
  self.items[key] = nil
@@ -2056,6 +2055,7 @@ do
2056
2055
  self.items[key] = value
2057
2056
  return self
2058
2057
  end
2058
+ WeakMap[Symbol.species] = WeakMap
2059
2059
  end
2060
2060
 
2061
2061
  local WeakSet
@@ -2085,7 +2085,6 @@ do
2085
2085
  end
2086
2086
  end
2087
2087
  end
2088
- WeakSet[Symbol.species] = WeakSet
2089
2088
  function WeakSet.prototype.add(self, value)
2090
2089
  self.items[value] = true
2091
2090
  return self
@@ -2098,6 +2097,7 @@ do
2098
2097
  function WeakSet.prototype.has(self, value)
2099
2098
  return self.items[value] == true
2100
2099
  end
2100
+ WeakSet[Symbol.species] = WeakSet
2101
2101
  end
2102
2102
 
2103
2103
  local function __TS__SourceMapTraceBack(fileName, sourceMap)
@@ -45761,9 +45761,9 @@ function DebugDisplay.prototype.toggleFeature(self, feature, featureName, force)
45761
45761
  shouldInit = force
45762
45762
  end
45763
45763
  if shouldInit then
45764
- self.mod:uninitFeature(feature)
45765
- else
45766
45764
  self.mod:initFeature(feature)
45765
+ else
45766
+ self.mod:uninitFeature(feature)
45767
45767
  end
45768
45768
  printEnabled(nil, feature.initialized, featureName .. " display")
45769
45769
  end
@@ -50469,7 +50469,7 @@ function FlyingDetection.prototype.____constructor(self, moddedElementSets)
50469
50469
  end
50470
50470
  function FlyingDetection.prototype.hasFlyingTemporaryEffect(self, player)
50471
50471
  local effects = player:GetEffects()
50472
- local flyingCollectibles = self.moddedElementSets:getFlyingCollectibles(false)
50472
+ local flyingCollectibles = self.moddedElementSets:getFlyingCollectibles(true)
50473
50473
  for ____, collectibleType in __TS__Iterator(flyingCollectibles) do
50474
50474
  if effects:HasCollectibleEffect(collectibleType) then
50475
50475
  return true
@@ -1254,7 +1254,6 @@ do
1254
1254
  end
1255
1255
  end
1256
1256
  end
1257
- Map[Symbol.species] = Map
1258
1257
  function Map.prototype.clear(self)
1259
1258
  self.items = {}
1260
1259
  self.nextKey = {}
@@ -1362,6 +1361,7 @@ do
1362
1361
  end
1363
1362
  }
1364
1363
  end
1364
+ Map[Symbol.species] = Map
1365
1365
  end
1366
1366
 
1367
1367
  local __TS__Match = string.match
@@ -1838,7 +1838,6 @@ do
1838
1838
  end
1839
1839
  end
1840
1840
  end
1841
- Set[Symbol.species] = Set
1842
1841
  function Set.prototype.add(self, value)
1843
1842
  local isNewValue = not self:has(value)
1844
1843
  if isNewValue then
@@ -1938,6 +1937,7 @@ do
1938
1937
  end
1939
1938
  }
1940
1939
  end
1940
+ Set[Symbol.species] = Set
1941
1941
  end
1942
1942
 
1943
1943
  local function __TS__SparseArrayNew(...)
@@ -1989,7 +1989,6 @@ do
1989
1989
  end
1990
1990
  end
1991
1991
  end
1992
- WeakMap[Symbol.species] = WeakMap
1993
1992
  function WeakMap.prototype.delete(self, key)
1994
1993
  local contains = self:has(key)
1995
1994
  self.items[key] = nil
@@ -2005,6 +2004,7 @@ do
2005
2004
  self.items[key] = value
2006
2005
  return self
2007
2006
  end
2007
+ WeakMap[Symbol.species] = WeakMap
2008
2008
  end
2009
2009
 
2010
2010
  local WeakSet
@@ -2034,7 +2034,6 @@ do
2034
2034
  end
2035
2035
  end
2036
2036
  end
2037
- WeakSet[Symbol.species] = WeakSet
2038
2037
  function WeakSet.prototype.add(self, value)
2039
2038
  self.items[value] = true
2040
2039
  return self
@@ -2047,6 +2046,7 @@ do
2047
2046
  function WeakSet.prototype.has(self, value)
2048
2047
  return self.items[value] == true
2049
2048
  end
2049
+ WeakSet[Symbol.species] = WeakSet
2050
2050
  end
2051
2051
 
2052
2052
  local function __TS__SourceMapTraceBack(fileName, sourceMap)
@@ -42,6 +42,17 @@ export declare class DebugDisplay extends Feature {
42
42
  * player. Use this function to specify a callback function that returns the string that should be
43
43
  * drawn.
44
44
  *
45
+ * Once the function is set, the library will call it automatically on every frame. For this
46
+ * reason, you typically only need to set the function once at the beginning of your mod.
47
+ *
48
+ * For example, this would draw the number of the player's collectibles next to their head:
49
+ *
50
+ * ```ts
51
+ * setPlayerDisplay((player) => {
52
+ * return `collectible count: ${player.GetCollectibleCount()}`;
53
+ * });
54
+ * ```
55
+ *
45
56
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
46
57
  */
47
58
  setPlayerDisplay(textCallback: (player: EntityPlayer) => string): void;
@@ -50,6 +61,9 @@ export declare class DebugDisplay extends Feature {
50
61
  * tear. Use this function to specify a callback function that returns the string that should be
51
62
  * drawn.
52
63
  *
64
+ * Once the function is set, the library will call it automatically on every frame. For this
65
+ * reason, you typically only need to set the function once at the beginning of your mod.
66
+ *
53
67
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
54
68
  */
55
69
  setTearDisplay(textCallback: (tear: EntityTear) => string): void;
@@ -58,6 +72,9 @@ export declare class DebugDisplay extends Feature {
58
72
  * each familiar. Use this function to specify a callback function that returns the string that
59
73
  * should be drawn.
60
74
  *
75
+ * Once the function is set, the library will call it automatically on every frame. For this
76
+ * reason, you typically only need to set the function once at the beginning of your mod.
77
+ *
61
78
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
62
79
  */
63
80
  setFamiliarDisplay(textCallback: (familiar: EntityFamiliar) => string): void;
@@ -66,6 +83,9 @@ export declare class DebugDisplay extends Feature {
66
83
  * bomb. Use this function to specify a callback function that returns the string that should be
67
84
  * drawn.
68
85
  *
86
+ * Once the function is set, the library will call it automatically on every frame. For this
87
+ * reason, you typically only need to set the function once at the beginning of your mod.
88
+ *
69
89
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
70
90
  */
71
91
  setBombDisplay(textCallback: (bomb: EntityBomb) => string): void;
@@ -74,6 +94,9 @@ export declare class DebugDisplay extends Feature {
74
94
  * pickup. Use this function to specify a callback function that returns the string that should be
75
95
  * drawn.
76
96
  *
97
+ * Once the function is set, the library will call it automatically on every frame. For this
98
+ * reason, you typically only need to set the function once at the beginning of your mod.
99
+ *
77
100
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
78
101
  */
79
102
  setPickupDisplay(textCallback: (pickup: EntityPickup) => string): void;
@@ -82,6 +105,9 @@ export declare class DebugDisplay extends Feature {
82
105
  * slot. Use this function to specify a callback function that returns the string that should be
83
106
  * drawn.
84
107
  *
108
+ * Once the function is set, the library will call it automatically on every frame. For this
109
+ * reason, you typically only need to set the function once at the beginning of your mod.
110
+ *
85
111
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
86
112
  */
87
113
  setSlotDisplay(textCallback: (slot: Entity) => string): void;
@@ -90,6 +116,9 @@ export declare class DebugDisplay extends Feature {
90
116
  * laser. Use this function to specify a callback function that returns the string that should be
91
117
  * drawn.
92
118
  *
119
+ * Once the function is set, the library will call it automatically on every frame. For this
120
+ * reason, you typically only need to set the function once at the beginning of your mod.
121
+ *
93
122
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
94
123
  */
95
124
  setLaserDisplay(textCallback: (laser: EntityLaser) => string): void;
@@ -98,6 +127,9 @@ export declare class DebugDisplay extends Feature {
98
127
  * knife. Use this function to specify a callback function that returns the string that should be
99
128
  * drawn.
100
129
  *
130
+ * Once the function is set, the library will call it automatically on every frame. For this
131
+ * reason, you typically only need to set the function once at the beginning of your mod.
132
+ *
101
133
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
102
134
  */
103
135
  setKnifeDisplay(textCallback: (knife: EntityKnife) => string): void;
@@ -106,6 +138,9 @@ export declare class DebugDisplay extends Feature {
106
138
  * each projectile. Use this function to specify a callback function that returns the string that
107
139
  * should be drawn.
108
140
  *
141
+ * Once the function is set, the library will call it automatically on every frame. For this
142
+ * reason, you typically only need to set the function once at the beginning of your mod.
143
+ *
109
144
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
110
145
  */
111
146
  setProjectileDisplay(textCallback: (projectile: EntityProjectile) => string): void;
@@ -114,6 +149,9 @@ export declare class DebugDisplay extends Feature {
114
149
  * draw text on the screen next to each effect. Use this function to specify a callback function
115
150
  * that returns the string that should be drawn.
116
151
  *
152
+ * Once the function is set, the library will call it automatically on every frame. For this
153
+ * reason, you typically only need to set the function once at the beginning of your mod.
154
+ *
117
155
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
118
156
  */
119
157
  setEffectDisplay(textCallback: (effect: EntityEffect) => string): void;
@@ -122,6 +160,9 @@ export declare class DebugDisplay extends Feature {
122
160
  * NPC. Use this function to specify a callback function that returns the string that should be
123
161
  * drawn.
124
162
  *
163
+ * Once the function is set, the library will call it automatically on every frame. For this
164
+ * reason, you typically only need to set the function once at the beginning of your mod.
165
+ *
125
166
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
126
167
  */
127
168
  setNPCDisplay(textCallback: (npc: EntityNPC) => string): void;
@@ -130,6 +171,9 @@ export declare class DebugDisplay extends Feature {
130
171
  * rock. Use this function to specify a callback function that returns the string that should be
131
172
  * drawn.
132
173
  *
174
+ * Once the function is set, the library will call it automatically on every frame. For this
175
+ * reason, you typically only need to set the function once at the beginning of your mod.
176
+ *
133
177
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
134
178
  */
135
179
  setRockDisplay(textCallback: (rock: GridEntityRock) => string): void;
@@ -138,6 +182,9 @@ export declare class DebugDisplay extends Feature {
138
182
  * pit. Use this function to specify a callback function that returns the string that should be
139
183
  * drawn.
140
184
  *
185
+ * Once the function is set, the library will call it automatically on every frame. For this
186
+ * reason, you typically only need to set the function once at the beginning of your mod.
187
+ *
141
188
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
142
189
  */
143
190
  setPitDisplay(textCallback: (pit: GridEntityPit) => string): void;
@@ -146,6 +193,9 @@ export declare class DebugDisplay extends Feature {
146
193
  * spikes. Use this function to specify a callback function that returns the string that should be
147
194
  * drawn.
148
195
  *
196
+ * Once the function is set, the library will call it automatically on every frame. For this
197
+ * reason, you typically only need to set the function once at the beginning of your mod.
198
+ *
149
199
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
150
200
  */
151
201
  setSpikesDisplay(textCallback: (spikes: GridEntitySpikes) => string): void;
@@ -154,6 +204,9 @@ export declare class DebugDisplay extends Feature {
154
204
  * TNT. Use this function to specify a callback function that returns the string that should be
155
205
  * drawn.
156
206
  *
207
+ * Once the function is set, the library will call it automatically on every frame. For this
208
+ * reason, you typically only need to set the function once at the beginning of your mod.
209
+ *
157
210
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
158
211
  */
159
212
  setTNTDisplay(textCallback: (tnt: GridEntityTNT) => string): void;
@@ -162,6 +215,9 @@ export declare class DebugDisplay extends Feature {
162
215
  * poop. Use this function to specify a callback function that returns the string that should be
163
216
  * drawn.
164
217
  *
218
+ * Once the function is set, the library will call it automatically on every frame. For this
219
+ * reason, you typically only need to set the function once at the beginning of your mod.
220
+ *
165
221
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
166
222
  */
167
223
  setPoopDisplay(textCallback: (poop: GridEntityPoop) => string): void;
@@ -170,6 +226,9 @@ export declare class DebugDisplay extends Feature {
170
226
  * door. Use this function to specify a callback function that returns the string that should be
171
227
  * drawn.
172
228
  *
229
+ * Once the function is set, the library will call it automatically on every frame. For this
230
+ * reason, you typically only need to set the function once at the beginning of your mod.
231
+ *
173
232
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
174
233
  */
175
234
  setDoorDisplay(textCallback: (door: GridEntityDoor) => string): void;
@@ -178,6 +237,9 @@ export declare class DebugDisplay extends Feature {
178
237
  * to each pressure plate. Use this function to specify a callback function that returns the
179
238
  * string that should be drawn.
180
239
  *
240
+ * Once the function is set, the library will call it automatically on every frame. For this
241
+ * reason, you typically only need to set the function once at the beginning of your mod.
242
+ *
181
243
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
182
244
  */
183
245
  setPressurePlateDisplay(textCallback: (pressurePlate: GridEntityPressurePlate) => string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"DebugDisplay.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/DebugDisplay.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAoBhD,qBAAa,YAAa,SAAQ,OAAO;IACvC,OAAO,CAAC,GAAG,CAAuB;IAElC,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,IAAI,CAA0B;IACtC,OAAO,CAAC,QAAQ,CAA8B;IAC9C,OAAO,CAAC,IAAI,CAA0B;IACtC,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,IAAI,CAA0B;IACtC,OAAO,CAAC,KAAK,CAA2B;IACxC,OAAO,CAAC,KAAK,CAA2B;IACxC,OAAO,CAAC,UAAU,CAAgC;IAClD,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,GAAG,CAAyB;IAEpC,OAAO,CAAC,IAAI,CAA0B;IACtC,OAAO,CAAC,GAAG,CAAyB;IACpC,OAAO,CAAC,MAAM,CAA4B;IAC1C,OAAO,CAAC,GAAG,CAAyB;IACpC,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150,9 @@ function DebugDisplay.prototype.toggleFeature(self, feature, featureName, force)
150
150
  shouldInit = force
151
151
  end
152
152
  if shouldInit then
153
- self.mod:uninitFeature(feature)
154
- else
155
153
  self.mod:initFeature(feature)
154
+ else
155
+ self.mod:uninitFeature(feature)
156
156
  end
157
157
  printEnabled(nil, feature.initialized, featureName .. " display")
158
158
  end
@@ -1 +1 @@
1
- {"version":3,"file":"FlyingDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/FlyingDetection.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAShD,qBAAa,eAAgB,SAAQ,OAAO;IAC1C,OAAO,CAAC,iBAAiB,CAAoB;IAW7C;;;;;OAKG;IAEI,wBAAwB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO;CA4B/D"}
1
+ {"version":3,"file":"FlyingDetection.d.ts","sourceRoot":"","sources":["../../../../../src/classes/features/other/FlyingDetection.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAShD,qBAAa,eAAgB,SAAQ,OAAO;IAC1C,OAAO,CAAC,iBAAiB,CAAoB;IAW7C;;;;;OAKG;IAEI,wBAAwB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO;CA8B/D"}
@@ -24,7 +24,7 @@ function FlyingDetection.prototype.____constructor(self, moddedElementSets)
24
24
  end
25
25
  function FlyingDetection.prototype.hasFlyingTemporaryEffect(self, player)
26
26
  local effects = player:GetEffects()
27
- local flyingCollectibles = self.moddedElementSets:getFlyingCollectibles(false)
27
+ local flyingCollectibles = self.moddedElementSets:getFlyingCollectibles(true)
28
28
  for ____, collectibleType in __TS__Iterator(flyingCollectibles) do
29
29
  if effects:HasCollectibleEffect(collectibleType) then
30
30
  return true
@@ -187,6 +187,8 @@ export declare function getTotalPlayerCollectibles(collectibleType: CollectibleT
187
187
  *
188
188
  * This function is variadic, meaning that you can supply as many collectible types as you want to
189
189
  * check for. Returns true if the player has any of the supplied collectible types.
190
+ *
191
+ * This function always passes `false` to the `ignoreModifiers` argument.
190
192
  */
191
193
  export declare function hasCollectible(player: EntityPlayer, ...collectibleTypes: CollectibleType[]): boolean;
192
194
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,eAAe,EACf,eAAe,EAEf,UAAU,EACV,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAkBtC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAIN;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,EAChC,eAAe,CAAC,EAAE,OAAO,GACxB,OAAO,CAKT;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,eAAe,CAAC,EAAE,OAAO,GACxB,OAAO,CAKT;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAG9C;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,kBAAkB,EAAE,UAAU,EAAE,GAAG,OAAO,CAIxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CASjE;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAWzD;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,YAAY,EACp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QN;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIlE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,EAChC,UAAU,aAAqB,EAC/B,MAAM,CAAC,EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
1
+ {"version":3,"file":"players.d.ts","sourceRoot":"","sources":["../../../src/functions/players.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EAEV,eAAe,EACf,eAAe,EAEf,UAAU,EACV,UAAU,EACV,WAAW,EACZ,MAAM,8BAA8B,CAAC;AAkBtC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,EACpB,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAIN;AAED,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,eAAe,EAAE,eAAe,EAChC,eAAe,CAAC,EAAE,OAAO,GACxB,OAAO,CAKT;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,WA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oB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAa/D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAalE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAIN;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAON;AAED;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,GAAG,gBAAgB,EAAE,eAAe,EAAE,GACrC,IAAI,CAQN;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAIlE;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,WAAW,EAAE,WAAW,GACvB,IAAI,CAON;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,EAChC,UAAU,aAAqB,EAC/B,MAAM,CAAC,EAAE,GAAG,EACZ,WAAW,UAAQ,GAClB,IAAI,CA6DN;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,OAAO,EAChB,aAAa,UAAO,GACnB,IAAI,CAsBN;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,YAAY,EACpB,eAAe,EAAE,eAAe,GAC/B,IAAI,CAEN"}
@@ -414,6 +414,8 @@ end
414
414
  --
415
415
  -- This function is variadic, meaning that you can supply as many collectible types as you want to
416
416
  -- check for. Returns true if the player has any of the supplied collectible types.
417
+ --
418
+ -- This function always passes `false` to the `ignoreModifiers` argument.
417
419
  function ____exports.hasCollectible(self, player, ...)
418
420
  local collectibleTypes = {...}
419
421
  return __TS__ArraySome(
@@ -2,15 +2,15 @@
2
2
  /// <reference types="isaac-typescript-definitions" />
3
3
  /// <reference types="isaac-typescript-definitions" />
4
4
  /**
5
- * This returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the
6
- * high end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
5
+ * Returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the high
6
+ * end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
7
7
  *
8
8
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
9
9
  * `RNG.Next` method will be called. Default is `getRandomSeed()`.
10
10
  */
11
11
  export declare function getRandom(seedOrRNG?: Seed | RNG): float;
12
12
  /**
13
- * This returns a random float between min and max.
13
+ * Returns a random float between min and max.
14
14
  *
15
15
  * For example:
16
16
  *
@@ -25,7 +25,7 @@ export declare function getRandom(seedOrRNG?: Seed | RNG): float;
25
25
  */
26
26
  export declare function getRandomFloat(min: int, max: int, seedOrRNG?: Seed | RNG): float;
27
27
  /**
28
- * This returns a random integer between min and max. It is inclusive on both ends.
28
+ * Returns a random integer between min and max. It is inclusive on both ends.
29
29
  *
30
30
  * Note that this function will run the `Next` method on the `RNG` object before returning the
31
31
  * random number.
@@ -7,8 +7,8 @@ local ____rng = require("src.functions.rng")
7
7
  local getRandomSeed = ____rng.getRandomSeed
8
8
  local isRNG = ____rng.isRNG
9
9
  local newRNG = ____rng.newRNG
10
- --- This returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the
11
- -- high end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
10
+ --- Returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the high
11
+ -- end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
12
12
  --
13
13
  -- @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
14
14
  -- `RNG.Next` method will be called. Default is `getRandomSeed()`.
@@ -19,7 +19,7 @@ function ____exports.getRandom(self, seedOrRNG)
19
19
  local rng = isRNG(nil, seedOrRNG) and seedOrRNG or newRNG(nil, seedOrRNG)
20
20
  return rng:RandomFloat()
21
21
  end
22
- --- This returns a random float between min and max.
22
+ --- Returns a random float between min and max.
23
23
  --
24
24
  -- For example:
25
25
  --
@@ -43,7 +43,7 @@ function ____exports.getRandomFloat(self, min, max, seedOrRNG)
43
43
  end
44
44
  return min + ____exports.getRandom(nil, seedOrRNG) * (max - min)
45
45
  end
46
- --- This returns a random integer between min and max. It is inclusive on both ends.
46
+ --- Returns a random integer between min and max. It is inclusive on both ends.
47
47
  --
48
48
  -- Note that this function will run the `Next` method on the `RNG` object before returning the
49
49
  -- random number.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isaacscript-common",
3
- "version": "30.11.7",
3
+ "version": "30.11.9",
4
4
  "description": "Helper functions and features for IsaacScript mods.",
5
5
  "keywords": [
6
6
  "isaac",
@@ -60,6 +60,17 @@ export class DebugDisplay extends Feature {
60
60
  * player. Use this function to specify a callback function that returns the string that should be
61
61
  * drawn.
62
62
  *
63
+ * Once the function is set, the library will call it automatically on every frame. For this
64
+ * reason, you typically only need to set the function once at the beginning of your mod.
65
+ *
66
+ * For example, this would draw the number of the player's collectibles next to their head:
67
+ *
68
+ * ```ts
69
+ * setPlayerDisplay((player) => {
70
+ * return `collectible count: ${player.GetCollectibleCount()}`;
71
+ * });
72
+ * ```
73
+ *
63
74
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
64
75
  */
65
76
  @Exported
@@ -74,6 +85,9 @@ export class DebugDisplay extends Feature {
74
85
  * tear. Use this function to specify a callback function that returns the string that should be
75
86
  * drawn.
76
87
  *
88
+ * Once the function is set, the library will call it automatically on every frame. For this
89
+ * reason, you typically only need to set the function once at the beginning of your mod.
90
+ *
77
91
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
78
92
  */
79
93
  @Exported
@@ -86,6 +100,9 @@ export class DebugDisplay extends Feature {
86
100
  * each familiar. Use this function to specify a callback function that returns the string that
87
101
  * should be drawn.
88
102
  *
103
+ * Once the function is set, the library will call it automatically on every frame. For this
104
+ * reason, you typically only need to set the function once at the beginning of your mod.
105
+ *
89
106
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
90
107
  */
91
108
  @Exported
@@ -100,6 +117,9 @@ export class DebugDisplay extends Feature {
100
117
  * bomb. Use this function to specify a callback function that returns the string that should be
101
118
  * drawn.
102
119
  *
120
+ * Once the function is set, the library will call it automatically on every frame. For this
121
+ * reason, you typically only need to set the function once at the beginning of your mod.
122
+ *
103
123
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
104
124
  */
105
125
  @Exported
@@ -112,6 +132,9 @@ export class DebugDisplay extends Feature {
112
132
  * pickup. Use this function to specify a callback function that returns the string that should be
113
133
  * drawn.
114
134
  *
135
+ * Once the function is set, the library will call it automatically on every frame. For this
136
+ * reason, you typically only need to set the function once at the beginning of your mod.
137
+ *
115
138
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
116
139
  */
117
140
  @Exported
@@ -126,6 +149,9 @@ export class DebugDisplay extends Feature {
126
149
  * slot. Use this function to specify a callback function that returns the string that should be
127
150
  * drawn.
128
151
  *
152
+ * Once the function is set, the library will call it automatically on every frame. For this
153
+ * reason, you typically only need to set the function once at the beginning of your mod.
154
+ *
129
155
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
130
156
  */
131
157
  @Exported
@@ -138,6 +164,9 @@ export class DebugDisplay extends Feature {
138
164
  * laser. Use this function to specify a callback function that returns the string that should be
139
165
  * drawn.
140
166
  *
167
+ * Once the function is set, the library will call it automatically on every frame. For this
168
+ * reason, you typically only need to set the function once at the beginning of your mod.
169
+ *
141
170
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
142
171
  */
143
172
  @Exported
@@ -150,6 +179,9 @@ export class DebugDisplay extends Feature {
150
179
  * knife. Use this function to specify a callback function that returns the string that should be
151
180
  * drawn.
152
181
  *
182
+ * Once the function is set, the library will call it automatically on every frame. For this
183
+ * reason, you typically only need to set the function once at the beginning of your mod.
184
+ *
153
185
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
154
186
  */
155
187
  @Exported
@@ -162,6 +194,9 @@ export class DebugDisplay extends Feature {
162
194
  * each projectile. Use this function to specify a callback function that returns the string that
163
195
  * should be drawn.
164
196
  *
197
+ * Once the function is set, the library will call it automatically on every frame. For this
198
+ * reason, you typically only need to set the function once at the beginning of your mod.
199
+ *
165
200
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
166
201
  */
167
202
  @Exported
@@ -176,6 +211,9 @@ export class DebugDisplay extends Feature {
176
211
  * draw text on the screen next to each effect. Use this function to specify a callback function
177
212
  * that returns the string that should be drawn.
178
213
  *
214
+ * Once the function is set, the library will call it automatically on every frame. For this
215
+ * reason, you typically only need to set the function once at the beginning of your mod.
216
+ *
179
217
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
180
218
  */
181
219
  @Exported
@@ -190,6 +228,9 @@ export class DebugDisplay extends Feature {
190
228
  * NPC. Use this function to specify a callback function that returns the string that should be
191
229
  * drawn.
192
230
  *
231
+ * Once the function is set, the library will call it automatically on every frame. For this
232
+ * reason, you typically only need to set the function once at the beginning of your mod.
233
+ *
193
234
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
194
235
  */
195
236
  @Exported
@@ -202,6 +243,9 @@ export class DebugDisplay extends Feature {
202
243
  * rock. Use this function to specify a callback function that returns the string that should be
203
244
  * drawn.
204
245
  *
246
+ * Once the function is set, the library will call it automatically on every frame. For this
247
+ * reason, you typically only need to set the function once at the beginning of your mod.
248
+ *
205
249
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
206
250
  */
207
251
  @Exported
@@ -214,6 +258,9 @@ export class DebugDisplay extends Feature {
214
258
  * pit. Use this function to specify a callback function that returns the string that should be
215
259
  * drawn.
216
260
  *
261
+ * Once the function is set, the library will call it automatically on every frame. For this
262
+ * reason, you typically only need to set the function once at the beginning of your mod.
263
+ *
217
264
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
218
265
  */
219
266
  @Exported
@@ -226,6 +273,9 @@ export class DebugDisplay extends Feature {
226
273
  * spikes. Use this function to specify a callback function that returns the string that should be
227
274
  * drawn.
228
275
  *
276
+ * Once the function is set, the library will call it automatically on every frame. For this
277
+ * reason, you typically only need to set the function once at the beginning of your mod.
278
+ *
229
279
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
230
280
  */
231
281
  @Exported
@@ -240,6 +290,9 @@ export class DebugDisplay extends Feature {
240
290
  * TNT. Use this function to specify a callback function that returns the string that should be
241
291
  * drawn.
242
292
  *
293
+ * Once the function is set, the library will call it automatically on every frame. For this
294
+ * reason, you typically only need to set the function once at the beginning of your mod.
295
+ *
243
296
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
244
297
  */
245
298
  @Exported
@@ -252,6 +305,9 @@ export class DebugDisplay extends Feature {
252
305
  * poop. Use this function to specify a callback function that returns the string that should be
253
306
  * drawn.
254
307
  *
308
+ * Once the function is set, the library will call it automatically on every frame. For this
309
+ * reason, you typically only need to set the function once at the beginning of your mod.
310
+ *
255
311
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
256
312
  */
257
313
  @Exported
@@ -264,6 +320,9 @@ export class DebugDisplay extends Feature {
264
320
  * door. Use this function to specify a callback function that returns the string that should be
265
321
  * drawn.
266
322
  *
323
+ * Once the function is set, the library will call it automatically on every frame. For this
324
+ * reason, you typically only need to set the function once at the beginning of your mod.
325
+ *
267
326
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
268
327
  */
269
328
  @Exported
@@ -276,6 +335,9 @@ export class DebugDisplay extends Feature {
276
335
  * to each pressure plate. Use this function to specify a callback function that returns the
277
336
  * string that should be drawn.
278
337
  *
338
+ * Once the function is set, the library will call it automatically on every frame. For this
339
+ * reason, you typically only need to set the function once at the beginning of your mod.
340
+ *
279
341
  * In order to use this function, you must upgrade your mod with `ISCFeature.DEBUG_DISPLAY`.
280
342
  */
281
343
  @Exported
@@ -300,9 +362,9 @@ export class DebugDisplay extends Feature {
300
362
  }
301
363
 
302
364
  if (shouldInit) {
303
- this.mod.uninitFeature(feature);
304
- } else {
305
365
  this.mod.initFeature(feature);
366
+ } else {
367
+ this.mod.uninitFeature(feature);
306
368
  }
307
369
 
308
370
  printEnabled(feature.initialized, `${featureName} display`);
@@ -32,10 +32,12 @@ export class FlyingDetection extends Feature {
32
32
  public hasFlyingTemporaryEffect(player: EntityPlayer): boolean {
33
33
  const effects = player.GetEffects();
34
34
 
35
- // - Hanged Man card gives a Transcendence temporary effect.
35
+ // - We specify true to the `getFlyingCollectibles` function since conditional flying
36
+ // collectibles will only grant a temporary effect if their condition is activated.
37
+ // - The Hanged Man card gives a Transcendence temporary effect.
36
38
  // - Pinking Shears gives a Transcendence temporary effect.
37
39
  const flyingCollectibles =
38
- this.moddedElementSets.getFlyingCollectibles(false);
40
+ this.moddedElementSets.getFlyingCollectibles(true);
39
41
  for (const collectibleType of flyingCollectibles) {
40
42
  if (effects.HasCollectibleEffect(collectibleType)) {
41
43
  return true;
@@ -496,6 +496,8 @@ export function getTotalPlayerCollectibles(
496
496
  *
497
497
  * This function is variadic, meaning that you can supply as many collectible types as you want to
498
498
  * check for. Returns true if the player has any of the supplied collectible types.
499
+ *
500
+ * This function always passes `false` to the `ignoreModifiers` argument.
499
501
  */
500
502
  export function hasCollectible(
501
503
  player: EntityPlayer,
@@ -2,8 +2,8 @@ import { ReadonlySet } from "../types/ReadonlySet";
2
2
  import { getRandomSeed, isRNG, newRNG } from "./rng";
3
3
 
4
4
  /**
5
- * This returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the
6
- * high end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
5
+ * Returns a random float between 0 and 1. It is inclusive on the low end, but exclusive on the high
6
+ * end. (This is because the `RNG.RandomFloat` method will never return a value of exactly 1.)
7
7
  *
8
8
  * @param seedOrRNG Optional. The `Seed` or `RNG` object to use. If an `RNG` object is provided, the
9
9
  * `RNG.Next` method will be called. Default is `getRandomSeed()`.
@@ -14,7 +14,7 @@ export function getRandom(seedOrRNG: Seed | RNG = getRandomSeed()): float {
14
14
  }
15
15
 
16
16
  /**
17
- * This returns a random float between min and max.
17
+ * Returns a random float between min and max.
18
18
  *
19
19
  * For example:
20
20
  *
@@ -44,7 +44,7 @@ export function getRandomFloat(
44
44
  }
45
45
 
46
46
  /**
47
- * This returns a random integer between min and max. It is inclusive on both ends.
47
+ * Returns a random integer between min and max. It is inclusive on both ends.
48
48
  *
49
49
  * Note that this function will run the `Next` method on the `RNG` object before returning the
50
50
  * random number.