Skip to content
This repository was archived by the owner on Aug 7, 2022. It is now read-only.

Commit

Permalink
Changed GetESP and GetActiveOMODNames from HashSet<T> to IEnumerable<T>
Browse files Browse the repository at this point in the history
  • Loading branch information
erri120 committed Dec 7, 2019
1 parent f35e545 commit e4ce227
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions OMODFramework.Example/ScriptFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public Version OBSEPluginVersion(string path)
return new Version(1,0,0,0);
}

public HashSet<ScriptESP> GetESPs()
public IEnumerable<ScriptESP> GetESPs()
{
return new HashSet<ScriptESP>
{
Expand All @@ -126,7 +126,7 @@ public HashSet<ScriptESP> GetESPs()
};
}

public HashSet<string> GetActiveOMODNames()
public IEnumerable<string> GetActiveOMODNames()
{
throw new NotImplementedException();
}
Expand Down
4 changes: 2 additions & 2 deletions OMODFramework.Test/ScriptFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public Version OBSEPluginVersion(string path)
return new Version(1,0,0,0);
}

public HashSet<ScriptESP> GetESPs()
public IEnumerable<ScriptESP> GetESPs()
{
return new HashSet<ScriptESP>
{
Expand All @@ -144,7 +144,7 @@ public HashSet<ScriptESP> GetESPs()
};
}

public HashSet<string> GetActiveOMODNames()
public IEnumerable<string> GetActiveOMODNames()
{
throw new NotImplementedException();
}
Expand Down
2 changes: 1 addition & 1 deletion OMODFramework/Scripting/DotNetScriptFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ public void SetNewLoadOrder(string[] plugins)
data folder gets overwritten and than OBMM reads all ESPs again to load
the changes... idk
*/
if(plugins.Length != _handler.ScriptFunctions.GetESPs().Count)
if(plugins.Length != _handler.ScriptFunctions.GetESPs().Count())
throw new ScriptingException("SetNewLoadOrder was called with an invalid plugin list!");

plugins.Do(p =>
Expand Down
8 changes: 4 additions & 4 deletions OMODFramework/Scripting/IScriptFunctions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,17 +189,17 @@ List<int> Select(
Version OBSEPluginVersion(string path);

/// <summary>
/// Gets a <see cref="HashSet{T}" /> of all ESPs, see <see cref="ScriptESP" /> for more info, this should
/// Gets a <see cref="IEnumerable{T}" /> of all ESPs, see <see cref="ScriptESP" /> for more info, this should
/// include all ESPs
/// </summary>
/// <returns></returns>
HashSet<ScriptESP> GetESPs();
IEnumerable<ScriptESP> GetESPs();

/// <summary>
/// Gets a <see cref="HashSet{T}" /> with the name of all active OMODs.
/// Gets a <see cref="IEnumerable{T}" /> with the name of all active OMODs.
/// </summary>
/// <returns></returns>
HashSet<string> GetActiveOMODNames();
IEnumerable<string> GetActiveOMODNames();

/// <summary>
/// Use <see cref="File.ReadAllBytes" /> to read the bytes of a file located inside the data folder
Expand Down

0 comments on commit e4ce227

Please sign in to comment.