Accessories unhardcoded
This commit is contained in:
@@ -2178,7 +2178,9 @@ func TestPlanHAKsWritesManifestWithoutArchives(t *testing.T) {
|
||||
func TestBuildHAKsWritesConfiguredHeadVisualeffectsAutogenManifest(t *testing.T) {
|
||||
root := t.TempDir()
|
||||
mustMkdir(t, filepath.Join(root, "src"))
|
||||
mustMkdir(t, filepath.Join(root, "assets", "vfxs", "chest_accessories"))
|
||||
mustMkdir(t, filepath.Join(root, "assets", "vfxs", "head_accessories"))
|
||||
mustMkdir(t, filepath.Join(root, "assets", "vfxs", "head_decorations"))
|
||||
mustMkdir(t, filepath.Join(root, "assets", "vfxs", "head_features", "hair"))
|
||||
mustMkdir(t, filepath.Join(root, "build"))
|
||||
|
||||
@@ -2198,7 +2200,7 @@ func TestBuildHAKsWritesConfiguredHeadVisualeffectsAutogenManifest(t *testing.T)
|
||||
{
|
||||
"id": "head_visualeffects",
|
||||
"root": "vfxs",
|
||||
"include": ["head_accessories/**/*.mdl", "head_features/**/*.mdl"],
|
||||
"include": ["chest_accessories/**/*.mdl", "head_accessories/**/*.mdl", "head_decorations/**/*.mdl", "head_features/**/*.mdl"],
|
||||
"derive": {
|
||||
"kind": "model_stem",
|
||||
"group_from": "first_path_segment"
|
||||
@@ -2223,7 +2225,9 @@ func TestBuildHAKsWritesConfiguredHeadVisualeffectsAutogenManifest(t *testing.T)
|
||||
}
|
||||
`)
|
||||
|
||||
mustWriteFile(t, filepath.Join(root, "assets", "vfxs", "chest_accessories", "tfx_sash.mdl"), "sash")
|
||||
mustWriteFile(t, filepath.Join(root, "assets", "vfxs", "head_accessories", "hfx_bandana.mdl"), "bandana")
|
||||
mustWriteFile(t, filepath.Join(root, "assets", "vfxs", "head_decorations", "hfx_laurel.mdl"), "laurel")
|
||||
mustWriteFile(t, filepath.Join(root, "assets", "vfxs", "head_features", "hair", "hfx_hair_bangs.mdl"), "hair")
|
||||
|
||||
p, err := project.Load(root)
|
||||
@@ -2255,8 +2259,12 @@ func TestBuildHAKsWritesConfiguredHeadVisualeffectsAutogenManifest(t *testing.T)
|
||||
text := string(headRaw)
|
||||
for _, want := range []string{
|
||||
`"id": "head_visualeffects"`,
|
||||
`"group": "chest_accessories"`,
|
||||
`"model_stem": "tfx_sash"`,
|
||||
`"group": "head_accessories"`,
|
||||
`"model_stem": "hfx_bandana"`,
|
||||
`"group": "head_decorations"`,
|
||||
`"model_stem": "hfx_laurel"`,
|
||||
`"group": "head_features"`,
|
||||
`"model_stem": "hfx_hair_bangs"`,
|
||||
} {
|
||||
|
||||
Reference in New Issue
Block a user