Skip to content

Releases: Emik03/KeepCoding

Fix Mono crash

31 Mar 19:27
Compare
Choose a tag to compare

This is NOT an April Fools update. It just happened to be this way.

I wasn't expecting to be making another release, however as many modules depend on this library, I have decided to fix a long-standing issue so that you aren't required to rewrite code. For this repository's future, I will continue to fix bugs. However, new modules should use wawa still, as this API is completely frozen. I will not accept any feature or enhancement here.

[Hotfix] Fixed severe NullOrEmptyCheck error

13 Oct 20:03
Compare
Choose a tag to compare

[Hotfix] Fixed uploaded incorrect version of KeepCoding

13 Oct 19:09
Compare
Choose a tag to compare
Turns out I somehow uploaded an experimental build of KeepCoding that caused many problems. Sorry about that!

PATCH

Changes

Fixes

  • Uploaded correct build of KeepCoding.

Marking deprecated methods as Obsolete

11 Oct 23:42
9da90d8
Compare
Choose a tag to compare

MAJOR

Deprecated code

  • Marked some methods as Obsolete, particularly in Helper and KeyHelper. This library will from now on be fully backwards-compatible, that a module made in a previous version will work identically/better in the future. This decision isn't necessarily final and may change in the future, but is my intended vision of KeepCoding going forward. KeepCodingLite will continue to remove deprecated methods and as such continue to introduce breaking changes.

Removals

  • Removed External class, moving its functionality in ModuleContainer and Helper. This changes nothing unless you are using those methods directly as oppose to indirectly from ModuleScript.
  • Removed Unity Message interfaces in KeepCodingLite.

MINOR

Additions

  • Added OnException in ModuleScript.

Improvements

  • Improved ReflectionScript's inspector significantly.

PATCH

Improvements

  • Correctly disposed local variables in a few Helper methods.

Prevented ModConfig from crashing in Editor

03 Oct 19:29
Compare
Choose a tag to compare

Fixed TPScript + Changed Helper.Flatten except argument

27 Sep 20:53
Compare
Choose a tag to compare

Fixed TPScript's string-building methods

27 Sep 16:14
Compare
Choose a tag to compare
11.0.1

Assembly: Version bump

New Lite version + ModuleContainer rewrite

26 Sep 18:22
d42ebb8
Compare
Choose a tag to compare

MAJOR

ModuleContainer rewrite

Additions

  • Added External class which includes GetIgnoredModules() and GetRuleSeedId().
  • Added KeepCodingLite, which removes a lot of code already filled by other libraries, or isn't needed with the latest versions of C#.
  • Added ModuleEvent class as part of ModuleContainer.
  • Added Record and StrictRecord class.
  • Added tuple sizes 5 through 9.

Changes

  • Changed ModuleScript virtual methods to include vanilla modules.
  • Changed ModuleScript.Modules to the type ReadOnlyCollection<ModuleContainer> from ModuleContainer[].
  • Changed ModuleScript.Sounds to the type List<Sound> from Sound[], increasing performance.
  • Changed return values of TPScript's IEnumerator methods to IEnumerable<T>. They will still work like normal.

Renames

  • Renamed EventHelper.StopSound() to EventHelper.StopSounds().
  • Renamed TupleBase to Tuple.

Removals

  • Removed ArrayHelper.ForEach() due to conflicts.
  • Removed ModuleScript.GetIgnoredModules(), which now exists in External.

MINOR

Additions

  • Added ability to yield return IEnumerable correctly in TPScript.
  • Added and implemented Unity MonoBehaviour Message interfaces, IAwake, IFixedUpdate, ILateUpdate, IReset, IStart, and IUpdate.
  • Added HashCode polyfill class.
  • Added Helper.Assert() which throws an exception if the given condition is false.
  • Added ImmutableException for exceptions relating to the transmutation of immutable objects.
  • Added ModuleContainer.Append() and ModuleScript.Append() which append events instead of overriding them.
  • Added ModuleScript.ModulesOfBomb() which allows you to get all the modules of a given bomb and cache it automatically.
  • Added module-grab caching which significantly increases the startup performance.

PATCH

Fixes

  • Fixed Helper.ImplementsMethod to work correctly.
  • Fixed TP solver buttons being runnable outside of play mode.

Improvements

  • Improved performance of Helper.GetValues().
  • Improved performance of Helper.ToNumber().
  • Significant performance improvements to ModuleScript's initialization as a whole.

Mutable AudioScript._isSFX

07 Sep 00:13
8876ee5
Compare
Choose a tag to compare
  • Added the property IsSFX in AudioScript to get/set the value of _isSFX, which is a serialized private field normally only settable in the Unity Inspector.

  • Fixed typo in one of ClipMax's arguments in UtilityHelper.

Added ModConfig and MonoRandom

04 Sep 17:56
Compare
Choose a tag to compare

MAJOR

Additions

  • Added ModConfig class.
  • Added MonoRandom class.

Changes

  • Changed AudioScript to be abstract rather than sealed, for more information on this change, look at Setting up AudioScript.
  • Changed ColorblindInfo constructor to disallow moduleId to be null.
  • Changed library to be mostly CLS-Compliant, and added attributes accordingly. Theoretically, this library should be good to go for other languages like Visual Basic.
  • Changed ModuleScript.IsVR to only check for ControlType.Motion because this is the only one that changes the behaviour of KMSelectables.

Removals

  • Removed For overloads. Now it only has 1 definition which iterates until it reaches the number passed in.

MINOR

Additions

  • Added AudioScript.OnAwake() and AudioScript.OnUpdate() for consistency.
  • Added Helper.Rev<T>() overload to partially reverse a list.
  • Added Helper.Range<T>() overload which allows you to generate numbers 0-x without specifying 0.
  • Added Helper.Repeat<T>() overload which allows you to pass in a method instead of a variable. This allows you to re-evaluate a value as oppose to evaluating it once and cloning it for the entire iterator.
  • Added ILog to ColorblindInfo.
  • Added KeyHelper.AsStruct<T>() which allows you to apply an as operator on a nullable struct.
  • Added KeyHelper.Catch<T>() and KeyHelper.If<T>(), and KeyHelper.Using<T>() overloads.
  • Added KeyHelper.Conditional<T>(), KeyHelper.Cast<T>(), KeyHelper.Default<T>(), KeyHelper.Is<T>(), KeyHelper.New<T>(), KeyHelper.Or<T>(), and KeyHelper.TypeOf<T>().
  • Added many KeyHelper.ForEach overloads, which will now return itself instead of IEnumerable<T>, also allowing you to pass in indexes, and separate key-value pairs into 2 variables for anything inheriting IDictionary.
  • Added ModuleScript.RuleSeed and ModuleScript.GetRuleSeedId().
  • Added readonly keyword to Number and QuotientRemainder structs.

PATCH

Additions

  • Added KeyHelper.WorkBase deconstructor to abort the thread.

Changes

  • Changed ColorblindInfo to inherit ModConfig.
  • Changed return value of Assign to be the iterator itself.

Fixes

  • Fixed Game.Mission.GeneratorSetting from casting the incorrect type.
  • Fixed PathManager.LoadAssets<T>() returning incorrect values.