Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMLHelper 2.10.1 #230

Merged
merged 26 commits into from
Jul 6, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
43ec7e3
Added Quaternion and Vector3 converters
Metious Jul 5, 2021
0497509
added another null check
Metious Jul 5, 2021
c619075
added a JsonConstructor + custom Equality check
Metious Jul 5, 2021
31321fa
overrode GetHashCode for C# to shut up
Metious Jul 5, 2021
87498fa
use the new converters
Metious Jul 5, 2021
ca7018a
made the new converters public
Metious Jul 5, 2021
feeb60a
Fix issue with the `JsonConstructor` implementation.
toebeann Jul 6, 2021
d5731a6
Revert the added `null conditional` operator here, as it seems superf…
toebeann Jul 6, 2021
e34713f
Prefer `record` over `struct` for the JSON data types.
toebeann Jul 6, 2021
a294840
Prefer the generic form of `JsonSerializer.Deserialize<T>`
toebeann Jul 6, 2021
ec6fad8
Fix property naming rule violations.
toebeann Jul 6, 2021
7e16781
Implement and exploit explicit cast operations between `Quaternion`<-…
toebeann Jul 6, 2021
290ab6a
Implement a suitable `GetHashCode()` algorithm.
toebeann Jul 6, 2021
68f455d
Added `spawnPosition` property to the Equality comparison as it appea…
toebeann Jul 6, 2021
eebee4e
Version bump for hotfix build
toebeann Jul 6, 2021
10e489b
`Oculus.Newtonsoft.Json` namespace is only applicable to the `SN.STAB…
toebeann Jul 6, 2021
baa7a47
Version bump for hotfix build
toebeann Jul 6, 2021
5555948
Slightly better-optimized `GetHashCode` implementation.
toebeann Jul 6, 2021
60dd1b6
Implement `IEquatable<SpawnInfo>` rather than overriding `Equals(obje…
toebeann Jul 6, 2021
b110861
Simplified constructor overloads, prefer switch expressions over tern…
toebeann Jul 6, 2021
7267bc4
Version bump for CoordinatedSpawnsHotfix build
toebeann Jul 6, 2021
96cdaa3
Better `techType` comparison for determining `spawnType`.
toebeann Jul 6, 2021
ec77573
Redesigned `SpawnInfo` as a `struct`, so that value-based equality is…
toebeann Jul 6, 2021
b9802ce
Version bump for hotfix build
toebeann Jul 6, 2021
670610d
Merge pull request #229 from Metious/CoordinatedSpawnsHotfix
toebeann Jul 6, 2021
aff4368
Version bump for release
toebeann Jul 6, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix property naming rule violations.
  • Loading branch information
toebeann committed Jul 6, 2021
commit ec6fad8518cac3db65a9a47f53750c61dcd14207
4 changes: 2 additions & 2 deletions SMLHelper/Json/Converters/QuaternionConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
{
var q = serializer.Deserialize<QuaternionJson>(reader);

return new Quaternion(q.x, q.y, q.z, q.w);
return new Quaternion(q.X, q.Y, q.X, q.W);
}
}

internal record QuaternionJson(float x, float y, float z, float w);
internal record QuaternionJson(float X, float Y, float Z, float W);
}
4 changes: 2 additions & 2 deletions SMLHelper/Json/Converters/Vector3Converter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist
{
var v = serializer.Deserialize<Vector3Json>(reader);

return new Vector3(v.x, v.y, v.z);
return new Vector3(v.X, v.Y, v.Z);
}
}

internal record Vector3Json(float x, float y, float z);
internal record Vector3Json(float X, float Y, float Z);
}