From 82ae667611c4877e28555e3ccb5ae856bc966fa5 Mon Sep 17 00:00:00 2001 From: sanjinpepic Date: Sun, 16 Aug 2026 20:04:23 +0200 Subject: [PATCH] Update the crossValidate comment for growth_rates / evolution_methods The comment above the gatedFor skip in Schemas.crossValidate still described growth_rates and evolution_methods as unconfirmable Gen 2 namespaces, the way they were before each got a real Gen 2 id space: growth_rates keeps its Gen 1 target and is seeded from the extractor's data.pokemon.growthRates (src/battle/gen2/Mon.lua), and evolution_methods routes to gen2EvolutionMethods, a fixed literal set (src/core/gen2/Evolution.lua) that exists with or without a ROM import. Schemas.GEN2 does not gate either name -- gate_gen2_mod_api.lua pins that directly, including a case that a bad evolution method on a Gold species is still caught -- so the two are validated like any other reference today, not skipped. Nothing here changes that behavior; only the comment, which was describing an earlier state of the code, is corrected. --- src/mods/Schemas.lua | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/mods/Schemas.lua b/src/mods/Schemas.lua index 23d34b37..9be13727 100644 --- a/src/mods/Schemas.lua +++ b/src/mods/Schemas.lua @@ -377,11 +377,19 @@ function Schemas.crossValidate(loader, data) and loader.content[ref.registry] -- A registry with no home in this generation has no id space to -- check against: its base view resolves to nothing, so EVERY - -- reference into it would read as dangling. Gold's species carry a - -- growthRate and an evolution method like Red's do; the ids are - -- fine, it is the Gen 1 `growth_rates` / `evolution_methods` - -- namespaces that are not there to confirm them. Skipped for the - -- same reason an undeclared registry is: unknown, not wrong. + -- reference into it would read as dangling. `transitions` is the + -- standing example -- Gold draws its own battle intro and never + -- reads the merged table, so a mod's transition id there is + -- unconfirmable, not wrong. `growth_rates` and `evolution_methods` + -- used to sit in that category too, back when Gold had no id space + -- for either. Both are routed now: `growth_rates` keeps its Gen 1 + -- path and is seeded from data.pokemon.growthRates (the extractor's + -- Gold curves, src/battle/gen2/Mon.lua), and `evolution_methods` + -- routes to gen2EvolutionMethods (src/core/gen2/Evolution.lua's + -- literal EVOLVE_* ids, present with or without a ROM import). A + -- Gold species' growthRate or evolution method is checked against + -- real ids exactly like a Red one's, so a genuine typo is still + -- caught here rather than waved through as "unknown, not wrong." if refRegistry and Schemas.gatedFor(ref.registry, loader.generation) then refRegistry = nil end