Skip to content

Commit

Permalink
Fix UClass and UProperty for Borderlands UE-Explorer/UE-Explorer#55
Browse files Browse the repository at this point in the history
  • Loading branch information
EliotVU committed Apr 27, 2024
1 parent fa4cff6 commit c84ecdf
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
12 changes: 12 additions & 0 deletions src/Core/Classes/Props/UProperty.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,18 @@ protected override void Deserialize()
Record(nameof(PropertyFlags), (PropertyFlagsLO)PropertyFlags);
}
#endif
#if BORDERLANDS
if (Package.Build == UnrealPackage.GameBuild.BuildName.Borderlands &&
_Buffer.LicenseeVersion >= 2)
{
// Disassembled as two ReadObjects, but upon further inspection this HAS to be a FName read instead.
// Always the struct's name for struct properties.
// Always "Messaging" for message like properties.
// Also seen as "Action_SamePropertyName"
var v84 = _Buffer.ReadNameReference();
Record(nameof(v84), v84);
}
#endif
#if XCOM2
if (Package.Build == UnrealPackage.GameBuild.BuildName.XCOM2WotC)
{
Expand Down
11 changes: 10 additions & 1 deletion src/Core/Classes/UClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,13 @@ protected override void Deserialize()
}
#endif
}

#if BORDERLANDS
// Back port of version 670? (No version specified). See also above
if (Package.Build == UnrealPackage.GameBuild.BuildName.Borderlands)
{
AutoCollapseCategories = DeserializeGroup("AutoCollapseCategories");
}
#endif
if (_Buffer.Version >= (uint)PackageObjectLegacyVersion.ForceScriptOrderAddedToUClass
#if BIOSHOCK
// Partially upgraded
Expand Down Expand Up @@ -386,6 +392,9 @@ protected override void Deserialize()
#endif
#if TRANSFORMERS
&& Package.Build != BuildGeneration.HMS
#endif
#if BORDERLANDS
&& Package.Build != UnrealPackage.GameBuild.BuildName.Borderlands
#endif
)
{
Expand Down
9 changes: 7 additions & 2 deletions src/UnrealPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -430,9 +430,14 @@ public enum BuildName
MOH,

/// <summary>
/// 584/058
/// Borderlands
///
/// 584/057-058
/// 594/058
/// </summary>
[Build(584, 58)] Borderlands,
[Build(584, 584, 57, 58)]
[Build(594, 58)]
Borderlands,

/// <summary>
/// 584/126
Expand Down

0 comments on commit c84ecdf

Please sign in to comment.