// I hate Factories, but when the shoe fits... using Sandbox.ModAPI.Ingame; using SpaceEngineers.Game.ModAPI.Ingame; using VRage.Game.ModAPI.Ingame.Utilities; namespace IngameScript { partial class Program { public class SequenceableFactory { public static ISequenceable MakeSequenceable( IMyTerminalBlock block, MyIni ini, string sectionName = "sequence") { if (block is IMyMotorStator) { return new SequenceableRotor(block as IMyMotorStator, ini, sectionName); } if (block is IMyPistonBase) { // return new SequenceablePiston(block as IMyPistonBase, step); } if (block is IMyShipMergeBlock) { // return new SequenceableMergeBlock(block as IMyShipMergeBlock, step); } return null; } } } }