Skip to content

Commit

Permalink
1.4.3 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Caskey committed May 10, 2018
1 parent a520358 commit 1e0585f
Show file tree
Hide file tree
Showing 28 changed files with 86 additions and 18 deletions.
Binary file removed GameData/ProceduralFairings/ProceduralFairings.dll
Binary file not shown.
58 changes: 58 additions & 0 deletions GameData/ProceduralFairings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Procedural Fairings

Procedural Fairings mod for Kerbal Space Program.

[Forum thread](http://forum.kerbalspaceprogram.com/index.php?/topic/36371-110-procedural-fairings-316-april-20/)

[Download](https://github.com/e-dog/ProceduralFairings/releases)

[License](http://creativecommons.org/licenses/by/3.0/)


## Installation
Remove old version of the mod.

Copy ProceduralFairings into "Gamedata" in your KSP folder.

## Installation Notes

If you downloaded KSP from Squad's website, then the KSP folder is where you unzipped it when you first downloaded the game

If you downloaded KSP from Steam, then right-clicking KSP in your Steam library, select "properties," switching to the "local files" tab, and pressing "browse local files" opens the game folder.

In the KSP main folder a "GameData" folder contains all add-ons; without any add-ons, it contains only the "Squad" and "NASAMission" sub-folders - the stock "add-ons" from the developers of the game. Unzip the ProceduralFairings folder into your Gamedata folder.

## Tutorial
[Pictures](http://imgur.com/a/xCF0q)

### Steps
1. Put a fairing base under your payload (all Procedural Fairings parts are in the Aerodynamics tab) and a decoupler if necessary.
2. Attached fairings automatically reshape for your payload.
3. Enabling symmetry on fairings will encapsulate your payload
4. Rearrange stages to jettison fairings at the proper stage.

### Inline Fairings
- Flipping another fairing base over and adding it above the payload will cause side fairings to stick to it instead of creating a nose cone, thereby creating inline fairings between two bases.
- Procedural Fairings includes low-profile base rings intended for inline fairings.

### Controls
Right-click parts and use tweakables.

## Career mode
Maximum (and minimum) part size is limited by tech. See GameData/ProceduralFairings/common.cfg for details.

## Version history
**3.00**
- First release on GitHub.
- Moved files up to GameData folder (no Keramzit folder anymore). Make sure to delete old mod before installing (which is a good practice anyway).
- Added new resizable fairing bases with configurable number of side nodes.
- Old parts (bases and adapter) are deprecated. Launched vessels should be fine, but you might have trouble loading old designs in VAB/SPH in career mode.
- Added new part: Thrust Plate Multi-Adapter.
- Using KSPAPIExtensions by Swamp-Ig for better tweakables.
- Removed old keyboard-based tweaks - use new tweakables.
- Tweaking outer diameter (with fairings), instead of inner radius.
- Added fairing decoupler torque tweakable.
- Side nodes (for attaching fairings) get larger with the base size to make them more sturdy in KSP 0.23.5+
- Tech limits are not checked in sandbox mode anymore.
- Extra payload radius is now zero by default.
- Fixed interstage adapter decoupling with fuselage fairings.
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 8 additions & 6 deletions Source/FairingBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,11 @@ LineRenderer makeLineRenderer(string name, Color color, float wd)
var r = o.AddComponent<LineRenderer>();
r.useWorldSpace = false;
r.material = new Material(Shader.Find("Particles/Additive"));
r.SetColors(color, color);
r.SetWidth(wd, wd);
r.SetVertexCount(0);
r.startColor = color;
r.endColor = color;
r.startWidth = wd;
r.endWidth = wd;
r.positionCount = 0;
return r;
}

Expand Down Expand Up @@ -621,7 +623,7 @@ void recalcShape()

// fill profile outline (for debugging)
if (line) {
line.SetVertexCount(scan.profile.Count * 2 + 2);
line.positionCount = scan.profile.Count * 2 + 2;

float prevRad = 0;
int hi = 0;
Expand Down Expand Up @@ -791,7 +793,7 @@ void recalcShape()
// no side parts - fill fairing outlines
for (int j = 0; j < outline.Count; j++) {
var lr = outline[j];
lr.SetVertexCount(shape.Length);
lr.positionCount =shape.Length;
for (int i = 0; i < shape.Length; ++i)
lr.SetPosition(i, new Vector3(shape[i].x, shape[i].y));

Expand All @@ -801,7 +803,7 @@ void recalcShape()
else {
for (int j = 0; j < outline.Count; j++) {
var lr = outline[j];
lr.SetVertexCount(0);
lr.positionCount = 0;
}
}

Expand Down
10 changes: 8 additions & 2 deletions Source/FairingSide.cs
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,14 @@ public void rebuildMesh()
}

m.triangles = tri;

if (!HighLogic.LoadedSceneIsEditor) m.Optimize();

// The right way to call optimize on a mesh is to use the MeshUtility
// found in UnityEditor, but we don't seem to have a reference to that anywhere...
/*
if (!HighLogic.LoadedSceneIsEditor) {
MeshUtility.Optimize(m);
}
*/

StartCoroutine(PFUtils.updateDragCubeCoroutine(part, 1));
}
Expand Down
10 changes: 6 additions & 4 deletions Source/PFKMJoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public virtual void FixedUpdate()
private LineRenderer JointLine(Vector3 posp, Vector3 pospp, Color col, float width)
{
LineRenderer lineRenderer = this.makeLineRenderer("JointLine", col, width);
lineRenderer.SetVertexCount(2);
lineRenderer.positionCount = 2;
lineRenderer.SetPosition(0, posp);
lineRenderer.SetPosition(1, pospp);
lineRenderer.useWorldSpace = true;
Expand Down Expand Up @@ -279,9 +279,11 @@ private LineRenderer makeLineRenderer(string name, Color color, float wd)
LineRenderer lineRenderer = gameObject.AddComponent<LineRenderer>();
lineRenderer.useWorldSpace = true;
lineRenderer.material = new Material(Shader.Find("Particles/Additive"));
lineRenderer.SetColors(color, color);
lineRenderer.SetWidth(wd, wd);
lineRenderer.SetVertexCount(0);
lineRenderer.startColor = color;
lineRenderer.endColor = color;
lineRenderer.startWidth = wd;
lineRenderer.endWidth = wd;
lineRenderer.positionCount = 0;
return lineRenderer;
}

Expand Down
4 changes: 2 additions & 2 deletions Source/ProceduralFairings.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<ItemGroup>
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Users\caske\Downloads\ksp-win64-1.3\KSP_win64\KSP_x64_Data\Managed\Assembly-CSharp.dll</HintPath>
<HintPath>..\..\Dependencies\1.4.3\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand All @@ -42,7 +42,7 @@
<Reference Include="System.Xml" />
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>C:\Users\caske\Downloads\ksp-win64-1.3\KSP_win64\KSP_x64_Data\Managed\UnityEngine.dll</HintPath>
<HintPath>..\..\Dependencies\1.4.3\UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions Source/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
// die mit einer Assembly verknüpft sind.
[assembly: AssemblyTitle("ProceduralFairings")]
[assembly: AssemblyDescription("Procedural Fairings 4.0 for KSP 1.3")]
[assembly: AssemblyDescription("Procedural Fairings 4.0 for KSP 1.3.1")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ProceduralFairings.Properties")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -29,5 +29,5 @@
// Buildnummer
// Revision
//
[assembly: AssemblyVersion("0.0.4.0")]
[assembly: AssemblyFileVersion("0.0.4.0")]
[assembly: AssemblyVersion("0.0.5.0")]
[assembly: AssemblyFileVersion("0.0.5.0")]

0 comments on commit 1e0585f

Please sign in to comment.