mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-12 21:32:52 +00:00
#3087: name each effect the placeholder budget skips
A skipped instance was reported through the capped detail list, so past 20 effect losses it was only counted. It now goes through the per-effect grouping under a key of its own, so it is named like any effect without a counterpart and is not merged into a kept instance's line.
This commit is contained in:
2 files changed
+5
-2
No files matched your search
@@ -94,8 +94,10 @@ pub(crate) fn import_effects<'f, 'a>(
|
||||
}
|
||||
if found.is_none() && col.placeholder_cost >= crate::import::placeholder::MAX_COST {
|
||||
// The import's placeholder budget is spent: the definitions (shared by many instances)
|
||||
// are not read again. Its own line: grouped, it would read as kept.
|
||||
col.lose(LossCategory::Effects, format!("{lost}, not kept (past the import's placeholder parameters)"));
|
||||
// are not read again. Named like any effect without a counterpart, in a group of its
|
||||
// own (with the kept instances it would read as kept).
|
||||
let key = format!("{} (not kept)", fx.match_name());
|
||||
col.lose_unmapped_effect(&key, format!("{lost}, not kept (past the import's placeholder parameters)"));
|
||||
continue;
|
||||
}
|
||||
let params = defs.params(&fx);
|
||||
|
||||
@@ -180,6 +180,7 @@ fn an_effect_past_the_spent_budget_gets_no_placeholder() {
|
||||
let found = losses(&r, LossCategory::Effects, "Big Fx");
|
||||
assert_eq!(found.iter().filter(|d| d.contains("and the ones after it not kept")).count(), 1, "{found:?}");
|
||||
assert!(found.iter().any(|d| d.contains("not kept (past the import's placeholder parameters)")), "{found:?}");
|
||||
assert!(found.iter().any(|d| d.contains("kept without rendering") && !d.contains("more like it")), "the kept instance alone: {found:?}");
|
||||
}
|
||||
|
||||
/// `bytes` with the layer's instance of `match_name` (its `tdmn` and `sspc`) repeated after it.
|
||||
|
||||
Reference in new issue
Block a user