Skip to content

Commit

Permalink
letz GOoo!
Browse files Browse the repository at this point in the history
  • Loading branch information
dedouwe26 committed Jun 25, 2023
1 parent dbb27fb commit 7a54fe7
Show file tree
Hide file tree
Showing 9 changed files with 531 additions and 109 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*.user
*.userosscache
*.sln.docstates
*.csproj

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
Expand Down
37 changes: 14 additions & 23 deletions Cosmetx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public class HarmonyPatches
public const string InstanceId = "com.dedouwe26.gorillatag.cosmetx";

internal static void ApplyHarmonyPatches()
{
{
if (instance == null)
{
instance = new Harmony(InstanceId);
Expand All @@ -43,51 +43,42 @@ internal static void RemoveHarmonyPatches()
/// mods main class
/// </summary>

[BepInDependency("org.legoandmars.gorillatag.utilla", "1.5.0")]
[BepInPlugin("com.dedouwe26.gorillatag.cosmetx", "Cosmetx", "1.0.0")]
public class Cosmetx : BaseUnityPlugin
{
{
public static CosmeticsController cosmeticsControllerInstance;
public bool initialized = false;
public static bool isUnlocked = false;

void Awake()
{
{
BepInEx.Logging.Logger.Sources.Remove(Logger);
Logging.init();
}
void Start()
{
{
// NOT HERE
Utilla.Events.GameInitialized += OnGameInitialized;
SceneManager.sceneLoaded += OnSceneLoaded;
}

void OnEnable()
{
{
Logging.log.LogInfo("Plugin is enabled");
Logging.log.LogMessage("Patching Now...");
HarmonyPatches.ApplyHarmonyPatches();
if (initialized)
cosmeticsControllerInstance.GetUserCosmeticsAllowed();
// SceneManager.sceneLoaded += OnSceneLoaded;
}

void OnDisable()
{
// SceneManager.sceneLoaded -= OnSceneLoaded;
HarmonyPatches.RemoveHarmonyPatches();
cosmeticsControllerInstance.GetUserCosmeticsAllowed();
}

void OnGameInitialized(object sender, EventArgs e)
{
cosmeticsControllerInstance = GameObject.Find("Global/Photon Manager/CosmeticsController").GetComponent<CosmeticsController>();
this.initialized = true;
}

void OnSceneLoaded(Scene s, LoadSceneMode sm)
{
if (s.name == "GorillaTagSJR") {
Logging.log.LogMessage(cosmeticsControllerInstance.allCosmetics);
}
}
// void OnSceneLoaded(Scene s, LoadSceneMode sm)
// {
// if (s.name == "GorillaTagSJR")
// {
// }
// }
}
}
288 changes: 288 additions & 0 deletions Cosmetx.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,288 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<Reference Include="0Harmony">
<HintPath>$(BepInExAssemblyPath)\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>$(GameAssemblyPath)\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>$(GameAssemblyPath)\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="BakeryRuntimeAssembly">
<HintPath>$(GameAssemblyPath)\BakeryRuntimeAssembly.dll</HintPath>
</Reference>
<Reference Include="BepInEx">
<HintPath>$(BepInExAssemblyPath)\BepInEx.dll</HintPath>
</Reference>
<Reference Include="BepInEx.Harmony">
<HintPath>$(BepInExAssemblyPath)\BepInEx.Harmony.dll</HintPath>
</Reference>
<Reference Include="Cinemachine">
<HintPath>$(GameAssemblyPath)\Cinemachine.dll</HintPath>
</Reference>
<Reference Include="clipper_library">
<HintPath>$(GameAssemblyPath)\clipper_library.dll</HintPath>
</Reference>
<Reference Include="Mono.Security">
<HintPath>$(GameAssemblyPath)\Mono.Security.dll</HintPath>
</Reference>
<Reference Include="Oculus.Platform">
<HintPath>$(GameAssemblyPath)\Oculus.Platform.dll</HintPath>
</Reference>
<Reference Include="Oculus.VR">
<HintPath>$(GameAssemblyPath)\Oculus.VR.dll</HintPath>
</Reference>
<Reference Include="Photon3Unity3D">
<HintPath>$(GameAssemblyPath)\Photon3Unity3D.dll</HintPath>
</Reference>
<Reference Include="PhotonRealtime">
<HintPath>$(GameAssemblyPath)\PhotonRealtime.dll</HintPath>
</Reference>
<Reference Include="PhotonUnityNetworking">
<HintPath>$(GameAssemblyPath)\PhotonUnityNetworking.dll</HintPath>
</Reference>
<Reference Include="PhotonUnityNetworking.Utilities">
<HintPath>$(GameAssemblyPath)\PhotonUnityNetworking.Utilities.dll</HintPath>
</Reference>
<Reference Include="PhotonVoice">
<HintPath>$(GameAssemblyPath)\PhotonVoice.dll</HintPath>
</Reference>
<Reference Include="PhotonVoice.API">
<HintPath>$(GameAssemblyPath)\PhotonVoice.API.dll</HintPath>
</Reference>
<Reference Include="PhotonVoice.PUN">
<HintPath>$(GameAssemblyPath)\PhotonVoice.PUN.dll</HintPath>
</Reference>
<Reference Include="PlayFab">
<HintPath>$(GameAssemblyPath)\PlayFab.dll</HintPath>
</Reference>
<Reference Include="System.EnterpriseServices">
<HintPath>$(GameAssemblyPath)\System.EnterpriseServices.dll</HintPath>
</Reference>
<Reference Include="System.ServiceModel.Internals">
<HintPath>$(GameAssemblyPath)\System.ServiceModel.Internals.dll</HintPath>
</Reference>
<Reference Include="Unity.Animation.Rigging">
<HintPath>$(GameAssemblyPath)\Unity.Animation.Rigging.dll</HintPath>
</Reference>
<Reference Include="Unity.Burst">
<HintPath>$(GameAssemblyPath)\Unity.Burst.dll</HintPath>
</Reference>
<Reference Include="Unity.Burst.Unsafe">
<HintPath>$(GameAssemblyPath)\Unity.Burst.Unsafe.dll</HintPath>
</Reference>
<Reference Include="Unity.InputSystem">
<HintPath>$(GameAssemblyPath)\Unity.InputSystem.dll</HintPath>
</Reference>
<Reference Include="Unity.Mathematics">
<HintPath>$(GameAssemblyPath)\Unity.Mathematics.dll</HintPath>
</Reference>
<Reference Include="Unity.Timeline">
<HintPath>$(GameAssemblyPath)\Unity.Timeline.dll</HintPath>
</Reference>
<Reference Include="Unity.XR.Interaction.Toolkit">
<HintPath>$(GameAssemblyPath)\Unity.XR.Interaction.Toolkit.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>$(GameAssemblyPath)\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AccessibilityModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.AccessibilityModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AIModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.AIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AndroidJNIModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.AndroidJNIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AnimationModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.AnimationModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ARModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ARModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AssetBundleModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.AssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.AudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClothModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ClothModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClusterInputModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ClusterInputModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClusterRendererModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ClusterRendererModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CrashReportingModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.CrashReportingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.DirectorModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.DirectorModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.DSPGraphModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.DSPGraphModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.GameCenterModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.GameCenterModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.GridModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.GridModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.HotReloadModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.HotReloadModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ImageConversionModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ImageConversionModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.IMGUIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.InputLegacyModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.InputModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.JSONSerializeModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.JSONSerializeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.LocalizationModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.LocalizationModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ParticleSystemModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ParticleSystemModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PerformanceReportingModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.PerformanceReportingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Physics2DModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.Physics2DModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ProfilerModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ProfilerModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ScreenCaptureModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.ScreenCaptureModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SharedInternalsModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.SharedInternalsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpatialTracking">
<HintPath>$(GameAssemblyPath)\UnityEngine.SpatialTracking.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpriteMaskModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.SpriteMaskModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpriteShapeModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.SpriteShapeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.StreamingModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.StreamingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SubstanceModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.SubstanceModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SubsystemsModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.SubsystemsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TerrainModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.TerrainModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TerrainPhysicsModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.TerrainPhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextCoreModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.TextCoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.TextRenderingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TilemapModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.TilemapModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TLSModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.TLSModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>$(GameAssemblyPath)\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIElementsModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UIElementsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UmbraModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UmbraModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UNETModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UNETModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityAnalyticsModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityAnalyticsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityConnectModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityConnectModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityTestProtocolModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityTestProtocolModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestAssetBundleModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityWebRequestAssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestAudioModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityWebRequestAudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityWebRequestModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestTextureModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityWebRequestTextureModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestWWWModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.UnityWebRequestWWWModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VehiclesModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.VehiclesModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VFXModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.VFXModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VideoModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.VideoModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VRModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.VRModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.WindModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.WindModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.XR.LegacyInputHelpers">
<HintPath>$(GameAssemblyPath)\UnityEngine.XR.LegacyInputHelpers.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.XRModule">
<HintPath>$(GameAssemblyPath)\UnityEngine.XRModule.dll</HintPath>
</Reference>
<!-- <Reference Include="Utilla">
<HintPath>$(PluginsPath)\Utilla\Utilla.dll</HintPath>
</Reference> -->
<Reference Include="websocket-sharp">
<HintPath>$(GameAssemblyPath)\websocket-sharp.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
Loading

0 comments on commit 7a54fe7

Please sign in to comment.