@adeficior/data-modifier-botania 2.0.5 → 2.2.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/helper.d.ts
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
import type { IdInput, NormalizedId } from "@adeficior/data-modifier-core";
|
|
2
|
-
import type { IngredientInput,
|
|
3
|
-
import
|
|
2
|
+
import type { IngredientInput, ResultInput } from "@adeficior/data-modifier-ingredients";
|
|
3
|
+
import { AbstractRecipeHelper } from "@adeficior/data-modifier-recipes/helper";
|
|
4
|
+
import type { ManaInfusionRecipeOptions } from "./serializer/manaInfusion";
|
|
4
5
|
export type BotaniaRecipeHelper = {
|
|
5
|
-
manaInfusion(id: IdInput, ingredient: IngredientInput, result: ResultInput): NormalizedId;
|
|
6
|
-
manaInfusion(ingredient: IngredientInput, result: ResultInput): NormalizedId;
|
|
6
|
+
manaInfusion(id: IdInput, ingredient: IngredientInput, result: ResultInput, options?: ManaInfusionRecipeOptions): NormalizedId;
|
|
7
|
+
manaInfusion(ingredient: IngredientInput, result: ResultInput, options?: ManaInfusionRecipeOptions): NormalizedId;
|
|
7
8
|
};
|
|
8
|
-
export declare class BotaniaRecipeHelperImpl implements BotaniaRecipeHelper {
|
|
9
|
-
private readonly emitter;
|
|
10
|
-
private readonly ingredients;
|
|
11
|
-
private readonly results;
|
|
12
|
-
constructor(emitter: RecipeEmitter, ingredients: IngredientSerializer, results: ResultSerializer);
|
|
9
|
+
export declare class BotaniaRecipeHelperImpl extends AbstractRecipeHelper implements BotaniaRecipeHelper {
|
|
13
10
|
readonly manaInfusion: BotaniaRecipeHelper["manaInfusion"];
|
|
14
11
|
}
|
package/dist/helper.js
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import { createResultId, withDefaultId, } from "@adeficior/data-modifier-recipes/helper";
|
|
1
|
+
import { AbstractRecipeHelper, createResultId, withDefaultId, } from "@adeficior/data-modifier-recipes/helper";
|
|
2
2
|
import { ManaInfusionRecipe } from "./serializer/manaInfusion";
|
|
3
|
-
export class BotaniaRecipeHelperImpl {
|
|
4
|
-
|
|
5
|
-
ingredients;
|
|
6
|
-
results;
|
|
7
|
-
constructor(emitter, ingredients, results) {
|
|
8
|
-
this.emitter = emitter;
|
|
9
|
-
this.ingredients = ingredients;
|
|
10
|
-
this.results = results;
|
|
11
|
-
}
|
|
12
|
-
manaInfusion = withDefaultId((id, ingredientInput, resultInput) => {
|
|
3
|
+
export class BotaniaRecipeHelperImpl extends AbstractRecipeHelper {
|
|
4
|
+
manaInfusion = withDefaultId((id, ingredientInput, resultInput, options = {}) => {
|
|
13
5
|
const ingredients = this.ingredients.deserialize(ingredientInput);
|
|
14
6
|
const result = this.results.deserialize(resultInput);
|
|
15
|
-
return this.emitter.add(id ?? createResultId(result), "botania:mana_infusion", new ManaInfusionRecipe(ingredients, result));
|
|
7
|
+
return this.emitter.add(id ?? createResultId(result, "mana_infusion"), "botania:mana_infusion", new ManaInfusionRecipe(ingredients, result, options));
|
|
16
8
|
});
|
|
17
9
|
}
|
|
18
10
|
//# sourceMappingURL=helper.js.map
|
package/dist/helper.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../src/helper.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,aAAa,GACd,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAgB/D,MAAM,OAAO,uBACX,SAAQ,oBAAoB;IAGnB,YAAY,GAAwC,aAAa,CACxE,CACE,EAAkB,EAClB,eAAgC,EAChC,WAAwB,EACxB,UAAqC,EAAE,EACvC,EAAE;QACF,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QAClE,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;QAErD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CACrB,EAAE,IAAI,cAAc,CAAC,MAAM,EAAE,eAAe,CAAC,EAC7C,uBAAuB,EACvB,IAAI,kBAAkB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,CACrD,CAAC;IACJ,CAAC,CACF,CAAC;CACH"}
|
|
@@ -8,17 +8,15 @@ export type ManaInfusionRecipeDefinition = RecipeDefinition & Readonly<{
|
|
|
8
8
|
catalyst?: unknown;
|
|
9
9
|
mana?: number;
|
|
10
10
|
}>;
|
|
11
|
+
export type ManaInfusionRecipeOptions = {
|
|
12
|
+
mana?: number;
|
|
13
|
+
catalyst?: Ingredient;
|
|
14
|
+
};
|
|
11
15
|
export declare class ManaInfusionRecipe implements Recipe {
|
|
12
16
|
readonly ingredient: Ingredient;
|
|
13
17
|
readonly result: Result;
|
|
14
|
-
readonly options:
|
|
15
|
-
|
|
16
|
-
catalyst?: Ingredient;
|
|
17
|
-
};
|
|
18
|
-
constructor(ingredient: Ingredient, result: Result, options?: {
|
|
19
|
-
mana?: number;
|
|
20
|
-
catalyst?: Ingredient;
|
|
21
|
-
});
|
|
18
|
+
readonly options: ManaInfusionRecipeOptions;
|
|
19
|
+
constructor(ingredient: Ingredient, result: Result, options?: ManaInfusionRecipeOptions);
|
|
22
20
|
getIngredients(): Ingredient[];
|
|
23
21
|
getResults(): Result[];
|
|
24
22
|
modify(modifier: RecipeModifier): ManaInfusionRecipe;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manaInfusion.js","sourceRoot":"","sources":["../../src/serializer/manaInfusion.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAAE,2B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UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9D,OAAO,IAAI,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,CAAC,CAAC;IAClE,CAAC;IAEQ,SAAS,CAChB,MAA0B,EAC1B,OAA2B;QAE3B,OAAO;YACL,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC;YACvD,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC;YAChD,QAAQ,EAAE,OAAO,CAAC,WAAW,CAAC,iBAAiB,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;YACxE,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,IAAI;SAC1B,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adeficior/data-modifier-botania",
|
|
3
3
|
"description": "data-modifier module adding compatibility for botania",
|
|
4
|
-
"version": "2.0
|
|
4
|
+
"version": "2.2.0",
|
|
5
5
|
"exports": { ".": "./dist/index.js" },
|
|
6
6
|
"type": "module",
|
|
7
|
-
"devDependencies": { "@adeficior/data-modifier-recipes": "^2.
|
|
7
|
+
"devDependencies": { "@adeficior/data-modifier-recipes": "^2.3.0" },
|
|
8
8
|
"peerDependencies": {
|
|
9
9
|
"@adeficior/pack-resolver": "^2.0.1",
|
|
10
10
|
"typescript": "^5",
|
|
11
11
|
"zod": "^4.4.3",
|
|
12
|
-
"@adeficior/data-modifier-core": "^2.
|
|
13
|
-
"@adeficior/data-modifier-recipes": "^2.
|
|
14
|
-
"@adeficior/data-modifier-ingredients": "^2.0
|
|
15
|
-
"@adeficior/data-modifier-tags": "^2.0
|
|
12
|
+
"@adeficior/data-modifier-core": "^2.3.0",
|
|
13
|
+
"@adeficior/data-modifier-recipes": "^2.3.0",
|
|
14
|
+
"@adeficior/data-modifier-ingredients": "^2.1.0",
|
|
15
|
+
"@adeficior/data-modifier-tags": "^2.1.0"
|
|
16
16
|
},
|
|
17
17
|
"typesVersions": { "*": {} },
|
|
18
18
|
"types": "./dist/index.d.ts",
|