]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix hybridization seedless probability (#25084)
authorKevin Zheng <kevinz5000@gmail.com>
Sat, 10 Feb 2024 01:21:48 +0000 (17:21 -0800)
committerGitHub <noreply@github.com>
Sat, 10 Feb 2024 01:21:48 +0000 (12:21 +1100)
Fix comparison

Hybrids (different plants being crossed) are supposed to have a high
chance of becoming seedless to balance overpowered plants.

However, a logic error in the comparison gave seedless to plants when
they were from the same seed (not hybrids) rather than the other way
around.

Reported by:    @genderGeometries

Content.Server/Botany/Systems/MutationSystem.cs

index cfa944a221a62bfe165c2d7c3f5c66138a08c3f0..c7ce5d47efa45b0b16919e5563b505609030c64f 100644 (file)
@@ -131,7 +131,7 @@ public sealed class MutationSystem : EntitySystem
 
         // Hybrids have a high chance of being seedless. Balances very
         // effective hybrid crossings.
-        if (a.Name == result.Name && Random(0.7f))
+        if (a.Name != result.Name && Random(0.7f))
         {
             result.Seedless = true;
         }