/// <summary> /// Get a string representation of this module for use in logging. /// </summary> /// <param name="module"></param> /// <returns>A string that represents the module passed in, with newlines.</returns> public static string Representation(this ModuleType module) { int powGen = module.getPowerGeneration(1, Planet.Quantity.High, Planet.Quantity.High); int powStore = module.getPowerStorageCapacity(1); int powCollected = module.getPowerCollection(1); int sMax = module.getMaxSize(); int sMin = module.getMinSize(); var requiredType = module.getRequiredModuleType(); return ($"\n NAME: {module.getName()}" + $"\n SizeMax: {sMax,2}\tSizeMin: {sMin,2}\tHeight: {module.getHeight(),4}" + $"\n POW_COL: {powCollected}\tPOW_GEN: {powGen}\tPOW_STO: {powStore}" + $"\n UsersMax: {module.getMaxUsers()}" + $"\n O2_s1: {module.getOxygenGeneration(1f)}" + $"\n REQUIRED: {requiredType}{(requiredType is null ? "(null)" : "")}"); }