Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
allista committed May 3, 2020
2 parents 4ef5f6f + c757f0d commit 9d8fe5b
Show file tree
Hide file tree
Showing 20 changed files with 568 additions and 212 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@

bin
obj
Assets/**/*.png
/Assets/**/*.png
/Assets/Plugins/KSPAssets/
/Assets/Plugins/KSPAssets.meta
/Assets/SquadCore/
/Assets/SquadCore.meta
/Assets/src/stk59gms-02.jpg
/Releases
/GameData/GroundConstruction/Plugins/GroundConstruction.dll
*.pdb
/GameData/GroundConstruction/Plugins/*.dll
/GameData/GroundConstruction/Plugins/PluginData/GroundConstruction/config.xml
/OldModels/
165 changes: 165 additions & 0 deletions Assets/Animations/SpaceCrane-lights-emission.anim
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SpaceCrane-lights-emission
serializedVersion: 6
m_Legacy: 1
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: _EmissiveColor.r
path:
classID: 21
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: _EmissiveColor.g
path:
classID: 21
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 1
inSlope: 1
outSlope: 1
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: _EmissiveColor.b
path:
classID: 21
script: {fileID: 0}
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: _EmissiveColor.a
path:
classID: 21
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 1
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []
109 changes: 109 additions & 0 deletions Assets/Animations/SpaceCrane-lights-orig.anim
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: SpaceCrane-lights-orig
serializedVersion: 6
m_Legacy: 1
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Intensity
path: lamp
classID: 108
script: {fileID: 0}
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 1
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves:
- curve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 1
inSlope: 0
outSlope: 0
tangentMode: 136
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
attribute: m_Intensity
path: lamp
classID: 108
script: {fileID: 0}
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []
9 changes: 8 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
#Ground Construction ChangeLog

* **v2.6.1.1**
* **v2.6.2**
* Fixed game freeze on opening Recycler node with too many subnodes
* Fixed deployment dimensions for SPH crafts in Ground kit
* Fixed USI-LS integration thanks to @Marschig
* Fixed Recycler UI disappearing after scene switch
* Compiled against AT_Utils 1.9.3

* v2.6.1.1
* **Compatible with KSP-1.9**
* Compiled against AT_Utils 1.9.2

Expand Down
20 changes: 10 additions & 10 deletions Containers/AssemblySpace.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,29 +74,29 @@ void spawn_space_keeper()
public VesselKit GetKit(Guid id) => Kit.id == id ? Kit : null;
public List<VesselKit> GetKits() => new List<VesselKit> { Kit };

public bool CheckKit(VesselKit kit, string part_name, out float kit2space_ratio)
public bool CheckKit(VesselKit vessel_kit, string part_name, out float kit2space_ratio)
{
kit2space_ratio = -1;
if(!kit)
if(!vessel_kit)
return false;
var kit_part = kit.CreatePart(part_name, part.flagURL, false);
var kit_part = vessel_kit.CreatePart(part_name, part.flagURL, false);
if(kit_part == null)
return false;
var kit_metric = new Metric(kit_part);
var kit_module = kit_part.FindModuleImplementing<DeployableKitContainer>();
var can_construct = kit_module != null && kit_module.CanConstruct(kit);
var can_construct = kit_module != null && kit_module.CanConstruct(vessel_kit);
DestroyImmediate(kit_part.gameObject);
if(!can_construct)
return false;
kit2space_ratio = kit_metric.volume / SpawnManager.SpaceMetric.volume;
return SpawnManager.MetricFits(kit_metric);
}

public void SetKit(VesselKit kit, string part_name)
public void SetKit(VesselKit vessel_kit, string part_name)
{
if(kit != null)
if(vessel_kit != null)
{
Kit = kit;
Kit = vessel_kit;
KitPart = part_name;
Kit.Host = this;
can_construct_in_situ = CanConstruct(Kit);
Expand Down Expand Up @@ -255,10 +255,10 @@ public float GetModuleMass(float defaultMass, ModifierStagingSituation sit) =>
#endregion

#region IConstructionSpace
public bool CanConstruct(VesselKit kit) =>
(!kit.HasLaunchClamps
public bool CanConstruct(VesselKit vessel_kit) =>
(!vessel_kit.HasLaunchClamps
&& SpawnManager != null
&& SpawnManager.MetricFits(kit.ShipMetric));
&& SpawnManager.MetricFits(vessel_kit.ShipMetric));

bool IConstructionSpace.Valid => isEnabled && can_construct_in_situ;
public bool ConstructionComplete => Kit && Kit.Complete;
Expand Down
Loading

0 comments on commit 9d8fe5b

Please sign in to comment.