Esempio n. 1
0
 public EngineMount(ConfigNode node)
 {
     name = node.GetStringValue("name");
     layoutNames = node.GetValues("layoutName");
     defaultDiameter = node.GetFloatValue("size", defaultDiameter);
     minDiameter = node.GetFloatValue("minSize", minDiameter);
     maxDiameter = node.GetFloatValue("maxSize", maxDiameter);
     engineSpacing = node.GetFloatValue("engineSpacing", engineSpacing);
     canAdjustSize = node.GetBoolValue("canAdjustSize", canAdjustSize);
     rotateEngineModels = node.GetBoolValues("rotateEngines");
     mountDefinition = SSTUEngineMountDefinition.getMountDefinition(name);
 }
Esempio n. 2
0
 public static void loadMap()
 {
     if (mapLoaded) { return; }
     mountMap.Clear();
     ConfigNode[] mountNodes = GameDatabase.Instance.GetConfigNodes("SSTU_ENGINEMOUNT");
     SSTUEngineMountDefinition mount;
     foreach (ConfigNode mountNode in mountNodes)
     {
         mount = new SSTUEngineMountDefinition(mountNode);
         mountMap.Add(mount.mountName, mount);
     }
 }
Esempio n. 3
0
 public MountModelData(ConfigNode node, bool isNose) : base(node)
 {
     mountDefinition = SSTUEngineMountDefinition.getMountDefinition(name);
     modelName = mountDefinition.modelName;
     height = mountDefinition.height;
     volume = mountDefinition.volume;
     diameter = mountDefinition.defaultDiameter;
     verticalOffset = mountDefinition.verticalOffset;
     invertModel = mountDefinition.invertModel;
     mass = mountDefinition.mountMass;
     nose = isNose;
     if (nose) { invertModel = !invertModel; }
     foreach (AttachNodeData data in mountDefinition.nodePositions)
     {
         AttachNodeData newData = new AttachNodeData(data);
         if (nose) { newData.invert(); }
         nodePositions.Add(newData);
     }
 }