mirror of
https://github.com/drewcassidy/KSP-Conformal-Decals.git
synced 2024-09-01 18:23:54 +00:00
Cleanup of abandoned saving code
This commit is contained in:
@ -95,7 +95,7 @@ namespace ConformalDecals.MaterialProperties {
|
||||
var property = MaterialProperty.Instantiate(_serializedProperties[i]);
|
||||
_materialProperties.Add(_serializedNames[i], property);
|
||||
|
||||
if (property is MaterialTextureProperty textureProperty && textureProperty.isMain) {
|
||||
if (property is MaterialTextureProperty {isMain: true} textureProperty) {
|
||||
_mainTexture = textureProperty;
|
||||
}
|
||||
}
|
||||
@ -214,7 +214,7 @@ namespace ConformalDecals.MaterialProperties {
|
||||
var newProperty = AddOrGetProperty<T>(propertyName);
|
||||
newProperty.ParseNode(node);
|
||||
|
||||
if (newProperty is MaterialTextureProperty textureProperty && textureProperty.isMain) {
|
||||
if (newProperty is MaterialTextureProperty {isMain: true} textureProperty) {
|
||||
_mainTexture = textureProperty;
|
||||
}
|
||||
|
||||
@ -252,7 +252,7 @@ namespace ConformalDecals.MaterialProperties {
|
||||
|
||||
public void UpdateScale(Vector2 scale) {
|
||||
foreach (var entry in _materialProperties) {
|
||||
if (entry.Value is MaterialTextureProperty textureProperty && textureProperty.autoScale) {
|
||||
if (entry.Value is MaterialTextureProperty {autoScale: true} textureProperty) {
|
||||
textureProperty.SetScale(scale);
|
||||
}
|
||||
}
|
||||
@ -263,7 +263,7 @@ namespace ConformalDecals.MaterialProperties {
|
||||
var mainTexSize = _mainTexture.Dimensions;
|
||||
|
||||
foreach (var entry in _materialProperties) {
|
||||
if (entry.Value is MaterialTextureProperty textureProperty && textureProperty.autoTile) {
|
||||
if (entry.Value is MaterialTextureProperty {autoTile: true} textureProperty) {
|
||||
textureProperty.SetTile(tile, mainTexSize);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user