Remove unused parameters.
This commit is contained in:
committed by
abcdefg30
parent
ea243b8558
commit
0e7ad43425
@@ -143,7 +143,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (plugInfo != null)
|
||||
{
|
||||
var possibleBuilding = world.ActorsWithTrait<Pluggable>().FirstOrDefault(a =>
|
||||
a.Actor.Owner == player && a.Trait.AcceptsPlug(a.Actor, plugInfo.Type));
|
||||
a.Actor.Owner == player && a.Trait.AcceptsPlug(plugInfo.Type));
|
||||
|
||||
if (possibleBuilding.Actor != null)
|
||||
{
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
|
||||
// IsValid check filters out Frozen Actors that have not initialized their Owner
|
||||
foreach (var scrutinized in checkFrozen)
|
||||
answer += consideration.GetAttractiveness(scrutinized, firedBy.RelationshipWith(scrutinized.Owner), firedBy);
|
||||
answer += consideration.GetAttractiveness(scrutinized, firedBy.RelationshipWith(scrutinized.Owner));
|
||||
}
|
||||
|
||||
return answer;
|
||||
@@ -105,7 +105,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
foreach (var consideration in Considerations)
|
||||
foreach (var scrutinized in frozenActors)
|
||||
if (scrutinized.IsValid && scrutinized.Visible)
|
||||
answer += consideration.GetAttractiveness(scrutinized, firedBy.RelationshipWith(scrutinized.Owner), firedBy);
|
||||
answer += consideration.GetAttractiveness(scrutinized, firedBy.RelationshipWith(scrutinized.Owner));
|
||||
|
||||
return answer;
|
||||
}
|
||||
@@ -174,7 +174,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int GetAttractiveness(FrozenActor fa, PlayerRelationship stance, Player firedBy)
|
||||
public int GetAttractiveness(FrozenActor fa, PlayerRelationship stance)
|
||||
{
|
||||
if (stance != Against)
|
||||
return 0;
|
||||
|
||||
@@ -16,12 +16,12 @@ namespace OpenRA.Mods.Common.Traits
|
||||
[Desc("Manages AI repairing base buildings.")]
|
||||
public class BuildingRepairBotModuleInfo : ConditionalTraitInfo
|
||||
{
|
||||
public override object Create(ActorInitializer init) { return new BuildingRepairBotModule(init.Self, this); }
|
||||
public override object Create(ActorInitializer init) { return new BuildingRepairBotModule(this); }
|
||||
}
|
||||
|
||||
public class BuildingRepairBotModule : ConditionalTrait<BuildingRepairBotModuleInfo>, IBotRespondToAttack
|
||||
{
|
||||
public BuildingRepairBotModule(Actor self, BuildingRepairBotModuleInfo info)
|
||||
public BuildingRepairBotModule(BuildingRepairBotModuleInfo info)
|
||||
: base(info) { }
|
||||
|
||||
void IBotRespondToAttack.RespondToAttack(IBot bot, Actor self, AttackInfo e)
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
Target FindNextResource(Actor actor, HarvesterTraitWrapper harv)
|
||||
{
|
||||
Func<CPos, bool> isValidResource = cell =>
|
||||
harv.Harvester.CanHarvestCell(actor, cell) &&
|
||||
harv.Harvester.CanHarvestCell(cell) &&
|
||||
claimLayer.CanClaimCell(actor, cell);
|
||||
|
||||
List<CPos> path;
|
||||
|
||||
Reference in New Issue
Block a user