DragonKnightOfBreeze / Paradox-Language-Support

IDEA Plugin: Paradox Language Support.
https://windea.icu/Paradox-Language-Support
MIT License
36 stars 4 forks source link

Using `single_alias[trigger_clause]` in cwt extended definition parameters does not seem to work, nor using a multiple config type work as expected. #76

Closed adriangaro closed 3 months ago

adriangaro commented 3 months ago

I have in many cases the need to pass a trigger block to an inline, and analyzing cwt configs there seem to be two ways of doing it, using single_alias[trigger_clause] like

## context_key = inline_script@jobs/tec_job
    ## replace_scopes = { this = planet  root = any }
    trigger = single_alias[trigger_clause]

Or using context_configs_type = multiple like

## context_key = inline_script@jobs/tec_job
    ## replace_scopes = { this = planet  root = any }
    ## context_configs_type = multiple
    trigger = {
        alias_name[trigger] = alias_match_left[trigger]
    }

But neither of these work as expected, using the single_alias, the error is as below image

Using the context_configs_type = multiple works partially, but the scope is not pushed correctly, defaulting to any, and most scopes inside (ie going to owner do not change scope either)

image

adriangaro commented 3 months ago

Unless defining a trigger block should be done differently in the cwt configs. I also tried completely omiting the type of the parameter and just using replace_scopes but that didn't do it either.

DragonKnightOfBreeze commented 3 months ago

You should use single_alias_right[trigger_clause] to refer a single alias single_alias[x] = ... is used to declare a single alias

But yet it's not tested, I'm not sure it's ok for extended_config_xxx = single_alias_right[xxx]

adriangaro commented 3 months ago

Tried single_alias_right and it seems to have same behaviour.

image image

DragonKnightOfBreeze commented 3 months ago

Will be implemented in 1.3.6