Skip to content

Commit

Permalink
Schema: Don't accept omitted [] after all in [modify_ai] paths
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Oct 24, 2018
1 parent 36903bd commit 7bafab2
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions data/schema/game_config.cfg
Expand Up @@ -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]
Expand Down

0 comments on commit 7bafab2

Please sign in to comment.