Skip to content

Commit

Permalink
Disable if no mods use the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco committed Mar 22, 2020
1 parent cf98caf commit 9f869c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions AI_ClothColliders/ClothCollidersPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ private void Start()

Logger.LogInfo($"Found collider datas for {SphereColliders.Keys.Union(CapsuleColliders.Keys).Count()} items");

if (SphereColliders.Count == 0 && CapsuleColliders.Count == 0)
{
enabled = false;
return;
}

HarmonyWrapper.PatchAll(typeof(ClothCollidersPlugin));
CharacterApi.RegisterExtraBehaviour<ClothColliderController>(GUID);
}
Expand Down

0 comments on commit 9f869c6

Please sign in to comment.