Skip to content

Commit

Permalink
Merge pull request #93 from BobPalmer/DEVELOP
Browse files Browse the repository at this point in the history
2017.02.05 Release
  • Loading branch information
BobPalmer authored Feb 6, 2017
2 parents 2facc6a + 0335d86 commit c88c48a
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 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.13 - 2017.02.04
------------------
Fixed some nullref spam in Animations related to logistics

0.8.13 - 2017.02.04
------------------
Fixed an issue with the new warehouse toggles
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":13,
"PATCH":14,
"BUILD":0
},
"KSP_VERSION":{
Expand Down
4 changes: 3 additions & 1 deletion USITools/USITools/Logistics/ModuleLogisticsConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ public void FixedUpdate()

}

private List<String> _blackList = new List<string> { "Machinery", "EnrichedUranium", "DepletedFuel", "Construction", "ReplacementParts" };

private void CheckLogistics(List<ResourceRatio> resList, bool output)
{
//Surface only
Expand Down Expand Up @@ -115,7 +117,7 @@ private void CheckLogistics(List<ResourceRatio> resList, bool output)
{
var res = resList[i];
//There are certain exeptions - specifically, anything for field repair.
if (res.ResourceName == "Machinery")
if (_blackList.Contains(res.ResourceName))
continue;

if (res.ResourceName != "ElectricCharge")
Expand Down
12 changes: 7 additions & 5 deletions USITools/USITools/USIAnimation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,11 @@ private bool HasResource(ResourceRatio resInfo)
if (whp == part)
continue;

if (resInfo.ResourceName != "ElectricCharge")
var wh = whp.FindModuleImplementing<USI_ModuleResourceWarehouse>();

if (resInfo.ResourceName != "ElectricCharge" && wh != null)
{
var wh = whp.FindModuleImplementing<USI_ModuleResourceWarehouse>();
if (!wh.localTransferEnabled)
if(!wh.localTransferEnabled)
continue;
}
if (whp.Resources.Contains(resourceName))
Expand Down Expand Up @@ -278,8 +279,9 @@ private void TakeResources(ResourceRatio resInfo)
if (whp == part)
continue;
var wh = whp.FindModuleImplementing<USI_ModuleResourceWarehouse>();
if (!wh.localTransferEnabled)
continue;
if (wh != null)
if(!wh.localTransferEnabled)
continue;
if (whp.Resources.Contains(resourceName))
{
var res = whp.Resources[resourceName];
Expand Down

0 comments on commit c88c48a

Please sign in to comment.