isaacscript-common 20.12.0 → 20.12.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.
package/dist/index.d.ts
CHANGED
|
@@ -6948,6 +6948,9 @@ export declare function initArray<T>(defaultValue: T, size: int): T[];
|
|
|
6948
6948
|
* Helper function to instantiate an array of mod features all at once. Use this function if your
|
|
6949
6949
|
* mod uses the pattern of expressing mod features as `ModFeature` classes.
|
|
6950
6950
|
*
|
|
6951
|
+
* If your feature classes have `v` variables, then this function will successfully register them
|
|
6952
|
+
* with the save data manager.
|
|
6953
|
+
*
|
|
6951
6954
|
* For example:
|
|
6952
6955
|
*
|
|
6953
6956
|
* ```ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
--[[
|
|
2
2
|
|
|
3
|
-
isaacscript-common 20.12.
|
|
3
|
+
isaacscript-common 20.12.1
|
|
4
4
|
|
|
5
5
|
This is the "isaacscript-common" library, which was created with the IsaacScript tool.
|
|
6
6
|
|
|
@@ -51033,7 +51033,8 @@ local ____exports = {}
|
|
|
51033
51033
|
function ____exports.initModFeatures(self, mod, modFeatures)
|
|
51034
51034
|
local instantiatedModFeatures = {}
|
|
51035
51035
|
for ____, modFeature in ipairs(modFeatures) do
|
|
51036
|
-
local instantiatedModFeature = __TS__New(modFeature, mod)
|
|
51036
|
+
local instantiatedModFeature = __TS__New(modFeature, mod, false)
|
|
51037
|
+
instantiatedModFeature:init()
|
|
51037
51038
|
instantiatedModFeatures[#instantiatedModFeatures + 1] = instantiatedModFeature
|
|
51038
51039
|
end
|
|
51039
51040
|
return instantiatedModFeatures
|
|
@@ -4,6 +4,9 @@ import { ModUpgraded } from "../types/ModUpgraded";
|
|
|
4
4
|
* Helper function to instantiate an array of mod features all at once. Use this function if your
|
|
5
5
|
* mod uses the pattern of expressing mod features as `ModFeature` classes.
|
|
6
6
|
*
|
|
7
|
+
* If your feature classes have `v` variables, then this function will successfully register them
|
|
8
|
+
* with the save data manager.
|
|
9
|
+
*
|
|
7
10
|
* For example:
|
|
8
11
|
*
|
|
9
12
|
* ```ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modFeatures.d.ts","sourceRoot":"","sources":["../../../src/functions/modFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD
|
|
1
|
+
{"version":3,"file":"modFeatures.d.ts","sourceRoot":"","sources":["../../../src/functions/modFeatures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,eAAe,CAC7B,GAAG,EAAE,WAAW,EAChB,WAAW,EAAE,KAAK,CAAC,OAAO,UAAU,CAAC,GACpC,UAAU,EAAE,CAYd"}
|
|
@@ -4,6 +4,9 @@ local ____exports = {}
|
|
|
4
4
|
--- Helper function to instantiate an array of mod features all at once. Use this function if your
|
|
5
5
|
-- mod uses the pattern of expressing mod features as `ModFeature` classes.
|
|
6
6
|
--
|
|
7
|
+
-- If your feature classes have `v` variables, then this function will successfully register them
|
|
8
|
+
-- with the save data manager.
|
|
9
|
+
--
|
|
7
10
|
-- For example:
|
|
8
11
|
--
|
|
9
12
|
-- ```ts
|
|
@@ -20,7 +23,8 @@ local ____exports = {}
|
|
|
20
23
|
function ____exports.initModFeatures(self, mod, modFeatures)
|
|
21
24
|
local instantiatedModFeatures = {}
|
|
22
25
|
for ____, modFeature in ipairs(modFeatures) do
|
|
23
|
-
local instantiatedModFeature = __TS__New(modFeature, mod)
|
|
26
|
+
local instantiatedModFeature = __TS__New(modFeature, mod, false)
|
|
27
|
+
instantiatedModFeature:init()
|
|
24
28
|
instantiatedModFeatures[#instantiatedModFeatures + 1] = instantiatedModFeature
|
|
25
29
|
end
|
|
26
30
|
return instantiatedModFeatures
|
package/package.json
CHANGED
|
@@ -5,6 +5,9 @@ import { ModUpgraded } from "../types/ModUpgraded";
|
|
|
5
5
|
* Helper function to instantiate an array of mod features all at once. Use this function if your
|
|
6
6
|
* mod uses the pattern of expressing mod features as `ModFeature` classes.
|
|
7
7
|
*
|
|
8
|
+
* If your feature classes have `v` variables, then this function will successfully register them
|
|
9
|
+
* with the save data manager.
|
|
10
|
+
*
|
|
8
11
|
* For example:
|
|
9
12
|
*
|
|
10
13
|
* ```ts
|
|
@@ -27,7 +30,9 @@ export function initModFeatures(
|
|
|
27
30
|
|
|
28
31
|
for (const modFeature of modFeatures) {
|
|
29
32
|
// eslint-disable-next-line new-cap
|
|
30
|
-
const instantiatedModFeature = new modFeature(mod);
|
|
33
|
+
const instantiatedModFeature = new modFeature(mod, false);
|
|
34
|
+
instantiatedModFeature.init();
|
|
35
|
+
|
|
31
36
|
instantiatedModFeatures.push(instantiatedModFeature);
|
|
32
37
|
}
|
|
33
38
|
|