public static SSTUFieldManipulationData createNew(ConfigNode node, PartModule module) { SSTUFieldManipulationData fieldData; FieldType type; type = (FieldType)Enum.Parse(typeof(FieldType), node.GetStringValue("fieldType", "field"), true); switch (type) { case FieldType.FIELD: fieldData = new SSTUFieldData(node, module); break; case FieldType.EVENT: fieldData = new SSTUEventData(node, module); break; case FieldType.ACTION: fieldData = new SSTUActionData(node, module); break; default: fieldData = new SSTUFieldData(node, module); break; } return(fieldData); }
public static SSTUFieldManipulationData createNew(ConfigNode node, PartModule module) { SSTUFieldManipulationData fieldData; FieldType type; type = (FieldType)Enum.Parse(typeof(FieldType), node.GetStringValue("fieldType", "field"), true); switch (type) { case FieldType.FIELD: fieldData = new SSTUFieldData(node, module); break; case FieldType.EVENT: fieldData = new SSTUEventData(node, module); break; case FieldType.ACTION: fieldData = new SSTUActionData(node, module); break; default: fieldData = new SSTUFieldData(node, module); break; } return fieldData; }