Skip to content

Releases: sarbian/ModuleManager

2.1.5

22 May 21:34
Compare
Choose a tag to compare

Fix a bug when inserting a name less node

2.1.4

18 May 01:50
Compare
Choose a tag to compare

Allow GameData subdir in NEEDS / BEFORE / AFTER

2.1.3

17 May 06:52
Compare
Choose a tag to compare
  • Removed non-essential backups
  • Improvements for if multiple copies of the same version are installed.

2.1.2

10 May 14:40
Compare
Choose a tag to compare

Lots of improvements and bug fixes in this release.

Full details here

Swamp_ig's Enhancements

04 May 00:02
Compare
Choose a tag to compare

So I've done my own enhancements to module manager.

They seem to work pretty nice! I'd really appreciate ppl testing it out on their various MM files prior to me pushing it back to the MM repo.

Any issues you have - take them up with me not with sarbian

Features:

Order Preserving

@ now preserves the original order, both for nodes and for values.

Use of NEEDS

PART:NEEDS[RealFuels] {
    name = dummyPartIgnore
    module = Part

    DOG {
        name = First
        key1:NEEDS[ProceduralParts|StretchySRB] = Original Value
        key2:NEEDS[!RealFuels] = Some other value
    }
}

In the above, the part will only be defined if you have RealFuels loaded. You can do this on keys, values, patches, anywhere.

key1 will be defined if (ProceduralParts OR StretchySRB are loaded) and RealFuels is NOT loaded. You can still use , and it is treated like &. Not has highest precedence, then or, then and.

Define an insertion point for any nodes or values

@PART[dummyPartIgnore]
{
    DOG {
        name = AddLast
        string = Will insert at the end
    }

    DOG,0 {
        name = AddFirst
        string = Will insert at the beginning
    }

    @DOG,0 { // Edits node zero as before, but ends up editing the above node
        string,0 = Insert before the string already at the beginning
    }          
}

The index after the comma is where it will be inserted, this is relative to other nodes or values with the same name.

Regexp replaces

@PART[dummyPartIgnore]
{
    @DOG[First] 
    {
        @string ^= :^.*$:First dog edit $& in place
    }
}

Breaking this down, the first character defines the separator, the section between the first : and the second : is the match string, and the section following the second : is the replacement.
For details on how to use regexp see the documentation here