Remove legacy party configuration
This commit is contained in:
@@ -126,9 +126,8 @@ func EffectivePipelineSources(cfg *PipelineConfig, party ResolvedParty) ([]Effec
|
||||
}
|
||||
|
||||
// EffectiveCampaignSources projects selected campaign and party ownership
|
||||
// without retaining or rendering campaign values. Canonical players are a
|
||||
// derived party value, while a legacy players file remains explicitly marked
|
||||
// as legacy input provenance.
|
||||
// without retaining or rendering campaign values. Players are derived from the
|
||||
// canonical party source.
|
||||
func EffectiveCampaignSources(campaignPath string, campaign *CampaignConfig, party ResolvedParty) []EffectivePipelineSourceRecord {
|
||||
if campaign == nil {
|
||||
return nil
|
||||
@@ -143,21 +142,11 @@ func EffectiveCampaignSources(campaignPath string, campaign *CampaignConfig, par
|
||||
if strings.TrimSpace(campaign.Inputs.SpellCatalogFile) != "" {
|
||||
records = append(records, EffectivePipelineSourceRecord{Path: "campaign.inputs.spell_catalog_file", Role: "campaign", Source: campaignSource})
|
||||
}
|
||||
if party.Mode == PartyModeCanonical {
|
||||
partySource := normalizedProvenancePath(party.Source.Path)
|
||||
records = append(records,
|
||||
EffectivePipelineSourceRecord{Path: "campaign.inputs.party_file", Role: "party", Source: partySource},
|
||||
EffectivePipelineSourceRecord{Path: "derived.players", Role: "party", Source: partySource},
|
||||
)
|
||||
} else {
|
||||
partySource := normalizedProvenancePath(party.Source.Path)
|
||||
records = append(records, EffectivePipelineSourceRecord{Path: "campaign.inputs.party_file", Role: "party", Source: partySource})
|
||||
if strings.TrimSpace(campaign.Inputs.PlayersFile) != "" {
|
||||
records = append(records, EffectivePipelineSourceRecord{
|
||||
Path: "campaign.inputs.players_file", Role: "legacy_player", Source: campaignInputSourcePath(campaignPath, campaign.Inputs.PlayersFile),
|
||||
})
|
||||
}
|
||||
}
|
||||
partySource := normalizedProvenancePath(party.Source.Path)
|
||||
records = append(records,
|
||||
EffectivePipelineSourceRecord{Path: "campaign.inputs.party_file", Role: "party", Source: partySource},
|
||||
EffectivePipelineSourceRecord{Path: "derived.players", Role: "party", Source: partySource},
|
||||
)
|
||||
sort.Slice(records, func(left, right int) bool {
|
||||
if records[left].Path != records[right].Path {
|
||||
return records[left].Path < records[right].Path
|
||||
|
||||
Reference in New Issue
Block a user