Skip to content

Commit

Permalink
Merge pull request #1095 from BobPalmer/DEVELOP
Browse files Browse the repository at this point in the history
2017.01.08 Update
  • Loading branch information
BobPalmer authored Jan 8, 2017
2 parents 7c838a5 + 22e4ef2 commit c110884
Show file tree
Hide file tree
Showing 24 changed files with 141 additions and 22 deletions.
4 changes: 4 additions & 0 deletions FOR_RELEASE/GameData/000_USITools/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.8.8 - 2017.01.01
-------------------
Fixed bug w/swappable converter multi-bays

0.8.8 - 2017.01.01
-------------------
Dependency Updates
Expand Down
Binary file modified FOR_RELEASE/GameData/000_USITools/USITools.dll
Binary file not shown.
Binary file modified FOR_RELEASE/GameData/000_USITools/USITools.dll.mdb
Binary file not shown.
Binary file modified FOR_RELEASE/GameData/000_USITools/USITools.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion FOR_RELEASE/GameData/000_USITools/USITools.version
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"VERSION":{
"MAJOR":0,
"MINOR":8,
"PATCH":8,
"PATCH":9,
"BUILD":0
},
"KSP_VERSION":{
Expand Down
Binary file not shown.
9 changes: 9 additions & 0 deletions FOR_RELEASE/GameData/UmbraSpaceIndustries/MKS/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
0.50.11 - 2017.01.08
--------------------
Fixed an issue where multi-bay modules were not operating at peak efficiency (Note that this is a USI Tools change so be sure to have the latest version! This is why I bundle MiniAVC ;))
Reduced the size of Resource Lodes to 5kl
Added a new resource lode that can be found via the orbital survey scanner. Unlike the smaller ones found with the Pioneer module, these are planet-wide and significantly larger (500kl).
Scouts can now be recruited.
The USI-LS window no longer conflicts with the Kolonization Dashboard.
Fixed prices of Tundra manufacturing modules.

0.50.10 - 2017.01.07
--------------------
Added the ExplorerSkill effect and Scout trait. Explorers (which include Scouts and Pilots) are immune from habitation effects in USI-LS.
Expand Down
Binary file modified FOR_RELEASE/GameData/UmbraSpaceIndustries/MKS/KolonyTools.dll
Binary file not shown.
Binary file modified FOR_RELEASE/GameData/UmbraSpaceIndustries/MKS/KolonyTools.dll.mdb
Binary file not shown.
Binary file modified FOR_RELEASE/GameData/UmbraSpaceIndustries/MKS/KolonyTools.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion FOR_RELEASE/GameData/UmbraSpaceIndustries/MKS/MKS.version
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"VERSION":{
"MAJOR":0,
"MINOR":50,
"PATCH":10,
"PATCH":11,
"BUILD":0
},
"KSP_VERSION":{
Expand Down
7 changes: 4 additions & 3 deletions FOR_RELEASE/GameData/UmbraSpaceIndustries/MKS/Parts/Rock.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ PART
MODEL
{
model = UmbraSpaceIndustries/MKS/Assets/Rock
scale=0.6,0.6,0.6
}
rescaleFactor = 1
node_attach = 0.0, -0.5, 0.0, 0.0, -1.0, 0.0
Expand All @@ -23,7 +24,7 @@ PART
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 1
crashTolerance = 80
crashTolerance = 8000
breakingForce = 200
breakingTorque = 200
maxTemp = 2000 // = 5000
Expand All @@ -36,8 +37,8 @@ PART
RESOURCE
{
name = ResourceLode
amount = 25000
maxAmount = 25000
amount = 5000
maxAmount = 5000
isTweakable = true
}
}
Expand Down
45 changes: 45 additions & 0 deletions FOR_RELEASE/GameData/UmbraSpaceIndustries/MKS/Parts/Rock2.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
PART
{
name = UsiExplorationRock2
module = Part
author = RoverDude
MODEL
{
model = UmbraSpaceIndustries/MKS/Assets/Rock2
scale=2,2,2
}
rescaleFactor = 1
node_attach = 0.0, -0.5, 0.0, 0.0, -1.0, 0.0
TechRequired = Unresearcheable
entryCost = 0
cost = 25
category = none
subcategory = 0
title = Resource Lode
manufacturer = Umbra Space Industries
description = A chunk of easily accessed resources
attachRules = 1,1,1,1,0
mass = 0.01
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 1
crashTolerance = 8000
breakingForce = 200
breakingTorque = 200
maxTemp = 2000 // = 5000

MODULE
{
name = ModuleResourceLode
}

RESOURCE
{
name = ResourceLode
amount = 500000
maxAmount = 500000
isTweakable = true
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PART

TechRequired = advConstruction
entryCost = 8100
cost = 13600
cost = 55620
category = none
subcategory = 0
title = MKS 'Tundra' Agriculture Support Module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PART

TechRequired = advConstruction
entryCost = 8100
cost = 13600
cost = 55620
category = none
subcategory = 0
title = MKS 'Tundra' Assembly Plant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PART

TechRequired = advConstruction
entryCost = 8100
cost = 310000
cost = 93600
category = none
subcategory = 0
title = MKS 'Tundra' Nuclear Fuel Plant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PART

TechRequired = advConstruction
entryCost = 8100
cost = 13600
cost = 56410
category = none
subcategory = 0
title = MKS 'Tundra' Recycling Module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PART

TechRequired = advConstruction
entryCost = 8100
cost = 13600
cost = 55620
category = none
subcategory = 0
title = MKS 'Tundra' Industrial Refinery
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PART

TechRequired = advConstruction
entryCost = 8100
cost = 13600
cost = 56410
category = none
subcategory = 0
title = MKS 'Tundra' Industrial Regolith Sifter
Expand Down
13 changes: 13 additions & 0 deletions FOR_RELEASE/GameData/UmbraSpaceIndustries/MKS/StockTweaks.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,19 @@
}
}

@PART[SurveyScanner]
{
MODULE
{
name = ModuleResourceSurveyor
allowHomeBody = true
lodePart = UsiExplorationRock2
lodeRange = 90
altModifier = 0.5
}
}


@PART[ISRU]
{
MODULE
Expand Down
Binary file modified Source/KolonyTools/.vs/KolonyTools/v14/.suo
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,12 @@ private void TransferSetup()
void Awake()
{
_kolonists = new List<Kolonist>();
_kolonists.Add(new Kolonist { Name = "Pilot", Cost = 250000, Effects = "Autopilot, VesselControl, RepBoost, Logistics" });
_kolonists.Add(new Kolonist { Name = "Pilot", Cost = 250000, Effects = "Autopilot, VesselControl, RepBoost, Logistics, Explorer" });
_kolonists.Add(new Kolonist { Name = "Scientist", Cost = 250000, Effects = "Science, Experiment, Botany, Agronomy, Medical, ScienceBoost" });
_kolonists.Add(new Kolonist { Name = "Engineer", Cost = 250000, Effects = "Repair, Converter, Drill, Geology, FundsBoost" });
_kolonists.Add(new Kolonist { Name = "Kolonist", Cost = 10000, Effects = "RepBoost, FundsBoost, ScienceBoost" });
_kolonists.Add(new Kolonist { Name = "Scout", Cost = 10000, Effects = "Explorer" });
_kolonists.Add(new Kolonist { Name = "Kolonist", Cost = 10000, Effects = "RepBoost, FundsBoost, ScienceBoost" });
_kolonists.Add(new Kolonist { Name = "Miner", Cost = 10000, Effects = "Drill, FundsBoost" });
_kolonists.Add(new Kolonist { Name = "Technician", Cost = 10000, Effects = "Converter, FundsBoost" });
_kolonists.Add(new Kolonist { Name = "Mechanic", Cost = 10000, Effects = "Repair, FundsBoost" });
Expand Down Expand Up @@ -162,7 +164,7 @@ private void OnGUI()

private void Ondraw()
{
_windowPosition = GUILayout.Window(10, _windowPosition, OnWindow, "Kolonization Dashboard", _windowStyle);
_windowPosition = GUILayout.Window(12, _windowPosition, OnWindow, "Kolonization Dashboard", _windowStyle);
}

private void OnWindow(int windowId)
Expand Down
63 changes: 54 additions & 9 deletions Source/KolonyTools/KolonyTools/ModuleResourceSurveyor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,60 @@ public override void OnStart(StartState state)
_rnd = new Random();
}

[KSPField]
public double lodeRange = 0.5d;

[KSPField]
public bool allowHomeBody = false;

[KSPField]
public int maxLodes = 5;

[KSPField]
public string lodePart = "UsiExplorationRock";

[KSPField]
public double altModifier = 0d;


private ModuleAnimationGroup _ani;

[KSPEvent(guiActive = true, guiName = "Scan for resource lodes", active = true)]
public void ResourceScan()
{
PerformScan();
}

public override void OnStartFinished(StartState state)
{
base.OnStartFinished(state);
_ani = part.FindModuleImplementing<ModuleAnimationGroup>();
}

private void PerformScan()
{
var numLodes = 0;
string msg;

if (FlightGlobals.currentMainBody == FlightGlobals.GetHomeBody())
if (_ani != null && !_ani.isDeployed)
{
msg = string.Format("There are no resource lodes available on Kerbin!");
msg = string.Format("Must deploy first!");
ScreenMessages.PostScreenMessage(msg, 5f, ScreenMessageStyle.UPPER_CENTER);
return;
}

var minAlt = vessel.mainBody.Radius*altModifier;
if(altModifier > ResourceUtilities.FLOAT_TOLERANCE
&& (vessel.altitude < minAlt || vessel.altitude > minAlt*2d))
{
msg = string.Format("Must perform scan at an altitude between {0:0}km and {1:0}km.", minAlt/1000, minAlt*2/1000);
ScreenMessages.PostScreenMessage(msg, 5f, ScreenMessageStyle.UPPER_CENTER);
return;
}

if (FlightGlobals.currentMainBody == FlightGlobals.GetHomeBody() && !allowHomeBody)
{
msg = string.Format("There are no resource lodes available on " + FlightGlobals.GetHomeBody().bodyName + "!");
ScreenMessages.PostScreenMessage(msg, 5f, ScreenMessageStyle.UPPER_CENTER);
return;
}
Expand All @@ -37,10 +82,10 @@ public void ResourceScan()
{
if (v.protoVessel.protoPartSnapshots.Count > 1)
continue;
foreach (ProtoPartModuleSnapshot pm in v.protoVessel.protoPartSnapshots[0].modules)

if(v.protoVessel.protoPartSnapshots[0].partName == lodePart)
{
if (pm.moduleName == "ModuleResourceLode")
numLodes++;
numLodes++;
}
}
else
Expand All @@ -53,7 +98,7 @@ public void ResourceScan()
}
}

if (numLodes >= 5)
if (numLodes >= maxLodes)
{
msg = string.Format("Too many resource lodes active - Harvest some first!");
ScreenMessages.PostScreenMessage(msg, 5f, ScreenMessageStyle.UPPER_CENTER);
Expand All @@ -62,12 +107,12 @@ public void ResourceScan()

var lode = new LodeData();
lode.name = "Resource Lode";
lode.craftPart = PartLoader.getPartInfoByName("UsiExplorationRock");
lode.craftPart = PartLoader.getPartInfoByName(lodePart);
lode.vesselType = VesselType.Unknown;
lode.body = FlightGlobals.currentMainBody;
lode.orbit = null;
lode.latitude = RandomizePosition(part.vessel.latitude, 0.5d);
lode.longitude = RandomizePosition(part.vessel.longitude, 0.5d);
lode.latitude = RandomizePosition(part.vessel.latitude, lodeRange);
lode.longitude = RandomizePosition(part.vessel.longitude, lodeRange);
lode.altitude = null;
CreateLode(lode);
msg = string.Format("A new resource lode has been discovered and added to your map!");
Expand Down

0 comments on commit c110884

Please sign in to comment.