Head Accessories AutoGen Configuration

This commit is contained in:
2026-04-25 07:40:17 +02:00
parent 831d3b47da
commit b6fff4bed4
6 changed files with 1010 additions and 10 deletions
+16
View File
@@ -60,6 +60,19 @@ func isPartsDataset(datasetName string) bool {
return false
}
func isAutogenEligiblePartsDataset(dataset nativeCollectedDataset) bool {
if !isPartsDataset(dataset.Dataset.Name) {
return false
}
for _, row := range dataset.Rows {
key, ok := row["key"].(string)
if ok && strings.TrimSpace(key) != "" {
return false
}
}
return true
}
// extractPartCategory extracts the part category from a dataset name
// e.g., "parts/belt" -> "belt", "parts/bicep" -> "bicep"
func extractPartCategory(datasetName string) string {
@@ -430,6 +443,9 @@ func augmentWithAutogeneratedParts(collected []nativeCollectedDataset, autogener
copy(result, collected)
for i, dataset := range collected {
if !isAutogenEligiblePartsDataset(dataset) {
continue
}
category := partAssetCategoryForDataset(dataset.Dataset.Name)
if !isSupportedPartCategory(category) {
continue