Unify the code style across crate actions.

This commit is contained in:
Paul Chote
2014-09-12 18:26:08 +12:00
parent 8ec8f82178
commit e95974153d
12 changed files with 129 additions and 93 deletions

View File

@@ -24,20 +24,23 @@ namespace OpenRA.Mods.RA.Crates
class SupportPowerCrateAction : CrateAction
{
SupportPowerCrateActionInfo Info;
SupportPowerCrateActionInfo info;
public SupportPowerCrateAction(Actor self, SupportPowerCrateActionInfo info)
: base(self, info) { Info = info; }
: base(self, info)
{
this.info = info;
}
// The free unit crate requires same race and the actor needs to be mobile.
// We want neither of these properties for crate power proxies.
public override void Activate(Actor collector)
{
base.Activate(collector);
collector.World.AddFrameEndTask(w => w.CreateActor(Info.Proxy, new TypeDictionary
collector.World.AddFrameEndTask(w => w.CreateActor(info.Proxy, new TypeDictionary
{
new OwnerInit(collector.Owner)
}));
base.Activate(collector);
}
}
}