sarbian/ModuleManager

[Proposal] Matching based on adjacent values/nodes

blowfishpro opened this issue · 1 comments

Sometimes it's useful to conditionally modify nodes/values based not on their contents but based on other values/nodes at the same level. You can accomplish the same thing with multiple patches now, but it leads to duplication of similar patches and requires more scans of the game database (i.e. slower). Proposal is to allow a :WITH block that checks nodes/values at the same level. For example:

@PART[SomePart_x1|SomePart_x2]:FOR[MyMod]
{
    @mass = 1.2
    @mass:WITH[#name[SomePartx2]] *= 2
}

It should ideally work on both nodes and values, but not be applicable to root nodes since there's nothing "adjacent" to check against

Seems fine and the syntax is already there