Skip to content

Commit

Permalink
Fixed selection/loading bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
legoandmars committed Apr 23, 2021
1 parent d070321 commit 35715df
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion GorillaCosmetics/Data/Behaviours/HatPreviewButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ void UpdateHatValue()
}
}

private IEnumerator ButtonDelay()
private void OnDisable() => canPress = true;
private void OnDestroy() => canPress = true;

private static IEnumerator ButtonDelay()
{
yield return new WaitForSeconds(2f);
canPress = true;
Expand Down
5 changes: 4 additions & 1 deletion GorillaCosmetics/Data/Behaviours/MaterialPreviewButton.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ private void UpdateMaterialValue()
}
}

private IEnumerator ButtonDelay()
private void OnDisable() => canPress = true;
private void OnDestroy() => canPress = true;

private static IEnumerator ButtonDelay()
{
yield return new WaitForSeconds(2f);
canPress = true;
Expand Down
1 change: 1 addition & 0 deletions GorillaCosmetics/Data/GorillaHat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public GorillaHat(string path)
{
// loading failed. that's not good.
Debug.Log(err);
throw new Exception($"Loading hat at {path} failed.");
}
}
}
Expand Down
1 change: 1 addition & 0 deletions GorillaCosmetics/Data/GorillaMaterial.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public GorillaMaterial(string path)
{
// loading failed. that's not good.
Debug.Log(err);
throw new Exception($"Loading material at {path} failed.");
}
}
else
Expand Down
2 changes: 1 addition & 1 deletion GorillaCosmetics/GorillaCosmetics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace GorillaCosmetics
{
[BepInPlugin("org.legoandmars.gorillatag.gorillacosmetics", "Gorilla Cosmetics", "2.1.0")]
[BepInPlugin("org.legoandmars.gorillatag.gorillacosmetics", "Gorilla Cosmetics", "2.1.1")]
public class GorillaCosmetics : BaseUnityPlugin
{
public static ConfigEntry<string> selectedMaterial;
Expand Down

0 comments on commit 35715df

Please sign in to comment.