Update for 1.4.5.138, rewrite for it isSnowing field, draw logic sync
This commit is contained in:
parent
35819c2748
commit
526ea483c6
|
@ -20,7 +20,7 @@ namespace StardewModdingAPI
|
|||
** Public
|
||||
****/
|
||||
/// <summary>SMAPI's current semantic version.</summary>
|
||||
public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.2.0.3-RC2", allowNonStandard: true);
|
||||
public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.2.0.3", allowNonStandard: true);
|
||||
|
||||
/// <summary>The minimum supported version of Stardew Valley.</summary>
|
||||
public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.4.1");
|
||||
|
@ -95,7 +95,7 @@ namespace StardewModdingAPI
|
|||
internal static string ModsPath { get; set; }
|
||||
|
||||
/// <summary>The game's current semantic version.</summary>
|
||||
internal static ISemanticVersion GameVersion { get; } = new GameVersion("1.4.5.137");
|
||||
internal static ISemanticVersion GameVersion { get; } = new GameVersion("1.4.5.138");
|
||||
|
||||
/// <summary>The target game platform.</summary>
|
||||
internal static Platform Platform { get; } = Platform.Android;
|
||||
|
|
|
@ -24,6 +24,18 @@ namespace StardewModdingAPI.Framework.RewriteFacades
|
|||
}
|
||||
}
|
||||
|
||||
public static bool IsSnowingProp
|
||||
{
|
||||
get
|
||||
{
|
||||
return WeatherDebrisManager.Instance.isSnowing;
|
||||
}
|
||||
set
|
||||
{
|
||||
WeatherDebrisManager.Instance.isSnowing = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsDebrisWeatherProp
|
||||
{
|
||||
get
|
||||
|
|
|
@ -1009,6 +1009,7 @@ namespace StardewModdingAPI.Framework
|
|||
IReflectedMethod DrawAfterMap = this.Reflection.GetMethod(this, "DrawAfterMap", new Type[] { });
|
||||
IReflectedMethod DrawToolbar = this.Reflection.GetMethod(this, "DrawToolbar", new Type[] { });
|
||||
IReflectedMethod DrawVirtualJoypad = this.Reflection.GetMethod(this, "DrawVirtualJoypad", new Type[] { });
|
||||
IReflectedMethod DrawMenuMouseCursor = this.Reflection.GetMethod(this, "DrawMenuMouseCursor", new Type[] { });
|
||||
IReflectedMethod DrawFadeToBlackFullScreenRect = this.Reflection.GetMethod(this, "DrawFadeToBlackFullScreenRect", new Type[] { });
|
||||
IReflectedMethod DrawChatBox = this.Reflection.GetMethod(this, "DrawChatBox", new Type[] { });
|
||||
IReflectedMethod DrawDialogueBoxForPinchZoom = this.Reflection.GetMethod(this, "DrawDialogueBoxForPinchZoom", new Type[] { });
|
||||
|
@ -1083,16 +1084,14 @@ namespace StardewModdingAPI.Framework
|
|||
RestoreViewportAndZoom();
|
||||
}
|
||||
}
|
||||
if (overlayMenu != null)
|
||||
{
|
||||
BackupViewportAndZoom(false);
|
||||
SetSpriteBatchBeginNextID("B");
|
||||
_spriteBatchBegin.Invoke(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, null);
|
||||
overlayMenu.draw(spriteBatch);
|
||||
_spriteBatchEnd.Invoke();
|
||||
RestoreViewportAndZoom();
|
||||
}
|
||||
return;
|
||||
if (overlayMenu == null)
|
||||
return;
|
||||
BackupViewportAndZoom(false);
|
||||
SetSpriteBatchBeginNextID("B");
|
||||
_spriteBatchBegin.Invoke(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, null);
|
||||
overlayMenu.draw(spriteBatch);
|
||||
_spriteBatchEnd.Invoke();
|
||||
RestoreViewportAndZoom();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1179,39 +1178,35 @@ namespace StardewModdingAPI.Framework
|
|||
}
|
||||
this.drawOverlays(spriteBatch);
|
||||
this.renderScreenBufferTargetScreen(target_screen);
|
||||
if (currentMinigame is FishingGame && activeClickableMenu != null)
|
||||
switch (Game1.currentMinigame)
|
||||
{
|
||||
SetSpriteBatchBeginNextID("A-A");
|
||||
SpriteBatchBegin.Invoke(1f);
|
||||
activeClickableMenu.draw(spriteBatch);
|
||||
_spriteBatchEnd.Invoke();
|
||||
this.drawOverlays(spriteBatch);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(currentMinigame is FantasyBoardGame) || activeClickableMenu == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (IsActiveClickableMenuNativeScaled)
|
||||
{
|
||||
BackupViewportAndZoom(true);
|
||||
SetSpriteBatchBeginNextID("A1");
|
||||
SpriteBatchBegin.Invoke(NativeZoomLevel);
|
||||
activeClickableMenu.draw(spriteBatch);
|
||||
_spriteBatchEnd.Invoke();
|
||||
RestoreViewportAndZoom();
|
||||
}
|
||||
else
|
||||
{
|
||||
BackupViewportAndZoom(false);
|
||||
SetSpriteBatchBeginNextID("A2");
|
||||
case FishingGame _ when Game1.activeClickableMenu != null:
|
||||
Game1.SetSpriteBatchBeginNextID("A-A");
|
||||
SpriteBatchBegin.Invoke(1f);
|
||||
activeClickableMenu.draw(spriteBatch);
|
||||
Game1.activeClickableMenu.draw(Game1.spriteBatch);
|
||||
_spriteBatchEnd.Invoke();
|
||||
RestoreViewportAndZoom();
|
||||
}
|
||||
this.drawOverlays(Game1.spriteBatch, true);
|
||||
break;
|
||||
case FantasyBoardGame _ when Game1.activeClickableMenu != null:
|
||||
if (Game1.IsActiveClickableMenuNativeScaled)
|
||||
{
|
||||
Game1.BackupViewportAndZoom(true);
|
||||
Game1.SetSpriteBatchBeginNextID("A1");
|
||||
SpriteBatchBegin.Invoke(Game1.NativeZoomLevel);
|
||||
Game1.activeClickableMenu.draw(Game1.spriteBatch);
|
||||
_spriteBatchEnd.Invoke();
|
||||
Game1.RestoreViewportAndZoom();
|
||||
break;
|
||||
}
|
||||
Game1.BackupViewportAndZoom(false);
|
||||
Game1.SetSpriteBatchBeginNextID("A2");
|
||||
SpriteBatchBegin.Invoke(1f);
|
||||
Game1.activeClickableMenu.draw(Game1.spriteBatch);
|
||||
_spriteBatchEnd.Invoke();
|
||||
Game1.RestoreViewportAndZoom();
|
||||
break;
|
||||
}
|
||||
DrawVirtualJoypad.Invoke();
|
||||
}
|
||||
else if (showingEndOfNightStuff)
|
||||
{
|
||||
|
@ -1885,6 +1880,8 @@ label_168:
|
|||
{
|
||||
farmEvent.drawAboveEverything(spriteBatch);
|
||||
}
|
||||
if (Game1.emoteMenu != null && !this.takingMapScreenshot)
|
||||
Game1.emoteMenu.draw(Game1.spriteBatch);
|
||||
if (HostPaused)
|
||||
{
|
||||
string s = content.LoadString("Strings\\StringsFromCSFiles:DayTimeMoneyBox.cs.10378");
|
||||
|
@ -1916,8 +1913,10 @@ label_168:
|
|||
_spriteBatchEnd.Invoke();
|
||||
}
|
||||
DrawToolbar.Invoke();
|
||||
DrawVirtualJoypad.Invoke();
|
||||
DrawMenuMouseCursor.Invoke();
|
||||
}
|
||||
if (_drawHUD.GetValue() || Game1.player.CanMove)
|
||||
DrawVirtualJoypad.Invoke();
|
||||
DrawFadeToBlackFullScreenRect.Invoke();
|
||||
SetSpriteBatchBeginNextID("A-E");
|
||||
SpriteBatchBegin.Invoke(1f);
|
||||
|
|
|
@ -45,6 +45,7 @@ namespace StardewModdingAPI.Metadata
|
|||
|
||||
//isRaining and isDebrisWeather fix done.
|
||||
yield return new TypeFieldToAnotherTypePropertyRewriter(typeof(Game1), typeof(Game1Methods), "isRaining", "IsRainingProp");
|
||||
yield return new TypeFieldToAnotherTypePropertyRewriter(typeof(Game1), typeof(Game1Methods), "isSnowing", "IsSnowingProp");
|
||||
yield return new TypeFieldToAnotherTypePropertyRewriter(typeof(Game1), typeof(Game1Methods), "isDebrisWeather", "IsDebrisWeatherProp");
|
||||
|
||||
// Cause of System.Security.VerificationException : Invalid instruction target
|
||||
|
|
|
@ -48,10 +48,10 @@
|
|||
<HintPath>..\..\..\..\..\AndroidStudioProjects\SMAPI Android Installer\app\src\main\assets\Stardew\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Android.Vending.Expansion.Downloader">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.5.137\assemblies\Google.Android.Vending.Expansion.Downloader.dll</HintPath>
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.5.138\assemblies\Google.Android.Vending.Expansion.Downloader.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Android.Vending.Licensing">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.5.137\assemblies\Google.Android.Vending.Licensing.dll</HintPath>
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.5.138\assemblies\Google.Android.Vending.Licensing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Mono.Android" />
|
||||
|
@ -59,7 +59,7 @@
|
|||
<HintPath>..\..\..\..\..\AndroidStudioProjects\SMAPI Android Installer\app\src\main\assets\Stardew\Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MonoGame.Framework">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.5.137\assemblies\MonoGame.Framework.dll</HintPath>
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.5.138\assemblies\MonoGame.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MonoMod.RuntimeDetour">
|
||||
<HintPath>..\..\..\..\..\AndroidStudioProjects\SMAPI Android Installer\app\src\main\assets\Stardew\MonoMod.RuntimeDetour.dll</HintPath>
|
||||
|
@ -74,10 +74,10 @@
|
|||
<HintPath>..\SMAPI.Toolkit\bin\Debug\net4.5\SMAPI.Toolkit.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StardewValley">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.5.137\assemblies\StardewValley.dll</HintPath>
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.5.138\assemblies\StardewValley.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StardewValley.GameData">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.5.137\assemblies\StardewValley.GameData.dll</HintPath>
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.5.138\assemblies\StardewValley.GameData.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
|
|
Loading…
Reference in New Issue