Updated pathos api package to 3.0 and started updating mods to SMAPI 3.0. Fixed AdvancedSaveBackup and AutoSpeed so far.
This commit is contained in:
parent
89ef844ab3
commit
20acb522ef
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"Name": "Advanced Save Backup",
|
||||
"Author": "Alpha_Omegasis",
|
||||
"Version": "1.7.0",
|
||||
"Version": "1.7.1",
|
||||
"Description": "Backs up your save files when loading SMAPI and every in game night when saving.",
|
||||
"UniqueID": "Omegasis.AdvancedSaveBackup",
|
||||
"EntryDll": "AdvancedSaveBackup.dll",
|
||||
"MinimumApiVersion": "2.10.1",
|
||||
"MinimumApiVersion": "3.0.0",
|
||||
"UpdateKeys": [ "Nexus:435" ]
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Omegasis.AutoSpeed.Framework;
|
||||
using StardewModdingAPI;
|
||||
using StardewModdingAPI.Events;
|
||||
|
@ -8,12 +10,24 @@ namespace Omegasis.AutoSpeed
|
|||
/// <summary>The mod entry point.</summary>
|
||||
public class AutoSpeed : Mod
|
||||
{
|
||||
/*********
|
||||
**Static Fields
|
||||
*********/
|
||||
/// <summary>
|
||||
/// All of the speed that is added together for auto speed. This is used for mod authors to hook in their speed boosts before auto speed applies the default speed boost.
|
||||
/// </summary>
|
||||
public Dictionary<string, int> combinedAddedSpeed;
|
||||
|
||||
/*********
|
||||
** Fields
|
||||
*********/
|
||||
/// <summary>The mod configuration.</summary>
|
||||
private ModConfig Config;
|
||||
|
||||
/// <summary>
|
||||
/// A static reference to expose public fields.
|
||||
/// </summary>
|
||||
public static AutoSpeed Instance;
|
||||
|
||||
/*********
|
||||
** Public methods
|
||||
|
@ -24,6 +38,17 @@ namespace Omegasis.AutoSpeed
|
|||
{
|
||||
helper.Events.GameLoop.UpdateTicked += this.OnUpdateTicked;
|
||||
this.Config = helper.ReadConfig<ModConfig>();
|
||||
this.combinedAddedSpeed = new Dictionary<string, int>();
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a copy of the mods' api.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public override object GetApi()
|
||||
{
|
||||
return new AutoSpeedAPI();
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,7 +61,10 @@ namespace Omegasis.AutoSpeed
|
|||
private void OnUpdateTicked(object sender, UpdateTickedEventArgs e)
|
||||
{
|
||||
if (Context.IsPlayerFree)
|
||||
Game1.player.addedSpeed = this.Config.Speed;
|
||||
{
|
||||
int addedSpeed = this.combinedAddedSpeed.Values.Sum();
|
||||
Game1.player.addedSpeed = this.Config.Speed+addedSpeed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
@ -77,6 +77,8 @@
|
|||
<Link>Properties\GlobalAssemblyInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="AutoSpeed.cs" />
|
||||
<Compile Include="Framework\AutoSpeedAPI.cs" />
|
||||
<Compile Include="Framework\IAutoSpeedAPI.cs" />
|
||||
<Compile Include="Framework\ModConfig.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Omegasis.AutoSpeed.Framework
|
||||
{
|
||||
/// <summary>
|
||||
/// API for auto speed to hook into the Game1.player.addedSpeed function.
|
||||
/// </summary>
|
||||
public class AutoSpeedAPI
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Allows adding a speed for Auto Speed to take acount for when calculating Game1.player.addedSpeed; Will fail if a unique key has already been added.
|
||||
/// </summary>
|
||||
/// <param name="ID"></param>
|
||||
/// <param name="Amount"></param>
|
||||
public void addSpeedBoost(string ID, int Amount)
|
||||
{
|
||||
AutoSpeed.Instance.combinedAddedSpeed.Add(ID, Amount);
|
||||
}
|
||||
/// <summary>
|
||||
/// Removes an added speed boost by passing in the unique key.
|
||||
/// </summary>
|
||||
/// <param name="ID"></param>
|
||||
/// <param name="Amount"></param>
|
||||
public void remvoveSpeedBoost(string ID, int Amount)
|
||||
{
|
||||
AutoSpeed.Instance.combinedAddedSpeed.Remove(ID);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Omegasis.AutoSpeed.Framework
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface used to interface AutoSpeed's API class.
|
||||
/// </summary>
|
||||
public interface IAutoSpeedAPI
|
||||
{
|
||||
void addSpeedBoost(string ID, int Amount);
|
||||
/// <summary>
|
||||
/// Removes an added speed boost by passing in the unique key.
|
||||
/// </summary>
|
||||
/// <param name="ID"></param>
|
||||
/// <param name="Amount"></param>
|
||||
void remvoveSpeedBoost(string ID, int Amount);
|
||||
}
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"Name": "Auto Speed",
|
||||
"Author": "Alpha_Omegasis",
|
||||
"Version": "1.8.0",
|
||||
"Version": "1.9.0",
|
||||
"Description": "Got to go fast!",
|
||||
"UniqueID": "Omegasis.AutoSpeed",
|
||||
"EntryDll": "AutoSpeed.dll",
|
||||
"MinimumApiVersion": "2.10.1",
|
||||
"MinimumApiVersion": "3.0.0",
|
||||
"UpdateKeys": [ "Nexus:443" ]
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -50,15 +50,12 @@
|
|||
<None Include="manifest.json" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="..\packages\Pathoschild.Stardew.ModBuildConfig.2.2.0\analyzers\dotnet\cs\StardewModdingAPI.ModBuildConfig.Analyzer.dll" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="..\packages\Pathoschild.Stardew.ModBuildConfig.2.2.0\build\Pathoschild.Stardew.ModBuildConfig.targets" Condition="Exists('..\packages\Pathoschild.Stardew.ModBuildConfig.2.2.0\build\Pathoschild.Stardew.ModBuildConfig.targets')" />
|
||||
<Import Project="..\packages\Pathoschild.Stardew.ModBuildConfig.3.0.0\build\Pathoschild.Stardew.ModBuildConfig.targets" Condition="Exists('..\packages\Pathoschild.Stardew.ModBuildConfig.3.0.0\build\Pathoschild.Stardew.ModBuildConfig.targets')" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>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}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Pathoschild.Stardew.ModBuildConfig.2.2.0\build\Pathoschild.Stardew.ModBuildConfig.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Pathoschild.Stardew.ModBuildConfig.2.2.0\build\Pathoschild.Stardew.ModBuildConfig.targets'))" />
|
||||
<Error Condition="!Exists('..\packages\Pathoschild.Stardew.ModBuildConfig.3.0.0\build\Pathoschild.Stardew.ModBuildConfig.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Pathoschild.Stardew.ModBuildConfig.3.0.0\build\Pathoschild.Stardew.ModBuildConfig.targets'))" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Pathoschild.Stardew.ModBuildConfig" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Pathoschild.Stardew.ModBuildConfig" version="3.0.0" targetFramework="net461" />
|
||||
</packages>
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<PackageReference Include="Newtonsoft.Json">
|
||||
<Version>12.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="PyTK">
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="NAudio" Version="1.8.5" />
|
||||
<PackageReference Include="NAudio.Vorbis" Version="1.0.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -69,7 +69,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Lidgren.Network, Version=3.6.0.1625, Culture=neutral, processorArchitecture=MSIL">
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="2.2.0" />
|
||||
<PackageReference Include="Pathoschild.Stardew.ModBuildConfig" Version="3.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Netcode">
|
||||
|
|
Loading…
Reference in New Issue