diff --git a/Airlock/Program.cs b/Airlock/Program.cs index 2ad01d4..2e34dc1 100644 --- a/Airlock/Program.cs +++ b/Airlock/Program.cs @@ -67,13 +67,11 @@ namespace IngameScript for (int i = 0; i < _jobs.Count; i++) { IEnumerator job = _jobs[i]; - if (!job.MoveNext()) - { - job.Dispose(); - _jobs.Remove(job); - i--; - _console.Print("Job Removed From Queue."); - } + if (job.MoveNext()) continue; + job.Dispose(); + _jobs.Remove(job); + i--; + _console.Print("Job Removed From Queue."); } if (_jobs.Count == 0) Runtime.UpdateFrequency = UpdateFrequency.None; diff --git a/MechanicalDoor/Program.cs b/MechanicalDoor/Program.cs index b30785c..b4ba0fe 100644 --- a/MechanicalDoor/Program.cs +++ b/MechanicalDoor/Program.cs @@ -37,7 +37,7 @@ namespace IngameScript // Add the part; the Door object handles typing and sequencing. ISequenceable wrapped = SequenceableFactory.MakeSequenceable(block, _ini, "mechDoor"); - if (!(block is IMyShipMergeBlock)) wrapped.Step = 1; + if (!(block is IMyShipMergeBlock)) wrapped.Step = 1; // TODO: actually support merge blocks here if (wrapped == null) { _console.Print($"Tried to add incompatible block '{block.CustomName}'"); continue; } _doors[doorName].AddBlock(wrapped); }