Skip to content

Commit

Permalink
KSP2 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Safarte committed Dec 20, 2023
1 parent bf2a0c9 commit 03dcc38
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions plugin_template/swinfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "Kerbal Life-Support System",
"description": "Kerbals need their Snacks.",
"source": "https://github.com/Safarte/KerbalLifeSupportSystem",
"version": "0.4.1",
"version": "0.5.0",
"version_check": "https://raw.githubusercontent.com/Safarte/KerbalLifeSupportSystem/main/plugin_template/swinfo.json",
"ksp2_version": {
"min": "0.1.5",
Expand All @@ -29,7 +29,7 @@
{
"id": "PatchManager",
"version": {
"min": "0.3.0",
"min": "0.5.0",
"max": "*"
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/KerbalLifeSupportSystem/KerbalLifeSupportSystem.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageReference Include="BepInEx.Core" Version="5.*"/>
<PackageReference Include="BepInEx.PluginInfoProps" Version="2.*"/>
<PackageReference Include="HarmonyX" Version="2.10.1"/>
<PackageReference Include="KerbalSpaceProgram2.GameLibs" Version="0.1.5" PrivateAssets="all"/>
<PackageReference Include="KerbalSpaceProgram2.GameLibs" Version="0.2.0" PrivateAssets="all"/>
<PackageReference Include="SpaceWarp" Version="1.5.2"/>
<PackageReference Include="UitkForKsp2" Version="2.0.0"/>
<PackageReference Include="UnityEngine.Modules" Version="2022.3.5"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ public class Module_LifeSupportConsumer : PartBehaviourModule

public override Type PartComponentModuleType => typeof(PartComponentModule_LifeSupportConsumer);

public override void AddDataModules()
protected override void AddDataModules()
{
base.AddDataModules();
_dataLifeSupportConsumer ??= new Data_LifeSupportConsumer();
DataModules.TryAddUnique(_dataLifeSupportConsumer, out _dataLifeSupportConsumer);
}

public override void OnInitialize()
protected override void OnInitialize()
{
base.OnInitialize();
if (PartBackingMode == PartBackingModes.Flight) moduleIsEnabled = true;
}

public override void OnModuleOABFixedUpdate(float deltaTime)
protected override void OnModuleOABFixedUpdate(float deltaTime)
{
if ((OABPart == null || !(_dataLifeSupportConsumer.RequestHandle == ResourceFlowRequestHandle.InvalidID))
&& (resourceFlowRequestBroker == null ||
Expand Down

0 comments on commit 03dcc38

Please sign in to comment.