From: AeonLucid Date: Sun, 25 Oct 2020 01:23:37 +0000 (+0200) Subject: Support latest Among Us beta X-Git-Tag: v1.2.2~93 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=b8d1c6bac544101fefb44852aaa4aaf634f07ff2;p=rhonda%2Fimpostor.git Support latest Among Us beta --- diff --git a/src/Impostor.Api/Innersloth/GameOptionsData.cs b/src/Impostor.Api/Innersloth/GameOptionsData.cs index f58f191..9bb30cd 100644 --- a/src/Impostor.Api/Innersloth/GameOptionsData.cs +++ b/src/Impostor.Api/Innersloth/GameOptionsData.cs @@ -48,6 +48,10 @@ namespace Impostor.Api.Innersloth public bool VisualTasks { get; set; } + public bool AnonymousVotes { get; set; } + + public TaskBarUpdate TaskBarUpdate { get; set; } + public bool IsDefaults { get; set; } public void Serialize(BinaryWriter writer, byte version) @@ -82,6 +86,12 @@ namespace Impostor.Api.Innersloth } if (Version > 3) + { + writer.Write((bool)AnonymousVotes); + writer.Write((byte)TaskBarUpdate); + } + + if (Version > 4) { throw new ImpostorException($"Unknown GameOptionsData version {Version}."); } @@ -126,6 +136,12 @@ namespace Impostor.Api.Innersloth } if (Version > 3) + { + AnonymousVotes = bytes.ReadBoolean(); + TaskBarUpdate = (TaskBarUpdate)bytes.ReadByte(); + } + + if (Version > 4) { throw new ImpostorException($"Unknown GameOptionsData version {Version}."); } diff --git a/src/Impostor.Api/Innersloth/TaskBarUpdate.cs b/src/Impostor.Api/Innersloth/TaskBarUpdate.cs new file mode 100644 index 0000000..f4d7c1f --- /dev/null +++ b/src/Impostor.Api/Innersloth/TaskBarUpdate.cs @@ -0,0 +1,9 @@ +namespace Impostor.Api.Innersloth +{ + public enum TaskBarUpdate : byte + { + Always = 0, + Meetings = 1, + Never = 2 + } +} \ No newline at end of file