PrimaryBuilding is no longer necessary in cnc; remove cruft from BuildPaletteWidget
This commit is contained in:
@@ -29,14 +29,15 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
List<ProductionQueue> visibleTabs = new List<ProductionQueue>();
|
||||
|
||||
bool paletteOpen = false;
|
||||
Dictionary<string, string[]> tabImageNames;
|
||||
Dictionary<string, Sprite> iconSprites;
|
||||
|
||||
static float2 paletteOpenOrigin = new float2(Game.viewport.Width - 215, 280);
|
||||
static float2 paletteClosedOrigin = new float2(Game.viewport.Width - 16, 280);
|
||||
static float2 paletteOrigin = paletteClosedOrigin;
|
||||
const int paletteAnimationLength = 7;
|
||||
int paletteAnimationFrame = 0;
|
||||
bool paletteAnimating = false;
|
||||
|
||||
List<Pair<Rectangle, Action<MouseInput>>> buttons = new List<Pair<Rectangle,Action<MouseInput>>>();
|
||||
List<Pair<Rectangle, Action<MouseInput>>> tabs = new List<Pair<Rectangle, Action<MouseInput>>>();
|
||||
Animation cantBuild;
|
||||
@@ -63,15 +64,7 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
.ToDictionary(
|
||||
u => u.Name,
|
||||
u => SpriteSheetBuilder.LoadAllSprites(u.Traits.Get<TooltipInfo>().Icon ?? (u.Name + "icon"))[0]);
|
||||
|
||||
var groups = Rules.Categories();
|
||||
|
||||
tabImageNames = groups.Select(
|
||||
(g, i) => Pair.New(g,
|
||||
OpenRA.Graphics.Util.MakeArray(3,
|
||||
n => i.ToString())))
|
||||
.ToDictionary(a => a.First, a => a.Second);
|
||||
|
||||
IsVisible = () => { return CurrentQueue != null || (CurrentQueue == null && !paletteOpen); };
|
||||
}
|
||||
|
||||
@@ -337,7 +330,6 @@ namespace OpenRA.Mods.RA.Widgets
|
||||
|
||||
void HandleBuildPalette( World world, string item, bool isLmb )
|
||||
{
|
||||
var player = world.LocalPlayer;
|
||||
var unit = Rules.Info[item];
|
||||
var eva = world.WorldActor.Info.Traits.Get<EvaAlertsInfo>();
|
||||
var producing = CurrentQueue.AllItems().FirstOrDefault( a => a.Item == item );
|
||||
|
||||
@@ -181,7 +181,6 @@ PYLE:
|
||||
Produces: Infantry
|
||||
SpawnOffsets: -10,2, 7,7
|
||||
ExitCells: 0,1, 1,1
|
||||
PrimaryBuilding:
|
||||
ProductionQueue@Vehicle:
|
||||
Type: Infantry
|
||||
BuildSpeed: .4
|
||||
@@ -215,7 +214,6 @@ HAND:
|
||||
Produces: Infantry
|
||||
SpawnOffsets: 12,24
|
||||
ExitCells:1,2
|
||||
PrimaryBuilding:
|
||||
ProductionQueue@Infantry:
|
||||
Type: Infantry
|
||||
BuildSpeed: .4
|
||||
@@ -251,7 +249,6 @@ AFLD:
|
||||
Produces: Vehicle
|
||||
SpawnOffsets: -24,0
|
||||
ExitCells:3,1
|
||||
PrimaryBuilding:
|
||||
ProductionQueue@Vehicle:
|
||||
Type: Vehicle
|
||||
BuildSpeed: .4
|
||||
@@ -288,7 +285,6 @@ WEAP:
|
||||
Produces: Vehicle
|
||||
SpawnOffsets: -8,-8
|
||||
ExitCells: 0,2
|
||||
PrimaryBuilding:
|
||||
ProductionQueue@Vehicle:
|
||||
Type: Vehicle
|
||||
BuildSpeed: .4
|
||||
@@ -401,7 +397,6 @@ HPAD:
|
||||
SpawnOffsets: 0,-6
|
||||
ExitCells: 0,0
|
||||
Produces: Plane
|
||||
PrimaryBuilding:
|
||||
BelowUnits:
|
||||
Reservable:
|
||||
RepairsUnits:
|
||||
|
||||
Reference in New Issue
Block a user