From 7bafab286b6295c388a6336c3e83e500228dd4ef Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Sat, 31 Mar 2018 11:30:35 -0400 Subject: [PATCH] Schema: Don't accept omitted [] after all in [modify_ai] paths --- data/schema/game_config.cfg | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/data/schema/game_config.cfg b/data/schema/game_config.cfg index 91d7fca2098b..0e22aad917fb 100644 --- a/data/schema/game_config.cfg +++ b/data/schema/game_config.cfg @@ -266,33 +266,22 @@ [/type] [type] name="ai_modify_path" - # This only does some very basic validation and accepts quite a few invalid values. - # For example, only aspect[recruitment_instructions] can have a .recruit or .limit suffix. [union] - # Toplevel components without index - # Aspect isn't really useful here but I guess is technically valid - [type] - value="aspect|goal|stage" - [/type] - # Toplevel components with index + # Toplevel components [type] value="(aspect|goal|stage)\[[^\]]*\]" [/type] - # Facets without index - [type] - value="aspect\[[^\]]*\](\.facet\[[^\]]*\])*\.facet" - [/type] - # Facets with index + # Facets [type] value="aspect\[[^\]]*\](\.facet\[[^\]]*\])+" [/type] - # Recruitment jobs with optional index + # Recruitment jobs [type] - value="aspect\[[^\]]*\](\.facet\[[^\]]*\])+\.(recruit|limit)(\[[^\]]*\])?" + value="aspect\[\s*recruitment_instructions\s*]*\](\.facet\[[^\]]*\])+\.(recruit|limit)\[[^\]]*\]" [/type] - # Candidate actions with optional index + # Candidate actions [type] - value="stage\[[^\]]*\]\.candidate_action(\[[^\]]*\])?" + value="stage\[[^\]]*\]\.candidate_action\[[^\]]*\]" [/type] [/union] [/type]