Skip to content

Commit

Permalink
Merge pull request #100 from BobPalmer/DEVELOP
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
BobPalmer committed Mar 30, 2016
2 parents a4b7732 + 93a48f9 commit a2e0899
Show file tree
Hide file tree
Showing 23 changed files with 212 additions and 28 deletions.
6 changes: 6 additions & 0 deletions FOR_RELEASE/GameData/000_USITools/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
0.7.0 - 2016.03.29
------------------
Compatibility with KSP 1.1
Moved out DynamicTanks DLL to ART
Info text / GUI text for Power Distributors, Couplers, and Warehouses (thanks bennord!)

0.6.3 - 2016.03.02
------------------
Logistics pulls are now restricted to warehouses
Expand Down
Binary file not shown.
Binary file modified FOR_RELEASE/GameData/000_USITools/USITools.dll
Binary file not shown.
12 changes: 6 additions & 6 deletions FOR_RELEASE/GameData/000_USITools/USITools.version
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
},
"VERSION":{
"MAJOR":0,
"MINOR":6,
"PATCH":3,
"MINOR":7,
"PATCH":0,
"BUILD":0
},
"KSP_VERSION":{
"MAJOR":1,
"MINOR":0,
"PATCH":5
"MINOR":1,
"PATCH":0
},
"KSP_VERSION_MIN":{
"MAJOR":1,
Expand All @@ -25,7 +25,7 @@
},
"KSP_VERSION_MAX":{
"MAJOR":1,
"MINOR":0,
"PATCH":5
"MINOR":1,
"PATCH":0
}
}
Binary file removed FOR_RELEASE/GameData/ModuleManager.2.6.18.dll
Binary file not shown.
Binary file added FOR_RELEASE/GameData/ModuleManager.dll
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
0.3.15 - 2015.03.03
0.4.0 - 2016.03.29
-------------
Compatibility with KSP 1.1

0.3.15 - 2016.03.03
-------------------
Fixed that bug. For real this time.

0.3.14 - 2015.03.03
0.3.14 - 2016.03.03
-------------------
Fixed a bug with resource consumption

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
PART
{
name = Fert_Tank_125
module = Part
author = RoverDude

MODEL
{
model = UmbraSpaceIndustries/LifeSupport/Parts/FertTank125
}

rescaleFactor = 1

node_attach = 0,0,0.6,0,0,-1,1
node_stack_top = 0.0, .25, 0.0, 0.0, 1.0, 0.0, 1
node_stack_bottom = 0.0, -.25, 0.0, 0.0, -1.0, 0.0, 1


TechRequired = survivability
entryCost = 3000
cost = 500
category = Utility
subcategory = 0
title = Fertilizer Tank (1.25)
manufacturer = Umbra Space Industries
description = A tank filled to the brim with Super-Gro Fertilizer. It's what plants crave!
attachRules = 1,1,1,1,0
// --- standard part parameters ---
mass = 0.1
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 7
maxTemp = 2000 // = 3000
bulkheadProfiles = size1,srf
RESOURCE
{
name = Fertilizer
amount = 500
maxAmount = 500
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
PART
{
name = Fert_Tank_250
module = Part
author = RoverDude

MODEL
{
model = UmbraSpaceIndustries/LifeSupport/Parts/FertTank250
}

rescaleFactor = 1

node_attach = 0,0,1.2,0,0,-1,2
node_stack_top = 0.0, .5, 0.0, 0.0, 1.0, 0.0, 2
node_stack_bottom = 0.0, -.5, 0.0, 0.0, -1.0, 0.0, 2


TechRequired = survivability
entryCost = 3000
cost = 1000
category = Utility
subcategory = 0
title = Fertilizer Tank (2.5)
manufacturer = Umbra Space Industries
description = A tank filled to the brim with Super-Gro Fertilizer. It's what plants crave!
attachRules = 1,1,1,1,0
// --- standard part parameters ---
mass = 0.9
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 7
maxTemp = 2000 // = 3000
bulkheadProfiles = size2,srf
RESOURCE
{
name = Fertilizer
amount = 4500
maxAmount = 4500
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
PART
{
name = Fert_Tank_375
module = Part
author = RoverDude

MODEL
{
model = UmbraSpaceIndustries/LifeSupport/Parts/FertTank375
}
rescaleFactor = 1

node_attach = 0,0,1.8,0,0,-1,3
node_stack_top = 0.0, .75, 0.0, 0.0, 1.0, 0.0, 3
node_stack_bottom = 0.0, -.75, 0.0, 0.0, -1.0, 0.0, 3


TechRequired = survivability
entryCost = 3000
cost = 1500
category = Utility
subcategory = 0
title = Fertilizer Tank (3.75)
manufacturer = Umbra Space Industries
description = A tank filled to the brim with Super-Gro Fertilizer. It's what plants crave!
attachRules = 1,1,1,1,0
// --- standard part parameters ---
mass = 3.0
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 2
crashTolerance = 7
maxTemp = 2000 // = 3000
bulkheadProfiles = size3,srf
RESOURCE
{
name = Fertilizer
amount = 15000
maxAmount = 15000
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,23 @@
},
"VERSION":{
"MAJOR":0,
"MINOR":3,
"PATCH":15,
"MINOR":4,
"PATCH":0,
"BUILD":0
},
"KSP_VERSION":{
"MAJOR":1,
"MINOR":0,
"PATCH":5
"MINOR":1,
"PATCH":0
},
"KSP_VERSION_MIN":{
"MAJOR":1,
"MINOR":0,
"MINOR":1,
"PATCH":0
},
"KSP_VERSION_MAX":{
"MAJOR":1,
"MINOR":0,
"PATCH":5
"MINOR":1,
"PATCH":0
}
}
Binary file not shown.
3 changes: 1 addition & 2 deletions Source/USILifeSupport/LifeSupportManager.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using KolonyTools;
using System;
using System.Collections.Generic;
using System.Linq;
using KolonyTools;
using UnityEngine;



namespace LifeSupport
{
public class LifeSupportManager : MonoBehaviour
Expand Down
19 changes: 17 additions & 2 deletions Source/USILifeSupport/LifeSupportMonitor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using System.Linq;
using System.Reflection;
using System.Text;
using KSP.UI.Screens;
using UnityEngine;
using Random = System.Random;

Expand Down Expand Up @@ -34,6 +35,7 @@ public class LifeSupportMonitor : MonoBehaviour
private GUIStyle _scrollStyle;
private Vector2 scrollPos = Vector2.zero;
private bool _hasInitStyles = false;
public static bool renderDisplay = false;

void Awake()
{
Expand All @@ -47,7 +49,7 @@ void Awake()

private void GuiOn()
{
RenderingManager.AddToPostDrawQueue(144, Ondraw);
renderDisplay = true;
}

public void Start()
Expand All @@ -58,7 +60,20 @@ public void Start()

private void GuiOff()
{
RenderingManager.RemoveFromPostDrawQueue(144, Ondraw);
renderDisplay = false;
}


private void OnGUI()
{
if (!renderDisplay)
return;

if (Event.current.type == EventType.Repaint || Event.current.isMouse)
{
//preDrawQueue
}
Ondraw();
}


Expand Down
19 changes: 17 additions & 2 deletions Source/USILifeSupport/LifeSupportMonitor_Editor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System.Linq;
using System.Reflection;
using System.Collections.Generic;
using KSP.UI.Screens;
using UnityEngine;

namespace LifeSupport
Expand All @@ -18,6 +19,8 @@ public class LifeSupportMonitor_Editor : MonoBehaviour
private GUIStyle _scrollStyle;
private Vector2 scrollPos = Vector2.zero;
private bool _hasInitStyles = false;
public static bool renderDisplay = false;


void Awake()
{
Expand All @@ -31,7 +34,7 @@ void Awake()

private void GuiOn()
{
RenderingManager.AddToPostDrawQueue(144, Ondraw);
renderDisplay = true;
}

public void Start()
Expand All @@ -42,7 +45,19 @@ public void Start()

private void GuiOff()
{
RenderingManager.RemoveFromPostDrawQueue(144, Ondraw);
renderDisplay = false;
}

private void OnGUI()
{
if (!renderDisplay)
return;

if (Event.current.type == EventType.Repaint || Event.current.isMouse)
{
//preDrawQueue
}
Ondraw();
}


Expand Down
9 changes: 4 additions & 5 deletions Source/USILifeSupport/ModuleLifeSupport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ public void FixedUpdate()
try
{
bool isLongLoop = false;
bool offKerbin = !LifeSupportManager.IsOnKerbin(part.vessel);

bool offKerbin = true;
if(HighLogic.LoadedSceneIsFlight)
offKerbin = !LifeSupportManager.IsOnKerbin(part.vessel);

UnlockTins();
//Check our time
double deltaTime = GetDeltaTime();
Expand All @@ -105,9 +107,6 @@ public void FixedUpdate()
isLongLoop = true;
_lastProcessingTime = Planetarium.GetUniversalTime();
}



var v = LifeSupportManager.Instance.FetchVessel(part.vessel.id.ToString());
v.LastUpdate = Planetarium.GetUniversalTime();
v.VesselName = part.vessel.vesselName;
Expand Down
2 changes: 1 addition & 1 deletion Source/USILifeSupport/ModuleLifeSupportRecycler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class ModuleLifeSupportRecycler : ModuleResourceConverter
[KSPField]
public float RecyclePercent = 0f;

[KSPField]
[KSPField(isPersistant = true)]
public bool RecyclerIsActive = false;

protected override void PostProcess(ConverterResults result, double deltaTime)
Expand Down
9 changes: 8 additions & 1 deletion Source/USILifeSupport/USILifeSupport.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
<HintPath>..\..\..\..\KSP_DEV\KSP_Data\Managed\Assembly-CSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="KSPUtil">
<HintPath>..\..\..\..\KSP_DEV\KSP_Data\Managed\KSPUtil.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
Expand All @@ -45,9 +49,12 @@
<HintPath>..\..\..\..\KSP_DEV\KSP_Data\Managed\UnityEngine.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>..\..\..\..\KSP_DEV\KSP_Data\Managed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="USITools">
<HintPath>..\..\..\..\KSP_DEV\GameData\000_USITools\USITools.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit a2e0899

Please sign in to comment.