diff --git a/ClockLib/ClockLib.csproj b/ClockLib/ClockLib.csproj index f4169e1..474d710 100644 --- a/ClockLib/ClockLib.csproj +++ b/ClockLib/ClockLib.csproj @@ -1,5 +1,6 @@  + Debug @@ -9,9 +10,12 @@ Properties Clock Clock - v3.5 + v4.8 512 true + + + true @@ -21,6 +25,7 @@ DEBUG;TRACE prompt 4 + false none @@ -29,73 +34,47 @@ TRACE prompt 4 + false - - ..\packages\Lib.Harmony.1.2.0.1\lib\net35\0Harmony.dll + + ..\packages\Lib.Harmony.2.1.1\lib\net48\0Harmony.dll $(GameDir)\OuterWilds_Data\Managed\Assembly-CSharp.dll - - $(GameDir)\OuterWilds_Data\Managed\Assembly-CSharp-firstpass.dll - - - $(GameDir)\OuterWilds_Data\Managed\Assembly-UnityScript.dll - - - $(GameDir)\OuterWilds_Data\Managed\ConsoleUtilsImport.dll - - - $(GameDir)\OuterWilds_Data\Managed\DataPlatformImport.dll - - - $(GameDir)\OuterWilds_Data\Managed\GamepadImport.dll - - - $(GameDir)\OuterWilds_Data\Managed\Mono.Security.dll - - ..\packages\OWML.0.7.3\lib\net35\NAudio-Unity.dll + ..\packages\OWML.2.1.0\lib\net40\NAudio-Unity.dll ..\packages\Json.Net.Unity3D.9.0.1\lib\net35\Newtonsoft.Json.dll - - ..\packages\OWML.0.7.3\lib\net35\OWML.dll - - - ..\packages\OWML.0.7.3\lib\net35\OWML.Common.dll - - - ..\packages\OWML.0.7.3\lib\net35\OWML.Logging.dll + + ..\packages\OWML.2.1.0\lib\net40\OWML.Common.dll - - ..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.dll + + ..\packages\OWML.2.1.0\lib\net40\OWML.Logging.dll - - ..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Assets.dll + + ..\packages\OWML.2.1.0\lib\net40\OWML.ModHelper.dll - - ..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Events.dll + + ..\packages\OWML.2.1.0\lib\net40\OWML.ModHelper.Assets.dll - - ..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Input.dll + + ..\packages\OWML.2.1.0\lib\net40\OWML.ModHelper.Events.dll - - ..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Interaction.dll + + ..\packages\OWML.2.1.0\lib\net40\OWML.ModHelper.Input.dll - - ..\packages\OWML.0.7.3\lib\net35\OWML.ModHelper.Menus.dll + + ..\packages\OWML.2.1.0\lib\net40\OWML.ModHelper.Interaction.dll - - $(GameDir)\OuterWilds_Data\Managed\Rewired_Core.dll + + ..\packages\OWML.2.1.0\lib\net40\OWML.ModHelper.Menus.dll - - $(GameDir)\OuterWilds_Data\Managed\Rewired_Windows.dll - - - $(GameDir)\OuterWilds_Data\Managed\StorageImport.dll + + ..\packages\OWML.2.1.0\lib\net40\OWML.Utils.dll @@ -103,174 +82,15 @@ - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.AccessibilityModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.AIModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.AnimationModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.ARModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.AssetBundleModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.AudioModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.ClothModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.ClusterInputModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.ClusterRendererModule.dll - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.CoreModule.dll - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.CrashReportingModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.DirectorModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.GameCenterModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.GridModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.ImageConversionModule.dll - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.IMGUIModule.dll - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.InputModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.JSONSerializeModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.Networking.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.ParticlesLegacyModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.ParticleSystemModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.PerformanceReportingModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.Physics2DModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.PhysicsModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.ScreenCaptureModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.SharedInternalsModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.SpatialTracking.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.SpriteMaskModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.SpriteShapeModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.StandardEvents.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.StyleSheetsModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.TerrainModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.TerrainPhysicsModule.dll - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.TextRenderingModule.dll - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.TilemapModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.Timeline.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.UI.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.UIElementsModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.UIModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.UNETModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.UnityAnalyticsModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.UnityConnectModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.UnityWebRequestAudioModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.UnityWebRequestModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.UnityWebRequestTextureModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.UnityWebRequestWWWModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.VehiclesModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.VideoModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.VRModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.WebModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEngine.WindModule.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityEtx.dll - - - $(GameDir)\OuterWilds_Data\Managed\UnityFbxPrefab.dll - - - $(GameDir)\OuterWilds_Data\Managed\UsersImport.dll - - - $(GameDir)\OuterWilds_Data\Managed\XboxOneCommonImport.dll - @@ -286,6 +106,10 @@ + + + + @@ -306,4 +130,12 @@ rmdir /s /q "$(ProjectDir)\Release" + + + 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}. + + + + + \ No newline at end of file diff --git a/ClockLib/EventFile.cs b/ClockLib/EventFile.cs index 37690b3..55e436c 100644 --- a/ClockLib/EventFile.cs +++ b/ClockLib/EventFile.cs @@ -1,6 +1,5 @@ using System; using System.Collections.Generic; -using System.Runtime.CompilerServices; namespace Clock { diff --git a/ClockLib/OWClock.cs b/ClockLib/OWClock.cs index 38db787..8d5d01e 100644 --- a/ClockLib/OWClock.cs +++ b/ClockLib/OWClock.cs @@ -10,14 +10,14 @@ namespace Clock public class OWClock : ModBehaviour { private static EventFile _save; - private List _eventListStr = new List(); - private List> _eventList = new List>(); + private readonly List _eventListStr = new List(); + private readonly List> _eventList = new List>(); private Font _hudFont; private float _xPos; private float _yPos; private float _width; - public static IModHelper Helper; + internal static IModHelper Helper; public static bool CountUp { get; private set; } public static bool Milliseconds { get; private set; } public static int EventCount { get; private set; } @@ -74,11 +74,14 @@ private void OnGUI() return; } - var style = new GUIStyle(); - style.font = _hudFont; - style.fontSize = 30; + var style = new GUIStyle + { + font = _hudFont, + fontSize = 30, + wordWrap = true + }; + style.normal.textColor = Color.white; - style.wordWrap = true; var timestamp = CountUp ? "Time Elapsed: " + ParseTime(elapsed) : "Time Remaining: " + ParseTime(TimeLoop.GetSecondsRemaining()); GUI.Label(new Rect(_xPos, _yPos, _width, 60f), timestamp, style); @@ -95,10 +98,12 @@ private void OnGUI() { continue; } + if (EnabledTypes.IndexOf((int)timeEvent.type) == -1) { continue; } + var scaleFactor = (timeEvent.Timestamp - elapsed) / 20; style.normal.textColor = Color.Lerp(Color.red, Color.white, scaleFactor); var timeString = CountUp ? ParseTime(timeEvent.Timestamp) : ParseTime(timeEvent.Timestamp - elapsed); @@ -107,7 +112,6 @@ private void OnGUI() yOff += labelSize; GUI.Label(new Rect(_xPos, _yPos - yOff, _width, labelSize), $"{timeString} - {timeEvent.Name}", style); shown++; - } } @@ -122,7 +126,7 @@ private void AddEvent(string 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 seconds = Math.Truncate(timestamp % 60f).ToString().PadLeft(2, '0'); @@ -149,8 +153,7 @@ public override void Configure(IModConfig config) { EnabledTypes.Add(i); } - } - + } } } } diff --git a/ClockLib/Properties/AssemblyInfo.cs b/ClockLib/Properties/AssemblyInfo.cs index fd906ce..c130097 100644 --- a/ClockLib/Properties/AssemblyInfo.cs +++ b/ClockLib/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ClockLib")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("Adds a clock overlay and eventlist")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("ClockLib")] -[assembly: AssemblyCopyright("Copyright © 2020")] +[assembly: AssemblyProduct("clubby789.OWClock")] +[assembly: AssemblyCopyright("Copyright © clubby789 2020")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyVersion("0.5.0.0")] +[assembly: AssemblyFileVersion("0.5.0.0")] diff --git a/ClockLib/TimeEvent.cs b/ClockLib/TimeEvent.cs index 97379d7..09e8d4a 100644 --- a/ClockLib/TimeEvent.cs +++ b/ClockLib/TimeEvent.cs @@ -13,6 +13,7 @@ public enum Type Chert, Misc } + public float Timestamp; public string Name; public Type type = Type.Misc; diff --git a/ClockLib/manifest.json b/ClockLib/manifest.json index a2c6f5f..4d54664 100644 --- a/ClockLib/manifest.json +++ b/ClockLib/manifest.json @@ -4,6 +4,6 @@ "name": "Clock", "uniqueName": "clubby789.OWClock", "description": "Adds a clock overlay and eventlist", - "version": "0.4.0", - "owmlVersion": "0.7.3" + "version": "0.5.0", + "owmlVersion": "2.1.0" } \ No newline at end of file diff --git a/ClockLib/packages.config b/ClockLib/packages.config index c2d105a..f081b69 100644 --- a/ClockLib/packages.config +++ b/ClockLib/packages.config @@ -1,6 +1,7 @@  - - + + + \ No newline at end of file