diff --git a/CUE4Parse b/CUE4Parse
index fc2abf20..1b823977 160000
--- a/CUE4Parse
+++ b/CUE4Parse
@@ -1 +1 @@
-Subproject commit fc2abf20867c2bd0079d46cdc7eaa4f521a61376
+Subproject commit 1b82397777d33851781e96134e5afef03028b557
diff --git a/FModel/Creator/Bases/FN/BaseIconStats.cs b/FModel/Creator/Bases/FN/BaseIconStats.cs
index a297b0e0..13d2bfe1 100644
--- a/FModel/Creator/Bases/FN/BaseIconStats.cs
+++ b/FModel/Creator/Bases/FN/BaseIconStats.cs
@@ -89,6 +89,7 @@ public class BaseIconStats : BaseIcon
weaponRowValue.TryGetValue(out float dmgCritical, "DamageZone_Critical"); //Headshot multiplier
weaponRowValue.TryGetValue(out int clipSize, "ClipSize"); //Item magazine size
weaponRowValue.TryGetValue(out float firingRate, "FiringRate"); //Item firing rate, value is shots per second
+ weaponRowValue.TryGetValue(out float swingTime, "SwingTime"); //Item swing rate, value is swing per second
weaponRowValue.TryGetValue(out float armTime, "ArmTime"); //Time it takes for traps to be able to be set off
weaponRowValue.TryGetValue(out float reloadTime, "ReloadTime"); //Time it takes for a weapon to reload
weaponRowValue.TryGetValue(out int bpc, "BulletsPerCartridge"); //Amount of pellets shot by a weapon at once, usually for shotguns
@@ -124,7 +125,7 @@ public class BaseIconStats : BaseIcon
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "068239DD4327B36124498C9C5F61C038", "Magazine Size"), clipSize, 40));
}
- var burstEquation = cartridgePerFire / (((cartridgePerFire - 1f) / burstFiringRate) + (1f / firingRate));
+ var burstEquation = cartridgePerFire != 0f && burstFiringRate != 0f ? (cartridgePerFire / (((cartridgePerFire - 1f) / burstFiringRate) + (1f / firingRate))) : 0f;
if (burstEquation != 0f)
{
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "27B80BA44805ABD5A2D2BAB2902B250C", "Fire Rate"), burstEquation, 11));
@@ -133,6 +134,10 @@ public class BaseIconStats : BaseIcon
{
_statistics.Add(new IconStat(Utils.GetLocalizedResource("", "27B80BA44805ABD5A2D2BAB2902B250C", "Fire Rate"), firingRate, 11));
}
+ else if (swingTime != 0f)
+ {
+ _statistics.Add(new IconStat(Utils.GetLocalizedResource("", "27B80BA44805ABD5A2D2BAB2902B250C", "Fire Rate"), swingTime, 11));
+ }
if (armTime != 0f)
{
diff --git a/FModel/Extensions/StringExtensions.cs b/FModel/Extensions/StringExtensions.cs
index cc8b523c..359ad0e0 100644
--- a/FModel/Extensions/StringExtensions.cs
+++ b/FModel/Extensions/StringExtensions.cs
@@ -29,10 +29,16 @@ public static partial class StringExtensions
{
if (KismetRegex().IsMatch(lineToFind))
return s.GetKismetLineNumber(lineToFind);
+
if (int.TryParse(lineToFind, out var index))
return s.GetLineNumber(index);
- lineToFind = $" \"Name\": \"{lineToFind}\",";
+ return s.GetNameLineNumberText($" \"Name\": \"{lineToFind}\",");
+ }
+
+ [MethodImpl(MethodImplOptions.AggressiveInlining)]
+ public static int GetNameLineNumberText(this string s, string lineToFind)
+ {
using var reader = new StringReader(s);
var lineNum = 0;
while (reader.ReadLine() is { } line)
@@ -41,7 +47,6 @@ public static partial class StringExtensions
if (line.Equals(lineToFind, StringComparison.OrdinalIgnoreCase))
return lineNum;
}
-
return -1;
}
diff --git a/FModel/MainWindow.xaml b/FModel/MainWindow.xaml
index 198d8b59..9021fa43 100644
--- a/FModel/MainWindow.xaml
+++ b/FModel/MainWindow.xaml
@@ -501,6 +501,30 @@
+