]> git.deb.at Git - rhonda/impostor.git/commitdiff
Change RoleOptionsData floats to be bytes as they can't ever be floats anyway
authorjs6pak <kubastaron@hotmail.com>
Wed, 15 Dec 2021 13:51:07 +0000 (14:51 +0100)
committerjs6pak <kubastaron@hotmail.com>
Wed, 15 Dec 2021 13:51:07 +0000 (14:51 +0100)
src/Impostor.Api/Innersloth/RoleOptionsData.cs

index 1d07854e6338b4b2e3c19c487ca8da24c419c221..3e6d6bfc21003e5e22550007da95a7d88eba0da7 100644 (file)
@@ -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<RoleTypes, RoleRate> RoleRates { get; } = new Dictionary<RoleTypes, RoleRate>();
 
@@ -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);
         }