This constructor is an implementation detail. Do not use this.
Parses a best segment time from a string and sets it for the active segment with the chosen timing method.
Parses a comparison time for the provided comparison and sets it for the active active segment with the chosen timing method.
Parses a segment time from a string and sets it for the active segment with the chosen timing method.
Parses a split time from a string and sets it for the active segment with the chosen timing method.
Removes the icon of the active segment.
Sets the icon of the active segment.
Sets the name of the active segment.
Adds a new custom comparison. It can't be added if it starts with
[Race]
or already exists.
Adds a new permanent custom variable. If there's a temporary variable with the same name, it gets turned into a permanent variable and its value stays. If a permanent variable with the name already exists, nothing happens.
Creates a Sum of Best Cleaner which allows you to interactively remove potential issues in the segment history that lead to an inaccurate Sum of Best. If you skip a split, whenever you will do the next split, the combined segment time might be faster than the sum of the individual best segments. The Sum of Best Cleaner will point out all of these and allows you to delete them individually if any of them seem wrong.
Clears out the Attempt History and the Segment Histories of all the segments.
Resets all the Metadata Information.
Clears out the Attempt History, the Segment Histories, all the times,
sets the Attempt Count to 0 and clears the speedrun.com run id
association. All Custom Comparisons other than Personal Best
are
deleted as well.
Closes the Run Editor and gives back access to the modified Run object. In case you want to implement a Cancel Button, just dispose the Run object you get here.
Disposes the object, allowing it to clean up all of its memory. You need to call this for every object that you don't use anymore and hasn't already been disposed.
Imports the Personal Best from the provided run as a comparison. The
comparison can't be added if its name starts with [Race]
or it already
exists.
Inserts a new empty segment above the active segment and adjusts the Run's history information accordingly. The newly created segment is then the only selected segment and also the active segment.
Inserts a new empty segment below the active segment and adjusts the Run's history information accordingly. The newly created segment is then the only selected segment and also the active segment.
Reorders the custom comparisons by moving the comparison with the source index specified to the destination index specified. Returns false if one of the indices is invalid. The indices are based on the comparison names of the Run Editor's state.
Moves all the selected segments down, unless the last segment is selected. The run's information is automatically adjusted properly. The active segment stays the active segment.
Moves all the selected segments up, unless the first segment is selected. The run's information is automatically adjusted properly. The active segment stays the active segment.
Parses a goal time and generates a custom goal comparison based on the parsed value. The comparison's times are automatically balanced based on the runner's history such that it roughly represents what split times for the goal time would roughly look like. Since it is populated by the runner's history, only goal times within the sum of the best segments and the sum of the worst segments are supported. Everything else is automatically capped by that range. The comparison is only populated for the selected timing method. The other timing method's comparison times are not modified by this, so you can call this again with the other timing method to generate the comparison times for both timing methods.
Parses and sets the attempt count from the string provided. Changing this has no affect on the attempt history or the segment history. This number is mostly just a visual number for the runner.
Parses and sets the timer offset from the string provided. The timer offset specifies the time, the timer starts at when starting a new attempt.
Removes the chosen custom comparison. You can't remove a Comparison Generator's Comparison or the Personal Best.
Removes the custom variable with the name specified. If the custom variable does not exist, or is not a permanent variable, nothing happens.
Removes the game's icon.
Removes all the selected segments, unless all of them are selected. The run's information is automatically adjusted properly. The next not-to-be-removed segment after the active segment becomes the new active segment. If there's none, then the next not-to-be-removed segment before the active segment, becomes the new active segment.
Removes the speedrun.com variable with the name specified.
Renames a comparison. The comparison can't be renamed if the new name of
the comparison starts with [Race]
or it already exists.
In addition to the segments that are already selected, the segment with the given index is being selected. The segment chosen also becomes the active segment.
This panics if the index of the segment provided is out of bounds.
Selects the segment with the given index. All other segments are unselected. The segment chosen also becomes the active segment.
This panics if the index of the segment provided is out of bounds.
Selects a different timing method for being modified.
Sets the name of the category.
Sets the value of a custom variable with the name specified. If the custom variable does not exist, or is not a permanent variable, nothing happens.
Specifies whether this speedrun is done on an emulator. Keep in mind that false may also mean that this information is simply not known.
Sets the game's icon.
Sets the name of the game.
Sets the name of the platform this game is run on. This may be empty if it's not specified.
Sets the name of the region this game is from. This may be empty if it's not specified.
Sets the speedrun.com Run ID of the run. You need to ensure that the record on speedrun.com matches up with the Personal Best of this run. This may be empty if there's no association.
Sets the speedrun.com variable with the name specified to the value specified. A variable is an arbitrary key value pair storing additional information about the category. An example of this may be whether Amiibos are used in this category. If the variable doesn't exist yet, it is being inserted.
Calculates the Run Editor's state and encodes it as JSON in order to visualize it.
Unselects the segment with the given index. If it's not selected or the index is out of bounds, nothing happens. The segment is not unselected, when it is the only segment that is selected. If the active segment is unselected, the most recently selected segment remaining becomes the active segment.
Allows for scoped usage of the object. The object is guaranteed to get disposed once this function returns. You are free to dispose the object early yourself anywhere within the scope. The scope's return value gets carried to the outside of this function.
Generated using TypeDoc
The Run Editor allows modifying Runs while ensuring that all the different invariants of the Run objects are upheld no matter what kind of operations are being applied to the Run. It provides the current state of the editor as state objects that can be visualized by any kind of User Interface.