From 16325007d5fc3e80ef86cd3bd06f436f185e679a Mon Sep 17 00:00:00 2001 From: slarticodefast <161409025+slarticodefast@users.noreply.github.com> Date: Sun, 29 Sep 2024 23:37:31 +0200 Subject: [PATCH] Fix mutation system debug assert (#32530) --- Content.Server/Botany/Systems/MutationSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Server/Botany/Systems/MutationSystem.cs b/Content.Server/Botany/Systems/MutationSystem.cs index 07a24d19f6badb..37b68d9475f1a6 100644 --- a/Content.Server/Botany/Systems/MutationSystem.cs +++ b/Content.Server/Botany/Systems/MutationSystem.cs @@ -27,7 +27,7 @@ public void CheckRandomMutations(EntityUid plantHolder, ref SeedData seed, float { foreach (var mutation in _randomMutations.mutations) { - if (Random(mutation.BaseOdds * severity)) + if (Random(Math.Min(mutation.BaseOdds * severity, 1.0f))) { if (mutation.AppliesToPlant) {