Skip to content

Commit 46f2094

Browse files
author
JФSԐPЊҤЇ ҠЯДԞФЩSҜЇ
committed
fixing literally everything
1 parent 569b898 commit 46f2094

File tree

12 files changed

+107
-147
lines changed

12 files changed

+107
-147
lines changed

ModifierModifier/Main.cs

Lines changed: 18 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
using System;
2-
using System.Collections.Generic;
1+
using System.Collections.Generic;
32
using System.Linq;
43
using BepInEx;
54
using HarmonyLib;
65
using CobwebAPI.API;
76
using UnityEngine;
8-
using UnityEngine.EventSystems;
97
using UnityEngine.InputSystem;
10-
using UnityEngine.Internal;
11-
using UnityEngineInternal.Input;
12-
using UnityEngine.PlayerLoop;
13-
using UnityEngine.UI;
14-
158

169
namespace ModifierModifier
1710
{
@@ -21,15 +14,15 @@ public class Main : BaseUnityPlugin
2114
public static readonly GUIStyle backgroundStyle = new GUIStyle();
2215
public static readonly GUIStyle GUIStyle = new GUIStyle();
2316

24-
private Vector2 currentDrag = new Vector2();
17+
//private Vector2 currentDrag = new Vector2();
2518
public Vector2 scrollPosition;
2619
public bool menuEnabled;
2720
private InputAction _inputAction = new InputAction(binding: "<Keyboard>/Insert");
2821

2922
public const string ModName = "ModifierModifier";
3023
public const string ModAuthor = "Bazinga";
3124
public const string ModGUID = "com.bazinga.modifiermodifier";
32-
public const string ModVersion = "1.1.0";
25+
public const string ModVersion = "1.1.1";
3326
internal Harmony Harmony;
3427

3528
internal void Awake()
@@ -60,7 +53,7 @@ private void Update()
6053
}
6154
}
6255

63-
[HarmonyPatch(typeof(ModifierManager), "GetNonMaxedWavesMods")]
56+
[HarmonyPatch(typeof(ModifierManager), "GetNonMaxedSurvivalMods")]
6457
private void OnGUI()
6558
{
6659
var menuRect = new Rect(0, 25f, Screen.width / 2, Screen.height / 2);
@@ -84,9 +77,9 @@ private void OnGUI()
8477
if (flag)
8578
{
8679
Logger.LogInfo(mods.data.name + "Has been clicked");
87-
mods.levelInWaves = mods.data.maxLevel;
80+
mods.levelInSurvival = mods.data.maxLevel;
8881

89-
Logger.LogInfo(mods.levelInWaves);
82+
Logger.LogInfo(mods.levelInSurvival);
9083
Logger.LogInfo(mods.levelInVersus);
9184
}
9285

@@ -98,62 +91,56 @@ private void OnGUI()
9891

9992

10093
}
101-
102-
void ModifierModifierWindow(int windowID)
103-
{
104-
105-
106-
}
107-
94+
10895
public void MaxMod(Modifier mod)
10996
{
11097

111-
CobwebAPI.API.WaveModifiers.Give(mod.data.name, mod.data.maxLevel);
112-
Logger.LogInfo(mod.levelInWaves);
98+
//WaveModifiers.Give(mod.data.name, mod.data.maxLevel);
99+
Logger.LogInfo(mod.levelInSurvival);
113100
Logger.LogInfo(mod.levelInVersus);
114101
}
115102
public List<Modifier> GetTotalNonMaxedModifiers()
116103
{
117104
var list = new List<Modifier>();
118105
list.AddRange(ModifierManager.instance.GetVersusMods());
119-
list.AddRange(ModifierManager.instance.GetNonMaxedWavesMods());
106+
list.AddRange(ModifierManager.instance.GetNonMaxedSurvivalMods());
120107
return list;
121108
}
122109

123110
}
124111

125-
[HarmonyPatch(typeof(ModifierManager), "GetNonMaxedWavesMods")]
126-
internal class ModifierManagerGetNonMaxedWavesModsPatch
112+
[HarmonyPatch(typeof(ModifierManager), "GetNonMaxedSurvivalMods")]
113+
internal class ModifierManagerGetNonMaxedSurvivalModsPatch
127114
{
128115
internal static List<Modifier> Mods { get; private set; } = new();
129-
116+
130117
internal static bool Prefix(ModifierManager __instance, ref List<Modifier> __result)
131118
{
132119
var templist = (from m in Traverse.Create(__instance).Field<List<Modifier>>("_modifiers").Value
133-
where m.levelInWaves < m.data.maxLevel && m.data.waves
120+
where m.levelInSurvival < m.data.maxLevel && m.data.survival
134121
select m).ToList();
135122
if (Mods.Count > 0)
136123
{
137124
foreach (Modifier mod in Mods)
138125
{
139126
if (mod == null || templist.Contains(mod))
140127
continue;
141-
128+
142129
templist.Add(mod);
143130
}
144131
}
145-
132+
146133
__result = templist;
147134
return false;
148135
}
149-
136+
150137
[HarmonyPatch(typeof(VersionNumberTextMesh), "Start")]
151138
public class VersionNumberTextMeshPatch
152139
{
153140
public static void Postfix(VersionNumberTextMesh __instance)
154141
{
155142
__instance.textMesh.text +=
156-
$"\n<color=red>{Main.ModName} v{Main.ModVersion} by {Main.ModAuthor}</color>";
143+
$"\n<color=red>{Main.ModName} v{Main.ModVersion} by {Main.ModAuthor} \n use the INS or INSERT key to toggle the menu!!!</color>";
157144
}
158145
}
159146
}
Lines changed: 56 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,66 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
43
<PropertyGroup>
5-
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6-
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7-
<ProjectGuid>{BD8C6E83-1AD3-4AE5-BD03-23F366FEDB71}</ProjectGuid>
8-
<OutputType>Library</OutputType>
9-
<AppDesignerFolder>Properties</AppDesignerFolder>
10-
<RootNamespace>ModifierModifier</RootNamespace>
11-
<AssemblyName>ModifierModifier</AssemblyName>
12-
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
13-
<FileAlignment>512</FileAlignment>
4+
<TargetFramework>netstandard2.0</TargetFramework>
145
<LangVersion>latest</LangVersion>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
<DebugType>embedded</DebugType>
9+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
10+
11+
<Description>Modifier for SpiderHeck Modifiers</Description>
12+
<Version>1.0.1</Version>
1513
</PropertyGroup>
16-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17-
<PlatformTarget>AnyCPU</PlatformTarget>
18-
<DebugSymbols>true</DebugSymbols>
19-
<DebugType>full</DebugType>
20-
<Optimize>false</Optimize>
21-
<OutputPath>bin\Debug\</OutputPath>
22-
<DefineConstants>DEBUG;TRACE</DefineConstants>
23-
<ErrorReport>prompt</ErrorReport>
24-
<WarningLevel>4</WarningLevel>
25-
</PropertyGroup>
26-
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27-
<PlatformTarget>AnyCPU</PlatformTarget>
28-
<DebugType>pdbonly</DebugType>
29-
<Optimize>true</Optimize>
30-
<OutputPath>bin\Release\</OutputPath>
31-
<DefineConstants>TRACE</DefineConstants>
32-
<ErrorReport>prompt</ErrorReport>
33-
<WarningLevel>4</WarningLevel>
14+
15+
<PropertyGroup>
16+
<GameVersion>0.86.2-r.0</GameVersion>
3417
</PropertyGroup>
18+
3519
<ItemGroup>
36-
<Reference Include="0Harmony, Version=2.7.0.0, Culture=neutral, PublicKeyToken=null">
37-
<HintPath>..\References\0Harmony.dll</HintPath>
38-
</Reference>
39-
<Reference Include="BepInEx, Version=5.4.18.0, Culture=neutral, PublicKeyToken=null">
40-
<HintPath>..\References\BepInEx.dll</HintPath>
41-
</Reference>
42-
<Reference Include="CobwebAPI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
43-
<HintPath>References\CobwebAPI.dll</HintPath>
44-
</Reference>
45-
<Reference Include="MyScriptAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
46-
<HintPath>..\References\MyScriptAssembly.dll</HintPath>
47-
</Reference>
48-
<Reference Include="System" />
49-
<Reference Include="System.Core" />
50-
<Reference Include="System.Data" />
51-
<Reference Include="System.Xml" />
52-
<Reference Include="Unity.InputSystem, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null">
53-
<HintPath>..\..\..\..\Steam Games\steamapps\common\SpiderHeck Demo\SPIDERHECK_Data\Managed\Unity.InputSystem.dll</HintPath>
54-
</Reference>
55-
<Reference Include="Unity.TextMeshPro, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
56-
<HintPath>..\References\Unity.TextMeshPro.dll</HintPath>
57-
</Reference>
58-
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
59-
<HintPath>..\References\UnityEngine.dll</HintPath>
60-
</Reference>
61-
<Reference Include="UnityEngine.CoreModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
62-
<HintPath>..\References\UnityEngine.CoreModule.dll</HintPath>
63-
</Reference>
64-
<Reference Include="UnityEngine.IMGUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
65-
<HintPath>..\..\..\..\Steam Games\steamapps\common\SpiderHeck Demo\SPIDERHECK_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
66-
</Reference>
67-
<Reference Include="UnityEngine.InputLegacyModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
68-
<HintPath>..\..\..\..\Steam Games\steamapps\common\SpiderHeck Demo\SPIDERHECK_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
69-
</Reference>
70-
<Reference Include="UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
71-
<HintPath>..\..\..\..\Steam Games\steamapps\common\SpiderHeck Demo\SPIDERHECK_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
72-
</Reference>
73-
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
74-
<HintPath>..\..\..\..\Steam Games\steamapps\common\SpiderHeck Demo\SPIDERHECK_Data\Managed\UnityEngine.UI.dll</HintPath>
75-
</Reference>
76-
<Reference Include="UnityEngine.UIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
77-
<HintPath>..\..\..\..\Steam Games\steamapps\common\SpiderHeck Demo\SPIDERHECK_Data\Managed\UnityEngine.UIModule.dll</HintPath>
78-
</Reference>
20+
<PackageReference Include="BepInEx.Unity" Version="6.0.0-be.554" PrivateAssets="all" />
21+
<PackageReference Include="BepInEx.AutoPlugin" Version="1.0.1" PrivateAssets="all" />
22+
23+
<PackageReference Include="UnityEngine.Modules" Version="2020.3.13" PrivateAssets="all" />
7924
</ItemGroup>
25+
8026
<ItemGroup>
81-
<Compile Include="Main.cs" />
82-
<Compile Include="Properties\AssemblyInfo.cs" />
27+
<Reference Include="CobwebAPI, Version=1.0.1.0, Culture=neutral, PublicKeyToken=null">
28+
<HintPath>References\CobwebAPI.dll</HintPath>
29+
</Reference>
30+
<Reference Include="MyScriptAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
31+
<HintPath>References\MyScriptAssembly.dll</HintPath>
32+
</Reference>
33+
<Reference Include="Unity.InputSystem, Version=1.0.2.0, Culture=neutral, PublicKeyToken=null">
34+
<HintPath>References\Unity.InputSystem.dll</HintPath>
35+
</Reference>
36+
<Reference Include="Unity.Netcode.Components, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
37+
<HintPath>References\Unity.Netcode.Components.dll</HintPath>
38+
</Reference>
39+
<Reference Include="Unity.Netcode.Runtime, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
40+
<HintPath>References\Unity.Netcode.Runtime.dll</HintPath>
41+
</Reference>
42+
<Reference Include="Unity.TextMeshPro, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
43+
<HintPath>References\Unity.TextMeshPro.dll</HintPath>
44+
</Reference>
45+
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
46+
<HintPath>References\UnityEngine.dll</HintPath>
47+
</Reference>
48+
<Reference Include="UnityEngine.IMGUIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
49+
<HintPath>References\UnityEngine.IMGUIModule.dll</HintPath>
50+
</Reference>
51+
<Reference Include="UnityEngine.TextRenderingModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
52+
<HintPath>References\UnityEngine.TextRenderingModule.dll</HintPath>
53+
</Reference>
54+
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
55+
<HintPath>References\UnityEngine.UI.dll</HintPath>
56+
</Reference>
57+
<Reference Include="UnityEngine.UIModule, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null">
58+
<HintPath>References\UnityEngine.UIModule.dll</HintPath>
59+
</Reference>
8360
</ItemGroup>
84-
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
85-
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
86-
Other similar extension points exist, see Microsoft.Common.targets.
87-
<Target Name="BeforeBuild">
88-
</Target>
89-
<Target Name="AfterBuild">
61+
62+
<Target Name="Copy" AfterTargets="Build" Condition="'$(SpiderHeck)' != ''">
63+
<Copy SourceFiles="$(TargetPath)" DestinationFolder="$(SpiderHeck)\BepInEx\plugins\" UseSymboliclinksIfPossible="true" />
9064
</Target>
91-
-->
9265

93-
</Project>
66+
</Project>
Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
using System.Reflection;
2-
using System.Runtime.InteropServices;
3-
4-
// General Information about an assembly is controlled through the following
5-
// set of attributes. Change these attribute values to modify the information
6-
// associated with an assembly.
7-
[assembly: AssemblyTitle("ModifierModifier")]
8-
[assembly: AssemblyDescription("")]
9-
[assembly: AssemblyConfiguration("")]
10-
[assembly: AssemblyCompany("")]
11-
[assembly: AssemblyProduct("ModifierModifier")]
12-
[assembly: AssemblyCopyright("Copyright © 2022")]
13-
[assembly: AssemblyTrademark("")]
14-
[assembly: AssemblyCulture("")]
15-
16-
// Setting ComVisible to false makes the types in this assembly not visible
17-
// to COM components. If you need to access a type in this assembly from
18-
// COM, set the ComVisible attribute to true on that type.
19-
[assembly: ComVisible(false)]
20-
21-
// The following GUID is for the ID of the typelib if this project is exposed to COM
22-
[assembly: Guid("BD8C6E83-1AD3-4AE5-BD03-23F366FEDB71")]
23-
24-
// Version information for an assembly consists of the following four values:
1+
// using System.Reflection;
2+
// using System.Runtime.InteropServices;
253
//
26-
// Major Version
27-
// Minor Version
28-
// Build Number
29-
// Revision
4+
// // General Information about an assembly is controlled through the following
5+
// // set of attributes. Change these attribute values to modify the information
6+
// // associated with an assembly.
7+
// [assembly: AssemblyTitle("ModifierModifier")]
8+
// [assembly: AssemblyDescription("")]
9+
// [assembly: AssemblyConfiguration("")]
10+
// [assembly: AssemblyCompany("")]
11+
// [assembly: AssemblyProduct("ModifierModifier")]
12+
// [assembly: AssemblyCopyright("Copyright © 2022")]
13+
// [assembly: AssemblyTrademark("")]
14+
// [assembly: AssemblyCulture("")]
3015
//
31-
// You can specify all the values or you can default the Build and Revision Numbers
32-
// by using the '*' as shown below:
33-
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.0.0.0")]
35-
[assembly: AssemblyFileVersion("1.0.0.0")]
16+
// // Setting ComVisible to false makes the types in this assembly not visible
17+
// // to COM components. If you need to access a type in this assembly from
18+
// // COM, set the ComVisible attribute to true on that type.
19+
// [assembly: ComVisible(false)]
20+
//
21+
// // The following GUID is for the ID of the typelib if this project is exposed to COM
22+
// [assembly: Guid("BD8C6E83-1AD3-4AE5-BD03-23F366FEDB71")]
23+
//
24+
// // Version information for an assembly consists of the following four values:
25+
// //
26+
// // Major Version
27+
// // Minor Version
28+
// // Build Number
29+
// // Revision
30+
// //
31+
// // You can specify all the values or you can default the Build and Revision Numbers
32+
// // by using the '*' as shown below:
33+
// // [assembly: AssemblyVersion("1.0.*")]
34+
// [assembly: AssemblyVersion("1.0.0.0")]
35+
// [assembly: AssemblyFileVersion("1.0.0.0")]
257 KB
Binary file not shown.
114 KB
Binary file not shown.
14.5 KB
Binary file not shown.
570 KB
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)