Generate racial radial rows from race UsableFeat (#94) #95

Merged
archvillainette merged 2 commits from feat/generate-racial-radial-rows into main 2026-08-03 18:58:44 +00:00
2 changed files with 4 additions and 8 deletions
Showing only changes of commit cbfce696b2 - Show all commits
+1 -1
View File
@@ -4154,7 +4154,7 @@ func racialUsableFeatRules(collected []nativeCollectedDataset) []project.TopData
seen := map[string]struct{}{} seen := map[string]struct{}{}
rules := []project.TopDataClassFeatGlobalRule{} rules := []project.TopDataClassFeatGlobalRule{}
for _, ds := range collected { for _, ds := range collected {
if !strings.HasPrefix(ds.Dataset.OutputName, "race_feat_") { if !strings.HasPrefix(ds.Dataset.OutputName, "race_feat_") || !strings.HasSuffix(ds.Dataset.OutputName, ".2da") {
continue continue
} }
for _, row := range ds.Rows { for _, row := range ds.Rows {
+3 -7
View File
@@ -47,12 +47,8 @@ func TestRacialUsableFeatRules(t *testing.T) {
{Feat: "feat:tiefling/darkness", List: "3", GrantedOnLevel: "99", OnMenu: "1"}, {Feat: "feat:tiefling/darkness", List: "3", GrantedOnLevel: "99", OnMenu: "1"},
} }
if len(got) != len(want) { // Slice is sorted by Feat, so order is deterministic.
t.Fatalf("rule count: got %d, want %d (%+v)", len(got), len(want), got) if !reflect.DeepEqual(got, want) {
} t.Fatalf("rules: got %+v, want %+v", got, want)
for i := range want {
if !reflect.DeepEqual(got[i], want[i]) { // slice is sorted by Feat, so order is deterministic
t.Fatalf("rule %d: got %+v, want %+v", i, got[i], want[i])
}
} }
} }