Show fish names on cook recipes and fix tinderbox equip frames.
Cook UI labels use each species name; tinderbox-equip is registered as a single frame so firestarting can show it.
@@ -407,12 +407,19 @@ function scanLayer (layerDir, definitions, layer, urlFolder)
407
407
...sheet
408
408
});
409
409
}
410
/** Worn/gather overlays are always single-frame (inventory sheets may differ). */
411
const equipSheet = {
412
subImgTotal: 1,
413
perRow: 1,
414
loop: false,
415
animationSpeed: 0
416
};
410
417
if (equips[state])
411
418
{
412
419
images.push({
413
420
name: equipImageName(layer, def.key, state),
414
421
url: `/assets/${urlFolder}/${def.key}/${state}-equip.png`,
415
...sheet
422
...equipSheet
416
423
});
417
424
}
418
425
if (equipBlooms[state])
@@ -420,7 +427,7 @@ function scanLayer (layerDir, definitions, layer, urlFolder)
420
427
images.push({
421
428
name: equipBloomImageName(layer, def.key, state),
422
429
url: `/assets/${urlFolder}/${def.key}/${state}-equip-bloom.png`,
423
...sheet
430
...equipSheet
424
431
});
425
432
}
426
433
}
@@ -407,12 +407,19 @@ function scanLayer (layerDir, definitions, layer, urlFolder)407
...sheet407
...sheet408
});408
});409
}409
}410
/** Worn/gather overlays are always single-frame (inventory sheets may differ). */411
const equipSheet = {412
subImgTotal: 1,413
perRow: 1,414
loop: false,415
animationSpeed: 0416
};410
if (equips[state])417
if (equips[state])411
{418
{412
images.push({419
images.push({413
name: equipImageName(layer, def.key, state),420
name: equipImageName(layer, def.key, state),414
url: `/assets/${urlFolder}/${def.key}/${state}-equip.png`,421
url: `/assets/${urlFolder}/${def.key}/${state}-equip.png`,415
...sheet422
...equipSheet416
});423
});417
}424
}418
if (equipBlooms[state])425
if (equipBlooms[state])@@ -420,7 +427,7 @@ function scanLayer (layerDir, definitions, layer, urlFolder)420
images.push({427
images.push({421
name: equipBloomImageName(layer, def.key, state),428
name: equipBloomImageName(layer, def.key, state),422
url: `/assets/${urlFolder}/${def.key}/${state}-equip-bloom.png`,429
url: `/assets/${urlFolder}/${def.key}/${state}-equip-bloom.png`,423
...sheet430
...equipSheet424
});431
});425
}432
}426
}433
}@@ -113,6 +113,16 @@ test("cook-venison recipe exists for oven and campfire with burnt output", () =>
113
113
assert.equal(recipe.inputs[0].itemId, CraftingItemId.rawMeat);
114
114
});
115
115
116
test("fish cook recipes use the species name as craft label", () =>
117
{
118
const trout = recipeDefinition("cook-trout");
119
assert.ok(trout);
120
assert.equal(trout.craftGroupLabel, "Trout");
121
assert.equal(trout.craftGroup, "cook-trout");
122
const minnow = recipeDefinition("cook-minnow");
123
assert.equal(minnow.craftGroupLabel, "Minnow");
124
});
125
116
126
test("start-fire places campfire and expiry drops ash", () =>
117
127
{
118
128
const harness = makeSimulation({ workerCount: 1 });
@@ -113,6 +113,16 @@ test("cook-venison recipe exists for oven and campfire with burnt output", () =>113
assert.equal(recipe.inputs[0].itemId, CraftingItemId.rawMeat);113
assert.equal(recipe.inputs[0].itemId, CraftingItemId.rawMeat);114
});114
});115
115
116
test("fish cook recipes use the species name as craft label", () =>117
{118
const trout = recipeDefinition("cook-trout");119
assert.ok(trout);120
assert.equal(trout.craftGroupLabel, "Trout");121
assert.equal(trout.craftGroup, "cook-trout");122
const minnow = recipeDefinition("cook-minnow");123
assert.equal(minnow.craftGroupLabel, "Minnow");124
});125
116
test("start-fire places campfire and expiry drops ash", () =>126
test("start-fire places campfire and expiry drops ash", () =>117
{127
{118
const harness = makeSimulation({ workerCount: 1 });128
const harness = makeSimulation({ workerCount: 1 });@@ -34,6 +34,13 @@ test("bloom companions are not visual states", () =>
34
34
const pigeon = catalog.images.find((image) => image.name === "mob:pigeon:pigeon-flying");
35
35
assert.equal(pigeon.subImgTotal, 2);
36
36
assert.equal(pigeon.perRow, 2);
37
const tinderEquip = catalog.images.find((image) => image.name === "item:tinderbox:tinderbox:equip");
38
assert.ok(tinderEquip);
39
assert.equal(tinderEquip.subImgTotal, 1);
40
assert.equal(tinderEquip.perRow, 1);
41
const tinderIcon = catalog.images.find((image) => image.name === "item:tinderbox:tinderbox");
42
assert.equal(tinderIcon.subImgTotal, 6);
43
assert.equal(tinderIcon.perRow, 3);
37
44
assert.ok(catalog.images.some((image) => image.name === "character:player-body-male:player-body-male"));
38
45
assert.ok(!catalog.blocks.torch.states.includes("torch-bloom"));
39
46
assert.ok(!catalog.blocks.torch.states.some((state) => state.includes("equip")));
@@ -34,6 +34,13 @@ test("bloom companions are not visual states", () =>34
const pigeon = catalog.images.find((image) => image.name === "mob:pigeon:pigeon-flying");34
const pigeon = catalog.images.find((image) => image.name === "mob:pigeon:pigeon-flying");35
assert.equal(pigeon.subImgTotal, 2);35
assert.equal(pigeon.subImgTotal, 2);36
assert.equal(pigeon.perRow, 2);36
assert.equal(pigeon.perRow, 2);37
const tinderEquip = catalog.images.find((image) => image.name === "item:tinderbox:tinderbox:equip");38
assert.ok(tinderEquip);39
assert.equal(tinderEquip.subImgTotal, 1);40
assert.equal(tinderEquip.perRow, 1);41
const tinderIcon = catalog.images.find((image) => image.name === "item:tinderbox:tinderbox");42
assert.equal(tinderIcon.subImgTotal, 6);43
assert.equal(tinderIcon.perRow, 3);37
assert.ok(catalog.images.some((image) => image.name === "character:player-body-male:player-body-male"));44
assert.ok(catalog.images.some((image) => image.name === "character:player-body-male:player-body-male"));38
assert.ok(!catalog.blocks.torch.states.includes("torch-bloom"));45
assert.ok(!catalog.blocks.torch.states.includes("torch-bloom"));39
assert.ok(!catalog.blocks.torch.states.some((state) => state.includes("equip")));46
assert.ok(!catalog.blocks.torch.states.some((state) => state.includes("equip")));