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