From 60651b55453f1d4209292b0fa49b5d5884e5728f Mon Sep 17 00:00:00 2001 From: ViTeXFTW Date: Sat, 25 Jul 2026 20:34:14 +0200 Subject: [PATCH] Add FXList reference completions and diagnostics - Treat FXList nugget names as typed references - Cover unresolved asset lookups in the spec --- crates/analysis/tests/spec/ReferenceTest.ini | 30 +++++++++++++++ .../tests/spec/ReferenceTest.spec.toml | 37 +++++++++++++++++++ crates/schema/schema.json | 12 ++++-- 3 files changed, 75 insertions(+), 4 deletions(-) diff --git a/crates/analysis/tests/spec/ReferenceTest.ini b/crates/analysis/tests/spec/ReferenceTest.ini index 61ae03c..097230f 100644 --- a/crates/analysis/tests/spec/ReferenceTest.ini +++ b/crates/analysis/tests/spec/ReferenceTest.ini @@ -10,9 +10,39 @@ AudioEvent TestFireSound Volume = 60.0 End +ParticleSystem TestParticleSystem +End + FXList FX_TestFire End +FXList FX_ReferenceNuggets + Sound + Name = $11 + End + Sound + Name = NoSuchFXSound + End + RayEffect + Name = $12 + End + RayEffect + Name = NoSuchRayObject + End + Tracer + TracerName = $13 + End + Tracer + TracerName = NoSuchTracerObject + End + ParticleSystem + Name = $14 + End + ParticleSystem + Name = NoSuchParticleSystem + End +End + CommandButton Command_RefTest ButtonImage = TestButtonImage End diff --git a/crates/analysis/tests/spec/ReferenceTest.spec.toml b/crates/analysis/tests/spec/ReferenceTest.spec.toml index 20c18bd..a4fd03a 100644 --- a/crates/analysis/tests/spec/ReferenceTest.spec.toml +++ b/crates/analysis/tests/spec/ReferenceTest.spec.toml @@ -20,6 +20,27 @@ severity = "warning" code = "unresolved-reference" on = "NoSuchCommandSet" +# FXList nuggets resolve their named assets through the workspace index. +[[diag]] +severity = "warning" +code = "unresolved-reference" +on = "NoSuchFXSound" + +[[diag]] +severity = "warning" +code = "unresolved-reference" +on = "NoSuchRayObject" + +[[diag]] +severity = "warning" +code = "unresolved-reference" +on = "NoSuchTracerObject" + +[[diag]] +severity = "warning" +code = "unresolved-reference" +on = "NoSuchParticleSystem" + # `ButtonImage =` offers the workspace's mapped images. [[complete]] at = "$1" @@ -64,3 +85,19 @@ includes = ["RefTestCommandSet"] [[complete]] at = "$10" includes = ["SET_NORMAL"] + +[[complete]] +at = "$11" +includes = ["TestFireSound"] + +[[complete]] +at = "$12" +includes = ["RefTestObject"] + +[[complete]] +at = "$13" +includes = ["RefTestObject"] + +[[complete]] +at = "$14" +includes = ["TestParticleSystem"] diff --git a/crates/schema/schema.json b/crates/schema/schema.json index 6d4fe35..4d9d79d 100644 --- a/crates/schema/schema.json +++ b/crates/schema/schema.json @@ -5531,7 +5531,8 @@ { "name": "Name", "value_type": { - "kind": "ascii_string" + "kind": "reference", + "ref_kind": "audio_event" }, "parse_fn": "INI::parseAsciiString" } @@ -5543,7 +5544,8 @@ { "name": "Name", "value_type": { - "kind": "ascii_string" + "kind": "reference", + "ref_kind": "object" }, "parse_fn": "INI::parseAsciiString" }, @@ -5569,7 +5571,8 @@ { "name": "TracerName", "value_type": { - "kind": "ascii_string" + "kind": "reference", + "ref_kind": "object" }, "parse_fn": "INI::parseAsciiString", "doc": null @@ -5711,7 +5714,8 @@ { "name": "Name", "value_type": { - "kind": "ascii_string" + "kind": "reference", + "ref_kind": "particle_system" }, "parse_fn": "INI::parseAsciiString" },