Skip to content

Commit

Permalink
0.2.0 - 0.24 fix
Browse files Browse the repository at this point in the history
  • Loading branch information
BobPalmer committed Aug 17, 2014
1 parent f63b6e3 commit e60c0c7
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 44 deletions.
10 changes: 6 additions & 4 deletions AirbagTools/AirbagTools.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,19 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\..\..\..\KSP_DEV\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
<Reference Include="Assembly-CSharp, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\KSP_DEV\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>..\..\..\..\..\..\KSP_DEV\KSP_Data\Managed\UnityEngine.dll</HintPath>
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\..\..\KSP_DEV\KSP_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion AirbagTools/ModuleAirbag.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class ModuleAirbag : PartModule

[KSPField(isPersistant = true)]
public bool isCharged = true;

[KSPField(isPersistant = true)]
public bool isDeployed = false;

Expand Down Expand Up @@ -121,7 +122,7 @@ private void Dampen()
if (vessel.srfSpeed > dampenSpeed
|| vessel.horizontalSrfSpeed > dampenSpeed)
{
print("Dampening...");
//print("Dampening...");
foreach (var p in vessel.parts)
{
p.Rigidbody.angularVelocity *= dampenFactor;
Expand Down
4 changes: 0 additions & 4 deletions AirbagTools/ModuleBounce.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,13 @@ public class ModuleBounce : PartModule

public override void OnStart(PartModule.StartState state)
{
//Debug.LogError("ModuleBounce OnStart", gameObject);
//ModuleBounceCollider bounce = part.collider.GetComponent<ModuleBounceCollider>();
ModuleBounceCollider bounce = gameObject.GetComponent<ModuleBounceCollider>();

if (bounce == null)
{
//bounce = part.collider.gameObject.AddComponent<ModuleBounceCollider>();
bounce = gameObject.AddComponent<ModuleBounceCollider>();
bounce.bounciness = bounciness;
bounce.part = part;
//Debug.LogError("ModuleBounce " + part.collider.gameObject.name);
}
}
}
Expand Down
22 changes: 10 additions & 12 deletions GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_lg.cfg
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
PART
{
name = USI_Airbag_Single_Large
name = USI_Airbag_Single_03
module = Part
author = RoverDude

rescaleFactor = 5
scale = 1
PhysicsSignificance = 1

// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z, size
node_stack_top = 0.0, 0.65, 0.0, 0.0, 1, 0.0, 2
node_attach = 0.0, 0.0, 0.0, 0.0, 0.0, -1.0
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,0,0,1


// --- editor parameters ---
TechRequired = composites
TechRequired = survivability
entryCost = 5800
cost = 620
category = Structural
cost = 800
category = Utility
subcategory = 0
title = Radial Airbag (Large)
manufacturer = Umbra Space Industries
description = A deployable, reuseable airbag to soften your landings. Use at your own risk, motion sickness bags not included.

PhysicsSignificance=1
// --- standard part parameters ---
mass = 0.35
dragModelType = default
maximum_drag = 0.1
minimum_drag = 0.01
angularDrag = 0.0001
crashTolerance = 1000
crashTolerance = 250
breakingForce = 200
breakingTorque = 200
maxTemp = 500
Expand All @@ -43,16 +42,15 @@ childStageOffset = 1
MODULE
{
name = ModuleBounce
bounciness = 2.5
dynamicFriction = .5
bounciness = 10
}


MODULE
{
name = ModuleAirbag
dampenFactor = .15
dampenSpeed = 5
dampenFactor = .75
dampenSpeed = 35
}

}
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
PART
{
name = USI_Airbag_Single_Med
name = USI_Airbag_Single_02
module = Part
author = RoverDude

rescaleFactor = 2.5
scale = 1
PhysicsSignificance = 1


node_attach = 0.0, 0.0, 0.0, 0.0, 0.0, -1.0
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,0,0,1


// --- editor parameters ---
TechRequired = composites
TechRequired = survivability
entryCost = 5800
cost = 620
category = Structural
cost = 400
category = Utility
subcategory = 0
title = Radial Airbag (Medium)
manufacturer = Umbra Space Industries
description = A deployable, reuseable airbag to soften your landings. Use at your own risk, motion sickness bags not included.

PhysicsSignificance=1
// --- standard part parameters ---
mass = 0.1
dragModelType = default
maximum_drag = 0.1
minimum_drag = 0.01
angularDrag = 0.0001
crashTolerance = 1000
crashTolerance = 200
breakingForce = 200
breakingTorque = 200
maxTemp = 500
Expand All @@ -41,17 +41,16 @@ childStageOffset = 1
MODULE
{
name = ModuleBounce
bounciness = 1.0
dynamicFriction = .5
bounciness = 10
}



MODULE
{
name = ModuleAirbag
dampenFactor = .33
dampenSpeed = 25
dampenFactor = .75
dampenSpeed = 35
}

}
22 changes: 10 additions & 12 deletions GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_sm.cfg
Original file line number Diff line number Diff line change
@@ -1,35 +1,34 @@
PART
{
name = USI_Airbag_Single_Small
name = USI_Airbag_Single_01
module = Part
author = RoverDude

rescaleFactor = 1.25
scale = 1
PhysicsSignificance = 1

// definition format is Position X, Position Y, Position Z, Up X, Up Y, Up Z, size
node_stack_top = 0.0, 0.65, 0.0, 0.0, 1, 0.0, 2
node_attach = 0.0, 0.0, 0.0, 0.0, 0.0, -1.0
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
attachRules = 1,1,0,0,1

// --- editor parameters ---
TechRequired = composites
TechRequired = survivability
entryCost = 5800
cost = 620
category = Structural
cost = 200
category = Utility
subcategory = 0
title = Radial Airbag (Small)
manufacturer = Umbra Space Industries
description = A deployable, reuseable airbag to soften your landings. Use at your own risk, motion sickness bags not included.

PhysicsSignificance=1
// --- standard part parameters ---
mass = 0.05
dragModelType = default
maximum_drag = 0.1
minimum_drag = 0.01
angularDrag = 0.0001
crashTolerance = 1000
crashTolerance = 150
breakingForce = 200
breakingTorque = 200
maxTemp = 500
Expand All @@ -41,16 +40,15 @@ childStageOffset = 1
MODULE
{
name = ModuleBounce
bounciness = 2.5
dynamicFriction = .5
bounciness = 10
}


MODULE
{
name = ModuleAirbag
dampenFactor = .15
dampenSpeed = 5
dampenFactor = .75
dampenSpeed = 35
}

}
Binary file modified GameData/UmbraSpaceIndustries/Airbags/AirbagTools.dll
Binary file not shown.

0 comments on commit e60c0c7

Please sign in to comment.