diff --git a/AUTHORS b/AUTHORS index 1c8def7542..26dd59cf05 100644 --- a/AUTHORS +++ b/AUTHORS @@ -23,6 +23,7 @@ Previous developers included: * Tom Roostan (RoosterDragon) Also thanks to: + * abmyii * Adam Valy (Tschokky) * Akseli Virtanen (RAGEQUIT) * Alexander Fast (mizipzor) diff --git a/OpenRA.Mods.Common/Widgets/Logic/CreditsLogic.cs b/OpenRA.Mods.Common/Widgets/Logic/CreditsLogic.cs index 8d353c3fd6..f3eb870a5a 100644 --- a/OpenRA.Mods.Common/Widgets/Logic/CreditsLogic.cs +++ b/OpenRA.Mods.Common/Widgets/Logic/CreditsLogic.cs @@ -11,6 +11,7 @@ using System; using System.Collections.Generic; +using System.IO; using System.Linq; using OpenRA.Widgets; @@ -39,7 +40,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic onExit(); }; - engineLines = ParseLines("AUTHORS"); + engineLines = ParseLines(File.OpenRead(Platform.ResolvePath("./AUTHORS"))); var tabContainer = panel.Get("TAB_CONTAINER"); var modTab = tabContainer.Get("MOD_TAB"); @@ -57,7 +58,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic if (hasModCredits) { var modCredits = modData.Manifest.Get(); - modLines = ParseLines(modCredits.ModCreditsFile); + modLines = ParseLines(modData.DefaultFileSystem.Open(modCredits.ModCreditsFile)); modTab.GetText = () => modCredits.ModTabTitle; // Make space to show the tabs @@ -82,12 +83,9 @@ namespace OpenRA.Mods.Common.Widgets.Logic } } - IEnumerable ParseLines(string file) + IEnumerable ParseLines(Stream file) { - return modData.DefaultFileSystem.Open(file) - .ReadAllLines() - .Select(l => l.Replace("\t", " ").Replace("*", "\u2022")) - .ToList(); + return file.ReadAllLines().Select(l => l.Replace("\t", " ").Replace("*", "\u2022")).ToList(); } } }