fix d2k production queues
ClassicProductionQueue gets support for new notification system d2k now uses the ClassicProductionQueue system to avoid spamming Starport has cheaper threshold prices adds a new production queue but has long delivery times also no starport price fluctuation to improve balancing
This commit is contained in:
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Cnc
|
||||
{
|
||||
public class ProductionAirdropInfo : ProductionInfo
|
||||
{
|
||||
public readonly string ReadyAudio = "reinfor1.aud";
|
||||
public readonly string ReadyAudio = "Reinforce";
|
||||
[ActorReference] public readonly string ActorType = "c17";
|
||||
|
||||
public override object Create(ActorInitializer init) { return new ProductionAirdrop(this); }
|
||||
@@ -66,7 +66,7 @@ namespace OpenRA.Mods.Cnc
|
||||
|
||||
rb.PlayCustomAnimRepeating(self, "idle");
|
||||
self.World.AddFrameEndTask(ww => DoProduction(self, producee, exit));
|
||||
Sound.PlayToPlayer(self.Owner, (Info as ProductionAirdropInfo).ReadyAudio);
|
||||
Sound.PlayNotification(self.Owner, "Speech", (Info as ProductionAirdropInfo).ReadyAudio, self.Owner.Country.Race);
|
||||
}));
|
||||
a.QueueActivity(Fly.ToCell(endPos));
|
||||
a.QueueActivity(new RemoveSelf());
|
||||
|
||||
@@ -146,7 +146,7 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
else if (CurrentQueue.BuildableItems().Any(a => a.Name == clicked.Name))
|
||||
{
|
||||
Sound.Play(TabClick);
|
||||
Sound.Play(CurrentQueue.Info.QueuedAudio);
|
||||
Sound.PlayNotification(world.LocalPlayer, "Speech", CurrentQueue.Info.QueuedAudio, world.LocalPlayer.Country.Race);
|
||||
world.IssueOrder(Order.StartProduction(CurrentQueue.self, clicked.Name,
|
||||
Game.GetModifierKeys().HasModifier(Modifiers.Shift) ? 5 : 1));
|
||||
}
|
||||
@@ -164,13 +164,13 @@ namespace OpenRA.Mods.Cnc.Widgets
|
||||
// instant cancel of things we havent started yet and things that are finished
|
||||
if (first.Paused || first.Done || first.TotalCost == first.RemainingCost)
|
||||
{
|
||||
Sound.Play(CurrentQueue.Info.CancelledAudio);
|
||||
Sound.PlayNotification(world.LocalPlayer, "Speech", CurrentQueue.Info.CancelledAudio, world.LocalPlayer.Country.Race);
|
||||
world.IssueOrder(Order.CancelProduction(CurrentQueue.self, clicked.Name,
|
||||
Game.GetModifierKeys().HasModifier(Modifiers.Shift) ? 5 : 1));
|
||||
}
|
||||
else
|
||||
{
|
||||
Sound.Play(CurrentQueue.Info.OnHoldAudio);
|
||||
Sound.PlayNotification(world.LocalPlayer, "Speech", CurrentQueue.Info.OnHoldAudio, world.LocalPlayer.Country.Race);
|
||||
world.IssueOrder(Order.PauseProduction(CurrentQueue.self, clicked.Name, true));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user