Skip to content

Commit 81b351e

Browse files
Merge pull request #2788 from Daneel53/Suppress-warnings-for-CS0108-and-CS0168
Suppress compilation warnings for CS0108 and CS0168
2 parents b8a3ce2 + 8936351 commit 81b351e

6 files changed

Lines changed: 20 additions & 11 deletions

File tree

Assets/Game/Addons/RmbBlockEditor/Automap.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Project: Daggerfall Tools For Unity
1+
// Project: Daggerfall Tools For Unity
22
// Copyright: Copyright (C) 2009-2022 Daggerfall Workshop
33
// Web Site: http://www.dfworkshop.net
44
// License: MIT License (http://www.opensource.org/licenses/mit-license.php)
@@ -15,7 +15,7 @@ namespace DaggerfallWorkshop.Game.Addons.RmbBlockEditor
1515
public class Automap : MonoBehaviour
1616
{
1717
public Byte[] automapData;
18-
private MeshRenderer renderer;
18+
private MeshRenderer meshRenderer;
1919

2020
public void CreateObject(Byte[] automapData)
2121
{
@@ -26,7 +26,7 @@ public void CreateObject(Byte[] automapData)
2626
groundPlane.transform.localScale = new Vector3(10.24f, 1f, 10.24f);
2727
groundPlane.transform.position = new Vector3(51.2f, 0, -51.2f);
2828
groundPlane.transform.rotation = Quaternion.Euler(0, 0, 0);
29-
renderer = groundPlane.GetComponent<MeshRenderer>();
29+
meshRenderer = groundPlane.GetComponent<MeshRenderer>();
3030
Update();
3131
}
3232

@@ -99,7 +99,7 @@ public void Update()
9999

100100
tex.SetPixels32(0, 0, 64, 64, colors);
101101
tex.Apply();
102-
renderer.sharedMaterial.mainTexture = tex;
102+
meshRenderer.sharedMaterial.mainTexture = tex;
103103
}
104104
}
105105
#endif

Assets/Game/Addons/RmbBlockEditor/Persisted/BuildingTemplates.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
// Project: Daggerfall Tools For Unity
1+
// Project: Daggerfall Tools For Unity
22
// Copyright: Copyright (C) 2009-2022 Daggerfall Workshop
33
// Web Site: http://www.dfworkshop.net
44
// License: MIT License (http://www.opensource.org/licenses/mit-license.php)
55
// Source Code: https://github.com/Interkarma/daggerfall-unity
66
// Original Author: Podleron (podleron@gmail.com)
77

8+
using DaggerfallWorkshop.Utility.AssetInjection;
9+
using Newtonsoft.Json;
810
using System;
911
using System.Collections.Generic;
1012
using System.IO;
11-
using DaggerfallWorkshop.Utility.AssetInjection;
12-
using Newtonsoft.Json;
1313
using UnityEngine;
1414

1515
namespace DaggerfallWorkshop.Game.Addons.RmbBlockEditor
@@ -44,6 +44,7 @@ public void Load()
4444
}
4545
catch (Exception error)
4646
{
47+
Debug.LogException(error);
4748
// The file is corrupt, so save a new one
4849
Save();
4950
}
@@ -54,6 +55,7 @@ public void Load()
5455
}
5556
catch (Exception error)
5657
{
58+
Debug.LogException(error);
5759
// The file does not exist, so save the default catalog
5860
var path = Environment.CurrentDirectory + this.DefaultTemplatesPath;
5961
try

Assets/Game/Addons/RmbBlockEditor/Persisted/Catalog.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Project: Daggerfall Tools For Unity
1+
// Project: Daggerfall Tools For Unity
22
// Copyright: Copyright (C) 2009-2022 Daggerfall Workshop
33
// Web Site: http://www.dfworkshop.net
44
// License: MIT License (http://www.opensource.org/licenses/mit-license.php)
@@ -49,6 +49,7 @@ public void Load()
4949
}
5050
catch (Exception error)
5151
{
52+
Debug.LogException(error);
5253
// The file is corrupt, so save a new one
5354
Save();
5455
}
@@ -59,6 +60,7 @@ public void Load()
5960
}
6061
catch (Exception error)
6162
{
63+
Debug.LogException(error);
6264
// The file does not exist, so save the default catalog
6365
RestoreDefaults();
6466
}

Assets/Game/Addons/RmbBlockEditor/Persisted/PersistedBuildingsCatalog.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Project: Daggerfall Tools For Unity
1+
// Project: Daggerfall Tools For Unity
22
// Copyright: Copyright (C) 2009-2022 Daggerfall Workshop
33
// Web Site: http://www.dfworkshop.net
44
// License: MIT License (http://www.opensource.org/licenses/mit-license.php)
@@ -49,6 +49,7 @@ public static void Load()
4949
catch (Exception error)
5050
{
5151
// The file is corrupt, so save a new one
52+
Debug.LogException(error);
5253
Save();
5354
}
5455
finally
@@ -58,6 +59,7 @@ public static void Load()
5859
}
5960
catch (Exception error)
6061
{
62+
Debug.LogException(error);
6163
RestoreDefault();
6264
}
6365
}

Assets/Game/Addons/RmbBlockEditor/Persisted/PersistedSettings.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Project: Daggerfall Tools For Unity
1+
// Project: Daggerfall Tools For Unity
22
// Copyright: Copyright (C) 2009-2022 Daggerfall Workshop
33
// Web Site: http://www.dfworkshop.net
44
// License: MIT License (http://www.opensource.org/licenses/mit-license.php)
@@ -48,6 +48,7 @@ public static void Load()
4848
}
4949
catch (Exception error)
5050
{
51+
Debug.LogException(error);
5152
// The file is corrupt, so save a new one
5253
Save();
5354
}
@@ -58,6 +59,7 @@ public static void Load()
5859
}
5960
catch (Exception error)
6061
{
62+
Debug.LogException(error);
6163
// The settings file does not exist, so save a new one
6264
Save();
6365
}

Assets/Game/Addons/RmbBlockEditor/RmbBlockHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Project: Daggerfall Tools For Unity
1+
// Project: Daggerfall Tools For Unity
22
// Copyright: Copyright (C) 2009-2022 Daggerfall Workshop
33
// Web Site: http://www.dfworkshop.net
44
// License: MIT License (http://www.opensource.org/licenses/mit-license.php)
@@ -350,6 +350,7 @@ public static GameObject AddFlatObject(DFBlock.RmbBlockFlatObjectRecord rmbBlock
350350
}
351351
catch (Exception error)
352352
{
353+
Debug.LogException(error);
353354
// Return a magenta-colored flat if the id can't be found
354355
Texture2D texture = new Texture2D(1, 1);
355356
texture.SetPixel(0, 0, Color.magenta);

0 commit comments

Comments
 (0)