Skip to content

Sequence

Nightinggale edited this page Jun 17, 2018 · 1 revision

What it does

Acts as vanilla PatchOperationSequence, but with added features.


Why you want to use this

Use if you want to use one or more of the following:

Grouping test conditions

If you want to use LoadOrder and IsModLoaded to display error messages in case of failure, Sequence will allow you to make one sequence, which applies just once and will show up in the profiling log as a single line despite being able to continue testing even if one fails.

Profiling

It's highly recommended to add patchName to all root level operations as this makes the profiling output much more readable.

Used in loops

Forwards cache reset requests when used inside Loop. PatchOperationSequence doesn't and will result in inaccurate readings when used together with ModCheck operations using internal cache.


Tags

Tag Mandatory Type Default Description
patchName no string Name of patch for log/profiling
List yes list The list of operations to perform
once no bool false The list is only applied once
stopOnFail no bool true If an operation in the list fails, skip the rest of the list

Note: with List being the only mandatory tag, PatchOperationSequence can be changed to ModCheck.Sqeuence without changing behavior. This is an easy approach to adding patchName to existing patch files.


Pass condition

Pass is everything in List passes. If once is set, the first result will be remembered and used each time.


Example

<li Class="ModCheck.Sequence">
    <patchName>A series of testing conditions for log writing</patchName>
    <once>true</once>
    <!-- once is set to avoid spamming the log -->
    <stopOnFail>false</stopOnFail>
    <List>
        <li Class ="ModCheck.IsModLoaded">
            <!-- some testing -->
        </li>
        <!-- stopOnFail ensures LogWrite will always apply even if IsModLoaded fails -->
        <li Class ="ModCheck.LogWrite">
            <!-- log writing -->
        </li>
    </List>
</li>
Clone this wiki locally