From be937d53fc2311ad0f3887fcec1a703f504e533d Mon Sep 17 00:00:00 2001 From: Jarrod Doyle Date: Sun, 25 Aug 2024 13:21:27 +0100 Subject: [PATCH] Add RenderType property support --- project/code/LGS/Database/Chunks/Property.cs | 20 ++++++++++++++++++++ project/code/LGS/Database/File.cs | 1 + 2 files changed, 21 insertions(+) diff --git a/project/code/LGS/Database/Chunks/Property.cs b/project/code/LGS/Database/Chunks/Property.cs index 90a5f1b..98096cc 100644 --- a/project/code/LGS/Database/Chunks/Property.cs +++ b/project/code/LGS/Database/Chunks/Property.cs @@ -73,3 +73,23 @@ public class PropScale : Property scale = reader.ReadVec3(); } } + +public class PropRenderType : Property +{ + public enum Mode + { + Normal, + NotRendered, + Unlit, + EditorOnly, + CoronaOnly, + } + + public Mode mode; + + public override void Read(BinaryReader reader) + { + base.Read(reader); + mode = (Mode)reader.ReadUInt32(); + } +} diff --git a/project/code/LGS/Database/File.cs b/project/code/LGS/Database/File.cs index 6d8cecd..7e89229 100644 --- a/project/code/LGS/Database/File.cs +++ b/project/code/LGS/Database/File.cs @@ -104,6 +104,7 @@ public class DbFile "BRLIST" => new BrList(), "P$ModelName" => new PropertyChunk(), "P$Scale" => new PropertyChunk(), + "P$RenderTyp" => new PropertyChunk(), "LD$MetaProp" => new LinkDataMetaProp(), _ when entryName.StartsWith("L$") => new LinkChunk(), _ => new GenericChunk(),