diff --git a/MMOKitchen/MMOKitchen.csproj b/MMOKitchen/MMOKitchen.csproj
index a114674..e34bbe6 100644
--- a/MMOKitchen/MMOKitchen.csproj
+++ b/MMOKitchen/MMOKitchen.csproj
@@ -1,11 +1,19 @@
-
+
net4.7.1
+ MelonLoader
+ bin\MelonLoader\
+
+
+
+ net4.7.1
+ BepInEx
+ bin\BepInEx\
- F:\SteamLibrary\steamapps\common\PlateUp\PlateUp
+ ..\..\..\..\Libraries
@@ -25,6 +33,9 @@
$(PlateUpGameFolder)\MelonLoader\MelonLoader.dll
+
+ $(PlateUpGameFolder)\BepInEx\core\BepInEx.dll
+
$(PlateUpGameFolder)\PlateUp_Data\Managed\Kitchen.Common.dll
@@ -74,12 +85,10 @@
$(PlateUpGameFolder)\PlateUp_Data\Managed\Facepunch.Steamworks.Win64.dll
- $(PlateUpGameFolder)\Mods\KitchenLib.dll
+ $(PlateUpGameFolder)\Mods\KitchenLib-MelonLoader.dll
+
+
+ $(PlateUpGameFolder)\BepInEx\plugins\KitchenLib-BepInEx.dll
-
-
-
-
-
diff --git a/MMOKitchen/Mod.cs b/MMOKitchen/Mod.cs
index 63c5913..73f5bff 100644
--- a/MMOKitchen/Mod.cs
+++ b/MMOKitchen/Mod.cs
@@ -1,11 +1,29 @@
using KitchenLib;
-using UnityEngine;
-using System.IO;
+using System.Reflection;
+#if BepInEx
+using BepInEx;
+#endif
+#if MelonLoader
+using MelonLoader;
+#endif
+#if MelonLoader
+[assembly: MelonInfo(typeof(MMOKitchen.Mod), "MMO Kitchen", "0.1.2", "StarFluxGames")]
+[assembly: MelonGame("It's Happening", "PlateUp")]
+#endif
namespace MMOKitchen
-{
+{
+ #if BepInEx
+ [BepInProcess("PlateUp.exe")]
+ [BepInPlugin("starfluxgames.mmokitchen", "MMO Kitchen", "0.1.2")]
+ #endif
public class Mod : BaseMod
{
- public Mod() : base("politecustomers", "1.1.0") {}
+ #if MelonLoader
+ public Mod() : base("mmokitchen", "1.1.0") { }
+ #endif
+ #if BepInEx
+ public Mod() : base("1.1.0", Assembly.GetExecutingAssembly()) {}
+ #endif
}
}
\ No newline at end of file
diff --git a/MMOKitchen/Patches/CreateBedrooms_Patch.cs b/MMOKitchen/Patches/CreateBedrooms_Patch.cs
index 1b601ed..876720d 100644
--- a/MMOKitchen/Patches/CreateBedrooms_Patch.cs
+++ b/MMOKitchen/Patches/CreateBedrooms_Patch.cs
@@ -50,7 +50,6 @@ namespace MMOKitchen
placeSpawnMarker.Invoke(__instance, new object[] { i, array[i] + new Vector3(-1f, 0f, 0f) });
foreach (Entity entity2 in nativeArray)
{
- //bool flag = i == base.GetComponent(entity2).Index;
bool flag = i == ((CPlayer)getComponent.Invoke(__instance, new object[] { entity2 })).Index;
if (flag)
{
diff --git a/MMOKitchen/Patches/CreateGarage_Patch.cs b/MMOKitchen/Patches/CreateGarage_Patch.cs
index 334ce98..9501bf9 100644
--- a/MMOKitchen/Patches/CreateGarage_Patch.cs
+++ b/MMOKitchen/Patches/CreateGarage_Patch.cs
@@ -23,7 +23,6 @@ namespace MMOKitchen
garageDecorations.SetActive(false);
create.Invoke(__instance, new object[]{GameData.Main.Get(AssetReference.GarageDecorations), new Vector3(-8f, 0f, -2f), Vector3.forward});
- //Mod.Log(GameData.Main.Get(AssetReference.GarageDecorations).Prefab.name);
Entity entity = default(Entity);
entity = (Entity)create.Invoke(__instance, new object[]{GameData.Main.Get(AssetReference.LoadoutPedestal), new Vector3(-8.5f, 0f, -4f), Vector3.right});
EntityUtils.GetEntityManager().AddComponent(entity);
diff --git a/MMOKitchen/Patches/LayoutBuilder_Patch.cs b/MMOKitchen/Patches/LayoutBuilder_Patch.cs
index d857181..0b5ba14 100644
--- a/MMOKitchen/Patches/LayoutBuilder_Patch.cs
+++ b/MMOKitchen/Patches/LayoutBuilder_Patch.cs
@@ -9,7 +9,6 @@ namespace MMOKitchen
{
public static bool Prefix(LayoutBuilder __instance, Vector2 tile1, Vector2 tile2)
{
- //Mod.Log(tile1.ToString() + "," + tile2.ToString());
if ((tile1 == new Vector2(-11, -5) && tile2 == new Vector2(-10, -5))
|| (tile1 == new Vector2(-11, -6) && tile2 == new Vector2(-10, -6))
|| (tile1 == new Vector2(-11, -7) && tile2 == new Vector2(-10, -7))
diff --git a/MMOKitchen/Patches/NewFromTexture_Patch.cs b/MMOKitchen/Patches/NewFromTexture_Patch.cs
index ce4067a..0536c79 100644
--- a/MMOKitchen/Patches/NewFromTexture_Patch.cs
+++ b/MMOKitchen/Patches/NewFromTexture_Patch.cs
@@ -15,7 +15,6 @@ namespace MMOKitchen
{
PlayerManager playerManager = World.DefaultGameObjectInjectionWorld.GetExistingSystem();
FieldInfo finfo = typeof(PlayerManager).GetField("MaxPlayers", BindingFlags.Instance | BindingFlags.Public);
- if (finfo == null) Mod.Log("finfo is null");
finfo.SetValue(playerManager, 12);
__instance.SourceTexture = ResourceUtils.LoadTextureFromFile(Path.Combine(Application.streamingAssetsPath, "NewFromTexture.png"));
diff --git a/MMOKitchen/Patches/SteamPlatform_Patch.cs b/MMOKitchen/Patches/SteamPlatform_Patch.cs
index 2d1899b..fb1c0ca 100644
--- a/MMOKitchen/Patches/SteamPlatform_Patch.cs
+++ b/MMOKitchen/Patches/SteamPlatform_Patch.cs
@@ -1,18 +1,9 @@
using HarmonyLib;
-using UnityEngine;
-using Kitchen.Layouts.Modules;
-using Kitchen;
using System.Reflection;
-using Unity.Entities;
-using KitchenLib.Utils;
-using System.IO;
using Steamworks;
using Kitchen.NetworkSupport;
using System.Threading.Tasks;
using System;
-using System.Collections.Generic;
-using System.Linq;
-using Kitchen.Transports;
using Steamworks.Data;
namespace MMOKitchen
{
@@ -29,7 +20,7 @@ namespace MMOKitchen
{
Lobby valueOrDefault = task.Result.GetValueOrDefault();
__instance.CurrentInviteLobby = valueOrDefault;
- //Reflection Stuff
+
MethodInfo performSetPermissions = AccessTools.Method(typeof(SteamPlatform), "PerformSetPermissions");
performSetPermissions.Invoke(__instance, new object[] { __instance.Permissions });
callback(true, valueOrDefault);
diff --git a/MMOKitchen/Properties/AssemblyInfo.cs b/MMOKitchen/Properties/AssemblyInfo.cs
deleted file mode 100644
index a6abecc..0000000
--- a/MMOKitchen/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,4 +0,0 @@
-using MelonLoader;
-
-[assembly: MelonInfo(typeof(MMOKitchen.Mod), "MMO Kitchen", "0.1.1", "StarFluxGames")]
-[assembly: MelonGame("It's Happening", "PlateUp")]
\ No newline at end of file