From: js6pak Date: Wed, 15 Dec 2021 13:51:07 +0000 (+0100) Subject: Change RoleOptionsData floats to be bytes as they can't ever be floats anyway X-Git-Tag: v1.7.0~17^2~5 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=6118e6b7b82e884fa35eb85e3a699e4f186d5575;p=rhonda%2Fimpostor.git Change RoleOptionsData floats to be bytes as they can't ever be floats anyway --- diff --git a/src/Impostor.Api/Innersloth/RoleOptionsData.cs b/src/Impostor.Api/Innersloth/RoleOptionsData.cs index 1d07854..3e6d6bf 100644 --- a/src/Impostor.Api/Innersloth/RoleOptionsData.cs +++ b/src/Impostor.Api/Innersloth/RoleOptionsData.cs @@ -9,23 +9,23 @@ namespace Impostor.Api.Innersloth { public bool ShapeshifterLeaveSkin { get; set; } - public float ShapeshifterCooldown { get; set; } = 10f; + public byte ShapeshifterCooldown { get; set; } = 10; - public float ShapeshifterDuration { get; set; } = 30f; + public byte ShapeshifterDuration { get; set; } = 30; - public float ScientistCooldown { get; set; } = 15f; + public byte ScientistCooldown { get; set; } = 15; - public float ScientistBatteryCharge { get; set; } = 5f; + public byte ScientistBatteryCharge { get; set; } = 5; - public float GuardianAngelCooldown { get; set; } = 60f; + public byte GuardianAngelCooldown { get; set; } = 60; public bool ImpostorsCanSeeProtect { get; set; } - public float ProtectionDurationSeconds { get; set; } = 10f; + public byte ProtectionDurationSeconds { get; set; } = 10; - public float EngineerCooldown { get; set; } = 30f; + public byte EngineerCooldown { get; set; } = 30; - public float EngineerInVentMaxTime { get; set; } = 15f; + public byte EngineerInVentMaxTime { get; set; } = 15; public Dictionary RoleRates { get; } = new Dictionary(); @@ -88,14 +88,14 @@ namespace Impostor.Api.Innersloth } writer.Write(ShapeshifterLeaveSkin); - writer.Write((byte)ShapeshifterCooldown); - writer.Write((byte)ShapeshifterDuration); - writer.Write((byte)ScientistCooldown); - writer.Write((byte)GuardianAngelCooldown); - writer.Write((byte)EngineerCooldown); - writer.Write((byte)EngineerInVentMaxTime); - writer.Write((byte)ScientistBatteryCharge); - writer.Write((byte)ProtectionDurationSeconds); + writer.Write(ShapeshifterCooldown); + writer.Write(ShapeshifterDuration); + writer.Write(ScientistCooldown); + writer.Write(GuardianAngelCooldown); + writer.Write(EngineerCooldown); + writer.Write(EngineerInVentMaxTime); + writer.Write(ScientistBatteryCharge); + writer.Write(ProtectionDurationSeconds); writer.Write(ImpostorsCanSeeProtect); } @@ -110,14 +110,14 @@ namespace Impostor.Api.Innersloth } writer.Write(ShapeshifterLeaveSkin); - writer.Write((byte)ShapeshifterCooldown); - writer.Write((byte)ShapeshifterDuration); - writer.Write((byte)ScientistCooldown); - writer.Write((byte)GuardianAngelCooldown); - writer.Write((byte)EngineerCooldown); - writer.Write((byte)EngineerInVentMaxTime); - writer.Write((byte)ScientistBatteryCharge); - writer.Write((byte)ProtectionDurationSeconds); + writer.Write(ShapeshifterCooldown); + writer.Write(ShapeshifterDuration); + writer.Write(ScientistCooldown); + writer.Write(GuardianAngelCooldown); + writer.Write(EngineerCooldown); + writer.Write(EngineerInVentMaxTime); + writer.Write(ScientistBatteryCharge); + writer.Write(ProtectionDurationSeconds); writer.Write(ImpostorsCanSeeProtect); }