Refactoring to remove static Rules & SequenceProvider

This commit is contained in:
Pavlos Touboulidis
2014-05-05 02:43:08 +03:00
parent c68427eaa6
commit 63ec6d60e7
114 changed files with 914 additions and 615 deletions

View File

@@ -20,6 +20,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
{
public class IngameChatLogic
{
readonly World world;
readonly ContainerWidget chatOverlay;
readonly ChatDisplayWidget chatOverlayDisplay;
@@ -35,6 +37,8 @@ namespace OpenRA.Mods.RA.Widgets.Logic
[ObjectCreator.UseCtor]
public IngameChatLogic(Widget widget, OrderManager orderManager, World world)
{
this.world = world;
chatTraits = world.WorldActor.TraitsImplementing<INotifyChat>().ToList();
var players = world.Players.Where(p => p != world.LocalPlayer && !p.NonCombatant && !p.IsBot);
@@ -161,7 +165,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
if (scrolledToBottom)
chatScrollPanel.ScrollToBottom();
Sound.PlayNotification(null, "Sounds", "ChatLine", null);
Sound.PlayNotification(world.Map.Rules, null, "Sounds", "ChatLine", null);
}
}
}
}