Unhardcode weapon ammo consumption
fix gh actions
This commit is contained in:
@@ -147,7 +147,7 @@ namespace OpenRA.Mods.Cnc.Activities
|
||||
if (pool == null)
|
||||
return;
|
||||
|
||||
pool.TakeAmmo(self, 1);
|
||||
pool.TakeAmmo(self, minelayer.Info.AmmoUsage);
|
||||
}
|
||||
|
||||
self.World.AddFrameEndTask(w => w.CreateActor(minelayer.Info.Mine, new TypeDictionary
|
||||
|
||||
@@ -62,6 +62,9 @@ namespace OpenRA.Mods.Cnc.Traits
|
||||
[Desc("Cursor to display when able to lay a mine.")]
|
||||
public readonly string AbilityCursor = "ability";
|
||||
|
||||
[Desc("Ammo the minelayer consumes per mine.")]
|
||||
public readonly int AmmoUsage = 1;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new Minelayer(init.Self, this); }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user