@adeficior/data-modifier 1.0.0-rc.9
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/cli/codegen/registry.d.ts +3 -0
- package/dist/cli/codegen/registry.js +81 -0
- package/dist/cli/codegen/registry.js.map +1 -0
- package/dist/cli/config.d.ts +10 -0
- package/dist/cli/config.js +60 -0
- package/dist/cli/config.js.map +1 -0
- package/dist/cli/index.d.ts +1 -0
- package/dist/cli/index.js +34 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/common/id.d.ts +15 -0
- package/dist/common/id.js +42 -0
- package/dist/common/id.js.map +1 -0
- package/dist/common/ingredient.d.ts +49 -0
- package/dist/common/ingredient.js +108 -0
- package/dist/common/ingredient.js.map +1 -0
- package/dist/common/predicates.d.ts +7 -0
- package/dist/common/predicates.js +32 -0
- package/dist/common/predicates.js.map +1 -0
- package/dist/common/registry.d.ts +12 -0
- package/dist/common/registry.js +36 -0
- package/dist/common/registry.js.map +1 -0
- package/dist/common/result.d.ts +48 -0
- package/dist/common/result.js +37 -0
- package/dist/common/result.js.map +1 -0
- package/dist/emit/assets/blockstates.d.ts +18 -0
- package/dist/emit/assets/blockstates.js +46 -0
- package/dist/emit/assets/blockstates.js.map +1 -0
- package/dist/emit/assets/lang.d.ts +33 -0
- package/dist/emit/assets/lang.js +103 -0
- package/dist/emit/assets/lang.js.map +1 -0
- package/dist/emit/assets/models.d.ts +24 -0
- package/dist/emit/assets/models.js +59 -0
- package/dist/emit/assets/models.js.map +1 -0
- package/dist/emit/blacklist.d.ts +32 -0
- package/dist/emit/blacklist.js +99 -0
- package/dist/emit/blacklist.js.map +1 -0
- package/dist/emit/content/blockDefinition.d.ts +58 -0
- package/dist/emit/content/blockDefinition.js +58 -0
- package/dist/emit/content/blockDefinition.js.map +1 -0
- package/dist/emit/content/innerBlockDefinition.d.ts +12 -0
- package/dist/emit/content/innerBlockDefinition.js +32 -0
- package/dist/emit/content/innerBlockDefinition.js.map +1 -0
- package/dist/emit/content/itemDefinition.d.ts +58 -0
- package/dist/emit/content/itemDefinition.js +54 -0
- package/dist/emit/content/itemDefinition.js.map +1 -0
- package/dist/emit/custom.d.ts +15 -0
- package/dist/emit/custom.js +42 -0
- package/dist/emit/custom.js.map +1 -0
- package/dist/emit/data/loot.d.ts +48 -0
- package/dist/emit/data/loot.js +108 -0
- package/dist/emit/data/loot.js.map +1 -0
- package/dist/emit/data/recipe.d.ts +46 -0
- package/dist/emit/data/recipe.js +106 -0
- package/dist/emit/data/recipe.js.map +1 -0
- package/dist/emit/data/tags.d.ts +38 -0
- package/dist/emit/data/tags.js +115 -0
- package/dist/emit/data/tags.js.map +1 -0
- package/dist/emit/index.d.ts +11 -0
- package/dist/emit/index.js +1 -0
- package/dist/emit/index.js.map +1 -0
- package/dist/emit/polytoneTabs.d.ts +65 -0
- package/dist/emit/polytoneTabs.js +101 -0
- package/dist/emit/polytoneTabs.js.map +1 -0
- package/dist/emit/rule/index.d.ts +10 -0
- package/dist/emit/rule/index.js +10 -0
- package/dist/emit/rule/index.js.map +1 -0
- package/dist/emit/rule/lootTable.d.ts +14 -0
- package/dist/emit/rule/lootTable.js +47 -0
- package/dist/emit/rule/lootTable.js.map +1 -0
- package/dist/emit/rule/recipe.d.ts +16 -0
- package/dist/emit/rule/recipe.js +29 -0
- package/dist/emit/rule/recipe.js.map +1 -0
- package/dist/emit/ruled.d.ts +18 -0
- package/dist/emit/ruled.js +47 -0
- package/dist/emit/ruled.js.map +1 -0
- package/dist/error.d.ts +12 -0
- package/dist/error.js +45 -0
- package/dist/error.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -0
- package/dist/loader/index.d.ts +16 -0
- package/dist/loader/index.js +40 -0
- package/dist/loader/index.js.map +1 -0
- package/dist/loader/lang.d.ts +7 -0
- package/dist/loader/lang.js +12 -0
- package/dist/loader/lang.js.map +1 -0
- package/dist/loader/loot.d.ts +7 -0
- package/dist/loader/loot.js +12 -0
- package/dist/loader/loot.js.map +1 -0
- package/dist/loader/pack.d.ts +62 -0
- package/dist/loader/pack.js +131 -0
- package/dist/loader/pack.js.map +1 -0
- package/dist/loader/recipe.d.ts +25 -0
- package/dist/loader/recipe.js +207 -0
- package/dist/loader/recipe.js.map +1 -0
- package/dist/loader/registry/dump.d.ts +19 -0
- package/dist/loader/registry/dump.js +74 -0
- package/dist/loader/registry/dump.js.map +1 -0
- package/dist/loader/registry/empty.d.ts +11 -0
- package/dist/loader/registry/empty.js +22 -0
- package/dist/loader/registry/empty.js.map +1 -0
- package/dist/loader/registry/index.d.ts +11 -0
- package/dist/loader/registry/index.js +1 -0
- package/dist/loader/registry/index.js.map +1 -0
- package/dist/loader/tags.d.ts +26 -0
- package/dist/loader/tags.js +131 -0
- package/dist/loader/tags.js.map +1 -0
- package/dist/parser/adAstra.d.ts +11 -0
- package/dist/parser/adAstra.js +6 -0
- package/dist/parser/adAstra.js.map +1 -0
- package/dist/parser/botania.d.ts +20 -0
- package/dist/parser/botania.js +11 -0
- package/dist/parser/botania.js.map +1 -0
- package/dist/parser/create.d.ts +4 -0
- package/dist/parser/create.js +3 -0
- package/dist/parser/create.js.map +1 -0
- package/dist/parser/farmersdelight.d.ts +4 -0
- package/dist/parser/farmersdelight.js +3 -0
- package/dist/parser/farmersdelight.js.map +1 -0
- package/dist/parser/index.d.ts +13 -0
- package/dist/parser/index.js +8 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/parser/lootTable.d.ts +7 -0
- package/dist/parser/lootTable.js +70 -0
- package/dist/parser/lootTable.js.map +1 -0
- package/dist/parser/recipe/adAstra/conversion.d.ts +20 -0
- package/dist/parser/recipe/adAstra/conversion.js +33 -0
- package/dist/parser/recipe/adAstra/conversion.js.map +1 -0
- package/dist/parser/recipe/adAstra/hammering.d.ts +18 -0
- package/dist/parser/recipe/adAstra/hammering.js +27 -0
- package/dist/parser/recipe/adAstra/hammering.js.map +1 -0
- package/dist/parser/recipe/adAstra/index.d.ts +5 -0
- package/dist/parser/recipe/adAstra/index.js +1 -0
- package/dist/parser/recipe/adAstra/index.js.map +1 -0
- package/dist/parser/recipe/adAstra/inputOutput.d.ts +24 -0
- package/dist/parser/recipe/adAstra/inputOutput.js +42 -0
- package/dist/parser/recipe/adAstra/inputOutput.js.map +1 -0
- package/dist/parser/recipe/adAstra/nasaWorkbench.d.ts +20 -0
- package/dist/parser/recipe/adAstra/nasaWorkbench.js +30 -0
- package/dist/parser/recipe/adAstra/nasaWorkbench.js.map +1 -0
- package/dist/parser/recipe/adAstra/spaceStation.d.ts +19 -0
- package/dist/parser/recipe/adAstra/spaceStation.js +27 -0
- package/dist/parser/recipe/adAstra/spaceStation.js.map +1 -0
- package/dist/parser/recipe/botania/apothecary.d.ts +19 -0
- package/dist/parser/recipe/botania/apothecary.js +28 -0
- package/dist/parser/recipe/botania/apothecary.js.map +1 -0
- package/dist/parser/recipe/botania/brew.d.ts +18 -0
- package/dist/parser/recipe/botania/brew.js +24 -0
- package/dist/parser/recipe/botania/brew.js.map +1 -0
- package/dist/parser/recipe/botania/elvenTrade.d.ts +19 -0
- package/dist/parser/recipe/botania/elvenTrade.js +27 -0
- package/dist/parser/recipe/botania/elvenTrade.js.map +1 -0
- package/dist/parser/recipe/botania/gogWrapper.d.ts +22 -0
- package/dist/parser/recipe/botania/gogWrapper.js +34 -0
- package/dist/parser/recipe/botania/gogWrapper.js.map +1 -0
- package/dist/parser/recipe/botania/manaInfusion.d.ts +21 -0
- package/dist/parser/recipe/botania/manaInfusion.js +33 -0
- package/dist/parser/recipe/botania/manaInfusion.js.map +1 -0
- package/dist/parser/recipe/botania/nbtWrapper.d.ts +20 -0
- package/dist/parser/recipe/botania/nbtWrapper.js +30 -0
- package/dist/parser/recipe/botania/nbtWrapper.js.map +1 -0
- package/dist/parser/recipe/botania/orechid.d.ts +35 -0
- package/dist/parser/recipe/botania/orechid.js +74 -0
- package/dist/parser/recipe/botania/orechid.js.map +1 -0
- package/dist/parser/recipe/botania/pureDaisy.d.ts +19 -0
- package/dist/parser/recipe/botania/pureDaisy.js +30 -0
- package/dist/parser/recipe/botania/pureDaisy.js.map +1 -0
- package/dist/parser/recipe/botania/runicAltar.d.ts +19 -0
- package/dist/parser/recipe/botania/runicAltar.js +27 -0
- package/dist/parser/recipe/botania/runicAltar.js.map +1 -0
- package/dist/parser/recipe/botania/terraPlate.d.ts +19 -0
- package/dist/parser/recipe/botania/terraPlate.js +27 -0
- package/dist/parser/recipe/botania/terraPlate.js.map +1 -0
- package/dist/parser/recipe/create/assembly.d.ts +25 -0
- package/dist/parser/recipe/create/assembly.js +45 -0
- package/dist/parser/recipe/create/assembly.js.map +1 -0
- package/dist/parser/recipe/create/processing.d.ts +21 -0
- package/dist/parser/recipe/create/processing.js +27 -0
- package/dist/parser/recipe/create/processing.js.map +1 -0
- package/dist/parser/recipe/farmersdelight/cooking.d.ts +22 -0
- package/dist/parser/recipe/farmersdelight/cooking.js +29 -0
- package/dist/parser/recipe/farmersdelight/cooking.js.map +1 -0
- package/dist/parser/recipe/farmersdelight/cutting.d.ts +23 -0
- package/dist/parser/recipe/farmersdelight/cutting.js +38 -0
- package/dist/parser/recipe/farmersdelight/cutting.js.map +1 -0
- package/dist/parser/recipe/forge/conditional.d.ts +25 -0
- package/dist/parser/recipe/forge/conditional.js +45 -0
- package/dist/parser/recipe/forge/conditional.js.map +1 -0
- package/dist/parser/recipe/ignored.d.ts +10 -0
- package/dist/parser/recipe/ignored.js +16 -0
- package/dist/parser/recipe/ignored.js.map +1 -0
- package/dist/parser/recipe/index.d.ts +19 -0
- package/dist/parser/recipe/index.js +22 -0
- package/dist/parser/recipe/index.js.map +1 -0
- package/dist/parser/recipe/quark/exclusion.d.ts +20 -0
- package/dist/parser/recipe/quark/exclusion.js +32 -0
- package/dist/parser/recipe/quark/exclusion.js.map +1 -0
- package/dist/parser/recipe/roots/component.d.ts +18 -0
- package/dist/parser/recipe/roots/component.js +24 -0
- package/dist/parser/recipe/roots/component.js.map +1 -0
- package/dist/parser/recipe/roots/ritual.d.ts +22 -0
- package/dist/parser/recipe/roots/ritual.js +32 -0
- package/dist/parser/recipe/roots/ritual.js.map +1 -0
- package/dist/parser/recipe/sullys/polishing.d.ts +19 -0
- package/dist/parser/recipe/sullys/polishing.js +27 -0
- package/dist/parser/recipe/sullys/polishing.js.map +1 -0
- package/dist/parser/recipe/thermal/catalyst.d.ts +22 -0
- package/dist/parser/recipe/thermal/catalyst.js +24 -0
- package/dist/parser/recipe/thermal/catalyst.js.map +1 -0
- package/dist/parser/recipe/thermal/fuel.d.ts +18 -0
- package/dist/parser/recipe/thermal/fuel.js +24 -0
- package/dist/parser/recipe/thermal/fuel.js.map +1 -0
- package/dist/parser/recipe/thermal/index.d.ts +22 -0
- package/dist/parser/recipe/thermal/index.js +36 -0
- package/dist/parser/recipe/thermal/index.js.map +1 -0
- package/dist/parser/recipe/thermal/ingredient.d.ts +21 -0
- package/dist/parser/recipe/thermal/ingredient.js +43 -0
- package/dist/parser/recipe/thermal/ingredient.js.map +1 -0
- package/dist/parser/recipe/thermal/treeExtraction.d.ts +24 -0
- package/dist/parser/recipe/thermal/treeExtraction.js +47 -0
- package/dist/parser/recipe/thermal/treeExtraction.js.map +1 -0
- package/dist/parser/recipe/vanilla/shaped.d.ts +19 -0
- package/dist/parser/recipe/vanilla/shaped.js +28 -0
- package/dist/parser/recipe/vanilla/shaped.js.map +1 -0
- package/dist/parser/recipe/vanilla/shapeless.d.ts +18 -0
- package/dist/parser/recipe/vanilla/shapeless.js +27 -0
- package/dist/parser/recipe/vanilla/shapeless.js.map +1 -0
- package/dist/parser/recipe/vanilla/smelting.d.ts +19 -0
- package/dist/parser/recipe/vanilla/smelting.js +27 -0
- package/dist/parser/recipe/vanilla/smelting.js.map +1 -0
- package/dist/parser/recipe/vanilla/smithing.d.ts +19 -0
- package/dist/parser/recipe/vanilla/smithing.js +28 -0
- package/dist/parser/recipe/vanilla/smithing.js.map +1 -0
- package/dist/parser/recipe/vanilla/stonecutting.d.ts +20 -0
- package/dist/parser/recipe/vanilla/stonecutting.js +36 -0
- package/dist/parser/recipe/vanilla/stonecutting.js.map +1 -0
- package/dist/parser/roots.d.ts +4 -0
- package/dist/parser/roots.js +3 -0
- package/dist/parser/roots.js.map +1 -0
- package/dist/parser/thermal.d.ts +10 -0
- package/dist/parser/thermal.js +6 -0
- package/dist/parser/thermal.js.map +1 -0
- package/dist/schema/assets/blockstate.d.ts +10 -0
- package/dist/schema/assets/blockstate.js +1 -0
- package/dist/schema/assets/blockstate.js.map +1 -0
- package/dist/schema/assets/lang.d.ts +3 -0
- package/dist/schema/assets/lang.js +3 -0
- package/dist/schema/assets/lang.js.map +1 -0
- package/dist/schema/assets/model.d.ts +27 -0
- package/dist/schema/assets/model.js +1 -0
- package/dist/schema/assets/model.js.map +1 -0
- package/dist/schema/content/blockDefinition.d.ts +11 -0
- package/dist/schema/content/blockDefinition.js +1 -0
- package/dist/schema/content/blockDefinition.js.map +1 -0
- package/dist/schema/content/itemDefinition.d.ts +14 -0
- package/dist/schema/content/itemDefinition.js +1 -0
- package/dist/schema/content/itemDefinition.js.map +1 -0
- package/dist/schema/data/loot.d.ts +1151 -0
- package/dist/schema/data/loot.js +76 -0
- package/dist/schema/data/loot.js.map +1 -0
- package/dist/schema/data/recipe.d.ts +13 -0
- package/dist/schema/data/recipe.js +1 -0
- package/dist/schema/data/recipe.js.map +1 -0
- package/dist/schema/data/tag.d.ts +11 -0
- package/dist/schema/data/tag.js +6 -0
- package/dist/schema/data/tag.js.map +1 -0
- package/dist/stubTypes.d.ts +7 -0
- package/dist/stubTypes.js +1 -0
- package/dist/stubTypes.js.map +1 -0
- package/dist/textHelper.d.ts +3 -0
- package/dist/textHelper.js +20 -0
- package/dist/textHelper.js.map +1 -0
- package/package.json +96 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function createReplacer(from, to) {
|
|
2
|
+
return (it) => {
|
|
3
|
+
if (from(it))
|
|
4
|
+
return to;
|
|
5
|
+
return it;
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
export class Recipe {
|
|
9
|
+
definition;
|
|
10
|
+
constructor(definition) {
|
|
11
|
+
this.definition = definition;
|
|
12
|
+
}
|
|
13
|
+
toJSON() {
|
|
14
|
+
return this.definition;
|
|
15
|
+
}
|
|
16
|
+
getTypes() {
|
|
17
|
+
return [this.toJSON().type];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export default class RecipeParser {
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/parser/recipe/index.ts"],"names":[],"mappings":"AAUA,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,MAAM,OAAgB,MAAM;IAGK;IAA/B,YAA+B,UAAuB;QAAvB,eAAU,GAAV,UAAU,CAAa;IAAG,CAAC;IAU1D,MAAM;QACJ,OAAO,IAAI,CAAC,UAAU,CAAC;IACzB,CAAC;IAED,QAAQ;QACN,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC;CACF;AAMD,MAAM,CAAC,OAAO,OAAgB,YAAY;CAKzC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { InlineRecipeParser, Replacer } from "../index.js";
|
|
2
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
3
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
4
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
5
|
+
import type { Result, ResultInput } from "../../../common/result.js";
|
|
6
|
+
export type QuarkExclusionRecipeDefinition<T extends RecipeDefinition = RecipeDefinition> = T & Readonly<{
|
|
7
|
+
true_type: string;
|
|
8
|
+
exclusions?: string[];
|
|
9
|
+
}>;
|
|
10
|
+
export declare class QuarkExclusionRecipe<TDefinition extends RecipeDefinition = RecipeDefinition, TRecipe extends Recipe<TDefinition> = Recipe<TDefinition>> extends Recipe<QuarkExclusionRecipeDefinition<TDefinition>> {
|
|
11
|
+
private readonly trueRecipe;
|
|
12
|
+
constructor(definition: QuarkExclusionRecipeDefinition<TDefinition>, trueRecipe: TRecipe);
|
|
13
|
+
getIngredients(): IngredientInput[];
|
|
14
|
+
getResults(): ResultInput[];
|
|
15
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
16
|
+
replaceResult(replace: Replacer<Result>): Recipe;
|
|
17
|
+
}
|
|
18
|
+
export default class QuarkExclusionRecipeParser extends RecipeParser<QuarkExclusionRecipeDefinition, QuarkExclusionRecipe> {
|
|
19
|
+
create(definition: QuarkExclusionRecipeDefinition, parser: InlineRecipeParser): QuarkExclusionRecipe;
|
|
20
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
2
|
+
export class QuarkExclusionRecipe extends Recipe {
|
|
3
|
+
trueRecipe;
|
|
4
|
+
constructor(definition, trueRecipe) {
|
|
5
|
+
super({
|
|
6
|
+
...definition,
|
|
7
|
+
...trueRecipe.toJSON(),
|
|
8
|
+
true_type: trueRecipe.toJSON().type,
|
|
9
|
+
type: definition.type,
|
|
10
|
+
});
|
|
11
|
+
this.trueRecipe = trueRecipe;
|
|
12
|
+
}
|
|
13
|
+
getIngredients() {
|
|
14
|
+
return this.trueRecipe.getIngredients();
|
|
15
|
+
}
|
|
16
|
+
getResults() {
|
|
17
|
+
return this.trueRecipe.getResults();
|
|
18
|
+
}
|
|
19
|
+
replaceIngredient(replace) {
|
|
20
|
+
return new QuarkExclusionRecipe(this.definition, this.trueRecipe.replaceIngredient(replace));
|
|
21
|
+
}
|
|
22
|
+
replaceResult(replace) {
|
|
23
|
+
return new QuarkExclusionRecipe(this.definition, this.trueRecipe.replaceResult(replace));
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export default class QuarkExclusionRecipeParser extends RecipeParser {
|
|
27
|
+
create(definition, parser) {
|
|
28
|
+
const trueRecipe = parser({ ...definition, type: definition.true_type });
|
|
29
|
+
return new QuarkExclusionRecipe(definition, trueRecipe);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=exclusion.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exclusion.js","sourceRoot":"","sources":["../../../../src/parser/recipe/quark/exclusion.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAgBnD,MAAM,OAAO,oBAGX,SAAQ,MAAmD;IAGxC;IAFnB,YACE,UAAuD,EACtC,UAAmB;QAEpC,KAAK,CAAC;YACJ,GAAG,UAAU;YACb,GAAG,UAAU,CAAC,MAAM,EAAE;YACtB,SAAS,EAAE,UAAU,CAAC,MAAM,EAAE,CAAC,IAAI;YACnC,IAAI,EAAE,UAAU,CAAC,IAAI;SACtB,CAAC,CAAC;QAPc,eAAU,GAAV,UAAU,CAAS;IAQtC,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,cAAc,EAAE,CAAC;IAC1C,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;IACtC,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,oBAAoB,CAC7B,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC,OAAO,CAAY,CACtD,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,oBAAoB,CAC7B,IAAI,CAAC,UAAU,EACf,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAY,CAClD,CAAC;IACJ,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,YAGvD;IACC,MAAM,CACJ,UAA0C,EAC1C,MAA0B;QAE1B,MAAM,UAAU,GAAG,MAAM,CAAC,EAAE,GAAG,UAAU,EAAE,IAAI,EAAE,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC;QACzE,OAAO,IAAI,oBAAoB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IAC1D,CAAC;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Replacer } from "../index.js";
|
|
2
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
3
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
4
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
5
|
+
import type { ResultInput } from "../../../common/result.js";
|
|
6
|
+
export type RootComponentRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
|
+
effect: string;
|
|
8
|
+
ingredients: Ingredient[];
|
|
9
|
+
}>;
|
|
10
|
+
export declare class RootComponentRecipe extends Recipe<RootComponentRecipeDefinition> {
|
|
11
|
+
getIngredients(): IngredientInput[];
|
|
12
|
+
getResults(): ResultInput[];
|
|
13
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
14
|
+
replaceResult(): RootComponentRecipe;
|
|
15
|
+
}
|
|
16
|
+
export default class RootComponentRecipeParser extends RecipeParser<RootComponentRecipeDefinition, RootComponentRecipe> {
|
|
17
|
+
create(definition: RootComponentRecipeDefinition): RootComponentRecipe;
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
2
|
+
export class RootComponentRecipe extends Recipe {
|
|
3
|
+
getIngredients() {
|
|
4
|
+
return this.definition.ingredients;
|
|
5
|
+
}
|
|
6
|
+
getResults() {
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
replaceIngredient(replace) {
|
|
10
|
+
return new RootComponentRecipe({
|
|
11
|
+
...this.definition,
|
|
12
|
+
ingredients: this.definition.ingredients.map(replace),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
replaceResult() {
|
|
16
|
+
return new RootComponentRecipe(this.definition);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export default class RootComponentRecipeParser extends RecipeParser {
|
|
20
|
+
create(definition) {
|
|
21
|
+
return new RootComponentRecipe(definition);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component.js","sourceRoot":"","sources":["../../../../src/parser/recipe/roots/component.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAcnD,MAAM,OAAO,mBAAoB,SAAQ,MAAqC;IAC5E,cAAc;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;IACrC,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,mBAAmB,CAAC;YAC7B,GAAG,IAAI,CAAC,UAAU;YAClB,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;IAED,aAAa;QACX,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,YAGtD;IACC,MAAM,CAAC,UAAyC;QAC9C,OAAO,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
2
|
+
import type { Result, ResultInput } from "../../../common/result.js";
|
|
3
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
+
import type { Replacer } from "../index.js";
|
|
5
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
6
|
+
export type RootRitualRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
|
+
color: string;
|
|
8
|
+
effect: string;
|
|
9
|
+
level: number;
|
|
10
|
+
incenses?: Ingredient[];
|
|
11
|
+
ingredients?: Ingredient[];
|
|
12
|
+
result?: Result;
|
|
13
|
+
}>;
|
|
14
|
+
export declare class RootRitualRecipe extends Recipe<RootRitualRecipeDefinition> {
|
|
15
|
+
getIngredients(): IngredientInput[];
|
|
16
|
+
getResults(): ResultInput[];
|
|
17
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
18
|
+
replaceResult(replace: Replacer<Result>): RootRitualRecipe;
|
|
19
|
+
}
|
|
20
|
+
export default class RootRitualRecipeParser extends RecipeParser<RootRitualRecipeDefinition, RootRitualRecipe> {
|
|
21
|
+
create(definition: RootRitualRecipeDefinition): RootRitualRecipe;
|
|
22
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { exists } from "@adeficior/pack-resolver";
|
|
2
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
3
|
+
export class RootRitualRecipe extends Recipe {
|
|
4
|
+
getIngredients() {
|
|
5
|
+
return [
|
|
6
|
+
...(this.definition.ingredients ?? []),
|
|
7
|
+
...(this.definition.incenses ?? []),
|
|
8
|
+
];
|
|
9
|
+
}
|
|
10
|
+
getResults() {
|
|
11
|
+
return [this.definition.result].filter(exists);
|
|
12
|
+
}
|
|
13
|
+
replaceIngredient(replace) {
|
|
14
|
+
return new RootRitualRecipe({
|
|
15
|
+
...this.definition,
|
|
16
|
+
ingredients: this.definition.ingredients?.map(replace),
|
|
17
|
+
incenses: this.definition.incenses?.map(replace),
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
replaceResult(replace) {
|
|
21
|
+
return new RootRitualRecipe({
|
|
22
|
+
...this.definition,
|
|
23
|
+
result: this.definition.result && replace(this.definition.result),
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export default class RootRitualRecipeParser extends RecipeParser {
|
|
28
|
+
create(definition) {
|
|
29
|
+
return new RootRitualRecipe(definition);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=ritual.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ritual.js","sourceRoot":"","sources":["../../../../src/parser/recipe/roots/ritual.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAQlD,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAYnD,MAAM,OAAO,gBAAiB,SAAQ,MAAkC;IACtE,cAAc;QACZ,OAAO;YACL,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,IAAI,EAAE,CAAC;YACtC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,IAAI,EAAE,CAAC;SACpC,CAAC;IACJ,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACjD,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,gBAAgB,CAAC;YAC1B,GAAG,IAAI,CAAC,UAAU;YAClB,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,GAAG,CAAC,OAAO,CAAC;YACtD,QAAQ,EAAE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;SACjD,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,gBAAgB,CAAC;YAC1B,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;SAClE,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,YAGnD;IACC,MAAM,CAAC,UAAsC;QAC3C,OAAO,IAAI,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
2
|
+
import type { Result, ResultInput } from "../../../common/result.js";
|
|
3
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
+
import type { Replacer } from "../index.js";
|
|
5
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
6
|
+
export type GrindstonePolishingDefinition = RecipeDefinition & Readonly<{
|
|
7
|
+
ingredients: Ingredient[];
|
|
8
|
+
result: Result;
|
|
9
|
+
experience?: number;
|
|
10
|
+
}>;
|
|
11
|
+
export declare class GrindstonePolishing extends Recipe<GrindstonePolishingDefinition> {
|
|
12
|
+
getIngredients(): IngredientInput[];
|
|
13
|
+
getResults(): ResultInput[];
|
|
14
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
15
|
+
replaceResult(replace: Replacer<Result>): Recipe;
|
|
16
|
+
}
|
|
17
|
+
export default class GrindstonePolishingParser extends RecipeParser<GrindstonePolishingDefinition, GrindstonePolishing> {
|
|
18
|
+
create(definition: GrindstonePolishingDefinition): GrindstonePolishing;
|
|
19
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
2
|
+
export class GrindstonePolishing extends Recipe {
|
|
3
|
+
getIngredients() {
|
|
4
|
+
return this.definition.ingredients;
|
|
5
|
+
}
|
|
6
|
+
getResults() {
|
|
7
|
+
return [this.definition.result];
|
|
8
|
+
}
|
|
9
|
+
replaceIngredient(replace) {
|
|
10
|
+
return new GrindstonePolishing({
|
|
11
|
+
...this.definition,
|
|
12
|
+
ingredients: this.definition.ingredients.map(replace),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
replaceResult(replace) {
|
|
16
|
+
return new GrindstonePolishing({
|
|
17
|
+
...this.definition,
|
|
18
|
+
result: replace(this.definition.result),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
export default class GrindstonePolishingParser extends RecipeParser {
|
|
23
|
+
create(definition) {
|
|
24
|
+
return new GrindstonePolishing(definition);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=polishing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polishing.js","sourceRoot":"","sources":["../../../../src/parser/recipe/sullys/polishing.ts"],"names":[],"mappings":"AAOA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AASnD,MAAM,OAAO,mBAAoB,SAAQ,MAAqC;IAC5E,cAAc;QACZ,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC;IACrC,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,mBAAmB,CAAC;YAC7B,GAAG,IAAI,CAAC,UAAU;YAClB,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC;SACtD,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,mBAAmB,CAAC;YAC7B,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,YAGtD;IACC,MAAM,CAAC,UAAyC;QAC9C,OAAO,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Replacer } from "../index.js";
|
|
2
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
3
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
4
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
5
|
+
import type { ResultInput } from "../../../common/result.js";
|
|
6
|
+
export type ThermalCatalystRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
|
+
ingredient: Ingredient;
|
|
8
|
+
primary_mod?: number;
|
|
9
|
+
secondary_mod?: number;
|
|
10
|
+
energy_mod?: number;
|
|
11
|
+
min_chance?: number;
|
|
12
|
+
use_chance?: number;
|
|
13
|
+
}>;
|
|
14
|
+
export declare class ThermalCatalystRecipe extends Recipe<ThermalCatalystRecipeDefinition> {
|
|
15
|
+
getIngredients(): IngredientInput[];
|
|
16
|
+
getResults(): ResultInput[];
|
|
17
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
18
|
+
replaceResult(): ThermalCatalystRecipe;
|
|
19
|
+
}
|
|
20
|
+
export default class ThermalCatalystRecipeParser extends RecipeParser<ThermalCatalystRecipeDefinition, ThermalCatalystRecipe> {
|
|
21
|
+
create(definition: ThermalCatalystRecipeDefinition): ThermalCatalystRecipe;
|
|
22
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
2
|
+
export class ThermalCatalystRecipe extends Recipe {
|
|
3
|
+
getIngredients() {
|
|
4
|
+
return [this.definition.ingredient];
|
|
5
|
+
}
|
|
6
|
+
getResults() {
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
replaceIngredient(replace) {
|
|
10
|
+
return new ThermalCatalystRecipe({
|
|
11
|
+
...this.definition,
|
|
12
|
+
ingredient: replace(this.definition.ingredient),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
replaceResult() {
|
|
16
|
+
return new ThermalCatalystRecipe(this.definition);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export default class ThermalCatalystRecipeParser extends RecipeParser {
|
|
20
|
+
create(definition) {
|
|
21
|
+
return new ThermalCatalystRecipe(definition);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=catalyst.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalyst.js","sourceRoot":"","sources":["../../../../src/parser/recipe/thermal/catalyst.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAkBnD,MAAM,OAAO,qBAAsB,SAAQ,MAAuC;IAChF,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,qBAAqB,CAAC;YAC/B,GAAG,IAAI,CAAC,UAAU;YAClB,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;SAChD,CAAC,CAAC;IACL,CAAC;IAED,aAAa;QACX,OAAO,IAAI,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACpD,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,YAGxD;IACC,MAAM,CAAC,UAA2C;QAChD,OAAO,IAAI,qBAAqB,CAAC,UAAU,CAAC,CAAC;IAC/C,CAAC;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Replacer } from "../index.js";
|
|
2
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
3
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
4
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
5
|
+
import type { ResultInput } from "../../../common/result.js";
|
|
6
|
+
export type ThermalFuelRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
|
+
energy: number;
|
|
8
|
+
ingredient: Ingredient;
|
|
9
|
+
}>;
|
|
10
|
+
export declare class ThermalFuelRecipe extends Recipe<ThermalFuelRecipeDefinition> {
|
|
11
|
+
getIngredients(): IngredientInput[];
|
|
12
|
+
getResults(): ResultInput[];
|
|
13
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
14
|
+
replaceResult(): ThermalFuelRecipe;
|
|
15
|
+
}
|
|
16
|
+
export default class ThermalFuelRecipeParser extends RecipeParser<ThermalFuelRecipeDefinition, ThermalFuelRecipe> {
|
|
17
|
+
create(definition: ThermalFuelRecipeDefinition): ThermalFuelRecipe;
|
|
18
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
2
|
+
export class ThermalFuelRecipe extends Recipe {
|
|
3
|
+
getIngredients() {
|
|
4
|
+
return [this.definition.ingredient];
|
|
5
|
+
}
|
|
6
|
+
getResults() {
|
|
7
|
+
return [];
|
|
8
|
+
}
|
|
9
|
+
replaceIngredient(replace) {
|
|
10
|
+
return new ThermalFuelRecipe({
|
|
11
|
+
...this.definition,
|
|
12
|
+
ingredient: replace(this.definition.ingredient),
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
replaceResult() {
|
|
16
|
+
return new ThermalFuelRecipe(this.definition);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export default class ThermalFuelRecipeParser extends RecipeParser {
|
|
20
|
+
create(definition) {
|
|
21
|
+
return new ThermalFuelRecipe(definition);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=fuel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fuel.js","sourceRoot":"","sources":["../../../../src/parser/recipe/thermal/fuel.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAcnD,MAAM,OAAO,iBAAkB,SAAQ,MAAmC;IACxE,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,iBAAiB,CAAC;YAC3B,GAAG,IAAI,CAAC,UAAU;YAClB,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;SAChD,CAAC,CAAC;IACL,CAAC;IAED,aAAa;QACX,OAAO,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAChD,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,YAGpD;IACC,MAAM,CAAC,UAAuC;QAC5C,OAAO,IAAI,iBAAiB,CAAC,UAAU,CAAC,CAAC;IAC3C,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
2
|
+
import type { Result, ResultInput } from "../../../common/result.js";
|
|
3
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
4
|
+
import type { Replacer } from "../index.js";
|
|
5
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
6
|
+
import type { ThermalIngredientInput } from "./ingredient.js";
|
|
7
|
+
export type ThermalRecipeDefinition = RecipeDefinition & Readonly<{
|
|
8
|
+
ingredient?: ThermalIngredientInput;
|
|
9
|
+
ingredients?: ThermalIngredientInput[];
|
|
10
|
+
result: Result[] | Result;
|
|
11
|
+
energy?: number;
|
|
12
|
+
experience?: number;
|
|
13
|
+
}>;
|
|
14
|
+
export declare class ThermalRecipe extends Recipe<ThermalRecipeDefinition> {
|
|
15
|
+
getIngredients(): IngredientInput[];
|
|
16
|
+
getResults(): ResultInput[];
|
|
17
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
18
|
+
replaceResult(replace: Replacer<Result>): Recipe;
|
|
19
|
+
}
|
|
20
|
+
export default class ThermalRecipeParser extends RecipeParser<ThermalRecipeDefinition, ThermalRecipe> {
|
|
21
|
+
create(definition: ThermalRecipeDefinition): ThermalRecipe;
|
|
22
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { arrayOrSelf, exists } from "@adeficior/pack-resolver";
|
|
2
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
3
|
+
import { fromThermalIngredient, toThermalIngredient } from "./ingredient.js";
|
|
4
|
+
export class ThermalRecipe extends Recipe {
|
|
5
|
+
getIngredients() {
|
|
6
|
+
return [this.definition.ingredient, ...(this.definition.ingredients ?? [])]
|
|
7
|
+
.filter(exists)
|
|
8
|
+
.map(fromThermalIngredient);
|
|
9
|
+
}
|
|
10
|
+
getResults() {
|
|
11
|
+
return arrayOrSelf(this.definition.result);
|
|
12
|
+
}
|
|
13
|
+
replaceIngredient(replace) {
|
|
14
|
+
return new ThermalRecipe({
|
|
15
|
+
...this.definition,
|
|
16
|
+
ingredient: this.definition.ingredient &&
|
|
17
|
+
toThermalIngredient(replace(fromThermalIngredient(this.definition.ingredient))),
|
|
18
|
+
ingredients: this.definition.ingredients
|
|
19
|
+
?.map(fromThermalIngredient)
|
|
20
|
+
?.map(replace)
|
|
21
|
+
?.map(toThermalIngredient),
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
replaceResult(replace) {
|
|
25
|
+
return new ThermalRecipe({
|
|
26
|
+
...this.definition,
|
|
27
|
+
result: arrayOrSelf(this.definition.result).map(replace),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export default class ThermalRecipeParser extends RecipeParser {
|
|
32
|
+
create(definition) {
|
|
33
|
+
return new ThermalRecipe(definition);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/parser/recipe/thermal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAQ/D,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAW7E,MAAM,OAAO,aAAc,SAAQ,MAA+B;IAChE,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,EAAE,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC;aACxE,MAAM,CAAC,MAAM,CAAC;aACd,GAAG,CAAC,qBAAqB,CAAC,CAAC;IAChC,CAAC;IAED,UAAU;QACR,OAAO,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAC7C,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,aAAa,CAAC;YACvB,GAAG,IAAI,CAAC,UAAU;YAClB,UAAU,EACR,IAAI,CAAC,UAAU,CAAC,UAAU;gBAC1B,mBAAmB,CACjB,OAAO,CAAC,qBAAqB,CAAC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAC3D;YACH,WAAW,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW;gBACtC,EAAE,GAAG,CAAC,qBAAqB,CAAC;gBAC5B,EAAE,GAAG,CAAC,OAAO,CAAC;gBACd,EAAE,GAAG,CAAC,mBAAmB,CAAC;SAC7B,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,aAAa,CAAC;YACvB,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC;SACzD,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,YAGhD;IACC,MAAM,CAAC,UAAmC;QACxC,OAAO,IAAI,aAAa,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import zod from "zod";
|
|
2
|
+
import type { FluidTag, Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
3
|
+
declare const ThermalFluidTagSchema: zod.ZodObject<{
|
|
4
|
+
fluid_tag: zod.ZodString;
|
|
5
|
+
amount: zod.ZodNumber;
|
|
6
|
+
}, "strip", zod.ZodTypeAny, {
|
|
7
|
+
amount: number;
|
|
8
|
+
fluid_tag: string;
|
|
9
|
+
}, {
|
|
10
|
+
amount: number;
|
|
11
|
+
fluid_tag: string;
|
|
12
|
+
}>;
|
|
13
|
+
type ThermalFluidTag = zod.infer<typeof ThermalFluidTagSchema>;
|
|
14
|
+
type ThermalItemList = Readonly<{
|
|
15
|
+
value: ThermalIngredientInput[];
|
|
16
|
+
count?: number;
|
|
17
|
+
}>;
|
|
18
|
+
export type ThermalIngredientInput = Exclude<IngredientInput, FluidTag> | ThermalFluidTag | ThermalItemList;
|
|
19
|
+
export declare function fromThermalIngredient(input: ThermalIngredientInput): Ingredient;
|
|
20
|
+
export declare function toThermalIngredient(input: IngredientInput): ThermalIngredientInput;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { omit } from "lodash-es";
|
|
2
|
+
import zod from "zod";
|
|
3
|
+
import { createIngredient, ItemTagSchema } from "../../../common/ingredient.js";
|
|
4
|
+
import { ItemStackSchema } from "../../../common/result.js";
|
|
5
|
+
import { IllegalShapeError } from "../../../error.js";
|
|
6
|
+
const ThermalFluidTagSchema = zod.object({
|
|
7
|
+
fluid_tag: zod.string(),
|
|
8
|
+
amount: zod.number(),
|
|
9
|
+
});
|
|
10
|
+
function fromThermalList(input) {
|
|
11
|
+
return input.value.map((it) => {
|
|
12
|
+
if (it && typeof it === "object") {
|
|
13
|
+
if ("item" in it)
|
|
14
|
+
return { ...ItemStackSchema.parse(it), count: input.count };
|
|
15
|
+
if ("tag" in it)
|
|
16
|
+
return { ...ItemTagSchema.parse(it), count: input.count };
|
|
17
|
+
}
|
|
18
|
+
throw new IllegalShapeError("thermal array ingredients may only be of type item/itemtag", it);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export function fromThermalIngredient(input) {
|
|
22
|
+
if (input && typeof input === "object") {
|
|
23
|
+
if ("value" in input)
|
|
24
|
+
return fromThermalList(input);
|
|
25
|
+
if ("fluid_tag" in input) {
|
|
26
|
+
return { ...omit(input, "fluid_tag"), fluidTag: input.fluid_tag };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return createIngredient(input);
|
|
30
|
+
}
|
|
31
|
+
export function toThermalIngredient(input) {
|
|
32
|
+
const resolved = createIngredient(input);
|
|
33
|
+
if (typeof resolved === "object") {
|
|
34
|
+
if ("fluidTag" in resolved) {
|
|
35
|
+
return ThermalFluidTagSchema.parse({
|
|
36
|
+
...omit(resolved, "fluidTag"),
|
|
37
|
+
fluid_tag: resolved.fluidTag,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return resolved;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=ingredient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ingredient.js","sourceRoot":"","sources":["../../../../src/parser/recipe/thermal/ingredient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,GAAG,MAAM,KAAK,CAAC;AAMtB,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,qBAAqB,GAAG,GAAG,CAAC,MAAM,CAAC;IACvC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE;IACvB,MAAM,EAAE,GAAG,CAAC,MAAM,EAAE;CACrB,CAAC,CAAC;AAcH,SAAS,eAAe,CAAC,KAAsB;IAC7C,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE;QAC5B,IAAI,EAAE,IAAI,OAAO,EAAE,KAAK,QAAQ,EAAE,CAAC;YACjC,IAAI,MAAM,IAAI,EAAE;gBACd,OAAO,EAAE,GAAG,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;YAC9D,IAAI,KAAK,IAAI,EAAE;gBACb,OAAO,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;QAC9D,CAAC;QACD,MAAM,IAAI,iBAAiB,CACzB,4DAA4D,EAC5D,EAAE,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,KAA6B;IAE7B,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,IAAI,OAAO,IAAI,KAAK;YAAE,OAAO,eAAe,CAAC,KAAK,CAAC,CAAC;QAEpD,IAAI,WAAW,IAAI,KAAK,EAAE,CAAC;YACzB,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;QACpE,CAAC;IACH,CAAC;IAED,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,mBAAmB,CACjC,KAAsB;IAEtB,MAAM,QAAQ,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAEzC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACjC,IAAI,UAAU,IAAI,QAAQ,EAAE,CAAC;YAC3B,OAAO,qBAAqB,CAAC,KAAK,CAAC;gBACjC,GAAG,IAAI,CAAC,QAAQ,EAAE,UAAU,CAAC;gBAC7B,SAAS,EAAE,QAAQ,CAAC,QAAQ;aAC7B,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Replacer } from "../index.js";
|
|
2
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
3
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
4
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
5
|
+
import type { ResultInput } from "../../../common/result.js";
|
|
6
|
+
type ExtractionBlockInput = string;
|
|
7
|
+
export type TreeExtractionRecipeDefinition = RecipeDefinition & Readonly<{
|
|
8
|
+
leaves: ExtractionBlockInput;
|
|
9
|
+
trunk: ExtractionBlockInput;
|
|
10
|
+
result: ResultInput;
|
|
11
|
+
}>;
|
|
12
|
+
export declare class TreeExtractionRecipe extends Recipe<TreeExtractionRecipeDefinition> {
|
|
13
|
+
private readonly trunk;
|
|
14
|
+
private readonly leaves;
|
|
15
|
+
constructor(definition: TreeExtractionRecipeDefinition);
|
|
16
|
+
getIngredients(): IngredientInput[];
|
|
17
|
+
getResults(): ResultInput[];
|
|
18
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
19
|
+
replaceResult(): TreeExtractionRecipe;
|
|
20
|
+
}
|
|
21
|
+
export default class TreeExtractionRecipeParser extends RecipeParser<TreeExtractionRecipeDefinition, TreeExtractionRecipe> {
|
|
22
|
+
create(definition: TreeExtractionRecipeDefinition): TreeExtractionRecipe;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
2
|
+
import { IllegalShapeError } from "../../../error.js";
|
|
3
|
+
function blockToIngredient(input) {
|
|
4
|
+
if (typeof input !== "string")
|
|
5
|
+
throw new IllegalShapeError("unknown block input shape", input);
|
|
6
|
+
return {
|
|
7
|
+
block: input,
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function ingredientToBlock(input) {
|
|
11
|
+
if (input && typeof input === "object") {
|
|
12
|
+
if ("block" in input)
|
|
13
|
+
return input.block;
|
|
14
|
+
}
|
|
15
|
+
throw new IllegalShapeError("unknown block input shape", input);
|
|
16
|
+
}
|
|
17
|
+
export class TreeExtractionRecipe extends Recipe {
|
|
18
|
+
trunk;
|
|
19
|
+
leaves;
|
|
20
|
+
constructor(definition) {
|
|
21
|
+
super(definition);
|
|
22
|
+
this.trunk = blockToIngredient(definition.trunk);
|
|
23
|
+
this.leaves = blockToIngredient(definition.leaves);
|
|
24
|
+
}
|
|
25
|
+
getIngredients() {
|
|
26
|
+
return [this.trunk, this.leaves];
|
|
27
|
+
}
|
|
28
|
+
getResults() {
|
|
29
|
+
return [];
|
|
30
|
+
}
|
|
31
|
+
replaceIngredient(replace) {
|
|
32
|
+
return new TreeExtractionRecipe({
|
|
33
|
+
...this.definition,
|
|
34
|
+
leaves: ingredientToBlock(replace(this.leaves)),
|
|
35
|
+
trunk: ingredientToBlock(replace(this.trunk)),
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
replaceResult() {
|
|
39
|
+
return new TreeExtractionRecipe(this.definition);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
export default class TreeExtractionRecipeParser extends RecipeParser {
|
|
43
|
+
create(definition) {
|
|
44
|
+
return new TreeExtractionRecipe(definition);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=treeExtraction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"treeExtraction.js","sourceRoot":"","sources":["../../../../src/parser/recipe/thermal/treeExtraction.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAOnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAWtD,SAAS,iBAAiB,CAAC,KAA2B;IACpD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAC3B,MAAM,IAAI,iBAAiB,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;IAClE,OAAO;QACL,KAAK,EAAE,KAAK;KACb,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CAAC,KAAsB;IAC/C,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACvC,IAAI,OAAO,IAAI,KAAK;YAAE,OAAO,KAAK,CAAC,KAAK,CAAC;IAC3C,CAAC;IACD,MAAM,IAAI,iBAAiB,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;AAClE,CAAC;AAED,MAAM,OAAO,oBAAqB,SAAQ,MAAsC;IAC7D,KAAK,CAAC;IACN,MAAM,CAAC;IAExB,YAAY,UAA0C;QACpD,KAAK,CAAC,UAAU,CAAC,CAAC;QAClB,IAAI,CAAC,KAAK,GAAG,iBAAiB,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;QACjD,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACrD,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,UAAU;QACR,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,oBAAoB,CAAC;YAC9B,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YAC/C,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SAC9C,CAAC,CAAC;IACL,CAAC;IAED,aAAa;QACX,OAAO,IAAI,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACnD,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,YAGvD;IACC,MAAM,CAAC,UAA0C;QAC/C,OAAO,IAAI,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAC9C,CAAC;CACF"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Replacer } from "../index.js";
|
|
2
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
3
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
4
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
5
|
+
import type { Result, ResultInput } from "../../../common/result.js";
|
|
6
|
+
export type ShapedRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
|
+
key: Record<string, Ingredient>;
|
|
8
|
+
pattern: string[];
|
|
9
|
+
result: Result;
|
|
10
|
+
}>;
|
|
11
|
+
export declare class ShapedRecipe extends Recipe<ShapedRecipeDefinition> {
|
|
12
|
+
getIngredients(): IngredientInput[];
|
|
13
|
+
getResults(): ResultInput[];
|
|
14
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
15
|
+
replaceResult(replace: Replacer<Result>): Recipe;
|
|
16
|
+
}
|
|
17
|
+
export default class ShapedParser extends RecipeParser<ShapedRecipeDefinition, ShapedRecipe> {
|
|
18
|
+
create(definition: ShapedRecipeDefinition): ShapedRecipe;
|
|
19
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
2
|
+
import { mapValues } from "lodash-es";
|
|
3
|
+
export class ShapedRecipe extends Recipe {
|
|
4
|
+
getIngredients() {
|
|
5
|
+
return Object.values(this.definition.key);
|
|
6
|
+
}
|
|
7
|
+
getResults() {
|
|
8
|
+
return [this.definition.result];
|
|
9
|
+
}
|
|
10
|
+
replaceIngredient(replace) {
|
|
11
|
+
return new ShapedRecipe({
|
|
12
|
+
...this.definition,
|
|
13
|
+
key: mapValues(this.definition.key, replace),
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
replaceResult(replace) {
|
|
17
|
+
return new ShapedRecipe({
|
|
18
|
+
...this.definition,
|
|
19
|
+
result: replace(this.definition.result),
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
export default class ShapedParser extends RecipeParser {
|
|
24
|
+
create(definition) {
|
|
25
|
+
return new ShapedRecipe(definition);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=shaped.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shaped.js","sourceRoot":"","sources":["../../../../src/parser/recipe/vanilla/shaped.ts"],"names":[],"mappings":"AACA,OAAO,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAMnD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAUtC,MAAM,OAAO,YAAa,SAAQ,MAA8B;IAC9D,cAAc;QACZ,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED,UAAU;QACR,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;IAED,iBAAiB,CAAC,OAA6B;QAC7C,OAAO,IAAI,YAAY,CAAC;YACtB,GAAG,IAAI,CAAC,UAAU;YAClB,GAAG,EAAE,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,EAAE,OAAO,CAAC;SAC7C,CAAC,CAAC;IACL,CAAC;IAED,aAAa,CAAC,OAAyB;QACrC,OAAO,IAAI,YAAY,CAAC;YACtB,GAAG,IAAI,CAAC,UAAU;YAClB,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,YAGzC;IACC,MAAM,CAAC,UAAkC;QACvC,OAAO,IAAI,YAAY,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;CACF"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Replacer } from "../index.js";
|
|
2
|
+
import RecipeParser, { Recipe } from "../index.js";
|
|
3
|
+
import type { Ingredient, IngredientInput } from "../../../common/ingredient.js";
|
|
4
|
+
import type { RecipeDefinition } from "../../../schema/data/recipe.js";
|
|
5
|
+
import type { Result, ResultInput } from "../../../common/result.js";
|
|
6
|
+
export type ShapelessRecipeDefinition = RecipeDefinition & Readonly<{
|
|
7
|
+
ingredients: Ingredient[];
|
|
8
|
+
result: Result;
|
|
9
|
+
}>;
|
|
10
|
+
export declare class ShapelessRecipe extends Recipe<ShapelessRecipeDefinition> {
|
|
11
|
+
getIngredients(): IngredientInput[];
|
|
12
|
+
getResults(): ResultInput[];
|
|
13
|
+
replaceIngredient(replace: Replacer<Ingredient>): Recipe;
|
|
14
|
+
replaceResult(replace: Replacer<Result>): Recipe;
|
|
15
|
+
}
|
|
16
|
+
export default class ShapelessParser extends RecipeParser<ShapelessRecipeDefinition, ShapelessRecipe> {
|
|
17
|
+
create(definition: ShapelessRecipeDefinition): ShapelessRecipe;
|
|
18
|
+
}
|