Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
FelisDiligens committed Sep 9, 2020
2 parents 3f48cab + 5133cb9 commit 80d0120
Show file tree
Hide file tree
Showing 9 changed files with 89 additions and 33 deletions.
18 changes: 9 additions & 9 deletions Fo76ini/Forms/Form1/Form1.Colors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ public Color PipboyColor
{
get
{
float r = IniFiles.Instance.GetFloat("Pipboy", "fPipboyEffectColorR", 0.1f);
float g = IniFiles.Instance.GetFloat("Pipboy", "fPipboyEffectColorG", 1.0f);
float b = IniFiles.Instance.GetFloat("Pipboy", "fPipboyEffectColorB", 0.5f);
float r = Utils.Clamp<float>(IniFiles.Instance.GetFloat("Pipboy", "fPipboyEffectColorR", 0.1f), 0f, 1f);
float g = Utils.Clamp<float>(IniFiles.Instance.GetFloat("Pipboy", "fPipboyEffectColorG", 1.0f), 0f, 1f);
float b = Utils.Clamp<float>(IniFiles.Instance.GetFloat("Pipboy", "fPipboyEffectColorB", 0.5f), 0f, 1f);
return Color.FromArgb(
Convert.ToInt32(r * 255),
Convert.ToInt32(g * 255),
Expand All @@ -113,9 +113,9 @@ public Color QuickboyColor
{
get
{
float r = IniFiles.Instance.GetFloat("Pipboy", "fQuickBoyEffectColorR", 1.0f);
float g = IniFiles.Instance.GetFloat("Pipboy", "fQuickBoyEffectColorG", 0.78f);
float b = IniFiles.Instance.GetFloat("Pipboy", "fQuickBoyEffectColorB", 0.0f);
float r = Utils.Clamp<float>(IniFiles.Instance.GetFloat("Pipboy", "fQuickBoyEffectColorR", 1.0f), 0f, 1f);
float g = Utils.Clamp<float>(IniFiles.Instance.GetFloat("Pipboy", "fQuickBoyEffectColorG", 0.78f), 0f, 1f);
float b = Utils.Clamp<float>(IniFiles.Instance.GetFloat("Pipboy", "fQuickBoyEffectColorB", 0.0f), 0f, 1f);
return Color.FromArgb(
Convert.ToInt32(r * 255),
Convert.ToInt32(g * 255),
Expand All @@ -139,9 +139,9 @@ public Color PowerArmorPipboyColor
{
get
{
float r = IniFiles.Instance.GetFloat("Pipboy", "fPAEffectColorR", 1.0f);
float g = IniFiles.Instance.GetFloat("Pipboy", "fPAEffectColorG", 0.78f);
float b = IniFiles.Instance.GetFloat("Pipboy", "fPAEffectColorB", 0.0f);
float r = Utils.Clamp<float>(IniFiles.Instance.GetFloat("Pipboy", "fPAEffectColorR", 1.0f), 0f, 1f);
float g = Utils.Clamp<float>(IniFiles.Instance.GetFloat("Pipboy", "fPAEffectColorG", 0.78f), 0f, 1f);
float b = Utils.Clamp<float>(IniFiles.Instance.GetFloat("Pipboy", "fPAEffectColorB", 0.0f), 0f, 1f);
return Color.FromArgb(
Convert.ToInt32(r * 255),
Convert.ToInt32(g * 255),
Expand Down
20 changes: 18 additions & 2 deletions Fo76ini/Forms/Form1/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 26 additions & 6 deletions Fo76ini/Forms/Form1/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,10 @@ private void Form1_Load(object sender, EventArgs e)

this.formMods = new FormMods();

// Load QuickConfiguration.ini
// Load config.ini
IniFiles.Instance.LoadConfig();

// Load the languages
//LookupLanguages();
Localization.AssignDropBox(this.comboBoxLanguage);
Localization.GenerateTemplate();
Localization.LookupLanguages();
Expand Down Expand Up @@ -588,12 +587,30 @@ private void AddAllEventHandler()
*/

// Game Edition
uiLoader.LinkList(
/*uiLoader.LinkList(
new RadioButton[] { this.radioButtonEditionBethesdaNet, this.radioButtonEditionSteam, this.radioButtonEditionBethesdaNetPTS, this.radioButtonEditionMSStore },
new String[] { "1", "2", "3", "4" },
IniFile.Config, "Preferences", "uGameEdition",
"0"
);
);*/
uiLoader.Add(() =>
{
switch (Shared.GameEdition)
{
case GameEdition.Steam:
this.radioButtonEditionSteam.Checked = true;
break;
case GameEdition.BethesdaNet:
this.radioButtonEditionBethesdaNet.Checked = true;
break;
case GameEdition.BethesdaNetPTS:
this.radioButtonEditionBethesdaNetPTS.Checked = true;
break;
case GameEdition.MSStore:
this.radioButtonEditionMSStore.Checked = true;
break;
}
});

// Launch options
uiLoader.LinkList(
Expand Down Expand Up @@ -657,6 +674,9 @@ private void AddAllEventHandler()
// Disable Steam:
uiLoader.LinkBoolNegated(this.checkBoxDisableSteam, !alternativeMode ? IniFile.F76Custom : IniFile.F76, "General", "bSteamEnabled", true);

// Automatically sign-in:
uiLoader.LinkBool(this.checkBoxAutoSignin, !alternativeMode ? IniFile.F76Custom : IniFile.F76, "Login", "bAutoSignin", false);

// Play intro videos
uiLoader.LinkCustom(this.checkBoxIntroVideos,
() => {
Expand Down Expand Up @@ -1627,11 +1647,11 @@ private void buttonPipboyTargetSetRecommended_Click(object sender, EventArgs e)

private void toolStripButtonManageMods_Click(object sender, EventArgs e)
{
if (!formModsBackupCreated)
/*if (!formModsBackupCreated)
{
IniFiles.Instance.BackupAll("Backup_BeforeManageMods"); // Just to be sure...
formModsBackupCreated = true;
}
}*/
this.formMods.OpenUI();
}

Expand Down
10 changes: 6 additions & 4 deletions Fo76ini/IniFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,17 @@ public void LoadGameInis()
{
// Do Fallout76.ini and Fallout76Prefs.ini exist?
if (File.Exists(GetIniPath(IniFile.F76, GameEdition.Steam)) && File.Exists(GetIniPath(IniFile.F76Prefs, GameEdition.Steam)))
Shared.ChangeGameEdition(GameEdition.Steam);
//this.GameEdition = GameEdition.Steam;
//Shared.ChangeGameEdition(GameEdition.Steam);
Shared.GameEdition = GameEdition.Steam;
else
throw new FileNotFoundException($"{GetIniName(IniFile.F76)} and {GetIniName(IniFile.F76Prefs)} not found");
}
else
{
// Do Project76.ini and Project76Prefs.ini exist?
if (File.Exists(GetIniPath(IniFile.F76, GameEdition.MSStore)) && File.Exists(GetIniPath(IniFile.F76Prefs, GameEdition.MSStore)))
Shared.ChangeGameEdition(GameEdition.MSStore);
//this.GameEdition = GameEdition.MSStore;
//Shared.ChangeGameEdition(GameEdition.MSStore);
Shared.GameEdition = GameEdition.MSStore;
else
throw new FileNotFoundException($"{GetIniName(IniFile.F76)} and {GetIniName(IniFile.F76Prefs)} not found");
}
Expand Down Expand Up @@ -248,6 +248,8 @@ public void ChangeGameEdition(GameEdition edition)
//this.GameEdition = edition;
/*if (reloadRequired)
LoadGameInis();*/
IniFiles.Instance.Set(IniFile.Config, "Preferences", "uGameEdition", (int)edition);

UpdateLastModifiedDates();
}

Expand Down
2 changes: 1 addition & 1 deletion Fo76ini/Shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public enum GameEdition

public class Shared
{
public const String VERSION = "1.8.2";
public const String VERSION = "1.8.3";

public static String OldAppConfigFolder = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments), "Fallout 76 Quick Configuration");
public static String AppConfigFolder = Path.Combine(System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData), "Fallout 76 Quick Configuration");
Expand Down
23 changes: 16 additions & 7 deletions Fo76ini/languages/de-DE.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Language name="Deutsch (Deutschland)" iso="de-DE" author="datasnake" version="1.8.2">
<Language name="Deutsch (Deutschland)" iso="de-DE" author="datasnake" version="1.8.3">
<Strings>
<String text="Eine neue Version ist verfügbar: {0}" id="newVersionAvailable" />
<String text="Jetzt aktualisieren!" id="updateNowButton" />
Expand Down Expand Up @@ -443,6 +443,12 @@ Betroffene Dateien: Fallout76Custom.ini</Tooltip>
</GroupBox>
</Panel>
<GroupBox text="Anmelden" id="groupBoxLogin">
<CheckBox text="Automatisch einloggen" id="checkBoxAutoSignin">
<Tooltip>Wenn dies aktiv ist, wird die Anmeldeaufforderung übersprungen, wenn die Anmeldedaten angeben sind.

Betroffene Werte: bAutoSignin
Betroffene Dateien: Fallout76Custom.ini</Tooltip>
</CheckBox>
<RadioButton text="Konto 8" id="radioButtonAccount8" />
<RadioButton text="Konto 7" id="radioButtonAccount7" />
<RadioButton text="Konto 6" id="radioButtonAccount6" />
Expand All @@ -452,7 +458,10 @@ Betroffene Dateien: Fallout76Custom.ini</Tooltip>
<RadioButton text="Konto 2" id="radioButtonAccount2" />
<RadioButton text="Konto 1" id="radioButtonAccount1" />
<Label text="Profil:" id="labelAccountProfiles" />
<CheckBox text="Steam deaktivieren" id="checkBoxDisableSteam" />
<CheckBox text="Steam deaktivieren" id="checkBoxDisableSteam">
<Tooltip>Betroffene Werte: bSteamEnabled
Betroffene Dateien: Fallout76Custom.ini</Tooltip>
</CheckBox>
<Label text="Deine Anmeldedaten werden in Fallout76Custom.ini gespeichert.\nSomit musst du dich nicht erneut anmelden,\nwenn du Fallout 76 ohne Launcher startest.\n\nWenn du Steam benutzt und du dich mit Bethesda.net anmelden möchtest\n(um z.B. Atoms auszugeben), deaktivere Steam.\nBEACHTE: Deine Errungenschaften werden dabei auch deaktiviert!" id="labelCredentialsExplanation" />
<CheckBox text="Passwort anzeigen" id="checkBoxShowPassword" />
<Label text="Passwort:" id="labelPassword" />
Expand Down Expand Up @@ -1194,15 +1203,15 @@ Wirkt sich nicht auf gebündelte Archive aus.</Tooltip>
<LinkLabel text="Hol dir deinen API-Key" id="linkLabelNMGetAPIKey" />
<Button text="Modinformationen aktualisieren" id="buttonNMUpdateModInfo" />
<Panel id="panel3">
<Label text="Ungültig" id="labelNMAPIKeyStatus" />
<Label text="Gültig" id="labelNMAPIKeyStatus" />
<Label text="API-Key:" id="labelNMDescAPIKey" />
<Label text="Anonymous" id="labelNMUserName" />
<Label text="datasnake01" id="labelNMUserName" />
<Label text="Mitgliedschaft:" id="labelNMDescMembership" />
<Label text="Nie" id="labelNMDailyRateLimitReset" />
<Label text="Basic" id="labelNMMembership" />
<Label text="in 18 Stunde(n) und 28 Minute(n)" id="labelNMDailyRateLimitReset" />
<Label text="Premium" id="labelNMMembership" />
<Label text="Limit wird zurückgesetzt:" id="labelNMDescLimitReset" />
<Label text="Tägliches Ratenlimit:" id="labelNMDescDailyRateLimit" />
<Label text="0 übrig" id="labelNMDailyRateLimit" />
<Label text="2500 übrig" id="labelNMDailyRateLimit" />
</Panel>
<Button text="Profil aktualisieren" id="buttonNMUpdateProfile" />
<Button text="Thumbnails löschen" id="buttonNMDeleteThumbnails" />
Expand Down
13 changes: 11 additions & 2 deletions Fo76ini/languages/en-US.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Therefore any changes made to this file will be overriden.
You can use this as a template for your own translation, though.
-->
<Language name="English (USA)" iso="en-US" version="1.8.2">
<Language name="English (USA)" iso="en-US" version="1.8.3">
<Strings>
<String text="There is a newer version available: {0}" id="newVersionAvailable" />
<String text="Update now!" id="updateNowButton" />
Expand Down Expand Up @@ -441,6 +441,12 @@ Affected files: Fallout76Custom.ini</Tooltip>
</GroupBox>
</Panel>
<GroupBox text="Login with Bethesda.net" id="groupBoxLogin">
<CheckBox text="Automatically sign-in" id="checkBoxAutoSignin">
<Tooltip>Enabling this will skip the login prompt if you provide your login credentials.

Affected values: bAutoSignin
Affected files: Fallout76Custom.ini</Tooltip>
</CheckBox>
<RadioButton text="Account #8" id="radioButtonAccount8" />
<RadioButton text="Account #7" id="radioButtonAccount7" />
<RadioButton text="Account #6" id="radioButtonAccount6" />
Expand All @@ -450,7 +456,10 @@ Affected files: Fallout76Custom.ini</Tooltip>
<RadioButton text="Account #2" id="radioButtonAccount2" />
<RadioButton text="Account #1" id="radioButtonAccount1" />
<Label text="Profiles:" id="labelAccountProfiles" />
<CheckBox text="Disable Steam" id="checkBoxDisableSteam" />
<CheckBox text="Disable Steam" id="checkBoxDisableSteam">
<Tooltip>Affected values: bSteamEnabled
Affected files: Fallout76Custom.ini</Tooltip>
</CheckBox>
<Label text="Your credentials are saved into Fallout76Custom.ini\nThis way, you don't have to enter your username and password manually\nif you start Fallout 76 without the launcher.\n\nIf you use Steam and want to use your Bethesda.net account\n(e.g. to spent Atoms), tick Disable Steam.\nNOTE: Your achievements will be disabled as well!" id="labelCredentialsExplanation" />
<CheckBox text="Show password" id="checkBoxShowPassword" />
<Label text="Password:" id="labelPassword" />
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.8.2
1.8.3
2 changes: 1 addition & 1 deletion setup.iss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#define MyAppURL "https://www.nexusmods.com/fallout76/mods/546"
#define MyAppExeName "Fo76ini.exe"

#define ProjectVersion "1.8.2"
#define ProjectVersion "1.8.3"
#define ProjectBaseDir "C:\Users\Thomas\Documents\Fallout 76 Quick Configuration - Project files"
#define ProjectGitDir "C:\Users\Thomas\Documents\Fallout 76 Quick Configuration - Project files\Fallout76-QuickConfiguration"

Expand Down

0 comments on commit 80d0120

Please sign in to comment.