public double GetMass(int currentStage, bool forCoM = false) { if (decoupledInStage >= currentStage) { return(0d); } double mass = forCoM ? baseMassForCoM : baseMass; for (int i = 0; i < resources.Types.Count; ++i) { mass += resources.GetResourceMass(resources.Types[i]); } if (postStageMassAdjust != 0.0 && currentStage <= inverseStage) { mass += postStageMassAdjust; } return(mass); }
public double GetFullMass(int currentStage, HashSet <int> types) { if (decoupledInStage >= currentStage) { return(0); } double mass = 0; for (int i = 0; i < maxResources.Types.Count; i++) { foreach (int type in types) { if (type == maxResources.Types[i]) { mass += maxResources.GetResourceMass(type); break; } } } return(mass); }