DragonKnightOfBreeze / Paradox-Language-Support

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

Allow, through cwt configs, to somehow make an inline parameter inherit the context/config of its parent/inline, specifically useful for code blocks. #68

Closed adriangaro closed 1 month ago

adriangaro commented 4 months ago

As title described, the ability to somehow configure a parameter to be able to inherit the context/config of its parent inline.

For example the following

inline_script = {
    script = conditional/tec_number
    value = $tier$
    equal = 3
    code = "
        resources = {
            category = planet_buildings
            inline_script = buildings/resources/tec_extradimensional_experimentation_upkeep
        }

        inline_script = {
            script = buildings/effects/tec_extradimensional_experimentation
            count = 1
        }
    "
}

In this case i would like to be able to somehow define that code has the same context as the calling inline, but am unable to make it so atm. Usually this works, but if your logic might depend on using an inline dynamically (using inline_script = my_inline_$my_param$ kind of syntax), the context inference is lost (or if used in different conflicted contexts)

image

These are used in building definitions to unify their logic, and only conditionally add the logic for a specific tier, the code block essentially having the same context/config ideally as the place it is invoked in.

DragonKnightOfBreeze commented 1 month ago

Will be implemented in 1.3.12 by ## inherit