Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: KSP-RO/RP-1
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a1a4e3172728
Choose a base ref
...
head repository: KSP-RO/RP-1
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f7030f9eb9f4
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Dec 19, 2018

  1. Fixed the First Flight Cotnract to Stop Exploits

    Since I used a sepratron attached to a SR core to get about 10 feet of the ground and others have built similarly ridiculous craft, this should fix it a little bit
    pap1723 committed Dec 19, 2018
    Copy the full SHA
    fa6aacc View commit details

Commits on Dec 20, 2018

  1. Copy the full SHA
    3c244cd View commit details

Commits on Dec 21, 2018

  1. SSTU Tooling Changes

    * Added support for SSTU tanks to have the length of the nosecones and mounts added to the overall length of the tooling
    * Rebuilt .DLL file for the Tooling changes and with @siimav Crew changes
    pap1723 committed Dec 21, 2018
    Copy the full SHA
    f7030f9 View commit details
11 changes: 10 additions & 1 deletion GameData/RP-0/Contracts/Milestones/First Flight.cfg
Original file line number Diff line number Diff line change
@@ -43,6 +43,15 @@ CONTRACT_TYPE
name = ReachStateFlying
type = ReachState
situation = FLYING
minRateOfClimb = 1
minRateOfClimb = 50
}

PARAMETER
{
name = ReachStateLaunch
type = ReachState
minAltitude = 1000
title = Reach 1000 meters
hideChildren = true
}
}
Binary file modified GameData/RP-0/Plugins/RP0.dll
Binary file not shown.
Binary file added Notes/SSTU/Mounts-Noses.xlsx
Binary file not shown.
107 changes: 105 additions & 2 deletions Source/Tooling/ModuleToolingSSTUTank.cs
Original file line number Diff line number Diff line change
@@ -47,7 +47,12 @@ public override void GetDimensions(out float diam, out float len)
// Get core size from part field and convert to String
// ******* 1.4+ string coreStr = SSTUTank.Fields["currentCore"].GetValue<string>(SSTUTank);
string coreStr = SSTUTank.Fields["currentTankType"].GetValue<string>(SSTUTank);
Debug.Log($"[RP1-ModuleTooling]: SSTU Tank Core: {coreStr}");
// Debug.Log($"[RP1-ModuleTooling]: SSTU Tank Core: {coreStr}");

string noseType = SSTUTank.Fields["currentNoseType"].GetValue<string>(SSTUTank);
string mountType = SSTUTank.Fields["currentMountType"].GetValue<string>(SSTUTank);

float baseLen=0f, noseLen=0f, mountLen=0f;

/* SSTU Modular Tanks are actually separate models and these are the 4 common models that
* are simple cylinders. We first look for the beginning 7 characters of the string
@@ -65,15 +70,113 @@ public override void GetDimensions(out float diam, out float len)
float curLen = lenMult * diam;
scale = SSTUTank.Fields["currentTankVerticalScale"];
float vScale = scale.GetValue<float>(SSTUTank);
len = curLen * vScale;
baseLen = curLen * vScale;
}
// Debug.Log($"[RP1-ModuleTooling]: SSTU Tank Size: Diameter = {diam}, Length = {len}");

// Add the size of the mount and the size of the nosecone to the overall length
if (noseMountDict.ContainsKey(noseType) || noseMountDict.ContainsKey(mountType))
{
if (noseMountDict.ContainsKey(noseType))
{
float mult = noseMountDict[noseType];
noseLen = diam * mult;
}

if (noseMountDict.ContainsKey(mountType))
{
float mult = noseMountDict[mountType];
mountLen = diam * mult;
}
}
else
{
noseLen = 0;
mountLen = 0;
}

len = baseLen + noseLen + mountLen;

}
else
{
Debug.LogError("[ModuleTooling]: Could not find SSTU MFT part to bind to");
return;
}
}

// Nose Type = currentNoseType Mount = currentMountType
public Dictionary<string, float> noseMountDict = new Dictionary<string, float>()
{
{"Adapter-1-2-Flat", 0.09f},
{"Adapter-1-2-Short", 0.5f },
{"Adapter-1-2-Long", 1.0f },
{"Adapter-3-4-Flat", 0.09f },
{"Adapter-3-4-Long", 1.0f },
{"Adapter-3-4-Short", 0.5f },
{"Adapter-1-3-Flat", 0.09f},
{"Adapter-1-3-Short", 0.375f },
{"Adapter-1-3-Long", 0.75f },
{"Adapter-2-3-Flat", 0.09f},
{"Adapter-2-3-Short", 0.375f },
{"Adapter-2-3-Long", 0.75f },
{"Adapter-2-1-Flat", 0.09f },
{"Adapter-2-1-Short", 0.5f },
{"Adapter-2-1-Long", 1.0f },
{"Adapter-4-3-Flat", 0.09f },
{"Adapter-4-3-Long", 1.0f },
{"Adapter-4-3-Short", 0.5f },
{"Adapter-3-1-Flat", 0.09f},
{"Adapter-3-1-Short", 0.375f },
{"Adapter-3-1-Long", 0.75f },
// {"Adapter-3-1-Extended", 0.590f }, 1.4.x
{"Adapter-3-2-Flat", 0.09f},
{"Adapter-3-2-Short", 0.375f },
{"Adapter-3-2-Long", 0.75f },
// {"Adapter-3-2-Extended", 0.590f }, 1.4.x
// {"Adapter-4-1-Flat", 0.0393f }, 1.4.x
// {"Adapter-4-1-Short", 0.193f }, 1.4.x
{"Nosecone-1", 1.261f },
{"Nosecone-2", 1.356f },
{"Nosecone-3", 0.640f },
{"Nosecone-4", 0.391f },
{"Nosecone-5", 1.215f },
{"SRB-Nosecone-1", 1.0f },
{"SRB-Nosecone-2", 1.167f },
{"SRB-Nosecone-3", 1.346f },
{"SRB-Nosecone-4", 1.465f },
{"SRB-Nosecone-5", 1.526f },
{"SRB-Nosecone-6", 1.534f },
{"Mount-SLS", 0.2f },
{"Mount-SLS-6", 0.2f },
{"Mount-Saturn-V", 0.448f },
{"Mount-Pyrios", 0.267f },
{"Mount-Nova", 0.21f },
{"Mount-Direct", 0.5f },
{"Mount-S-II", 0.35f },
{"Mount-S-IVB", 0.436f },
{"Mount-Generic", 0.18f },
{"Mount-Skeletal-L", 0.348f },
{"Mount-Skeletal-M", 0.348f },
{"Mount-Skeletal-S", 0.328f },
{"Mount-Delta-IV", 0.267f },
{"Mount-Shroud", 0.2f },
{"Mount-Shroud2", 0.267f },
{"Mount-RD-107", 0.027f },
{"Mount-RD-108", 0.035f },
{"Mount-Shroud3", 0.1f },
{"Mount-Shroud4", 0.1f },
{"Mount-Shroud5", 0.1f },
{"Mount-Shroud6", 0.1f },
// {"Adapter-2-1-Dome", 0.12f }, 1.4.x
// {"Adapter-Dome-A", 1f }, 1.4.x
// {"Adapter-Dome-B", 1f }, 1.4.x
{"Adapter-Soyuz", 5.695f },
{"Adapter-Soyuz2", 5f },
{"Adapter-Soyuz3", 4.304f },
{"Adapter-Soyuz4", 3.608f }
};


}
}