Skip to content

Commit

Permalink
Merge pull request #213 from ihsoft/next-1.0
Browse files Browse the repository at this point in the history
Release v1.0 Beta6 rc2
  • Loading branch information
ihsoft authored Aug 16, 2017
2 parents 746677c + de15a23 commit fafc9bb
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 60 deletions.
4 changes: 2 additions & 2 deletions KAS-1.0.version
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"NAME": "KAS-1.0",
"URL": "https://raw.githubusercontent.com/ihsoft/KAS/KAS-v1.0/KAS-1.0.version",
"VERSION": {
"BUILD": 6435,
"BUILD": 42780,
"MAJOR": 1,
"MINOR": 0,
"PATCH": 41950
"PATCH": 6436
}
}
8 changes: 4 additions & 4 deletions Parts/CableBrace/part_CH1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ PART
cost = 150
category = Utility
subcategory = 0
title = CH-1 Cable Hook
manufacturer = KAS
description = Hook to attach cable bracing ends.
title = #KAS_CH1_Part_title //#KAS_CH1_Part_title = CH-1 Cable Hook
manufacturer = #KAS_CH1_Part_manufacturer //#KAS_CH1_Part_manufacturer = KAS
description = #KAS_CH1_Part_description //#KAS_CH1_Part_description = Hook to attach cable bracing ends.
attachRules = 0,1,0,0,1
mass = 0.003
dragModelType = default
Expand All @@ -24,7 +24,7 @@ PART
breakingTorque = 200
maxTemp = 2000
bulkheadProfiles = srf
tags = KIS KAS cable rope tie cck-kas
tags = #KAS_CH1_Part_tags //#KAS_CH1_Part_tags = KIS KAS cable rope tie cck-kas
MODEL
{
model = KAS-1.0/Parts/CableBrace/Lock
Expand Down
9 changes: 4 additions & 5 deletions Parts/CableBrace/part_PCB1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ PART
cost = 750
category = Utility
subcategory = 0
title = PCB-1 Portable Cable Bracing
manufacturer = KAS
description = It's basically a simple winch with a small reserve of a steel cable to anchor another part.
title = #KAS_PCB1_Part_title //#KAS_PCB1_Part_title = PCB-1 Portable Cable Bracing
manufacturer = #KAS_PCB1_Part_manufacturer //#KAS_PCB1_Part_manufacturer = KAS
description = #KAS_PCB1_Part_description //#KAS_PCB1_Part_description = It's basically a simple winch with a small reserve of a steel cable to anchor another part.
attachRules = 0,1,0,0,1
mass = 0.020
dragModelType = default
Expand All @@ -24,7 +24,7 @@ PART
breakingTorque = 200
maxTemp = 2000
bulkheadProfiles = srf
tags = KIS KAS cable rope tie cck-kas
tags = #KAS_PCB1_Part_tags //#KAS_PCB1_Part_tags = KIS KAS cable rope tie cck-kas
MODEL
{
model = KAS-1.0/Parts/CableBrace/Winch
Expand All @@ -46,7 +46,6 @@ PART
// KASModuleInteractiveJointSource
plugSndPath = KAS-1.0/Sounds/grappleAttachEva
unplugSndPath = KAS-1.0/Sounds/grappleDetach
brokeSndPath = KAS-1.0/Sounds/broke
startLinkMenu = Link
breakLinkMenu = Unlink
}
Expand Down
18 changes: 12 additions & 6 deletions Parts/JS1/part.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ PART
cost = 750
category = Structural
subcategory = 0
title = JS-1 Joint Socket
manufacturer = KAS
description = A socket for joint parts. Doesn't require tools to connect parts as long as the other part supports connecting.
title = #KAS_TJ1_Part_title //#KAS_TJ1_Part_title = TJ-1 Fixed Telescopic Joint
manufacturer = #KAS_TJ1_Part_manufacturer //#KAS_TJ1_Part_manufacturer = KAS
description = #KAS_TJ1_Part_description //#KAS_TJ1_Part_description = A simple telescopic pipe to rigidly connect two vessels.
attachRules = 1,1,1,0,1
mass = 0.08
dragModelType = default
Expand All @@ -26,15 +26,21 @@ PART
breakingTorque = 200
maxTemp = 2000
bulkheadProfiles = srf
tags = KIS KAS pipe tube cck-kas
tags = #KAS_TJ1_Part_tags //#KAS_TJ1_Part_tags = KIS KAS pipe tube cck-kas
MODULE
{
name = KASModuleLinkTargetBase
linkType = MdStrut
attachNodeName = kas0
// It depends on the joint lever height in the source part.
// plugNode + handle length = (0.0, 0.0362, 0.0) + (0, 0.113, 0)
attachNodePosition = 0.0, 0.1616, 0.0
attachNodeOrientation = 0.0, 1.0, 0.0
}
MODULE
{
name = KASModuleLinkTargetBase
linkType = MdCable
attachNodeName = kas1
attachNodePosition = 0.0, 0.0362, 0.0
attachNodeOrientation = 0.0, 1.0, 0.0
}
}
9 changes: 4 additions & 5 deletions Parts/TB60/part.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ PART
cost = 750
category = Structural
subcategory = 0
title = TB-60 Tow Bar
manufacturer = KAS
description = A simple solution to tow a vessel.
title = #KAS_TB60_Part_title //#KAS_TB60_Part_title = TB-60 Tow Bar
manufacturer = #KAS_TB60_Part_manufacturer //#KAS_TB60_Part_manufacturer = KAS
description = #KAS_TB60_Part_description //#KAS_TB60_Part_description = A simple solution to tow a vessel.
attachRules = 1,1,1,0,1
mass = 0.08
dragModelType = default
Expand All @@ -26,7 +26,7 @@ PART
breakingTorque = 200
maxTemp = 2000
bulkheadProfiles = srf
tags = KIS KAS pipe tube tow towbar cck-kas
tags = #KAS_TB60_Part_tags //#KAS_TB60_Part_tags = KIS KAS pipe tube tow towbar cck-kas
MODULE
{
name = KASModuleTelescopicPipeModel
Expand Down Expand Up @@ -56,7 +56,6 @@ PART
// KASModuleInteractiveJointSource
plugSndPath = KAS-1.0/Sounds/plugdocked
unplugSndPath = KAS-1.0/Sounds/unplugdocked
brokeSndPath = KAS-1.0/Sounds/broke
startLinkMenu = Attach to a vessel
breakLinkMenu = Disconnect vessels
}
Expand Down
9 changes: 4 additions & 5 deletions Parts/TJ1/part.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ PART
cost = 750
category = Structural
subcategory = 0
title = TJ-1 Fixed Telescopic Joint
manufacturer = KAS
description = A simple telescopic pipe to rigidly connect two vessels.
title = #KAS_TJ1_Part_title //#KAS_TJ1_Part_title = TJ-1 Fixed Telescopic Joint
manufacturer = #KAS_TJ1_Part_manufacturer //#KAS_TJ1_Part_manufacturer = KAS
description = #KAS_TJ1_Part_description //#KAS_TJ1_Part_description = A simple telescopic pipe to rigidly connect two vessels.
attachRules = 1,1,1,0,1
mass = 0.08
dragModelType = default
Expand All @@ -26,7 +26,7 @@ PART
breakingTorque = 200
maxTemp = 2000
bulkheadProfiles = srf
tags = KIS KAS pipe tube cck-kas
tags = #KAS_TJ1_Part_tags //#KAS_TJ1_Part_tags = KIS KAS pipe tube cck-kas
MODULE
{
name = KASModuleTelescopicPipeModel
Expand Down Expand Up @@ -56,7 +56,6 @@ PART
// KASModuleInteractiveJointSource
plugSndPath = KAS-1.0/Sounds/plugdocked
unplugSndPath = KAS-1.0/Sounds/unplugdocked
brokeSndPath = KAS-1.0/Sounds/broke
startLinkMenu = Attach to a vessel
breakLinkMenu = Disconnect vessels
}
Expand Down
9 changes: 4 additions & 5 deletions Parts/TJ2/part.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ PART
cost = 750
category = Structural
subcategory = 0
title = TJ-2 Free Telescopic Joint
manufacturer = KAS
description = A simple telescopic pipe to connect two vessels. Joints at the connecting parts may have a limited degree of freedom.
title = #KAS_TJ2_Part_title //#KAS_TJ2_Part_title = TJ-2 Free Telescopic Joint
manufacturer = #KAS_TJ2_Part_manufacturer //#KAS_TJ2_Part_manufacturer = KAS
description = #KAS_TJ2_Part_description //#KAS_TJ2_Part_description = A simple telescopic pipe to connect two vessels. Joints at the connecting parts may have a limited degree of freedom.
attachRules = 1,1,1,0,1
mass = 0.08
dragModelType = default
Expand All @@ -26,7 +26,7 @@ PART
breakingTorque = 200
maxTemp = 2000
bulkheadProfiles = srf
tags = KIS KAS pipe tube cck-kas
tags = #KAS_TJ2_Part_tags //#KAS_TJ2_Part_tags = KIS KAS pipe tube cck-kas
MODULE
{
name = KASModuleTelescopicPipeModel
Expand Down Expand Up @@ -56,7 +56,6 @@ PART
// KASModuleInteractiveJointSource
plugSndPath = KAS-1.0/Sounds/plugdocked
unplugSndPath = KAS-1.0/Sounds/unplugdocked
brokeSndPath = KAS-1.0/Sounds/broke
startLinkMenu = Attach to a vessel
breakLinkMenu = Disconnect vessels
}
Expand Down
2 changes: 1 addition & 1 deletion Source/KAS-1.0.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<Private>True</Private>
</Reference>
<Reference Include="KSPDev_Utils.0.26">
<HintPath>..\..\KSPDev\Binaries\KSPDev_Utils.0.26.dll</HintPath>
<HintPath>..\Binaries\KSPDev_Utils.0.26.dll</HintPath>
</Reference>
<Reference Include="System">
<HintPath>Q:\KSP_x64_Data\Managed\System.dll</HintPath>
Expand Down
22 changes: 8 additions & 14 deletions Source/modules/KASModuleWinchNew.cs
Original file line number Diff line number Diff line change
Expand Up @@ -479,20 +479,14 @@ public virtual void InstantStretchEvent() {
public virtual void GrabConnectorEvent() {
if (FlightGlobals.ActiveVessel.isEVA && connectorState == ConnectorState.Locked) {
var kerbalTarget = FlightGlobals.ActiveVessel.rootPart.FindModulesImplementing<ILinkTarget>()
.FirstOrDefault(t => t.linkSource == null && t.cfgLinkType == cfgLinkType);
if (kerbalTarget == null) {
HostedDebugLog.Error(
this, "{0} cannot grab the winch connector", FlightGlobals.ActiveVessel.vesselName);
return;
}
if (StartLinking(GUILinkMode.API, LinkActorType.Player)) {
if (LinkToTarget(kerbalTarget)) {
cableJoint.maxAllowedCableLength = cableJoint.cfgMaxCableLength;
} else {
CancelLinking(LinkActorType.API);
HostedDebugLog.Error(this, "Cannot link the winch connector to kerbal {0}",
FlightGlobals.ActiveVessel.vesselName);
}
.FirstOrDefault(t => t.cfgLinkType == cfgLinkType);
if (kerbalTarget != null
&& CheckCanLinkTo(kerbalTarget, reportToGUI: true)
&& StartLinking(GUILinkMode.API, LinkActorType.Player)) {
LinkToTarget(kerbalTarget);
cableJoint.maxAllowedCableLength = cableJoint.cfgMaxCableLength;
} else {
UISoundPlayer.instance.Play(CommonConfig.sndPathBipWrong);
}
}
}
Expand Down
26 changes: 13 additions & 13 deletions Tools/KspReleaseBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def __Step_ExtractVersion(self):
if self.VERSION is None:
print 'ERROR: Cannot extract version from: %s' % file_path
exit(-1)
print '=> found version: v%d.%d, build %d, revision %d' % self.VERSION
print '=> found version: v%d.%d, patch %d, build %d' % self.VERSION


# Updates the source files with the version info.
Expand All @@ -421,8 +421,8 @@ def __Step_UpdateVersionInSources(self):
exit(-1)
content['VERSION']['MAJOR'] = self.VERSION[0]
content['VERSION']['MINOR'] = self.VERSION[1]
content['VERSION']['BUILD'] = self.VERSION[2]
content['VERSION']['PATCH'] = self.VERSION[3]
content['VERSION']['PATCH'] = self.VERSION[2]
content['VERSION']['BUILD'] = self.VERSION[3]
with open(version_file, 'w') as fp:
json.dump(content, fp, indent=4, sort_keys=True)

Expand All @@ -448,26 +448,26 @@ def __Step_MakePackage(self, overwrite_existing):
print '=> stored in:', package_file_name


# Fills VERSION given the string or int compinents. The build and revision could be "*".
def __MakeVersion(self, major, minor, build, revision):
# Fills VERSION given the string or int compinents. The patch and build could be "*".
def __MakeVersion(self, major, minor, patch, build):
# Get build/rev from the binary if it's auto generated.
if build == '*' or revision == '*':
if build == '*' or patch == '*':
filename = self.__MakeSrcPath(self.COMPILED_BINARY)
version = self.__GetFileInfo(filename) or ''
parts = version.split('.')
if build == '*' and len(parts) >= 3:
build = parts[2]
if patch == '*' and len(parts) >= 3:
patch = parts[2]
if len(parts) >= 4:
revision = parts[3]
build = parts[3]
# Handle fallbacks in case of the version wasn't extracted.
if patch == '*':
print 'WARNING: Couldn\'t resolve version PATCH, fallback to 0'
patch = 0
if build == '*':
print 'WARNING: Couldn\'t resolve version BUILD, fallback to 0'
build = 0
if revision == '*':
print 'WARNING: Couldn\'t resolve version REVISION, fallback to 0'
revision = 0
# Fill the version
self.VERSION = (int(major), int(minor), int(build), int(revision))
self.VERSION = (int(major), int(minor), int(patch), int(build))


# Checks if path doesn't try to address file above the root. All path arguments can contain
Expand Down

0 comments on commit fafc9bb

Please sign in to comment.