-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84c1ed2
commit 7901efb
Showing
10 changed files
with
375 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using KK_Plugins; | ||
using System.Reflection; | ||
using static KK_Plugins.LightingTweaks; | ||
|
||
[assembly: AssemblyTitle(PluginNameInternal)] | ||
[assembly: AssemblyProduct(PluginNameInternal)] | ||
[assembly: AssemblyDescription(PluginName + " for " + Constants.GameName)] | ||
[assembly: AssemblyVersion(Version)] | ||
[assembly: AssemblyFileVersion(Version)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>6ab4c919-0749-438b-95d5-b55d737c3444</ProjectGuid> | ||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion> | ||
</PropertyGroup> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" /> | ||
<PropertyGroup /> | ||
<Import Project="LightingTweaks.Core.projitems" Label="Shared" /> | ||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" /> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<PropertyGroup> | ||
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' < '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects> | ||
<HasSharedItems>true</HasSharedItems> | ||
<SharedGUID>6ab4c919-0749-438b-95d5-b55d737c3444</SharedGUID> | ||
</PropertyGroup> | ||
<PropertyGroup Label="Configuration"> | ||
<Import_RootNamespace>LightingTweaks.Core</Import_RootNamespace> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Compile Include="$(MSBuildThisFileDirectory)AssemblyInfo.cs" /> | ||
<Compile Include="$(MSBuildThisFileDirectory)LightingTweaks.cs" /> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using BepInEx; | ||
using BepInEx.Logging; | ||
using KKAPI.Maker; | ||
using KKAPI.Studio; | ||
using UnityEngine; | ||
using UnityEngine.SceneManagement; | ||
|
||
namespace KK_Plugins | ||
{ | ||
[BepInPlugin(GUID, PluginName, Version)] | ||
public class LightingTweaks : BaseUnityPlugin | ||
{ | ||
public const string GUID = "com.deathweasel.bepinex.lightingtweaks"; | ||
public const string PluginName = "Lighting Tweaks"; | ||
public const string PluginNameInternal = "KK_LightingTweaks"; | ||
public const string Version = "1.0"; | ||
internal static new ManualLogSource Logger; | ||
|
||
internal void Main() | ||
{ | ||
Logger = base.Logger; | ||
|
||
MakerAPI.MakerFinishedLoading += (s, e) => TweakLighting(); | ||
SceneManager.sceneLoaded += SceneManager_sceneLoaded; | ||
} | ||
|
||
private void TweakLighting() | ||
{ | ||
foreach (var light in FindObjectsOfType<Light>()) | ||
{ | ||
light.shadowCustomResolution = 10000; | ||
light.shadowBias = 0.0075f; | ||
if (light.name == "Directional Chara") //Studio shadow strength is different from main game for some reason | ||
light.shadowStrength = 1; | ||
} | ||
} | ||
|
||
private void SceneManager_sceneLoaded(Scene s, LoadSceneMode lsm) | ||
{ | ||
if (StudioAPI.InsideStudio) | ||
TweakLighting(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<?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>{A0316A46-4852-4E57-8528-EC935011D8D1}</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<AppDesignerFolder>Properties</AppDesignerFolder> | ||
<RootNamespace>KK_Plugins</RootNamespace> | ||
<AssemblyName>KK_LightingTweaks</AssemblyName> | ||
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> | ||
<FileAlignment>512</FileAlignment> | ||
<Deterministic>true</Deterministic> | ||
<NuGetPackageImportStamp> | ||
</NuGetPackageImportStamp> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<OutputPath>..\..\bin\</OutputPath> | ||
<DefineConstants>TRACE;DEBUG;KKS</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>full</DebugType> | ||
<Optimize>true</Optimize> | ||
<OutputPath>..\..\bin\</OutputPath> | ||
<DefineConstants>TRACE;KKS</DefineConstants> | ||
<ErrorReport>prompt</ErrorReport> | ||
<WarningLevel>4</WarningLevel> | ||
<DebugSymbols>true</DebugSymbols> | ||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="0Harmony, Version=2.5.1.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\IllusionLibs.BepInEx.Harmony.2.5.1\lib\net35\0Harmony.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Assembly-CSharp, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\IllusionLibs.Koikatu.Assembly-CSharp.2019.4.27\lib\net35\Assembly-CSharp.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="Assembly-CSharp-firstpass, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\IllusionLibs.Koikatu.Assembly-CSharp-firstpass.2019.4.27\lib\net35\Assembly-CSharp-firstpass.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="BepInEx, Version=5.4.12.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\IllusionLibs.BepInEx.5.4.12\lib\net35\BepInEx.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="BepInEx.Harmony, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\IllusionLibs.BepInEx.Harmony.2.5.1\lib\net35\BepInEx.Harmony.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="ExtensibleSaveFormat, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\ExtensibleSaveFormat.Koikatu.16.4.0\lib\net35\ExtensibleSaveFormat.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="KKAPI, Version=1.23.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\IllusionModdingAPI.KKAPI.1.23.0\lib\net35\KKAPI.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Xml.Linq" /> | ||
<Reference Include="System.Data.DataSetExtensions" /> | ||
<Reference Include="System.Data" /> | ||
<Reference Include="System.Xml" /> | ||
<Reference Include="UnityEngine, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\IllusionLibs.Koikatu.UnityEngine.5.6.2\lib\net35\UnityEngine.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
<Reference Include="UnityEngine.UI, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> | ||
<HintPath>..\..\packages\IllusionLibs.Koikatu.UnityEngine.UI.5.6.2\lib\net35\UnityEngine.UI.dll</HintPath> | ||
<Private>False</Private> | ||
</Reference> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Folder Include="Properties\" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<None Include="packages.config" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Analyzer Include="..\..\packages\BepInEx.Analyzers.1.0.4\analyzers\dotnet\cs\BepInEx.Analyzers.CodeFixes.dll" /> | ||
<Analyzer Include="..\..\packages\BepInEx.Analyzers.1.0.4\analyzers\dotnet\cs\BepInEx.Analyzers.dll" /> | ||
<Analyzer Include="..\..\packages\KoikatuCompatibilityAnalyzer.1.0.1\analyzers\dotnet\cs\KoikatuCompatibilityAnalyzer.dll" /> | ||
<Analyzer Include="..\..\packages\Microsoft.Unity.Analyzers.1.11.0\analyzers\dotnet\cs\Microsoft.Unity.Analyzers.dll" /> | ||
</ItemGroup> | ||
<Import Project="..\Shared\Shared.projitems" Label="Shared" /> | ||
<Import Project="..\LightingTweaks.Core\LightingTweaks.Core.projitems" Label="Shared" /> | ||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
<PropertyGroup> | ||
<PostBuildEvent>IF EXIST "$(TargetDir)$(TargetName).pdb" IF EXIST "$(SolutionDir)pdb2mdb.exe" CALL "$(SolutionDir)pdb2mdb.exe" "$(TargetPath)" | ||
IF EXIST "$(SolutionDir)PostBuild.bat" CALL "$(SolutionDir)PostBuild.bat" "$(TargetPath)" KK | ||
</PostBuildEvent> | ||
</PropertyGroup> | ||
<Import Project="..\..\packages\IllusionLibs.BepInEx.Harmony.2.5.1\build\IllusionLibs.BepInEx.Harmony.targets" Condition="Exists('..\..\packages\IllusionLibs.BepInEx.Harmony.2.5.1\build\IllusionLibs.BepInEx.Harmony.targets')" /> | ||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> | ||
<PropertyGroup> | ||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> | ||
</PropertyGroup> | ||
<Error Condition="!Exists('..\..\packages\IllusionLibs.BepInEx.Harmony.2.5.1\build\IllusionLibs.BepInEx.Harmony.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\IllusionLibs.BepInEx.Harmony.2.5.1\build\IllusionLibs.BepInEx.Harmony.targets'))" /> | ||
</Target> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<packages> | ||
<package id="BepInEx.Analyzers" version="1.0.4" targetFramework="net35" developmentDependency="true" /> | ||
<package id="ExtensibleSaveFormat.Koikatu" version="16.4.0" targetFramework="net35" developmentDependency="true" /> | ||
<package id="IllusionLibs.BepInEx" version="5.4.12" targetFramework="net35" /> | ||
<package id="IllusionLibs.BepInEx.Harmony" version="2.5.1" targetFramework="net35" /> | ||
<package id="IllusionLibs.Koikatu.Assembly-CSharp" version="2019.4.27" targetFramework="net35" developmentDependency="true" /> | ||
<package id="IllusionLibs.Koikatu.Assembly-CSharp-firstpass" version="2019.4.27" targetFramework="net35" developmentDependency="true" /> | ||
<package id="IllusionLibs.Koikatu.UnityEngine" version="5.6.2" targetFramework="net35" developmentDependency="true" /> | ||
<package id="IllusionLibs.Koikatu.UnityEngine.UI" version="5.6.2" targetFramework="net35" developmentDependency="true" /> | ||
<package id="IllusionModdingAPI.KKAPI" version="1.23.0" targetFramework="net35" developmentDependency="true" /> | ||
<package id="KoikatuCompatibilityAnalyzer" version="1.0.1" targetFramework="net35" developmentDependency="true" /> | ||
<package id="Microsoft.Unity.Analyzers" version="1.11.0" targetFramework="net35" developmentDependency="true" /> | ||
</packages> |
Oops, something went wrong.