@adeficior/data-modifier 1.0.0-rc.14 → 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/parser/index.d.ts +1 -1
- package/dist/parser/index.js.map +1 -1
- package/dist/parser/recipe/adAstra/conversion.d.ts +2 -2
- package/dist/parser/recipe/adAstra/conversion.js +2 -2
- package/dist/parser/recipe/adAstra/conversion.js.map +1 -1
- package/dist/parser/recipe/adAstra/inputOutput.d.ts +3 -3
- package/dist/parser/recipe/adAstra/inputOutput.js +2 -2
- package/dist/parser/recipe/adAstra/inputOutput.js.map +1 -1
- package/dist/parser/recipe/adAstra/spaceStation.d.ts +2 -2
- package/dist/parser/recipe/adAstra/spaceStation.js +2 -2
- package/dist/parser/recipe/adAstra/spaceStation.js.map +1 -1
- package/dist/parser/recipe/botania/apothecary.d.ts +2 -2
- package/dist/parser/recipe/botania/apothecary.js +2 -2
- package/dist/parser/recipe/botania/apothecary.js.map +1 -1
- package/dist/parser/recipe/botania/brew.d.ts +2 -2
- package/dist/parser/recipe/botania/brew.js +2 -2
- package/dist/parser/recipe/botania/brew.js.map +1 -1
- package/dist/parser/recipe/botania/gogWrapper.d.ts +4 -6
- package/dist/parser/recipe/botania/gogWrapper.js +2 -2
- package/dist/parser/recipe/botania/gogWrapper.js.map +1 -1
- package/dist/parser/recipe/botania/manaInfusion.d.ts +2 -2
- package/dist/parser/recipe/botania/manaInfusion.js +2 -2
- package/dist/parser/recipe/botania/manaInfusion.js.map +1 -1
- package/dist/parser/recipe/botania/nbtWrapper.d.ts +4 -6
- package/dist/parser/recipe/botania/nbtWrapper.js +2 -2
- package/dist/parser/recipe/botania/nbtWrapper.js.map +1 -1
- package/dist/parser/recipe/create/assembly.d.ts +2 -2
- package/dist/parser/recipe/create/assembly.js +2 -2
- package/dist/parser/recipe/create/assembly.js.map +1 -1
- package/dist/parser/recipe/farmersdelight/cooking.d.ts +2 -2
- package/dist/parser/recipe/farmersdelight/cooking.js +2 -2
- package/dist/parser/recipe/farmersdelight/cooking.js.map +1 -1
- package/dist/parser/recipe/farmersdelight/cutting.d.ts +2 -2
- package/dist/parser/recipe/farmersdelight/cutting.js +2 -2
- package/dist/parser/recipe/farmersdelight/cutting.js.map +1 -1
- package/dist/parser/recipe/forge/conditional.d.ts +4 -6
- package/dist/parser/recipe/forge/conditional.js +2 -2
- package/dist/parser/recipe/forge/conditional.js.map +1 -1
- package/dist/parser/recipe/index.d.ts +6 -2
- package/dist/parser/recipe/index.js +10 -4
- package/dist/parser/recipe/index.js.map +1 -1
- package/dist/parser/recipe/manyToMany.d.ts +2 -2
- package/dist/parser/recipe/manyToMany.js +2 -2
- package/dist/parser/recipe/manyToMany.js.map +1 -1
- package/dist/parser/recipe/manyToOne.d.ts +2 -2
- package/dist/parser/recipe/manyToOne.js +2 -2
- package/dist/parser/recipe/manyToOne.js.map +1 -1
- package/dist/parser/recipe/oneToOne.d.ts +2 -2
- package/dist/parser/recipe/oneToOne.js +2 -2
- package/dist/parser/recipe/oneToOne.js.map +1 -1
- package/dist/parser/recipe/roots/component.d.ts +2 -2
- package/dist/parser/recipe/roots/component.js +2 -2
- package/dist/parser/recipe/roots/component.js.map +1 -1
- package/dist/parser/recipe/roots/ritual.d.ts +2 -2
- package/dist/parser/recipe/roots/ritual.js +2 -2
- package/dist/parser/recipe/roots/ritual.js.map +1 -1
- package/dist/parser/recipe/thermal/catalyst.d.ts +2 -2
- package/dist/parser/recipe/thermal/catalyst.js +2 -2
- package/dist/parser/recipe/thermal/catalyst.js.map +1 -1
- package/dist/parser/recipe/thermal/fuel.d.ts +2 -2
- package/dist/parser/recipe/thermal/fuel.js +2 -2
- package/dist/parser/recipe/thermal/fuel.js.map +1 -1
- package/dist/parser/recipe/thermal/index.d.ts +2 -2
- package/dist/parser/recipe/thermal/index.js +2 -2
- package/dist/parser/recipe/thermal/index.js.map +1 -1
- package/dist/parser/recipe/thermal/treeExtraction.d.ts +2 -2
- package/dist/parser/recipe/thermal/treeExtraction.js +2 -2
- package/dist/parser/recipe/thermal/treeExtraction.js.map +1 -1
- package/dist/parser/recipe/vanilla/shaped.d.ts +3 -4
- package/dist/parser/recipe/vanilla/shaped.js +2 -2
- package/dist/parser/recipe/vanilla/shaped.js.map +1 -1
- package/dist/parser/recipe/vanilla/smelting.d.ts +2 -2
- package/dist/parser/recipe/vanilla/smelting.js +2 -2
- package/dist/parser/recipe/vanilla/smelting.js.map +1 -1
- package/dist/parser/recipe/vanilla/smithing.d.ts +2 -2
- package/dist/parser/recipe/vanilla/smithing.js +2 -2
- package/dist/parser/recipe/vanilla/smithing.js.map +1 -1
- package/dist/parser/recipe/vanilla/stonecutting.d.ts +2 -2
- package/dist/parser/recipe/vanilla/stonecutting.js +2 -2
- package/dist/parser/recipe/vanilla/stonecutting.js.map +1 -1
- package/package.json +1 -1
package/dist/parser/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { Recipe, RecipeHolder, default as RecipeParser, type RecipeParseContext, type RecipeSerializer, } from "./recipe/index.js";
|
|
1
|
+
export { Recipe, RecipeHolder, default as RecipeParser, type RecipeModifier, type RecipeParseContext, type RecipeSerializer, } from "./recipe/index.js";
|
|
2
2
|
export * from "./recipe/sullys/polishing.js";
|
|
3
3
|
export * from "./recipe/vanilla/shaped.js";
|
|
4
4
|
export * from "./recipe/vanilla/shapeless.js";
|
package/dist/parser/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,YAAY,EACZ,OAAO,IAAI,YAAY,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/parser/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,YAAY,EACZ,OAAO,IAAI,YAAY,GAIxB,MAAM,mBAAmB,CAAC;AAC3B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC"}
|
|
@@ -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 FluidConversionRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
7
|
input: unknown;
|
|
@@ -13,7 +13,7 @@ export declare class FluidConversionRecipe extends Recipe {
|
|
|
13
13
|
constructor(ingredient: Ingredient, result: Result);
|
|
14
14
|
getIngredients(): Ingredient[];
|
|
15
15
|
getResults(): Result[];
|
|
16
|
-
replace(
|
|
16
|
+
replace(modifier: RecipeModifier): FluidConversionRecipe;
|
|
17
17
|
serialize(context: RecipeParseContext): Partial<FluidConversionRecipeDefinition>;
|
|
18
18
|
}
|
|
19
19
|
export declare class FluidConversionRecipeParser extends RecipeParser<FluidConversionRecipeDefinition, FluidConversionRecipe> {
|
|
@@ -17,8 +17,8 @@ export class FluidConversionRecipe extends Recipe {
|
|
|
17
17
|
getResults() {
|
|
18
18
|
return [this.result];
|
|
19
19
|
}
|
|
20
|
-
replace(
|
|
21
|
-
return new FluidConversionRecipe(
|
|
20
|
+
replace(modifier) {
|
|
21
|
+
return new FluidConversionRecipe(modifier.ingredient(this.ingredient), modifier.result(this.result));
|
|
22
22
|
}
|
|
23
23
|
serialize(context) {
|
|
24
24
|
if (!(this.result instanceof FluidIngredient)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conversion.js","sourceRoot":"","sources":["../../../../src/parser/recipe/adAstra/conversion.ts"],"names":[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CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,qBAAqB,CAC9B,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,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,YAAY,eAAe,CAAC,EAAE,CAAC;YAC9C,MAAM,IAAI,iBAAiB,CACzB,gDAAgD,EAChD,IAAI,CAAC,MAAM,CACZ,CAAC;QACJ,CAAC;QAED,OAAO;YACL,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;YACrD,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;SACjC,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,2BAA4B,SAAQ,YAGhD;IACC,WAAW,CACT,UAA2C,EAC3C,OAA2B;QAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAChE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,SAAS,CACtC,IAAI,WAAW,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CACvC,CAAC;QACF,OAAO,IAAI,qBAAqB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACvD,CAAC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Ingredient } from "../../../common/ingredient/index.js";
|
|
2
|
-
import { ItemResult
|
|
2
|
+
import { ItemResult } from "../../../common/result/index.js";
|
|
3
3
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
-
import RecipeParser, { Recipe, type
|
|
4
|
+
import RecipeParser, { Recipe, type RecipeModifier, type RecipeParseContext } from "../index.js";
|
|
5
5
|
import { OneToOneRecipe } from "../oneToOne.js";
|
|
6
6
|
export type InputOutputRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
7
|
input: unknown;
|
|
@@ -13,7 +13,7 @@ export declare class InputOutputRecipe extends Recipe {
|
|
|
13
13
|
constructor(ingredient: Ingredient, result: ItemResult);
|
|
14
14
|
getIngredients(): Ingredient[];
|
|
15
15
|
getResults(): ItemResult[];
|
|
16
|
-
replace(
|
|
16
|
+
replace(modifier: RecipeModifier): OneToOneRecipe;
|
|
17
17
|
serialize(context: RecipeParseContext): Partial<InputOutputRecipeDefinition>;
|
|
18
18
|
}
|
|
19
19
|
export declare class InputOutputRecipeParser extends RecipeParser<InputOutputRecipeDefinition, InputOutputRecipe> {
|
|
@@ -30,8 +30,8 @@ export class InputOutputRecipe extends Recipe {
|
|
|
30
30
|
getResults() {
|
|
31
31
|
return [this.result];
|
|
32
32
|
}
|
|
33
|
-
replace(
|
|
34
|
-
return new OneToOneRecipe(
|
|
33
|
+
replace(modifier) {
|
|
34
|
+
return new OneToOneRecipe(modifier.ingredient(this.ingredient), modifier.result(this.result));
|
|
35
35
|
}
|
|
36
36
|
serialize(context) {
|
|
37
37
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputOutput.js","sourceRoot":"","sources":["../../../../src/parser/recipe/adAstra/inputOutput.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"inputOutput.js","sourceRoot":"","sources":["../../../../src/parser/recipe/adAstra/inputOutput.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,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,CAAC,IAAI,CAAC,MAAM,CAAC,CAC7B,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC;YACrD,MAAM,EAAE,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC;SACvC,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,uBAAwB,SAAQ,YAG5C;IACC,WAAW,CACT,UAAuC,EACvC,OAA2B;QAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QAChE,MAAM,MAAM,GAAG,mBAAmB,CAAC,OAAO,CAAC,WAAW,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;QAC3E,OAAO,IAAI,iBAAiB,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;IACnD,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Ingredient } from "../../../common/ingredient/index.js";
|
|
2
2
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { RecipeModifier, RecipeParseContext } from "../index.js";
|
|
4
4
|
import RecipeParser, { Recipe } from "../index.js";
|
|
5
5
|
export type SpaceStationRecipeDefinition = RecipeDefinition & Readonly<{
|
|
6
6
|
ingredients: unknown[];
|
|
@@ -12,7 +12,7 @@ export declare class SpaceStationRecipe extends Recipe {
|
|
|
12
12
|
constructor(ingredients: Ingredient[]);
|
|
13
13
|
getIngredients(): Ingredient[];
|
|
14
14
|
getResults(): never[];
|
|
15
|
-
replace(
|
|
15
|
+
replace(modifier: RecipeModifier): SpaceStationRecipe;
|
|
16
16
|
serialize(context: RecipeParseContext): Partial<SpaceStationRecipeDefinition>;
|
|
17
17
|
}
|
|
18
18
|
export declare class SpaceStationRecipeParser extends RecipeParser<SpaceStationRecipeDefinition, SpaceStationRecipe> {
|
|
@@ -19,8 +19,8 @@ export class SpaceStationRecipe extends Recipe {
|
|
|
19
19
|
getResults() {
|
|
20
20
|
return [];
|
|
21
21
|
}
|
|
22
|
-
replace(
|
|
23
|
-
return new SpaceStationRecipe(this.ingredients.map(
|
|
22
|
+
replace(modifier) {
|
|
23
|
+
return new SpaceStationRecipe(this.ingredients.map(modifier.ingredient));
|
|
24
24
|
}
|
|
25
25
|
serialize(context) {
|
|
26
26
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spaceStation.js","sourceRoot":"","sources":["../../../../src/parser/recipe/adAstra/spaceStation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,CAAC,MAAM,KAAK,CAAC;AACpB,OAAO,EACL,cAAc,EACd,iBAAiB,GAElB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAGtD,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEnD,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;IAC7C,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC;AASH,MAAM,OAAO,kBAAmB,SAAQ,MAAM;IACf;IAA7B,YAA6B,WAAyB;QACpD,KAAK,EAAE,CAAC;QADmB,gBAAW,GAAX,WAAW,CAAc;IAEtD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;
|
|
1
|
+
{"version":3,"file":"spaceStation.js","sourceRoot":"","sources":["../../../../src/parser/recipe/adAstra/spaceStation.ts"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AE,CAAC;gBAC5D,CAAC;gBAED,MAAM,IAAI,iBAAiB,CACzB,qDAAqD,EACrD,EAAE,CACH,CAAC;YACJ,CAAC,CAAC;SACL,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,wBAAyB,SAAQ,YAG7C;IACC,WAAW,CACT,UAAwC,EACxC,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAChD,UAAU,CAAC,WAAW;aACnB,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,uBAAuB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;aAC9C,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,CACxD,CAAC;QAEF,OAAO,IAAI,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC7C,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 RecipeParser, { Recipe, type
|
|
4
|
+
import RecipeParser, { Recipe, type RecipeModifier, type RecipeParseContext } from "../index.js";
|
|
5
5
|
export type ApothecaryRecipeDefinition = RecipeDefinition & Readonly<{
|
|
6
6
|
ingredients: unknown[];
|
|
7
7
|
output: unknown;
|
|
@@ -14,7 +14,7 @@ export declare class ApothecaryRecipe extends Recipe {
|
|
|
14
14
|
constructor(ingredients: Ingredient[], result: Result, reagent: Ingredient);
|
|
15
15
|
getIngredients(): Ingredient[];
|
|
16
16
|
getResults(): Result[];
|
|
17
|
-
replace(
|
|
17
|
+
replace(modifier: RecipeModifier): ApothecaryRecipe;
|
|
18
18
|
serialize(context: RecipeParseContext): Partial<ApothecaryRecipeDefinition>;
|
|
19
19
|
}
|
|
20
20
|
export declare class ApothecaryRecipeParser extends RecipeParser<ApothecaryRecipeDefinition, ApothecaryRecipe> {
|
|
@@ -15,8 +15,8 @@ export class ApothecaryRecipe extends Recipe {
|
|
|
15
15
|
getResults() {
|
|
16
16
|
return [this.result];
|
|
17
17
|
}
|
|
18
|
-
replace(
|
|
19
|
-
return new ApothecaryRecipe(this.ingredients.map(
|
|
18
|
+
replace(modifier) {
|
|
19
|
+
return new ApothecaryRecipe(this.ingredients.map(modifier.ingredient), modifier.result(this.result), modifier.ingredient(this.reagent));
|
|
20
20
|
}
|
|
21
21
|
serialize(context) {
|
|
22
22
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apothecary.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/apothecary.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EACnB,MAAM,GAGP,MAAM,aAAa,CAAC;AASrB,MAAM,OAAO,gBAAiB,SAAQ,MAAM;IAErB;IACA;IACA;IAHrB,YACqB,WAAyB,EACzB,MAAc,EACd,OAAmB;QAEtC,KAAK,EAAE,CAAC;QAJW,gBAAW,GAAX,WAAW,CAAc;QACzB,WAAM,GAAN,MAAM,CAAQ;QACd,YAAO,GAAP,OAAO,CAAY;IAGxC,CAAC;IAEQ,cAAc;QACrB,OAAO,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEQ,UAAU;QACjB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,
|
|
1
|
+
{"version":3,"file":"apothecary.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/apothecary.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EACnB,MAAM,GAGP,MAAM,aAAa,CAAC;AASrB,MAAM,OAAO,gBAAiB,SAAQ,MAAM;IAErB;IACA;IACA;IAHrB,YACqB,WAAyB,EACzB,MAAc,E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,OAAO,IAAI,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5D,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Ingredient } from "../../../common/ingredient/index.js";
|
|
2
2
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { RecipeModifier, RecipeParseContext } from "../index.js";
|
|
4
4
|
import RecipeParser, { Recipe } from "../index.js";
|
|
5
5
|
export type BrewRecipeDefinition = RecipeDefinition & Readonly<{
|
|
6
6
|
ingredients: unknown[];
|
|
@@ -11,7 +11,7 @@ export declare class BrewRecipe extends Recipe {
|
|
|
11
11
|
constructor(ingredients: Ingredient[]);
|
|
12
12
|
getIngredients(): Ingredient[];
|
|
13
13
|
getResults(): never[];
|
|
14
|
-
replace(
|
|
14
|
+
replace(modifier: RecipeModifier): BrewRecipe;
|
|
15
15
|
serialize(context: RecipeParseContext): Partial<BrewRecipeDefinition>;
|
|
16
16
|
}
|
|
17
17
|
export declare class BrewRecipeParser extends RecipeParser<BrewRecipeDefinition, BrewRecipe> {
|
|
@@ -11,8 +11,8 @@ export class BrewRecipe extends Recipe {
|
|
|
11
11
|
getResults() {
|
|
12
12
|
return [];
|
|
13
13
|
}
|
|
14
|
-
replace(
|
|
15
|
-
return new BrewRecipe(this.ingredients.map(
|
|
14
|
+
replace(modifier) {
|
|
15
|
+
return new BrewRecipe(this.ingredients.map(modifier.ingredient));
|
|
16
16
|
}
|
|
17
17
|
serialize(context) {
|
|
18
18
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brew.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/brew.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQnD,MAAM,OAAO,UAAW,SAAQ,MAAM;IACP;IAA7B,YAA6B,WAAyB;QACpD,KAAK,EAAE,CAAC;QADmB,gBAAW,GAAX,WAAW,CAAc;IAEtD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;IAEQ,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"brew.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/brew.ts"],"names":[],"mappings":"AAGA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQnD,MAAM,OAAO,UAAW,SAAQ,MAAM;IACP;IAA7B,YAA6B,WAAyB;QACpD,KAAK,EAAE,CAAC;QADmB,gBAAW,GAAX,WAAW,CAAc;IAEtD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC;IACnE,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC;SACjE,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,gBAAiB,SAAQ,YAGrC;IACC,WAAW,CACT,UAAgC,EAChC,OAA2B;QAE3B,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3E,OAAO,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;IACrC,CAAC;CACF"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { Ingredient } from "../../../common/ingredient/index.js";
|
|
2
|
-
import type { Result } from "../../../common/result/index.js";
|
|
3
1
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
-
import type { RecipeHolder,
|
|
2
|
+
import type { RecipeHolder, RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
3
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
4
|
export type GogWrapperRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
5
|
nbt: string;
|
|
@@ -12,9 +10,9 @@ export declare class GogWrapperRecipe extends Recipe {
|
|
|
12
10
|
private readonly base;
|
|
13
11
|
private readonly gog;
|
|
14
12
|
constructor(base: RecipeHolder, gog: RecipeHolder);
|
|
15
|
-
getIngredients(): Ingredient[];
|
|
16
|
-
getResults(): Result[];
|
|
17
|
-
replace(
|
|
13
|
+
getIngredients(): import("../../../common/ingredient/index.js").Ingredient[];
|
|
14
|
+
getResults(): import("../../../common/result/index.js").Result[];
|
|
15
|
+
replace(modifier: RecipeModifier): GogWrapperRecipe;
|
|
18
16
|
serialize(context: RecipeParseContext): Partial<GogWrapperRecipeDefinition>;
|
|
19
17
|
}
|
|
20
18
|
export declare class GogWrapperRecipeParser extends RecipeParser<GogWrapperRecipeDefinition, GogWrapperRecipe> {
|
|
@@ -13,8 +13,8 @@ export class GogWrapperRecipe extends Recipe {
|
|
|
13
13
|
getResults() {
|
|
14
14
|
return [...this.base.getResults(), ...this.gog.getResults()];
|
|
15
15
|
}
|
|
16
|
-
replace(
|
|
17
|
-
return new GogWrapperRecipe(this.base.replace(
|
|
16
|
+
replace(modifier) {
|
|
17
|
+
return new GogWrapperRecipe(this.base.replace(modifier), this.gog.replace(modifier));
|
|
18
18
|
}
|
|
19
19
|
serialize(context) {
|
|
20
20
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gogWrapper.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/gogWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gogWrapper.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/gogWrapper.ts"],"names":[],"mappings":"AAMA,OAAO,YAAY,E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AG,CAAC,CAAC;IACzC,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 ManaInfusionRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
7
|
input: unknown;
|
|
@@ -16,7 +16,7 @@ export declare class ManaInfusionRecipe extends Recipe {
|
|
|
16
16
|
constructor(ingredient: Ingredient, result: Result, catalyst?: Ingredient | undefined);
|
|
17
17
|
getIngredients(): Ingredient[];
|
|
18
18
|
getResults(): Result[];
|
|
19
|
-
replace(
|
|
19
|
+
replace(modifier: RecipeModifier): ManaInfusionRecipe;
|
|
20
20
|
serialize(context: RecipeParseContext): Partial<ManaInfusionRecipeDefinition>;
|
|
21
21
|
}
|
|
22
22
|
export declare class ManaInfusionRecipeParser extends RecipeParser<ManaInfusionRecipeDefinition, ManaInfusionRecipe> {
|
|
@@ -17,8 +17,8 @@ export class ManaInfusionRecipe extends Recipe {
|
|
|
17
17
|
getResults() {
|
|
18
18
|
return [this.result];
|
|
19
19
|
}
|
|
20
|
-
replace(
|
|
21
|
-
return new ManaInfusionRecipe(
|
|
20
|
+
replace(modifier) {
|
|
21
|
+
return new ManaInfusionRecipe(modifier.ingredient(this.ingredient), modifier.result(this.result), this.catalyst && modifier.ingredient(this.catalyst));
|
|
22
22
|
}
|
|
23
23
|
serialize(context) {
|
|
24
24
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manaInfusion.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/manaInfusion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAKlD,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../common/result/index.js";
|
|
3
1
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
-
import type { RecipeHolder,
|
|
2
|
+
import type { RecipeHolder, RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
3
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
4
|
export type NbtWrapperRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
5
|
nbt: string;
|
|
@@ -10,9 +8,9 @@ export type NbtWrapperRecipeDefinition = RecipeDefinition & Readonly<{
|
|
|
10
8
|
export declare class NbtWrapperRecipe extends Recipe {
|
|
11
9
|
private readonly recipe;
|
|
12
10
|
constructor(recipe: RecipeHolder);
|
|
13
|
-
getIngredients(): Ingredient[];
|
|
14
|
-
getResults(): Result[];
|
|
15
|
-
replace(
|
|
11
|
+
getIngredients(): import("../../../common/ingredient/index.js").Ingredient[];
|
|
12
|
+
getResults(): import("../../../common/result/index.js").Result[];
|
|
13
|
+
replace(modifier: RecipeModifier): NbtWrapperRecipe;
|
|
16
14
|
serialize(context: RecipeParseContext): Partial<NbtWrapperRecipeDefinition>;
|
|
17
15
|
}
|
|
18
16
|
export declare class NbtWrapperRecipeParser extends RecipeParser<NbtWrapperRecipeDefinition, NbtWrapperRecipe> {
|
|
@@ -11,8 +11,8 @@ export class NbtWrapperRecipe extends Recipe {
|
|
|
11
11
|
getResults() {
|
|
12
12
|
return this.recipe.getResults();
|
|
13
13
|
}
|
|
14
|
-
replace(
|
|
15
|
-
return new NbtWrapperRecipe(this.recipe.replace(
|
|
14
|
+
replace(modifier) {
|
|
15
|
+
return new NbtWrapperRecipe(this.recipe.replace(modifier));
|
|
16
16
|
}
|
|
17
17
|
serialize(context) {
|
|
18
18
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nbtWrapper.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/nbtWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nbtWrapper.js","sourceRoot":"","sources":["../../../../src/parser/recipe/botania/nbtWrapper.ts"],"names":[],"mappings":"AAMA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAQnD,MAAM,OAAO,gBAAiB,SAAQ,MAAM;IACb;IAA7B,YAA6B,MAAoB;QAC/C,KAAK,EAAE,CAAC;QADmB,WAAM,GAAN,MAAM,CAAc;IAEjD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC;IACtC,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC7D,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;SAC/C,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,sBAAuB,SAAQ,YAG3C;IACC,WAAW,CACT,UAAsC,EACtC,OAA2B;QAE3B,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QAC9D,OAAO,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC;IACtC,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 { RecipeHolder,
|
|
4
|
+
import type { RecipeHolder, RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
5
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
6
|
export type AssemblyRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
7
|
ingredient: unknown;
|
|
@@ -18,7 +18,7 @@ export declare class AssemblyRecipe extends Recipe {
|
|
|
18
18
|
constructor(ingredient: Ingredient, transitionalItem: Ingredient, results: Result[], sequence: RecipeHolder[]);
|
|
19
19
|
getIngredients(): Ingredient[];
|
|
20
20
|
getResults(): Result[];
|
|
21
|
-
replace(
|
|
21
|
+
replace(modifier: RecipeModifier): AssemblyRecipe;
|
|
22
22
|
serialize(context: RecipeParseContext): Partial<AssemblyRecipeDefinition>;
|
|
23
23
|
}
|
|
24
24
|
export declare class AssemblyRecipeParser extends RecipeParser<AssemblyRecipeDefinition, AssemblyRecipe> {
|
|
@@ -21,8 +21,8 @@ export class AssemblyRecipe extends Recipe {
|
|
|
21
21
|
getResults() {
|
|
22
22
|
return [...this.results, ...this.sequence.flatMap((it) => it.getResults())];
|
|
23
23
|
}
|
|
24
|
-
replace(
|
|
25
|
-
return new AssemblyRecipe(
|
|
24
|
+
replace(modifier) {
|
|
25
|
+
return new AssemblyRecipe(modifier.ingredient(this.ingredient), modifier.ingredient(this.transitionalItem), this.results.map(modifier.result), this.sequence.map((it) => it.replace(modifier)));
|
|
26
26
|
}
|
|
27
27
|
serialize(context) {
|
|
28
28
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembly.js","sourceRoot":"","sources":["../../../../src/parser/recipe/create/assembly.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"assembly.js","sourceRoot":"","sources":["../../../../src/parser/recipe/create/assembly.ts"],"names":[],"mappings":"AAQA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAWnD,MAAM,OAAO,cAAe,SAAQ,MAAM;IAErB;IACA;IACA;IACA;IAJnB,YACmB,UAAsB,EACtB,gBAA4B,EAC5B,OAAiB,EACjB,QAAwB;QAEzC,KAAK,EAAE,CAAC;QALS,eAAU,GAAV,UAAU,CAAY;QACtB,qBAAgB,GAAhB,gBAAg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O,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;SACnE,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,oBAAqB,SAAQ,YAGzC;IACC,WAAW,CACT,UAAoC,EACpC,OAA2B;QAE3B,MAAM,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QACrE,MAAM,gBAAgB,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CACjD,UAAU,CAAC,gBAAgB,CAC5B,CAAC;QACF,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC/D,MAAM,QAAQ,GAAG,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAC9C,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,CAChC,CAAC;QACF,OAAO,IAAI,cAAc,CAAC,UAAU,EAAE,gBAAgB,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC;IAC7E,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 CookingRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
7
|
ingredients: unknown[];
|
|
@@ -18,7 +18,7 @@ export declare class CookingRecipe extends Recipe {
|
|
|
18
18
|
constructor(ingredients: Ingredient[], result: Result, container?: Ingredient | undefined);
|
|
19
19
|
getIngredients(): Ingredient[];
|
|
20
20
|
getResults(): Result[];
|
|
21
|
-
replace(
|
|
21
|
+
replace(modifier: RecipeModifier): CookingRecipe;
|
|
22
22
|
serialize(context: RecipeParseContext): Partial<CookingRecipeDefinition>;
|
|
23
23
|
}
|
|
24
24
|
export default class CookingRecipeParser extends RecipeParser<CookingRecipeDefinition, CookingRecipe> {
|
|
@@ -16,8 +16,8 @@ export class CookingRecipe extends Recipe {
|
|
|
16
16
|
getResults() {
|
|
17
17
|
return [this.result];
|
|
18
18
|
}
|
|
19
|
-
replace(
|
|
20
|
-
return new CookingRecipe(this.ingredients.map(
|
|
19
|
+
replace(modifier) {
|
|
20
|
+
return new CookingRecipe(this.ingredients.map(modifier.ingredient), modifier.result(this.result), this.container && modifier.ingredient(this.container));
|
|
21
21
|
}
|
|
22
22
|
serialize(context) {
|
|
23
23
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cooking.js","sourceRoot":"","sources":["../../../../src/parser/recipe/farmersdelight/cooking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAKlD,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAYnD,MAAM,OAAO,aAAc,SAAQ,MAAM;IAEpB;IACA;IACA;IAHnB,YACmB,WAAyB,EACzB,MAAc,EACd,SAAsB;QAEvC,KAAK,EAAE,CAAC;QAJS,gBAAW,GAAX,WAAW,CAAc;QACzB,WAAM,GAAN,MAAM,CAAQ;QACd,cAAS,GAAT,SAAS,CAAa;IAGzC,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9D,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC;IAEQ,OAAO,
|
|
1
|
+
{"version":3,"file":"cooking.js","sourceRoot":"","sources":["../../../../src/parser/recipe/farmersdelight/cooking.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAA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,CAAC,WAAW,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAC3E,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACzD,yCAAyC;QACzC,MAAM,SAAS,GACb,UAAU,CAAC,SAAS,KAAK,SAAS;YAChC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;QACvD,OAAO,IAAI,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IAC3D,CAAC;CACF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Ingredient } from "../../../common/ingredient/index.js";
|
|
2
2
|
import type { Result } from "../../../common/result/index.js";
|
|
3
|
-
import RecipeParser, { type
|
|
3
|
+
import RecipeParser, { type RecipeModifier, type RecipeParseContext } from "../index.js";
|
|
4
4
|
import { ManyToManyRecipe, type ManyToManyRecipeDefinition } from "../manyToMany.js";
|
|
5
5
|
export type ToolInput = Readonly<{
|
|
6
6
|
type: "farmersdelight:tool_action";
|
|
@@ -14,7 +14,7 @@ export declare class CuttingRecipe extends ManyToManyRecipe {
|
|
|
14
14
|
private readonly tool;
|
|
15
15
|
constructor(ingredients: Ingredient[], results: Result[], tool: Ingredient);
|
|
16
16
|
getIngredients(): Ingredient[];
|
|
17
|
-
replace(
|
|
17
|
+
replace(modifier: RecipeModifier): CuttingRecipe;
|
|
18
18
|
serialize(context: RecipeParseContext): Partial<CuttingRecipeDefinition>;
|
|
19
19
|
}
|
|
20
20
|
export default class CuttingRecipeParser extends RecipeParser<CuttingRecipeDefinition, CuttingRecipe> {
|
|
@@ -18,8 +18,8 @@ export class CuttingRecipe extends ManyToManyRecipe {
|
|
|
18
18
|
getIngredients() {
|
|
19
19
|
return [...super.getIngredients(), this.tool];
|
|
20
20
|
}
|
|
21
|
-
replace(
|
|
22
|
-
return new CuttingRecipe(this.ingredients.map(
|
|
21
|
+
replace(modifier) {
|
|
22
|
+
return new CuttingRecipe(this.ingredients.map(modifier.ingredient), this.results.map(modifier.result), modifier.ingredient(this.tool));
|
|
23
23
|
}
|
|
24
24
|
serialize(context) {
|
|
25
25
|
const { results, ...rest } = super.serialize(context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cutting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/farmersdelight/cutting.ts"],"names":[],"mappings":"AAEA,OAAO,YAAY,EAAE,EAGpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,GAEjB,MAAM,kBAAkB,CAAC;AAgB1B,2BAA2B;AAC3B,sEAAsE;AACtE,aAAa;AACb,iBAAiB;AACjB,mCAAmC;AACnC,yBAAyB;AACzB,kDAAkD;AAClD,OAAO;AACP,IAAI;AAEJ,MAAM,OAAO,aAAc,SAAQ,gBAAgB;IAI9B;IAHnB,YACE,WAAyB,EACzB,OAAiB,EACA,IAAgB;QAEjC,KAAK,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;QAFX,SAAI,GAAJ,IAAI,CAAY;IAGnC,CAAC;IAEQ,cAAc;QACrB,OAAO,CAAC,GAAG,KAAK,CAAC,cAAc,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IAChD,CAAC;IAEQ,OAAO,
|
|
1
|
+
{"version":3,"file":"cutting.js","sourceRoot":"","sources":["../../../../src/parser/recipe/farmersdelight/cutting.ts"],"names":[],"mappings":"AAEA,OAAO,YAAY,EAAE,EAGpB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,gBAAgB,GAEjB,MAAM,kBAAkB,CAAC;AAgB1B,2BAA2B;AAC3B,sEAAsE;AACtE,aAAa;AACb,iBAAiB;AACjB,mCAAmC;AACnC,yBAAyB;AACzB,kDAAkD;AAClD,OAAO;AACP,IAAI;AAEJ,MAAM,OAAO,aAAc,SAAQ,gBAAgB;IAI9B;IAHnB,Y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C;CACF"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { Ingredient } from "../../../common/ingredient/index.js";
|
|
2
|
-
import type { Result } from "../../../common/result/index.js";
|
|
3
1
|
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
-
import type { RecipeHolder,
|
|
2
|
+
import type { RecipeHolder, RecipeModifier, RecipeParseContext } from "../index.js";
|
|
5
3
|
import RecipeParser, { Recipe } from "../index.js";
|
|
6
4
|
type WithConditions<T> = {
|
|
7
5
|
conditions: unknown[];
|
|
@@ -13,9 +11,9 @@ export type ForgeConditionalRecipeDefinition = RecipeDefinition & Readonly<{
|
|
|
13
11
|
export declare class ForgeConditionalRecipe extends Recipe {
|
|
14
12
|
private readonly recipes;
|
|
15
13
|
constructor(recipes: WithConditions<RecipeHolder>[]);
|
|
16
|
-
getIngredients(): Ingredient[];
|
|
17
|
-
getResults(): Result[];
|
|
18
|
-
replace(
|
|
14
|
+
getIngredients(): import("../../../common/ingredient/index.js").Ingredient[];
|
|
15
|
+
getResults(): import("../../../common/result/index.js").Result[];
|
|
16
|
+
replace(modifier: RecipeModifier): ForgeConditionalRecipe;
|
|
19
17
|
serialize(context: RecipeParseContext): Partial<ForgeConditionalRecipeDefinition>;
|
|
20
18
|
additionalTypes(): `${string}:${string}`[];
|
|
21
19
|
}
|
|
@@ -11,10 +11,10 @@ export class ForgeConditionalRecipe extends Recipe {
|
|
|
11
11
|
getResults() {
|
|
12
12
|
return this.recipes.flatMap((it) => it.recipe.getResults());
|
|
13
13
|
}
|
|
14
|
-
replace(
|
|
14
|
+
replace(modifier) {
|
|
15
15
|
return new ForgeConditionalRecipe(this.recipes.map((it) => ({
|
|
16
16
|
...it,
|
|
17
|
-
recipe: it.recipe.replace(
|
|
17
|
+
recipe: it.recipe.replace(modifier),
|
|
18
18
|
})));
|
|
19
19
|
}
|
|
20
20
|
serialize(context) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conditional.js","sourceRoot":"","sources":["../../../../src/parser/recipe/forge/conditional.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conditional.js","sourceRoot":"","sources":["../../../../src/parser/recipe/forge/conditional.ts"],"names":[],"mappings":"AAMA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAYnD,MAAM,OAAO,sBAAuB,SAAQ,MAAM;IACnB;IAA7B,YAA6B,OAAuC;QAClE,KAAK,EAAE,CAAC;QADmB,YAAO,GAAP,OAAO,CAAgC;IAEpE,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,cAAc,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,CAAC;IAC9D,CAAC;IAEQ,OAAO,CAAC,QAAwB;QACvC,OAAO,IAAI,sBAAsB,CAC/B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YACxB,GAAG,EAAE;YACL,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC;SACpC,CAAC,CAAC,CACJ,CAAC;IACJ,CAAC;IAEQ,SAAS,CAChB,OAA2B;QAE3B,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;gBACjC,GAAG,EAAE;gBACL,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC;aAC7C,CAAC,CAAC;SACJ,CAAC;IACJ,CAAC;IAEQ,eAAe;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC5D,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,YAGzD;IACU,WAAW,CAClB,UAA4C,EAC5C,OAA2B;QAE3B,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,GAAG,CACpC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC;YACP,UAAU,EAAE,EAAE,CAAC,UAAU;YACzB,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,MAAM,CAAC;SAC/C,CAAC,CACH,CAAC;QAEF,OAAO,IAAI,sBAAsB,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -6,6 +6,10 @@ import type { PackContext } from "../../loader/context.js";
|
|
|
6
6
|
import type { RecipeDefinition } from "../../schema/data/recipe.js";
|
|
7
7
|
export type Replacer<T> = (value: T) => T;
|
|
8
8
|
export declare function createReplacer<T>(from: Predicate<T>, to: T): Replacer<T>;
|
|
9
|
+
export type RecipeModifier = {
|
|
10
|
+
result: Replacer<Result>;
|
|
11
|
+
ingredient: Replacer<Ingredient>;
|
|
12
|
+
};
|
|
9
13
|
export declare class RecipeHolder {
|
|
10
14
|
private readonly definition;
|
|
11
15
|
private readonly recipe;
|
|
@@ -18,7 +22,7 @@ export declare class RecipeHolder {
|
|
|
18
22
|
};
|
|
19
23
|
getIngredients(): Ingredient[];
|
|
20
24
|
getResults(): Result[];
|
|
21
|
-
replace(
|
|
25
|
+
replace(modifier: RecipeModifier): RecipeHolder;
|
|
22
26
|
replaceIngredient(replace: Replacer<Ingredient>): RecipeHolder;
|
|
23
27
|
replaceResult(replace: Replacer<Result>): RecipeHolder;
|
|
24
28
|
getTypes(): NormalizedId[];
|
|
@@ -26,7 +30,7 @@ export declare class RecipeHolder {
|
|
|
26
30
|
export declare abstract class Recipe {
|
|
27
31
|
abstract getIngredients(): Ingredient[];
|
|
28
32
|
abstract getResults(): Result[];
|
|
29
|
-
abstract replace(
|
|
33
|
+
abstract replace(modifier: RecipeModifier): Recipe;
|
|
30
34
|
additionalTypes(): NormalizedId[];
|
|
31
35
|
abstract serialize(context: RecipeParseContext): Partial<RecipeDefinition>;
|
|
32
36
|
}
|
|
@@ -31,15 +31,21 @@ export class RecipeHolder {
|
|
|
31
31
|
return this.recipe.getResults();
|
|
32
32
|
}
|
|
33
33
|
// TODO rename modifiy & add modifier object
|
|
34
|
-
replace(
|
|
35
|
-
const modified = this.recipe.replace(
|
|
34
|
+
replace(modifier) {
|
|
35
|
+
const modified = this.recipe.replace(modifier);
|
|
36
36
|
return new RecipeHolder(this.definition, modified);
|
|
37
37
|
}
|
|
38
38
|
replaceIngredient(replace) {
|
|
39
|
-
return this.replace(
|
|
39
|
+
return this.replace({
|
|
40
|
+
ingredient: replace,
|
|
41
|
+
result: keep(),
|
|
42
|
+
});
|
|
40
43
|
}
|
|
41
44
|
replaceResult(replace) {
|
|
42
|
-
return this.replace(
|
|
45
|
+
return this.replace({
|
|
46
|
+
ingredient: keep(),
|
|
47
|
+
result: replace,
|
|
48
|
+
});
|
|
43
49
|
}
|
|
44
50
|
getTypes() {
|
|
45
51
|
return [this.type, ...this.recipe.additionalTypes()];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/parser/recipe/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAqB,MAAM,oBAAoB,CAAC;AASjE,MAAM,UAAU,cAAc,CAAI,IAAkB,EAAE,EAAK;IACzD,OAAO,CAAC,EAAK,EAAE,EAAE;QACf,IAAI,IAAI,CAAC,EAAE,CAAC;YAAE,OAAO,EAAE,CAAC;QACxB,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,IAAI;IACX,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAClB,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