Head Accessories AutoGen Configuration
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user