Parts which are already solar panels AND batteries get a 2nd block of RESOURCE[ElectricCharge]
Gordon-Dry opened this issue ยท 7 comments
For example the part
GameData/Bluedog_DB/Parts/ProbeExpansion/bluedog_solarBattery.cfg
looks like this in the MM cache:
UrlConfig
{
parentUrl = Bluedog_DB/Parts/ProbeExpansion/bluedog_solarBattery.cfg
PART
{
name = bluedog_solarBattery
module = Part
author = CobaltWolf
rescaleFactor = 1.2
node_attach = 0.0, 0.0, -0.01, 0.0, 0.0, 1.0
TechRequired = engineering101
entryCost = 1200
cost = 100
category = Electrical
subcategory = 0
title = HLR-15 Solar Battery
manufacturer = Bluedog Design Bureau
description = This arrangement of three small solar panels includes a battery. They can either charge the battery or provide power directly to your spacecraft systems.
attachRules = 0,1,0,0,1
mass = 0.002
dragModelType = default
maximum_drag = 0.2
minimum_drag = 0.2
angularDrag = 1
crashTolerance = 8
maxTemp = 1200
PhysicsSignificance = 1
bulkheadProfiles = srf
tags = solar
MODEL
{
model = Bluedog_DB/Parts/ProbeExpansion/bluedog_solarBattery
}
MODULE
{
name = ModuleDeployableSolarPanel
sunTracking = false
raycastTransformName = catchThis
pivotName = catchThis
isBreakable = false
resourceName = ElectricCharge
chargeRate = 0.0875
}
RESOURCE
{
name = ElectricCharge
amount = 15
maxAmount = 15
}
MODULE
{
name = TweakScale
type = free_square
}
MODULE
{
isEnabled = True
name = BuoyancyControl
enabled = true
}
MODULE
{
name = GeometryPartModule
}
MODULE
{
name = FARAeroPartModule
}
MODULE
{
name = FARPartModule
}
MODULE
{
name = SolarPanelFixer
}
MODULE
{
name = Reliability
type = SolarPanelFixer
title = Solar Panel
redundancy = Power Generation
repair = true
mtbf = 36288000
extra_cost = 2.5
extra_mass = 1.0
rated_radiation = 0.09
radiation_decay_rate = 10
}
MODULE
{
name = FNSolarPanelWasteHeatModule
}
RESOURCE
{
name = Megajoules
amount = 0
maxAmount = 0.001
isTweakable = false
hideFlow = false
}
RESOURCE
{
name = ElectricCharge
amount = 0
maxAmount = 0.001
isTweakable = false
hideFlow = false
}
}
}
It should be enough to change the first block in
GameData\WarpPlugin\Patches\SolarPanels.cfg
from
@PART[*]:HAS[@MODULE[ModuleDeployableSolarPanel]:HAS[#chargeRate[>0]]]:FOR[WarpPlugin]
{
MODULE
{
name = FNSolarPanelWasteHeatModule
}
RESOURCE
{
name = Megajoules
amount = 0
maxAmount = 0.001
isTweakable = false
hideFlow = false
}
RESOURCE
{
name = ElectricCharge
amount = 0
maxAmount = 0.001
isTweakable = false
hideFlow = false
}
}
to these 2 blocks:
@PART[*]:HAS[@MODULE[ModuleDeployableSolarPanel]:HAS[#chargeRate[>0]]]:FOR[WarpPlugin]
{
MODULE
{
name = FNSolarPanelWasteHeatModule
}
RESOURCE
{
name = Megajoules
amount = 0
maxAmount = 0.001
isTweakable = false
hideFlow = false
}
}
@PART[*]:HAS[@MODULE[ModuleDeployableSolarPanel]:HAS[#chargeRate[>0]],!RESOURCE[ElectricCharge]]:FOR[WarpPlugin]
{
RESOURCE
{
name = ElectricCharge
amount = 0
maxAmount = 0.001
isTweakable = false
hideFlow = false
}
}
The part ends up with 0 max electric charge - things like probe cores with solar panels built in such as the probes from BDB and RN US Satellites.
This seems to work for me
@PART[*]:HAS[@MODULE[ModuleDeployableSolarPanel,!ModuleCommand]:HAS[#chargeRate[>0]]]:FOR[WarpPlugin]
{
MODULE
{
name = FNSolarPanelWasteHeatModule
}
RESOURCE
{
name = Megajoules
amount = 0
maxAmount = 0.001
isTweakable = false
hideFlow = false
}
%RESOURCE
{
name = ElectricCharge
amount = 0
maxAmount = 0.001
isTweakable = false
hideFlow = false
}
}
@PART[*]:HAS[@MODULE[ModuleDeployableSolarPanel,ModuleCommand]:HAS[#chargeRate[>0]]]:FOR[WarpPlugin]
{
MODULE
{
name = FNSolarPanelWasteHeatModule
}
RESOURCE
{
name = Megajoules
amount = 0
maxAmount = 0.001
isTweakable = false
hideFlow = false
}
}
Probably doesn't solve the issue for that one solar batter from BDB though. but this is sorely needed for BDB 1.7 as the small probes can't be radially attached to clip in some batteries.
Thanks for this <3 gonna copy it to my gamedata because I can't use any probe cores with inbuilt solar panels.
EDIT - Hmmm. It seems like your configs dont work. Battery-solars still have no electric charge.