Skip to content

Commit

Permalink
Support LBP3 level chunks
Browse files Browse the repository at this point in the history
Closes #400
  • Loading branch information
jvyden committed Apr 16, 2024
1 parent 4ab417d commit 07889ee
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions Refresh.GameServer/Importing/Importer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ protected GameAssetType DetermineAssetType(Span<byte> data, TokenPlatform? token
if (MatchesMagic(data, "MATb"u8)) return GameAssetType.Material;
if (MatchesMagic(data, "PLNb"u8)) return GameAssetType.Plan;
if (MatchesMagic(data, "LVLb"u8)) return GameAssetType.Level;
if (MatchesMagic(data, "CHKb"u8)) return GameAssetType.LevelChunk;
if (MatchesMagic(data, "GMTb"u8)) return GameAssetType.GfxMaterial;
if (MatchesMagic(data, "MSHb"u8)) return GameAssetType.Mesh;
if (MatchesMagic(data, "PALb"u8)) return GameAssetType.Palette;
Expand Down
1 change: 1 addition & 0 deletions Refresh.GameServer/Types/Assets/AssetSafetyLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public static AssetSafetyLevel FromAssetType(GameAssetType type)
return type switch
{
GameAssetType.Level => AssetSafetyLevel.Safe,
GameAssetType.LevelChunk => AssetSafetyLevel.Safe,
GameAssetType.Plan => AssetSafetyLevel.Safe,
GameAssetType.MoveRecording => AssetSafetyLevel.Safe,
GameAssetType.SyncedProfile => AssetSafetyLevel.Safe,
Expand Down
9 changes: 9 additions & 0 deletions Refresh.GameServer/Types/Assets/GameAssetType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,4 +142,13 @@ public enum GameAssetType
/// Magic: BEVb
/// </remarks>
Bevel = 19,
/// <summary>
/// A chunk of a level, containing objects and such.
/// Used for 'Dynamic Thermometer' levels in LBP3.
/// </summary>
/// <remarks>
/// Magic: CHKb
/// </remarks>
/// <seealso cref="Level"/>
LevelChunk = 20,
}

0 comments on commit 07889ee

Please sign in to comment.