Refactors LimitedAmmo to AmmoPool.

Removes Reloads trait.

This enables adding multiple AmmoPools via @ differentiators and
Name which adds the possibility to assign each armament to a specific
ammo pool.

Furthermore, this moves all Reloads functionality onto AmmoPool.

Now a combination of all three is possible on a single actor: no limited
ammo, limited ammo that can reload on its own, and limited ammo which
needs to be reloaded at a rearm actor.

Additionally moves RearmSound from Minelayer to AmmoPool.
This commit is contained in:
reaperrr
2015-01-04 19:52:07 +01:00
parent d631d8b780
commit 38d5163062
23 changed files with 337 additions and 255 deletions

View File

@@ -45,7 +45,7 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Fly an attack against the target actor.")]
public void Attack(Actor target)
{
Self.QueueActivity(new FlyAttack(Target.FromActor(target)));
Self.QueueActivity(new FlyAttack(Self, Target.FromActor(target)));
}
}
}