Releases: Emik03/KeepCoding
Releases · Emik03/KeepCoding
Added strong name key
- Added strong name key. This means that multiple versions of this library can be loaded even if they have the same namespace name.
- Fixed indexing into a tuple causing an out of range exception if the last element wasn't chosen.
- Renamed namespace back to
KeepCoding
.
Added IEquatable interfaces to data types
- Added
IEquatable
interface toTuple
,ModuleContainer
, andSound
. - Added
Length
andUpperBound
toTuple
. - Added
sealed
modifier toModInfo
. - Changed
Tuple
indexing to use bytes.
Added Game class
- Added
Game
class, wrappingPlayerSettings
in it. If you usePlayerSettings
, add a prefix "Game." to each instance. This class will be for every instance where the library needs to access the game's library directly. - Added is empty check to
Version
inModuleScript
. - Added
TypeHelper
class, takingHelper's
"To" methods. - Changed PathManager constants to be inaccessible.
- Changed parameter "copy local" to be disabled, making compiling the library from its source faster.
- Changed recursive algorithm inside
Unwrap()
to be an overload ofUnwrap()
, allowing you to pass in anIEnumerable
directly instead of wrapping theIEnumerable
as an object and using pattern matching to reobtain it. - Fixed bug where
DynamicAudio
'sFade()
would always mute when it ends. - Renamed extension method
Backwards()
method toRev()
. - Renamed generic types in
Work
to be clearer. - Renamed extension method
ToIEnumerable()
toAsEnumerable()
.
Added destructoring tuple method
- Added
Destruct()
toTuple
, allowing you to extract each index from the tuple class. - Moved
EventHelper
Assign
'soverrideBoolean
to the first argument. - Renamed
EventHelper
Assign
'soverrideBoolean
tooverrideReturn
. - Renamed
Helper
'sMutate
toApply
. - Renamed
ModuleScript
'sIsStrike
toHasStruck
.
Renamed project to KeepCoding
- Added an error log if your library is out of date, only from the editor.
- Added explicit casting from
DynamicAudio
toAudioSource
. - Added explicit operators from
ModuleContainer
to eitherKMBombModule
orKMNeedyModule
. - Added implicit operators from
KMBombModule
andKMNeedyModule
toModuleContainer
. - Added
KMAudioRef
extension methods to stop an array of sounds. - Added
LoadVideoClips()
inPathManager
- Added
loop
argument toPlaySound()
. - Added more null checks and detailed exceptions, check the XML documentation for more details.
- Added
Mutate<TInput, TOutput>()
, which can mutate any single item to anything else. - Added new
Sound
class, which encapsulates a sound (in-game or custom) and can attach it to aKMAudioRef
. - Added
NullCheck<T>
, a fast way of evaluating and throwing a NullReference- or NullIteratorException if something's an error. - Added
Sounds
property inModuleScript
which encapsulates every sound played fromPlaySound()
. - Added
Values
dictionary inModInfo
which retrieves all values in the form of a dictionary. - Changed ModInfo's properties to hide the setter.
- Changed
PlaySound()
to returnSound
arrays. - Changed private constants from PathManager to public.
- Renamed library and namespace from
KeepCodingAndNobodyExplodes
toKeepCoding
.
Added IsLastInstantiated
- Added
IsLastInstantiated
toModuleScript
, allowing modules to determine if they are currently the last time that the module has been duplicated by the game. - Removed unnecessary logging from
DynamicAudio
when a sound is played using a string.
Added advanced audio handler
- Added
DynamicAudio
class, which allows you to use Unity'sAudioSource
datatype without worrying about volume relativity from the game. - Added
PlayerSettings
class, which can grant you access to internal settings. - Added
For<T>()
inHelper
, allowing you to do an in-line iteration whilst including the index. - Added
Flatten()
inHelper
, allowing you to truncate any nested arrays into one long array. - Added
HexToColor()
inStructHelper
allowing you to convert any hexadecimal code into aColor32
struct. - Fixed
GetAllValues()
fromHelper
so that properties and fields' values are correctly unwrapped. - Fixed
Replace()
fromStructHelper
not allowing null values. - Changed
Tuple<T1, T2...>
to inherit from tuples 1 smaller than itself, allowing you to cast or truncate the tuple.
Changed Form method
- Added
Slice<T>()
, which returns a slice or subarray of anIEnumerable<T>
. - Changed
Form()
to automatically callUnwrapToString()
for each index.
Removed reflection to the game itself
- Added
ModInfo
class, which is meant for deserializing modInfo.json files. - Added
Helper.FirstValue()
andHelper.LastValue()
which returns the first non-null value from an anonymous function. - Added
Helper.GetUpperBound()
andHelper.IsNullOrEmpty()
forIEnumerable<T>
type. - Added null checks to
Helper.Backwards<T>()
,Helper.Call<T>()
, andHelper.Replace<T>()
- Added empty/null check for
ModBundleName
with instructions on how to set it up. - Changed exception from
Version
to be clearer and give instructions. - Changed
ToOrdinal()
to be compatible with negative numbers. - Changed caching system in
PathManager
to accept objects instead of strings. - Renamed
Helper.ThrowIfNullOrEmpty()
toHelper.AssertNotNullOrEmpty()
- Replaced
PathManager.GetModInfoVersion()
andPathManager.GetModInfoPath()
withPathManager.GetModInfo()
Fixed formatted filename
1.0.3-beta Fixed formatted filename