zen-flow 2.7.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/zenflow.cjs CHANGED
@@ -176,7 +176,11 @@ const addInscriber = (recipe) => {
176
176
  };
177
177
  const removeInscriber = (id) => `mods.appeng.Inscriber.removeRecipe(${id});`;
178
178
 
179
- const addCompressor = (recipe) => `mods.avaritia.Compressor.add(${formatArgs(recipe.out, recipe.in.n, recipe.in.id)});`;
179
+ const addCompressor = (recipe) => {
180
+ const input = isObject(recipe.in) ? recipe.in : { id: recipe.in, n: 1 };
181
+ const out = formatArgs(recipe.out, input.n, input.id);
182
+ return `mods.avaritia.Compressor.add(${out});`;
183
+ };
180
184
  const removeCompressor = (id) => `mods.avaritia.Compressor.remove(${id});`;
181
185
  const addExtreme = (ingredient, recipe) => {
182
186
  const out = formatArgs(formatIngredient(ingredient), recipe.map((row) => formatList(row.map(formatId))));
@@ -229,13 +233,13 @@ const replaceQED = (ingredient, recipe) => [
229
233
  addQED(ingredient, recipe)
230
234
  ].join("\n");
231
235
 
232
- const addCarpenter = (ingredient, recipe) => {
233
- const out = formatArgs(formatIngredient(ingredient), formatRecipe(recipe.recipe), recipe.liquid && formatStack(recipe.liquid), recipe.ticks, recipe.top && formatIngredient(recipe.top));
236
+ const addCarpenter = (recipe) => {
237
+ const out = formatArgs(formatIngredient(recipe.out), formatRecipe(recipe.recipe), recipe.liquid && formatStack(recipe.liquid), recipe.ticks, recipe.top && formatIngredient(recipe.top));
234
238
  return `mods.forestry.Carpenter.addRecipe(${out});`;
235
239
  };
236
240
  const removeCarpenter = (id, liquid) => `mods.forestry.Carpenter.removeRecipe(${formatArgs(id, liquid)});`;
237
- const addCentrifuge = (ingredients, recipe) => {
238
- const out = formatArgs(ingredients.map((ingredient) => isObject(ingredient) ? `${ingredient.id} % ${ingredient.n}` : ingredient), recipe.in, recipe.ticks);
241
+ const addCentrifuge = (recipe) => {
242
+ const out = formatArgs(recipe.out.map((ingredient) => isObject(ingredient) ? `${ingredient.id} % ${ingredient.n}` : ingredient), recipe.in, recipe.ticks);
239
243
  return `mods.forestry.Centrifuge.addRecipe(${out});`;
240
244
  };
241
245
  const removeCentrifuge = (id) => `mods.forestry.Centrifuge.removeRecipe(${id});`;
@@ -250,8 +254,8 @@ const addFermenterFuel = (recipe) => {
250
254
  };
251
255
  const removeFermenterFuel = (id) => `mods.forestry.Fermenter.removeFuel(${id});`;
252
256
  const removeMoistener = (id) => `mods.forestry.Moistener.removeRecipe(${id});`;
253
- const addSqueezer = (liquid, recipe) => {
254
- const out = formatArgs(formatStack(liquid), formatIngredient(recipe.bonus), recipe.in.map(formatIngredient), recipe.ticks);
257
+ const addSqueezer = (recipe) => {
258
+ const out = formatArgs(formatStack(recipe.out), formatIngredient(recipe.bonus), recipe.in.map(formatIngredient), recipe.ticks);
255
259
  return `mods.forestry.Squeezer.addRecipe(${out});`;
256
260
  };
257
261
  const removeSqueezer = (recipe) => {
@@ -259,8 +263,8 @@ const removeSqueezer = (recipe) => {
259
263
  return `mods.forestry.Squeezer.removeRecipe(${recipe});`;
260
264
  return `mods.forestry.Squeezer.removeRecipe(${formatArgs(recipe.out, recipe.in)});`;
261
265
  };
262
- const addStill = (liquid, recipe) => {
263
- const out = formatArgs(formatStack(liquid), formatStack(recipe.liquid), recipe.ticks);
266
+ const addStill = (recipe) => {
267
+ const out = formatArgs(formatStack(recipe.out), formatStack(recipe.in), recipe.ticks);
264
268
  return `mods.forestry.Still.addRecipe(${out});`;
265
269
  };
266
270
  const removeStill = (recipe) => {
@@ -268,8 +272,8 @@ const removeStill = (recipe) => {
268
272
  return `mods.forestry.Still.removeRecipe(${recipe});`;
269
273
  return `mods.forestry.Still.removeRecipe(${formatArgs(recipe.out, recipe.in)});`;
270
274
  };
271
- const addFabricator = (id, recipe) => {
272
- const out = formatArgs(id, recipe.in, recipe.mb, recipe.cast);
275
+ const addFabricator = (recipe) => {
276
+ const out = formatArgs(formatIngredient(recipe.out), formatRecipe(recipe.recipe), recipe.mb, recipe.cast);
273
277
  return `mods.forestry.ThermionicFabricator.addCast(${out});`;
274
278
  };
275
279
  const removeFabricator = (id) => `mods.forestry.ThermionicFabricator.removeCast(${id});`;
package/dist/zenflow.d.ts CHANGED
@@ -109,7 +109,7 @@ declare const addInscriber: (recipe: RecipeInscriber) => string;
109
109
  declare const removeInscriber: (id: string) => string;
110
110
 
111
111
  declare type RecipeCompressor = {
112
- in: Stack;
112
+ in: Ingredient;
113
113
  out: string;
114
114
  };
115
115
  declare type RecipeExtreme = [
@@ -179,13 +179,15 @@ declare const removeQED: (id: string) => string;
179
179
  declare const replaceQED: (ingredient: Ingredient, recipe: RecipeShaped) => string;
180
180
 
181
181
  declare type RecipeCarpenter = {
182
+ out: Ingredient;
182
183
  recipe: RecipeShaped;
183
- top?: Ingredient;
184
184
  ticks: number;
185
+ top?: Ingredient;
185
186
  liquid?: Stack;
186
187
  };
187
188
  declare type RecipeCentrifuge = {
188
189
  in: string;
190
+ out: Ingredient[];
189
191
  ticks: number;
190
192
  };
191
193
  declare type RecipeFermenter = {
@@ -199,16 +201,19 @@ declare type RecipeFermenterFuel = {
199
201
  burn: number;
200
202
  };
201
203
  declare type RecipeSqueezer = {
204
+ out: Stack;
202
205
  in: Ingredient[];
203
206
  bonus: Ingredient;
204
207
  ticks: number;
205
208
  };
206
209
  declare type RecipeStill = {
207
- liquid: Stack;
210
+ in: Stack;
211
+ out: Stack;
208
212
  ticks: number;
209
213
  };
210
214
  declare type RecipeFabricator = {
211
- in: string[];
215
+ out: Ingredient;
216
+ recipe: RecipeShaped;
212
217
  mb: number;
213
218
  cast?: string;
214
219
  };
@@ -217,16 +222,16 @@ declare type RecipeFabricatorFuel = {
217
222
  mb: number;
218
223
  temp: number;
219
224
  };
220
- declare const addCarpenter: (ingredient: Ingredient, recipe: RecipeCarpenter) => string;
225
+ declare const addCarpenter: (recipe: RecipeCarpenter) => string;
221
226
  declare const removeCarpenter: (id: string, liquid?: string | undefined) => string;
222
- declare const addCentrifuge: (ingredients: Ingredient[], recipe: RecipeCentrifuge) => string;
227
+ declare const addCentrifuge: (recipe: RecipeCentrifuge) => string;
223
228
  declare const removeCentrifuge: (id: string) => string;
224
229
  declare const addFermenter: (recipe: RecipeFermenter) => string;
225
230
  declare const removeFermenter: (id: string) => string;
226
231
  declare const addFermenterFuel: (recipe: RecipeFermenterFuel) => string;
227
232
  declare const removeFermenterFuel: (id: string) => string;
228
233
  declare const removeMoistener: (id: string) => string;
229
- declare const addSqueezer: (liquid: Stack, recipe: RecipeSqueezer) => string;
234
+ declare const addSqueezer: (recipe: RecipeSqueezer) => string;
230
235
  /**
231
236
  * Remove Forestry Squeezer recipe
232
237
  *
@@ -237,7 +242,7 @@ declare const removeSqueezer: (recipe: string | {
237
242
  in: string[];
238
243
  out: string;
239
244
  }) => string;
240
- declare const addStill: (liquid: Stack, recipe: RecipeStill) => string;
245
+ declare const addStill: (recipe: RecipeStill) => string;
241
246
  /**
242
247
  * Remove Forestry Still recipe
243
248
  *
@@ -248,7 +253,7 @@ declare const removeStill: (recipe: string | {
248
253
  in: string;
249
254
  out: string;
250
255
  }) => string;
251
- declare const addFabricator: (id: string, recipe: RecipeFabricator) => string;
256
+ declare const addFabricator: (recipe: RecipeFabricator) => string;
252
257
  declare const removeFabricator: (id: string) => string;
253
258
  declare const addFabricatorFuel: (recipe: RecipeFabricatorFuel) => string;
254
259
  declare const removeFabricatorFuel: (id: string) => string;
package/dist/zenflow.mjs CHANGED
@@ -172,7 +172,11 @@ const addInscriber = (recipe) => {
172
172
  };
173
173
  const removeInscriber = (id) => `mods.appeng.Inscriber.removeRecipe(${id});`;
174
174
 
175
- const addCompressor = (recipe) => `mods.avaritia.Compressor.add(${formatArgs(recipe.out, recipe.in.n, recipe.in.id)});`;
175
+ const addCompressor = (recipe) => {
176
+ const input = isObject(recipe.in) ? recipe.in : { id: recipe.in, n: 1 };
177
+ const out = formatArgs(recipe.out, input.n, input.id);
178
+ return `mods.avaritia.Compressor.add(${out});`;
179
+ };
176
180
  const removeCompressor = (id) => `mods.avaritia.Compressor.remove(${id});`;
177
181
  const addExtreme = (ingredient, recipe) => {
178
182
  const out = formatArgs(formatIngredient(ingredient), recipe.map((row) => formatList(row.map(formatId))));
@@ -225,13 +229,13 @@ const replaceQED = (ingredient, recipe) => [
225
229
  addQED(ingredient, recipe)
226
230
  ].join("\n");
227
231
 
228
- const addCarpenter = (ingredient, recipe) => {
229
- const out = formatArgs(formatIngredient(ingredient), formatRecipe(recipe.recipe), recipe.liquid && formatStack(recipe.liquid), recipe.ticks, recipe.top && formatIngredient(recipe.top));
232
+ const addCarpenter = (recipe) => {
233
+ const out = formatArgs(formatIngredient(recipe.out), formatRecipe(recipe.recipe), recipe.liquid && formatStack(recipe.liquid), recipe.ticks, recipe.top && formatIngredient(recipe.top));
230
234
  return `mods.forestry.Carpenter.addRecipe(${out});`;
231
235
  };
232
236
  const removeCarpenter = (id, liquid) => `mods.forestry.Carpenter.removeRecipe(${formatArgs(id, liquid)});`;
233
- const addCentrifuge = (ingredients, recipe) => {
234
- const out = formatArgs(ingredients.map((ingredient) => isObject(ingredient) ? `${ingredient.id} % ${ingredient.n}` : ingredient), recipe.in, recipe.ticks);
237
+ const addCentrifuge = (recipe) => {
238
+ const out = formatArgs(recipe.out.map((ingredient) => isObject(ingredient) ? `${ingredient.id} % ${ingredient.n}` : ingredient), recipe.in, recipe.ticks);
235
239
  return `mods.forestry.Centrifuge.addRecipe(${out});`;
236
240
  };
237
241
  const removeCentrifuge = (id) => `mods.forestry.Centrifuge.removeRecipe(${id});`;
@@ -246,8 +250,8 @@ const addFermenterFuel = (recipe) => {
246
250
  };
247
251
  const removeFermenterFuel = (id) => `mods.forestry.Fermenter.removeFuel(${id});`;
248
252
  const removeMoistener = (id) => `mods.forestry.Moistener.removeRecipe(${id});`;
249
- const addSqueezer = (liquid, recipe) => {
250
- const out = formatArgs(formatStack(liquid), formatIngredient(recipe.bonus), recipe.in.map(formatIngredient), recipe.ticks);
253
+ const addSqueezer = (recipe) => {
254
+ const out = formatArgs(formatStack(recipe.out), formatIngredient(recipe.bonus), recipe.in.map(formatIngredient), recipe.ticks);
251
255
  return `mods.forestry.Squeezer.addRecipe(${out});`;
252
256
  };
253
257
  const removeSqueezer = (recipe) => {
@@ -255,8 +259,8 @@ const removeSqueezer = (recipe) => {
255
259
  return `mods.forestry.Squeezer.removeRecipe(${recipe});`;
256
260
  return `mods.forestry.Squeezer.removeRecipe(${formatArgs(recipe.out, recipe.in)});`;
257
261
  };
258
- const addStill = (liquid, recipe) => {
259
- const out = formatArgs(formatStack(liquid), formatStack(recipe.liquid), recipe.ticks);
262
+ const addStill = (recipe) => {
263
+ const out = formatArgs(formatStack(recipe.out), formatStack(recipe.in), recipe.ticks);
260
264
  return `mods.forestry.Still.addRecipe(${out});`;
261
265
  };
262
266
  const removeStill = (recipe) => {
@@ -264,8 +268,8 @@ const removeStill = (recipe) => {
264
268
  return `mods.forestry.Still.removeRecipe(${recipe});`;
265
269
  return `mods.forestry.Still.removeRecipe(${formatArgs(recipe.out, recipe.in)});`;
266
270
  };
267
- const addFabricator = (id, recipe) => {
268
- const out = formatArgs(id, recipe.in, recipe.mb, recipe.cast);
271
+ const addFabricator = (recipe) => {
272
+ const out = formatArgs(formatIngredient(recipe.out), formatRecipe(recipe.recipe), recipe.mb, recipe.cast);
269
273
  return `mods.forestry.ThermionicFabricator.addCast(${out});`;
270
274
  };
271
275
  const removeFabricator = (id) => `mods.forestry.ThermionicFabricator.removeCast(${id});`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zen-flow",
3
- "version": "2.7.0",
3
+ "version": "2.8.1",
4
4
  "description": "MineTweaker ZenScript made easy.",
5
5
  "main": "dist/zenflow.cjs",
6
6
  "module": "dist/zenflow.mjs",