From 737e4b9a56edd2dcf4abd00073a4fb1f0ee759f0 Mon Sep 17 00:00:00 2001 From: iisaev Date: Thu, 22 Oct 2026 19:14:58 +0200 Subject: [PATCH] party.add validated, character.add_to_party gone --- src/ActionArgumentReferences.cs | 9 +++++++-- src/ScenarioCommandValidationStrategy.cs | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/ActionArgumentReferences.cs b/src/ActionArgumentReferences.cs index 71f8173..feb8320 100644 --- a/src/ActionArgumentReferences.cs +++ b/src/ActionArgumentReferences.cs @@ -15,7 +15,7 @@ namespace Cthangover.Validator /// runtime factories can only log. /// /// The table intentionally covers only actions with literal content ids - /// today (character.add_to_party / character.send_notification / + /// today (party.add / character.send_notification / /// character.add_skill / battle.init). Extend it when a new action starts /// accepting content references; the mechanics need no code changes. /// Comma-separated lists (battle.init enemies=) and runtime-computed values @@ -28,6 +28,11 @@ namespace Cthangover.Validator ["type"] = ValidationKind.Character, }; + private static readonly Dictionary PartyAdd = new Dictionary + { + ["id"] = ValidationKind.Character, + }; + private static readonly Dictionary BattleInit = new Dictionary { ["scene"] = ValidationKind.Scene, @@ -43,7 +48,7 @@ namespace Cthangover.Validator private static readonly Dictionary> Table = new Dictionary>(System.StringComparer.OrdinalIgnoreCase) { - ["character.add_to_party"] = CharacterType, + ["party.add"] = PartyAdd, ["character.send_notification"] = CharacterType, ["character.add_skill"] = AddSkill, ["battle.init"] = BattleInit, diff --git a/src/ScenarioCommandValidationStrategy.cs b/src/ScenarioCommandValidationStrategy.cs index c56ad68..c028182 100644 --- a/src/ScenarioCommandValidationStrategy.cs +++ b/src/ScenarioCommandValidationStrategy.cs @@ -395,7 +395,7 @@ namespace Cthangover.Validator /// Collects content references hidden in the named arguments of an /// action command. The scenario DSL treats action arguments as /// opaque dialog variables, so without this pass a typo like - /// action character.add_to_party type=Murakamiy would only surface + /// action party.add id=Murakamiy would only surface /// at runtime as a factory error log. Values from /// become graph references and are /// reconciled by , which reports the