Skip to content

Commit

Permalink
make old scriptInterface fallback to new names
Browse files Browse the repository at this point in the history
  • Loading branch information
Miepee committed Apr 11, 2022
1 parent cfe9fd1 commit 8093717
Showing 1 changed file with 90 additions and 3 deletions.
93 changes: 90 additions & 3 deletions UndertaleModLib/Scripting/IScriptInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,13 @@ void EnsureDataLoaded()
/// <returns><see langword="true"/> if task was successful, <see langword="false"/> if not.</returns>
Task<bool> MakeNewDataFile();

/// <summary> Obsolete. Use <see cref="MakeNewDataFile"/>. </summary>
[Obsolete("Use MakeNewDataFile instead!")]
sealed Task<bool> Make_New_File()
{
return MakeNewDataFile();
}

//TODO: i have absolutely no idea what any of these do.
void ReplaceTempWithMain(bool ImAnExpertBTW = false);
void ReplaceMainWithTemp(bool ImAnExpertBTW = false);
Expand Down Expand Up @@ -298,7 +305,7 @@ bool AreFilesIdentical(string file1, string file2)
/// <param name="isMultiline">Whether to allow the input to have multiple lines.</param>
/// <param name="preventClose">Whether the window is allowed to be closed.
/// Should this be set to <see langword="false"/>, then there also won't be a close button.</param>
/// <returns></returns>
/// <returns>The text that the user inputted.</returns>
string ScriptInputDialog(string title, string label, string defaultInput, string cancelText, string submitText, bool isMultiline, bool preventClose);

/// <summary>
Expand All @@ -322,8 +329,6 @@ bool AreFilesIdentical(string file1, string file2)
/// Should this be false but <paramref name="message"/> have multiple lines, then only the first line will be shown.</param>
void SimpleTextOutput(string title, string label, string message, bool allowMultiline);

//TODO: not exactly sure about most of these.

/// <summary>
/// Shows search output with clickable text to the user.
/// </summary>
Expand All @@ -337,6 +342,15 @@ bool AreFilesIdentical(string file1, string file2)
/// <returns>A task that represents the search output.</returns>
Task ClickableSearchOutput(string title, string query, int resultsCount, IOrderedEnumerable<KeyValuePair<string, List<string>>> resultsDict, bool showInDecompiledView, IOrderedEnumerable<string> failedList = null);

/// <summary>
/// Obsolete.
/// </summary>
[Obsolete("Use ClickableSearchOutput instead!")]
sealed Task ClickableTextOutput(string title, string query, int resultsCount, IOrderedEnumerable<KeyValuePair<string, List<string>>> resultsDict, bool showInDecompiledView, IOrderedEnumerable<string> failedList = null)
{
return ClickableSearchOutput(title, query, resultsCount, resultsDict, showInDecompiledView, failedList);
}

/// <summary>
/// Shows search output with clickable text to the user.
/// </summary>
Expand All @@ -350,6 +364,15 @@ bool AreFilesIdentical(string file1, string file2)
/// <returns>A task that represents the search output.</returns>
Task ClickableSearchOutput(string title, string query, int resultsCount, IDictionary<string, List<string>> resultsDict, bool showInDecompiledView, IEnumerable<string> failedList = null);

/// <summary>
/// Obsolete.
/// </summary>
[Obsolete("Use ClickableSearchOutput instead!")]
sealed Task ClickableTextOutput(string title, string query, int resultsCount, IDictionary<string, List<string>> resultsDict, bool showInDecompiledView, IEnumerable<string> failedList = null)
{
return ClickableSearchOutput(title, query, resultsCount, resultsDict, showInDecompiledView, failedList);
}

/// <summary>
/// Sets <see cref="isFinishedMessageEnabled"/>.
/// </summary>
Expand Down Expand Up @@ -404,19 +427,46 @@ bool AreFilesIdentical(string file1, string file2)
/// </summary>
void IncrementProgress();

/// <summary>
/// Obsolete.
/// </summary>
[Obsolete("Use IncrementProgress instead!")]
sealed void IncProgress()
{
IncrementProgress();
}

/// <summary>
/// Adds a certain amount to the variable holding a progress value in.
/// Used for parallel operations, as it is thread-safe.
/// </summary>
/// <param name="amount">The amount to add.</param>
void AddProgressParallel(int amount);

/// <summary>
/// Obsolete.
/// </summary>
[Obsolete("Use AddProgressParallel instead!")]
sealed void AddProgressP(int amount)
{
AddProgressParallel(amount);
}

/// <summary>
/// Increments the variable holding a progress value by one.
/// Used for parallel operations, as it is thread-safe.
/// </summary>
void IncrementProgressParallel();

/// <summary>
/// Obsolete.
/// </summary>
[Obsolete("Use IncrementProgressParallel instead!")]
sealed void IncProgressP()
{
IncrementProgressParallel();
}

/// <summary>
/// Gets the value of the variable holding a progress value.
/// </summary>
Expand Down Expand Up @@ -453,17 +503,45 @@ bool AreFilesIdentical(string file1, string file2)
/// </summary>
void DisableAllSyncBindings();

/// <summary>
/// Obsolete
/// </summary>
/// <param name="enable"></param>
[Obsolete("Use DisableAllSyncBindings() instead!")]
sealed void SyncBinding(bool enable = false)
{
DisableAllSyncBindings();
}

/// <summary>
/// Starts the task that updates a progress bar in parallel.
/// </summary>
void StartProgressBarUpdater();

/// <summary>
/// Obsolete.
/// </summary>
[Obsolete("Use StartProgressBarUpdater instead!")]
sealed void StartUpdater()
{
StartProgressBarUpdater();
}

/// <summary>
/// Stops the task that updates a progress bar in parallel.
/// </summary>
/// <returns>A task that represents the stopped progress updater.</returns>
Task StopProgressBarUpdater();

/// <summary>
/// Obsolete.
/// </summary>
[Obsolete("Use StopProgressBarUpdater instead!")]
sealed void StopUpdater ()
{
StopProgressBarUpdater();
}

/// <summary>
/// Generates a decompiled code cache to accelerate operations that need to access code often.
/// </summary>
Expand All @@ -486,6 +564,15 @@ bool AreFilesIdentical(string file1, string file2)
/// <returns>The directory selected by the user.</returns>
string PromptChooseDirectory();

/// <summary>
/// Obsolete
/// </summary>
[Obsolete("Use this parameters, as it is not used.")]
sealed string PromptChooseDirectory(string prompt)
{
return PromptChooseDirectory();
}

/// <summary>
/// Used to prompt the user for a file.
/// </summary>
Expand Down

0 comments on commit 8093717

Please sign in to comment.