mirror of
https://github.com/4sval/FModel.git
synced 2026-09-14 04:26:40 -05:00
Fixed some errors
This commit is contained in:
@@ -42,7 +42,7 @@ namespace FModel.Creator.Icons
|
||||
if (obj.TryGetValue(imageType, out var v1) && v1 is StructProperty s && s.Value is UObject type &&
|
||||
type.TryGetValue("ResourceObject", out var v2) && v2 is ObjectProperty resourceObject)
|
||||
{
|
||||
if (!resourceObject.Value.Resource.OuterIndex.Resource.ObjectName.String.Contains("/Game/Athena/Prototype/Textures/"))
|
||||
if (resourceObject.Value.Resource.OuterIndex.Resource != null && !resourceObject.Value.Resource.OuterIndex.Resource.ObjectName.String.Contains("/Game/Athena/Prototype/Textures/"))
|
||||
{
|
||||
icon.IconImage = Utils.GetObjectTexture(resourceObject);
|
||||
assetName = "DA_Featured_" + assetName;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace FModel.Creator.Icons
|
||||
path += "_" + assetName.Substring(assetName.LastIndexOf(".") - 1, 1);
|
||||
|
||||
Package p = Utils.GetPropertyPakPackage(path);
|
||||
if (p.HasExport() && !p.Equals(default))
|
||||
if (p != null && p.HasExport() && !p.Equals(default))
|
||||
{
|
||||
if (GetPreviewImage(icon, p.GetIndexedExport<UObject>(0), hightRes))
|
||||
return;
|
||||
|
||||
@@ -343,11 +343,12 @@ namespace FModel.Utils
|
||||
package = new PakPackage(uasset, uexp, ubulk);
|
||||
else
|
||||
package = new IoPackage(uasset, ubulk, ioStoreEntry);
|
||||
|
||||
#if !DEBUG
|
||||
_CachedFiles[entry] = new Dictionary<Package, ArraySegment<byte>[]>
|
||||
{
|
||||
[package] = new ArraySegment<byte>[] { uasset, uexp, ubulk }
|
||||
};
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -28,8 +28,13 @@ namespace FModel.Utils
|
||||
|
||||
string trigger;
|
||||
{
|
||||
string tempPath = path[1..];
|
||||
trigger = tempPath.Substring(0, tempPath.IndexOf('/'));
|
||||
if (path.Contains("/"))
|
||||
{
|
||||
string tempPath = path[1..];
|
||||
trigger = tempPath.Substring(0, tempPath.IndexOf('/'));
|
||||
}
|
||||
else
|
||||
trigger = path;
|
||||
}
|
||||
|
||||
Regex regex = new Regex(trigger);
|
||||
|
||||
Reference in New Issue
Block a user