Releases: Emik03/wawa
Break stuff to fix stuff
Version 6
Reverts a few breaking changes, which in it itself are breaking changes to the previous version. wawa.Editors
, wawa.Modules
, and wawa.Schemas
are the only assemblies with any changes, public or internal. This library has been recompiled as version 6 just to keep Unity's assembly conflict problems away.
MAJOR
wawa.Modules
:
- Remove the
IEnumerable<T>
overload fromwawa.Modules.ModdedModule.Play
, since it conflicted with theparams
overload which was used far more often. There was consideration to combine the overloads intoparams IEnumerable<T>
thanks to a new C# feature, however this idea was rejected sinceparams
is not recognized by C# 4/6 compilers unfortunately. Backwards compatibility is more important.
wawa.Schemas
:
- Fix
wawa.Schemas.TweaksSetting.*
erroneously swapping the title and description.
PATCH
wawa.Editors
:
- Now installs
wawa.Schemas
when fetching all packages.
[Hotfix] Add wawa.Schemas to download tab
Version 5.0.1
Adds a missing tab from wawa.Editors
. wawa.Editors
is the only assemblies with any changes, public or internal. This library has been recompiled as version 5.0.1 just to keep Unity's assembly conflict problems away.
PATCH
wawa.Editors
:
- Add the missing tab for downloading
wawa.Schemas
.
New library + Rewritten compatibility!
Version 5
This update adds compatibility for KTaNE: Rewritten, a recreation of the game that is made in a later version of Unity. Since this is easily a breaking change for a good deal of them, all libraries have had additional breaking changes applied to them to fix long-standing issues.
MAJOR
General:
wawa.DDL
:
- Change overloads of wawa.DDL.Access.FromGame to allow for KTaNE: Rewritten compatibility.
wawa.IO
:
- Stabilize and clearly document the behavior of the new linker, this includes deprecating the old names for operating systems within directories and instead using the favored
android
,linux
,macos
, andwindows
. - Change
wawa.IO.PathFinder
parameter names to more clearly express purpose.
wawa.Recall
:
- Now depends on
wawa.DDL
to enable KTaNE: Rewritten compatibility.
wawa.DDL
, wawa.IO
, and wawa.Recall
:
- Add full compatibility for KTaNE: Rewritten. If you wish to override the references yourself, such as by making your own Unity project that references
wawa
, take a look here.
General:
- Change all namespaces from
Wawa.*
towawa.*
. This decision is the largest breaking change and has been the subject to discussion ever since Version 3 was released. After talking with a few community members, the verdict is that this is a necessary breaking change to make learningwawa
far simpler. It also conforms to Microsoft's naming convention that names of companies or products should conform to their capitalization.
MINOR
wawa.DDL
:
- New property
wawa.DDL.Access.IsRewritten
to query whether the game is running in a different game environment, either in its editor or in-game. This property is used internally for control flow regarding direct references to the game. - New property
wawa.DDL.Missions.LightsOn
to query whether the lights in the office are currently turned on.
wawa.Modules:
- Add
wawa.Modules.InterpolatedStringHandlerEnumerable
for use with logging. - Add
wawa.Modules.ModdedModule.Log
andwawa.Modules.ModdedModule.LogLower
overloads to allow string interpolation syntax to automatically invokewawa.Modules.ModdedModule.Stringify
. This assumes you are using a C# 9 compiler, which in other words means it unfortunately cannot be compatible within the modkit. - Add
wawa.Modules.ModdedModule.Stringify
to allow custom behavior in serializing values for logging. - Add
wawa.Modules.ModdedModule.MissionSettings
to allow immediate access to overridden mission settings without needing to parse thestring
yourself. The format it is looking for is[Module Name] {"json": "body"}
.
wawa.IO
:
- Add support for loading ARM-targeted binaries.
wawa.Optionals
:
- Add downcast and upcast extension methods
wawa.Optionals.Maybe.As<T>
andwawa.Optionals.Maybe.AsNullable<T>
- Add compatibility for
netstandard2.0
by removing all Unity references.
wawa.Schemas
:
- Brand new library! Provides a simple fluent builder API for building the
TweaksEditorSettings
schema object that Tweaks can use to format your mod settings. Check out its documentation and example here.
wawa.TwitchPlays
:
- Increase accessibility of
wawa.TwitchPlays.Twitch<TMod>.AutoImplementedHelp
to be fullypublic
overprotected
.
PATCH
wawa.Recall
:
- Change
wawa.Recall.StatusLights
to have a backing field ofbyte
overint
. - Micro-optimize fail path for
Expect*
methods in wawa.Recall.Generator to only generate the stack frame it needs and not the full stack trace.
General:
- Use the new .NET 9 Stable SDK which grants improvements in compiler optimizations. All versions from here on out will be using the new SDK when compiling.
- Use the newest version of
Absence.Fody
(2.0.7 at the time of writing this), granting lower binary sizes.
GetUnmanaged singular binary fix
Version 4.7.2
This update fixes a bug in Wawa.IO.PathFinder.GetUnmanaged<T>
that broke when there only existed a single binary in a given library subfolder. wawa.IO
is the only assembly with any changes, public or internal. This library has been recompiled as version 4.7.2 just to keep Unity's assembly conflict problems away.
PATCH
wawa.IO
:
- Fix
Wawa.IO.PathFinder.GetUnmanaged<T>
claiming there was an error when traversing through folders ends up in a directory that only contains a single binary that matches the file name, as well as removing unnecessary overhead involving the attempt of creation of directories that always exist, and the verification of files.
[Hotfix] GetUnmanaged editor support
Version 4.7.1
This update improves the usability experience of wawa.IO
in the editor. wawa.IO
and wawa.TwitchPlays
are the only assemblies with any changes, public or internal. This library has been recompiled as version 4.7.1 just to keep Unity's assembly conflict problems away.
PATCH
wawa.IO
:
- A huge limitation finally got lifted:
Wawa.IO.PathFinder.GetUnmanaged<T>
now fully works in the editor! The previous behavior was to always return no value. - Automatically return no value when this mod has been confirmed to have mod ids conflicting with another. The previous behavior was that the first mod would always be accepted, which could result in the second mod writing from the wrong folder, a potentially dangerous operation!
wawa.TwitchPlays
:
- Fix
Wawa.TwitchPlays.Domains.InstructionCore.Flatten
to no longer dispose the enumerator prematurely, which prevented classes likeUnityWebRequest
from working correctly. This means that the caller has responsibility to dispose of the enumerator themselves, although it was already necessitated, so this is not a breaking change.
Loosen internal assertions further
Version 4.7
This update removes exception-throwing for a number of APIs, attempting to use sane fallbacks. wawa.IO
, wawa.Modules
, and wawa.TwitchPlays
are the only assemblies with any changes, public or internal. This library has been recompiled as version 4.7 just to keep Unity's assembly conflict problems away.
MINOR
wawa.IO
:
- Add optional parameters to
Wawa.IO.PathFinder.AssemblyLog
, more as a byproduct of the way the library requires it. The behavior of this function as such has been changed, with the format explicitly marking the method caller's name and log level for every use of this function. The method no longer guards null, as you are allowed to pass a null message. - All methods in
Wawa.IO.PathFinder
no longer throw. Error or warning messages will be logged as they arrive, and the library makes an attempt to continue execution with a few workarounds and fallbacks.
wawa.Modules
- Add overloads for
Wawa.Modules.ModdedModule.Log
andWawa.Modules.ModdedModule.LogLower
for people who use C# 6's string interpolation feature. This worked prior to Version 4.7, but had unnecessary additional overhead. Wawa.Modules.ModdedModule.Play
and similar no longer throw if you didn't have exactly oneKMAudio
instance. Instead, the error is simply logged, and the method prematurely returns, since this method is strictly side-effect based. Similar assertions exist inWawa.Modules.ModdedModule.Awake
, which also no longer throws.
PATCH
wawa.IO
:
- Remove undocumented requirements that Wawa.IO.PathFinder.GetFile expected the developer to fulfill, which made it an inconsistent API to work with. It should now behave normally.
- Improve logging for
Wawa.IO.PathFinder.GetDirectory
andWawa.IO.PathFinder.GetUnmanaged<T>
. - Micro-optimize mod id collecting to be negligibly faster.
wawa.TwitchPlays
:
- Uses appropriate log levels for editor-only assertions.
- No longer throws when no commands are found, however an error log is still produced.
wawa.IO Editor fix
Version 4.6.2
This update fixes an editor-only bug that caused wawa.IO
to throw a TypeLoadException
. wawa.IO
, wawa.Modules
, and wawa.TwitchPlays
is the only assembly with any changes, public or internal. This library has been recompiled as version 4.6.2 just to keep Unity's assembly conflict problems away.
PATCH
wawa.IO
:
- Fix bug relating to Wawa.IO.PathFinder which caused any function that accessed in-game values to throw when running in the Unity Editor. This did not affect any module in-game.
- Switch to an integer-based hashmap over strings where applicable, causing a negligible micro-optimization.
wawa.Modules
:
- Fix bug relating to Wawa.Modules.Stringifier.Stringify which would throw
[ArgumentException](https://learn.microsoft.com/en-us/dotnet/api/system.argumentexception?view=net-8.0): The type 'System.Void' may not be used as a type argument.
if any type during serialization contained a void pointer (void*
).
wawa.TwitchPlays
:
- Fix inherited members being ignored when reflecting values to grab fields for parsing or methods as commands.
Sequential GetAssets/GetUnmanaged fix
Version 4.6.1
This update fixes a bug to do with loading external assets and libraries. wawa.IO
is the only assembly with any changes, public or internal. This library has been recompiled as version 4.6.1 just to keep Unity's assembly conflict problems away.
PATCH
wawa.IO
:
- Fix bug relating to Wawa.IO.PathFinder.GetAssets and Wawa.IO.PathFinder.GetUnmanaged relating to using the same function twice on the same assembly, but with different type parameters on both. This would cause an unexpected
InvalidCastException
.
Status Light manipulation
Version 4.6
This update adds new APIs for changing the status light or max strikes, faking strikes, and other opt-in checks. All binaries have been recompiled to take advantage of the new compiler optimizations.
MINOR
wawa.DDL
:
- Add
Wawa.DDL.KMBombStrikeExtensions.Detonate
for instant detonation. - Add
Wawa.DDL.KMBombStrikeExtensions.GetMaxStrikes
, andWawa.DDL.KMBombStrikeExtensions.SetMaxStrikes
for getting and setting the strike count until the bomb detonates. - Add optional parameter in
Wawa.DDL.KMBombStrikeExtensions.SetStrikes
to auto-detonate if the strike count exceeds the maximum.
wawa.Recall
- Add
Wawa.DDL.Entity.Change
and its corresponding argument typeWawa.DDL.StatusLights
to allow toggling different status lights. - Add
Wawa.DDL.Entity.FakeStrike
to make a module pretend it struck.
PATCH
wawa.Modules
and wawa.TwitchPlays
:
- Micro-optimize and reuse collections throughout the library when possible.
General:
- Use the new .NET 9 Preview SDK which grants improvements in compiler optimizations. All versions from here on out will be using the new SDK when compiling.
Correctly serialize System.Reflection.Pointer
Version 4.5
This update addresses a problem with the logging serialization. wawa.Modules
is the only assembly with any changes, public or internal. This library has been recompiled as version 4.5 just to keep Unity's assembly conflict problems away.
MINOR
wawa.Modules
:
- Add
Wawa.Modules.Stringifier.ToHexString
, allowing for a proper string representation ofSystem.Reflection.Pointer
. - Use aforementioned method for internal use to properly serialize instances of
System.Reflection.Pointer
withinStringifier.Stringify
and its overload. This changes the return value of the function when serializing said values.