Generate palette projections at module build; never extract them
ci / ci (pull_request) Successful in 3m44s

*palcus.itp files are Toolset-generated snapshots: category skeleton plus
one descriptor per custom blueprint. Treat them as derived data. Module
source now commits only descriptor-free skeletons; build strips any stale
descriptors and re-inserts descriptors computed from the blueprints in the
source tree (name/STRREF, resref, and CR/faction for creatures), so the
DM Creator lists always match what actually ships in the .mod. Compare
applies the same projection. Extract skips *palcus.itp entirely, so local
Toolset palette churn can no longer leak into module source.

Blueprints with PaletteID 255 (hidden) or no PaletteID are omitted, per
engine convention.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-23 11:24:49 +02:00
co-authored by Claude Fable 5
parent 8e7cead5c0
commit 450c3ebc59
5 changed files with 513 additions and 2 deletions
+7
View File
@@ -117,6 +117,10 @@ func expectedResources(p *project.Project) (map[string]resourceExpectation, erro
if err != nil {
return nil, err
}
palettes, err := collectPaletteDescriptors(p)
if err != nil {
return nil, err
}
for _, rel := range p.Inventory.SourceFiles {
abs := filepath.Join(p.SourceDir(), filepath.FromSlash(rel))
@@ -136,6 +140,9 @@ func expectedResources(p *project.Project) (map[string]resourceExpectation, erro
if extension == ".ifo" && strings.EqualFold(name, "module") && len(moduleHakOrder) > 0 {
setModuleHAKList(&document, moduleHakOrder)
}
if extension == ".itp" && isPaletteProjectionResref(name) {
projectPaletteDocument(&document, palettes[strings.ToLower(name)])
}
canonical, err := json.Marshal(document)
if err != nil {