mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Some cleanup of debug statements
This commit is contained in:
parent
2174f2c07b
commit
a6fa2dd61c
@ -56,16 +56,7 @@ namespace ConformalDecals.MaterialModifiers {
|
||||
}
|
||||
}
|
||||
|
||||
public float AspectRatio {
|
||||
get {
|
||||
if (MainTexture == null) {
|
||||
Debug.Log("No main texture specified! returning 1 for aspect ratio");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return MainTexture.AspectRatio;
|
||||
}
|
||||
}
|
||||
public float AspectRatio => MainTexture == null ? 1 : MainTexture.AspectRatio;
|
||||
|
||||
public void OnBeforeSerialize() {
|
||||
Debug.Log($"Serializing MaterialPropertyCollection {this.GetInstanceID()}");
|
||||
|
@ -16,15 +16,9 @@ namespace ConformalDecals.MaterialModifiers {
|
||||
|
||||
public float AspectRatio {
|
||||
get {
|
||||
if (texture == null) {
|
||||
Debug.Log("Returning 1");
|
||||
return 1;
|
||||
}
|
||||
if (texture == null) return 1;
|
||||
|
||||
if (!_hasTile) {
|
||||
Debug.Log("Returning texture aspect ratio");
|
||||
return ((float) texture.height) / ((float) texture.width);
|
||||
}
|
||||
if (!_hasTile) return ((float) texture.height) / texture.width;
|
||||
|
||||
return _tileRect.height / _tileRect.width;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user