ContainsCrate is redundant to LeavesHusk
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2014 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. For more information,
|
||||
* see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.Primitives;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Leave a \"crate\" actor after destruction.")]
|
||||
public class ContainsCrateInfo : TraitInfo<ContainsCrate> { }
|
||||
|
||||
public class ContainsCrate : INotifyKilled
|
||||
{
|
||||
public void Killed(Actor self, AttackInfo e)
|
||||
{
|
||||
self.World.AddFrameEndTask(w => w.CreateActor("crate", new TypeDictionary
|
||||
{
|
||||
new LocationInit(self.Location),
|
||||
new OwnerInit(self.World.WorldActor.Owner),
|
||||
}));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -191,7 +191,6 @@
|
||||
<Compile Include="Cloak.cs" />
|
||||
<Compile Include="Combat.cs" />
|
||||
<Compile Include="ConquestVictoryConditions.cs" />
|
||||
<Compile Include="ContainsCrate.cs" />
|
||||
<Compile Include="Crate.cs" />
|
||||
<Compile Include="CrateAction.cs" />
|
||||
<Compile Include="CrateSpawner.cs" />
|
||||
|
||||
@@ -354,6 +354,16 @@ namespace OpenRA.Utility
|
||||
}
|
||||
}
|
||||
|
||||
if (engineVersion < 20140803)
|
||||
{
|
||||
// ContainsCrate was removed (use LeavesHusk instead)
|
||||
if (depth == 1 && node.Key == "ContainsCrate")
|
||||
{
|
||||
node.Key = "LeavesHusk";
|
||||
node.Value.Nodes.Add(new MiniYamlNode("HuskActor", new MiniYaml("crate")));
|
||||
}
|
||||
}
|
||||
|
||||
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user