Move weapon/turret definitions out of AttackBase.
Weapons are now defined with the Armament trait and turret parameters live in Turreted. This has the side effect of allowing any number and distribution of weapons and turrets.
This commit is contained in:
@@ -55,7 +55,9 @@ namespace OpenRA.Mods.RA
|
||||
if (facing != null)
|
||||
td.Add(new FacingInit( facing.Facing ));
|
||||
|
||||
var turreted = self.TraitOrDefault<Turreted>();
|
||||
// TODO: This will only take the first turret if there are multiple
|
||||
// This isn't a problem with the current units, but may be a problem for mods
|
||||
var turreted = self.TraitsImplementing<Turreted>().FirstOrDefault();
|
||||
if (turreted != null)
|
||||
td.Add( new TurretFacingInit(turreted.turretFacing) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user