diff --git a/Source/Helpers/Helper.cs b/Source/Helpers/Helper.cs
index 3aa6eb3f..5ba4f2a3 100644
--- a/Source/Helpers/Helper.cs
+++ b/Source/Helpers/Helper.cs
@@ -96,7 +96,7 @@ internal const string
///
/// The item to check the type for.
/// is either , , or .
- public static bool IsIterator(this object item) => item is string or IEnumerable or IEnumerator;
+ public static bool IsIterator(this T item) => item is string or IEnumerable or IEnumerator;
///
/// Determines if the string is null or empty.
@@ -329,7 +329,7 @@ public static long BaseToLong(this string value, string baseChars = Binary)
///
/// The which returns the object you want the name of.
/// The name of the variable, or if it cannot find it, .
- public static string NameOfVariable(this Expression> e)
+ public static string NameOfVariable(this Expression> e)
{
try
{
@@ -405,7 +405,7 @@ public static string LongToBase(this long value, string baseChars = Alphanumeric
/// Whether it should search recursively inside the variable and yield return the elements inside .
/// The characters in-between each element.
/// A string consisting of all values from .
- public static string UnwrapToString(this object item, bool getVariables = false, string delimiter = ", ") => string.Join(delimiter, Unwrap(item, getVariables).Select(o => o.ToString()).ToArray());
+ public static string UnwrapToString(this T item, bool getVariables = false, string delimiter = ", ") => string.Join(delimiter, Unwrap(item, getVariables).Select(o => o.ToString()).ToArray());
///
/// Unwraps any object, whether it be a class, list, tuple, or any other data.
@@ -465,7 +465,7 @@ public static IEnumerable AsEnumerable(this IEnumerator source)
///
/// The item to get all fields and properties.
/// All fields and properties of .
- public static IEnumerable GetAllValues(this object source) => source?.GetType()?.GetFields(Helper.Flags).Select(f => $"\n{f} (Field): {f?.GetValue(source).UnwrapToString()}").Concat(source?.GetType()?.GetProperties(Helper.Flags).Select(p => $"\n{p} (Property): {p?.GetValue(source, null).UnwrapToString()}"));
+ public static IEnumerable GetAllValues(this T source) => source?.GetType()?.GetFields(Flags).Select(f => $"\n{f} (Field): {f?.GetValue(source).UnwrapToString()}").Concat(source?.GetType()?.GetProperties(Flags).Select(p => $"\n{p} (Property): {p?.GetValue(source, null).UnwrapToString()}"));
///
/// Unwraps any of type , which ends up flattening it as a of type .
diff --git a/Source/Instances/BigInteger.cs b/Source/Instances/BigInteger.cs
index 6c759ae7..dd559797 100644
--- a/Source/Instances/BigInteger.cs
+++ b/Source/Instances/BigInteger.cs
@@ -443,7 +443,7 @@ public override int GetHashCode()
/// The minimum value accepted.
/// The maximum value accepted.
/// True if is smaller or equal itself and is greater or equal itself.
- public bool IsInRange(object min, object max) => this >= min && this <= max;
+ public bool IsInRange(T min, T max) => this >= min && this <= max;
///
/// Converts the BigInteger to a .
@@ -493,7 +493,7 @@ public override int GetHashCode()
///
/// The right-hand side operator.
/// Itself mod .
- public BigInteger Modulo(object obj) => ((this % obj) + obj) % obj;
+ public BigInteger Modulo(T obj) => ((this % obj) + obj) % obj;
private enum Operator { Add, Subtract, Multiply, Divide, Modulo }
@@ -691,7 +691,7 @@ private static sbyte[] Multiplication(sbyte[] left, sbyte[] right)
private static sbyte[] InvertConditional(in sbyte[] vs, bool b) => b ? vs.Select(s => (sbyte)(-1 * s)).ToArray() : vs;
- private sbyte[] ObjectToBytes(in object obj)
+ private sbyte[] ObjectToBytes(in T obj)
{
obj.NullCheck("You cannot construct a BigInteger out of null.");
diff --git a/Source/MonoBehaviours/ModuleScript.cs b/Source/MonoBehaviours/ModuleScript.cs
index b6474ac6..5bf1c0b0 100644
--- a/Source/MonoBehaviours/ModuleScript.cs
+++ b/Source/MonoBehaviours/ModuleScript.cs
@@ -105,7 +105,6 @@ protected virtual void OnTimerTick() { }
///
protected void Awake()
{
- Debug.Log("test" + ModBundleName);
_setActive = () =>
{
if (Get(allowNull: true) is KMBombInfo bombInfo)
@@ -115,7 +114,7 @@ protected void Awake()
};
_components = new Dictionary() { { typeof(ModuleScript), new[] { this } } };
-
+
ModBundleName.NullOrEmptyCheck("The public field \"ModBundleName\" is empty! This means that when compiled it won't be able to run! Please set this field to your Mod ID located at Keep Talking ModKit -> Configure Mod. Refer to this link for more details: https://github.com/Emik03/KeepCoding/wiki/Chapter-2.1:-ModuleScript#version-string");
Module = new ModuleContainer(Get(), Get());
@@ -174,7 +173,7 @@ public void Dump(bool getVariables = false)
{
int index = 0;
- string Format(string name, object value) => Helper.VariableTemplate.Form(index++, name, value?.GetType().ToString() ?? Helper.Null, string.Join(", ", value.Unwrap(getVariables).Select(o => o.ToString()).ToArray()));
+ string Format(string name, T value) => Helper.VariableTemplate.Form(index++, name, value?.GetType().ToString() ?? Helper.Null, string.Join(", ", value.Unwrap(getVariables).Select(o => o.ToString()).ToArray()));
var type = GetType();
var values = new List