Skip to content

Commit

Permalink
feat(cs, options): add Links section
Browse files Browse the repository at this point in the history
  • Loading branch information
toverux committed Sep 5, 2024
1 parent e9430c9 commit 72fac61
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 6 deletions.
1 change: 1 addition & 0 deletions HallOfFame.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=csii/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=factorio/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=modders/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=pdxm/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=playset/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=steamapps/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=supersampling/@EntryIndexedValue">True</s:Boolean>
Expand Down
2 changes: 1 addition & 1 deletion HallOfFame/Properties/PublishConfiguration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
<ExternalLink Type="crowdin" Url="https://crowdin.com/project/halloffame-cs2" />
<ExternalLink Type="paypal" Url="https://paypal.me/MorganTouverey" />
<ExternalLink Type="kofi" Url="https://ko-fi.com/toverux" />
</Publish>
</Publish>
48 changes: 45 additions & 3 deletions HallOfFame/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ namespace HallOfFame;
[SettingsUIShowGroupName(
Settings.GroupYourProfile,
Settings.GroupContentPreferences,
Settings.GroupAdvanced)]
Settings.GroupAdvanced,
Settings.GroupLinks)]
public sealed class Settings : ModSetting, IJsonWritable {
private const string GroupYourProfile = "YourProfile";

private const string GroupContentPreferences = "ContentPreferences";

private const string GroupAdvanced = "Advanced";

private const string GroupOthers = "Others";
private const string GroupLinks = "Links";

/// <summary>
/// Creator ID read from the dedicated file.
Expand Down Expand Up @@ -152,13 +153,54 @@ public bool CopyCreatorID {
public string BaseUrl { get; set; } = null!;

[SettingsUIButton]
[SettingsUISection(Settings.GroupOthers)]
[SettingsUISection(Settings.GroupAdvanced)]
[UsedImplicitly]
public bool ResetSettings {
// ReSharper disable once ValueParameterNotUsed
set => this.SetDefaults();
}

[SettingsUIButton]
[SettingsUISection(Settings.GroupLinks)]
[UsedImplicitly]
public bool DiscordLink {
// ReSharper disable once ValueParameterNotUsed
set => Application.OpenURL("https://discord.gg/HTav7ARPs2");
}

[SettingsUIButton]
[SettingsUISection(Settings.GroupLinks)]
[UsedImplicitly]
public bool DonateLink {
// ReSharper disable once ValueParameterNotUsed
set => Application.OpenURL("https://paypal.me/MorganTouverey");
}

[SettingsUIButton]
[SettingsUISection(Settings.GroupLinks)]
[UsedImplicitly]
public bool CrowdinLink {
// ReSharper disable once ValueParameterNotUsed
set =>
Application.OpenURL("https://crowdin.com/project/halloffame-cs2");
}

[SettingsUIButton]
[SettingsUISection(Settings.GroupLinks)]
[UsedImplicitly]
public bool UserFeedbackLink {
// ReSharper disable once ValueParameterNotUsed
set => Application.OpenURL("https://halloffame-cs2.canny.io");
}

[SettingsUIButton]
[SettingsUISection(Settings.GroupLinks)]
[UsedImplicitly]
public bool GithubLink {
// ReSharper disable once ValueParameterNotUsed
set => Application.OpenURL("https://github.com/toverux/HallOfFame");
}

public Settings(IMod mod) : base(mod) {
this.SetDefaults();
}
Expand Down
13 changes: 12 additions & 1 deletion HallOfFame/lang/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"Options.GROUP[HallOfFame.HallOfFame.Mod.YourProfile]": "Your Profile",
"Options.GROUP[HallOfFame.HallOfFame.Mod.ContentPreferences]": "Content Preferences",
"Options.GROUP[HallOfFame.HallOfFame.Mod.Advanced]": "Advanced Settings",
"Options.GROUP[HallOfFame.HallOfFame.Mod.Links]": "Links",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.CreatorName]": "Creator Name",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.CreatorName]": "Your Creator Name, will be displayed alongside your screenshots.\nYou can change it anytime as long as your Creator ID stays the same, your name will be updated for all past uploads (only once you upload a new picture).\nYou must choose a Creator Name to upload pictures.",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.MaskedCreatorID]": "Creator ID",
Expand All @@ -68,5 +69,15 @@
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.BaseUrl]": "Hall of Fame server",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.BaseUrl]": "Address of the hall of Fame server. You should not change it unless you’re developing on the mod or using an alternative server.",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.ResetSettings]": "Reset Settings",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.ResetSettings]": "Reset all mod settings to their default values (except the Creator ID which will be kept untouched)."
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.ResetSettings]": "Reset all mod settings to their default values (except the Creator ID which will be kept untouched).",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.DiscordLink]": "Discord (chat & support)",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.DiscordLink]": "This is an invite link to join the Cities: Skylines Modding Discord server, for support requests and chatting.\nThe preferred channel is pdxm-mods-published › Hall of Fame.",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.DonateLink]": "Donate <3 (on PayPal or Ko-fi)",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.DonateLink]": "Hall of Fame has monthly costs for server and image storage.\nTo make the mod viable in the long term for me, donations are greatly appreciated!\nAny donation ≥ $10 (or an approximation in your currency) will grant you the “Supporter” status (leave a message with your Creator Name when donating), which will slightly increase your view count.\nThis is a PayPal link; you can also find me on Ko-fi: https://ko-fi.com/toverux",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.CrowdinLink]": "Crowdin (translation)",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.CrowdinLink]": "Contribute to the mod translations on Crowdin.",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.GithubLink]": "GitHub (source code)",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.GithubLink]": "Access the mod’s source code on GitHub.",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.UserFeedbackLink]": "Canny (roadmap & feature requests)",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.UserFeedbackLink]": "Access our Canny space to see the upcoming features and propose your ideas."
}
13 changes: 12 additions & 1 deletion HallOfFame/lang/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"Options.GROUP[HallOfFame.HallOfFame.Mod.YourProfile]": "Profil créateur",
"Options.GROUP[HallOfFame.HallOfFame.Mod.ContentPreferences]": "Préférences de contenu",
"Options.GROUP[HallOfFame.HallOfFame.Mod.Advanced]": "Paramètres avancés",
"Options.GROUP[HallOfFame.HallOfFame.Mod.Links]": "Liens",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.CreatorName]": "Nom de créateur",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.CreatorName]": "Votre pseudo de créateur, sera affiché avec vos photos.\nVous pouvez le changer sans problème du moment que vous conservez le même Creator ID, votre nom d’utilisateur sera mis à jour sur tous les envois précédents (la prochaine fois que vous enverrez une photo).\nVous devez choisir un nom de créateur pour pouvoir envoyer des images.",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.MaskedCreatorID]": "Identifiant (Creator ID)",
Expand All @@ -68,5 +69,15 @@
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.BaseUrl]": "Serveur Hall of Fame",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.BaseUrl]": "Adresse du serveur Hall of Fame. Ne le changez pas à moins que vous ne développiez sur le mod ou voulez utiliser un serveur alternatif.",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.ResetSettings]": "Réinitialiser les paramètres",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.ResetSettings]": "Réinitialiser tous les paramètres du mod à leurs valeurs par défaut (sauf le Creator ID qui ne sera pas modifié)."
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.ResetSettings]": "Réinitialiser tous les paramètres du mod à leurs valeurs par défaut (sauf le Creator ID qui ne sera pas modifié).",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.DiscordLink]": "Discord (chat & support)",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.DiscordLink]": "Ceci est un lien d’invitation pour le serveur Discord Cities: Skylines Modding, pour vos demandes de support et autres discussions.\nLe canal de discussion privilégié est pdxm-mods-published › Hall of Fame.",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.DonateLink]": "Donation <3 (on PayPal or Ko-fi)",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.DonateLink]": "Hall of Fame a des coûts mensuels pour le serveur et le stockage des images.\nPour rendre le mod viable à long terme pour moi, les dons sont grandement appréciés.\nTout don ≥\u00a010\u00a0$ (ou approximativement selon votre devise) vous donnera le statut de «\u00a0Supporter\u00a0» (laissez un message avec votre nom de créateur lors du don), ce qui augmentera légèrement votre nombre de vues.\nCeci est un lien PayPal, vous pouvez aussi me retrouver sur Ko-fi: https://ko-fi.com/toverux",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.CrowdinLink]": "Crowdin (traduction)",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.CrowdinLink]": "Contribuez aux traductions du mod sur Crowdin.",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.GithubLink]": "GitHub (code source)",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.GithubLink]": "Accédez au code source du mod sur GitHub.",
"Options.OPTION[HallOfFame.HallOfFame.Mod.Settings.UserFeedbackLink]": "Feuille de route & demande de fonctionnalités",
"Options.OPTION_DESCRIPTION[HallOfFame.HallOfFame.Mod.Settings.UserFeedbackLink]": "Accédez à notre espace Canny pour consulter la liste des fonctionnalités à venir et proposer vos idées."
}

0 comments on commit 72fac61

Please sign in to comment.