Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Emik03/KeepCoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Emik03 committed Oct 11, 2021
2 parents 25bbadd + e5ed763 commit 6fc9ba2
Show file tree
Hide file tree
Showing 63 changed files with 317 additions and 346 deletions.
15 changes: 0 additions & 15 deletions Documentation/External.GetIgnoredModules.fQIMyTPUrX1CKZNUKD+Nrw.md

This file was deleted.

19 changes: 0 additions & 19 deletions Documentation/External.GetRuleSeedId.+q.l1jLgbkfehrtZVZG.Zg.md

This file was deleted.

14 changes: 0 additions & 14 deletions Documentation/External.md

This file was deleted.

17 changes: 17 additions & 0 deletions Documentation/Helper.GetModules.iexB5RflxaZB6izRcfY9VQ.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#### [KeepCoding](index.md 'index')
### [KeepCoding](KeepCoding.md 'KeepCoding').[Helper](Helper.md 'KeepCoding.Helper')
## Helper.GetModules(KMBomb) Method
Allows you to get the collection of [ModuleContainer](ModuleContainer.md 'KeepCoding.ModuleContainer') from a [KMBomb](https://docs.microsoft.com/en-us/dotnet/api/KMBomb 'KMBomb').
```csharp
public static System.Collections.ObjectModel.ReadOnlyCollection<KeepCoding.ModuleContainer> GetModules(global::KMBomb bomb);
```
#### Parameters
<a name='KeepCoding.Helper.GetModules(global..KMBomb).bomb'></a>
`bomb` [KMBomb](https://docs.microsoft.com/en-us/dotnet/api/KMBomb 'KMBomb')
The instance of [KMBomb](https://docs.microsoft.com/en-us/dotnet/api/KMBomb 'KMBomb') that has modules.

#### Returns
[System.Collections.ObjectModel.ReadOnlyCollection&lt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ReadOnlyCollection-1 'System.Collections.ObjectModel.ReadOnlyCollection`1')[ModuleContainer](ModuleContainer.md 'KeepCoding.ModuleContainer')[&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.ObjectModel.ReadOnlyCollection-1 'System.Collections.ObjectModel.ReadOnlyCollection`1')
All modules within [bomb](Helper.GetModules.iexB5RflxaZB6izRcfY9VQ.md#KeepCoding.Helper.GetModules(global..KMBomb).bomb 'KeepCoding.Helper.GetModules(global::KMBomb).bomb').
### Remarks
This collection also includes vanilla modules, including [Empty](ComponentPool.ComponentTypeEnum.md#KeepCoding.ComponentPool.ComponentTypeEnum.Empty 'KeepCoding.ComponentPool.ComponentTypeEnum.Empty') components and [Timer](ComponentPool.ComponentTypeEnum.md#KeepCoding.ComponentPool.ComponentTypeEnum.Timer 'KeepCoding.ComponentPool.ComponentTypeEnum.Timer'). You can filter the collection with [IsVanilla](ModuleContainer.IsVanilla.md 'KeepCoding.ModuleContainer.IsVanilla'), [IsModded](ModuleContainer.IsModded.md 'KeepCoding.ModuleContainer.IsModded'), [IsSolvable](ModuleContainer.IsSolvable.md 'KeepCoding.ModuleContainer.IsSolvable'), or [IsNeedy](ModuleContainer.IsNeedy.md 'KeepCoding.ModuleContainer.IsNeedy'), [IsEmptyOrTimer](ModuleContainer.IsEmptyOrTimer.md 'KeepCoding.ModuleContainer.IsEmptyOrTimer'), or [IsModule](ModuleContainer.IsModule.md 'KeepCoding.ModuleContainer.IsModule').
1 change: 0 additions & 1 deletion Documentation/KeepCoding.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
| [CustomComparer&lt;T&gt;](CustomComparer.T..md 'KeepCoding.CustomComparer&lt;T&gt;') | Encapsulates an [System.Collections.Generic.IComparer&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IComparer-1 'System.Collections.Generic.IComparer`1') that uses a comparison function provided as a delegate.<br/> |
| [CustomEqualityComparer&lt;T&gt;](CustomEqualityComparer.T..md 'KeepCoding.CustomEqualityComparer&lt;T&gt;') | Encapsulates an [System.Collections.Generic.IEqualityComparer&lt;&gt;](https://docs.microsoft.com/en-us/dotnet/api/System.Collections.Generic.IEqualityComparer-1 'System.Collections.Generic.IEqualityComparer`1') that uses an equality comparison function provided as a delegate.<br/> |
| [EventHelper](EventHelper.md 'KeepCoding.EventHelper') | KMFramework extension methods that makes it easier to assign multiple events to a variable in one statement.<br/> |
| [External](External.md 'KeepCoding.External') | Provides methods to retrieve information from other external mods.<br/> |
| [Game](Game.md 'KeepCoding.Game') | Allows access into the game's internal code. <br/> |
| [Game.KTInputManager](Game.KTInputManager.md 'KeepCoding.Game.KTInputManager') | Allows access relating to how the game is being interacted with.<br/> |
| [Game.MasterAudio](Game.MasterAudio.md 'KeepCoding.Game.MasterAudio') | Allows access relating to the game's main master channel for audio.<br/> |
Expand Down
10 changes: 10 additions & 0 deletions Documentation/ModuleContainer.GetIgnoredModules().md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#### [KeepCoding](index.md 'index')
### [KeepCoding](KeepCoding.md 'KeepCoding').[ModuleContainer](ModuleContainer.md 'KeepCoding.ModuleContainer')
## ModuleContainer.GetIgnoredModules() Method
Retrieves the ignore list from the Boss Module Manager mod used primarily by boss modules.
```csharp
public string[] GetIgnoredModules();
```
#### Returns
[System.String](https://docs.microsoft.com/en-us/dotnet/api/System.String 'System.String')[[]](https://docs.microsoft.com/en-us/dotnet/api/System.Array 'System.Array')
If successful, the boss module's ignore list, otherwise a new empty string array.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#### [KeepCoding](index.md 'index')
### [KeepCoding](KeepCoding.md 'KeepCoding').[ModuleContainer](ModuleContainer.md 'KeepCoding.ModuleContainer')
## ModuleContainer.GetRuleSeedId(int) Method
Gets the rule seed number, or a default value.
```csharp
public int GetRuleSeedId(int editorValue);
```
#### Parameters
<a name='KeepCoding.ModuleContainer.GetRuleSeedId(int).editorValue'></a>
`editorValue` [System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32')
The value to [return](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/return 'https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/return') if played on the Unity Editor.

#### Returns
[System.Int32](https://docs.microsoft.com/en-us/dotnet/api/System.Int32 'System.Int32')
If successful, the rule seed's number that is used as the seed in [MonoRandom](MonoRandom.md 'KeepCoding.MonoRandom'). The default value is 1, or [editorValue](ModuleContainer.GetRuleSeedId.5gJE4GImOnEI1ZNXJh2kOA.md#KeepCoding.ModuleContainer.GetRuleSeedId(int).editorValue 'KeepCoding.ModuleContainer.GetRuleSeedId(int).editorValue') if played in the Unity Editor.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion Source/Assembly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
using System.Reflection;

[assembly: AssemblyDescription("KeepCoding is a C# class library by Emik (https://github.com/Emik03) meant to help speed up the process of scripting Keep Talking and Nobody Explodes modules by giving better alternatives to common commands, and automating things universal to module-creation. (such as moduleIds, or logging)")]
[assembly: AssemblyVersion("12.0.1")]
[assembly: AssemblyVersion("13")]
[assembly: CLSCompliant(true)]
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
#if !LITE
using System;
using System.Collections.Generic;

#if !LITE
namespace KeepCoding
{
/// <summary>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private static bool AssertNetwork(UnityWebRequest web, string message)

private static IEnumerator GetLatest()
{
using UnityWebRequest latest = PathManager.LatestGitHub;
UnityWebRequest latest = PathManager.LatestGitHub;

yield return latest.SendWebRequest();

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ namespace KeepCoding
/// </summary>
public static class EventHelper
{
#if !LITE
/// <summary>
/// Assigns events specified into <paramref name="bombInfo"/>. Reassigning them will replace their values.
/// </summary>
Expand Down Expand Up @@ -47,6 +48,7 @@ public static KMBombInfo Assign(this KMBombInfo bombInfo, Action onBombExploded
/// <param name="onPass">Called when the module is solved.</param>
/// <param name="onStrike">Called when the module strikes.</param>
[CLSCompliant(false)]
[Obsolete("Use ModuleScript's Assign method for your own module, or ModuleContainer's Assign method for other modules instead.")]
public static KMBombModule Assign(this KMBombModule bombModule, Action onActivate = null, Action onPass = null, Action onStrike = null)
{
AssertDefault(bombModule);
Expand Down Expand Up @@ -95,6 +97,7 @@ public static KMGameInfo Assign(this KMGameInfo gameInfo, Action<State> onStateC
/// <param name="onStrike">Called when the needy strikes.</param>
/// <param name="onTimerExpired">Called when the timer runs out of time.</param>
[CLSCompliant(false)]
[Obsolete("Use ModuleScript's Assign method for your own module, or ModuleContainer's Assign method for other modules instead.")]
public static KMNeedyModule Assign(this KMNeedyModule needyModule, Action onActivate = null, Action onNeedyActivation = null, Action onNeedyDeactivation = null, Action onPass = null, Action onStrike = null, Action onTimerExpired = null)
{
AssertDefault(needyModule);
Expand All @@ -108,6 +111,7 @@ public static KMNeedyModule Assign(this KMNeedyModule needyModule, Action onActi

return needyModule;
}
#endif

/// <summary>
/// Assigns events specified into <paramref name="selectable"/>. Reassigning them will replace their values.
Expand Down
Loading

0 comments on commit 6fc9ba2

Please sign in to comment.