Skip to content
Nightinggale edited this page Jun 8, 2018 · 1 revision

What it does

Has two operations where it executes one of them based on the result of a test operation.


Why you want to use this

If you have two ways to patch a file and you need to pick one based on some test condition, you can use IfElse to avoid having to test twice.


Tags

Tag Mandatory Type Default Description
patchName no string Name of patch for log/profiling
test yes operation Operation used for test condition
passed yes operation Runs this is test is true
failed yes operation Runs this is test is false
passInnerTest no bool true See pass conditions

Note: while each operation is a single operation, they can be of any type of operation, including Sequence, AND, OR and IfElse. In other words each of the operations can be expanded as needed with no limit on complexity.


Pass condition

If passInnerTest is true

The success of the IfElse copies the result from passed or failed, depending on which is executed.

If passInnerTest is false

The success of the IfElse copies the result from the test operation.


Example

<li Class="ModCheck.IfElse">
    <test Class = "ModCheck.LoadOrder>
        <!-- some test conditions -->
    </test>
    <passed Class="something">
        <!-- some patching -->
    </passed>
    <failed Class="something else">
        <!-- different patching -->
    </failed>
</li>

Clone this wiki locally