summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/manifest.json4
-rw-r--r--src/SMAPI.Mods.SaveBackup/manifest.json4
-rw-r--r--src/SMAPI.Web/Startup.cs1
-rw-r--r--src/SMAPI.Web/ViewModels/ModModel.cs8
-rw-r--r--src/SMAPI.Web/Views/Mods/Index.cshtml18
-rw-r--r--src/SMAPI.Web/wwwroot/Content/js/mods.js40
-rw-r--r--src/SMAPI/Constants.cs2
-rw-r--r--src/SMAPI/Events/ContentEvents.cs9
-rw-r--r--src/SMAPI/Events/ControlEvents.cs23
-rw-r--r--src/SMAPI/Events/GameEvents.cs23
-rw-r--r--src/SMAPI/Events/GraphicsEvents.cs21
-rw-r--r--src/SMAPI/Events/InputEvents.cs11
-rw-r--r--src/SMAPI/Events/LocationEvents.cs13
-rw-r--r--src/SMAPI/Events/MenuEvents.cs11
-rw-r--r--src/SMAPI/Events/MineEvents.cs9
-rw-r--r--src/SMAPI/Events/MultiplayerEvents.cs15
-rw-r--r--src/SMAPI/Events/PlayerEvents.cs13
-rw-r--r--src/SMAPI/Events/SaveEvents.cs19
-rw-r--r--src/SMAPI/Events/SpecialisedEvents.cs9
-rw-r--r--src/SMAPI/Events/TimeEvents.cs11
-rw-r--r--src/SMAPI/Framework/Content/AssetDataForDictionary.cs8
-rw-r--r--src/SMAPI/Framework/ContentCoordinator.cs2
-rw-r--r--src/SMAPI/Framework/ContentManagers/GameContentManager.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/CommandHelper.cs2
-rw-r--r--src/SMAPI/Framework/ModHelpers/ContentPackHelper.cs82
-rw-r--r--src/SMAPI/Framework/ModHelpers/ModHelper.cs72
-rw-r--r--src/SMAPI/Framework/ModHelpers/ReflectionHelper.cs7
-rw-r--r--src/SMAPI/Framework/Networking/SGalaxyNetServer.cs24
-rw-r--r--src/SMAPI/Framework/SCore.cs65
-rw-r--r--src/SMAPI/Framework/SGame.cs2
-rw-r--r--src/SMAPI/Framework/SMultiplayer.cs2
-rw-r--r--src/SMAPI/IAssetDataForDictionary.cs8
-rw-r--r--src/SMAPI/ICommandHelper.cs2
-rw-r--r--src/SMAPI/IContentPackHelper.cs27
-rw-r--r--src/SMAPI/IModHelper.cs19
-rw-r--r--src/SMAPI/Metadata/CoreAssetPropagator.cs14
-rw-r--r--src/SMAPI/Patches/ObjectErrorPatch.cs55
-rw-r--r--src/SMAPI/SemanticVersion.cs5
-rw-r--r--src/SMAPI/StardewModdingAPI.csproj5
-rw-r--r--src/StardewModdingAPI.Toolkit.CoreInterfaces/StardewModdingAPI.Toolkit.CoreInterfaces.csproj4
-rw-r--r--src/StardewModdingAPI.Toolkit/Framework/Clients/WebApi/ModExtendedMetadataModel.cs12
-rw-r--r--src/StardewModdingAPI.Toolkit/Framework/Clients/Wiki/WikiClient.cs21
-rw-r--r--src/StardewModdingAPI.Toolkit/Framework/Clients/Wiki/WikiModEntry.cs6
-rw-r--r--src/StardewModdingAPI.Toolkit/Framework/Clients/Wiki/WikiSmapi3Status.cs18
-rw-r--r--src/StardewModdingAPI.Toolkit/StardewModdingAPI.Toolkit.csproj4
45 files changed, 454 insertions, 278 deletions
diff --git a/src/SMAPI.Mods.ConsoleCommands/manifest.json b/src/SMAPI.Mods.ConsoleCommands/manifest.json
index fa977039..3d539967 100644
--- a/src/SMAPI.Mods.ConsoleCommands/manifest.json
+++ b/src/SMAPI.Mods.ConsoleCommands/manifest.json
@@ -1,9 +1,9 @@
{
"Name": "Console Commands",
"Author": "SMAPI",
- "Version": "2.9.1",
+ "Version": "2.9.2",
"Description": "Adds SMAPI console commands that let you manipulate the game.",
"UniqueID": "SMAPI.ConsoleCommands",
"EntryDll": "ConsoleCommands.dll",
- "MinimumApiVersion": "2.9.1"
+ "MinimumApiVersion": "2.9.2"
}
diff --git a/src/SMAPI.Mods.SaveBackup/manifest.json b/src/SMAPI.Mods.SaveBackup/manifest.json
index 1875adca..20935880 100644
--- a/src/SMAPI.Mods.SaveBackup/manifest.json
+++ b/src/SMAPI.Mods.SaveBackup/manifest.json
@@ -1,9 +1,9 @@
{
"Name": "Save Backup",
"Author": "SMAPI",
- "Version": "2.9.1",
+ "Version": "2.9.2",
"Description": "Automatically backs up all your saves once per day into its folder.",
"UniqueID": "SMAPI.SaveBackup",
"EntryDll": "SaveBackup.dll",
- "MinimumApiVersion": "2.9.1"
+ "MinimumApiVersion": "2.9.2"
}
diff --git a/src/SMAPI.Web/Startup.cs b/src/SMAPI.Web/Startup.cs
index 0bd71d26..4e3aaed3 100644
--- a/src/SMAPI.Web/Startup.cs
+++ b/src/SMAPI.Web/Startup.cs
@@ -165,6 +165,7 @@ namespace StardewModdingAPI.Web
redirects.Add(new RedirectToUrlRule(@"^/3\.0\.?$", "https://stardewvalleywiki.com/Modding:Migrate_to_SMAPI_3.0"));
redirects.Add(new RedirectToUrlRule(@"^/docs\.?$", "https://stardewvalleywiki.com/Modding:Index"));
redirects.Add(new RedirectToUrlRule(@"^/install\.?$", "https://stardewvalleywiki.com/Modding:Player_Guide/Getting_Started#Install_SMAPI"));
+ redirects.Add(new RedirectToUrlRule(@"^/troubleshoot(.*)$", "https://stardewvalleywiki.com/Modding:Player_Guide/Troubleshooting$1"));
// redirect legacy canimod.com URLs
var wikiRedirects = new Dictionary<string, string[]>
diff --git a/src/SMAPI.Web/ViewModels/ModModel.cs b/src/SMAPI.Web/ViewModels/ModModel.cs
index 5c1840fc..f1a52f98 100644
--- a/src/SMAPI.Web/ViewModels/ModModel.cs
+++ b/src/SMAPI.Web/ViewModels/ModModel.cs
@@ -31,6 +31,12 @@ namespace StardewModdingAPI.Web.ViewModels
/// <summary>The compatibility status for the beta version of the game.</summary>
public ModCompatibilityModel BetaCompatibility { get; set; }
+ /// <summary>Whether the mod is ready for the upcoming SMAPI 3.0.</summary>
+ public string Smapi3Status { get; set; }
+
+ /// <summary>A URL related to the <see cref="Smapi3Status"/>.</summary>
+ public string Smapi3Url { get; set; }
+
/// <summary>Links to the available mod pages.</summary>
public ModLinkModel[] ModPages { get; set; }
@@ -59,6 +65,8 @@ namespace StardewModdingAPI.Web.ViewModels
this.SourceUrl = this.GetSourceUrl(entry);
this.Compatibility = new ModCompatibilityModel(entry.Compatibility);
this.BetaCompatibility = entry.BetaCompatibility != null ? new ModCompatibilityModel(entry.BetaCompatibility) : null;
+ this.Smapi3Status = entry.Smapi3Status.ToString().ToLower();
+ this.Smapi3Url = entry.Smapi3Url;
this.ModPages = this.GetModPageUrls(entry).ToArray();
this.Warnings = entry.Warnings;
this.Slug = entry.Anchor;
diff --git a/src/SMAPI.Web/Views/Mods/Index.cshtml b/src/SMAPI.Web/Views/Mods/Index.cshtml
index a49a24d9..a6c94cf1 100644
--- a/src/SMAPI.Web/Views/Mods/Index.cshtml
+++ b/src/SMAPI.Web/Views/Mods/Index.cshtml
@@ -45,7 +45,10 @@
</div>
</div>
<div id="mod-count" v-show="showAdvanced">
- <span v-if="visibleStats.total > 0">{{visibleStats.total}} mods shown ({{Math.round((visibleStats.compatible + visibleStats.workaround) / visibleStats.total * 100)}}% compatible or have a workaround, {{Math.round((visibleStats.soon + visibleStats.broken) / visibleStats.total * 100)}}% broken, {{Math.round(visibleStats.abandoned / visibleStats.total * 100)}}% obsolete).</span>
+ <div v-if="visibleStats.total > 0">
+ {{visibleStats.total}} mods shown ({{Math.round((visibleStats.compatible + visibleStats.workaround) / visibleStats.total * 100)}}% compatible or have a workaround, {{Math.round((visibleStats.soon + visibleStats.broken) / visibleStats.total * 100)}}% broken, {{Math.round(visibleStats.abandoned / visibleStats.total * 100)}}% obsolete).<br />
+ SMAPI 3.0 (upcoming): {{Math.round(visibleStats.smapi3_ok / visibleStats.total * 100)}}% ready, {{Math.round(visibleStats.smapi3_soon / visibleStats.total * 100)}}% soon, {{Math.round(visibleStats.smapi3_broken / visibleStats.total * 100)}}% broken, {{Math.round(visibleStats.smapi3_unknown / visibleStats.total * 100)}}% unknown.
+ </div>
<span v-else>No matching mods found.</span>
</div>
<table class="wikitable" id="mod-list">
@@ -57,11 +60,12 @@
<th>compatibility</th>
<th v-show="showAdvanced">broke in</th>
<th v-show="showAdvanced">code</th>
+ <th v-show="showAdvanced"><a href="http://smapi.io/3.0">3.0</a></th>
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
- <tr v-for="mod in mods" :key="mod.Name" v-bind:id="mod.Slug" :key="mod.Slug" v-bind:data-status="mod.BetaCompatibility != null ? mod.BetaCompatibility.Status : mod.Compatibility.Status" v-show="mod.Visible">
+ <tr v-for="mod in mods" :key="mod.Name" v-bind:id="mod.Slug" :key="mod.Slug" v-bind:data-status="mod.LatestCompatibility.Status" v-show="mod.Visible">
<td>
{{mod.Name}}
<small class="mod-alt-names" v-if="mod.AlternateNames">(aka {{mod.AlternateNames}})</small>
@@ -83,11 +87,19 @@
</div>
<div v-for="(warning, i) in mod.Warnings">⚠ {{warning}}</div>
</td>
- <td class="mod-broke-in" v-html="mod.BetaCompatibility ? mod.BetaCompatibility.BrokeIn : mod.Compatibility.BrokeIn" v-show="showAdvanced"></td>
+ <td class="mod-broke-in" v-html="mod.LatestCompatibility.BrokeIn" v-show="showAdvanced"></td>
<td v-show="showAdvanced">
<span v-if="mod.SourceUrl"><a v-bind:href="mod.SourceUrl">source</a></span>
<span v-else class="mod-closed-source">no source</span>
</td>
+ <td v-show="showAdvanced">
+ <template v-if="mod.LatestCompatibility.Status == 'ok' || mod.LatestCompatibility.Status == 'unofficial' || mod.Smapi3Status == 'ok' || mod.Smapi3Status == 'soon'">
+ <small v-if="mod.Smapi3Status == 'ok'">✓</small>
+ <small v-else-if="mod.Smapi3Status == 'broken'">✖</small>
+ <small v-else-if="mod.Smapi3Status == 'soon' && mod.Smapi3Url"><a v-bind:href="mod.Smapi3Url">↻ soon</a></small>
+ <small v-else>↻ {{mod.Smapi3Status}}</small>
+ </template>
+ </td>
<td>
<small><a v-bind:href="'#' + mod.Slug">#</a></small>
</td>
diff --git a/src/SMAPI.Web/wwwroot/Content/js/mods.js b/src/SMAPI.Web/wwwroot/Content/js/mods.js
index f7a8501e..28992908 100644
--- a/src/SMAPI.Web/wwwroot/Content/js/mods.js
+++ b/src/SMAPI.Web/wwwroot/Content/js/mods.js
@@ -11,7 +11,11 @@ smapi.modList = function (mods) {
soon: 0,
broken: 0,
abandoned: 0,
- invalid: 0
+ invalid: 0,
+ smapi3_unknown: 0,
+ smapi3_ok: 0,
+ smapi3_broken: 0,
+ smapi3_soon: 0
};
var data = {
mods: mods,
@@ -88,6 +92,28 @@ smapi.modList = function (mods) {
id: "show-custom",
value: true
}
+ },
+ "SMAPI 3.0": {
+ ok: {
+ label: "ready",
+ id: "show-smapi-3-ready",
+ value: true
+ },
+ soon: {
+ label: "soon",
+ id: "show-smapi-3-soon",
+ value: true
+ },
+ broken: {
+ label: "broken",
+ id: "show-smapi-3-broken",
+ value: true
+ },
+ unknown: {
+ label: "unknown",
+ id: "show-smapi-3-unknown",
+ value: true
+ }
}
},
search: ""
@@ -98,6 +124,9 @@ smapi.modList = function (mods) {
// set initial visibility
mod.Visible = true;
+ // set overall compatibility
+ mod.LatestCompatibility = mod.BetaCompatibility || mod.Compatibility;
+
// concatenate searchable text
mod.SearchableText = [mod.Name, mod.AlternateNames, mod.Author, mod.AlternateAuthors, mod.Compatibility.Summary, mod.BrokeIn];
if (mod.Compatibility.UnofficialVersion)
@@ -154,6 +183,7 @@ smapi.modList = function (mods) {
if (mod.Visible) {
stats.total++;
stats[this.getCompatibilityGroup(mod)]++;
+ stats["smapi3_" + mod.Smapi3Status]++;
}
}
},
@@ -175,10 +205,14 @@ smapi.modList = function (mods) {
return false;
// check status
- var status = (mod.BetaCompatibility || mod.Compatibility).Status;
+ var status = mod.LatestCompatibility.Status;
if (filters.status[status] && !filters.status[status].value)
return false;
+ // check SMAPI 3.0 compatibility
+ if (filters["SMAPI 3.0"][mod.Smapi3Status] && !filters["SMAPI 3.0"][mod.Smapi3Status].value)
+ return false;
+
// check download sites
var ignoreSites = [];
@@ -219,7 +253,7 @@ smapi.modList = function (mods) {
* @returns {string} The compatibility group (one of 'compatible', 'workaround', 'soon', 'broken', 'abandoned', or 'invalid').
*/
getCompatibilityGroup: function (mod) {
- var status = (mod.BetaCompatibility || mod.Compatibility).Status;
+ var status = mod.LatestCompatibility.Status;
switch (status) {
// obsolete
case "abandoned":
diff --git a/src/SMAPI/Constants.cs b/src/SMAPI/Constants.cs
index 959ab3c7..13c30032 100644
--- a/src/SMAPI/Constants.cs
+++ b/src/SMAPI/Constants.cs
@@ -29,7 +29,7 @@ namespace StardewModdingAPI
** Public
****/
/// <summary>SMAPI's current semantic version.</summary>
- public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("2.9.1");
+ public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("2.9.2");
/// <summary>The minimum supported version of Stardew Valley.</summary>
public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.3.32");
diff --git a/src/SMAPI/Events/ContentEvents.cs b/src/SMAPI/Events/ContentEvents.cs
index 99369cae..1a2dd526 100644
--- a/src/SMAPI/Events/ContentEvents.cs
+++ b/src/SMAPI/Events/ContentEvents.cs
@@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events
/// <summary>The core event manager.</summary>
private static EventManager EventManager;
- /// <summary>Manages deprecation warnings.</summary>
- private static DeprecationManager DeprecationManager;
-
/*********
** Events
@@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events
{
add
{
- ContentEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
ContentEvents.EventManager.Legacy_LocaleChanged.Add(value);
}
remove => ContentEvents.EventManager.Legacy_LocaleChanged.Remove(value);
@@ -39,11 +36,9 @@ namespace StardewModdingAPI.Events
*********/
/// <summary>Initialise the events.</summary>
/// <param name="eventManager">The core event manager.</param>
- /// <param name="deprecationManager">Manages deprecation warnings.</param>
- internal static void Init(EventManager eventManager, DeprecationManager deprecationManager)
+ internal static void Init(EventManager eventManager)
{
ContentEvents.EventManager = eventManager;
- ContentEvents.DeprecationManager = deprecationManager;
}
}
}
diff --git a/src/SMAPI/Events/ControlEvents.cs b/src/SMAPI/Events/ControlEvents.cs
index 5626ff81..be849f95 100644
--- a/src/SMAPI/Events/ControlEvents.cs
+++ b/src/SMAPI/Events/ControlEvents.cs
@@ -16,9 +16,6 @@ namespace StardewModdingAPI.Events
/// <summary>The core event manager.</summary>
private static EventManager EventManager;
- /// <summary>Manages deprecation warnings.</summary>
- private static DeprecationManager DeprecationManager;
-
/*********
** Events
@@ -28,7 +25,7 @@ namespace StardewModdingAPI.Events
{
add
{
- ControlEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
ControlEvents.EventManager.Legacy_KeyboardChanged.Add(value);
}
remove => ControlEvents.EventManager.Legacy_KeyboardChanged.Remove(value);
@@ -39,7 +36,7 @@ namespace StardewModdingAPI.Events
{
add
{
- ControlEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
ControlEvents.EventManager.Legacy_KeyPressed.Add(value);
}
remove => ControlEvents.EventManager.Legacy_KeyPressed.Remove(value);
@@ -50,7 +47,7 @@ namespace StardewModdingAPI.Events
{
add
{
- ControlEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
ControlEvents.EventManager.Legacy_KeyReleased.Add(value);
}
remove => ControlEvents.EventManager.Legacy_KeyReleased.Remove(value);
@@ -61,7 +58,7 @@ namespace StardewModdingAPI.Events
{
add
{
- ControlEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
ControlEvents.EventManager.Legacy_MouseChanged.Add(value);
}
remove => ControlEvents.EventManager.Legacy_MouseChanged.Remove(value);
@@ -72,7 +69,7 @@ namespace StardewModdingAPI.Events
{
add
{
- ControlEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
ControlEvents.EventManager.Legacy_ControllerButtonPressed.Add(value);
}
remove => ControlEvents.EventManager.Legacy_ControllerButtonPressed.Remove(value);
@@ -83,7 +80,7 @@ namespace StardewModdingAPI.Events
{
add
{
- ControlEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
ControlEvents.EventManager.Legacy_ControllerButtonReleased.Add(value);
}
remove => ControlEvents.EventManager.Legacy_ControllerButtonReleased.Remove(value);
@@ -94,7 +91,7 @@ namespace StardewModdingAPI.Events
{
add
{
- ControlEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
ControlEvents.EventManager.Legacy_ControllerTriggerPressed.Add(value);
}
remove => ControlEvents.EventManager.Legacy_ControllerTriggerPressed.Remove(value);
@@ -105,7 +102,7 @@ namespace StardewModdingAPI.Events
{
add
{
- ControlEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
ControlEvents.EventManager.Legacy_ControllerTriggerReleased.Add(value);
}
remove => ControlEvents.EventManager.Legacy_ControllerTriggerReleased.Remove(value);
@@ -117,11 +114,9 @@ namespace StardewModdingAPI.Events
*********/
/// <summary>Initialise the events.</summary>
/// <param name="eventManager">The core event manager.</param>
- /// <param name="deprecationManager">Manages deprecation warnings.</param>
- internal static void Init(EventManager eventManager, DeprecationManager deprecationManager)
+ internal static void Init(EventManager eventManager)
{
ControlEvents.EventManager = eventManager;
- ControlEvents.DeprecationManager = deprecationManager;
}
}
}
diff --git a/src/SMAPI/Events/GameEvents.cs b/src/SMAPI/Events/GameEvents.cs
index 39b77f99..6069a185 100644
--- a/src/SMAPI/Events/GameEvents.cs
+++ b/src/SMAPI/Events/GameEvents.cs
@@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events
/// <summary>The core event manager.</summary>
private static EventManager EventManager;
- /// <summary>Manages deprecation warnings.</summary>
- private static DeprecationManager DeprecationManager;
-
/*********
** Events
@@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GameEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GameEvents.EventManager.Legacy_UpdateTick.Add(value);
}
remove => GameEvents.EventManager.Legacy_UpdateTick.Remove(value);
@@ -38,7 +35,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GameEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GameEvents.EventManager.Legacy_SecondUpdateTick.Add(value);
}
remove => GameEvents.EventManager.Legacy_SecondUpdateTick.Remove(value);
@@ -49,7 +46,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GameEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GameEvents.EventManager.Legacy_FourthUpdateTick.Add(value);
}
remove => GameEvents.EventManager.Legacy_FourthUpdateTick.Remove(value);
@@ -60,7 +57,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GameEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GameEvents.EventManager.Legacy_EighthUpdateTick.Add(value);
}
remove => GameEvents.EventManager.Legacy_EighthUpdateTick.Remove(value);
@@ -71,7 +68,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GameEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GameEvents.EventManager.Legacy_QuarterSecondTick.Add(value);
}
remove => GameEvents.EventManager.Legacy_QuarterSecondTick.Remove(value);
@@ -82,7 +79,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GameEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GameEvents.EventManager.Legacy_HalfSecondTick.Add(value);
}
remove => GameEvents.EventManager.Legacy_HalfSecondTick.Remove(value);
@@ -93,7 +90,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GameEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GameEvents.EventManager.Legacy_OneSecondTick.Add(value);
}
remove => GameEvents.EventManager.Legacy_OneSecondTick.Remove(value);
@@ -104,7 +101,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GameEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GameEvents.EventManager.Legacy_FirstUpdateTick.Add(value);
}
remove => GameEvents.EventManager.Legacy_FirstUpdateTick.Remove(value);
@@ -116,11 +113,9 @@ namespace StardewModdingAPI.Events
*********/
/// <summary>Initialise the events.</summary>
/// <param name="eventManager">The core event manager.</param>
- /// <param name="deprecationManager">Manages deprecation warnings.</param>
- internal static void Init(EventManager eventManager, DeprecationManager deprecationManager)
+ internal static void Init(EventManager eventManager)
{
GameEvents.EventManager = eventManager;
- GameEvents.DeprecationManager = deprecationManager;
}
}
}
diff --git a/src/SMAPI/Events/GraphicsEvents.cs b/src/SMAPI/Events/GraphicsEvents.cs
index be29bf11..88a32c3f 100644
--- a/src/SMAPI/Events/GraphicsEvents.cs
+++ b/src/SMAPI/Events/GraphicsEvents.cs
@@ -15,9 +15,6 @@ namespace StardewModdingAPI.Events
/// <summary>The core event manager.</summary>
private static EventManager EventManager;
- /// <summary>Manages deprecation warnings.</summary>
- private static DeprecationManager DeprecationManager;
-
/*********
** Events
@@ -27,7 +24,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GraphicsEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GraphicsEvents.EventManager.Legacy_Resize.Add(value);
}
remove => GraphicsEvents.EventManager.Legacy_Resize.Remove(value);
@@ -41,7 +38,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GraphicsEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GraphicsEvents.EventManager.Legacy_OnPreRenderEvent.Add(value);
}
remove => GraphicsEvents.EventManager.Legacy_OnPreRenderEvent.Remove(value);
@@ -52,7 +49,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GraphicsEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GraphicsEvents.EventManager.Legacy_OnPostRenderEvent.Add(value);
}
remove => GraphicsEvents.EventManager.Legacy_OnPostRenderEvent.Remove(value);
@@ -66,7 +63,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GraphicsEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GraphicsEvents.EventManager.Legacy_OnPreRenderHudEvent.Add(value);
}
remove => GraphicsEvents.EventManager.Legacy_OnPreRenderHudEvent.Remove(value);
@@ -77,7 +74,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GraphicsEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GraphicsEvents.EventManager.Legacy_OnPostRenderHudEvent.Add(value);
}
remove => GraphicsEvents.EventManager.Legacy_OnPostRenderHudEvent.Remove(value);
@@ -91,7 +88,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GraphicsEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GraphicsEvents.EventManager.Legacy_OnPreRenderGuiEvent.Add(value);
}
remove => GraphicsEvents.EventManager.Legacy_OnPreRenderGuiEvent.Remove(value);
@@ -102,7 +99,7 @@ namespace StardewModdingAPI.Events
{
add
{
- GraphicsEvents.DeprecationManager.WarnForOldEvents();
+ SCore.DeprecationManager.WarnForOldEvents();
GraphicsEvents.EventManager.Legacy_OnPostRenderGuiEvent.Add(value);
}
remove => GraphicsEvents.EventManager.Legacy_OnPostRenderGuiEvent.Remove(value);
@@ -114,11 +111,9 @@ namespace StardewModdingAPI.Events
*********/
/// <summary>Initialise the events.</summary>
/// <param name="eventManager">The core event manager.</param>
- /// <param name="deprecationManager">Manages deprecation warnings.</param>
- internal static void Init(EventManager eventManager, DeprecationManager deprecationManager)
+ internal static void Init(EventManager eventManager)
{
GraphicsEvents.EventManager = eventManager;
- GraphicsEvents.DeprecationManager = deprecationManager;
}
}
}
diff --git a/src/SMAPI/Events/InputEvents.cs b/src/SMAPI/Events/InputEvents.cs
index 255b9c8a..900e53ea 100644
--- a/src/SMAPI/Events/InputEvents.cs
+++ b/