Skip to content

[New Feature] Screen/Map select buildings #362

@ghost

Description

Description:

One of RA2/YR best features is selecting screen/map (T), but this doesn't work on buildings. The only way to group buildings now is to shift-click each one and assign them to a number like 0.

When you have lots of war factories and barracks, grouping becomes difficult. When a factory is busy releasing a unit and a new unit is ready, the next free factory will release it, so grouping is very useful to change the relay point of all factories during an assault (like somewhere closer to enemy).

Possible Implementation:

Pseudocode suggestion:

// first gather all selected building types
HashSet<Type> SelectedBuildingTypes;
foreach (Item in CurrentSelection)
{
  if (Item.IsBuilding)
    SelectedBuildingTypes.Add (Item.Type);
}

// then parse all player buildings on the map to select them
foreach (Building in Player.Buildings)
{
  if (!SelectedBuildingTypes.Contains (Building.Type))
    continue;

  if (MapSelect || ScreenSelect && Building.Visible)
    Building.Selected = true;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions