Retire the release-20191117 UpdatePath
This commit is contained in:
committed by
Matthias Mailänder
parent
d660ce9c47
commit
15c2800601
@@ -1,44 +0,0 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2021 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.Collections.Generic;
|
||||
using OpenRA.Mods.Common.Traits;
|
||||
|
||||
namespace OpenRA.Mods.Common.UpdateRules.Rules
|
||||
{
|
||||
public class ReplaceAttackTypeStrafe : UpdateRule
|
||||
{
|
||||
public override string Name => "Replaced AttackAircraft AttackType: Strafe logic.";
|
||||
|
||||
public override string Description =>
|
||||
"The AttackType: Strafe behaviour on AttackAircraft has been renamed to Default,\n"
|
||||
+ "and AttackTurnDelay has been removed. A new AttackType: Strafe has been added, with a\n"
|
||||
+ "new StrafeRunLength parameter, designed for use with the FirstBurstTargetOffset and\n"
|
||||
+ "FollowingBurstTargetOffset weapon parameters.";
|
||||
|
||||
public override IEnumerable<string> UpdateActorNode(ModData modData, MiniYamlNode actorNode)
|
||||
{
|
||||
var aircraft = actorNode.LastChildMatching("Aircraft");
|
||||
if (aircraft != null)
|
||||
{
|
||||
var attackAircraft = actorNode.LastChildMatching("AttackAircraft");
|
||||
if (attackAircraft == null)
|
||||
yield break;
|
||||
|
||||
var attackType = attackAircraft.LastChildMatching("AttackType");
|
||||
if (attackType != null && attackType.NodeValue<AirAttackType>() == AirAttackType.Strafe)
|
||||
attackAircraft.RemoveNode(attackType);
|
||||
|
||||
attackAircraft.RemoveNodes("AttackTurnDelay");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user