@adeficior/data-modifier 1.0.0-rc.13 → 1.0.0-rc.15
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/emit/data/recipe.d.ts +6 -5
- package/dist/emit/data/recipe.js +16 -8
- package/dist/emit/data/recipe.js.map +1 -1
- package/dist/emit/rule/recipe.d.ts +4 -4
- package/dist/emit/rule/recipe.js.map +1 -1
- package/dist/loader/recipe.d.ts +3 -3
- package/dist/loader/recipe.js +4 -5
- package/dist/loader/recipe.js.map +1 -1
- package/dist/parser/index.d.ts +1 -1
- package/dist/parser/index.js +1 -1
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/recipe/adAstra/conversion.d.ts +3 -3
- package/dist/parser/recipe/adAstra/conversion.js +5 -5
- package/dist/parser/recipe/adAstra/conversion.js.map +1 -1
- package/dist/parser/recipe/adAstra/inputOutput.d.ts +4 -4
- package/dist/parser/recipe/adAstra/inputOutput.js +5 -5
- package/dist/parser/recipe/adAstra/inputOutput.js.map +1 -1
- package/dist/parser/recipe/adAstra/spaceStation.d.ts +3 -3
- package/dist/parser/recipe/adAstra/spaceStation.js +5 -5
- package/dist/parser/recipe/adAstra/spaceStation.js.map +1 -1
- package/dist/parser/recipe/botania/apothecary.d.ts +3 -3
- package/dist/parser/recipe/botania/apothecary.js +5 -5
- package/dist/parser/recipe/botania/apothecary.js.map +1 -1
- package/dist/parser/recipe/botania/blocks.js +1 -1
- package/dist/parser/recipe/botania/blocks.js.map +1 -1
- package/dist/parser/recipe/botania/brew.d.ts +3 -3
- package/dist/parser/recipe/botania/brew.js +5 -5
- package/dist/parser/recipe/botania/brew.js.map +1 -1
- package/dist/parser/recipe/botania/elvenTrade.js +1 -1
- package/dist/parser/recipe/botania/elvenTrade.js.map +1 -1
- package/dist/parser/recipe/botania/gogWrapper.d.ts +5 -7
- package/dist/parser/recipe/botania/gogWrapper.js +5 -5
- package/dist/parser/recipe/botania/gogWrapper.js.map +1 -1
- package/dist/parser/recipe/botania/manaInfusion.d.ts +3 -3
- package/dist/parser/recipe/botania/manaInfusion.js +5 -5
- package/dist/parser/recipe/botania/manaInfusion.js.map +1 -1
- package/dist/parser/recipe/botania/nbtWrapper.d.ts +5 -7
- package/dist/parser/recipe/botania/nbtWrapper.js +5 -5
- package/dist/parser/recipe/botania/nbtWrapper.js.map +1 -1
- package/dist/parser/recipe/botania/runicAltar.js +1 -1
- package/dist/parser/recipe/botania/runicAltar.js.map +1 -1
- package/dist/parser/recipe/create/assembly.d.ts +3 -3
- package/dist/parser/recipe/create/assembly.js +5 -5
- package/dist/parser/recipe/create/assembly.js.map +1 -1
- package/dist/parser/recipe/farmersdelight/cooking.d.ts +3 -3
- package/dist/parser/recipe/farmersdelight/cooking.js +5 -5
- package/dist/parser/recipe/farmersdelight/cooking.js.map +1 -1
- package/dist/parser/recipe/farmersdelight/cutting.d.ts +3 -4
- package/dist/parser/recipe/farmersdelight/cutting.js +5 -5
- package/dist/parser/recipe/farmersdelight/cutting.js.map +1 -1
- package/dist/parser/recipe/forge/conditional.d.ts +6 -8
- package/dist/parser/recipe/forge/conditional.js +7 -7
- package/dist/parser/recipe/forge/conditional.js.map +1 -1
- package/dist/parser/recipe/index.d.ts +26 -8
- package/dist/parser/recipe/index.js +38 -6
- package/dist/parser/recipe/index.js.map +1 -1
- package/dist/parser/recipe/manyToMany.d.ts +3 -3
- package/dist/parser/recipe/manyToMany.js +5 -5
- package/dist/parser/recipe/manyToMany.js.map +1 -1
- package/dist/parser/recipe/manyToOne.d.ts +3 -3
- package/dist/parser/recipe/manyToOne.js +5 -5
- package/dist/parser/recipe/manyToOne.js.map +1 -1
- package/dist/parser/recipe/oneToOne.d.ts +3 -3
- package/dist/parser/recipe/oneToOne.js +5 -5
- package/dist/parser/recipe/oneToOne.js.map +1 -1
- package/dist/parser/recipe/roots/component.d.ts +3 -3
- package/dist/parser/recipe/roots/component.js +5 -5
- package/dist/parser/recipe/roots/component.js.map +1 -1
- package/dist/parser/recipe/roots/ritual.d.ts +3 -4
- package/dist/parser/recipe/roots/ritual.js +5 -5
- package/dist/parser/recipe/roots/ritual.js.map +1 -1
- package/dist/parser/recipe/thermal/catalyst.d.ts +3 -3
- package/dist/parser/recipe/thermal/catalyst.js +5 -5
- package/dist/parser/recipe/thermal/catalyst.js.map +1 -1
- package/dist/parser/recipe/thermal/fuel.d.ts +3 -3
- package/dist/parser/recipe/thermal/fuel.js +5 -5
- package/dist/parser/recipe/thermal/fuel.js.map +1 -1
- package/dist/parser/recipe/thermal/index.d.ts +3 -3
- package/dist/parser/recipe/thermal/index.js +5 -5
- package/dist/parser/recipe/thermal/index.js.map +1 -1
- package/dist/parser/recipe/thermal/treeExtraction.d.ts +3 -3
- package/dist/parser/recipe/thermal/treeExtraction.js +5 -5
- package/dist/parser/recipe/thermal/treeExtraction.js.map +1 -1
- package/dist/parser/recipe/vanilla/shaped.d.ts +4 -5
- package/dist/parser/recipe/vanilla/shaped.js +5 -5
- package/dist/parser/recipe/vanilla/shaped.js.map +1 -1
- package/dist/parser/recipe/vanilla/smelting.d.ts +3 -3
- package/dist/parser/recipe/vanilla/smelting.js +5 -5
- package/dist/parser/recipe/vanilla/smelting.js.map +1 -1
- package/dist/parser/recipe/vanilla/smithing.d.ts +3 -3
- package/dist/parser/recipe/vanilla/smithing.js +5 -5
- package/dist/parser/recipe/vanilla/smithing.js.map +1 -1
- package/dist/parser/recipe/vanilla/stonecutting.d.ts +3 -3
- package/dist/parser/recipe/vanilla/stonecutting.js +5 -5
- package/dist/parser/recipe/vanilla/stonecutting.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"treeExtraction.js","sourceRoot":"","sources":["../../../../src/parser/recipe/thermal/treeExtraction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EACL,eAAe,GAEhB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE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C;QAED,MAAM,IAAI,iBAAiB,CACzB,uDAAuD,EACvD,UAAU,CACX,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;YAC9C,KAAK,EAAE,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,KAAK,CAAC;YAChD,MAAM,EAAE,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,MAAM,CAAC;SACnD,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,0BAA2B,SAAQ,YAG/C;IACC,WAAW,CACT,UAA0C,EAC1C,OAA2B;QAE3B,MAAM,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CACtC,IAAI,eAAe,CAAC,UAAU,CAAC,KAAK,CAAC,CACtC,CAAC;QACF,MAAM,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CACvC,IAAI,eAAe,CAAC,UAAU,CAAC,MAAM,CAAC,CACvC,CAAC;QACF,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IACzD,CAAC;CACF"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { Ingredient } from "../../../common/ingredient/index.js";
|
|
2
1
|
import type { Result } from "../../../common/result/index.js";
|
|
3
2
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
-
import type {
|
|
3
|
+
import type { RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
4
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
5
|
import type { IngredientMap, IngredientMapInput } from "../ingredientMap.js";
|
|
7
6
|
export type ShapedRecipeDefinition = RecipeDefinition & Readonly<{
|
|
@@ -12,10 +11,10 @@ export type ShapedRecipeDefinition = RecipeDefinition & Readonly<{
|
|
|
12
11
|
export declare class ShapedRecipe extends Recipe {
|
|
13
12
|
private readonly ingredients;
|
|
14
13
|
private readonly result;
|
|
15
|
-
constructor(
|
|
16
|
-
getIngredients(): Ingredient[];
|
|
14
|
+
constructor(ingredients: IngredientMap, result: Result);
|
|
15
|
+
getIngredients(): import("../../../common/ingredient/index.js").Ingredient[];
|
|
17
16
|
getResults(): Result[];
|
|
18
|
-
replace(
|
|
17
|
+
replace(modifier: RecipeModifier): ShapedRecipe;
|
|
19
18
|
serialize(context: RecipeParseContext): Partial<ShapedRecipeDefinition>;
|
|
20
19
|
}
|
|
21
20
|
export declare class ShapedParser extends RecipeParser<ShapedRecipeDefinition, ShapedRecipe> {
|
|
@@ -2,8 +2,8 @@ import RecipeParser, { Recipe } from "../index.js";
|
|
|
2
2
|
export class ShapedRecipe extends Recipe {
|
|
3
3
|
ingredients;
|
|
4
4
|
result;
|
|
5
|
-
constructor(
|
|
6
|
-
super(
|
|
5
|
+
constructor(ingredients, result) {
|
|
6
|
+
super();
|
|
7
7
|
this.ingredients = ingredients;
|
|
8
8
|
this.result = result;
|
|
9
9
|
}
|
|
@@ -13,8 +13,8 @@ export class ShapedRecipe extends Recipe {
|
|
|
13
13
|
getResults() {
|
|
14
14
|
return [this.result];
|
|
15
15
|
}
|
|
16
|
-
replace(
|
|
17
|
-
return new ShapedRecipe(this.
|
|
16
|
+
replace(modifier) {
|
|
17
|
+
return new ShapedRecipe(this.ingredients.replace(modifier.ingredient), modifier.result(this.result));
|
|
18
18
|
}
|
|
19
19
|
serialize(context) {
|
|
20
20
|
return {
|
|
@@ -27,7 +27,7 @@ export class ShapedParser extends RecipeParser {
|
|
|
27
27
|
deserialize(definition, context) {
|
|
28
28
|
const ingredients = context.ingredients.ingredientMap(definition.key);
|
|
29
29
|
const result = context.results.create(definition.result);
|
|
30
|
-
return new ShapedRecipe(
|
|
30
|
+
return new ShapedRecipe(ingredients, result);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=shaped.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shaped.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/shaped.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shaped.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/shaped.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAUnD,MAAM,OAAO,YAAa,SAAQ,MAAM;IAEnB;IACA;IAFnB,YACmB,WAA0B,EAC1B,MAAc;QAE/B,KAAK,EAAE,CAAC;QAHS,gBAAW,GAAX,WAAW,CAAe;QAC1B,WAAM,GAAN,MAAM,CAAQ;IAGjC,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC;IACjC,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,YAAY,CACrB,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,EAC7C,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAC7B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,OAAO,CAAC;YACxC,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;SAC/C,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,YAAa,SAAQ,YAGjC;IACC,WAAW,CACT,UAAkC,EAClC,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;QACtE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,YAAY,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Ingredient } from "../../../common/ingredient/index.js";
|
|
2
2
|
import type { Result } from "../../../common/result/index.js";
|
|
3
3
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
5
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
6
|
export type SmeltingRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
7
|
ingredient: unknown;
|
|
@@ -11,10 +11,10 @@ export type SmeltingRecipeDefinition = RecipeDefinition & Readonly<{
|
|
|
11
11
|
export declare class SmeltingRecipe extends Recipe {
|
|
12
12
|
private readonly ingredient;
|
|
13
13
|
private readonly result;
|
|
14
|
-
constructor(
|
|
14
|
+
constructor(ingredient: Ingredient, result: Result);
|
|
15
15
|
getIngredients(): Ingredient[];
|
|
16
16
|
getResults(): Result[];
|
|
17
|
-
replace(
|
|
17
|
+
replace(modifier: RecipeModifier): SmeltingRecipe;
|
|
18
18
|
serialize(context: RecipeParseContext): Partial<SmeltingRecipeDefinition>;
|
|
19
19
|
}
|
|
20
20
|
export declare class SmeltingParser extends RecipeParser<SmeltingRecipeDefinition, SmeltingRecipe> {
|
|
@@ -2,8 +2,8 @@ import RecipeParser, { Recipe } from "../index.js";
|
|
|
2
2
|
export class SmeltingRecipe extends Recipe {
|
|
3
3
|
ingredient;
|
|
4
4
|
result;
|
|
5
|
-
constructor(
|
|
6
|
-
super(
|
|
5
|
+
constructor(ingredient, result) {
|
|
6
|
+
super();
|
|
7
7
|
this.ingredient = ingredient;
|
|
8
8
|
this.result = result;
|
|
9
9
|
}
|
|
@@ -13,8 +13,8 @@ export class SmeltingRecipe extends Recipe {
|
|
|
13
13
|
getResults() {
|
|
14
14
|
return [this.result];
|
|
15
15
|
}
|
|
16
|
-
replace(
|
|
17
|
-
return new SmeltingRecipe(
|
|
16
|
+
replace(modifier) {
|
|
17
|
+
return new SmeltingRecipe(modifier.ingredient(this.ingredient), modifier.result(this.result));
|
|
18
18
|
}
|
|
19
19
|
serialize(context) {
|
|
20
20
|
return {
|
|
@@ -27,7 +27,7 @@ export class SmeltingParser extends RecipeParser {
|
|
|
27
27
|
deserialize(definition, context) {
|
|
28
28
|
const ingredient = context.ingredients.create(definition.ingredient);
|
|
29
29
|
const result = context.results.create(definition.result);
|
|
30
|
-
return new SmeltingRecipe(
|
|
30
|
+
return new SmeltingRecipe(ingredient, result);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=smelting.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smelting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/smelting.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASnD,MAAM,OAAO,cAAe,SAAQ,MAAM;
|
|
1
|
+
{"version":3,"file":"smelting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/smelting.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASnD,MAAM,OAAO,cAAe,SAAQ,MAAM;IAErB;IACA;IAFnB,YACmB,UAAsB,EACtB,MAAc;QAE/B,KAAK,EAAE,CAAC;QAHS,eAAU,GAAV,UAAU,CAAY;QACtB,WAAM,GAAN,MAAM,CAAQ;IAGjC,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC3B,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,cAAc,CACvB,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,EACpC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAC7B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,UAAU,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;YAC1D,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;SAC/C,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,cAAe,SAAQ,YAGnC;IACC,WAAW,CACT,UAAoC,EACpC,OAA2B;QAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACrE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,cAAc,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IAChD,CAAC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Ingredient } from "../../../common/ingredient/index.js";
|
|
2
2
|
import type { Result } from "../../../common/result/index.js";
|
|
3
3
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
5
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
6
|
export type SmithingRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
7
|
base: unknown;
|
|
@@ -12,10 +12,10 @@ export declare class SmithingRecipe extends Recipe {
|
|
|
12
12
|
private readonly base;
|
|
13
13
|
private readonly addition;
|
|
14
14
|
private readonly result;
|
|
15
|
-
constructor(
|
|
15
|
+
constructor(base: Ingredient, addition: Ingredient, result: Result);
|
|
16
16
|
getIngredients(): Ingredient[];
|
|
17
17
|
getResults(): Result[];
|
|
18
|
-
replace(
|
|
18
|
+
replace(modifier: RecipeModifier): SmithingRecipe;
|
|
19
19
|
serialize(context: RecipeParseContext): Partial<SmithingRecipeDefinition>;
|
|
20
20
|
}
|
|
21
21
|
export declare class SmithingParser extends RecipeParser<SmithingRecipeDefinition, SmithingRecipe> {
|
|
@@ -3,8 +3,8 @@ export class SmithingRecipe extends Recipe {
|
|
|
3
3
|
base;
|
|
4
4
|
addition;
|
|
5
5
|
result;
|
|
6
|
-
constructor(
|
|
7
|
-
super(
|
|
6
|
+
constructor(base, addition, result) {
|
|
7
|
+
super();
|
|
8
8
|
this.base = base;
|
|
9
9
|
this.addition = addition;
|
|
10
10
|
this.result = result;
|
|
@@ -15,8 +15,8 @@ export class SmithingRecipe extends Recipe {
|
|
|
15
15
|
getResults() {
|
|
16
16
|
return [this.result];
|
|
17
17
|
}
|
|
18
|
-
replace(
|
|
19
|
-
return new SmithingRecipe(
|
|
18
|
+
replace(modifier) {
|
|
19
|
+
return new SmithingRecipe(modifier.ingredient(this.base), modifier.ingredient(this.addition), modifier.result(this.result));
|
|
20
20
|
}
|
|
21
21
|
serialize(context) {
|
|
22
22
|
return {
|
|
@@ -31,7 +31,7 @@ export class SmithingParser extends RecipeParser {
|
|
|
31
31
|
const base = context.ingredients.create(definition.base);
|
|
32
32
|
const addition = context.ingredients.create(definition.addition);
|
|
33
33
|
const result = context.results.create(definition.result);
|
|
34
|
-
return new SmithingRecipe(
|
|
34
|
+
return new SmithingRecipe(base, addition, result);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
//# sourceMappingURL=smithing.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"smithing.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/smithing.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASnD,MAAM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,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACzD,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QACjE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,OAAO,IAAI,cAAc,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;IACpD,CAAC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Ingredient } from "../../../common/ingredient/index.js";
|
|
2
2
|
import type { Result } from "../../../common/result/index.js";
|
|
3
3
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
5
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
6
|
export type StonecuttingRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
7
|
ingredient: unknown;
|
|
@@ -11,10 +11,10 @@ export type StonecuttingRecipeDefinition = RecipeDefinition & Readonly<{
|
|
|
11
11
|
export declare class StonecuttingRecipe extends Recipe {
|
|
12
12
|
private readonly ingredient;
|
|
13
13
|
private readonly result;
|
|
14
|
-
constructor(
|
|
14
|
+
constructor(ingredient: Ingredient, result: Result);
|
|
15
15
|
getIngredients(): Ingredient[];
|
|
16
16
|
getResults(): Result[];
|
|
17
|
-
replace(
|
|
17
|
+
replace(modifier: RecipeModifier): StonecuttingRecipe;
|
|
18
18
|
serialize(context: RecipeParseContext): Partial<StonecuttingRecipeDefinition>;
|
|
19
19
|
}
|
|
20
20
|
export declare class StonecuttingParser extends RecipeParser<StonecuttingRecipeDefinition, StonecuttingRecipe> {
|
|
@@ -3,8 +3,8 @@ import RecipeParser, { Recipe } from "../index.js";
|
|
|
3
3
|
export class StonecuttingRecipe extends Recipe {
|
|
4
4
|
ingredient;
|
|
5
5
|
result;
|
|
6
|
-
constructor(
|
|
7
|
-
super(
|
|
6
|
+
constructor(ingredient, result) {
|
|
7
|
+
super();
|
|
8
8
|
this.ingredient = ingredient;
|
|
9
9
|
this.result = result;
|
|
10
10
|
}
|
|
@@ -14,8 +14,8 @@ export class StonecuttingRecipe extends Recipe {
|
|
|
14
14
|
getResults() {
|
|
15
15
|
return [this.result];
|
|
16
16
|
}
|
|
17
|
-
replace(
|
|
18
|
-
return new StonecuttingRecipe(
|
|
17
|
+
replace(modifier) {
|
|
18
|
+
return new StonecuttingRecipe(modifier.ingredient(this.ingredient), modifier.result(this.result));
|
|
19
19
|
}
|
|
20
20
|
serialize(context) {
|
|
21
21
|
return {
|
|
@@ -28,7 +28,7 @@ export class StonecuttingParser extends RecipeParser {
|
|
|
28
28
|
deserialize(definition, context) {
|
|
29
29
|
const ingredient = context.ingredients.create(definition.ingredient);
|
|
30
30
|
const result = context.results.create(definition.result);
|
|
31
|
-
return new StonecuttingRecipe(
|
|
31
|
+
return new StonecuttingRecipe(ingredient, result);
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
//# sourceMappingURL=stonecutting.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stonecutting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/stonecutting.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASnD,qCAAqC;AACrC,MAAM,OAAO,kBAAmB,SAAQ,MAAM;
|
|
1
|
+
{"version":3,"file":"stonecutting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/stonecutting.ts"],"names":[],"mappings":"AAIA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASnD,qCAAqC;AACrC,MAAM,OAAO,kBAAmB,SAAQ,MAAM;IAEzB;IACA;IAFnB,YACmB,UAAsB,EACtB,MAAc;QAE/B,KAAK,EAAE,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