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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user