mirror of
https://github.com/4sval/FModel.git
synced 2026-03-21 17:24:26 -05:00
Chic was here
This commit is contained in:
parent
68368265ec
commit
d05bed14a4
|
|
@ -118,8 +118,8 @@ namespace FModel.Creator.Rarities
|
|||
break;
|
||||
case "EFortRarity::Transcendent":
|
||||
case "EFortRarity::Masterwork":
|
||||
icon.RarityBackgroundColors = new SKColor[2] { SKColor.Parse("D51944"), SKColor.Parse("660522") };
|
||||
icon.RarityBorderColor = new SKColor[2] { SKColor.Parse("FF3F58"), SKColor.Parse("FF3F58") };
|
||||
icon.RarityBackgroundColors = new SKColor[2] { SKColor.Parse("5CDCE2"), SKColor.Parse("72C5F8") };
|
||||
icon.RarityBorderColor = new SKColor[2] { SKColor.Parse("28DAFB"), SKColor.Parse("28DAFB") };
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace FModel.Grabber.Aes
|
|||
{
|
||||
if (!string.IsNullOrEmpty(benResponse.MainKey))
|
||||
{
|
||||
string mainKey = $"0x{benResponse.MainKey.Substring(2).ToUpper()}";
|
||||
string mainKey = $"0x{benResponse.MainKey[2..].ToUpper()}";
|
||||
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[AES]", $"BenBot Main key is {mainKey}");
|
||||
staticKeys[Globals.Game.ActualGame.ToString()] = mainKey;
|
||||
Properties.Settings.Default.StaticAesKeys = JsonConvert.SerializeObject(staticKeys, Formatting.None);
|
||||
|
|
@ -42,7 +42,7 @@ namespace FModel.Grabber.Aes
|
|||
if (oldDynamicKeys.TryGetValue(Globals.Game.ActualGame.ToString(), out var gameDict))
|
||||
{
|
||||
Dictionary<string, string> difference = benResponse.DynamicKeys
|
||||
.Where(x => !gameDict.ContainsKey(x.Key) || !gameDict[x.Key].Equals(x.Value))
|
||||
.Where(x => !x.Key.Contains("optional") && (!gameDict.ContainsKey(x.Key) || !gameDict[x.Key].Equals(x.Value)))
|
||||
.ToDictionary(x => x.Key, x => x.Value);
|
||||
foreach (KeyValuePair<string, string> KvP in difference)
|
||||
{
|
||||
|
|
@ -50,17 +50,31 @@ namespace FModel.Grabber.Aes
|
|||
Properties.Resources.PakFiles,
|
||||
string.Format(
|
||||
Properties.Resources.PakCanBeOpened,
|
||||
KvP.Key.Substring(KvP.Key.IndexOf("Paks/") + "Paks/".Length)),
|
||||
KvP.Key[(KvP.Key.IndexOf("Paks/") + "Paks/".Length)..]),
|
||||
"/FModel;component/Resources/lock-open-variant.ico");
|
||||
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[AES]", $"{KvP.Key} with key {KvP.Value} can be opened");
|
||||
}
|
||||
}
|
||||
|
||||
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[AES]", $"BenBot Dynamic keys are {benResponse.DynamicKeys}");
|
||||
foreach (var (key, value) in benResponse.DynamicKeys.ToList())
|
||||
{
|
||||
if (key.Contains("optional"))
|
||||
{
|
||||
if (!benResponse.DynamicKeys.TryGetValue(key.Replace("optional", ""), out string _))
|
||||
benResponse.DynamicKeys[key.Replace("optional", "")] = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!benResponse.DynamicKeys.TryGetValue(key.Replace("-WindowsClient", "optional-WindowsClient"), out string _))
|
||||
benResponse.DynamicKeys[key.Replace("-WindowsClient", "optional-WindowsClient")] = value;
|
||||
}
|
||||
}
|
||||
|
||||
oldDynamicKeys[Globals.Game.ActualGame.ToString()] = benResponse.DynamicKeys;
|
||||
Properties.Settings.Default.DynamicAesKeys = JsonConvert.SerializeObject(oldDynamicKeys, Formatting.None);
|
||||
Properties.Settings.Default.Save();
|
||||
|
||||
DebugHelper.WriteLine("{0} {1} {2}", "[FModel]", "[AES]", $"BenBot Dynamic keys are {Properties.Settings.Default.DynamicAesKeys}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
<TextBox Grid.Row="1" Grid.Column="2"
|
||||
Text="{Binding Source={x:Static properties:Settings.Default}, Path=PakPath, Mode=TwoWay}"
|
||||
TextWrapping="NoWrap" VerticalAlignment="Top" Foreground="#FFEFEFEF" Margin="5,3,5,0"/>
|
||||
TextWrapping="NoWrap" VerticalAlignment="Top" Foreground="#FFEFEFEF" Margin="5,3,5,0" TextChanged="OnTextChange"/>
|
||||
<Button Grid.Row="1" Grid.Column="3" Content="..." Height="20" Width="20" VerticalAlignment="Top" Margin="5,3,5,0" Click="OnInputClick"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
|
|
|||
|
|
@ -7,8 +7,10 @@ using Ookii.Dialogs.Wpf;
|
|||
using System.ComponentModel;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace FModel.Windows.Settings
|
||||
{
|
||||
|
|
@ -118,5 +120,14 @@ namespace FModel.Windows.Settings
|
|||
Process.Start(Process.GetCurrentProcess().MainModule.FileName);
|
||||
Application.Current.Shutdown();
|
||||
}
|
||||
|
||||
private void OnTextChange(object sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (e.Source is TextBox text)
|
||||
{
|
||||
bool m = Regex.IsMatch(text.Text, @"^donotedit-youcanteditanyway-\w+\.manifest$");
|
||||
text.IsReadOnly = m;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user