From 02aabe7a45d6dcbff021c44476a4768e0b014d9f Mon Sep 17 00:00:00 2001 From: ZaneYork Date: Fri, 27 Mar 2020 10:35:38 +0800 Subject: [PATCH] Do nothing when MonoMod is not working --- .gitignore | 1 + ModEntry.cs | 3 +++ SMAPI.Mods.CustomLocalization.csproj | 3 +++ 3 files changed, 7 insertions(+) diff --git a/.gitignore b/.gitignore index bb64d4b..a9fea54 100644 --- a/.gitignore +++ b/.gitignore @@ -251,3 +251,4 @@ paket-files/ # JetBrains Rider .idea/ *.sln.iml +**/*.vshistory/ diff --git a/ModEntry.cs b/ModEntry.cs index 7d26643..8e93c71 100644 --- a/ModEntry.cs +++ b/ModEntry.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Reflection; +using Android.OS; using Harmony; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; @@ -29,6 +30,8 @@ namespace StardewModdingAPI.Mods.CustomLocalization public override void Entry(IModHelper helper) { + if (Build.VERSION.SdkInt < BuildVersionCodes.M) + return; Instance = this; ModConfig = helper.ReadConfig(); ModPath = helper.DirectoryPath; diff --git a/SMAPI.Mods.CustomLocalization.csproj b/SMAPI.Mods.CustomLocalization.csproj index 2b54276..b421036 100644 --- a/SMAPI.Mods.CustomLocalization.csproj +++ b/SMAPI.Mods.CustomLocalization.csproj @@ -14,6 +14,9 @@ ..\libs\0Harmony.dll + + ..\libs\Mono.Android.dll + ..\libs\\MonoGame.Framework.dll