Version 0.5.0 Compatible with OWML 2.1.0

Update to Framework 4.8
Update all NuGet packages to latest
Remove unused references
Add NetAnalyzers
Close all messages from new NetAnalyzers
This commit is contained in:
Adam Kauffman 2021-10-23 01:03:23 -07:00
parent 220cdf3d05
commit 7dca739904
7 changed files with 65 additions and 229 deletions

View File

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.CodeAnalysis.NetAnalyzers.5.0.3\build\Microsoft.CodeAnalysis.NetAnalyzers.props" Condition="Exists('..\packages\Microsoft.CodeAnalysis.NetAnalyzers.5.0.3\build\Microsoft.CodeAnalysis.NetAnalyzers.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@ -9,9 +10,12 @@
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Clock</RootNamespace> <RootNamespace>Clock</RootNamespace>
<AssemblyName>Clock</AssemblyName> <AssemblyName>Clock</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion> <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment> <FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic> <Deterministic>true</Deterministic>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@ -21,6 +25,7 @@
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>none</DebugType> <DebugType>none</DebugType>
@ -29,73 +34,47 @@
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony, Version=1.2.0.1, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="0Harmony, Version=2.1.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Lib.Harmony.1.2.0.1\lib\net35\0Harmony.dll</HintPath> <HintPath>..\packages\Lib.Harmony.2.1.1\lib\net48\0Harmony.dll</HintPath>
</Reference> </Reference>
<Reference Include="Assembly-CSharp"> <Reference Include="Assembly-CSharp">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\Assembly-CSharp.dll</HintPath> <HintPath>$(GameDir)\OuterWilds_Data\Managed\Assembly-CSharp.dll</HintPath>
</Reference> </Reference>
<Reference Include="Assembly-CSharp-firstpass">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
</Reference>
<Reference Include="Assembly-UnityScript">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\Assembly-UnityScript.dll</HintPath>
</Reference>
<Reference Include="ConsoleUtilsImport">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\ConsoleUtilsImport.dll</HintPath>
</Reference>
<Reference Include="DataPlatformImport">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\DataPlatformImport.dll</HintPath>
</Reference>
<Reference Include="GamepadImport">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\GamepadImport.dll</HintPath>
</Reference>
<Reference Include="Mono.Security">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\Mono.Security.dll</HintPath>
</Reference>
<Reference Include="NAudio-Unity, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="NAudio-Unity, Version=2.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\OWML.0.7.3\lib\net35\NAudio-Unity.dll</HintPath> <HintPath>..\packages\OWML.2.1.0\lib\net40\NAudio-Unity.dll</HintPath>
</Reference> </Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Json.Net.Unity3D.9.0.1\lib\net35\Newtonsoft.Json.dll</HintPath> <HintPath>..\packages\Json.Net.Unity3D.9.0.1\lib\net35\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="OWML, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="OWML.Common, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\OWML.0.7.3\lib\net35\OWML.dll</HintPath> <HintPath>..\packages\OWML.2.1.0\lib\net40\OWML.Common.dll</HintPath>
</Reference> </Reference>
<Reference Include="OWML.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="OWML.Logging, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\OWML.0.7.3\lib\net35\OWML.Common.dll</HintPath> <HintPath>..\packages\OWML.2.1.0\lib\net40\OWML.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="OWML.Logging, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="OWML.ModHelper, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\OWML.0.7.3\lib\net35\OWML.Logging.dll</HintPath> <HintPath>..\packages\OWML.2.1.0\lib\net40\OWML.ModHelper.dll</HintPath>
</Reference> </Reference>
<Reference Include="OWML.ModHelper, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="OWML.ModHelper.Assets, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.dll</HintPath> <HintPath>..\packages\OWML.2.1.0\lib\net40\OWML.ModHelper.Assets.dll</HintPath>
</Reference> </Reference>
<Reference Include="OWML.ModHelper.Assets, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="OWML.ModHelper.Events, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Assets.dll</HintPath> <HintPath>..\packages\OWML.2.1.0\lib\net40\OWML.ModHelper.Events.dll</HintPath>
</Reference> </Reference>
<Reference Include="OWML.ModHelper.Events, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="OWML.ModHelper.Input, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Events.dll</HintPath> <HintPath>..\packages\OWML.2.1.0\lib\net40\OWML.ModHelper.Input.dll</HintPath>
</Reference> </Reference>
<Reference Include="OWML.ModHelper.Input, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="OWML.ModHelper.Interaction, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Input.dll</HintPath> <HintPath>..\packages\OWML.2.1.0\lib\net40\OWML.ModHelper.Interaction.dll</HintPath>
</Reference> </Reference>
<Reference Include="OWML.ModHelper.Interaction, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="OWML.ModHelper.Menus, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Interaction.dll</HintPath> <HintPath>..\packages\OWML.2.1.0\lib\net40\OWML.ModHelper.Menus.dll</HintPath>
</Reference> </Reference>
<Reference Include="OWML.ModHelper.Menus, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="OWML.Utils, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Menus.dll</HintPath> <HintPath>..\packages\OWML.2.1.0\lib\net40\OWML.Utils.dll</HintPath>
</Reference>
<Reference Include="Rewired_Core">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\Rewired_Core.dll</HintPath>
</Reference>
<Reference Include="Rewired_Windows">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\Rewired_Windows.dll</HintPath>
</Reference>
<Reference Include="StorageImport">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\StorageImport.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@ -103,174 +82,15 @@
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="UnityEngine">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AccessibilityModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.AccessibilityModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AIModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.AIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AnimationModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ARModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.ARModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AssetBundleModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.AudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClothModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.ClothModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClusterInputModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.ClusterInputModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClusterRendererModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.ClusterRendererModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule"> <Reference Include="UnityEngine.CoreModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.CoreModule.dll</HintPath> <HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
</Reference> </Reference>
<Reference Include="UnityEngine.CrashReportingModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.CrashReportingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.DirectorModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.DirectorModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.GameCenterModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.GameCenterModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.GridModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.GridModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ImageConversionModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.ImageConversionModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule"> <Reference Include="UnityEngine.IMGUIModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath> <HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.IMGUIModule.dll</HintPath>
</Reference> </Reference>
<Reference Include="UnityEngine.InputModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.InputModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.JSONSerializeModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.JSONSerializeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Networking">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.Networking.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ParticlesLegacyModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.ParticlesLegacyModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ParticleSystemModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.ParticleSystemModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PerformanceReportingModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.PerformanceReportingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Physics2DModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.Physics2DModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ScreenCaptureModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.ScreenCaptureModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SharedInternalsModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.SharedInternalsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpatialTracking">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.SpatialTracking.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpriteMaskModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.SpriteMaskModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpriteShapeModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.SpriteShapeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.StandardEvents">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.StandardEvents.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.StyleSheetsModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.StyleSheetsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TerrainModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.TerrainModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TerrainPhysicsModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.TerrainPhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule"> <Reference Include="UnityEngine.TextRenderingModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath> <HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.TextRenderingModule.dll</HintPath>
</Reference> </Reference>
<Reference Include="UnityEngine.TilemapModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.TilemapModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Timeline">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.Timeline.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIElementsModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.UIElementsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.UIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UNETModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.UNETModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityAnalyticsModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.UnityAnalyticsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityConnectModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.UnityConnectModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestAudioModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.UnityWebRequestAudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.UnityWebRequestModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestTextureModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.UnityWebRequestTextureModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestWWWModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.UnityWebRequestWWWModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VehiclesModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.VehiclesModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VideoModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.VideoModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VRModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.VRModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.WebModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.WebModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.WindModule">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEngine.WindModule.dll</HintPath>
</Reference>
<Reference Include="UnityEtx">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityEtx.dll</HintPath>
</Reference>
<Reference Include="UnityFbxPrefab">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UnityFbxPrefab.dll</HintPath>
</Reference>
<Reference Include="UsersImport">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\UsersImport.dll</HintPath>
</Reference>
<Reference Include="XboxOneCommonImport">
<HintPath>$(GameDir)\OuterWilds_Data\Managed\XboxOneCommonImport.dll</HintPath>
</Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="OWClock.cs" /> <Compile Include="OWClock.cs" />
@ -286,6 +106,10 @@
<None Include="manifest.json" /> <None Include="manifest.json" />
<None Include="packages.config" /> <None Include="packages.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.NetAnalyzers.5.0.3\analyzers\dotnet\cs\Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll" />
<Analyzer Include="..\packages\Microsoft.CodeAnalysis.NetAnalyzers.5.0.3\analyzers\dotnet\cs\Microsoft.CodeAnalysis.NetAnalyzers.dll" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent> <PostBuildEvent>
@ -306,4 +130,12 @@
rmdir /s /q "$(ProjectDir)\Release" rmdir /s /q "$(ProjectDir)\Release"
</PostBuildEvent> </PostBuildEvent>
</PropertyGroup> </PropertyGroup>
<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\Microsoft.CodeAnalysis.NetAnalyzers.5.0.3\build\Microsoft.CodeAnalysis.NetAnalyzers.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeAnalysis.NetAnalyzers.5.0.3\build\Microsoft.CodeAnalysis.NetAnalyzers.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.CodeAnalysis.NetAnalyzers.5.0.3\build\Microsoft.CodeAnalysis.NetAnalyzers.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeAnalysis.NetAnalyzers.5.0.3\build\Microsoft.CodeAnalysis.NetAnalyzers.targets'))" />
</Target>
<Import Project="..\packages\Microsoft.CodeAnalysis.NetAnalyzers.5.0.3\build\Microsoft.CodeAnalysis.NetAnalyzers.targets" Condition="Exists('..\packages\Microsoft.CodeAnalysis.NetAnalyzers.5.0.3\build\Microsoft.CodeAnalysis.NetAnalyzers.targets')" />
</Project> </Project>

View File

@ -1,6 +1,5 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Runtime.CompilerServices;
namespace Clock namespace Clock
{ {

View File

@ -10,14 +10,14 @@ namespace Clock
public class OWClock : ModBehaviour public class OWClock : ModBehaviour
{ {
private static EventFile _save; private static EventFile _save;
private List<string> _eventListStr = new List<string>(); private readonly List<string> _eventListStr = new List<string>();
private List<KeyValuePair<float, string>> _eventList = new List<KeyValuePair<float, string>>(); private readonly List<KeyValuePair<float, string>> _eventList = new List<KeyValuePair<float, string>>();
private Font _hudFont; private Font _hudFont;
private float _xPos; private float _xPos;
private float _yPos; private float _yPos;
private float _width; private float _width;
public static IModHelper Helper; internal static IModHelper Helper;
public static bool CountUp { get; private set; } public static bool CountUp { get; private set; }
public static bool Milliseconds { get; private set; } public static bool Milliseconds { get; private set; }
public static int EventCount { get; private set; } public static int EventCount { get; private set; }
@ -74,11 +74,14 @@ namespace Clock
return; return;
} }
var style = new GUIStyle(); var style = new GUIStyle
style.font = _hudFont; {
style.fontSize = 30; font = _hudFont,
fontSize = 30,
wordWrap = true
};
style.normal.textColor = Color.white; style.normal.textColor = Color.white;
style.wordWrap = true;
var timestamp = CountUp ? "Time Elapsed: " + ParseTime(elapsed) : "Time Remaining: " + ParseTime(TimeLoop.GetSecondsRemaining()); var timestamp = CountUp ? "Time Elapsed: " + ParseTime(elapsed) : "Time Remaining: " + ParseTime(TimeLoop.GetSecondsRemaining());
GUI.Label(new Rect(_xPos, _yPos, _width, 60f), timestamp, style); GUI.Label(new Rect(_xPos, _yPos, _width, 60f), timestamp, style);
@ -95,10 +98,12 @@ namespace Clock
{ {
continue; continue;
} }
if (EnabledTypes.IndexOf((int)timeEvent.type) == -1) if (EnabledTypes.IndexOf((int)timeEvent.type) == -1)
{ {
continue; continue;
} }
var scaleFactor = (timeEvent.Timestamp - elapsed) / 20; var scaleFactor = (timeEvent.Timestamp - elapsed) / 20;
style.normal.textColor = Color.Lerp(Color.red, Color.white, scaleFactor); style.normal.textColor = Color.Lerp(Color.red, Color.white, scaleFactor);
var timeString = CountUp ? ParseTime(timeEvent.Timestamp) : ParseTime(timeEvent.Timestamp - elapsed); var timeString = CountUp ? ParseTime(timeEvent.Timestamp) : ParseTime(timeEvent.Timestamp - elapsed);
@ -107,7 +112,6 @@ namespace Clock
yOff += labelSize; yOff += labelSize;
GUI.Label(new Rect(_xPos, _yPos - yOff, _width, labelSize), $"{timeString} - {timeEvent.Name}", style); GUI.Label(new Rect(_xPos, _yPos - yOff, _width, labelSize), $"{timeString} - {timeEvent.Name}", style);
shown++; shown++;
} }
} }
@ -122,7 +126,7 @@ namespace Clock
Save.AddEvent(TimeLoop.GetSecondsElapsed(), text); Save.AddEvent(TimeLoop.GetSecondsElapsed(), text);
} }
string ParseTime(float timestamp) static string ParseTime(float timestamp)
{ {
var minutes = Mathf.Floor(timestamp / 60f).ToString().PadLeft(2, '0'); var minutes = Mathf.Floor(timestamp / 60f).ToString().PadLeft(2, '0');
var seconds = Math.Truncate(timestamp % 60f).ToString().PadLeft(2, '0'); var seconds = Math.Truncate(timestamp % 60f).ToString().PadLeft(2, '0');
@ -150,7 +154,6 @@ namespace Clock
EnabledTypes.Add(i); EnabledTypes.Add(i);
} }
} }
} }
} }
} }

View File

@ -5,11 +5,11 @@ using System.Runtime.InteropServices;
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("ClockLib")] [assembly: AssemblyTitle("ClockLib")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("Adds a clock overlay and eventlist")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ClockLib")] [assembly: AssemblyProduct("clubby789.OWClock")]
[assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyCopyright("Copyright © clubby789 2020")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("0.5.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("0.5.0.0")]

View File

@ -13,6 +13,7 @@ namespace Clock
Chert, Chert,
Misc Misc
} }
public float Timestamp; public float Timestamp;
public string Name; public string Name;
public Type type = Type.Misc; public Type type = Type.Misc;

View File

@ -4,6 +4,6 @@
"name": "Clock", "name": "Clock",
"uniqueName": "clubby789.OWClock", "uniqueName": "clubby789.OWClock",
"description": "Adds a clock overlay and eventlist", "description": "Adds a clock overlay and eventlist",
"version": "0.4.0", "version": "0.5.0",
"owmlVersion": "0.7.3" "owmlVersion": "2.1.0"
} }

View File

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="Json.Net.Unity3D" version="9.0.1" targetFramework="net35" /> <package id="Json.Net.Unity3D" version="9.0.1" targetFramework="net35" />
<package id="Lib.Harmony" version="1.2.0.1" targetFramework="net35" /> <package id="Lib.Harmony" version="2.1.1" targetFramework="net48" />
<package id="OWML" version="0.7.3" targetFramework="net35" /> <package id="Microsoft.CodeAnalysis.NetAnalyzers" version="5.0.3" targetFramework="net48" developmentDependency="true" />
<package id="OWML" version="2.1.0" targetFramework="net48" />
</packages> </packages>