Drop required properties syntax
Sometimes, seemingly after random unrelated changes, it might stop compiling with internal compiler error messages about missing features and attributes. .NET Standard 2.1 is not supposed to support any features beyond C# 8.0, while `required` attribute was introduced only in C# 11 or 12, it's hard to tell.
This commit is contained in:
parent
70e45d5ba2
commit
327e606deb
|
@ -932,8 +932,8 @@ namespace MuzikaGromche
|
|||
// Suitable to declare elemnents of SelectableTracksGroup and as a base for standalone selectable tracks.
|
||||
public class CoreAudioTrack : IAudioTrack
|
||||
{
|
||||
public required string Name { get; init; }
|
||||
public required float WindUpTimer { get; init; }
|
||||
public /* required */ string Name { get; init; } = "";
|
||||
public /* required */ float WindUpTimer { get; init; } = 0f;
|
||||
public int Beats { get; init; }
|
||||
|
||||
// Shorthand for four beats
|
||||
|
@ -1006,7 +1006,7 @@ namespace MuzikaGromche
|
|||
// Standalone, top-level, selectable audio track
|
||||
public class SelectableAudioTrack : CoreAudioTrack, ISelectableTrack
|
||||
{
|
||||
public required Language Language { get; init; }
|
||||
public /* required */ Language Language { get; init; }
|
||||
public bool IsExplicit { get; init; } = false;
|
||||
ConfigEntry<int> ISelectableTrack.Weight { get; set; } = null!;
|
||||
|
||||
|
@ -1022,12 +1022,12 @@ namespace MuzikaGromche
|
|||
|
||||
public class SelectableTracksGroup : ISelectableTrack
|
||||
{
|
||||
public required string Name { get; init; }
|
||||
public required Language Language { get; init; }
|
||||
public /* required */ string Name { get; init; } = "";
|
||||
public /* required */ Language Language { get; init; }
|
||||
public bool IsExplicit { get; init; } = false;
|
||||
ConfigEntry<int> ISelectableTrack.Weight { get; set; } = null!;
|
||||
|
||||
public required IAudioTrack[] Tracks;
|
||||
public /* required */ IAudioTrack[] Tracks = [];
|
||||
|
||||
IAudioTrack[] ISelectableTrack.GetTracks() => Tracks;
|
||||
|
||||
|
@ -2393,9 +2393,9 @@ namespace MuzikaGromche
|
|||
|
||||
class State
|
||||
{
|
||||
public required int currentBehaviourStateIndex;
|
||||
public required int previousState;
|
||||
public required float stunNormalizedTimer;
|
||||
public int currentBehaviourStateIndex;
|
||||
public int previousState;
|
||||
public float stunNormalizedTimer;
|
||||
}
|
||||
|
||||
[HarmonyPatch(nameof(JesterAI.Update))]
|
||||
|
|
Loading…
Reference in New Issue