Code Monkey home page Code Monkey logo

dynamicbatterystorage's Introduction

Dynamic Battery Storage

A mod for Kerbal Space Program, intended to ease vessel construction and solve problems related to power flow. Effectively required by Near Future Electrical, Cryogenic Engines, Kerbal Atomics and Cryogenic Tanks.

Features

Dynamic Battery Storage has two components - Vessel Systems Management and Electrical Timewarp Compensation.

Vessel Systems Management

The mod provides a vessel monitoring user interface to assist in looking at your ship's electrical and thermal properties. It is difficult in KSP to look at power flows - how much power you are generating versus how much power you are using - when you start to add a large number of electricity consumers and producers to your vessel. This UI lets you see summaries of how your vessel's power sources and sinks are interacting and lets you size batteries and generators to respond to actual power loads. In a nutshell, it...

  • Shows whole-vessel power flows, separated into consumption and generation, in flight or in the VAB
  • Estimates time to drain or time to charge batteries
  • Can drill down to part categories (eg. Solar Panels, Harvesters, etc.)
  • Can drill down to turn individual parts on or off for simulation purposes
  • The VAB interface has a tool to simulate distance effects on solar panel efficiency

A similar interface can be applied to thermal flows - specifically, core heat, as used in resource converters, resource harvesters and radiators, plus mod parts like fission/fusion reactors. This thermal UI ...

  • Shows whole-vessel core heat flows, separated into consumption and generation, in flight or in the VAB
  • Can drill down to part categories (eg. Radiators, Harvesters, etc.)
  • Can drill down to turn individual parts on or off for simulation purposes
  • NOTE: does not handle non-core heat (eg. re-entry, engines, solar)
  • NOTE: does not make a distinction between adjacent-only radiators and full-vessel radiators

Electrical Timewarp Compensation

This mod dynamically adjusts ElectricCharge (EC) storage to combat the game's awful handling of resource generation/draw mechanics at high timewarp. It should dramatically reduce instances of bad ship consequences due to apparent EC loss at these times.

The mod functions by choosing a electricity-containing part as the 'buffer', and then expanding or contracting its storage temporarily when high timewarp factors are engaged. The size of the buffer is calculated by determining the total amount of electrical draw that all parts contribute in a single physics frame, and determining the total electrical production. If there is truly enough production to meet demand, the storage will be expanded so no timewarp related effects occur.

Supported Mods/Modules

At the moment, DBS needs to be made aware of modules so it can get data from them.

Supported Power Modules

  • ModuleDeployableSolarPanel (Stock)
  • ModuleGenerator (Stock)
  • ModuleResourceConverter (Stock)
  • ModuleActiveRadiator (Stock)
  • ModuleResourceHarvester (Stock)
  • ModuleCommand (Stock)
  • ModuleLight (Stock)
  • ModuleDataTransmitter (Stock)
  • ModuleEngines (Stock)
  • ModuleEnginesFX (Stock)
  • ModuleAlternator (Stock)
  • ModuleScienceConverter (Stock)
  • ModuleCurvedSolarPanel (Near Future Solar)
  • FissionGenerator (Near Future Electrical)
  • DischargeCapacitor (Near Future Electrical)
  • ModuleRadioisotopeGenerator (Near Future Electrical)
  • ModuleCryoTank (CryoTanks)
  • ModuleDeployableCentrifuge (Stockalike Station Parts Expansion Redux)
  • RealBattery (RealBattery)
  • KopernicusSolarPanel (Kopernicus)
  • SoilRecycler (Snacks!)
  • SnackProcessor (Snacks!)
  • ModuleKerbalHealth (Kerbal Health)
  • ModuleSignalDelay (Signal Delay)
  • ModuleRTAntenna (RemoteTech)

Supported Heat Modules

  • ModuleResourceConverter (Stock)
  • ModuleActiveRadiator (Stock)
  • ModuleResourceHarvester (Stock)
  • FissionGenerator (Near Future Electrical)
  • FissionFlowRadiator (Near Future Electrical)

Adding support for your mod is not difficult - contact me if you wish to do so and we can figure it out.

Installation

To install, place the GameData folder inside your Kerbal Space Program folder. If asked to overwrite files, please do so.

NOTE: Do NOT rename or move folders within the GameData folder - this mod uses absolute paths to assets and will break if this happens.

Contributing

I certainly accept pull requests. Please target all such things to the dev branch though!

Licensing

MIT license:

Copyright (c) 2019 Chris Adderley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

dynamicbatterystorage's People

Contributors

blackliner avatar chrisadderley avatar fitiales avatar garwelgarwel avatar hebarusan avatar ksp-taxiservice avatar sirmortimer avatar sooll3 avatar tinygrox avatar vinix38 avatar yalov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dynamicbatterystorage's Issues

Ship randomly stops consuming EC and solar planner is broken.

Im using ksp 1.8

While flying ships powered by solar panels with this mod installed, the electric charge will randomly get stuck to max and will not deplete even when transmitting data. this happens even if the ship is behind a planet. it changes between stuck and normal while time warping long distances. just entering warp for a moment doesnt cause it to change. It also doesnt happen on nuclear ships though kerbal atomics has its own problems.

Also the solar planner in the VAB does not display solar power correctly. In one case it was saying it should be 150% but it actually was 300%. It also does not take into account other stars.

In flight the menu that lists production and consumption does show the correct numbers for nft propulsion engine, but much lower ones, even though the engines themselves are consuming the correct amount and the VAB planner does show the correct values

Also what would happen if i removed this mod? would the nft mods break?

Settings File Missing?

Is there supposed to be a settings file available? I keep getting this in the KSP.log:

[LOG 15:22:39.208] [Dynamic Battery Storage]: Settings: Started loading
[LOG 15:22:39.208] [Dynamic Battery Storage]: Settings: Couldn't find settings file, using defaults
[LOG 15:22:39.209] [Dynamic Battery Storage]: Settings: Finished loading

Support for RealBattery

Hi Chris,

I'd like to add support for my RealBattery mod. IMHO there are 2 things to do:

  • Overthink your algorithm at RefreshVesselElectricalData Don't assume if its a producer it can't be a consumer as well. Why? My batteries are dynamically switching from being a consumer (thats when the battery is charging up) to being a producer (discharging the battery gives EC to the resource pool)
  • extend PowerConsumer and PowerProducer

PR #4

[Add SSTU support?] [Log spam] Could not load type DynamicBatteryStorage.SSTUResourceBoiloffPowerHandler

This issue is mirrored from shadowmage45/SSTULabs#814 .


Environment

Latest version of KSP (1.7.3)

Mods:

Steps to recreate

  1. Launch KSP with mods showed above;
  2. In any save game, build a vessel with battery storage and any SSTU container;
  3. See the log spam in console

图片

^ Example vessel


I suppose it's caused by DynamicBatteryStorage not supporting SSTU's boiloff power usage system.

Power Flow not visible with Kopernicus 1.9.1-1 (CKAN Release)

As Kopernicus changes the ModuleDeployableSolarPanel to KopernicusSolarPanels, that makes all solar panels hidden in the Systems Manager UI. Within DynamicBatteryStorageSettings.cfg, you have a KopernicusSolarPanel in Handlercategory which doesn't catch the name of the current module, but adding module = KopernicusSolarPanels as well as the related partmodulehandler appears to fix the issue.

InvalidOperationException

I'm seeing the same exception constantly in the logs; it's causing performance issues and attached electric engines don't work.

[EXC 15:52:57.850] InvalidOperationException: Operation is not valid due to the current state of the object
	System.Linq.Enumerable.Single[ConfigNode] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback)
	System.Linq.Enumerable.Single[ConfigNode] (IEnumerable`1 source, System.Func`2 predicate)
	DynamicBatteryStorage.ModuleCryoTankPowerHandler.GetFuelTypes ()
	DynamicBatteryStorage.ModuleCryoTankPowerHandler.Initialize (.PartModule pm)
	DynamicBatteryStorage.VesselElectricalData.SetupDataHandler (.PartModule pm)
	DynamicBatteryStorage.VesselData.RefreshData (Boolean fromScratch, System.Collections.Generic.List`1 vesselParts)
	DynamicBatteryStorage.VesselData..ctor (System.Collections.Generic.List`1 vesselParts)
	DynamicBatteryStorage.VesselElectricalData..ctor (System.Collections.Generic.List`1 vesselParts)
	DynamicBatteryStorage.VesselDataManager.RefreshVesselData ()
	DynamicBatteryStorage.VesselDataManager.FixedUpdate ()

mod list:

{
	"kind": "metapackage",
	"abstract": "A list of modules installed on the auto KSP instance",
	"name": "installed-auto",
	"license": "unknown",
	"version": "2019.08.25.11.17.50",
	"identifier": "installed-auto",
	"spec_version": "v1.6",
	"recommends": [
		{
			"name": "MechJeb2"
		},
		{
			"name": "NearFutureConstruction"
		},
		{
			"name": "NearFuturePropulsion-XenonHETs"
		},
		{
			"name": "DistantObject-default"
		},
		{
			"name": "KerbalJointReinforcementNext"
		},
		{
			"name": "NearFutureLaunchVehicles"
		},
		{
			"name": "NearFuturePropulsion"
		},
		{
			"name": "NearFutureSolar"
		},
		{
			"name": "NearFutureSpacecraft"
		},
		{
			"name": "NearFutureSpacecraft-OrbitalLFOEngines"
		},
		{
			"name": "CommunityTechTree"
		},
		{
			"name": "StationPartsExpansionRedux"
		},
		{
			"name": "NearFutureElectrical"
		},
		{
			"name": "KerbalAtomics-NTRModSupport"
		},
		{
			"name": "B9PartSwitch"
		},
		{
			"name": "ModuleManager"
		},
		{
			"name": "CommunityResourcePack"
		},
		{
			"name": "KerbalAtomics"
		},
		{
			"name": "NearFutureSolar-Core"
		},
		{
			"name": "NearFutureProps"
		},
		{
			"name": "CryoTanks-Core"
		},
		{
			"name": "CryoTanks"
		},
		{
			"name": "KerbalAtomics-NFECompatibility"
		},
		{
			"name": "KerbalPlanetaryBaseSystems"
		},
		{
			"name": "CommunityCategoryKit"
		},
		{
			"name": "Chatterer"
		},
		{
			"name": "DMagicOrbitalScience"
		},
		{
			"name": "EnvironmentalVisualEnhancements"
		},
		{
			"name": "EnvironmentalVisualEnhancements-HR"
		},
		{
			"name": "KAS"
		},
		{
			"name": "KIS"
		},
		{
			"name": "NehemiahEngineeringOrbitalScience"
		},
		{
			"name": "ProceduralFairings"
		},
		{
			"name": "SCANsat"
		},
		{
			"name": "EasyVesselSwitch"
		},
		{
			"name": "K2CommandPodCont"
		},
		{
			"name": "ContractConfigurator"
		},
		{
			"name": "ScienceAlert"
		},
		{
			"name": "ProceduralFairings-ForEverything"
		},
		{
			"name": "ClickThroughBlocker"
		},
		{
			"name": "ToolbarController"
		},
		{
			"name": "FASA"
		},
		{
			"name": "HideEmptyTechNodes"
		},
		{
			"name": "IndicatorLights"
		},
		{
			"name": "InterstellarFuelSwitch"
		},
		{
			"name": "InterstellarFuelSwitch-Core"
		},
		{
			"name": "CryoEngines"
		},
		{
			"name": "NovaPunchRebalanced"
		},
		{
			"name": "ReStock"
		},
		{
			"name": "Science-Full-Reward"
		},
		{
			"name": "TACLS"
		},
		{
			"name": "KSPInterstellarExtended"
		},
		{
			"name": "PatchManager"
		},
		{
			"name": "TweakScale"
		},
		{
			"name": "NovaPunchRebalanced-Freyja"
		},
		{
			"name": "NovaPunchRebalanced-Odin"
		},
		{
			"name": "NovaPunchRebalanced-Thor"
		},
		{
			"name": "ReStockPlus"
		},
		{
			"name": "xScienceContinued"
		},
		{
			"name": "Science-Full-Transmit"
		},
		{
			"name": "ContractConfigurator-FieldResearch"
		},
		{
			"name": "BackgroundResources"
		},
		{
			"name": "DistantObject"
		},
		{
			"name": "DynamicBatteryStorage"
		},
		{
			"name": "DeployableEngines"
		},
		{
			"name": "NearFutureElectrical-Core"
		}
	]
}

Reproduce by creating a stack

probe core
fuel tank (full of enriched uranium)
reactor
fuel tank (empty, set to depleted uranium)
cryo tank (fill with argon)
hall effect engine

it shouldn't matter, but I also had a ton of sensors etc on it but I think the above replicates it.

Can provide screenshots if you have issues replicating.

NRE in onPartRemove handler after reverting from flight

Launching, reverting back to the VAB, and removing a part from the vessel triggers an exception in DynamicBatteryStorage version 2.0.1:

[ERR 22:14:49.616] Exception handling event onPartRemove in class EditorVesselDataManager:System.NullReferenceException: Object reference not set to an instance of an object
  at DynamicBatteryStorage.EditorVesselDataManager.RemovePart (.Part p) [0x00000] in <filename unknown>:0 
  at DynamicBatteryStorage.EditorVesselDataManager.onEditorVesselPartRemoved (HostTargetAction`2 p) [0x00000] in <filename unknown>:0 
  at EventData`1[GameEvents+HostTargetAction`2[Part,Part]].Fire (HostTargetAction`2 data) [0x00000] in <filename unknown>:0 

[EXC 22:14:49.804] NullReferenceException: Object reference not set to an instance of an object
        DynamicBatteryStorage.EditorVesselDataManager.RemovePart (.Part p)
        DynamicBatteryStorage.EditorVesselDataManager.onEditorVesselPartRemoved (HostTargetAction`2 p)
        EventData`1[GameEvents+HostTargetAction`2[Part,Part]].Fire (HostTargetAction`2 data)
        UnityEngine.Debug:LogException(Exception)
        EventData`1:Fire(HostTargetAction`2)
        Part:setParent(Part)
        EditorLogic:detachPart(Part)
        EditorLogic:<SetupFSM>m__1F()
        KerbalFSM:RunEvent(KFSMEvent)
        KerbalFSM:updateFSM(KFSMUpdateMode)
        KerbalFSM:UpdateFSM()
        EditorLogic:Update()

I've reproduced this in a new sandbox save in KSP 1.7.3 (on Linux, though I doubt that matters) with no mods besides DynamicBatteryStorage. Test vessel was a Stayputnik, FL-T200 fuel tank, and Terrier engine, with a launch clamp attached to the fuel tank. After going to the launchpad and then doing "revert to vehicle assembly", removing the engine triggered the exception above.

Getting Null Ref Exception in VAB on adding antenna

I have a lot of mods, I think Kerbalism is the prime suspect. So everything works great until I slap on the antenna when it slows down. It's not game breaking but it is annoying, I love stocking up on the comms. IF I delete the antenna, then the NRE immediately stops and the lag ends, its back to normal.

Here's the relevant part of the logs, lmk if you need more. I'm going to take a look at the code myself maybe this weekend.

[EXC 23:14:49.585] NullReferenceException: Object reference not set to an instance of an object
DynamicBatteryStorage.GenericFieldDataHandler.GetValueEditor ()
DynamicBatteryStorage.ModuleDataHandler.GetValue ()
DynamicBatteryStorage.VesselData.get_CurrentConsumption ()
DynamicBatteryStorage.UI.UIElectricalView.UpdateHeaderPanelData ()
DynamicBatteryStorage.UI.UIElectricalView.Update ()
DynamicBatteryStorage.UI.DynamicBatteryStorageUI.Update ()
[EXC 23:14:50.069] NullReferenceException: Object reference not set to an instance of an object
DynamicBatteryStorage.GenericFieldDataHandler.GetValueEditor ()
DynamicBatteryStorage.ModuleDataHandler.GetValue ()
DynamicBatteryStorage.VesselData.get_CurrentConsumption ()
DynamicBatteryStorage.UI.UIElectricalView.UpdateHeaderPanelData ()
DynamicBatteryStorage.UI.UIElectricalView.Update ()
DynamicBatteryStorage.UI.DynamicBatteryStorageUI.Update ()
[EXC 23:14:50.707] NullReferenceException: Object reference not set to an instance of an object
DynamicBatteryStorage.GenericFieldDataHandler.GetValueEditor ()
DynamicBatteryStorage.ModuleDataHandler.GetValue ()
DynamicBatteryStorage.VesselData.get_CurrentConsumption ()
DynamicBatteryStorage.UI.UIElectricalView.UpdateHeaderPanelData ()
DynamicBatteryStorage.UI.UIElectricalView.Update ()
DynamicBatteryStorage.UI.DynamicBatteryStorageUI.Update ()
[EXC 23:14:51.116] NullReferenceException: Object reference not set to an instance of an object
DynamicBatteryStorage.GenericFieldDataHandler.GetValueEditor ()
DynamicBatteryStorage.ModuleDataHandler.GetValue ()
DynamicBatteryStorage.VesselData.get_CurrentConsumption ()
DynamicBatteryStorage.UI.UIElectricalView.UpdateHeaderPanelData ()
DynamicBatteryStorage.UI.UIElectricalView.Update ()
DynamicBatteryStorage.UI.DynamicBatteryStorageUI.Update ()

Kerbalism 3 Support please

Currently the mod is wildly inaccurate in calculating ec usage by data transmitters (reads 9.3 ec/s when it should be 0.02 ec/s) probably b/c kerbalism changes how science transmission works.

ReFactor feedback

Hi Nertea, been testing the refactor and I'll post any feedback or issues I have here.

  1. In the VAB planner I found that if I check a part that is disabled by default such as an engine or transmitter, it becomes unchecked as soon as a change is made to the craft. It could be a bit tedious having to re-enable say a cluster of ion engines everytime you add a battery or change capacitor discharge rate or whatever.

  2. If possible, I think adding support for life support EC consumption for the popular life support mods (TAC, USI, Snacks, Kerbalism) could be nice. Perhaps its not as easy as it sounds? With Amp Year and TAC, the module life support shows up in the amp year planner at least, but without a value.

  3. Looks like capacitors have the opposite problem to no.1, they are always automatically checked when a change is made.

  4. Capacitors appear under batteries in the consuption side of the UI. However it seems to contribute just fine as a power source in the calculations.

This UI is v v cool btw :) Far easier than amp year.

Add ClickThroughBlocker functionality to the UI

Hi

I'm getting more and more frustrated with this mod letting clicks through the windows, causing my ships to lose parts or misplacing them. Sometimes it's just an annoyance, most times it causes me having to redo half of the ship.

Why not add ClickThroughBlocker functionality to it? From what I read it's not too complicated a procedure.

UI Scale

Would you consider adding an option for scaling the window size? I find the text to be right on the edge of what I can manage to read, a little bigger would be a huge help to me and others that have vision issues.

SSTU solar panels

Hi.

I see there is SSTUPowerHandlers in repository. Although it isn't added to project. Does it mean that SSTU solar panels aren't supported?

Thank you in advance for reply.

NRE in DBS GUI if there are no powerConsumers

Hi Chris,

one of those 2 lines is throwing NRE's if there are no consumers:

https://github.com/ChrisAdderley/DynamicBatteryStorage/blob/master/Source/DynamicBatteryStorage/DynamicBatteryStorageUI.cs#L158-L159

Errors from KSP.log:

NullReferenceException: Object reference not set to an instance of an object
at DynamicBatteryStorage.DynamicBatteryStorageUI.PowerWindow (Int32 windowId) [0x00000] in :0
at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in :0

(Filename: Line: -1)

GUI Error: You are pushing more GUIClips than you are popping. Make sure they are balanced)

(Filename: Line: 422)

Reproduce:

  • Launch a new vessel with only one part (any probecore will do)
  • open GUI (CTRL + SHIFT + k)
  • warp >= 100

Serious Log Spam

KSP Version 1.7.3 Both DLC's
Dynamic Battery Storage version 2.02.0 (installed via CKAN)

Logs
ArgumentNullException: Argument cannot be null. Parameter name: type at System.Activator.CheckType (System.Type type) [0x00000] in <filename unknown>:0 at System.Activator.CreateInstance (System.Type type, BindingFlags bindingAttr, System.Reflection.Binder binder, System.Object[] args, System.Globalization.CultureInfo culture, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 at System.Activator.CreateInstance (System.Type type, System.Object[] args, System.Object[] activationAttributes) [0x00000] in <filename unknown>:0 at System.Activator.CreateInstance (System.Type type, System.Object[] args) [0x00000] in <filename unknown>:0 at DynamicBatteryStorage.VesselElectricalData.SetupDataHandler (.PartModule pm) [0x00000] in <filename unknown>:0 at DynamicBatteryStorage.VesselData.RefreshData (Boolean fromScratch, System.Collections.Generic.List1 vesselParts) [0x00000] in :0
at DynamicBatteryStorage.VesselData..ctor (System.Collections.Generic.List1 vesselParts) [0x00000] in <filename unknown>:0 at DynamicBatteryStorage.VesselElectricalData..ctor (System.Collections.Generic.List1 vesselParts) [0x00000] in :0
at DynamicBatteryStorage.VesselDataManager.RefreshVesselData () [0x00000] in :0
at DynamicBatteryStorage.VesselDataManager.FixedUpdate () [0x00000] in :0 `

is spamming about every second

also Dynamic Batter Storage Offline

Surface Darkness Time

Could an enhancement be added to the planner to toggle between the current orbital options, to a landed at surface mode? Then just have a flat calculation for how long the night time is on the selected body.

Dynamic Battery Storage doesnt recognize electricity use by other mods

Would it be possible for this mod to work with TAC life support mod, because I have the issue of running out of electricity when time warping which results in my kerbals dying. The mod works great with other means of power consumption though(TAC life support drains electric charge per kerbal just to keep them alive). If it wouldn't be possible does anyone know of an alternate solution to this.

KopernicusSolarPanel

the module "KopernicusSolarPanel" is going to be overhauled completely in the next kopernicus release and it will no longer replace the stock SolarPanel modules

The module itself will also be renamed to "KopernicusSolarPanels" which will trigger some NRE for mods that refer to "KopernicusSolarPanel"

I am torn between keeping an empty "KopernicusSolarPanel" module to avoid breaking mods that might refer to it, but at the same time if the issues don't show up people will not know that they need to change their mods.

I noticed that this mod refers to "KopernicusSolarPanel" so if you need help with switching to the new ones just let me know

Harden initializers that use config database searching.

Hi Chris,

  • System: Windows 10 x64
  • KSP: v1.7.3
  • Dynamic Battery Storage: v2.0.5.0

I keep getting this exception:

[EXC 15:20:03.505] InvalidOperationException: Operation is not valid due to the current state of the object
	System.Linq.Enumerable.Single[ConfigNode] (IEnumerable`1 source, System.Func`2 predicate, Fallback fallback)
	System.Linq.Enumerable.Single[ConfigNode] (IEnumerable`1 source, System.Func`2 predicate)
	DynamicBatteryStorage.ModuleCryoTankPowerHandler.GetFuelTypes ()
	DynamicBatteryStorage.ModuleCryoTankPowerHandler.Initialize (.PartModule pm)
	DynamicBatteryStorage.VesselElectricalData.SetupDataHandler (.PartModule pm)
	DynamicBatteryStorage.VesselData.RefreshData (Boolean fromScratch, System.Collections.Generic.List`1 vesselParts)
	DynamicBatteryStorage.VesselData..ctor (System.Collections.Generic.List`1 vesselParts)
	DynamicBatteryStorage.VesselElectricalData..ctor (System.Collections.Generic.List`1 vesselParts)
	DynamicBatteryStorage.VesselDataManager.RefreshVesselData ()
	DynamicBatteryStorage.VesselDataManager.FixedUpdate ()

https://github.com/ChrisAdderley/DynamicBatteryStorage/blob/63f8a4aecf14ba5e11e9dd88805f64db28fe6dcb/Source/DynamicBatteryStorage/Handlers/Power/NFTPowerHandlers.cs#L103-L111

As far as I can tell Single raises an InvalidOperationException on the following conditions:

  • No element satisfies the condition in predicate.
  • More than one element satisfies the condition in predicate.
  • The source sequence is empty.

I can't tell exactly which one of the above conditions happens here.

Please tell me if you need more information.

Thanks a lot!


Log file (2.8 MB; warning 768 MB when decompressed):
KSP.zip

First occurrence at line 51593.

QoL Change - Celestial Body Increment Button ++ & --

I was thinking that it could be a potential QoL improvement if the Celestial Body selector button in the electrical panel could increment ++ with a left click and -- with a right click so that you don't have to cycle all the way through all the bodies if you accidentally pass the one you need.

Untitled-1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.