Unify AIUtils.BotDebug prefixes.
This commit is contained in:
committed by
abcdefg30
parent
b7c7eff2a2
commit
a4fc9fea3b
@@ -243,7 +243,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
if (!possibleRallyPoints.Any())
|
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;
|
return producer.Location;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
|
|
||||||
if (location == null)
|
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));
|
bot.QueueOrder(Order.CancelProduction(queue.Actor, currentBuilding.Item, 1));
|
||||||
failCount += failCount;
|
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)
|
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;
|
return power;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -246,7 +246,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
var refinery = GetProducibleBuilding(baseBuilder.Info.RefineryTypes, buildableThings);
|
var refinery = GetProducibleBuilding(baseBuilder.Info.RefineryTypes, buildableThings);
|
||||||
if (refinery != null && HasSufficientPowerForActor(refinery))
|
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;
|
return refinery;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
var production = GetProducibleBuilding(baseBuilder.Info.ProductionTypes, buildableThings);
|
var production = GetProducibleBuilding(baseBuilder.Info.ProductionTypes, buildableThings);
|
||||||
if (production != null && HasSufficientPowerForActor(production))
|
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;
|
return production;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,7 +282,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
var navalproduction = GetProducibleBuilding(baseBuilder.Info.NavalProductionTypes, buildableThings);
|
var navalproduction = GetProducibleBuilding(baseBuilder.Info.NavalProductionTypes, buildableThings);
|
||||||
if (navalproduction != null && HasSufficientPowerForActor(navalproduction))
|
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;
|
return navalproduction;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -299,7 +299,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
var silo = GetProducibleBuilding(baseBuilder.Info.SiloTypes, buildableThings);
|
var silo = GetProducibleBuilding(baseBuilder.Info.SiloTypes, buildableThings);
|
||||||
if (silo != null && HasSufficientPowerForActor(silo))
|
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;
|
return silo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
{
|
{
|
||||||
if (e.DamageState > DamageState.Light && e.PreviousDamageState <= DamageState.Light && !rb.RepairActive)
|
if (e.DamageState > DamageState.Light && e.PreviousDamageState <= DamageState.Light && !rb.RepairActive)
|
||||||
{
|
{
|
||||||
AIUtils.BotDebug("Bot noticed damage {0} {1}->{2}, repairing.",
|
AIUtils.BotDebug("{0} noticed damage {1} {2}->{3}, repairing.",
|
||||||
self, e.PreviousDamageState, e.DamageState);
|
self.Owner, self, e.PreviousDamageState, e.DamageState);
|
||||||
bot.QueueOrder(new Order("RepairBuilding", self.Owner.PlayerActor, Target.FromActor(self), false));
|
bot.QueueOrder(new Order("RepairBuilding", self.Owner.PlayerActor, Target.FromActor(self), false));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,14 +84,14 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
var powerDecision = powerDecisions[sp.Info.OrderName];
|
var powerDecision = powerDecisions[sp.Info.OrderName];
|
||||||
if (powerDecision == null)
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var attackLocation = FindCoarseAttackLocationToSupportPower(sp);
|
var attackLocation = FindCoarseAttackLocationToSupportPower(sp);
|
||||||
if (attackLocation == null)
|
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);
|
waitingPowers[sp] += powerDecision.GetNextScanTime(world);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
@@ -101,14 +101,14 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
attackLocation = FindFineAttackLocationToSupportPower(sp, (CPos)attackLocation);
|
attackLocation = FindFineAttackLocationToSupportPower(sp, (CPos)attackLocation);
|
||||||
if (attackLocation == null)
|
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);
|
waitingPowers[sp] += powerDecision.GetNextScanTime(world);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Valid target found, delay by a few ticks to avoid rescanning before power fires via order
|
// 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;
|
waitingPowers[sp] += 10;
|
||||||
bot.QueueOrder(new Order(sp.Key, supportPowerManager.Self, Target.FromCell(world, attackLocation.Value), false) { SuppressVisualFeedback = true });
|
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];
|
var powerDecision = powerDecisions[readyPower.Info.OrderName];
|
||||||
if (powerDecision == null)
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
var powerDecision = powerDecisions[readyPower.Info.OrderName];
|
var powerDecision = powerDecisions[readyPower.Info.OrderName];
|
||||||
if (powerDecision == null)
|
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;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
if (queue != null)
|
if (queue != null)
|
||||||
{
|
{
|
||||||
bot.QueueOrder(Order.StartProduction(queue.Actor, name, 1));
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user