party.add validated, character.add_to_party gone
This commit is contained in:
1 parent
6a41419387
commit
737e4b9a56
2 files changed
+8
-3
No files matched your search
@@ -15,7 +15,7 @@ namespace Cthangover.Validator
|
||||
/// runtime factories can only log.
|
||||
/// <para/>
|
||||
/// 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<string, string> PartyAdd = new Dictionary<string, string>
|
||||
{
|
||||
["id"] = ValidationKind.Character,
|
||||
};
|
||||
|
||||
private static readonly Dictionary<string, string> BattleInit = new Dictionary<string, string>
|
||||
{
|
||||
["scene"] = ValidationKind.Scene,
|
||||
@@ -43,7 +48,7 @@ namespace Cthangover.Validator
|
||||
private static readonly Dictionary<string, IReadOnlyDictionary<string, string>> Table =
|
||||
new Dictionary<string, IReadOnlyDictionary<string, string>>(System.StringComparer.OrdinalIgnoreCase)
|
||||
{
|
||||
["character.add_to_party"] = CharacterType,
|
||||
["party.add"] = PartyAdd,
|
||||
["character.send_notification"] = CharacterType,
|
||||
["character.add_skill"] = AddSkill,
|
||||
["battle.init"] = BattleInit,
|
||||
|
||||
@@ -395,7 +395,7 @@ namespace Cthangover.Validator
|
||||
/// Collects content references hidden in the named arguments of an
|
||||
/// <c>action</c> command. The scenario DSL treats action arguments as
|
||||
/// opaque dialog variables, so without this pass a typo like
|
||||
/// <c>action character.add_to_party type=Murakamiy</c> would only surface
|
||||
/// <c>action party.add id=Murakamiy</c> would only surface
|
||||
/// at runtime as a factory error log. Values from
|
||||
/// <see cref="ActionArgumentReferences"/> become graph references and are
|
||||
/// reconciled by <see cref="ReferenceStrategy"/>, which reports the
|
||||
|
||||
Reference in new issue
Block a user