From 6ae1cba2d96bc25dff7b168bb0e198f1bfb4d002 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 18 Sep 2019 19:36:05 -0400 Subject: [PATCH 1/8] update mod build package & migrate to new .csproj format --- ...aeologyHouseContentManagementHelper.csproj | 121 ++------------- .../Properties/AssemblyInfo.cs | 36 ----- FeTK/FeTK.csproj | 139 ++---------------- FeTK/Properties/AssemblyInfo.cs | 36 ----- StardewMods.sln | 63 +++----- .../Properties/AssemblyInfo.cs | 36 ----- .../ToolUpgradeDeliveryService.csproj | 107 ++------------ 7 files changed, 60 insertions(+), 478 deletions(-) delete mode 100644 ArchaeologyHouseContentManagementHelper/Properties/AssemblyInfo.cs delete mode 100644 FeTK/Properties/AssemblyInfo.cs delete mode 100644 ToolUpgradeDeliveryService/Properties/AssemblyInfo.cs diff --git a/ArchaeologyHouseContentManagementHelper/ArchaeologyHouseContentManagementHelper.csproj b/ArchaeologyHouseContentManagementHelper/ArchaeologyHouseContentManagementHelper.csproj index b919a22..2e0b4be 100644 --- a/ArchaeologyHouseContentManagementHelper/ArchaeologyHouseContentManagementHelper.csproj +++ b/ArchaeologyHouseContentManagementHelper/ArchaeologyHouseContentManagementHelper.csproj @@ -1,115 +1,20 @@ - - - + + - Debug - AnyCPU - {E508687E-A71D-48F9-8EE0-DDA8F19F38D9} - Library - Properties - StardewMods.ArchaeologyHouseContentManagementHelper ArchaeologyHouseContentManagementHelper - v4.5.2 - 512 - true - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - 7.2 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - 7.2 - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - prompt - MinimumRecommendedRules.ruleset - 7.3 - - - bin\x86\Release\ - TRACE - true - pdbonly + StardewMods.ArchaeologyHouseContentManagementHelper + 1.3.0 + net452 + x86 x86 - prompt - MinimumRecommendedRules.ruleset + + true + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - PreserveNewest - - - - - 1.2.0.1 - - - 2.2.0 - + + - - - - - - - \ No newline at end of file + + diff --git a/ArchaeologyHouseContentManagementHelper/Properties/AssemblyInfo.cs b/ArchaeologyHouseContentManagementHelper/Properties/AssemblyInfo.cs deleted file mode 100644 index 35b175b..0000000 --- a/ArchaeologyHouseContentManagementHelper/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ArchaeologyHouseContentManagementHelper")] -[assembly: AssemblyDescription("StardewValley Mod")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("StardewMods")] -[assembly: AssemblyCopyright("Copyright © 2018")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("e508687e-a71d-48f9-8ee0-dda8f19f38d9")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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.2.1.0")] -[assembly: AssemblyFileVersion("1.2.1.0")] diff --git a/FeTK/FeTK.csproj b/FeTK/FeTK.csproj index 38046e8..7a1df59 100644 --- a/FeTK/FeTK.csproj +++ b/FeTK/FeTK.csproj @@ -1,135 +1,26 @@ - - - + + - Debug - AnyCPU - {49F0430B-5E62-409C-BDF7-D653F3A39431} - Library - Properties - FelixDev.StardewMods.FeTK FeTK - v4.5.2 - 512 - true - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - x86 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 + FelixDev.StardewMods.FeTK + 1.0.0 + net452 + x86 x86 + + + + + + - - - - - - - - $(GamePath)\BmFont.dll False - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 12.0.2 - - - 2.2.0 - - - - - - - - - - - - - - - - - - - + - - \ No newline at end of file + + diff --git a/FeTK/Properties/AssemblyInfo.cs b/FeTK/Properties/AssemblyInfo.cs deleted file mode 100644 index 60a75e4..0000000 --- a/FeTK/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("FeTK")] -[assembly: AssemblyDescription("Toolkit for Stardew Valley")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("StardewMods")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("49f0430b-5e62-409c-bdf7-d653f3a39431")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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.126.0")] -[assembly: AssemblyFileVersion("1.0.126.0")] diff --git a/StardewMods.sln b/StardewMods.sln index 93438a8..16d98ed 100644 --- a/StardewMods.sln +++ b/StardewMods.sln @@ -3,12 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.28803.352 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchaeologyHouseContentManagementHelper", "ArchaeologyHouseContentManagementHelper\ArchaeologyHouseContentManagementHelper.csproj", "{E508687E-A71D-48F9-8EE0-DDA8F19F38D9}" -EndProject -Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Common", "Common\Common.shproj", "{F4697672-AF08-4413-A1AA-4CF106F093AC}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ToolUpgradeDeliveryService", "ToolUpgradeDeliveryService\ToolUpgradeDeliveryService.csproj", "{B60C7009-A672-490B-AD9B-DE3C2BEC0171}" -EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{7CEE1D43-CB5B-4E7C-93EE-FEC01AC45274}" ProjectSection(SolutionItems) = preProject .gitattributes = .gitattributes @@ -17,66 +11,47 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "root", "root", "{7CEE1D43-C README.md = README.md EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FeTK", "FeTK\FeTK.csproj", "{49F0430B-5E62-409C-BDF7-D653F3A39431}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArchaeologyHouseContentManagementHelper", "ArchaeologyHouseContentManagementHelper\ArchaeologyHouseContentManagementHelper.csproj", "{F9BC507A-7FA9-4431-8C6E-DE558686BBD9}" +EndProject +Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "Common", "Common\Common.shproj", "{F4697672-AF08-4413-A1AA-4CF106F093AC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FeTK", "FeTK\FeTK.csproj", "{5E306F12-EC72-432D-B3DD-BBADA1979183}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestMod", "TestMod\TestMod.csproj", "{14DC6EF0-55F0-4285-85DD-6E87D5CDDE48}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TestMod2", "TestMod2\TestMod2.csproj", "{136B3D90-54EF-4B0D-9837-982CB5CD3278}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ToolUpgradeDeliveryService", "ToolUpgradeDeliveryService\ToolUpgradeDeliveryService.csproj", "{15647C7F-C038-4208-8459-41684DF1F9A9}" +EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution - Common\Common.projitems*{49f0430b-5e62-409c-bdf7-d653f3a39431}*SharedItemsImports = 4 - Common\Common.projitems*{b60c7009-a672-490b-ad9b-de3c2bec0171}*SharedItemsImports = 4 - Common\Common.projitems*{e508687e-a71d-48f9-8ee0-dda8f19f38d9}*SharedItemsImports = 4 Common\Common.projitems*{f4697672-af08-4413-a1aa-4cf106f093ac}*SharedItemsImports = 13 EndGlobalSection GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU Debug|x86 = Debug|x86 - Release|Any CPU = Release|Any CPU Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E508687E-A71D-48F9-8EE0-DDA8F19F38D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {E508687E-A71D-48F9-8EE0-DDA8F19F38D9}.Debug|Any CPU.Build.0 = Debug|Any CPU - {E508687E-A71D-48F9-8EE0-DDA8F19F38D9}.Debug|x86.ActiveCfg = Debug|x86 - {E508687E-A71D-48F9-8EE0-DDA8F19F38D9}.Debug|x86.Build.0 = Debug|x86 - {E508687E-A71D-48F9-8EE0-DDA8F19F38D9}.Release|Any CPU.ActiveCfg = Release|Any CPU - {E508687E-A71D-48F9-8EE0-DDA8F19F38D9}.Release|Any CPU.Build.0 = Release|Any CPU - {E508687E-A71D-48F9-8EE0-DDA8F19F38D9}.Release|x86.ActiveCfg = Release|x86 - {E508687E-A71D-48F9-8EE0-DDA8F19F38D9}.Release|x86.Build.0 = Release|x86 - {B60C7009-A672-490B-AD9B-DE3C2BEC0171}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B60C7009-A672-490B-AD9B-DE3C2BEC0171}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B60C7009-A672-490B-AD9B-DE3C2BEC0171}.Debug|x86.ActiveCfg = Debug|x86 - {B60C7009-A672-490B-AD9B-DE3C2BEC0171}.Debug|x86.Build.0 = Debug|x86 - {B60C7009-A672-490B-AD9B-DE3C2BEC0171}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B60C7009-A672-490B-AD9B-DE3C2BEC0171}.Release|Any CPU.Build.0 = Release|Any CPU - {B60C7009-A672-490B-AD9B-DE3C2BEC0171}.Release|x86.ActiveCfg = Release|x86 - {B60C7009-A672-490B-AD9B-DE3C2BEC0171}.Release|x86.Build.0 = Release|x86 - {49F0430B-5E62-409C-BDF7-D653F3A39431}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {49F0430B-5E62-409C-BDF7-D653F3A39431}.Debug|Any CPU.Build.0 = Debug|Any CPU - {49F0430B-5E62-409C-BDF7-D653F3A39431}.Debug|x86.ActiveCfg = Debug|Any CPU - {49F0430B-5E62-409C-BDF7-D653F3A39431}.Debug|x86.Build.0 = Debug|Any CPU - {49F0430B-5E62-409C-BDF7-D653F3A39431}.Release|Any CPU.ActiveCfg = Release|Any CPU - {49F0430B-5E62-409C-BDF7-D653F3A39431}.Release|Any CPU.Build.0 = Release|Any CPU - {49F0430B-5E62-409C-BDF7-D653F3A39431}.Release|x86.ActiveCfg = Release|Any CPU - {49F0430B-5E62-409C-BDF7-D653F3A39431}.Release|x86.Build.0 = Release|Any CPU - {14DC6EF0-55F0-4285-85DD-6E87D5CDDE48}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {14DC6EF0-55F0-4285-85DD-6E87D5CDDE48}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F9BC507A-7FA9-4431-8C6E-DE558686BBD9}.Debug|x86.ActiveCfg = Debug|x86 + {F9BC507A-7FA9-4431-8C6E-DE558686BBD9}.Debug|x86.Build.0 = Debug|x86 + {F9BC507A-7FA9-4431-8C6E-DE558686BBD9}.Release|x86.ActiveCfg = Release|x86 + {F9BC507A-7FA9-4431-8C6E-DE558686BBD9}.Release|x86.Build.0 = Release|x86 + {5E306F12-EC72-432D-B3DD-BBADA1979183}.Debug|x86.ActiveCfg = Debug|x86 + {5E306F12-EC72-432D-B3DD-BBADA1979183}.Debug|x86.Build.0 = Debug|x86 + {5E306F12-EC72-432D-B3DD-BBADA1979183}.Release|x86.ActiveCfg = Release|x86 + {5E306F12-EC72-432D-B3DD-BBADA1979183}.Release|x86.Build.0 = Release|x86 {14DC6EF0-55F0-4285-85DD-6E87D5CDDE48}.Debug|x86.ActiveCfg = Debug|Any CPU {14DC6EF0-55F0-4285-85DD-6E87D5CDDE48}.Debug|x86.Build.0 = Debug|Any CPU - {14DC6EF0-55F0-4285-85DD-6E87D5CDDE48}.Release|Any CPU.ActiveCfg = Release|Any CPU - {14DC6EF0-55F0-4285-85DD-6E87D5CDDE48}.Release|Any CPU.Build.0 = Release|Any CPU {14DC6EF0-55F0-4285-85DD-6E87D5CDDE48}.Release|x86.ActiveCfg = Release|Any CPU {14DC6EF0-55F0-4285-85DD-6E87D5CDDE48}.Release|x86.Build.0 = Release|Any CPU - {136B3D90-54EF-4B0D-9837-982CB5CD3278}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {136B3D90-54EF-4B0D-9837-982CB5CD3278}.Debug|Any CPU.Build.0 = Debug|Any CPU {136B3D90-54EF-4B0D-9837-982CB5CD3278}.Debug|x86.ActiveCfg = Debug|Any CPU {136B3D90-54EF-4B0D-9837-982CB5CD3278}.Debug|x86.Build.0 = Debug|Any CPU - {136B3D90-54EF-4B0D-9837-982CB5CD3278}.Release|Any CPU.ActiveCfg = Release|Any CPU - {136B3D90-54EF-4B0D-9837-982CB5CD3278}.Release|Any CPU.Build.0 = Release|Any CPU {136B3D90-54EF-4B0D-9837-982CB5CD3278}.Release|x86.ActiveCfg = Release|Any CPU {136B3D90-54EF-4B0D-9837-982CB5CD3278}.Release|x86.Build.0 = Release|Any CPU + {15647C7F-C038-4208-8459-41684DF1F9A9}.Debug|x86.ActiveCfg = Debug|x86 + {15647C7F-C038-4208-8459-41684DF1F9A9}.Debug|x86.Build.0 = Debug|x86 + {15647C7F-C038-4208-8459-41684DF1F9A9}.Release|x86.ActiveCfg = Release|x86 + {15647C7F-C038-4208-8459-41684DF1F9A9}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ToolUpgradeDeliveryService/Properties/AssemblyInfo.cs b/ToolUpgradeDeliveryService/Properties/AssemblyInfo.cs deleted file mode 100644 index 7c92aad..0000000 --- a/ToolUpgradeDeliveryService/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("ToolUpgradeDeliveryService")] -[assembly: AssemblyDescription("StardewValley Mod")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("StardewMods")] -[assembly: AssemblyCopyright("Copyright © 2019")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("b60c7009-a672-490b-ad9b-de3c2bec0171")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// 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.4.0.0")] -[assembly: AssemblyFileVersion("1.4.0.0")] diff --git a/ToolUpgradeDeliveryService/ToolUpgradeDeliveryService.csproj b/ToolUpgradeDeliveryService/ToolUpgradeDeliveryService.csproj index 19b03a1..3709cf2 100644 --- a/ToolUpgradeDeliveryService/ToolUpgradeDeliveryService.csproj +++ b/ToolUpgradeDeliveryService/ToolUpgradeDeliveryService.csproj @@ -1,103 +1,22 @@ - - - + + - Debug - AnyCPU - {B60C7009-A672-490B-AD9B-DE3C2BEC0171} - Library - Properties - FelixDev.StardewMods.ToolUpgradeDeliveryService ToolUpgradeDeliveryService - v4.5.2 - 512 - true - - - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - 7.3 - x86 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - x86 - - - true - bin\x86\Debug\ - DEBUG;TRACE - full - x86 - 7.3 - prompt - MinimumRecommendedRules.ruleset - - - bin\x86\Release\ - TRACE - true - pdbonly + FelixDev.StardewMods.ToolUpgradeDeliveryService + 1.4.0 + net452 + x86 x86 - prompt - MinimumRecommendedRules.ruleset + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2.2.0 - + + - - {49f0430b-5e62-409c-bdf7-d653f3a39431} - FeTK - False - + + - - \ No newline at end of file + + From d56ebbce3ae7f0c079eb0f49554d55074f391558 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 18 Sep 2019 19:47:33 -0400 Subject: [PATCH 2/8] update collection logic for new tab in Stardew Valley 1.4 --- .../CollectionsPage/CollectionsPageEx.cs | 104 +++++++----------- 1 file changed, 42 insertions(+), 62 deletions(-) diff --git a/ArchaeologyHouseContentManagementHelper/Framework/Menus/CollectionsPage/CollectionsPageEx.cs b/ArchaeologyHouseContentManagementHelper/Framework/Menus/CollectionsPage/CollectionsPageEx.cs index de5e849..e4c0443 100644 --- a/ArchaeologyHouseContentManagementHelper/Framework/Menus/CollectionsPage/CollectionsPageEx.cs +++ b/ArchaeologyHouseContentManagementHelper/Framework/Menus/CollectionsPage/CollectionsPageEx.cs @@ -7,8 +7,6 @@ using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using Translation = StardewMods.ArchaeologyHouseContentManagementHelper.Common.Translation; @@ -19,22 +17,14 @@ namespace StardewMods.ArchaeologyHouseContentManagementHelper.Framework /// internal class CollectionsPageEx : CollectionsPage { - public const int region_sideTabLostBooks = 7008; + public const int region_sideTabLostBooks = 7100; private const int LostBooksTab_ItemBaseId = 0x70080000; - public const int lostBooksTab = 7; - - private readonly int lostBooksTabPageIndex; + private readonly int lostBooksTab; private const int sideTabs_FirstIndex = region_sideTabShipped; - // The number of side tabs of the Collection Page. - private readonly int numTabs = 8; - - // Indicates whether the [Secret Notes] sidetab is shown or not. - private readonly bool showSecretNotesTab; - // The length of the preview of a book's content. private const int BOOK_PREVIEW_LENGTH = 22; @@ -47,15 +37,16 @@ internal class CollectionsPageEx : CollectionsPage private readonly IReflectedField descriptionTextRef; private readonly IReflectedField valueRef; - public CollectionsPageEx(int x, int y, int width, int height, - int selectedTab = organicsTab) : base(x, y, width, height) + public CollectionsPageEx(int x, int y, int width, int height, int selectedTab = organicsTab) + : base(x, y, width, height) { hoverTextRef = ModEntry.CommonServices.ReflectionHelper.GetField(this, "hoverText"); descriptionTextRef = ModEntry.CommonServices.ReflectionHelper.GetField(this, "descriptionText"); valueRef = ModEntry.CommonServices.ReflectionHelper.GetField(this, "value"); - showSecretNotesTab = Game1.player.secretNotesSeen.Count > 0; - lostBooksTabPageIndex = showSecretNotesTab ? lostBooksTab : lostBooksTab - 1; + var prevSideTab = this.sideTabs.OrderByDescending(p => p.Key).First(); + + lostBooksTab = prevSideTab.Key + 1; // Loads the [Lost Books] side-tab texture. Texture2D bookTabTexture = ModEntry.CommonServices.ContentHelper.Load("Assets/CollectionTab_LostBook.png", ContentSource.ModFolder); @@ -63,7 +54,7 @@ public CollectionsPageEx(int x, int y, int width, int height, // Adds the [Lost Books] side-tab to the Collections Page. ClickableTextureComponent stLostBooks = new ClickableTextureComponent( name: "", - bounds: new Rectangle(this.xPositionOnScreen - 48, this.yPositionOnScreen + (showSecretNotesTab ? 576 : 512), 64, 64), + bounds: new Rectangle(this.xPositionOnScreen - 48, prevSideTab.Value.bounds.Y + 64, 64, 64), label: "", hoverText: ModEntry.CommonServices.TranslationHelper.Get(Translation.GAMEMENU_COLLECTIONSPAGE_TAB_LABEL_LOST_BOOKS), texture: bookTabTexture, @@ -72,19 +63,18 @@ public CollectionsPageEx(int x, int y, int width, int height, drawShadow: false) { myID = region_sideTabLostBooks, - upNeighborID = showSecretNotesTab ? region_sideTabSecretNotes : region_sideTabAchivements, + upNeighborID = prevSideTab.Value.myID, rightNeighborID = 0 }; - this.sideTabs.Add(stLostBooks); - this.collections.Add(lostBooksTabPageIndex, new List>()); - - var prevSideTab = this.sideTabs[showSecretNotesTab ? secretNotesTab : achievementsTab]; - prevSideTab.downNeighborID = region_sideTabLostBooks; + this.sideTabs.Add(lostBooksTab, stLostBooks); + this.collections.Add(lostBooksTab, new List>()); + + prevSideTab.Value.downNeighborID = stLostBooks.myID; // Fill [Lost Book] collection - this.collections[lostBooksTabPageIndex].Add(new List()); + this.collections[lostBooksTab].Add(new List()); var lostBooksIndices = LibraryMuseumHelper.GetLostBookIndexList(); @@ -97,13 +87,7 @@ public CollectionsPageEx(int x, int y, int width, int height, for (int i = 0; i < LibraryMuseumHelper.TotalLibraryBooks; i++) { - bool drawShadow = false; - - // If the current Lost Book has already been discovered by the player, "enable" it in the collection - if (lostBooksIndices[i] <= LibraryMuseumHelper.LibraryBooks) - { - drawShadow = true; - } + bool drawShadow = lostBooksIndices[i] <= LibraryMuseumHelper.LibraryBooks; // If the current Lost Book has already been discovered by the player, "enable" it in the collection // Start a new page if the current page has already been filled completely int x1 = startPosX + booksInCurrentPage % numBooksPerRow * BOOK_OFFSET; @@ -111,7 +95,7 @@ public CollectionsPageEx(int x, int y, int width, int height, if (y1 > this.yPositionOnScreen + height - 128) { // Add a new page to the collection. - this.collections[lostBooksTabPageIndex].Add(new List()); + this.collections[lostBooksTab].Add(new List()); booksInCurrentPage = 0; x1 = startPosX; y1 = startPosY; @@ -130,41 +114,39 @@ public CollectionsPageEx(int x, int y, int width, int height, { myID = LostBooksTab_ItemBaseId + i, - rightNeighborID = (this.collections[lostBooksTabPageIndex].Last().Count + 1) % numBooksPerRow == 0 + rightNeighborID = (this.collections[lostBooksTab].Last().Count + 1) % numBooksPerRow == 0 ? -1 : LostBooksTab_ItemBaseId + i + 1, - leftNeighborID = this.collections[lostBooksTabPageIndex].Last().Count % numBooksPerRow == 0 + leftNeighborID = this.collections[lostBooksTab].Last().Count % numBooksPerRow == 0 ? region_sideTabLostBooks : LostBooksTab_ItemBaseId + i - 1, downNeighborID = y1 + BOOK_OFFSET > this.yPositionOnScreen + height - 128 ? -7777 : LostBooksTab_ItemBaseId + i + numBooksPerRow, - upNeighborID = this.collections[lostBooksTabPageIndex].Last().Count < numBooksPerRow + upNeighborID = this.collections[lostBooksTab].Last().Count < numBooksPerRow ? 12345 : LostBooksTab_ItemBaseId + i - numBooksPerRow, fullyImmutable = true }; - this.collections[lostBooksTabPageIndex].Last().Add(lostBookTextureObject); + this.collections[lostBooksTab].Last().Add(lostBookTextureObject); ++booksInCurrentPage; } - SetCurrentSidetab(); - - void SetCurrentSidetab() + // Set the current side tab { // Set the current side tab - if (selectedTab < 0 || selectedTab >= numTabs) + if (!this.sideTabs.ContainsKey(selectedTab)) { - selectedTab = 0; + selectedTab = CollectionsPage.organicsTab; } // [Lost Books] tab has a different Collection Page index depending on the visibility // of the [Secret Notes] tab. if (selectedTab == lostBooksTab) { - selectedTab = lostBooksTabPageIndex; + selectedTab = lostBooksTab; this.currentlySnappedComponent = snappedItem; this.snapCursorToCurrentSnappedComponent(); } @@ -194,7 +176,7 @@ public override void applyMovementKey(int direction) private void MoveCursorInDirectionNew(CursorDirection direction) { - if (this.currentlySnappedComponent == null && this.allClickableComponents != null && this.allClickableComponents.Count() > 0) + if (this.currentlySnappedComponent == null && this.allClickableComponents != null && this.allClickableComponents.Any()) { this.snapToDefaultClickableComponent(); if (this.currentlySnappedComponent == null) @@ -234,7 +216,7 @@ private void MoveCursorInDirectionNew(CursorDirection direction) // [Lost Book]. else if (this.currentlySnappedComponent.myID >= region_sideTabShipped && this.currentlySnappedComponent.myID <= region_sideTabLostBooks - && ModEntry.CommonServices.ReflectionHelper.GetField(this, "currentTab").GetValue() == lostBooksTabPageIndex) + && ModEntry.CommonServices.ReflectionHelper.GetField(this, "currentTab").GetValue() == lostBooksTab) { this.currentlySnappedComponent = this.getComponentWithID(LostBooksTab_ItemBaseId); } @@ -245,7 +227,7 @@ private void MoveCursorInDirectionNew(CursorDirection direction) // Since the item offset is the same for every sidetab other than [Lost Books], we simply set the currently snapped item // to the first item with ID = 0 which is the first item for every original sidetab. else if (this.currentlySnappedComponent.myID == region_sideTabLostBooks - && ModEntry.CommonServices.ReflectionHelper.GetField(this, "currentTab").GetValue() != lostBooksTabPageIndex) + && ModEntry.CommonServices.ReflectionHelper.GetField(this, "currentTab").GetValue() != lostBooksTab) { this.currentlySnappedComponent = this.getComponentWithID(0); } @@ -343,7 +325,7 @@ public override void snapToDefaultClickableComponent() int currentTab = ModEntry.CommonServices.ReflectionHelper.GetField(this, "currentTab").GetValue(); - if (currentTab == lostBooksTabPageIndex) + if (currentTab == lostBooksTab) { this.currentlySnappedComponent = this.getComponentWithID(LostBooksTab_ItemBaseId); } @@ -368,7 +350,7 @@ public override void performHoverAction(int x, int y) valueRef.SetValue(-1); secretNoteImageRef.SetValue(-1); - foreach (ClickableTextureComponent sideTab in this.sideTabs) + foreach (ClickableTextureComponent sideTab in this.sideTabs.Values) { if (sideTab.containsPoint(x, y)) { @@ -393,7 +375,7 @@ public override void performHoverAction(int x, int y) } // Book has already been found -> show book preview - if (currentTab == lostBooksTabPageIndex) + if (currentTab == lostBooksTab) { string index = textureComponent.name.Split(' ')[2]; string message = Game1.content.LoadString("Strings\\Notes:" + index).Replace('\n', '^'); @@ -431,9 +413,12 @@ public override void receiveLeftClick(int x, int y, bool playSound = true) int currentTab = currentTabRef.GetValue(); int currentPage = currentPageRef.GetValue(); - for (int index = 0; index < this.sideTabs.Count; ++index) + foreach (var pair in this.sideTabs) { - if (this.sideTabs[index].containsPoint(x, y) && currentTab != index) + var index = pair.Key; + var tab = pair.Value; + + if (tab.containsPoint(x, y) && currentTab != index) { Game1.playSound("smallSelect"); this.sideTabs[currentTab].bounds.X -= CollectionsPage.widthToMoveActiveTab; @@ -443,28 +428,23 @@ public override void receiveLeftClick(int x, int y, bool playSound = true) currentTab = index; currentPage = 0; - this.sideTabs[index].bounds.X += CollectionsPage.widthToMoveActiveTab; + tab.bounds.X += CollectionsPage.widthToMoveActiveTab; // On tab switch, we set the currently snapped element to the tab element - currentlySnappedComponent = this.sideTabs[index]; + currentlySnappedComponent = tab; - if (index == lostBooksTabPageIndex) - { - currentlySnappedComponent.rightNeighborID = LostBooksTab_ItemBaseId; - } - else - { - currentlySnappedComponent.rightNeighborID = 0; - } + currentlySnappedComponent.rightNeighborID = currentTab == lostBooksTab + ? LostBooksTab_ItemBaseId + : 0; return; } } // Open a book when it has been clicked by the player. - if (currentTab == lostBooksTabPageIndex) + if (currentTab == lostBooksTab) { - foreach (ClickableTextureComponent textureComponent in collections[lostBooksTabPageIndex][currentPage]) + foreach (ClickableTextureComponent textureComponent in collections[lostBooksTab][currentPage]) { if (textureComponent.containsPoint(x, y)) { From 9041b6a49918d9d655c21e923d969049e0c14794 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 18 Sep 2019 19:49:04 -0400 Subject: [PATCH 3/8] update for SMAPI 3.0 loading mods much earlier --- .../ModEntry.cs | 24 +++++++++++-------- FeTK/ToolkitMod.cs | 14 +++++++---- ToolUpgradeDeliveryService/ModEntry.cs | 17 +++++++------ 3 files changed, 33 insertions(+), 22 deletions(-) diff --git a/ArchaeologyHouseContentManagementHelper/ModEntry.cs b/ArchaeologyHouseContentManagementHelper/ModEntry.cs index babbf41..4412bfb 100644 --- a/ArchaeologyHouseContentManagementHelper/ModEntry.cs +++ b/ArchaeologyHouseContentManagementHelper/ModEntry.cs @@ -1,9 +1,4 @@ using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - using StardewMods.ArchaeologyHouseContentManagementHelper.Framework; using StardewModdingAPI; using StardewModdingAPI.Events; @@ -11,7 +6,6 @@ using StardewMods.Common; using StardewMods.ArchaeologyHouseContentManagementHelper.Framework.Services; using StardewMods.ArchaeologyHouseContentManagementHelper.Patches; - using Constants = StardewMods.ArchaeologyHouseContentManagementHelper.Common.Constants; namespace StardewMods.ArchaeologyHouseContentManagementHelper @@ -38,10 +32,22 @@ public override void Entry(IModHelper helper) throw new ArgumentNullException(nameof(helper), "Error: [modHelper] cannot be [null]!"); } - // Set services and mod configurations - CommonServices = new CommonServices(Monitor, helper.Events, helper.Translation, helper.Reflection, helper.Content, helper.Data); ModConfig = Helper.ReadConfig(); + helper.Events.GameLoop.GameLaunched += OnGameLaunched; + helper.Events.GameLoop.SaveLoaded += Bootstrap; + } + + /// Raised after the game is launched, right before the first update tick. This happens once per game session (unrelated to loading saves). All mods are loaded and initialized at this point, so this is a good time to set up mod integrations. + /// The event sender. + /// The event arguments. + private void OnGameLaunched(object sender, GameLaunchedEventArgs e) + { + IModHelper helper = this.Helper; + + // Set services + CommonServices = new CommonServices(Monitor, helper.Events, helper.Translation, helper.Reflection, helper.Content, helper.Data); + // Apply game patches var harmony = HarmonyInstance.Create(Constants.MOD_ID); var addItemToInventoryBoolPatch = new AddItemToInventoryBoolPatch(); @@ -52,8 +58,6 @@ public override void Entry(IModHelper helper) collectionPageExMenuService = new CollectionPageExMenuService(); collectionPageExMenuService.Start(); - - helper.Events.GameLoop.SaveLoaded += Bootstrap; } private void Bootstrap(object sender, SaveLoadedEventArgs e) diff --git a/FeTK/ToolkitMod.cs b/FeTK/ToolkitMod.cs index d8d0906..6769ea7 100644 --- a/FeTK/ToolkitMod.cs +++ b/FeTK/ToolkitMod.cs @@ -1,10 +1,6 @@ using FelixDev.StardewMods.FeTK.Framework.Services; using StardewModdingAPI; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using StardewModdingAPI.Events; namespace FelixDev.StardewMods.FeTK { @@ -26,6 +22,14 @@ public override void Entry(IModHelper helper) ModHelper = helper; _Monitor = this.Monitor; + helper.Events.GameLoop.GameLaunched += this.OnGameLaunched; + } + + /// Raised after the game is launched, right before the first update tick. This happens once per game session (unrelated to loading saves). All mods are loaded and initialized at this point, so this is a good time to set up mod integrations. + /// The event sender. + /// The event arguments. + private void OnGameLaunched(object sender, GameLaunchedEventArgs e) + { ServiceFactory.Setup(new MailManager()); } } diff --git a/ToolUpgradeDeliveryService/ModEntry.cs b/ToolUpgradeDeliveryService/ModEntry.cs index 97b2864..93ec97f 100644 --- a/ToolUpgradeDeliveryService/ModEntry.cs +++ b/ToolUpgradeDeliveryService/ModEntry.cs @@ -1,10 +1,6 @@ using FelixDev.StardewMods.ToolUpgradeDeliveryService.Framework; using StardewModdingAPI; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +using StardewModdingAPI.Events; namespace FelixDev.StardewMods.ToolUpgradeDeliveryService { @@ -37,12 +33,19 @@ public override void Entry(IModHelper helper) _Monitor = this.Monitor; _ModManifest = this.ModManifest; - // Setup services & mod configuration ModConfig = helper.ReadConfig(); - mailDeliveryService = new MailDeliveryService(); + helper.Events.GameLoop.GameLaunched += this.OnGameLaunched; + } + /// Raised after the game is launched, right before the first update tick. This happens once per game session (unrelated to loading saves). All mods are loaded and initialized at this point, so this is a good time to set up mod integrations. + /// The event sender. + /// The event arguments. + private void OnGameLaunched(object sender, GameLaunchedEventArgs e) + { // Start services + mailDeliveryService = new MailDeliveryService(); + mailDeliveryService.Start(); } } From d0e7d33db79ce52f88091b234f4483ca238e9b35 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 18 Sep 2019 20:10:14 -0400 Subject: [PATCH 4/8] update for Stardew Valley 1.4 --- .../Menus/MuseumMenu/MuseumMenuEx.cs | 9 ++----- .../Menus/MuseumMenu/MuseumMenuNoInventory.cs | 8 +----- .../Patches/AddItemToInventoryBoolPatch.cs | 25 +++++++------------ FeTK/Framework/Helpers/ColorHelper.cs | 3 --- 4 files changed, 12 insertions(+), 33 deletions(-) diff --git a/ArchaeologyHouseContentManagementHelper/Framework/Menus/MuseumMenu/MuseumMenuEx.cs b/ArchaeologyHouseContentManagementHelper/Framework/Menus/MuseumMenu/MuseumMenuEx.cs index b5892c6..ac0ff5a 100644 --- a/ArchaeologyHouseContentManagementHelper/Framework/Menus/MuseumMenu/MuseumMenuEx.cs +++ b/ArchaeologyHouseContentManagementHelper/Framework/Menus/MuseumMenu/MuseumMenuEx.cs @@ -1,16 +1,10 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; -using Netcode; using StardewModdingAPI; using StardewValley; using StardewValley.BellsAndWhistles; using StardewValley.Locations; using StardewValley.Menus; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Timers; namespace StardewMods.ArchaeologyHouseContentManagementHelper.Framework.Menus @@ -40,9 +34,10 @@ internal class MuseumMenuEx : MuseumMenu private static Timer infoFadeTimer; - private readonly System.Object lockInfoFadeTimer = new System.Object(); + private readonly object lockInfoFadeTimer = new object(); public MuseumMenuEx() + : base(((LibraryMuseum)Game1.getLocationFromName("Museum")).isItemSuitableForDonation) { holdingMuseumPieceRef = ModEntry.CommonServices.ReflectionHelper.GetField(this, "holdingMuseumPiece"); multiplayer = ModEntry.CommonServices.ReflectionHelper.GetField(typeof(Game1), "multiplayer").GetValue(); diff --git a/ArchaeologyHouseContentManagementHelper/Framework/Menus/MuseumMenu/MuseumMenuNoInventory.cs b/ArchaeologyHouseContentManagementHelper/Framework/Menus/MuseumMenu/MuseumMenuNoInventory.cs index 73d230c..66e150e 100644 --- a/ArchaeologyHouseContentManagementHelper/Framework/Menus/MuseumMenu/MuseumMenuNoInventory.cs +++ b/ArchaeologyHouseContentManagementHelper/Framework/Menus/MuseumMenu/MuseumMenuNoInventory.cs @@ -1,15 +1,9 @@ using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; -using StardewModdingAPI; using StardewValley; using StardewValley.Locations; using StardewValley.Menus; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Timers; using xTile.Dimensions; @@ -37,7 +31,7 @@ internal class MuseumMenuNoInventory : IClickableMenu private static Timer infoFadeTimer; - private readonly System.Object lockInfoFadeTimer = new System.Object(); + private readonly object lockInfoFadeTimer = new object(); public int fadeTimer; public int state; diff --git a/ArchaeologyHouseContentManagementHelper/Patches/AddItemToInventoryBoolPatch.cs b/ArchaeologyHouseContentManagementHelper/Patches/AddItemToInventoryBoolPatch.cs index 8358ebd..2b9defe 100644 --- a/ArchaeologyHouseContentManagementHelper/Patches/AddItemToInventoryBoolPatch.cs +++ b/ArchaeologyHouseContentManagementHelper/Patches/AddItemToInventoryBoolPatch.cs @@ -5,12 +5,6 @@ using StardewValley.Menus; using StardewValley.Objects; using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using System.Text; -using System.Threading.Tasks; - using SObject = StardewValley.Object; namespace StardewMods.ArchaeologyHouseContentManagementHelper.Patches @@ -23,12 +17,11 @@ public class AddItemToInventoryBoolPatch /// The Harmony instance. public void Apply(HarmonyInstance harmony) { - MethodBase method = AccessTools.Method(typeof(Farmer), "addItemToInventoryBool"); - - MethodInfo prefix = AccessTools.Method(this.GetType(), nameof(AddItemToInventoryBoolPatch.Prefix)); - MethodInfo postfix = AccessTools.Method(this.GetType(), nameof(AddItemToInventoryBoolPatch.Postfix)); - - harmony.Patch(method, new HarmonyMethod(prefix), new HarmonyMethod(postfix)); + harmony.Patch( + original: AccessTools.Method(typeof(Farmer), nameof(Farmer.addItemToInventoryBool)), + prefix: new HarmonyMethod(this.GetType(), nameof(AddItemToInventoryBoolPatch.Prefix)), + postfix: new HarmonyMethod(this.GetType(), nameof(AddItemToInventoryBoolPatch.Postfix)) + ); } public static bool Prefix(Farmer __instance) @@ -62,7 +55,7 @@ public static bool Postfix(bool __result, Item item, bool makeActiveObject = fal if (item != null) { - if (farmer.IsLocalPlayer && !item.hasBeenInInventory) + if (farmer.IsLocalPlayer && !item.HasBeenInInventory) { if (item is SpecialItem) { @@ -118,7 +111,7 @@ public static bool Postfix(bool __result, Item item, bool makeActiveObject = fal } } - if (item is SObject && !item.hasBeenInInventory) + if (item is SObject && !item.HasBeenInInventory) { if (!(item is Furniture) && !(item as SObject).bigCraftable.Value && !(item as SObject).HasBeenPickedUpByFarmer) { @@ -218,12 +211,12 @@ public static bool Postfix(bool __result, Item item, bool makeActiveObject = fal farmer.Items[indexOfInventoryItem] = obj2; } } - if (item is SObject && !item.hasBeenInInventory) + if (item is SObject && !item.HasBeenInInventory) { farmer.checkForQuestComplete((NPC)null, item.ParentSheetIndex, item.Stack, item, "", 10, -1); } - item.hasBeenInInventory = true; + item.HasBeenInInventory = true; return flag; } } diff --git a/FeTK/Framework/Helpers/ColorHelper.cs b/FeTK/Framework/Helpers/ColorHelper.cs index e886957..a899e9e 100644 --- a/FeTK/Framework/Helpers/ColorHelper.cs +++ b/FeTK/Framework/Helpers/ColorHelper.cs @@ -1,10 +1,7 @@ using Microsoft.Xna.Framework; using System; using System.Collections.Generic; -using System.Drawing; using System.Linq; -using System.Text; -using System.Threading.Tasks; namespace FelixDev.StardewMods.FeTK.Framework.Helpers { From 164212be7c0b230af4aee8f290f2b0453946c30e Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 18 Sep 2019 20:11:18 -0400 Subject: [PATCH 5/8] bump min SMAPI versions --- ArchaeologyHouseContentManagementHelper/manifest.json | 2 +- FeTK/manifest.json | 2 +- ToolUpgradeDeliveryService/manifest.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ArchaeologyHouseContentManagementHelper/manifest.json b/ArchaeologyHouseContentManagementHelper/manifest.json index ec5be13..25d4a83 100644 --- a/ArchaeologyHouseContentManagementHelper/manifest.json +++ b/ArchaeologyHouseContentManagementHelper/manifest.json @@ -5,6 +5,6 @@ "Description": "Improves management of the Library/Museum.", "UniqueID": "Felix-Dev.ArchaeologyHouseContentManagementHelper", "EntryDll": "ArchaeologyHouseContentManagementHelper.dll", - "MinimumApiVersion": "2.10.1", + "MinimumApiVersion": "3.0.0-beta", "UpdateKeys": [ "Nexus:2804" ] } \ No newline at end of file diff --git a/FeTK/manifest.json b/FeTK/manifest.json index 11345a8..ab41288 100644 --- a/FeTK/manifest.json +++ b/FeTK/manifest.json @@ -5,6 +5,6 @@ "Description": "FeTK is a collection of helper functions and mod services. It simplifies common developer tasks building Stardew-Valley mods and empowers developers to build rich mod experiences.", "UniqueID": "Felix-Dev.FeTK", "EntryDll": "FeTK.dll", - "MinimumApiVersion": "2.11.0", + "MinimumApiVersion": "3.0.0-beta", "UpdateKeys": [ "nexus:4403" ] } \ No newline at end of file diff --git a/ToolUpgradeDeliveryService/manifest.json b/ToolUpgradeDeliveryService/manifest.json index 0bfee67..11355b1 100644 --- a/ToolUpgradeDeliveryService/manifest.json +++ b/ToolUpgradeDeliveryService/manifest.json @@ -5,7 +5,7 @@ "Description": "Clint sends you a mail when he finished upgrading your tool. Tool included.", "UniqueID": "Felix-Dev.ToolUpgradeDeliveryService", "EntryDll": "ToolUpgradeDeliveryService.dll", - "MinimumApiVersion": "2.10.1", + "MinimumApiVersion": "3.0.0-beta", "UpdateKeys": [ "Nexus:2938" ], "Dependencies": [ { From 19829c0a450fa08c7f0b64cf4e29c0c14ee7b2d0 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 18 Sep 2019 20:21:32 -0400 Subject: [PATCH 6/8] standardise assets folder name --- .../Menus/CollectionsPage/CollectionsPageEx.cs | 2 +- .../{Assets => assets}/CollectionTab_LostBook.png | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename ArchaeologyHouseContentManagementHelper/{Assets => assets}/CollectionTab_LostBook.png (100%) diff --git a/ArchaeologyHouseContentManagementHelper/Framework/Menus/CollectionsPage/CollectionsPageEx.cs b/ArchaeologyHouseContentManagementHelper/Framework/Menus/CollectionsPage/CollectionsPageEx.cs index e4c0443..760f919 100644 --- a/ArchaeologyHouseContentManagementHelper/Framework/Menus/CollectionsPage/CollectionsPageEx.cs +++ b/ArchaeologyHouseContentManagementHelper/Framework/Menus/CollectionsPage/CollectionsPageEx.cs @@ -49,7 +49,7 @@ public CollectionsPageEx(int x, int y, int width, int height, int selectedTab = lostBooksTab = prevSideTab.Key + 1; // Loads the [Lost Books] side-tab texture. - Texture2D bookTabTexture = ModEntry.CommonServices.ContentHelper.Load("Assets/CollectionTab_LostBook.png", ContentSource.ModFolder); + Texture2D bookTabTexture = ModEntry.CommonServices.ContentHelper.Load("assets/CollectionTab_LostBook.png", ContentSource.ModFolder); // Adds the [Lost Books] side-tab to the Collections Page. ClickableTextureComponent stLostBooks = new ClickableTextureComponent( diff --git a/ArchaeologyHouseContentManagementHelper/Assets/CollectionTab_LostBook.png b/ArchaeologyHouseContentManagementHelper/assets/CollectionTab_LostBook.png similarity index 100% rename from ArchaeologyHouseContentManagementHelper/Assets/CollectionTab_LostBook.png rename to ArchaeologyHouseContentManagementHelper/assets/CollectionTab_LostBook.png From e0bd9a6cd5f1452cee52151ec8ead625c45e52dd Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Wed, 18 Sep 2019 20:29:18 -0400 Subject: [PATCH 7/8] fix dependencies copied into mod folder --- FeTK/FeTK.csproj | 2 ++ ToolUpgradeDeliveryService/ToolUpgradeDeliveryService.csproj | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/FeTK/FeTK.csproj b/FeTK/FeTK.csproj index 7a1df59..6f86422 100644 --- a/FeTK/FeTK.csproj +++ b/FeTK/FeTK.csproj @@ -7,6 +7,8 @@ net452 x86 x86 + + Newtonsoft\.Json diff --git a/ToolUpgradeDeliveryService/ToolUpgradeDeliveryService.csproj b/ToolUpgradeDeliveryService/ToolUpgradeDeliveryService.csproj index 3709cf2..bfa12b7 100644 --- a/ToolUpgradeDeliveryService/ToolUpgradeDeliveryService.csproj +++ b/ToolUpgradeDeliveryService/ToolUpgradeDeliveryService.csproj @@ -14,7 +14,9 @@ - + + false + From d1349c464befa2b5cf9edcfa259f683109295066 Mon Sep 17 00:00:00 2001 From: Digus Date: Tue, 17 Dec 2019 01:07:19 -0300 Subject: [PATCH 8/8] Adding compatibility with Mail Framework Mod --- FeTK/Framework/Services/MailService/MailManager.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/FeTK/Framework/Services/MailService/MailManager.cs b/FeTK/Framework/Services/MailService/MailManager.cs index 6d1d18e..80455f4 100644 --- a/FeTK/Framework/Services/MailService/MailManager.cs +++ b/FeTK/Framework/Services/MailService/MailManager.cs @@ -266,6 +266,10 @@ private void OnMenuChanged(object sender, MenuChangedEventArgs e) // item). if (!this.registeredMailsMetaData.TryGetValue(mailId, out MailMetaData mailMetaData)) { + if (typeof(LetterViewerMenu) != letterMenu.GetType()) + { + return; + } string mailContent = GetMailContentForGameMail(mailId); // Create and show the menu for this mail.