Category dies in a fire
This commit is contained in:
@@ -182,7 +182,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
//don't select harvesters.
|
||||
var newUnits = self.World.Queries.OwnedBy[p]
|
||||
.Where(a => ((a.Info.Category == "Infantry" || a.Info.Category == "Vehicle")
|
||||
.Where(a => (a.Info.Traits.Contains<IMove>()
|
||||
&& a.Info != Rules.Info["harv"]
|
||||
&& !activeUnits.Contains(a))).ToArray();
|
||||
|
||||
@@ -198,7 +198,11 @@ namespace OpenRA.Mods.RA
|
||||
if (unitsHangingAroundTheBase.Count > 5)
|
||||
{
|
||||
Game.Debug("Launch an attack.");
|
||||
|
||||
// Todo: We have a trait which holds player/spawn info (MPStartLocationsInfo) - use it
|
||||
int2[] spawnPoints = Game.world.Map.SpawnPoints.ToArray();
|
||||
|
||||
|
||||
// At the start of the game, all you can do is investigate each spawn point
|
||||
// until you learn where some other players are.
|
||||
// this sometimes sends an attack to the bot's own spawn point,
|
||||
@@ -214,8 +218,7 @@ namespace OpenRA.Mods.RA
|
||||
private void SetRallyPointsForNewProductionBuildings(Actor self)
|
||||
{
|
||||
var newProdBuildings = self.World.Queries.OwnedBy[p]
|
||||
.Where(a => (a.Info.Category == "Building"
|
||||
&& a.TraitOrDefault<RallyPoint>() != null
|
||||
.Where(a => (a.TraitOrDefault<RallyPoint>() != null
|
||||
&& !activeProductionBuildings.Contains(a))).ToArray();
|
||||
|
||||
foreach (var a in newProdBuildings)
|
||||
|
||||
@@ -58,9 +58,9 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
ready = new Animation("pips");
|
||||
ready.PlayRepeating("ready");
|
||||
clock = new Animation("clock");
|
||||
|
||||
|
||||
iconSprites = Rules.Info.Values
|
||||
.Where(u => u.Traits.Contains<BuildableInfo>())
|
||||
.Where(u => u.Traits.Contains<BuildableInfo>() && u.Name[0] != '^' )
|
||||
.ToDictionary(
|
||||
u => u.Name,
|
||||
u => SpriteSheetBuilder.LoadAllSprites(u.Traits.Get<TooltipInfo>().Icon ?? (u.Name + "icon"))[0]);
|
||||
@@ -219,7 +219,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
var drawPos = new float2(rect.Location);
|
||||
WidgetUtils.DrawSHP(iconSprites[item.Name], drawPos);
|
||||
|
||||
var firstOfThis = queue.AllItems().FirstOrDefault(a => a.Item == item.Name);
|
||||
var firstOfThis = queue.AllQueued().FirstOrDefault(a => a.Item == item.Name);
|
||||
|
||||
if (rect.Contains(Viewport.LastMousePos.ToPoint()))
|
||||
tooltipItem = item.Name;
|
||||
@@ -245,7 +245,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
overlayBits.Add(Pair.New(ready.Image, overlayPos));
|
||||
}
|
||||
|
||||
var repeats = queue.AllItems().Count(a => a.Item == item.Name);
|
||||
var repeats = queue.AllQueued().Count(a => a.Item == item.Name);
|
||||
if (repeats > 1 || queue.CurrentItem() != firstOfThis)
|
||||
{
|
||||
var offset = -22;
|
||||
@@ -332,7 +332,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
{
|
||||
var unit = Rules.Info[item];
|
||||
var eva = world.WorldActor.Info.Traits.Get<EvaAlertsInfo>();
|
||||
var producing = CurrentQueue.AllItems().FirstOrDefault( a => a.Item == item );
|
||||
var producing = CurrentQueue.AllQueued().FirstOrDefault( a => a.Item == item );
|
||||
|
||||
if (isLmb)
|
||||
{
|
||||
@@ -411,7 +411,6 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
|
||||
if (rect.Contains(Viewport.LastMousePos.ToPoint()))
|
||||
{
|
||||
//var text = CategoryNameRemaps.ContainsKey(groupName) ? CategoryNameRemaps[groupName] : groupName;
|
||||
var text = queue.Info.Type;
|
||||
var sz = Game.Renderer.BoldFont.Measure(text);
|
||||
WidgetUtils.DrawPanelPartial("dialog4",
|
||||
|
||||
Reference in New Issue
Block a user