diff --git a/Content.Client/UserInterface/CreditsWindow.cs b/Content.Client/UserInterface/CreditsWindow.cs index 215afc3938..86e30a18a1 100644 --- a/Content.Client/UserInterface/CreditsWindow.cs +++ b/Content.Client/UserInterface/CreditsWindow.cs @@ -3,11 +3,13 @@ using System.Collections.Generic; using System.IO; using System.Linq; using Content.Client.UserInterface.Stylesheets; +using Content.Shared; using Robust.Client.Credits; using Robust.Client.Interfaces.ResourceManagement; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; +using Robust.Shared.Interfaces.Configuration; using Robust.Shared.IoC; using Robust.Shared.Localization; using Robust.Shared.Maths; @@ -19,6 +21,7 @@ namespace Content.Client.UserInterface public sealed class CreditsWindow : SS14Window { [Dependency] private readonly IResourceCache _resourceManager = default!; + [Dependency] private readonly IConfigurationManager _cfg = default!; private static readonly Dictionary PatronTierPriority = new() { @@ -84,12 +87,20 @@ namespace Content.Client.UserInterface margin.AddChild(vBox); var patrons = LoadPatrons(); - Button patronButton; - vBox.AddChild(patronButton = new Button + // Do not show "become a patron" button on Steam builds + // since Patreon violates Valve's rules about alternative storefronts. + if (!_cfg.GetCVar(CCVars.BrandingSteam)) { - Text = "Become a Patron", - SizeFlagsHorizontal = SizeFlags.ShrinkCenter - }); + Button patronButton; + vBox.AddChild(patronButton = new Button + { + Text = "Become a Patron", + SizeFlagsHorizontal = SizeFlags.ShrinkCenter + }); + + patronButton.OnPressed += + _ => IoCManager.Resolve().OpenUri(UILinks.Patreon); + } var first = true; foreach (var tier in patrons.GroupBy(p => p.Tier).OrderBy(p => PatronTierPriority[p.Key])) @@ -111,15 +122,13 @@ namespace Content.Client.UserInterface } - patronButton.OnPressed += - _ => IoCManager.Resolve().OpenUri(UILinks.Patreon); patronsList.AddChild(margin); } private IEnumerable LoadPatrons() { - var yamlStream = _resourceManager.ContentFileReadYaml(new ResourcePath("/Credits/Patrons.json")); + var yamlStream = _resourceManager.ContentFileReadYaml(new ResourcePath("/Credits/Patrons.yml")); var sequence = (YamlSequenceNode) yamlStream.Documents[0].RootNode; return sequence diff --git a/Content.Shared/CCVars.cs b/Content.Shared/CCVars.cs index dfd91e0b3b..65a5ab08b9 100644 --- a/Content.Shared/CCVars.cs +++ b/Content.Shared/CCVars.cs @@ -150,5 +150,12 @@ namespace Content.Shared public static readonly CVarDef AdminAnnounceLogout = CVarDef.Create("admin.announce_logout", true, CVar.SERVERONLY); + + + /* + * Branding stuff + */ + + public static readonly CVarDef BrandingSteam = CVarDef.Create("branding.steam", false, CVar.CLIENTONLY); } } diff --git a/Resources/Credits/Patrons.json b/Resources/Credits/Patrons.json deleted file mode 100644 index 0b65614938..0000000000 --- a/Resources/Credits/Patrons.json +++ /dev/null @@ -1 +0,0 @@ -[{"Name":"rfuture","Tier":"Revolutionary"},{"Name":"Durp","Tier":"Revolutionary"},{"Name":"Joshington Awesomahee","Tier":"Revolutionary"},{"Name":"Diklyquill","Tier":"Revolutionary"},{"Name":"Eric VW","Tier":"Revolutionary"},{"Name":"tdalrymple","Tier":"Revolutionary"},{"Name":"Evan Armstrong","Tier":"Revolutionary"},{"Name":"Citizen Battle","Tier":"Revolutionary"},{"Name":"Jan Doodt","Tier":"Revolutionary"},{"Name":"Christopher Marmentini","Tier":"Nuclear Operative"},{"Name":"Curtis Pearson","Tier":"Nuclear Operative"},{"Name":"Mono","Tier":"Revolutionary"},{"Name":"Shootmister","Tier":"Syndicate Agent"},{"Name":"MonkeePawl","Tier":"Nuclear Operative"},{"Name":"tyler","Tier":"Revolutionary"},{"Name":"Star Lord","Tier":"Syndicate Agent"},{"Name":"Ethan Keller","Tier":"Revolutionary"},{"Name":"creadth","Tier":"Nuclear Operative"},{"Name":"Robert Reed","Tier":"Nuclear Operative"},{"Name":"DramaBuns","Tier":"Revolutionary"},{"Name":"Bush Boy","Tier":"Nuclear Operative"},{"Name":"Quonn","Tier":"Syndicate Agent"},{"Name":"KrystalDisc","Tier":"Revolutionary"},{"Name":"Darren Brady","Tier":"Revolutionary"},{"Name":"Zandario","Tier":"Nuclear Operative"},{"Name":"Lucas Welsh","Tier":"Revolutionary"},{"Name":"Nico Thate","Tier":"Revolutionary"},{"Name":"Anthony Fleck","Tier":"Nuclear Operative"},{"Name":"vifs","Tier":"Syndicate Agent"},{"Name":"Bobberunio","Tier":"Revolutionary"},{"Name":"Zadenae","Tier":"Nuclear Operative"},{"Name":"arthropods","Tier":"Revolutionary"},{"Name":"Nicholas Perry","Tier":"Syndicate Agent"},{"Name":"Mathieu Déom","Tier":"Syndicate Agent"},{"Name":"merklaw","Tier":"Revolutionary"},{"Name":"Crocs Enthusiast .","Tier":"Revolutionary"},{"Name":"NetGlitch","Tier":"Syndicate Agent"},{"Name":"ThatGuyGW","Tier":"Nuclear Operative"},{"Name":"MetalClone","Tier":"Nuclear Operative"},{"Name":"dean","Tier":"Nuclear Operative"},{"Name":"Ninja","Tier":"Syndicate Agent"},{"Name":"Await Future","Tier":"Syndicate Agent"},{"Name":"Kyle Hipke","Tier":"Nuclear Operative"},{"Name":"Daniel Thompson","Tier":"Revolutionary"},{"Name":"Acvisy","Tier":"Nuclear Operative"},{"Name":"Tomeno","Tier":"Revolutionary"}] diff --git a/Resources/Credits/Patrons.yml b/Resources/Credits/Patrons.yml new file mode 100644 index 0000000000..48d17def8d --- /dev/null +++ b/Resources/Credits/Patrons.yml @@ -0,0 +1,81 @@ +- Name: Jigglypuff + Tier: Syndicate Agent +- Name: Altana + Tier: Revolutionary +- Name: showgun117 + Tier: Syndicate Agent +- Name: Wolfiten + Tier: Revolutionary +- Name: Durp + Tier: Revolutionary +- Name: Joshington Awesomahee + Tier: Revolutionary +- Name: Diklyquill + Tier: Revolutionary +- Name: Eric VW + Tier: Revolutionary +- Name: Evan Armstrong + Tier: Revolutionary +- Name: Jan Doodt + Tier: Revolutionary +- Name: Christopher Marmentini + Tier: Nuclear Operative +- Name: Mono + Tier: Revolutionary +- Name: Shootmister + Tier: Syndicate Agent +- Name: MonkeePawl + Tier: Nuclear Operative +- Name: Star Lord + Tier: Syndicate Agent +- Name: Ethan Keller + Tier: Revolutionary +- Name: creadth + Tier: Nuclear Operative +- Name: Robert Reed + Tier: Nuclear Operative +- Name: DramaBuns + Tier: Revolutionary +- Name: KrystalDisc + Tier: Revolutionary +- Name: Darren Brady + Tier: Revolutionary +- Name: Zandario + Tier: Nuclear Operative +- Name: Nico Thate + Tier: Revolutionary +- Name: Anthony Fleck + Tier: Nuclear Operative +- Name: vifs + Tier: Syndicate Agent +- Name: Bobberunio + Tier: Revolutionary +- Name: arthropods + Tier: Revolutionary +- Name: Nicholas Perry + Tier: Syndicate Agent +- Name: Mathieu Déom + Tier: Syndicate Agent +- Name: merklaw + Tier: Revolutionary +- Name: Crocs Enthusiast . + Tier: Revolutionary +- Name: NetGlitch + Tier: Nuclear Operative +- Name: ThatGuyGW + Tier: Nuclear Operative +- Name: MetalClone + Tier: Nuclear Operative +- Name: dean + Tier: Nuclear Operative +- Name: Await Future + Tier: Syndicate Agent +- Name: Kyle Hipke + Tier: Nuclear Operative +- Name: Daniel Thompson + Tier: Revolutionary +- Name: Acvisy + Tier: Nuclear Operative +- Name: Tomeno + Tier: Revolutionary + diff --git a/Tools/dump_patrons.ps1 b/Tools/dump_patrons.ps1 index 04cc1f3edf..ea41a95dbf 100755 --- a/Tools/dump_patrons.ps1 +++ b/Tools/dump_patrons.ps1 @@ -2,7 +2,7 @@ param([string]$csvPath) -# Dumps Patreon's CSV download into a JSON file the game reads. +# Dumps Patreon's CSV download into a YAML file the game reads. # Have to trim patron names because apparently Patreon doesn't which is quite ridiculous. -Get-content $csvPath | ConvertFrom-Csv -Delimiter "," | select @{l="Name";e={$_.Name.Trim()}},Tier | ConvertTo-Json -Compress +Get-content $csvPath | ConvertFrom-Csv -Delimiter "," | select @{l="Name";e={$_.Name.Trim()}},Tier | ConvertTo-Yaml