Add beta warning to legacy update path

This commit is contained in:
reaperrr
2018-07-04 22:11:57 +02:00
committed by Paul Chote
parent 27765f6448
commit 4c55e820d6
3 changed files with 47 additions and 0 deletions

View File

@@ -606,6 +606,7 @@
<Compile Include="UpdateRules\Rules\SplitGateFromBuilding.cs" />
<Compile Include="UpdateRules\Rules\RenameBurstDelay.cs" />
<Compile Include="UpdateRules\Rules\WarnAboutInfiltrateForTypes.cs" />
<Compile Include="UpdateRules\Rules\LegacyBetaWarning.cs" />
<Compile Include="UtilityCommands\CheckYaml.cs" />
<Compile Include="UtilityCommands\ConvertPngToShpCommand.cs" />
<Compile Include="UtilityCommands\ConvertSpriteToPngCommand.cs" />

View File

@@ -0,0 +1,45 @@
#region Copyright & License Information
/*
* Copyright 2007-2018 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
namespace OpenRA.Mods.Common.UpdateRules.Rules
{
public class LegacyBetaWarning : UpdateRule
{
public override string Name { get { return "Update path from 20171014 to 20180307 is in beta state"; } }
public override string Description
{
get
{
return "Due to time constraints and the legacy status of the included rules,\n" +
"the update path to 20180307 is considered a beta path.\n" +
"If you encounter any issues, please report them on GitHub or our IRC channel.";
}
}
bool displayed;
public override IEnumerable<string> AfterUpdate(ModData modData)
{
var message = "Due to time constraints and the legacy status of the included rules,\n" +
"the update path to 20180307 is considered a beta path.\n" +
"If you encounter any issues, please report them on GitHub or our IRC channel.";
if (!displayed)
yield return message;
displayed = true;
}
}
}

View File

@@ -36,6 +36,7 @@ namespace OpenRA.Mods.Common.UpdateRules
{
new UpdatePath("release-20171014", "release-20180218", new UpdateRule[]
{
new LegacyBetaWarning(),
new RemoveMobileOnRails(),
new AircraftCanHoverGeneralization(),
new AddNukeLaunchAnimation(),