Deprecation notice for based meme removal

See commit 261ac08985
This commit is contained in:
Jordan Dominion
2023-08-15 18:31:56 -04:00
parent 97659bc01d
commit 29f5e87773
6 changed files with 8 additions and 7 deletions
+2 -2
View File
@@ -5,9 +5,9 @@
<PropertyGroup>
<TgsCoreVersion>5.14.0</TgsCoreVersion>
<TgsConfigVersion>4.7.1</TgsConfigVersion>
<TgsApiVersion>9.11.1</TgsApiVersion>
<TgsApiVersion>9.12.0</TgsApiVersion>
<TgsCommonLibraryVersion>6.0.0</TgsCommonLibraryVersion>
<TgsApiLibraryVersion>11.0.1</TgsApiLibraryVersion>
<TgsApiLibraryVersion>11.1.0</TgsApiLibraryVersion>
<TgsClientVersion>12.0.1</TgsClientVersion>
<TgsDmapiVersion>6.5.2</TgsDmapiVersion>
<TgsInteropVersion>5.6.1</TgsInteropVersion>
@@ -22,6 +22,7 @@ namespace Tgstation.Server.Api.Models
/// <summary>
/// <see cref="bool"/> to enable based mode. Will auto reply with a youtube link to a video that says "based on the hardware that's installed in it" to anyone saying 'based on what?' case-insensitive.
/// </summary>
[Obsolete("Will be removed in next major TGS version")]
public bool BasedMeme { get; set; }
/// <summary>
@@ -39,7 +40,6 @@ namespace Tgstation.Server.Api.Models
/// </summary>
public DiscordConnectionStringBuilder()
{
BasedMeme = true;
}
/// <summary>
@@ -60,9 +60,10 @@ namespace Tgstation.Server.Api.Models
DMOutputDisplay = dMOutputDisplayType;
if (splits.Length > 2 && Int32.TryParse(splits[2], out Int32 basedMeme))
#pragma warning disable CS0618 // Type or member is obsolete
BasedMeme = Convert.ToBoolean(basedMeme);
else
BasedMeme = true; // oranges said this needs to be true by default :pensive:
BasedMeme = false; // oranges said this needs to be true by default :pensive:
if (splits.Length > 3 && Int32.TryParse(splits[3], out Int32 branding))
DeploymentBranding = Convert.ToBoolean(branding);
@@ -72,5 +73,6 @@ namespace Tgstation.Server.Api.Models
/// <inheritdoc />
public override string ToString() => $"{BotToken};{(int)DMOutputDisplay};{Convert.ToInt32(BasedMeme)};{Convert.ToInt32(DeploymentBranding)}";
#pragma warning restore CS0618 // Type or member is obsolete
}
}
@@ -199,7 +199,9 @@ namespace Tgstation.Server.Host.Components.Chat.Providers
var csb = new DiscordConnectionStringBuilder(chatBot.ConnectionString);
var botToken = csb.BotToken;
#pragma warning disable CS0618 // Type or member is obsolete
basedMeme = csb.BasedMeme;
#pragma warning restore CS0618 // Type or member is obsolete
outputDisplayType = csb.DMOutputDisplay;
deploymentBranding = csb.DeploymentBranding;
@@ -149,7 +149,6 @@ namespace Tgstation.Server.Tests.Live.Instance
// needs to just be valid
connectionString = new DiscordConnectionStringBuilder
{
BasedMeme = true,
BotToken = "some_token",
DeploymentBranding = true,
DMOutputDisplay = DiscordDMOutputDisplayType.Never,
@@ -97,7 +97,6 @@ namespace Tgstation.Server.Tests.Live.Instance
// needs to just be valid
connectionString = new DiscordConnectionStringBuilder
{
BasedMeme = true,
BotToken = "some_token",
DeploymentBranding = true,
DMOutputDisplay = DiscordDMOutputDisplayType.Always,
@@ -168,7 +168,6 @@ static class Program
var discordSetupInfo = new DiscordSetupInfo(providerInfo);
csb = new DiscordConnectionStringBuilder
{
BasedMeme = false,
DMOutputDisplay = DiscordDMOutputDisplayType.Always,
BotToken = discordSetupInfo.BotToken
};