Unhardcode weapon ammo consumption

fix gh actions
This commit is contained in:
tjk-ws
2021-06-11 12:55:46 +08:00
committed by Smittytron
parent 9fa5dcc055
commit a893cf9cb6
4 changed files with 8 additions and 2 deletions

View File

@@ -99,7 +99,7 @@ namespace OpenRA.Mods.Common.Traits
void INotifyAttack.Attacking(Actor self, in Target target, Armament a, Barrel barrel)
{
if (a != null && Info.Armaments.Contains(a.Info.Name))
TakeAmmo(self, 1);
TakeAmmo(self, a.Info.AmmoUsage);
}
void INotifyAttack.PreparingAttack(Actor self, in Target target, Armament a, Barrel barrel) { }