Rename Manifest.Mod -> Metadata.
This commit is contained in:
@@ -32,7 +32,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (mpe != null)
|
||||
mpe.Fade(mpe.Info.MenuEffect);
|
||||
|
||||
menu.Get<LabelWidget>("VERSION_LABEL").Text = modData.Manifest.Mod.Version;
|
||||
menu.Get<LabelWidget>("VERSION_LABEL").Text = modData.Manifest.Metadata.Version;
|
||||
|
||||
var hideMenu = false;
|
||||
menu.Get("MENU_BUTTONS").IsVisible = () => !hideMenu;
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
public MainMenuLogic(Widget widget, World world, ModData modData)
|
||||
{
|
||||
rootMenu = widget;
|
||||
rootMenu.Get<LabelWidget>("VERSION_LABEL").Text = modData.Manifest.Mod.Version;
|
||||
rootMenu.Get<LabelWidget>("VERSION_LABEL").Text = modData.Manifest.Metadata.Version;
|
||||
|
||||
// Menu buttons
|
||||
var mainMenu = widget.Get("MAIN_MENU");
|
||||
@@ -283,9 +283,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
{
|
||||
// Send the mod and engine version to support version-filtered news (update prompts)
|
||||
var newsURL = Game.Settings.Game.NewsUrl + "?version={0}&mod={1}&modversion={2}".F(
|
||||
Uri.EscapeUriString(Game.Mods["modchooser"].Mod.Version),
|
||||
Uri.EscapeUriString(Game.Mods["modchooser"].Metadata.Version),
|
||||
Uri.EscapeUriString(Game.ModData.Manifest.Id),
|
||||
Uri.EscapeUriString(Game.ModData.Manifest.Mod.Version));
|
||||
Uri.EscapeUriString(Game.ModData.Manifest.Metadata.Version));
|
||||
|
||||
// Append system profile data if the player has opted in
|
||||
if (Game.Settings.Debug.SendSystemInformation)
|
||||
|
||||
@@ -69,9 +69,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
modTemplate = modList.Get<ButtonWidget>("MOD_TEMPLATE");
|
||||
|
||||
modChooserPanel.Get<LabelWidget>("MOD_DESC").GetText = () => selectedDescription;
|
||||
modChooserPanel.Get<LabelWidget>("MOD_TITLE").GetText = () => selectedMod.Mod.Title;
|
||||
modChooserPanel.Get<LabelWidget>("MOD_TITLE").GetText = () => selectedMod.Metadata.Title;
|
||||
modChooserPanel.Get<LabelWidget>("MOD_AUTHOR").GetText = () => selectedAuthor;
|
||||
modChooserPanel.Get<LabelWidget>("MOD_VERSION").GetText = () => selectedMod.Mod.Version;
|
||||
modChooserPanel.Get<LabelWidget>("MOD_VERSION").GetText = () => selectedMod.Metadata.Version;
|
||||
|
||||
var prevMod = modChooserPanel.Get<ButtonWidget>("PREV_MOD");
|
||||
prevMod.OnClick = () => { modOffset -= 1; RebuildModList(); };
|
||||
@@ -89,8 +89,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
};
|
||||
|
||||
sheetBuilder = new SheetBuilder(SheetType.BGRA);
|
||||
allMods = Game.Mods.Values.Where(m => !m.Mod.Hidden)
|
||||
.OrderBy(m => m.Mod.Title)
|
||||
allMods = Game.Mods.Values.Where(m => !m.Metadata.Hidden)
|
||||
.OrderBy(m => m.Metadata.Title)
|
||||
.ToArray();
|
||||
|
||||
// Load preview images, and eat any errors
|
||||
@@ -153,7 +153,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
SelectMod(mod);
|
||||
};
|
||||
|
||||
item.TooltipText = mod.Mod.Title;
|
||||
item.TooltipText = mod.Metadata.Title;
|
||||
|
||||
if (j < 9)
|
||||
item.Key = new Hotkey((Keycode)((int)Keycode.NUMBER_1 + j), Modifiers.None);
|
||||
@@ -170,8 +170,8 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
void SelectMod(Manifest mod)
|
||||
{
|
||||
selectedMod = mod;
|
||||
selectedAuthor = "By " + (mod.Mod.Author ?? "unknown author");
|
||||
selectedDescription = (mod.Mod.Description ?? "").Replace("\\n", "\n");
|
||||
selectedAuthor = "By " + (mod.Metadata.Author ?? "unknown author");
|
||||
selectedDescription = (mod.Metadata.Description ?? "").Replace("\\n", "\n");
|
||||
var selectedIndex = Array.IndexOf(allMods, mod);
|
||||
if (selectedIndex - modOffset > 4)
|
||||
modOffset = selectedIndex - 4;
|
||||
|
||||
@@ -316,9 +316,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
};
|
||||
|
||||
var queryURL = Game.Settings.Server.MasterServer + "games?version={0}&mod={1}&modversion={2}".F(
|
||||
Uri.EscapeUriString(Game.Mods["modchooser"].Mod.Version),
|
||||
Uri.EscapeUriString(Game.Mods["modchooser"].Metadata.Version),
|
||||
Uri.EscapeUriString(Game.ModData.Manifest.Id),
|
||||
Uri.EscapeUriString(Game.ModData.Manifest.Mod.Version));
|
||||
Uri.EscapeUriString(Game.ModData.Manifest.Metadata.Version));
|
||||
|
||||
currentQuery = new Download(queryURL, _ => { }, onComplete);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
var template = panel.Get<ScrollItemWidget>("REPLAY_TEMPLATE");
|
||||
|
||||
var mod = modData.Manifest;
|
||||
var dir = Platform.ResolvePath("^", "Replays", mod.Id, mod.Mod.Version);
|
||||
var dir = Platform.ResolvePath("^", "Replays", mod.Id, mod.Metadata.Version);
|
||||
|
||||
if (Directory.Exists(dir))
|
||||
ThreadPool.QueueUserWorkItem(_ => LoadReplays(dir, template));
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (!Game.Mods.ContainsKey(mod))
|
||||
return IncompatibleReplayDialog("unavailable mod", mod, onCancel);
|
||||
|
||||
if (Game.Mods[mod].Mod.Version != version)
|
||||
if (Game.Mods[mod].Metadata.Version != version)
|
||||
return IncompatibleReplayDialog("incompatible version", version, onCancel);
|
||||
|
||||
if (replayMeta.GameInfo.MapPreview.Status != MapStatus.Available)
|
||||
|
||||
Reference in New Issue
Block a user