Add Plugin.cs
This commit is contained in:
commit
67137ed5c8
1 file changed
+37
@@ -0,0 +1,37 @@
|
|||||||
|
using BepInEx;
|
||||||
|
using DeezCosmetx.Patches;
|
||||||
|
using GorillaNetworking;
|
||||||
|
using HarmonyLib;
|
||||||
|
using System.Collections;
|
||||||
|
using System.Reflection;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace DeezCosmetx;
|
||||||
|
|
||||||
|
[BepInPlugin(Constants.Guid, Constants.Name, Constants.Version)]
|
||||||
|
public class Plugin : BaseUnityPlugin
|
||||||
|
{
|
||||||
|
public static Plugin instance;
|
||||||
|
|
||||||
|
void Awake()
|
||||||
|
{
|
||||||
|
instance = this;
|
||||||
|
new Harmony(Constants.Guid).PatchAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UnlockCosmetics()
|
||||||
|
{
|
||||||
|
foreach (CosmeticsController.CosmeticItem cosmeticItem in CosmeticsController.instance.allCosmetics)
|
||||||
|
{
|
||||||
|
if (!CosmeticsController.instance.concatStringCosmeticsAllowed.Contains(cosmeticItem.itemName))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
CosmeticsController.instance.UnlockItem(cosmeticItem.itemName, false);
|
||||||
|
} catch { /* ignored */ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
CosmeticsController.instance.OnCosmeticsUpdated.Invoke();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user