-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AppLauncher button hiding fixed. Performance issues fixed.
- Loading branch information
Showing
19 changed files
with
232 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Localization | ||
{ | ||
es-es | ||
{ | ||
#LOC_CriticalTemperatureGauge_Title = Medidor de temperatura crítica | ||
#LOC_CriticalTemperatureGauge_GaugeShowingThreshold = Umbral de exposición del indicador: | ||
#LOC_CriticalTemperatureGauge_GaugeHidingThreshold = Umbral de ocultación del indicador: | ||
#LOC_CriticalTemperatureGauge_AlwaysShowGauge = Mostrar siempre indicador | ||
#LOC_CriticalTemperatureGauge_ShowTemperature = Mostrar temperatura | ||
#LOC_CriticalTemperatureGauge_ShowTemperatureLimit = Mostrar límite de temperatura | ||
#LOC_CriticalTemperatureGauge_ShowTemperatureRate = Mostrar tasa de temperatura | ||
#LOC_CriticalTemperatureGauge_ShowCriticalPartName = Mostrar nombre de la parte crítica | ||
#LOC_CriticalTemperatureGauge_HighlightCriticalPart = Resaltar la parte crítica | ||
#LOC_CriticalTemperatureGauge_IgnorePartModules = Ignorar partes con los siguientes\n módulos (separado por comas): | ||
#LOC_CriticalTemperatureGauge_ShowTemperatureInPartMenu = Mostrar temperatura en el menú de piezas | ||
#LOC_CriticalTemperatureGauge_LockGaugePosition = Bloquear posición del medidor | ||
#LOC_CriticalTemperatureGauge_ShowAppLauncherButton = Mostrar botón lanzador de applicación | ||
#LOC_CriticalTemperatureGauge_Kelvin = K | ||
#LOC_CriticalTemperatureGauge_KelvinPerSecond = K/s | ||
#LOC_CriticalTemperatureGauge_Core = interna | ||
#LOC_CriticalTemperatureGauge_Skin = superficie | ||
#LOC_CriticalTemperatureGauge_PartMenuCore = Temperatura int. \u2009 | ||
#LOC_CriticalTemperatureGauge_PartMenuSkin = Temperatura sup. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+512 Bytes
(100%)
GameData/CriticalTemperatureGauge/Plugins/CriticalTemperatureGauge.dll
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
"MAJOR": 1, | ||
"MINOR": 3, | ||
"PATCH": 0, | ||
"BUILD": 1 | ||
"BUILD": 3 | ||
}, | ||
"KSP_VERSION": | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Globalization; | ||
using System.Linq; | ||
using KSP.Localization; | ||
|
||
namespace CriticalTemperatureGauge | ||
{ | ||
internal static class Format | ||
{ | ||
public static string Temperature(double temperature, double? temperatureLimit) => | ||
temperatureLimit.HasValue | ||
? $"{temperature.ToUnsignedString(4)} / {temperatureLimit.Value.ToUnsignedString(3)} {Kelvin}" | ||
: $"{temperature.ToUnsignedString(4)} {Kelvin}"; | ||
|
||
public static string TemperatureRate(double temperatureRate) => | ||
$" {temperatureRate.ToSignedString(1)} {KelvinPerSecond}"; | ||
|
||
public static string TemperatureWithRate(double temperature, double? temperatureLimit, double? temperatureRate) => | ||
temperatureRate.HasValue | ||
? $"{Temperature(temperature, temperatureLimit)} {temperatureRate.Value.ToSignedString(3, "–"/* U+2013 En Dash */)} {KelvinPerSecond}" | ||
: $"{Temperature(temperature, temperatureLimit)}"; | ||
|
||
public static string PartName(string partName, bool isSkin) => | ||
$" {partName} ({(isSkin ? Skin : Core)})"; | ||
|
||
|
||
public static T? Then<T>(this bool condition, T thenValue) | ||
where T : struct | ||
=> | ||
condition ? thenValue : (T?)null; | ||
|
||
|
||
static string ToUnsignedString(this double value, int intPlaces) | ||
{ | ||
var numberString = value.ToString("F0", CultureInfo.InvariantCulture); | ||
var spaces = Math.Max(0, intPlaces - numberString.Length); | ||
return new string(' '/* U+2007 Figure Space */, spaces) + numberString; | ||
} | ||
|
||
static string ToSignedString(this double value, int intPlaces, string minus = "−"/* U+2212 Minus Sign */, string plus = "+") | ||
{ | ||
var numberString = Math.Abs(value).ToString("F0", CultureInfo.InvariantCulture); | ||
var signString = value < 0 ? minus : plus; | ||
var spaces = Math.Max(0, intPlaces - numberString.Length); | ||
return new string(' '/* U+2007 Figure Space */, spaces) + signString + numberString; | ||
} | ||
|
||
|
||
static readonly string Kelvin = Localizer.Format("#LOC_CriticalTemperatureGauge_Kelvin"); | ||
static readonly string KelvinPerSecond = Localizer.Format("#LOC_CriticalTemperatureGauge_KelvinPerSecond"); | ||
static readonly string Core = Localizer.Format("#LOC_CriticalTemperatureGauge_Core"); | ||
static readonly string Skin = Localizer.Format("#LOC_CriticalTemperatureGauge_Skin"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.