256 changes: 90 additions & 166 deletions ContentSettings/ContentSettings.csproj
@@ -1,166 +1,90 @@
<?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>{384D0D40-A096-46C7-A365-EB8A5CD55D54}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>ContentSettings</RootNamespace>
<AssemblyName>ContentSettings</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>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</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>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="0Harmony">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp_publicized, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Downloads\publicized_assemblies\Assembly-CSharp_publicized.dll</HintPath>
</Reference>
<Reference Include="BepInEx">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\BepInEx.dll</HintPath>
</Reference>
<Reference Include="BepInEx.Harmony">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\BepInEx.Harmony.dll</HintPath>
</Reference>
<Reference Include="BepInEx.Preloader">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\BepInEx.Preloader.dll</HintPath>
</Reference>
<Reference Include="HarmonyXInterop">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\HarmonyXInterop.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Mdb">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\Mono.Cecil.Mdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Pdb">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\Mono.Cecil.Pdb.dll</HintPath>
</Reference>
<Reference Include="Mono.Cecil.Rocks">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\Mono.Cecil.Rocks.dll</HintPath>
</Reference>
<Reference Include="MonoMod.RuntimeDetour">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\MonoMod.RuntimeDetour.dll</HintPath>
</Reference>
<Reference Include="MonoMod.Utils">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\MonoMod.Utils.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="PhotonRealtime">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\PhotonRealtime.dll</HintPath>
</Reference>
<Reference Include="PhotonUnityNetworking">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\PhotonUnityNetworking.dll</HintPath>
</Reference>
<Reference Include="PhotonVoice.PUN">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\PhotonVoice.PUN.dll</HintPath>
</Reference>
<Reference Include="Sirenix.Serialization">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Sirenix.Serialization.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="Unity.Localization">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Unity.Localization.dll</HintPath>
</Reference>
<Reference Include="Unity.TextMeshPro">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Unity.TextMeshPro.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputLegacyModule">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.JSONSerializeModule">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\UnityEngine.JSONSerializeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.LocalizationModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\UnityEngine.LocalizationModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SharedInternalsModule, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\UnityEngine.SharedInternalsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIElementsModule">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\UnityEngine.UIElementsModule.dll</HintPath>
</Reference>
<Reference Include="Zorro.Core.Runtime">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Zorro.Core.Runtime.dll</HintPath>
</Reference>
<Reference Include="Zorro.PhotonUtility">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Zorro.PhotonUtility.dll</HintPath>
</Reference>
<Reference Include="Zorro.Recorder, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Zorro.Recorder.dll</HintPath>
</Reference>
<Reference Include="Zorro.Settings.Runtime">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Zorro.Settings.Runtime.dll</HintPath>
</Reference>
<Reference Include="Zorro.UI.Runtime">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Zorro.UI.Runtime.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="API\Patches\SaveSettingsPatch.cs" />
<Compile Include="API\Patches\SettingsPageOpenPatch.cs" />
<Compile Include="API\Patches\SettingsTabSelectModdedPatch.cs" />
<Compile Include="API\SettingsLoader.cs" />
<Compile Include="Main.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="README.md" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>CommanderCat101.ContentSettings</PackageId>
<AssemblyName>CommanderCat101.ContentSettings</AssemblyName>
<Version>1.0.1</Version>
<Description>A library for adding Modded Settings.</Description>
<Authors>CommanderCat101;dhkatz</Authors>

<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Commander-Cat101/ContentSettings</PackageProjectUrl>
<RepositoryUrl>https://github.com/Commander-Cat101/ContentSettings</RepositoryUrl>
<RepositoryType>git</RepositoryType>

<TargetFramework>netstandard2.1</TargetFramework>

<RestoreAdditionalProjectSources>
https://api.nuget.org/v3/index.json;
https://nuget.bepinex.dev/v3/index.json;
</RestoreAdditionalProjectSources>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>

<!-- Auto Versioning -->
<MinVerDefaultPreReleaseIdentifiers>dev</MinVerDefaultPreReleaseIdentifiers>
<MinVerTagPrefix>v</MinVerTagPrefix>

<!-- Needed for BepInEx.AssemblyPublicizer.MSBuild compatibility with MonoMod -->
<NoWarn>$(NoWarn);CS0436</NoWarn>
</PropertyGroup>

<!-- BepInEx References -->
<ItemGroup>
<PackageReference Include="BepInEx.Analyzers" Version="1.*" PrivateAssets="all" ExcludeAssets="RUNTIME"/>
<PackageReference Include="BepInEx.Core" Version="5.*" ExcludeAssets="RUNTIME"/>
<PackageReference Include="BepInEx.PluginInfoProps" Version="2.*" ExcludeAssets="RUNTIME"/>
<PackageReference Include="UnityEngine.Modules" Version="2022.3.10" IncludeAssets="compile" ExcludeAssets="RUNTIME"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" PrivateAssets="all" ExcludeAssets="RUNTIME">
<IncludeAssets>compile; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="MinVer" Version="4.*" PrivateAssets="all" Private="false"/>
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" ExcludeAssets="RUNTIME">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup Condition="$(CI) != 'true'">
<Reference Include="Assembly-CSharp" HintPath="$(CW_REFERENCES)\Assembly-CSharp.dll" Private="False" ExcluseAssets="RUNTIME" Publicize="True"/>
<Reference Include="Unity.Localization" HintPath="$(CW_REFERENCES)\Unity.Localization.dll" Private="False" ExcluseAssets="RUNTIME" Publicize="true"/>
<Reference Include="Unity.TextMeshPro" HintPath="$(CW_REFERENCES)\Unity.TextMeshPro.dll" Private="False" ExcluseAssets="RUNTIME" Publicize="true"/>
<Reference Include="UnityEngine.UI" HintPath="$(CW_REFERENCES)\UnityEngine.UI.dll" Private="False" ExcluseAssets="RUNTIME" Publicize="true"/>
<Reference Include="Zorro.Core.Runtime" HintPath="$(CW_REFERENCES)\Zorro.Core.Runtime.dll" Private="False" ExcluseAssets="RUNTIME" Publicize="true"/>
<Reference Include="Zorro.Settings.Runtime" HintPath="$(CW_REFERENCES)\Zorro.Settings.Runtime.dll" Private="False" ExcluseAssets="RUNTIME" Publicize="True"/>
<Reference Include="Zorro.UI.Runtime" HintPath="$(CW_REFERENCES)\Zorro.UI.Runtime.dll" Private="False" ExcluseAssets="RUNTIME" Publicize="true"/>
</ItemGroup>

<ItemGroup Condition="$(CI) == 'true'">
<PackageReference Include="ContentWarning.GameLibs.Steam" Version="0.1.7-a-ngd.0" Publicize="true" PrivateAssets="All"/>
</ItemGroup>

<ItemGroup>
<None Include="$(ProjectDir)../README.md" Pack="true" PackagePath="/"/>
</ItemGroup>

<!-- MinVer Set Mod Version from Git -->
<Target Name="SetPluginVersion" BeforeTargets="AddGeneratedFile" DependsOnTargets="MinVer">
<PropertyGroup>
<PlainVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch)</PlainVersion>
<BepInExPluginVersion>$(PlainVersion)</BepInExPluginVersion>
</PropertyGroup>
</Target>

<Target Name="ThunderstorePack" AfterTargets="PostBuildEvent" Condition="$(TargetFramework) == 'netstandard2.1' and $(Configuration) == 'Release' and $(CI) == 'true'" DependsOnTargets="SetPluginVersion">
<Exec Command="dotnet tcli build --config-path $(ProjectDir)../assets/thunderstore.toml --package-version $(PlainVersion)"/>
<ItemGroup>
<FilesToRename Include="$(ProjectDir)../dist/*-$(PlainVersion).zip"/>
</ItemGroup>
<Move SourceFiles="@(FilesToRename)" DestinationFiles="@(FilesToRename -&gt; Replace($(PlainVersion), $(MinVerVersion)))"/>
</Target>

<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json"/>
</ItemGroup>
</Project>
27 changes: 0 additions & 27 deletions ContentSettings/Main.cs

This file was deleted.

60 changes: 60 additions & 0 deletions ContentSettings/Patch/SettingsPatch.cs
@@ -0,0 +1,60 @@
// -----------------------------------------------------------------------
// <copyright file="SettingsPatch.cs" company="ContentSettings">
// Copyright (c) ContentSettings. All rights reserved.
// Licensed under the GPL-3.0 license.
// </copyright>
// -----------------------------------------------------------------------

namespace ContentSettings.Patch;

using API;
using HarmonyLib;
using Zorro.Settings;

/// <summary>
/// Patches for the settings system.
/// </summary>
[HarmonyPatch]
internal class SettingsPatch
{
/// <summary>
/// Patches the <see cref="DefaultSettingsSaveLoad.WriteToDisk"/> method to save our custom settings.
/// </summary>
[HarmonyPrefix]
[HarmonyPatch(typeof(DefaultSettingsSaveLoad), nameof(DefaultSettingsSaveLoad.WriteToDisk))]
internal static void WriteToDiskPatch()
{
SettingsLoader.SaveSettings();
}

/// <summary>
/// Patches the <see cref="SettingCategoryTab.Select"/> method to load our custom settings when the modded settings tab is selected.
/// </summary>
/// <param name="__instance">The instance of the <see cref="SettingCategoryTab"/>.</param>
/// <returns>Whether the original method should be called.</returns>
[HarmonyPrefix]
[HarmonyPatch(typeof(SettingCategoryTab), nameof(SettingCategoryTab.Select))]
internal static bool SelectPatch(SettingCategoryTab __instance)
{
if (__instance.name == "MODDED")
{
SettingsLoader.LoadSettingsMenu(__instance.settingsMenu);
}

return false;
}

/// <summary>
/// Patches the <see cref="SettingsMenu"/> to add our custom settings tab to the settings menu.
/// </summary>
/// <param name="__instance">The instance of the <see cref="SettingsMenu"/>.</param>
/// <returns>Whether the original method should be called.</returns>
[HarmonyPrefix]
[HarmonyPatch(typeof(SettingsMenu), nameof(SettingsMenu.OnEnable))]
internal static bool OnEnablePatch(SettingsMenu __instance)
{
SettingsLoader.CreateSettings(__instance);

return true;
}
}
36 changes: 0 additions & 36 deletions ContentSettings/Properties/AssemblyInfo.cs

This file was deleted.

14 changes: 14 additions & 0 deletions ContentSettings/stylecop.json
@@ -0,0 +1,14 @@
{
"$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
"settings": {
"documentationRules": {
"companyName": "ContentSettings",
"copyrightText": "Copyright (c) {companyName}. All rights reserved.\nLicensed under the {licenseName} license.",
"headerDecoration": "-----------------------------------------------------------------------",
"variables": {
"licenseName": "GPL-3.0",
"licenseFile": "LICENSE"
}
}
}
}
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

27 changes: 19 additions & 8 deletions README.md
@@ -1,11 +1,22 @@
# Content Settings
## A library for adding modded settings!

## Installing!
1. Install BepinEx and run the game to generate the BepinEx folders.
2. Download the latest release dll of Content Settings.
3. Put dll into the BepinEx plugin folder.
4. Done!
A library for adding custom settings to Content Warning.

## For Developers
[Example plugin for adding settings because I cba writing documentation](https://github.com/Commander-Cat101/ContentSettings/tree/master/SettingsTemplate)
[![Thunderstore - ContentSettings](https://img.shields.io/badge/Thunderstore-ContentSettings-blue?logo=thunderstore&logoColor=blue)](https://thunderstore.io/c/content-warning/p/CommanderCat101/ContentSettings/)
[![Build](https://github.com/Commander-Cat101/ContentSettings/actions/workflows/build.yml/badge.svg)](https://github.com/Commander-Cat101/ContentSettings/actions/workflows/build.yml)

## Features
- [x] Register custom settings
- [ ] Add custom categories to the menu
- [ ] Addition inputs
- [ ] Text input
- [ ] Checkbox input

## Usage

[Example Plugin](./SettingsTemplate)

## Credits

- [CommanderCat](https://github.com/Commander-Cat101) - Creator and Developer
- [dhkatz](https://github.com/dhkatz) - Developer and Maintainer
68 changes: 24 additions & 44 deletions SettingsTemplate/Main.cs
@@ -1,53 +1,33 @@
using BepInEx;
namespace SettingsTemplate;

using BepInEx;
using ContentSettings.API;
using System.Collections.Generic;
using Zorro.Settings;

namespace SettingsTemplate
[BepInPlugin(MyPluginInfo.PLUGIN_GUID, MyPluginInfo.PLUGIN_NAME, MyPluginInfo.PLUGIN_VERSION)]
public class Main : BaseUnityPlugin
{
[BepInPlugin("commander__cat.contentwarning.settingstemplate", "ContentSettings", "0.0.1")]
public class Main : BaseUnityPlugin
{
public static Main instance { get; private set; }

public bool FeatureEnabled = true;
void Awake()
{
instance = this;
SettingsLoader.RegisterSetting(new SettingTemplate());
}
}
public static Main Instance { get; private set; } = null!;

public class SettingTemplate : EnumSetting, IExposedSetting
public bool FeatureEnabled = true;

private void Awake()
{
public override void ApplyValue()
{
Main.instance.FeatureEnabled = Value == 0 ? false : true;
}

public override List<string> GetChoices()
{
return new List<string>()
{
"Off",
"On"
};
}

public string GetDisplayName()
{
return "Mod Feature Enabled?";
}

public SettingCategory GetSettingCategory()
{
//Doesnt matter what category it is.
return SettingCategory.Graphics;
}

protected override int GetDefaultValue()
{
return 1;
}
Instance = this;
SettingsLoader.RegisterSetting(new SettingTemplate());
}
}

public class SettingTemplate : EnumSetting, IExposedSetting
{
public override void ApplyValue() => Main.Instance.FeatureEnabled = Value != 0;

public override List<string> GetChoices() => ["Off", "On"];

public string GetDisplayName() => "Mod Feature Enabled?";

public SettingCategory GetSettingCategory() => SettingCategory.Graphics;

public override int GetDefaultValue() => 1;
}
36 changes: 0 additions & 36 deletions SettingsTemplate/Properties/AssemblyInfo.cs

This file was deleted.

119 changes: 47 additions & 72 deletions SettingsTemplate/SettingsTemplate.csproj
@@ -1,72 +1,47 @@
<?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>{DB154562-903F-4F67-8CE6-130FB9B44DF7}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>SettingsTemplate</RootNamespace>
<AssemblyName>SettingsTemplate</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="Assembly-CSharp">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="BepInEx">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\BepInEx.dll</HintPath>
</Reference>
<Reference Include="BepInEx.Preloader">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\core\BepInEx.Preloader.dll</HintPath>
</Reference>
<Reference Include="ContentSettings">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\BepInEx\plugins\ContentSettings.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>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="Zorro.Settings.Runtime">
<HintPath>E:\SteamLibrary\steamapps\common\Content Warning\Content Warning_Data\Managed\Zorro.Settings.Runtime.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PackageId>SettingsTemplate</PackageId>
<Version>1.0.0</Version>
<Description>A template for using ContentSettings</Description>

<TargetFramework>netstandard2.1</TargetFramework>

<RestoreAdditionalProjectSources>
https://api.nuget.org/v3/index.json;
https://nuget.bepinex.dev/v3/index.json;
</RestoreAdditionalProjectSources>

<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>

<!-- Needed for BepInEx.AssemblyPublicizer.MSBuild compatibility with MonoMod -->
<NoWarn>$(NoWarn);CS0436</NoWarn>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\ContentSettings\ContentSettings.csproj" />
</ItemGroup>

<!-- BepInEx References -->
<ItemGroup>
<PackageReference Include="BepInEx.Analyzers" Version="1.*" PrivateAssets="all" ExcludeAssets="RUNTIME"/>
<PackageReference Include="BepInEx.Core" Version="5.*" ExcludeAssets="RUNTIME" />
<PackageReference Include="BepInEx.PluginInfoProps" Version="2.*" ExcludeAssets="RUNTIME"/>
<PackageReference Include="UnityEngine.Modules" Version="2022.3.10" IncludeAssets="compile" ExcludeAssets="RUNTIME"/>
</ItemGroup>

<ItemGroup>
<PackageReference Include="BepInEx.AssemblyPublicizer.MSBuild" Version="0.4.1" PrivateAssets="all" ExcludeAssets="RUNTIME" />
</ItemGroup>

<!-- Game References -->
<ItemGroup Condition="$(CI) != 'true'">
<Reference Include="Assembly-CSharp" HintPath="$(CW_REFERENCES)\Assembly-CSharp.dll" Publicize="True" Private="False" ExcluseAssets="RUNTIME" />
<Reference Include="Zorro.Settings.Runtime" HintPath="$(CW_REFERENCES)\Zorro.Settings.Runtime.dll" Publicize="True" Private="False" ExcluseAssets="RUNTIME" />
</ItemGroup>

<ItemGroup Condition="$(CI) == 'true'">
<PackageReference Include="ContentWarning.GameLibs.Steam" Version="0.1.7-a-ngd.0" Publicize="true" PrivateAssets="All" />
</ItemGroup>
</Project>
Binary file added assets/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions assets/manifest.json
@@ -0,0 +1,7 @@
{
"name": "ContentSettings",
"version_number": "1.0.1",
"website_url": "https://github.com/Commander-Cat101/ContentSettings",
"description": "A library for adding custom settings to Content Warning.",
"dependencies": ["BepInEx-BepInExPack-5.4.2100"]
}
35 changes: 35 additions & 0 deletions assets/thunderstore.toml
@@ -0,0 +1,35 @@
[config]
schemaVersion = "0.0.1"

[package]
namespace = "CommanderCat101"
name = "ContentSettings"
description = "A library for adding custom settings to Content Warning."
websiteUrl = "https://github.com/Commander-Cat101/ContentSettings"
containsNsfwContent = false

[package.dependencies]
BepInEx-BepInExPack = "5.4.2100"

[build]
icon = "logo.png"
readme = "../README.md"
outdir = "../dist"

[[build.copy]]
source = "../LICENSE"
target = "/"

[[build.copy]]
source = "../CHANGELOG.md"
target = "/"

[[build.copy]]
source = "../ContentSettings/bin/Release/netstandard2.1/CommanderCat101.ContentSettings.dll"
target = "/BepInEx/plugins/ContentSettings/"

[publish]
communities = [ "content-warning", ]
repository = "https://thunderstore.io"
[publish.categories]
content-warning = [ "bepinex", "mods", "clientside", "serverside" ]