// Refuel from this module public void RefuelReactorFromContainer(FissionGenerator reactor, double amt) { //Debug.Log("NFPP: FissionContainer has enough fuel and waste space"); this.part.RequestResource("EnrichedUranium",amt); this.part.RequestResource("DepletedUranium", -amt); reactor.part.RequestResource("EnrichedUranium", -amt); reactor.part.RequestResource("DepletedUranium", amt); if (this.part.Resources.Get(PartResourceLibrary.Instance.GetDefinition("EnrichedUranium").id).amount <= 0 || ((this.part.Resources.Get(PartResourceLibrary.Instance.GetDefinition("DepletedUranium").id).maxAmount - this.part.Resources.Get(PartResourceLibrary.Instance.GetDefinition("DepletedUranium").id).amount) <= 0)) { Expended = true; Debug.Log("NFPP: FissionContainer is now expended"); } }
// Refuel from this module public void RefuelReactorFromContainer(FissionGenerator reactor, double amt) { //Debug.Log("NFPP: FissionContainer has enough fuel and waste space"); this.part.RequestResource("EnrichedUranium", amt); this.part.RequestResource("DepletedUranium", -amt); reactor.part.RequestResource("EnrichedUranium", -amt); reactor.part.RequestResource("DepletedUranium", amt); if (this.part.Resources.Get(PartResourceLibrary.Instance.GetDefinition("EnrichedUranium").id).amount <= 0 || ((this.part.Resources.Get(PartResourceLibrary.Instance.GetDefinition("DepletedUranium").id).maxAmount - this.part.Resources.Get(PartResourceLibrary.Instance.GetDefinition("DepletedUranium").id).amount) <= 0)) { Expended = true; Debug.Log("NFPP: FissionContainer is now expended"); } }