@using LANCommander.PCGamingWiki @using LANCommander.SDK.Enums @model LANCommander.Server.Data.Models.Game @{ Layout = null; var PCGamingWikiClient = new PCGamingWikiClient(); Dictionary scriptTypes = new Dictionary() { { "Install Script", ScriptType.Install }, { "Uninstall Script", ScriptType.Uninstall }, { "Name Change Script", ScriptType.NameChange }, { "Key Change Script", ScriptType.KeyChange } }; var pcgwGame = await PCGamingWikiClient.Search(Model.Title); } [[Category:Games]] {{Game.InfoBox |Cover = cover.jpg |Developers = @foreach (var company in Model.Developers) { {{Game.InfoBox.Developer|@company.Name}} } |Publishers = @foreach (var company in Model.Publishers) { {{Game.InfoBox.Publisher|@company.Name}} } |Release Date = {{Game.InfoBox.ReleaseDate|Windows|@Model.ReleasedOn?.ToString("MMMM d, yyyy")}} |Genres = @foreach (var genre in Model.Genres) { {{Game.InfoBox.Genre|@genre.Name}} } @if (pcgwGame != null) { |PCGamingWiki = @pcgwGame.ToString().Replace("https://www.pcgamingwiki.com/wiki/", "") } }} {{Game.ActionBox |Actions = @foreach (var action in Model.Actions) { {{Game.ActionBox.Row|Name = @action.Name|Path = @action.Path|Arguments = @action.Arguments|WorkingDirectory = @action.WorkingDirectory|Primary = @(action.PrimaryAction ? "True" : "False")}} @Html.Raw('\n') } }} @if (Model.Scripts != null) { foreach (var scriptType in scriptTypes) { var script = Model.Scripts.FirstOrDefault(s => s.Type == scriptType.Value); if (script != null) { {{Game.Scripts.@scriptType.Value |Name = @scriptType.Key |Description = @script.Description |RequiresAdmin = @(script.RequiresAdmin ? "True" : "False") |Contents = @Html.Raw(script.Contents) }} } } }