Fix botany bugs (#27210)

* Fixed bug with missing gas not getting reset

* Fix bug with MutateInt not using min/max in prob calculation

* Add divison by zero check

* Fix styling
This commit is contained in:
Crotalus
2024-08-18 03:05:26 +02:00
committed by GitHub
parent ad4d36f34f
commit 9c9bfda4d2
2 changed files with 21 additions and 4 deletions

View File

@@ -522,10 +522,9 @@ public sealed class PlantHolderSystem : EntitySystem
var environment = _atmosphere.GetContainingMixture(uid, true, true) ?? GasMixture.SpaceGas;
component.MissingGas = 0;
if (component.Seed.ConsumeGasses.Count > 0)
{
component.MissingGas = 0;
foreach (var (gas, amount) in component.Seed.ConsumeGasses)
{
if (environment.GetMoles(gas) < amount)