fix(fifa17): carry observed rareflag so special cards render as specials
shape_item hardcoded rareflag=1, so all 1949 cards shaped as basic rare gold regardless of type; informs/specials lost their card art. The dev fixture is base-only, so this was invisible until the real profile (10 distinct rareflag values) exposed it on .105. rareflag is definition-level FIFA identity metadata OBSERVED from the profile (the raw wire integer, never a guessed marketing label), so it lives in the FIFA catalog like asset_id/version, not in generic Core: - ObservedDefinition.rareflag + emitted into the production catalog entry. - Fifa17CardCatalog RawCard/Fifa17CardIdentity gain rareflag (default 1 when a base-only catalog omits it, preserving prior wire behaviour). - Fifa17Identity.rareflag; host resolver populates it from the catalog. - shape_item emits id.rareflag instead of a hardcoded 1. Verified on the real staged /club: wire rareflag distribution == source exactly (0 per-item mismatches across 1949; e.g. rareflag 3 x591, 24 x302, 21 x256). adapter 111 + host 24 + importer 25 tests green; clippy -D clean. rareflag lives in the host catalog, not Core, so no re-import was needed.
This commit is contained in:
@@ -27,6 +27,9 @@ pub struct Fifa17CardIdentity {
|
||||
pub asset_id: u32,
|
||||
pub version: u8,
|
||||
pub resource_id: u32,
|
||||
/// FIFA wire `rareflag` (rare/special card TYPE). Carried so specials render
|
||||
/// as specials; observed metadata, not a guessed label.
|
||||
pub rareflag: i64,
|
||||
}
|
||||
|
||||
/// The FIFA 17 numeric namespace policy for owned-item wire ids.
|
||||
@@ -108,6 +111,14 @@ struct RawCard {
|
||||
asset_id: u32,
|
||||
#[serde(default)]
|
||||
version: u8,
|
||||
/// Absent in a base-only catalog → default 1 (rare), preserving prior wire
|
||||
/// behaviour; the production catalog carries the observed value.
|
||||
#[serde(default = "default_rareflag")]
|
||||
rareflag: i64,
|
||||
}
|
||||
|
||||
fn default_rareflag() -> i64 {
|
||||
1
|
||||
}
|
||||
|
||||
/// A loaded, validated FIFA 17 card-definition identity catalog.
|
||||
@@ -153,6 +164,7 @@ impl Fifa17CardCatalog {
|
||||
asset_id: rc.asset_id,
|
||||
version: rc.version,
|
||||
resource_id,
|
||||
rareflag: rc.rareflag,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user