topdata: stop hardcoding the skills dataset location
The skills dataset moved into a tree (skills/core, skills/specs, ...).
Resolve it data-driven instead of by name:
- The required-family check no longer pins skill focus families to
dataset "skills"; the family spec's child_source names the dataset.
- Affinity generation and display names use the skill_focus spec's
child_source dataset.
- Child slugs derive from the row key's own namespace (text after the
first colon) instead of assuming namespace == dataset path.
- The wiki loader accepts both layouts ("skills", then "skills/core").
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1867,8 +1867,10 @@ func validateGeneratedFeatFamilies(dataDir string, report *ValidationReport) {
|
||||
}
|
||||
|
||||
required := []requiredFeatFamily{
|
||||
{FamilyKey: "skillfocus", Dataset: "skills", Predicate: "accessible"},
|
||||
{FamilyKey: "greaterskillfocus", Dataset: "skills", Predicate: "accessible"},
|
||||
// skill families: the source dataset is data-driven (family spec), only
|
||||
// the accessibility predicate is required
|
||||
{FamilyKey: "skillfocus", Predicate: "accessible"},
|
||||
{FamilyKey: "greaterskillfocus", Predicate: "accessible"},
|
||||
{FamilyKey: "weaponfocus", Dataset: "baseitems", Column: "WeaponFocusFeat"},
|
||||
{FamilyKey: "weaponspecialization", Dataset: "baseitems", Column: "WeaponSpecializationFeat"},
|
||||
{FamilyKey: "improvedcritical", Dataset: "baseitems", Column: "WeaponImprovedCriticalFeat"},
|
||||
@@ -1882,7 +1884,7 @@ func validateGeneratedFeatFamilies(dataDir string, report *ValidationReport) {
|
||||
if !ok {
|
||||
continue
|
||||
}
|
||||
if spec.ChildSource.Dataset != requirement.Dataset ||
|
||||
if (requirement.Dataset != "" && spec.ChildSource.Dataset != requirement.Dataset) ||
|
||||
spec.ChildSource.Column != requirement.Column ||
|
||||
spec.ChildSource.Predicate != requirement.Predicate {
|
||||
report.Diagnostics = append(report.Diagnostics, Diagnostic{
|
||||
@@ -2081,7 +2083,10 @@ func validateGeneratedFeatFamilyCompleteness(path string, spec familyExpansionSp
|
||||
}
|
||||
if include {
|
||||
if familyAllowlist {
|
||||
slug := strings.TrimPrefix(sourceKey, spec.ChildSource.Dataset+":")
|
||||
slug := sourceKey
|
||||
if idx := strings.Index(slug, ":"); idx >= 0 {
|
||||
slug = slug[idx+1:]
|
||||
}
|
||||
featKey, _, _, err := ctx.resolveGeneratedFeatIdentity(spec, slug, row)
|
||||
if err != nil {
|
||||
report.Diagnostics = append(report.Diagnostics, Diagnostic{
|
||||
|
||||
Reference in New Issue
Block a user