Hide patreon link on Steam, fix YamlDotNet 9.1.0 parse error, update patrons list.
This commit is contained in:
@@ -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<string, int> PatronTierPriority = new()
|
||||
{
|
||||
@@ -84,6 +87,10 @@ namespace Content.Client.UserInterface
|
||||
margin.AddChild(vBox);
|
||||
var patrons = LoadPatrons();
|
||||
|
||||
// Do not show "become a patron" button on Steam builds
|
||||
// since Patreon violates Valve's rules about alternative storefronts.
|
||||
if (!_cfg.GetCVar(CCVars.BrandingSteam))
|
||||
{
|
||||
Button patronButton;
|
||||
vBox.AddChild(patronButton = new Button
|
||||
{
|
||||
@@ -91,6 +98,10 @@ namespace Content.Client.UserInterface
|
||||
SizeFlagsHorizontal = SizeFlags.ShrinkCenter
|
||||
});
|
||||
|
||||
patronButton.OnPressed +=
|
||||
_ => IoCManager.Resolve<IUriOpener>().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<IUriOpener>().OpenUri(UILinks.Patreon);
|
||||
|
||||
patronsList.AddChild(margin);
|
||||
}
|
||||
|
||||
private IEnumerable<PatronEntry> 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
|
||||
|
||||
@@ -150,5 +150,12 @@ namespace Content.Shared
|
||||
|
||||
public static readonly CVarDef<bool> AdminAnnounceLogout =
|
||||
CVarDef.Create("admin.announce_logout", true, CVar.SERVERONLY);
|
||||
|
||||
|
||||
/*
|
||||
* Branding stuff
|
||||
*/
|
||||
|
||||
public static readonly CVarDef<bool> BrandingSteam = CVarDef.Create("branding.steam", false, CVar.CLIENTONLY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"}]
|
||||
81
Resources/Credits/Patrons.yml
Normal file
81
Resources/Credits/Patrons.yml
Normal file
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user