diff --git a/AirbagTools/AirbagTools.csproj b/AirbagTools/AirbagTools.csproj index 0567484..17aa00c 100644 --- a/AirbagTools/AirbagTools.csproj +++ b/AirbagTools/AirbagTools.csproj @@ -31,8 +31,9 @@ 4 - - ..\..\..\..\..\..\KSP_DEV\KSP_Data\Managed\Assembly-CSharp.dll + + False + ..\..\..\..\..\..\..\KSP_DEV\KSP_Data\Managed\Assembly-CSharp.dll @@ -40,8 +41,9 @@ - - ..\..\..\..\..\..\KSP_DEV\KSP_Data\Managed\UnityEngine.dll + + False + ..\..\..\..\..\..\..\KSP_DEV\KSP_Data\Managed\UnityEngine.dll diff --git a/AirbagTools/ModuleAirbag.cs b/AirbagTools/ModuleAirbag.cs index 624f6c8..de72463 100644 --- a/AirbagTools/ModuleAirbag.cs +++ b/AirbagTools/ModuleAirbag.cs @@ -14,6 +14,7 @@ public class ModuleAirbag : PartModule [KSPField(isPersistant = true)] public bool isCharged = true; + [KSPField(isPersistant = true)] public bool isDeployed = false; @@ -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; diff --git a/AirbagTools/ModuleBounce.cs b/AirbagTools/ModuleBounce.cs index c5dd7bd..60c6873 100644 --- a/AirbagTools/ModuleBounce.cs +++ b/AirbagTools/ModuleBounce.cs @@ -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 bounce = gameObject.GetComponent(); if (bounce == null) { - //bounce = part.collider.gameObject.AddComponent(); bounce = gameObject.AddComponent(); bounce.bounciness = bounciness; bounce.part = part; - //Debug.LogError("ModuleBounce " + part.collider.gameObject.name); } } } diff --git a/GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_lg.cfg b/GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_lg.cfg index 88ff7cd..2d4af9c 100644 --- a/GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_lg.cfg +++ b/GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_lg.cfg @@ -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 @@ -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 } } \ No newline at end of file diff --git a/GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag.cfg b/GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_md.cfg similarity index 78% rename from GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag.cfg rename to GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_md.cfg index fd2799f..3b04ffb 100644 --- a/GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag.cfg +++ b/GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_md.cfg @@ -1,12 +1,12 @@ 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 @@ -14,22 +14,22 @@ 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 @@ -41,8 +41,7 @@ childStageOffset = 1 MODULE { name = ModuleBounce - bounciness = 1.0 - dynamicFriction = .5 + bounciness = 10 } @@ -50,8 +49,8 @@ MODULE MODULE { name = ModuleAirbag - dampenFactor = .33 - dampenSpeed = 25 + dampenFactor = .75 + dampenSpeed = 35 } } \ No newline at end of file diff --git a/GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_sm.cfg b/GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_sm.cfg index 9f6c3f2..57775c0 100644 --- a/GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_sm.cfg +++ b/GameData/UmbraSpaceIndustries/Airbags/Airbag/airbag_sm.cfg @@ -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 @@ -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 } } \ No newline at end of file diff --git a/GameData/UmbraSpaceIndustries/Airbags/AirbagTools.dll b/GameData/UmbraSpaceIndustries/Airbags/AirbagTools.dll index 011902e..5ed866b 100644 Binary files a/GameData/UmbraSpaceIndustries/Airbags/AirbagTools.dll and b/GameData/UmbraSpaceIndustries/Airbags/AirbagTools.dll differ