Remove modRules widget logic argument.
This commit is contained in:
@@ -39,10 +39,10 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
bool teamChat;
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public IngameChatLogic(Widget widget, OrderManager orderManager, World world, Ruleset modRules)
|
||||
public IngameChatLogic(Widget widget, OrderManager orderManager, World world, ModData modData)
|
||||
{
|
||||
this.orderManager = orderManager;
|
||||
this.modRules = modRules;
|
||||
this.modRules = modData.DefaultRules;
|
||||
|
||||
chatTraits = world.WorldActor.TraitsImplementing<INotifyChat>().ToArray();
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
internal LobbyLogic(Widget widget, ModData modData, WorldRenderer worldRenderer, OrderManager orderManager,
|
||||
Action onExit, Action onStart, bool skirmishMode, Ruleset modRules)
|
||||
Action onExit, Action onStart, bool skirmishMode)
|
||||
{
|
||||
MapPreview = MapCache.UnknownMap;
|
||||
lobby = widget;
|
||||
@@ -121,7 +121,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
this.onStart = onStart;
|
||||
this.onExit = onExit;
|
||||
this.skirmishMode = skirmishMode;
|
||||
this.modRules = modRules;
|
||||
|
||||
// TODO: This needs to be reworked to support per-map tech levels, bots, etc.
|
||||
this.modRules = modData.DefaultRules;
|
||||
shellmapWorld = worldRenderer.World;
|
||||
|
||||
orderManager.AddChatLine += AddChatLine;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
MusicInfo currentSong = null;
|
||||
|
||||
[ObjectCreator.UseCtor]
|
||||
public MusicPlayerLogic(Widget widget, ModData modData, Ruleset modRules, World world, Action onExit)
|
||||
public MusicPlayerLogic(Widget widget, ModData modData, World world, Action onExit)
|
||||
{
|
||||
var panel = widget;
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
Game.RunAfterTick(() => Game.InitializeMod("modchooser", new Arguments(args)));
|
||||
|
||||
var installData = modData.Manifest.Get<ContentInstaller>();
|
||||
installButton.IsVisible = () => modRules.InstalledMusic.ToArray().Length <= installData.ShippedSoundtracks;
|
||||
installButton.IsVisible = () => modData.DefaultRules.InstalledMusic.ToArray().Length <= installData.ShippedSoundtracks;
|
||||
}
|
||||
|
||||
var songWatcher = widget.GetOrNull<LogicTickerWidget>("SONG_WATCHER");
|
||||
|
||||
Reference in New Issue
Block a user