@its-not-rocket-science/ananke 0.1.48 → 0.1.49
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/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@ Versioning follows [Semantic Versioning](https://semver.org/).
|
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
## [0.1.49] — 2026-03-28
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Crafting subsystem — remaining TODO/placeholder items resolved:**
|
|
14
|
+
- `src/crafting/manufacturing.ts` — `createAssemblySteps`: now derives skill types and tool categories from the recipe's actual `skillRequirements` and `toolRequirements` instead of hardcoded `"forge"`/alternating BK–LM defaults.
|
|
15
|
+
- Removed misleading "placeholder" and outdated "Phase 24 placeholder" comments from `recipes.ts`, `crafting/index.ts`, and `dialogue.ts`; documentation now accurately reflects current behaviour.
|
|
16
|
+
- Build: clean. Tests: 5,261 passing. Coverage: statements 97.1 %, branches 87.83 %, functions 95.65 %, lines 97.1 %.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
9
20
|
## [0.1.48] — 2026-03-28
|
|
10
21
|
|
|
11
22
|
### Fixed
|
|
@@ -199,7 +199,7 @@ export function integrateCraftingIntoInventory(inventory, result, instanceId) {
|
|
|
199
199
|
instanceId,
|
|
200
200
|
templateId: result.outputItemId,
|
|
201
201
|
quantity: result.outputQuantity,
|
|
202
|
-
durability_Q: result.quality_Q, //
|
|
202
|
+
durability_Q: result.quality_Q, // New items start with durability matching their crafting quality
|
|
203
203
|
modifications: [],
|
|
204
204
|
containerPath: [],
|
|
205
205
|
};
|
|
@@ -112,16 +112,20 @@ function updateQualityRange(currentRange) {
|
|
|
112
112
|
* Create assembly steps for a complex recipe.
|
|
113
113
|
*/
|
|
114
114
|
export function createAssemblySteps(recipe) {
|
|
115
|
-
// Placeholder: generate steps based on recipe complexity
|
|
116
115
|
const steps = [];
|
|
117
116
|
const stepCount = Math.max(1, Math.round(recipe.complexity_Q / q(0.30)));
|
|
117
|
+
// Derive skills and tools from recipe requirements
|
|
118
|
+
const skillTypes = recipe.skillRequirements.length > 0
|
|
119
|
+
? recipe.skillRequirements.map(sr => sr.skillType)
|
|
120
|
+
: ["bodilyKinesthetic", "logicalMathematical"];
|
|
121
|
+
const toolCategories = recipe.toolRequirements.map(tr => tr.toolCategory);
|
|
118
122
|
for (let i = 0; i < stepCount; i++) {
|
|
119
123
|
steps.push({
|
|
120
124
|
stepId: `step_${i}`,
|
|
121
125
|
description: `Step ${i + 1}`,
|
|
122
|
-
requiredSkill: i %
|
|
126
|
+
requiredSkill: skillTypes[i % skillTypes.length],
|
|
123
127
|
timeFraction: Math.round(SCALE.Q / stepCount),
|
|
124
|
-
toolRequirements: i === 0 ? [
|
|
128
|
+
toolRequirements: i === 0 && toolCategories.length > 0 ? [toolCategories[0]] : [],
|
|
125
129
|
});
|
|
126
130
|
}
|
|
127
131
|
return steps;
|
|
@@ -196,7 +196,7 @@ export function resolveRecipe(recipe, entity, inventory, availableToolQualities,
|
|
|
196
196
|
const timeTaken_s = Math.round(time_s * q(0.50) / (skillBonus > 0 ? skillBonus : q(0.50)));
|
|
197
197
|
// Determine descriptor
|
|
198
198
|
const descriptor = qualityToDescriptor(quality_Q);
|
|
199
|
-
//
|
|
199
|
+
// Build consumed ingredients list (actual inventory mutation is handled by the caller)
|
|
200
200
|
const consumedIngredients = recipe.ingredients.map(ing => ({
|
|
201
201
|
itemId: ing.itemId,
|
|
202
202
|
quantity: ing.quantity,
|
package/dist/src/dialogue.d.ts
CHANGED
|
@@ -49,7 +49,8 @@ export type DialogueOutcome = {
|
|
|
49
49
|
/**
|
|
50
50
|
* Context for a dialogue resolution.
|
|
51
51
|
*
|
|
52
|
-
* `sharedFaction` —
|
|
52
|
+
* `sharedFaction` — when true, applies a `PERSUADE_FACTION_BONUS` to persuasion rolls;
|
|
53
|
+
* set by the host when entities belong to the same faction.
|
|
53
54
|
* `priorFailedAttempts` — cumulative failed persuasion attempts by this initiator against
|
|
54
55
|
* this target; each one imposes a PERSUADE_FAILURE_PENALTY.
|
|
55
56
|
*/
|