diff --git a/build/0Harmony.dll b/build/0Harmony.dll index 1564f1c5..f35f3e13 100644 Binary files a/build/0Harmony.dll and b/build/0Harmony.dll differ diff --git a/src/SMAPI.sln b/src/SMAPI.sln index 042b1ae1..d621c378 100644 --- a/src/SMAPI.sln +++ b/src/SMAPI.sln @@ -110,7 +110,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SMAPI.Tests.ModApiProvider" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SMAPI.Tests.ModApiConsumer", "SMAPI.Tests.ModApiConsumer\SMAPI.Tests.ModApiConsumer.csproj", "{2A4DF030-E8B1-4BBD-AA93-D4DE68CB9D85}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SMAPI", "SMAPI\SMAPI.csproj", "{EBD13EAB-E70B-4D9F-92C2-C34A21E1FA32}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SMAPI", "SMAPI\SMAPI.csproj", "{EBD13EAB-E70B-4D9F-92C2-C34A21E1FA32}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -212,5 +212,7 @@ Global SMAPI.Internal.Patching\SMAPI.Internal.Patching.projitems*{6c16e948-3e5c-47a7-bf4b-07a7469a87a5}*SharedItemsImports = 13 SMAPI.Internal\SMAPI.Internal.projitems*{85208f8d-6fd1-4531-be05-7142490f59fe}*SharedItemsImports = 13 SMAPI.Internal\SMAPI.Internal.projitems*{cd53ad6f-97f4-4872-a212-50c2a0fd3601}*SharedItemsImports = 5 + SMAPI.Internal.Patching\SMAPI.Internal.Patching.projitems*{ebd13eab-e70b-4d9f-92c2-c34a21e1fa32}*SharedItemsImports = 5 + SMAPI.Internal\SMAPI.Internal.projitems*{ebd13eab-e70b-4d9f-92c2-c34a21e1fa32}*SharedItemsImports = 5 EndGlobalSection EndGlobal diff --git a/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs b/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs index b23dbbc0..eaa889a1 100644 --- a/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs +++ b/src/SMAPI/Events/AssetsInvalidatedEventArgs.cs @@ -11,18 +11,10 @@ namespace StardewModdingAPI.Events ** Accessors *********/ /// The asset names that were invalidated. -#if SMAPI_FOR_MOBILE - public IReadOnlyCollection Names { get; } -#else public IReadOnlySet Names { get; } -#endif /// The with any locale codes stripped. /// For example, if contains a locale like Data/Bundles.fr-FR, this will have the name without locale like Data/Bundles. If the name has no locale, this field is equivalent. -#if SMAPI_FOR_MOBILE - public IReadOnlyCollection NamesWithoutLocale { get; } -#else public IReadOnlySet NamesWithoutLocale { get; } -#endif /********* diff --git a/src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs b/src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs index 0d0469d7..39b0a82e 100644 --- a/src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs +++ b/src/SMAPI/Framework/StateTracking/Snapshots/LocationSnapshot.cs @@ -4,6 +4,7 @@ using StardewValley; using StardewValley.Buildings; using StardewValley.Objects; using StardewValley.TerrainFeatures; +using Object = StardewValley.Object; namespace StardewModdingAPI.Framework.StateTracking.Snapshots { diff --git a/src/SMAPI/Mobile/IsExternalInit.cs b/src/SMAPI/Mobile/IsExternalInit.cs deleted file mode 100644 index 66a88a4c..00000000 --- a/src/SMAPI/Mobile/IsExternalInit.cs +++ /dev/null @@ -1,7 +0,0 @@ -using System.ComponentModel; - -namespace System.Runtime.CompilerServices -{ - [EditorBrowsable(EditorBrowsableState.Never)] - internal class IsExternalInit{} -} diff --git a/src/SMAPI/Mobile/MobileMemoryExtension.cs b/src/SMAPI/Mobile/MobileMemoryExtension.cs deleted file mode 100644 index 034d72a5..00000000 --- a/src/SMAPI/Mobile/MobileMemoryExtension.cs +++ /dev/null @@ -1,23 +0,0 @@ -namespace System; -using Internal.Runtime.CompilerServices; -using System.Collections.Generic; -using System.Globalization; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Text; - -public static class MobileMemoryExtension -{ - - /// Indicates whether a specified value is found in a read-only span. Values are compared using IEquatable{T}.Equals(T). - /// The span to search. - /// The value to search for. - /// The type of the span. - /// - /// if found, otherwise. - [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool Contains(this ReadOnlySpan span, T value) where T : IEquatable - { - return span.IndexOf(value) >= 0; - } -} diff --git a/src/SMAPI/Mobile/MobileTypeExtension.cs b/src/SMAPI/Mobile/MobileTypeExtension.cs deleted file mode 100644 index a51847b0..00000000 --- a/src/SMAPI/Mobile/MobileTypeExtension.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace System; - -using System.Collections; -using System.Collections.Generic; -using System.Diagnostics; -using System.Diagnostics.CodeAnalysis; -using System.Globalization; -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; -using System.Threading; - -public static class MobileTypeExtension -{ - - /// Determines whether the current type can be assigned to a variable of the specified . - /// The type to compare with the current type. - /// - /// if any of the following conditions is true: - /// - /// - The current instance and represent the same type. - /// - /// - The current type is derived either directly or indirectly from . The current type is derived directly from if it inherits from ; the current type is derived indirectly from if it inherits from a succession of one or more classes that inherit from . - /// - /// - is an interface that the current type implements. - /// - /// - The current type is a generic type parameter, and represents one of the constraints of the current type. - /// - /// - The current type represents a value type, and represents Nullable<c> (Nullable(Of c) in Visual Basic). - /// - /// if none of these conditions are true, or if or is . - public static bool IsAssignableTo(this Type type, [NotNullWhen(true)] Type? targetType) => (object) targetType != null && targetType.IsAssignableFrom(type); - -} diff --git a/src/SMAPI/Patches/MusicBankPatch.cs b/src/SMAPI/Patches/MusicBankPatch.cs index e0110bd9..51060c5f 100644 --- a/src/SMAPI/Patches/MusicBankPatch.cs +++ b/src/SMAPI/Patches/MusicBankPatch.cs @@ -8,6 +8,7 @@ using HarmonyLib; using StardewModdingAPI.Framework; using StardewModdingAPI.Internal.Patching; using StardewValley; +using Monitor = StardewModdingAPI.Framework.Monitor; namespace StardewModdingAPI.Patches { diff --git a/src/SMAPI/Patches/OnAppPausePatch.cs b/src/SMAPI/Patches/OnAppPausePatch.cs index 95f8e31f..38060cee 100644 --- a/src/SMAPI/Patches/OnAppPausePatch.cs +++ b/src/SMAPI/Patches/OnAppPausePatch.cs @@ -6,6 +6,7 @@ using HarmonyLib; using StardewModdingAPI.Framework; using StardewModdingAPI.Internal.Patching; using StardewValley; +using Monitor = StardewModdingAPI.Framework.Monitor; namespace StardewModdingAPI.Patches { diff --git a/src/SMAPI/Patches/SaveBackupPatch.cs b/src/SMAPI/Patches/SaveBackupPatch.cs index 74c4c247..c997e85a 100644 --- a/src/SMAPI/Patches/SaveBackupPatch.cs +++ b/src/SMAPI/Patches/SaveBackupPatch.cs @@ -7,6 +7,7 @@ using StardewModdingAPI.Framework; using StardewModdingAPI.Framework.Events; using StardewModdingAPI.Internal.Patching; using StardewValley; +using Monitor = StardewModdingAPI.Framework.Monitor; namespace StardewModdingAPI.Patches { diff --git a/src/SMAPI/Patches/SaveGamePatch.cs b/src/SMAPI/Patches/SaveGamePatch.cs index 77a2b74a..7e5d6d78 100644 --- a/src/SMAPI/Patches/SaveGamePatch.cs +++ b/src/SMAPI/Patches/SaveGamePatch.cs @@ -11,6 +11,7 @@ using StardewModdingAPI.Framework; using StardewModdingAPI.Internal.Patching; using StardewValley; using StardewValley.Menus; +using Monitor = StardewModdingAPI.Framework.Monitor; namespace StardewModdingAPI.Patches { diff --git a/src/SMAPI/SMAPI.csproj b/src/SMAPI/SMAPI.csproj index c611d153..91320ba6 100644 --- a/src/SMAPI/SMAPI.csproj +++ b/src/SMAPI/SMAPI.csproj @@ -1,5 +1,5 @@  - + Debug @@ -18,8 +18,10 @@ Resources\Resource.designer.cs Off false - v12.0 - net5.0-android + 23 + enable + net6.0-android + 12.0 true $(DefineConstants) @@ -133,16 +135,16 @@ ..\..\..\Downloads\StardewValleyAndroidStuff\base_1.5.6.31\assemblies\MonoGame.Framework.dll - - - - - + + + + + ..\..\build\0Harmony.dll - + ..\SMAPI.Toolkit\bin\Debug\netstandard2.0\SMAPI.Toolkit.dll @@ -155,12 +157,12 @@ 2.88.3 - - 28.0.0.3 - - - 28.0.0.3 - + + + + + + @@ -176,9 +178,6 @@ - - - @@ -195,7 +194,10 @@ - + + + + diff --git a/src/SMAPI/SMainActivity.cs b/src/SMAPI/SMainActivity.cs index 7c94fae2..bb1cbb06 100644 --- a/src/SMAPI/SMainActivity.cs +++ b/src/SMAPI/SMainActivity.cs @@ -4,8 +4,6 @@ using Android.Content.PM; using Android.OS; using Android.Provider; using Android.Runtime; -using Android.Support.V4.App; -using Android.Support.V4.Content; using Android.Views; using System; using System.Collections.Generic; @@ -68,10 +66,10 @@ namespace StardewModdingAPI List list = new List(); for (int i = 0; i < this.requiredPermissions.Length; i++) { - if (ContextCompat.CheckSelfPermission(this, this.requiredPermissions[i]) != 0) - { - list.Add(this.requiredPermissions[i]); - } + // if (ContextCompat.CheckSelfPermission(this, this.requiredPermissions[i]) != 0) + // { + // list.Add(this.requiredPermissions[i]); + // } } return list.ToArray(); @@ -187,7 +185,7 @@ namespace StardewModdingAPI public new void PromptForPermissions() { - ActivityCompat.RequestPermissions(this, this.DeniedPermissionsArray, 0); + // ActivityCompat.RequestPermissions(this, this.DeniedPermissionsArray, 0); } public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults)