Unify AIUtils.BotDebug prefixes.

This commit is contained in:
Matthias Mailänder
2020-07-19 23:09:27 +02:00
committed by abcdefg30
parent b7c7eff2a2
commit a4fc9fea3b
5 changed files with 16 additions and 16 deletions

View File

@@ -243,7 +243,7 @@ namespace OpenRA.Mods.Common.Traits
if (!possibleRallyPoints.Any())
{
AIUtils.BotDebug("Bot Bug: No possible rallypoint near {0}", producer.Location);
AIUtils.BotDebug("{0} has no possible rallypoint near {1}", producer.Owner, producer.Location);
return producer.Location;
}

View File

@@ -164,7 +164,7 @@ namespace OpenRA.Mods.Common.Traits
if (location == null)
{
AIUtils.BotDebug("AI: {0} has nowhere to place {1}".F(player, currentBuilding.Item));
AIUtils.BotDebug("{0} has nowhere to place {1}".F(player, currentBuilding.Item));
bot.QueueOrder(Order.CancelProduction(queue.Actor, currentBuilding.Item, 1));
failCount += failCount;
@@ -235,7 +235,7 @@ namespace OpenRA.Mods.Common.Traits
{
if (power != null && power.TraitInfos<PowerInfo>().Where(i => i.EnabledByDefault).Sum(p => p.Amount) > 0)
{
AIUtils.BotDebug("AI: {0} decided to build {1}: Priority override (low power)", queue.Actor.Owner, power.Name);
AIUtils.BotDebug("{0} decided to build {1}: Priority override (low power)", queue.Actor.Owner, power.Name);
return power;
}
}
@@ -246,7 +246,7 @@ namespace OpenRA.Mods.Common.Traits
var refinery = GetProducibleBuilding(baseBuilder.Info.RefineryTypes, buildableThings);
if (refinery != null && HasSufficientPowerForActor(refinery))
{
AIUtils.BotDebug("AI: {0} decided to build {1}: Priority override (refinery)", queue.Actor.Owner, refinery.Name);
AIUtils.BotDebug("{0} decided to build {1}: Priority override (refinery)", queue.Actor.Owner, refinery.Name);
return refinery;
}
@@ -263,7 +263,7 @@ namespace OpenRA.Mods.Common.Traits
var production = GetProducibleBuilding(baseBuilder.Info.ProductionTypes, buildableThings);
if (production != null && HasSufficientPowerForActor(production))
{
AIUtils.BotDebug("AI: {0} decided to build {1}: Priority override (production)", queue.Actor.Owner, production.Name);
AIUtils.BotDebug("{0} decided to build {1}: Priority override (production)", queue.Actor.Owner, production.Name);
return production;
}
@@ -282,7 +282,7 @@ namespace OpenRA.Mods.Common.Traits
var navalproduction = GetProducibleBuilding(baseBuilder.Info.NavalProductionTypes, buildableThings);
if (navalproduction != null && HasSufficientPowerForActor(navalproduction))
{
AIUtils.BotDebug("AI: {0} decided to build {1}: Priority override (navalproduction)", queue.Actor.Owner, navalproduction.Name);
AIUtils.BotDebug("{0} decided to build {1}: Priority override (navalproduction)", queue.Actor.Owner, navalproduction.Name);
return navalproduction;
}
@@ -299,7 +299,7 @@ namespace OpenRA.Mods.Common.Traits
var silo = GetProducibleBuilding(baseBuilder.Info.SiloTypes, buildableThings);
if (silo != null && HasSufficientPowerForActor(silo))
{
AIUtils.BotDebug("AI: {0} decided to build {1}: Priority override (silo)", queue.Actor.Owner, silo.Name);
AIUtils.BotDebug("{0} decided to build {1}: Priority override (silo)", queue.Actor.Owner, silo.Name);
return silo;
}

View File

@@ -37,8 +37,8 @@ namespace OpenRA.Mods.Common.Traits
{
if (e.DamageState > DamageState.Light && e.PreviousDamageState <= DamageState.Light && !rb.RepairActive)
{
AIUtils.BotDebug("Bot noticed damage {0} {1}->{2}, repairing.",
self, e.PreviousDamageState, e.DamageState);
AIUtils.BotDebug("{0} noticed damage {1} {2}->{3}, repairing.",
self.Owner, self, e.PreviousDamageState, e.DamageState);
bot.QueueOrder(new Order("RepairBuilding", self.Owner.PlayerActor, Target.FromActor(self), false));
}
}

View File

@@ -84,14 +84,14 @@ namespace OpenRA.Mods.Common.Traits
var powerDecision = powerDecisions[sp.Info.OrderName];
if (powerDecision == null)
{
AIUtils.BotDebug("Bot Bug: FindAttackLocationToSupportPower, couldn't find powerDecision for {0}", sp.Info.OrderName);
AIUtils.BotDebug("FindAttackLocationToSupportPower, {0} couldn't find powerDecision for {1}", player.PlayerName, sp.Info.OrderName);
continue;
}
var attackLocation = FindCoarseAttackLocationToSupportPower(sp);
if (attackLocation == null)
{
AIUtils.BotDebug("AI: {1} can't find suitable coarse attack location for support power {0}. Delaying rescan.", sp.Info.OrderName, player.PlayerName);
AIUtils.BotDebug("{1} can't find suitable coarse attack location for support power {0}. Delaying rescan.", sp.Info.OrderName, player.PlayerName);
waitingPowers[sp] += powerDecision.GetNextScanTime(world);
continue;
@@ -101,14 +101,14 @@ namespace OpenRA.Mods.Common.Traits
attackLocation = FindFineAttackLocationToSupportPower(sp, (CPos)attackLocation);
if (attackLocation == null)
{
AIUtils.BotDebug("AI: {1} can't find suitable final attack location for support power {0}. Delaying rescan.", sp.Info.OrderName, player.PlayerName);
AIUtils.BotDebug("{1} can't find suitable final attack location for support power {0}. Delaying rescan.", sp.Info.OrderName, player.PlayerName);
waitingPowers[sp] += powerDecision.GetNextScanTime(world);
continue;
}
// Valid target found, delay by a few ticks to avoid rescanning before power fires via order
AIUtils.BotDebug("AI: {2} found new target location {0} for support power {1}.", attackLocation, sp.Info.OrderName, player.PlayerName);
AIUtils.BotDebug("{2} found new target location {0} for support power {1}.", attackLocation, sp.Info.OrderName, player.PlayerName);
waitingPowers[sp] += 10;
bot.QueueOrder(new Order(sp.Key, supportPowerManager.Self, Target.FromCell(world, attackLocation.Value), false) { SuppressVisualFeedback = true });
}
@@ -130,7 +130,7 @@ namespace OpenRA.Mods.Common.Traits
var powerDecision = powerDecisions[readyPower.Info.OrderName];
if (powerDecision == null)
{
AIUtils.BotDebug("Bot Bug: FindAttackLocationToSupportPower, couldn't find powerDecision for {0}", readyPower.Info.OrderName);
AIUtils.BotDebug("FindAttackLocationToSupportPower, {0} couldn't find powerDecision for {1}", player.PlayerName, readyPower.Info.OrderName);
return null;
}
@@ -170,7 +170,7 @@ namespace OpenRA.Mods.Common.Traits
var powerDecision = powerDecisions[readyPower.Info.OrderName];
if (powerDecision == null)
{
AIUtils.BotDebug("Bot Bug: FindAttackLocationToSupportPower, couldn't find powerDecision for {0}", readyPower.Info.OrderName);
AIUtils.BotDebug("FindAttackLocationToSupportPower, {0} couldn't find powerDecision for {1}", player.PlayerName, readyPower.Info.OrderName);
return null;
}

View File

@@ -155,7 +155,7 @@ namespace OpenRA.Mods.Common.Traits
if (queue != null)
{
bot.QueueOrder(Order.StartProduction(queue.Actor, name, 1));
AIUtils.BotDebug("AI: {0} decided to build {1} (external request)", queue.Actor.Owner, name);
AIUtils.BotDebug("{0} decided to build {1} (external request)", queue.Actor.Owner, name);
}
}