Ejemplo n.º 1
0
 public TextureData(ConfigNode node)
 {
     meshNames = node.GetStringValues("mesh");
     shaderName = node.GetStringValue("shader");
     diffuseTextureName = node.GetStringValue("diffuseTexture");
     normalTextureName = node.GetStringValue("normalTexture");
     emissiveTextureName = node.GetStringValue("emissiveTexture");
 }
Ejemplo n.º 2
0
        public SSTUEngineMountDefinition(ConfigNode node)
        {
            mountName = node.GetStringValue("name");
            modelName = node.GetStringValue("modelName");
            invertModel = node.GetBoolValue("invertModel", invertModel);
            singleModel = node.GetBoolValue("singleModel", singleModel);
            verticalOffset = node.GetFloatValue("verticalOffset");
            height = node.GetFloatValue("height", height);
            fairingDisabled = node.GetBoolValue("fairingDisabled", fairingDisabled);
            fairingTopOffset = node.GetFloatValue("fairingTopOffset");
            mountMass = node.GetFloatValue("mass", mountMass);
            defaultDiameter = node.GetFloatValue("defaultDiameter", defaultDiameter);
            volume = node.GetFloatValue("volume", volume);
            rcsVerticalPosition = node.GetFloatValue("rcsVerticalPosition", rcsVerticalPosition);
            rcsHorizontalPosition = node.GetFloatValue("rcsHorizontalPosition", rcsHorizontalPosition);
            rcsVerticalRotation = node.GetFloatValue("rcsVerticalRotation");
            rcsHorizontalRotation = node.GetFloatValue("rcsHorizontalRotation");

            if (node.HasValue("node"))
            {
                String[] vals = node.GetStringValues("node");
                foreach (String val in vals) { nodePositions.Add(new AttachNodeData(val)); }
                if (invertModel) { foreach (AttachNodeData data in nodePositions) { data.invert(); } }
            }
        }
Ejemplo n.º 3
0
 public ModelSwitchGroup(ConfigNode node, SSTUModelSwitch module)
 {
     this.owner = module;
     this.name = node.GetStringValue("name");
     this.defaultModel = node.GetStringValue("defaultModel", string.Empty);
     this.parentGroup = node.GetStringValue("parentGroup", string.Empty);
     this.parentNode = node.GetStringValue("parentNode", string.Empty);
     string[] nodeNames = node.GetStringValues("node");
     int len = nodeNames.Length;
     modelNodes = new ModelNode[len];
     for (int i = 0; i < len; i++)
     {
         modelNodes[i] = new ModelNode(nodeNames[i], this);
         nodeMap.Add(modelNodes[i].name, modelNodes[i]);
     }
 }
Ejemplo n.º 4
0
 public ModelTextureData(ConfigNode node)
 {
     diffuseTextureName = node.GetStringValue("diffuseTexture");
     normalTextureName = node.GetStringValue("normalTexture");
     meshNames = node.GetStringValues("mesh");
 }
Ejemplo n.º 5
0
 public ModelSwitchData(ConfigNode node, Part owner, ModelSwitchGroup group)
 {
     name = node.GetStringValue("name");
     modelName = node.GetStringValue("modelName", name);
     groupName = node.GetStringValue("group", groupName);
     containerIndex = node.GetIntValue("containerIndex", 0);
     moduleIDs = node.GetIntValues("managedModuleID", new int[] { });
     localPosition = node.GetVector3("localPosition", Vector3.zero);
     localRotation = node.GetVector3("localRotation", Vector3.zero);
     scale = node.GetFloatValue("scale", scale);
     nodes = ModelNodeData.load(node.GetStringValues("node"));
     suppressNode = nodes.Length > 0;
     modelDefinition = SSTUModelData.getModelDefinition(modelName);
     if (modelDefinition == null) { throw new NullReferenceException("Could not locate model data for name: " + modelName + " :: " + name); }
     this.part = owner;
     this.group = group;
     this.group.add(this);
 }