Skip to content

New Lite version + ModuleContainer rewrite

Compare
Choose a tag to compare
@Emik03 Emik03 released this 26 Sep 18:22
· 58 commits to main since this release
d42ebb8

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.