Remove unused parameters.

This commit is contained in:
Matthias Mailänder
2022-03-13 12:02:52 +01:00
committed by abcdefg30
parent ea243b8558
commit 0e7ad43425
205 changed files with 451 additions and 455 deletions

View File

@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Attach this to an actor (usually a building) to let it produce units or construct buildings.",
"If one builds another actor of this type, he will get a separate queue to create two actors",
"at the same time. Will only work together with the Production: trait.")]
public class ProductionQueueInfo : TraitInfo
public class ProductionQueueInfo : TraitInfo, IRulesetLoaded
{
[FieldLoader.Require]
[Desc("What kind of production will be added (e.g. Building, Infantry, Vehicle, ...)")]
@@ -94,7 +94,7 @@ namespace OpenRA.Mods.Common.Traits
"The filename of the audio is defined per faction in notifications.yaml.")]
public readonly string CancelledAudio = null;
public override object Create(ActorInitializer init) { return new ProductionQueue(init, init.Self.Owner.PlayerActor, this); }
public override object Create(ActorInitializer init) { return new ProductionQueue(init, this); }
public void RulesetLoaded(Ruleset rules, ActorInfo ai)
{
@@ -132,7 +132,7 @@ namespace OpenRA.Mods.Common.Traits
[Sync]
public bool IsValidFaction { get; private set; }
public ProductionQueue(ActorInitializer init, Actor playerActor, ProductionQueueInfo info)
public ProductionQueue(ActorInitializer init, ProductionQueueInfo info)
{
self = init.Self;
Info = info;
@@ -153,7 +153,7 @@ namespace OpenRA.Mods.Common.Traits
techTree = self.Owner.PlayerActor.Trait<TechTree>();
productionTraits = self.TraitsImplementing<Production>().Where(p => p.Info.Produces.Contains(Info.Type)).ToArray();
CacheProducibles(self.Owner.PlayerActor);
CacheProducibles();
}
protected void ClearQueue()
@@ -181,7 +181,7 @@ namespace OpenRA.Mods.Common.Traits
// Regenerate the producibles and tech tree state
oldOwner.PlayerActor.Trait<TechTree>().Remove(this);
CacheProducibles(newOwner.PlayerActor);
CacheProducibles();
techTree.Update();
}
@@ -193,7 +193,7 @@ namespace OpenRA.Mods.Common.Traits
void INotifyTransform.OnTransform(Actor self) { }
void INotifyTransform.AfterTransform(Actor self) { }
void CacheProducibles(Actor playerActor)
void CacheProducibles()
{
Producible.Clear();
if (!Enabled)