Fixes #2937. Thanks to Lion_Kanzen and Pureon for making icons.
This was SVN commit r16064.
This commit is contained in:
parent
b2650e08ba
commit
286112e0aa
BIN
binaries/data/mods/public/art/textures/ui/session/icons/formations/null.png
(Stored with Git LFS)
Normal file
BIN
binaries/data/mods/public/art/textures/ui/session/icons/formations/null.png
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -132,7 +132,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -114,7 +114,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -135,7 +135,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -151,7 +151,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -110,7 +110,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -167,7 +167,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -108,7 +108,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -137,7 +137,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -122,7 +122,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -127,7 +127,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -136,7 +136,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -112,7 +112,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -133,7 +133,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -128,7 +128,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -121,7 +121,7 @@
|
||||
],
|
||||
"Formations":
|
||||
[
|
||||
"formations/scatter",
|
||||
"formations/null",
|
||||
"formations/box",
|
||||
"formations/column_closed",
|
||||
"formations/line_closed",
|
||||
|
@ -1275,10 +1275,15 @@ function GetFormationUnitAIs(ents, player, formationTemplate)
|
||||
// TODO: We only check if the formation is usable by some units
|
||||
// if we move them to it. We should check if we can use formations
|
||||
// for the other cases.
|
||||
if (cmpIdentity && cmpIdentity.CanUseFormation(formationTemplate || "formations/line_closed"))
|
||||
var nullFormation = (formationTemplate || cmpUnitAI.GetLastFormationTemplate()) == "formations/null";
|
||||
if (!nullFormation && cmpIdentity && cmpIdentity.CanUseFormation(formationTemplate || "formations/line_closed"))
|
||||
formedEnts.push(ent);
|
||||
else
|
||||
{
|
||||
if (nullFormation)
|
||||
cmpUnitAI.SetLastFormationTemplate("formations/null");
|
||||
nonformedUnitAIs.push(cmpUnitAI);
|
||||
}
|
||||
}
|
||||
|
||||
if (formedEnts.length == 0)
|
||||
@ -1319,6 +1324,7 @@ function GetFormationUnitAIs(ents, player, formationTemplate)
|
||||
if (cmpFormation)
|
||||
cmpFormation.RemoveMembers(formation.members[fid]);
|
||||
}
|
||||
|
||||
// TODO replace the fixed 60 with something sensible, based on vision range f.e.
|
||||
var formationSeparation = 60;
|
||||
var clusters = ClusterEntities(formation.entities, formationSeparation);
|
||||
@ -1358,7 +1364,7 @@ function GetFormationUnitAIs(ents, player, formationTemplate)
|
||||
formationUnitAIs.push(Engine.QueryInterface(formationEnt, IID_UnitAI));
|
||||
cmpFormation.SetFormationSeparation(formationSeparation);
|
||||
cmpFormation.SetMembers(cluster);
|
||||
|
||||
|
||||
for each (var ent in formationEnts)
|
||||
cmpFormation.RegisterTwinFormation(ent);
|
||||
|
||||
|
@ -36,6 +36,16 @@
|
||||
<Identity>
|
||||
<GenericName>Unit</GenericName>
|
||||
<Classes datatype="tokens">Unit ConquestCritical</Classes>
|
||||
<Formations datatype="tokens">
|
||||
formations/null
|
||||
formations/box
|
||||
formations/column_closed
|
||||
formations/line_closed
|
||||
formations/column_open
|
||||
formations/line_open
|
||||
formations/flank
|
||||
formations/battle_line
|
||||
</Formations>
|
||||
</Identity>
|
||||
<Looter/>
|
||||
<Minimap>
|
||||
|
Loading…
Reference in New Issue
Block a user