Added Yukari pit hallway tile
Changed generation to use dungeonflow nodes Made map smaller Updated mimics patch to not be dumb
This commit is contained in:
parent
cdadd75ee9
commit
6613191d7e
14 changed files with 223 additions and 84 deletions
|
@ -15,25 +15,28 @@ using DunGen;
|
|||
using ScarletMansion.GamePatch.FixValues;
|
||||
using UnityEngine.Events;
|
||||
using GameNetcodeStuff;
|
||||
using ScarletMansion;
|
||||
using ScarletMansion.GamePatch.Components;
|
||||
using ScarletMansion.DunGenPatch;
|
||||
|
||||
namespace ScarletMansion.ModPatch {
|
||||
namespace ScarletMansionMimicsPatch {
|
||||
|
||||
public class Patch {
|
||||
|
||||
public Patch() {
|
||||
MimicsAPI.GetAPI().RegisterMimicEventHandler(new SDMMimicEventHandler());
|
||||
|
||||
public static void Activate() {
|
||||
MimicsAPI.GetAPI().RegisterMimicEventHandler(new Patch.SDMMimicEventHandler());
|
||||
Plugin.Instance.harmony.PatchAll(typeof(Patch));
|
||||
}
|
||||
|
||||
|
||||
public class SDMMimicEventHandler : MimicEventHandler
|
||||
{
|
||||
|
||||
public override string ModGUID => Plugin.modGUID;
|
||||
|
||||
public override bool IsMyInteriorLoaded => DunGenPatch.Patch.active;
|
||||
public override bool IsMyInteriorLoaded => ScarletMansion.DunGenPatch.Patch.active;
|
||||
|
||||
public override void OnMimicCreated(MimicDoor mimicDoor, Doorway doorway) {
|
||||
var c = doorway.transform.parent.GetComponentInChildren<DunGenPatch.Doorways.DoorwayCleanup>();
|
||||
var c = doorway.transform.parent.GetComponentInChildren<ScarletMansion.DunGenPatch.Doorways.DoorwayCleanup>();
|
||||
if (c != null) {
|
||||
c.overrideConnector = true;
|
||||
c.overrideNoDoorway = true;
|
||||
|
@ -42,9 +45,9 @@ namespace ScarletMansion.ModPatch {
|
|||
var fixfireexit = doorway.GetComponentInChildren<FixFireExit>(true);
|
||||
fixfireexit.ForcefullyEnableDoorway();
|
||||
|
||||
var mimicDoorMesh = Utility.FindChildRecurvisely(mimicDoor.transform, "DoorMesh");
|
||||
var mimicFrame = Utility.FindChildRecurvisely(mimicDoor.transform, "Frame");
|
||||
var mimicLight = Utility.FindChildRecurvisely(mimicDoor.transform, "Light");
|
||||
var mimicDoorMesh = ScarletMansion.Utility.FindChildRecurvisely(mimicDoor.transform, "DoorMesh");
|
||||
var mimicFrame = ScarletMansion.Utility.FindChildRecurvisely(mimicDoor.transform, "Frame");
|
||||
var mimicLight = ScarletMansion.Utility.FindChildRecurvisely(mimicDoor.transform, "Light");
|
||||
|
||||
if (fixfireexit.EnableVanillaFireExit){
|
||||
FixDoorwayForVanillaFireExit(fixfireexit, mimicDoorMesh, mimicFrame, mimicLight);
|
||||
|
|
|
@ -0,0 +1,66 @@
|
|||
using BepInEx;
|
||||
using BepInEx.Logging;
|
||||
using HarmonyLib;
|
||||
using ScarletMansion;
|
||||
using ScarletMansion.DunGenPatch;
|
||||
using ScarletMansion.GamePatch.Managers;
|
||||
using ScarletMansion.GamePatch;
|
||||
using ScarletMansion.ModPatch;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using Mimics.API;
|
||||
using BepInEx.Bootstrap;
|
||||
|
||||
namespace ScarletMansionMimicsPatch {
|
||||
|
||||
[BepInPlugin(modGUID, modName, modVersion)]
|
||||
|
||||
[BepInDependency("ImoutoSama.ScarletMansion", "1.3.12")]
|
||||
[BepInDependency(targetModGUID, BepInDependency.DependencyFlags.SoftDependency)]
|
||||
|
||||
public class Plugin : BaseUnityPlugin {
|
||||
|
||||
public const string modGUID = "ImoutoSama.ScarletMansionMimicsPatch";
|
||||
private const string modName = "Scarlet Mansion Mimics Patch";
|
||||
private const string modVersion = "1.0.0";
|
||||
|
||||
public const string targetModGUID = "x753.Mimics";
|
||||
public const string targetModVersion = "2.6.0";
|
||||
|
||||
public readonly Harmony harmony = new Harmony(modGUID);
|
||||
public static Plugin Instance {get; private set;}
|
||||
public static ManualLogSource logger { get; internal set; }
|
||||
|
||||
void Awake(){
|
||||
if (Instance == null) Instance = this;
|
||||
|
||||
logger = BepInEx.Logging.Logger.CreateLogSource(modGUID);
|
||||
logger.LogInfo($"Plugin {modName} has been added!");
|
||||
|
||||
var modLoaded = Chainloader.PluginInfos.ContainsKey(targetModGUID);
|
||||
if (!modLoaded) return;
|
||||
|
||||
bool validVersion;
|
||||
var pluginInfo = Chainloader.PluginInfos[targetModGUID];
|
||||
var loadedVersion = pluginInfo.Metadata.Version;
|
||||
if (string.IsNullOrWhiteSpace(targetModVersion)){
|
||||
validVersion = true;
|
||||
} else {
|
||||
var requiredVersion = new Version(targetModVersion);
|
||||
validVersion = loadedVersion >= requiredVersion;
|
||||
}
|
||||
|
||||
if (validVersion){
|
||||
logger.LogInfo($"Plugin {modName} has been added!");
|
||||
Patch.Activate();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -63,6 +63,7 @@
|
|||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Patch.cs" />
|
||||
<Compile Include="Plugin.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue