zen-flow 4.3.0 → 4.4.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 +2 -2
- package/dist/zenflow.d.ts +2 -2
- package/dist/zenflow.mjs +2 -2
- package/package.json +1 -1
package/dist/zenflow.cjs
CHANGED
|
@@ -132,7 +132,7 @@ const capitalize = (x) => `${x[0].toUpperCase()}${x.slice(1)}`;
|
|
|
132
132
|
const clamp = (min, max, n) => Math.max(min, Math.min(max, n));
|
|
133
133
|
|
|
134
134
|
const addGrinder = (id, recipe) => {
|
|
135
|
-
const formatBonus = (
|
|
135
|
+
const formatBonus = (bonus) => `${bonus.id}, ${clamp(0, 1, bonus.chance)}`;
|
|
136
136
|
const out = formatArgs(
|
|
137
137
|
formatIngredient(recipe.input),
|
|
138
138
|
formatIngredient(id),
|
|
@@ -292,7 +292,7 @@ const addSieve = (id, recipe) => {
|
|
|
292
292
|
const out = formatArgs(
|
|
293
293
|
id,
|
|
294
294
|
items.map((item) => item.id),
|
|
295
|
-
items.map((item) => item.chance)
|
|
295
|
+
formatArray(items.map((item) => item.chance), 9)
|
|
296
296
|
);
|
|
297
297
|
return `mods.exnihilo.Sieve.addRecipe(${out});`;
|
|
298
298
|
};
|
package/dist/zenflow.d.ts
CHANGED
package/dist/zenflow.mjs
CHANGED
|
@@ -130,7 +130,7 @@ const capitalize = (x) => `${x[0].toUpperCase()}${x.slice(1)}`;
|
|
|
130
130
|
const clamp = (min, max, n) => Math.max(min, Math.min(max, n));
|
|
131
131
|
|
|
132
132
|
const addGrinder = (id, recipe) => {
|
|
133
|
-
const formatBonus = (
|
|
133
|
+
const formatBonus = (bonus) => `${bonus.id}, ${clamp(0, 1, bonus.chance)}`;
|
|
134
134
|
const out = formatArgs(
|
|
135
135
|
formatIngredient(recipe.input),
|
|
136
136
|
formatIngredient(id),
|
|
@@ -290,7 +290,7 @@ const addSieve = (id, recipe) => {
|
|
|
290
290
|
const out = formatArgs(
|
|
291
291
|
id,
|
|
292
292
|
items.map((item) => item.id),
|
|
293
|
-
items.map((item) => item.chance)
|
|
293
|
+
formatArray(items.map((item) => item.chance), 9)
|
|
294
294
|
);
|
|
295
295
|
return `mods.exnihilo.Sieve.addRecipe(${out});`;
|
|
296
296
|
};
|