BepInEx Support
This commit is contained in:
@@ -1,11 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'MelonLoader|AnyCPU'">
|
||||
<TargetFramework>net4.7.1</TargetFramework>
|
||||
<DefineConstants>MelonLoader</DefineConstants>
|
||||
<OutputPath>bin\MelonLoader\</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'BepInEx|AnyCPU'">
|
||||
<TargetFramework>net4.7.1</TargetFramework>
|
||||
<DefineConstants>BepInEx</DefineConstants>
|
||||
<OutputPath>bin\BepInEx\</OutputPath>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$(os)=='Windows_NT'">
|
||||
<PlateUpGameFolder>F:\SteamLibrary\steamapps\common\PlateUp\PlateUp</PlateUpGameFolder>
|
||||
<PlateUpGameFolder>..\..\..\..\Libraries</PlateUpGameFolder>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="$(os)=='UNIX'">
|
||||
@@ -25,6 +33,9 @@
|
||||
<Reference Include="MelonLoader">
|
||||
<HintPath>$(PlateUpGameFolder)\MelonLoader\MelonLoader.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>$(PlateUpGameFolder)\BepInEx\core\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Kitchen">
|
||||
<HintPath>$(PlateUpGameFolder)\PlateUp_Data\Managed\Kitchen.Common.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -74,12 +85,10 @@
|
||||
<HintPath>$(PlateUpGameFolder)\PlateUp_Data\Managed\Facepunch.Steamworks.Win64.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="KitchenLib">
|
||||
<HintPath>$(PlateUpGameFolder)\Mods\KitchenLib.dll</HintPath>
|
||||
<HintPath>$(PlateUpGameFolder)\Mods\KitchenLib-MelonLoader.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="KitchenLib">
|
||||
<HintPath>$(PlateUpGameFolder)\BepInEx\plugins\KitchenLib-BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<Target Name="CopyToPlateUp" AfterTargets="Build">
|
||||
<Message Text="Copying MMOKitchen to PlateUp Mods folder" Importance="High" />
|
||||
<Copy SourceFiles="$(OutputPath)\MMOKitchen.dll" DestinationFolder="$(PlateUpGameFolder)\Mods" ContinueOnError="false" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
+22
-4
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -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<CPlayer>(entity2).Index;
|
||||
bool flag = i == ((CPlayer)getComponent.Invoke(__instance, new object[] { entity2 })).Index;
|
||||
if (flag)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,6 @@ namespace MMOKitchen
|
||||
garageDecorations.SetActive(false);
|
||||
create.Invoke(__instance, new object[]{GameData.Main.Get<Appliance>(AssetReference.GarageDecorations), new Vector3(-8f, 0f, -2f), Vector3.forward});
|
||||
|
||||
//Mod.Log(GameData.Main.Get<Appliance>(AssetReference.GarageDecorations).Prefab.name);
|
||||
Entity entity = default(Entity);
|
||||
entity = (Entity)create.Invoke(__instance, new object[]{GameData.Main.Get<Appliance>(AssetReference.LoadoutPedestal), new Vector3(-8.5f, 0f, -4f), Vector3.right});
|
||||
EntityUtils.GetEntityManager().AddComponent<CItemPedestal>(entity);
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -15,7 +15,6 @@ namespace MMOKitchen
|
||||
{
|
||||
PlayerManager playerManager = World.DefaultGameObjectInjectionWorld.GetExistingSystem<PlayerManager>();
|
||||
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"));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
using MelonLoader;
|
||||
|
||||
[assembly: MelonInfo(typeof(MMOKitchen.Mod), "MMO Kitchen", "0.1.1", "StarFluxGames")]
|
||||
[assembly: MelonGame("It's Happening", "PlateUp")]
|
||||
Reference in New Issue
Block a user