generated from nhcarrigan/template
fix: gold icon, story banner crop, crafted items persist, community blurb, validation error filtering
This commit is contained in:
@@ -622,11 +622,17 @@ const validateAndSanitize = (
|
||||
= Math.min(material.quantity, previousQuantity);
|
||||
return { ...material, quantity: cappedQuantity };
|
||||
});
|
||||
const craftedRecipeIds = incoming.exploration.craftedRecipeIds.filter(
|
||||
(recipeId) => {
|
||||
return previousExploration.craftedRecipeIds.includes(recipeId);
|
||||
},
|
||||
);
|
||||
|
||||
/*
|
||||
* Merge crafted recipe IDs from both states so the list can only ever grow.
|
||||
* A stale auto-save arriving after a craft must not silently un-craft items.
|
||||
*/
|
||||
const craftedRecipeIds = [
|
||||
...new Set([
|
||||
...previousExploration.craftedRecipeIds,
|
||||
...incoming.exploration.craftedRecipeIds,
|
||||
]),
|
||||
];
|
||||
explorationSpread = {
|
||||
exploration: {
|
||||
...incoming.exploration,
|
||||
|
||||
Reference in New Issue
Block a user