Separated ship squad from ground unit squad
Just like aircrafts are independent from ground squads.
This commit is contained in:
@@ -43,6 +43,7 @@ namespace OpenRA.Mods.Common.AI
|
||||
public class UnitCategories
|
||||
{
|
||||
public readonly HashSet<string> Mcv = new HashSet<string>();
|
||||
public readonly HashSet<string> NavalUnits = new HashSet<string>();
|
||||
public readonly HashSet<string> ExcludeFromSquads = new HashSet<string>();
|
||||
}
|
||||
|
||||
@@ -837,6 +838,14 @@ namespace OpenRA.Mods.Common.AI
|
||||
|
||||
air.Units.Add(a);
|
||||
}
|
||||
else if (Info.UnitsCommonNames.NavalUnits.Contains(a.Info.Name))
|
||||
{
|
||||
var ships = GetSquadOfType(SquadType.Naval);
|
||||
if (ships == null)
|
||||
ships = RegisterNewSquad(SquadType.Naval);
|
||||
|
||||
ships.Units.Add(a);
|
||||
}
|
||||
|
||||
activeUnits.Add(a);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user