Config refactor to split dungeon generation and the mod's universal features.
This commit is contained in:
parent
d690b69a26
commit
83d0d8a737
44 changed files with 2001 additions and 1664 deletions
25
DungeonFoyer/DungeonFoyer.sln
Normal file
25
DungeonFoyer/DungeonFoyer.sln
Normal file
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.10.35122.118
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DungeonFoyer", "DungeonFoyer\DungeonFoyer.csproj", "{A0E41AED-7C98-4A4D-B09B-1E59375420D9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A0E41AED-7C98-4A4D-B09B-1E59375420D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A0E41AED-7C98-4A4D-B09B-1E59375420D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A0E41AED-7C98-4A4D-B09B-1E59375420D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A0E41AED-7C98-4A4D-B09B-1E59375420D9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {A173D2B7-7098-4906-881E-72A9A6F15BEC}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
70
DungeonFoyer/DungeonFoyer/DungeonFoyer.csproj
Normal file
70
DungeonFoyer/DungeonFoyer/DungeonFoyer.csproj
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{A0E41AED-7C98-4A4D-B09B-1E59375420D9}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>DungeonFoyer</RootNamespace>
|
||||
<AssemblyName>DungeonFoyer</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>..\..\..\Libraries\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx">
|
||||
<HintPath>..\..\..\Libraries\BepInEx.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="BepInEx.Harmony">
|
||||
<HintPath>..\..\..\Libraries\BepInEx.Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="LethalConfig">
|
||||
<HintPath>..\..\..\Libraries\LethalConfig.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="UnityEngine">
|
||||
<HintPath>..\..\..\Libraries\UnityEngine.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.CoreModule">
|
||||
<HintPath>..\..\..\Libraries\UnityEngine.CoreModule.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="UnityEngine.ImageConversionModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\Libraries\UnityEngine.ImageConversionModule.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Plugin.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
55
DungeonFoyer/DungeonFoyer/Plugin.cs
Normal file
55
DungeonFoyer/DungeonFoyer/Plugin.cs
Normal file
|
@ -0,0 +1,55 @@
|
|||
using BepInEx;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using System.Reflection;
|
||||
using BepInEx.Logging;
|
||||
using HarmonyLib.Tools;
|
||||
|
||||
namespace DungeonFoyer {
|
||||
|
||||
[BepInDependency("ainavt.lc.lethalconfig", "1.4.2")]
|
||||
[BepInPlugin(modGUID, modName, modVersion)]
|
||||
public class Plugin : BaseUnityPlugin {
|
||||
|
||||
public const string modGUID = "dev.ladyalice.scarletmansion.foyer";
|
||||
private const string modName = "Scarlet Foyer";
|
||||
private const string modVersion = "1.0.0";
|
||||
|
||||
public static ManualLogSource logger { get; internal set; }
|
||||
|
||||
void Awake(){
|
||||
|
||||
logger = BepInEx.Logging.Logger.CreateLogSource(modGUID);
|
||||
logger.LogInfo($"Plugin {modName} has been added!");
|
||||
|
||||
// the entire purpose this plugin is so I have a unique assembly for Lethal Config
|
||||
var assemblyPath = Assembly.GetExecutingAssembly().Location;
|
||||
var path = Path.Combine(Path.GetDirectoryName(assemblyPath), "foyer.png");
|
||||
var texture2D = LoadTexture(path);
|
||||
var icon = Sprite.Create(texture2D, new Rect(0, 0, texture2D.width, texture2D.height), Vector2.zero);
|
||||
|
||||
LethalConfig.LethalConfigManager.SetModIcon(icon);
|
||||
LethalConfig.LethalConfigManager.SetModDescription("This is the config for the Scarlet Devil Mansion's Foyer dungeon variant.");
|
||||
}
|
||||
|
||||
Texture2D LoadTexture(string FilePath) {
|
||||
Texture2D Tex2D;
|
||||
byte[] FileData;
|
||||
|
||||
if (File.Exists(FilePath)){
|
||||
FileData = File.ReadAllBytes(FilePath);
|
||||
Tex2D = new Texture2D(2, 2);
|
||||
Tex2D.LoadImage(FileData);
|
||||
return Tex2D;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
36
DungeonFoyer/DungeonFoyer/Properties/AssemblyInfo.cs
Normal file
36
DungeonFoyer/DungeonFoyer/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// アセンブリに関する一般情報は以下を通して制御されます
|
||||
// 制御されます。アセンブリに関連付けられている情報を変更するには、
|
||||
// これらの属性値を変更してください。
|
||||
[assembly: AssemblyTitle("DungeonFoyer")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("DungeonFoyer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// ComVisible を false に設定すると、このアセンブリ内の型は COM コンポーネントから
|
||||
// 参照できなくなります。COM からこのアセンブリ内の型にアクセスする必要がある場合は、
|
||||
// その型の ComVisible 属性を true に設定してください。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// このプロジェクトが COM に公開される場合、次の GUID が typelib の ID になります
|
||||
[assembly: Guid("a0e41aed-7c98-4a4d-b09b-1e59375420d9")]
|
||||
|
||||
// アセンブリのバージョン情報は、以下の 4 つの値で構成されています:
|
||||
//
|
||||
// メジャー バージョン
|
||||
// マイナー バージョン
|
||||
// ビルド番号
|
||||
// リビジョン
|
||||
//
|
||||
// すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
|
||||
// 既定値にすることができます:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
Loading…
Add table
Add a link
Reference in a new issue