isaacscript-common 17.7.3 → 17.8.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
|
@@ -6839,6 +6839,19 @@ export declare function inDimension(dimension: Dimension): boolean;
|
|
|
6839
6839
|
|
|
6840
6840
|
export declare function inDoubleTrouble(): boolean;
|
|
6841
6841
|
|
|
6842
|
+
/**
|
|
6843
|
+
* Helper function to check if a variable is within a certain range, exclusive on both ends. (The
|
|
6844
|
+
* "e" stands for exclusive.)
|
|
6845
|
+
*
|
|
6846
|
+
* - For example, `inERange(1, 1, 3)` will return `false`.
|
|
6847
|
+
* - For example, `inERange(1.01, 1, 3)` will return `true`.
|
|
6848
|
+
*
|
|
6849
|
+
* @param num The number to check.
|
|
6850
|
+
* @param start The start of the range to check.
|
|
6851
|
+
* @param end The end of the range to check.
|
|
6852
|
+
*/
|
|
6853
|
+
export declare function inERange(num: int, start: int, end: int): boolean;
|
|
6854
|
+
|
|
6842
6855
|
export declare function inGenesisRoom(): boolean;
|
|
6843
6856
|
|
|
6844
6857
|
/**
|
|
@@ -6849,6 +6862,19 @@ export declare function inGenesisRoom(): boolean;
|
|
|
6849
6862
|
*/
|
|
6850
6863
|
export declare function inHomeCloset(): boolean;
|
|
6851
6864
|
|
|
6865
|
+
/**
|
|
6866
|
+
* Helper function to check if a variable is within a certain range, inclusive on both ends. (The
|
|
6867
|
+
* "i" stands for inclusive.)
|
|
6868
|
+
*
|
|
6869
|
+
* - For example, `inIRange(1, 1, 3)` will return `true`.
|
|
6870
|
+
* - For example, `inIRange(0, 1, 3)` will return `false`.
|
|
6871
|
+
*
|
|
6872
|
+
* @param num The number to check.
|
|
6873
|
+
* @param start The start of the range to check.
|
|
6874
|
+
* @param end The end of the range to check.
|
|
6875
|
+
*/
|
|
6876
|
+
export declare function inIRange(num: int, start: int, end: int): boolean;
|
|
6877
|
+
|
|
6852
6878
|
/**
|
|
6853
6879
|
* Initializes an array with all of the elements containing the specified default value.
|
|
6854
6880
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 17.
|
|
3
|
+
isaacscript-common 17.8.0
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -15337,6 +15337,12 @@ function ____exports.iRange(self, start, ____end, increment)
|
|
|
15337
15337
|
end
|
|
15338
15338
|
return array
|
|
15339
15339
|
end
|
|
15340
|
+
function ____exports.inERange(self, num, start, ____end)
|
|
15341
|
+
return num > start and num < ____end
|
|
15342
|
+
end
|
|
15343
|
+
function ____exports.inIRange(self, num, start, ____end)
|
|
15344
|
+
return num >= start and num <= ____end
|
|
15345
|
+
end
|
|
15340
15346
|
function ____exports.isReflectionRender(self)
|
|
15341
15347
|
local room = game:GetRoom()
|
|
15342
15348
|
local renderMode = room:GetRenderMode()
|
|
@@ -30,6 +30,30 @@ export declare function getTraversalDescription(key: unknown, traversalDescripti
|
|
|
30
30
|
* @param increment Optional. The increment to use. Default is 1.
|
|
31
31
|
*/
|
|
32
32
|
export declare function iRange(start: int, end?: int, increment?: number): int[];
|
|
33
|
+
/**
|
|
34
|
+
* Helper function to check if a variable is within a certain range, exclusive on both ends. (The
|
|
35
|
+
* "e" stands for exclusive.)
|
|
36
|
+
*
|
|
37
|
+
* - For example, `inERange(1, 1, 3)` will return `false`.
|
|
38
|
+
* - For example, `inERange(1.01, 1, 3)` will return `true`.
|
|
39
|
+
*
|
|
40
|
+
* @param num The number to check.
|
|
41
|
+
* @param start The start of the range to check.
|
|
42
|
+
* @param end The end of the range to check.
|
|
43
|
+
*/
|
|
44
|
+
export declare function inERange(num: int, start: int, end: int): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Helper function to check if a variable is within a certain range, inclusive on both ends. (The
|
|
47
|
+
* "i" stands for inclusive.)
|
|
48
|
+
*
|
|
49
|
+
* - For example, `inIRange(1, 1, 3)` will return `true`.
|
|
50
|
+
* - For example, `inIRange(0, 1, 3)` will return `false`.
|
|
51
|
+
*
|
|
52
|
+
* @param num The number to check.
|
|
53
|
+
* @param start The start of the range to check.
|
|
54
|
+
* @param end The end of the range to check.
|
|
55
|
+
*/
|
|
56
|
+
export declare function inIRange(num: int, start: int, end: int): boolean;
|
|
33
57
|
/**
|
|
34
58
|
* Helper function to see if the current render callback is rendering a water reflection.
|
|
35
59
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/functions/utils.ts"],"names":[],"mappings":";AAIA;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,SAAS,SAAI,GAAG,GAAG,EAAE,CAYlE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,oBAAoB,EAAE,MAAM,GAC3B,MAAM,CAQR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,GAAG,EAAE,SAAS,SAAI,GAAG,GAAG,EAAE,CAYlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAI5C;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAEpE;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,SAAS,MAAM,GAAG,MAAM,EAC5B,CAAC,SAAS,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,EAE/B,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAE1C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED,iGAAiG;AACj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AAM,CAAC,IAAI,EAAE,OAAO,CAAC,EAC/B,IAAI,SAAS,MAAM,GAAG,MAAM,KACzB,IAAI,CAAG"}
|
|
@@ -70,6 +70,30 @@ function ____exports.iRange(self, start, ____end, increment)
|
|
|
70
70
|
end
|
|
71
71
|
return array
|
|
72
72
|
end
|
|
73
|
+
--- Helper function to check if a variable is within a certain range, exclusive on both ends. (The
|
|
74
|
+
-- "e" stands for exclusive.)
|
|
75
|
+
--
|
|
76
|
+
-- - For example, `inERange(1, 1, 3)` will return `false`.
|
|
77
|
+
-- - For example, `inERange(1.01, 1, 3)` will return `true`.
|
|
78
|
+
--
|
|
79
|
+
-- @param num The number to check.
|
|
80
|
+
-- @param start The start of the range to check.
|
|
81
|
+
-- @param end The end of the range to check.
|
|
82
|
+
function ____exports.inERange(self, num, start, ____end)
|
|
83
|
+
return num > start and num < ____end
|
|
84
|
+
end
|
|
85
|
+
--- Helper function to check if a variable is within a certain range, inclusive on both ends. (The
|
|
86
|
+
-- "i" stands for inclusive.)
|
|
87
|
+
--
|
|
88
|
+
-- - For example, `inIRange(1, 1, 3)` will return `true`.
|
|
89
|
+
-- - For example, `inIRange(0, 1, 3)` will return `false`.
|
|
90
|
+
--
|
|
91
|
+
-- @param num The number to check.
|
|
92
|
+
-- @param start The start of the range to check.
|
|
93
|
+
-- @param end The end of the range to check.
|
|
94
|
+
function ____exports.inIRange(self, num, start, ____end)
|
|
95
|
+
return num >= start and num <= ____end
|
|
96
|
+
end
|
|
73
97
|
--- Helper function to see if the current render callback is rendering a water reflection.
|
|
74
98
|
--
|
|
75
99
|
-- When the player is in a room with water, things will be rendered twice: once for the normal
|
package/package.json
CHANGED
package/src/functions/utils.ts
CHANGED
|
@@ -71,6 +71,36 @@ export function iRange(start: int, end?: int, increment = 1): int[] {
|
|
|
71
71
|
return array;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
/**
|
|
75
|
+
* Helper function to check if a variable is within a certain range, exclusive on both ends. (The
|
|
76
|
+
* "e" stands for exclusive.)
|
|
77
|
+
*
|
|
78
|
+
* - For example, `inERange(1, 1, 3)` will return `false`.
|
|
79
|
+
* - For example, `inERange(1.01, 1, 3)` will return `true`.
|
|
80
|
+
*
|
|
81
|
+
* @param num The number to check.
|
|
82
|
+
* @param start The start of the range to check.
|
|
83
|
+
* @param end The end of the range to check.
|
|
84
|
+
*/
|
|
85
|
+
export function inERange(num: int, start: int, end: int): boolean {
|
|
86
|
+
return num > start && num < end;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Helper function to check if a variable is within a certain range, inclusive on both ends. (The
|
|
91
|
+
* "i" stands for inclusive.)
|
|
92
|
+
*
|
|
93
|
+
* - For example, `inIRange(1, 1, 3)` will return `true`.
|
|
94
|
+
* - For example, `inIRange(0, 1, 3)` will return `false`.
|
|
95
|
+
*
|
|
96
|
+
* @param num The number to check.
|
|
97
|
+
* @param start The start of the range to check.
|
|
98
|
+
* @param end The end of the range to check.
|
|
99
|
+
*/
|
|
100
|
+
export function inIRange(num: int, start: int, end: int): boolean {
|
|
101
|
+
return num >= start && num <= end;
|
|
102
|
+
}
|
|
103
|
+
|
|
74
104
|
/**
|
|
75
105
|
* Helper function to see if the current render callback is rendering a water reflection.
|
|
76
106
|
*
|