ContractConfigurator icon indicating copy to clipboard operation
ContractConfigurator copied to clipboard

ResourceQuantity and ResourceCapacity not working

Open ec429 opened this issue 4 years ago • 0 comments

While trying to port RP-0's LifeSupportStation contract to work with Kerbalism instead of TACLS, I found that expressions like targetVessel1.ResourceQuantity(Food) were returning 0, yet the vessel in question definitely has a nonzero amount of Food on board. I tried adding foodCheck = @/targetVessel1.ResourceQuantity(Food) foodCapCheck = @/targetVessel1.ResourceCapacity(Food) foodAltCheck = @/targetVessel1.ResourceQuantity(Resource(Food)) into a DATA node, and the CC Debug window showed all three variables as zero. (targetVessel1 itself was defined in another DATA node as AllVessels().Where(v => v.VesselType() == Station && v.FreeDockingPorts()>0).SelectUnique()).

Observed on KSP 1.7.3 with ContractConfigurator 1.27.1.

ec429 avatar Mar 19 '20 21:03 ec429