DragonKnightOfBreeze / Paradox-Language-Support

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

Some effects change root scopes #71

Closed adriangaro closed 3 months ago

adriangaro commented 4 months ago

image

In this image we can see the effect scope is planet for both this and root but random_owned_pop changes scope type of root to pop, instead of maintaining the previous root scope type. If anything no effect should change the scope of type of root and scripted effects with disjoint root scope should raise an error if they are mismatched.

Also random_owned_pop also changes scope of prev which should be planet, but the plugin sees it as pop, random_owned_pop changing this scope too, instead of changing it to previous scope.

DragonKnightOfBreeze commented 3 months ago

What's the actual root scope should random_owned_pop be?

DragonKnightOfBreeze commented 3 months ago

If anything no effect should change the scope of type of root and scripted effects with disjoint root scope should raise an error if they are mismatched

And please give an example for this validation / inspection

adriangaro commented 3 months ago

As you can see near the top near the scripted trigger definition started, the scope for root is planet.

Root scope never changes to my knowledge during a trigger, regardless how many scope changes happen in rest.

The actual scope for root for random_owned_pop should remain unchanged and inherit the one from the place it was invoked then.

DragonKnightOfBreeze commented 3 months ago

Seems to be a code error, ## push_scope is used in related configs and it should be right.

DragonKnightOfBreeze commented 3 months ago

Will be fixed in 1.3.6