Fix base parts not generating

This commit is contained in:
2026-05-17 15:33:21 +02:00
parent b5a3a715a4
commit 92770bbaa0
7 changed files with 38 additions and 71 deletions
+4 -10
View File
@@ -474,7 +474,9 @@ func normalizePartsRowsACBonus(collected []nativeCollectedDataset, cfg project.P
}
}
rowID, ok := cloned["id"].(int)
if ok {
if isUnsetPartValue(cloned["ACBONUS"]) {
cloned["COSTMODIFIER"] = nullValue
} else if ok {
if value, configured := configuredPartsRowsACBonusValue(rowID, dataset.Dataset.Name, cfg); configured {
cloned["ACBONUS"] = value
}
@@ -663,15 +665,7 @@ func augmentWithAutogeneratedPartsWithConfig(collected []nativeCollectedDataset,
// Add rows for discovered IDs that don't already exist.
newRows := make([]map[string]any, 0, len(dataset.Rows))
for _, row := range dataset.Rows {
rowID, ok := row["id"].(int)
if cfg.NullUndiscoveredRows && ok {
if _, discovered := ids[rowID]; !discovered {
continue
}
}
newRows = append(newRows, row)
}
newRows = append(newRows, dataset.Rows...)
for rowID := range ids {
if row, exists := existingRows[rowID]; exists {